Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eminos committed Sep 22, 2023
0 parents commit ec01a23
Show file tree
Hide file tree
Showing 20 changed files with 10,624 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
vendor
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Emin Jasarevic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Statamic Tabs

A Statamic plugin to add a Tab Fieldtype. Add tabs anywhere you have other fields!

![Screenshot of Tabs](docs/screenshot1.png)

## Installation

Install this plugin using composer.

```cli
composer require eminos/statamic-tabs
```

## Features

- Add Tabs anywhere you need them. Entry, side panel, Replicator set, Bard set, Global set, etc...
- Doesn't touch your other field data, ie. the data is not scoped.
- Conditionally show/hide a tab. You add the conditions just as with any other field.
- Optionally add an icon to the tab.
- You can search and pick an Iconify icon (over 150 000 icons!) if you have the [Iconify Addon](https://github.com/eminos/statamic-iconify) installed.

## Usage

You just add a Tab field whereever you want to start a new tab.

All the fields that comes after it (and that are not an other tab field) will end up in that tab.

![Screenshot of the blueprint editing with added tabs](docs/screenshot2.png)

## Possible improvements

- Show if there are validation errors on a field inside a tab
- Nested tabs?!
- Improve accessibility, keyboard navigation etc.

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
35 changes: 35 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "eminos/statamic-tabs",
"type": "statamic-addon",
"description": "A Statamic addon to be able to group fields into tabs.",
"license": "MIT",
"require": {
"statamic/cms": "^3.0||^4.0"
},
"require-dev": {
"php": "^8.1",
"laravel/framework": "^10.8",
"statamic/cms": "^4.0"
},
"autoload": {
"psr-4": {
"Eminos\\StatamicTabs\\": "src"
}
},
"extra": {
"statamic": {
"name": "Statamic Field Item Relationship",
"description": "A Statamic addon to be able to group fields into tabs."
},
"laravel": {
"providers": [
"Eminos\\StatamicTabs\\ServiceProvider"
]
}
},
"config": {
"allow-plugins": {
"pixelfear/composer-dist-plugin": true
}
}
}
Loading

0 comments on commit ec01a23

Please sign in to comment.