diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml new file mode 100644 index 00000000..01fe24de --- /dev/null +++ b/.github/workflows/frontend-tests.yml @@ -0,0 +1,30 @@ +name: frontend-tests + +on: + push: + branches: [2.x-dev] + pull_request: + branches: [2.x-dev] + +permissions: + contents: read + +jobs: + tailwind: + name: Tailwind CSS 4 compile + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v7 + + - name: Setup Node + uses: actions/setup-node@v6 + with: + node-version: 24 + + - name: Install frontend dependencies + run: npm install --no-audit --no-fund + + - name: Compile Tailwind and verify Lazy UI classes + run: npm run test:css diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 2464bb84..49566519 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -5,6 +5,12 @@ permissions: on: push: + branches: [2.x-dev] + paths: + - '**.php' + - 'phpstan.neon.dist' + pull_request: + branches: [2.x-dev] paths: - '**.php' - 'phpstan.neon.dist' diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2cdb12ab..803c41d2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,19 +16,19 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.4, 8.3, 8.2] - laravel: [12.*, 11.*, 10.*] + php: [8.5, 8.4, 8.3, 8.2] + laravel: [13.*, 12.*] stability: [prefer-stable] + exclude: + - php: 8.2 + laravel: 13.* include: + - laravel: 13.* + testbench: 11.* + carbon: '>=3.8.4 <4.0' - laravel: 12.* testbench: 10.* carbon: '>=3.8.4 <4.0' - - laravel: 11.* - testbench: 9.* - carbon: '>=2.72.6 <4.0' - - laravel: 10.* - testbench: 8.* - carbon: '>=2.72.6 <3.0' name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/README.md b/README.md index aa57d785..d3a76d4d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is where your description should go. Limit it to a paragraph or two. Consid ## 2.x frontend stack -Lazy UI 2.x uses: +Lazy UI 2.x supports Laravel 12 and 13 and uses: - Tailwind CSS 4 - daisyUI 5 @@ -62,84 +62,101 @@ composer test ## 📁 List of components +Lazy UI 2.x provides wrappers for all current daisyUI 5 component families while keeping daisyUI class names internal to the package. +
show / hide - Actions - - [x] Button - - [ ] Dropdown - - [ ] Modal + - [x] Dropdown + - [x] FAB / Speed Dial + - [x] Modal - [x] Swap + - [x] Theme Controller - Data display - - - [x] Alert + - [x] Accordion - [x] Avatar + - [x] Aura - [x] Badge - - [ ] Banner - - [ ] Calendar - - [ ] Card - - [ ] Carousel + - [x] Card + - [x] Carousel - [x] Chat bubble - - [ ] Collapse - - [ ] Countdown - - [ ] Empty placeholder + - [x] Collapse + - [x] Countdown + - [x] Diff + - [x] Hover 3D + - [x] Hover Gallery - [x] Kbd + - [x] List + - [x] Stat + - [x] Status + - [x] Table + - [x] Text Rotate + - [x] Timeline + +- Navigation + - [x] Breadcrumbs + - [x] Dock + - [x] Link + - [x] Megamenu + - [x] Menu + - [x] Navbar + - [x] Pagination + - [x] Steps + - [x] Tabs + +- Feedback + - [x] Alert - [x] Loading - [x] Progress - [x] Radial progress - - [ ] Stat - - [ ] Table - - [ ] Tag - - [ ] Timeline - - [ ] Toast + - [x] Skeleton + - [x] Toast - [x] Tooltip - - [ ] Treeview - Data input + - [x] Calendar - [x] Checkbox - - [ ] File input - - [x] Text input - - [ ] Radio + - [x] Fieldset + - [x] File Input + - [x] Filter + - [x] Label + - [x] Radio - [x] Range - - [ ] Rating - - [ ] Select - - [ ] Multi select + - [x] Rating + - [x] Select + - [x] Text Input - [x] Textarea - [x] Toggle -- Layout + - [x] Validator + - [x] OTP - - [ ] Artboard - - [x] Button group +- Layout - [x] Divider - - [ ] Drawer - - [ ] Footer + - [x] Drawer + - [x] Footer + - [x] Hero + - [x] Indicator - [x] Join - - [ ] Hero - - [ ] Indicator - - [x] Input group - [x] Mask - [x] Stack -- Navigation - - - [ ] Bottom Navigation - - [x] Breadcrumbs - - [x] Link - - [ ] Menu - - [ ] Navbar - - [ ] Pagination - - [ ] Steps - - [x] Tab - - Mockup - - [ ] Browser - - [ ] Code + - [x] Browser + - [x] Code - [x] Phone - - [ ] Window + - [x] Window + +### Legacy compatibility + +- [x] Button Group → Join +- [x] `danger` → daisyUI `error` +- [x] `boxed` / `lifted` / `bordered` tab API → daisyUI 5 tab classes +- [x] Legacy square/parallelogram masks retained by Lazy UI compatibility CSS
diff --git a/composer.json b/composer.json index 90284839..dd9c1755 100644 --- a/composer.json +++ b/composer.json @@ -25,20 +25,19 @@ } ], "require": { - "php": "^8.1", - "illuminate/contracts": "^v10.17.1|^v11.0|^12.0", + "php": "^8.2", + "illuminate/contracts": "^12.0|^13.0", "livewire/livewire": "^4.4", "spatie/laravel-package-tools": "^1.14.0" }, "require-dev": { - "laravel/pint": "^1.14", - "nunomaduro/collision": "^8.1.1||^7.10.0", - "larastan/larastan": "^2.9||^3.0", - "orchestra/testbench": "^10.0.0||^9.0.0||^8.22.0", - "pestphp/pest": "^2.0||^3.0", - "pestphp/pest-plugin-arch": "^2.0||^3.0", - "pestphp/pest-plugin-laravel": "^2.0||^3.0", + "nunomaduro/collision": "^8.1.1||^9.0", + "larastan/larastan": "^3.0", + "orchestra/testbench": "^10.0||^11.0", + "pestphp/pest": "^3.0||^4.0", + "pestphp/pest-plugin-arch": "^3.0||^4.0", + "pestphp/pest-plugin-laravel": "^3.0||^4.0", "phpstan/extension-installer": "^1.3||^2.0", "phpstan/phpstan-deprecation-rules": "^1.1||^2.0", "phpstan/phpstan-phpunit": "^1.3||^2.0" diff --git a/config/lazy/themes.php b/config/lazy/themes.php index 762d6521..7d3835c6 100644 --- a/config/lazy/themes.php +++ b/config/lazy/themes.php @@ -6,44 +6,53 @@ * Available options: multiple, single, toggle */ 'theme_toggle' => 'multiple', + /* - * This is the list of themes that will be available for the theme switcher. - * You can add your own themes here. + * Themes displayed by the Lazy UI theme switcher. + * + * To add a custom daisyUI theme, define it in your application's + * resources/css/lazy.css and add the same theme name here. */ 'themes' => [ 'light', 'dark', - 'acid', - 'aqua', - 'autumn', - 'black', + 'cupcake', 'bumblebee', - 'business', - 'cmyk', - 'coffee', + 'emerald', 'corporate', - 'cupcake', + 'synthwave', + 'retro', 'cyberpunk', - 'dracula', - 'emerald', - 'fantasy', - 'forest', - 'garden', + 'valentine', 'halloween', - 'lemonade', + 'garden', + 'forest', + 'aqua', 'lofi', + 'pastel', + 'fantasy', + 'wireframe', + 'black', 'luxury', + 'dracula', + 'cmyk', + 'autumn', + 'business', + 'acid', + 'lemonade', 'night', - 'pastel', - 'retro', - 'synthwave', - 'valentine', + 'coffee', 'winter', - 'wireframe', + 'dim', + 'nord', + 'sunset', + 'caramellatte', + 'abyss', + 'silk', ], /* - * This is list to toggle themes. + * Themes used by the two-state theme toggle. */ 'toggle_themes' => [ 'light', diff --git a/docs/upgrade-1-to-2.md b/docs/upgrade-1-to-2.md index afa6dd34..1d7cf724 100644 --- a/docs/upgrade-1-to-2.md +++ b/docs/upgrade-1-to-2.md @@ -1,6 +1,6 @@ # Upgrade from Lazy UI 1.x to 2.x -Lazy UI 2.x is a major frontend migration. +Lazy UI 2.x is a major frontend migration and supports Laravel 12 and 13 only. | Lazy UI | Tailwind CSS | daisyUI | Quill | | --- | --- | --- | --- | @@ -11,6 +11,8 @@ Lazy UI 1.x remains the maintenance line for projects that need Tailwind CSS 3 o ## Before upgrading +Make sure the application is running Laravel 12 or 13 before upgrading Lazy UI. Laravel 10 and 11 are not supported by Lazy UI 2.x. + Create a branch and make sure the current application builds before changing dependencies. ```bash diff --git a/package.json b/package.json index 2cdd6cce..e16c5685 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,24 @@ "version": "2.0.0-dev", "description": "TallStack components", "license": "MIT", - "keywords": ["design-system","tailwindcss","components","ui-library","component","framework","tailwind"], + "keywords": [ + "design-system", + "tailwindcss", + "components", + "ui-library", + "component", + "framework", + "tailwind" + ], + "scripts": { + "test:css": "tailwindcss -i ./tests/frontend/lazy.css -o ./build/lazy-ui.css --minify && node ./tests/frontend/assert-css.mjs" + }, "dependencies": { - "alpinejs": "^3.13.1", "axios": "^1.6.0", - "quill": "^2.0.3", - "theme-change": "^2.5.0" + "quill": "^2.0.3" }, "devDependencies": { + "@tailwindcss/cli": "^4.3.3", "@tailwindcss/forms": "^0.5.6", "@tailwindcss/postcss": "^4.3.3", "daisyui": "^5.7.46", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index cc55b688..9ca6c1d7 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -9,5 +9,4 @@ parameters: tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true - checkMissingIterableValueType: false treatPhpDocTypesAsCertain: true diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f5df41c9..317c1295 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,13 +5,6 @@ tests - - - - - - - diff --git a/resources/css/lazy.css b/resources/css/lazy.css index 0f47a7c2..b229762c 100644 --- a/resources/css/lazy.css +++ b/resources/css/lazy.css @@ -1,22 +1,30 @@ -@import "tailwindcss"; -@import "quill/dist/quill.snow.css"; @import "./components/toast.css"; -@source "../views/**/*.blade.php"; +.pause { + animation-play-state: paused; +} -@plugin "@tailwindcss/forms" { - strategy: "class"; +/* + * daisyUI 4 compatibility helpers. + * These mask variants were removed in daisyUI 5, but Lazy UI 2 keeps + * them so existing Lazy UI markup continues to render. + */ +.mask-square { + clip-path: inset(0); } -@plugin "daisyui" { - themes: light --default, dark --prefersdark, cupcake, bumblebee, emerald, corporate, synthwave, retro, cyberpunk, valentine, halloween, garden, forest, aqua, lofi, pastel, fantasy, wireframe, black, luxury, dracula, cmyk, autumn, business, acid, lemonade, night, coffee, winter; - logs: false; +.mask-parallelogram { + clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); } -@theme { - --font-base: "Inter", sans-serif; +.mask-parallelogram-2 { + clip-path: polygon(0 0, 75% 0, 100% 100%, 25% 100%); } -.pause { - animation-play-state: paused; +.mask-parallelogram-3 { + clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%); +} + +.mask-parallelogram-4 { + clip-path: polygon(0 0, 75% 0, 100% 100%, 0 100%); } diff --git a/resources/js/components/logout.js b/resources/js/components/logout.js deleted file mode 100644 index 82e02bc5..00000000 --- a/resources/js/components/logout.js +++ /dev/null @@ -1,7 +0,0 @@ -let logout = document.querySelector('.logout') -if (logout) { - logout.addEventListener('click', (event) => { - event.preventDefault() - document.getElementById('logout-form').submit() - }) -} diff --git a/resources/js/components/quill.js b/resources/js/components/quill.js index 01b76558..2f72fed6 100644 --- a/resources/js/components/quill.js +++ b/resources/js/components/quill.js @@ -1,88 +1,87 @@ -import Quill from "quill"; +let quillPromise; -window.Quill = Quill; -document.addEventListener('alpine:init', () => { - Alpine.data('quill', ({__value, options, __config, onTextChange, onInit}) => { - return { - __ready: false, - __value, - __quill: undefined, - - init() { - if (typeof window.Quill !== 'function') { - throw new Error(`quill requires Quill to be loaded. See https://quilljs.com/docs/`); - } +async function loadQuill() { + if (typeof window.Quill === 'function') { + return window.Quill; + } - queueMicrotask(() => { - this.__ready = true; + quillPromise ??= Promise.all([ + import('quill'), + import('quill/dist/quill.snow.css'), + ]).then(([module]) => { + window.Quill = module.default; - this.__quill = new window.Quill(this.$refs.quill, this.__quillOptions()); + return module.default; + }); - this.__quill.root.innerHTML = this.__value; + return quillPromise; +} - this.__quill.on('text-change', () => { - if (typeof onTextChange === 'function') { - const result = onTextChange(this); +document.addEventListener('alpine:init', () => { + Alpine.data('quill', ({__value, options, __config, onTextChange, onInit}) => ({ + __ready: false, + __value, + __quill: undefined, - if (result === false) { - return; - } - } + init() { + queueMicrotask(async () => { + const Quill = await loadQuill(); - this.__value = this.__quill.root.innerHTML; + if (!this.$refs.quill?.isConnected) { + return; + } - this.$dispatch('input', this.__value); - }); + this.__quill = new Quill(this.$refs.quill, this.__quillOptions()); + this.__quill.root.innerHTML = this.__value ?? ''; - if (options.autofocus) { - this.$nextTick(() => { - this.focus(); - }); + this.__quill.on('text-change', () => { + if (typeof onTextChange === 'function' && onTextChange(this) === false) { + return; } - if (typeof onInit === 'function') { - onInit(this); - } + this.__value = this.__quill.root.innerHTML; + this.$dispatch('input', this.__value); }); - }, - focus() { - if (!this.__ready) { - return; - } - - this.__quill.focus(); - }, + this.__ready = true; - __quillOptions() { - let config = __config(this, options); - let toolbarHandlers = {}; - let modules = {}; - - if (config.hasOwnProperty('toolbarHandlers')) { - toolbarHandlers = config.toolbarHandlers; - delete config.toolbarHandlers; + if (options.autofocus) { + this.$nextTick(() => this.focus()); } - if (config.hasOwnProperty('modules')) { - modules = config.modules; - delete config.modules; + if (typeof onInit === 'function') { + onInit(this); } + }); + }, - return { - theme: options.theme, - readOnly: options.readOnly, - placeholder: options.placeholder, - modules: { - toolbar: { - container: options.toolbar, - handlers: toolbarHandlers, - }, - ...modules, + focus() { + if (this.__ready) { + this.__quill.focus(); + } + }, + + __quillOptions() { + const config = __config(this, options); + const toolbarHandlers = config.toolbarHandlers ?? {}; + const modules = config.modules ?? {}; + + delete config.toolbarHandlers; + delete config.modules; + + return { + theme: options.theme, + readOnly: options.readOnly, + placeholder: options.placeholder, + modules: { + toolbar: { + container: options.toolbar, + handlers: toolbarHandlers, }, - ...config, - }; - }, - }; - }); -}) + ...modules, + }, + ...config, + }; + }, + })); +}); diff --git a/resources/js/components/select.js b/resources/js/components/select.js new file mode 100644 index 00000000..3aae460d --- /dev/null +++ b/resources/js/components/select.js @@ -0,0 +1,259 @@ +document.addEventListener('alpine:init', () => { + Alpine.data('select', (initialOptions = [], value = null, placeholder = 'Please select a value') => ({ + options: Array.isArray(initialOptions) ? initialOptions : [], + placeholder, + value, + status: false, + activeIndex: 0, + selectedIndex: null, + selectedItem: null, + + init() { + this.refreshOptions(); + + if (this.options.length === 0 && this.$refs.native) { + this.options = Array.from(this.$refs.native.options) + .filter((option) => !option.dataset.lazyPlaceholder) + .map((option) => ({ + value: option.value, + label: option.textContent?.trim() ?? option.value, + disabled: option.disabled, + })); + } else { + this.populateNativeOptions(); + } + + this.syncSelection(this.value ?? this.$refs.native?.value ?? null); + + this.$watch('defaultValue', (nextValue) => { + this.value = nextValue; + this.syncSelection(nextValue); + }); + }, + + refreshOptions() { + this.options = this.options.map((option, index) => { + if (option !== null && typeof option === 'object') { + return { + value: option.value ?? index, + label: option.label ?? option.text ?? option.value ?? index, + disabled: Boolean(option.disabled), + }; + } + + return { + value: option, + label: option, + disabled: false, + }; + }); + }, + + populateNativeOptions() { + if (!this.$refs.native || this.options.length === 0) { + return; + } + + const existing = Array.from(this.$refs.native.options) + .filter((option) => !option.dataset.lazyPlaceholder); + + if (existing.length > 0) { + return; + } + + this.options.forEach((item) => { + const option = new Option(item.label, item.value, false, false); + option.disabled = item.disabled; + this.$refs.native.add(option); + }); + }, + + syncSelection(nextValue) { + const normalizedValue = nextValue === null || nextValue === undefined + ? '' + : String(nextValue); + + this.selectedIndex = this.options.findIndex( + (item) => String(item.value) === normalizedValue + ); + + this.selectedItem = this.selectedIndex >= 0 + ? this.options[this.selectedIndex] + : null; + + if (this.$refs.native) { + this.$refs.native.value = normalizedValue; + } + }, + + onClick() { + if (this.$refs.native?.disabled || this.status) { + return; + } + + this.activeIndex = this.selectedIndex >= 0 + ? this.selectedIndex + : Math.max(this.activeIndex ?? 0, 0); + + this.status = true; + + this.$nextTick(() => { + this.$refs.listbox?.focus(); + }); + }, + + selectItem(item, index) { + if (!item || item.disabled) { + return; + } + + this.selectedIndex = index; + this.selectedItem = item; + this.value = item.value; + this.defaultValue = item.value; + this.status = false; + + if (this.$refs.native) { + this.$refs.native.value = item.value; + this.$refs.native.dispatchEvent(new Event('input', { bubbles: true })); + this.$refs.native.dispatchEvent(new Event('change', { bubbles: true })); + } + + this.$dispatch('input', item.value); + }, + + move(direction) { + if (this.options.length === 0) { + return; + } + + let next = this.activeIndex; + const start = next; + + do { + next = (next + direction + this.options.length) % this.options.length; + } while (this.options[next]?.disabled && next !== start); + + this.activeIndex = next; + }, + + button: { + ['x-ref']: 'button', + ['role']: 'combobox', + [':aria-expanded']() { + return this.status; + }, + ['@click']() { + this.onClick(); + }, + ['@keydown.arrow-up.stop.prevent']() { + this.onClick(); + this.move(-1); + }, + ['@keydown.arrow-down.stop.prevent']() { + this.onClick(); + this.move(1); + }, + }, + + listbox: { + ['x-ref']: 'listbox', + ['x-show']() { + return this.status; + }, + ['@click.outside']() { + this.status = false; + }, + ['@keydown.enter.stop.prevent']() { + if (this.activeIndex === null) { + return; + } + + this.selectItem(this.options[this.activeIndex], this.activeIndex); + this.$refs.button?.focus(); + }, + ['@keydown.space.stop.prevent']() { + if (this.activeIndex === null) { + return; + } + + this.selectItem(this.options[this.activeIndex], this.activeIndex); + this.$refs.button?.focus(); + }, + ['@keydown.escape.stop.prevent']() { + this.status = false; + this.$refs.button?.focus(); + }, + ['@keydown.arrow-up.stop.prevent']() { + this.move(-1); + }, + ['@keydown.arrow-down.stop.prevent']() { + this.move(1); + }, + }, + + list: { + ['x-for']: '(template, index) in options', + }, + + listItem: { + [':id']() { + return `option-${this.index}`; + }, + [':aria-selected']() { + return this.selectedIndex === this.index; + }, + [':aria-disabled']() { + return Boolean(this.template.disabled); + }, + [':class']() { + return { + 'menu-active': this.activeIndex === this.index, + 'menu-disabled': this.template.disabled, + }; + }, + ['@click']() { + this.selectItem(this.template, this.index); + }, + ['@mouseleave']() { + this.activeIndex = null; + }, + ['@mouseenter']() { + if (!this.template.disabled) { + this.activeIndex = this.index; + } + }, + }, + + listItemLabel: { + ['x-text']() { + return this.template.label; + }, + [':class']() { + return { + 'font-semibold': this.selectedIndex === this.index, + }; + }, + }, + + listItemCheckIcon: { + ['x-show']() { + return this.selectedIndex === this.index; + }, + }, + + selectedItemLabel: { + ['x-text']() { + return this.selectedItem?.label || this.placeholder; + }, + }, + + caretIcon: { + [':class']() { + return { + 'rotate-180': this.status, + }; + }, + }, + })); +}); diff --git a/resources/js/components/themeswitcher.js b/resources/js/components/themeswitcher.js index 5f374d3f..c320839f 100644 --- a/resources/js/components/themeswitcher.js +++ b/resources/js/components/themeswitcher.js @@ -1,17 +1,105 @@ -import { themeChange } from 'theme-change' +const storageKey = 'theme'; -themeChange() -let themeToggleBtn = document.querySelector('[data-toggle-theme]') +function toggleThemes(element) { + return (element.dataset.toggleTheme || 'light,dark') + .split(',') + .map((theme) => theme.trim()) + .filter(Boolean); +} -document.addEventListener('DOMContentLoaded', () => { - if (themeToggleBtn) { - if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { - themeToggleBtn.classList.add('swap-active') - } else { - themeToggleBtn.classList.remove('swap-active') +function currentTheme() { + return document.documentElement.dataset.theme || localStorage.getItem(storageKey) || ''; +} + +function syncToggles(theme) { + document.querySelectorAll('[data-toggle-theme]').forEach((element) => { + const themes = toggleThemes(element); + element.classList.toggle('swap-active', themes.length > 1 && theme === themes[1]); + }); +} + +function syncActiveTheme(theme) { + document.querySelectorAll('[data-set-theme]').forEach((element) => { + const activeClass = element.dataset.actClass; + + if (!activeClass) { + return; } + + element.classList.toggle(activeClass, element.dataset.setTheme === theme); + }); +} + +function applyTheme(theme, persist = true) { + if (!theme) { + return; + } + + document.documentElement.dataset.theme = theme; + + if (persist) { + localStorage.setItem(storageKey, theme); + } + + syncToggles(theme); + syncActiveTheme(theme); + + window.dispatchEvent(new CustomEvent('lazy-ui:theme-changed', { + detail: {theme}, + })); +} + +function initialTheme() { + const stored = localStorage.getItem(storageKey); + + if (stored) { + return stored; + } + + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { + return 'dark'; } -}) + return currentTheme(); +} +document.addEventListener('click', (event) => { + const themeItem = event.target.closest('[data-set-theme]'); + + if (themeItem) { + applyTheme(themeItem.dataset.setTheme); + + return; + } + + const toggle = event.target.closest('[data-toggle-theme]'); + + if (!toggle) { + return; + } + + const themes = toggleThemes(toggle); + + if (!themes.length) { + return; + } + + const index = themes.indexOf(currentTheme()); + const nextTheme = themes[(index + 1 + themes.length) % themes.length]; + + applyTheme(nextTheme); +}); + +function bootThemeSwitcher() { + const theme = initialTheme(); + + if (theme) { + applyTheme(theme, false); + } +} +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', bootThemeSwitcher, {once: true}); +} else { + bootThemeSwitcher(); +} diff --git a/resources/js/lazy.js b/resources/js/lazy.js index 18743679..ece57f4e 100644 --- a/resources/js/lazy.js +++ b/resources/js/lazy.js @@ -1,4 +1,4 @@ import './components/themeswitcher' -import './components/logout' import './components/toast' import './components/quill' +import './components/select' diff --git a/resources/views/accordion.blade.php b/resources/views/accordion.blade.php index 9eaa9861..d2ef2837 100644 --- a/resources/views/accordion.blade.php +++ b/resources/views/accordion.blade.php @@ -1,16 +1,18 @@ -@props([ - 'title' => '', - 'active' => false, - 'name' => '', - 'toggle' => false, -]) - -
- -
- {{ $title }} -
-
+@if ($collectionMode) +
+ @foreach ($items as $item) +
+ +
{{ $item['title'] }}
+
{{ $item['content'] }}
+
+ @endforeach {{ $slot }}
-
+@else +
+ +
{{ $resolvedTitle }}
+
{{ $slot }}
+
+@endif diff --git a/resources/views/aura.blade.php b/resources/views/aura.blade.php new file mode 100644 index 00000000..560850d1 --- /dev/null +++ b/resources/views/aura.blade.php @@ -0,0 +1 @@ +
{{ $slot }}
diff --git a/resources/views/avatar-group.blade.php b/resources/views/avatar-group.blade.php index 71323e20..560850d1 100644 --- a/resources/views/avatar-group.blade.php +++ b/resources/views/avatar-group.blade.php @@ -1,3 +1 @@ -
- {{ $slot }} -
+
{{ $slot }}
diff --git a/resources/views/badge.blade.php b/resources/views/badge.blade.php index 10c2e985..7f41a6d6 100644 --- a/resources/views/badge.blade.php +++ b/resources/views/badge.blade.php @@ -1,5 +1,9 @@ @props([ 'label' => '', - 'icon' => '' + 'icon' => '', + 'unstyled' => false, ]) -merge(['class'=> ($icon ? ' gap-2' : '')]) }}>{{ $icon }}{{ $label ?: $slot }} + +merge(['class' => ! $unstyled && $icon ? 'gap-2' : '']) }}> + {{ $icon }}{{ $label ?: $slot }} + diff --git a/resources/views/breadcrumbs.blade.php b/resources/views/breadcrumbs.blade.php index bd0c68f4..403b0e48 100644 --- a/resources/views/breadcrumbs.blade.php +++ b/resources/views/breadcrumbs.blade.php @@ -1,3 +1,17 @@
- {{ $slot }} + @if ($items) + + @else + {{ $slot }} + @endif
diff --git a/resources/views/btn.blade.php b/resources/views/btn.blade.php index 4fc9fc9b..155d32d3 100644 --- a/resources/views/btn.blade.php +++ b/resources/views/btn.blade.php @@ -1,16 +1,10 @@ -@props([ - 'icon' => null, - 'rightIcon' => null, - 'label' => '' -]) +@aware(['join' => false]) -@aware([ - 'join' => false, -]) - -<{{ $tag }} {{ $attributes->merge(['class' => $icon || $rightIcon ? ' gap-2' : ''])->class([ - 'join-item' => $join, - 'mr-2' => ! $join, +<{{ $tag }} {{ $attributes + ->merge(['class' => $contentClass]) + ->class([ + 'join-item' => $join, + $standaloneClass => ! $join && $standaloneClass !== '', ]) }}> @if($icon) {{ $icon }} @@ -18,7 +12,7 @@ {{ $label }} {{ $slot }} @if($rightIcon) -
+
{{ $rightIcon }}
@endisset diff --git a/resources/views/btn/logout.blade.php b/resources/views/btn/logout.blade.php index 6592bca4..890350dd 100644 --- a/resources/views/btn/logout.blade.php +++ b/resources/views/btn/logout.blade.php @@ -1,12 +1,8 @@ -@props([ - 'icon' => '' -]) -
- merge(['class'=>"logout"]) }}> +
+ @csrf + + except(['action', 'route', 'href']) }}> {!! $icon !!} {{ __('Logout') }} - - - @csrf -
-
+ + diff --git a/resources/views/calendar.blade.php b/resources/views/calendar.blade.php new file mode 100644 index 00000000..79546edd --- /dev/null +++ b/resources/views/calendar.blade.php @@ -0,0 +1,11 @@ +@if ($tag === 'cally') + + @isset($previous){{ $previous }}@endisset + + @isset($next){{ $next }}@endisset + +@elseif ($tag === 'vc' || $tag === 'react-day-picker') +
{{ $slot }}
+@else + +@endif diff --git a/resources/views/card.blade.php b/resources/views/card.blade.php new file mode 100644 index 00000000..47b344ee --- /dev/null +++ b/resources/views/card.blade.php @@ -0,0 +1,8 @@ +
+ @isset($figure)
{{ $figure }}
@endisset +
+ @if ($title)

{{ $title }}

@endif + {{ $slot }} + @isset($actions)
{{ $actions }}
@endisset +
+
diff --git a/resources/views/carousel-item.blade.php b/resources/views/carousel-item.blade.php new file mode 100644 index 00000000..560850d1 --- /dev/null +++ b/resources/views/carousel-item.blade.php @@ -0,0 +1 @@ +
{{ $slot }}
diff --git a/resources/views/carousel.blade.php b/resources/views/carousel.blade.php new file mode 100644 index 00000000..f69296ec --- /dev/null +++ b/resources/views/carousel.blade.php @@ -0,0 +1,9 @@ +
+ @foreach ($items as $item) +
+ @if ($item['src']){{ $item['alt'] }}@endif + @if ($item['content'] !== null){{ $item['content'] }}@endif +
+ @endforeach + {{ $slot }} +
diff --git a/resources/views/choices.blade.php b/resources/views/choices.blade.php index ea7f352f..fa1b6c90 100644 --- a/resources/views/choices.blade.php +++ b/resources/views/choices.blade.php @@ -1,57 +1,44 @@ -@props([ - 'options' => null, - 'label' => '', - 'placeholder' => 'Please select a value', -// 'value'=> null -]) -@php - $model = $attributes->wire('model'); - $lazy = $model->hasModifier('lazy'); - $parameter = $model->value(); +
merge(['class' => $viewClasses['wrapper']]) }} + @if ($model) + x-data="{ defaultValue: $wire.entangle(@js($model)){{ $modelLive ? '.live' : '' }} }" + @else + x-data="{ defaultValue: @js($value) }" + @endif +> +
+ @if ($label) + + @endif -@endphp -{{--@dd($attributes,$model, $lazy, $parameter)--}} + -
-
-
- -
- -
    - -
-
-
+ + +
diff --git a/resources/views/collapse.blade.php b/resources/views/collapse.blade.php new file mode 100644 index 00000000..ea7d63ed --- /dev/null +++ b/resources/views/collapse.blade.php @@ -0,0 +1,4 @@ +
+ {{ $title }} +
{{ $slot }}
+
diff --git a/resources/views/components/drawer.blade.php b/resources/views/components/drawer.blade.php index 32503d80..80909187 100644 --- a/resources/views/components/drawer.blade.php +++ b/resources/views/components/drawer.blade.php @@ -1,12 +1 @@ -
merge(['class' => 'drawer']) }}> - -
- {{ $slot }} -
-
- - -
-
\ No newline at end of file +@include('lazy::drawer') diff --git a/resources/views/components/hero.blade.php b/resources/views/components/hero.blade.php index bbbf2b18..b3bb2bcb 100644 --- a/resources/views/components/hero.blade.php +++ b/resources/views/components/hero.blade.php @@ -1,9 +1 @@ -
merge(['class' => 'hero bg-base-200']) }}> -
-
-

{{ $title }}

-

{{ $description }}

- {{ $slot }} -
-
-
\ No newline at end of file +@include('lazy::hero') diff --git a/resources/views/components/indicator.blade.php b/resources/views/components/indicator.blade.php index 28dfb226..f867572b 100644 --- a/resources/views/components/indicator.blade.php +++ b/resources/views/components/indicator.blade.php @@ -1,6 +1 @@ -
merge(['class' => 'indicator']) }}> - @if($indicator) - {{ $indicator }} - @endif - {{ $slot }} -
\ No newline at end of file +@include('lazy::indicator') diff --git a/resources/views/countdown.blade.php b/resources/views/countdown.blade.php index 23fb1319..9c0e7a33 100644 --- a/resources/views/countdown.blade.php +++ b/resources/views/countdown.blade.php @@ -1,101 +1,3 @@ -# Countdown - - - -Large text - - - -Clock countdown - - h - m - s - -Clock countdown with colons - - : - : - - -Large text with labels -
-
- - - - days -
-
- - - - hours -
-
- - - - min -
-
- - - - sec -
-
-Large text with labels under -
-
- - - - days -
-
- - - - hours -
-
- - - - min -
-
- - - - sec -
-
-In boxes -
-
- - - - days -
-
- - - - hours -
-
- - - - min -
-
- - - - sec -
-
+ + +@if ($label){{ $label }}@endif diff --git a/resources/views/diff.blade.php b/resources/views/diff.blade.php new file mode 100644 index 00000000..821a97dc --- /dev/null +++ b/resources/views/diff.blade.php @@ -0,0 +1,5 @@ +
+
{{ $before ?? '' }}
+
{{ $after ?? $slot }}
+
+
diff --git a/resources/views/dock-item.blade.php b/resources/views/dock-item.blade.php new file mode 100644 index 00000000..19acc4a0 --- /dev/null +++ b/resources/views/dock-item.blade.php @@ -0,0 +1,11 @@ +@if ($tag === 'a') + + {{ $slot }} + @if ($label){{ $label }}@endif + +@else + +@endif diff --git a/resources/views/dock.blade.php b/resources/views/dock.blade.php new file mode 100644 index 00000000..eed6d1b0 --- /dev/null +++ b/resources/views/dock.blade.php @@ -0,0 +1,16 @@ +
+ @foreach ($items as $item) + @if ($item['href'] && ! $item['disabled']) + + @if ($item['content'] !== null){{ $item['content'] }}@endif + @if ($item['label']){{ $item['label'] }}@endif + + @else + + @endif + @endforeach + {{ $slot }} +
diff --git a/resources/views/drawer.blade.php b/resources/views/drawer.blade.php new file mode 100644 index 00000000..a4ccea1c --- /dev/null +++ b/resources/views/drawer.blade.php @@ -0,0 +1,15 @@ +
+ + +
{{ $slot }}
+ +
+ + + @isset($side) +
attributes->merge(['class' => $viewClasses['panel']]) }}>{{ $side }}
+ @else +
{{ $drawerContent }}
+ @endisset +
+
diff --git a/resources/views/dropdown.blade.php b/resources/views/dropdown.blade.php new file mode 100644 index 00000000..f83e87e5 --- /dev/null +++ b/resources/views/dropdown.blade.php @@ -0,0 +1,11 @@ +
+ @isset($trigger) + {{ $trigger }} + @else + + @endisset + +
+ {{ $slot }} +
+
diff --git a/resources/views/fab.blade.php b/resources/views/fab.blade.php new file mode 100644 index 00000000..ad7022b4 --- /dev/null +++ b/resources/views/fab.blade.php @@ -0,0 +1,6 @@ +
+ @isset($trigger){{ $trigger }}@else
{{ $label }}
@endisset + {{ $slot }} + @isset($close)
{{ $close }}
@endisset + @isset($main)
{{ $main }}
@endisset +
diff --git a/resources/views/fieldset.blade.php b/resources/views/fieldset.blade.php new file mode 100644 index 00000000..b182ade3 --- /dev/null +++ b/resources/views/fieldset.blade.php @@ -0,0 +1,6 @@ +
+ @if ($legend){{ $legend }}@endif + @if ($label)@endif + {{ $slot }} + @if ($hint)

{{ $hint }}

@endif +
diff --git a/resources/views/file-input.blade.php b/resources/views/file-input.blade.php new file mode 100644 index 00000000..e1a2b86a --- /dev/null +++ b/resources/views/file-input.blade.php @@ -0,0 +1,2 @@ +@aware(['join' => false]) +class($join ? $viewClasses['join'] : '') }} /> diff --git a/resources/views/filter.blade.php b/resources/views/filter.blade.php new file mode 100644 index 00000000..3afd02b1 --- /dev/null +++ b/resources/views/filter.blade.php @@ -0,0 +1,15 @@ +
+ + @foreach ($items as $item) + + @endforeach + {{ $slot }} +
diff --git a/resources/views/footer.blade.php b/resources/views/footer.blade.php new file mode 100644 index 00000000..d1cc54a4 --- /dev/null +++ b/resources/views/footer.blade.php @@ -0,0 +1 @@ +
{{ $slot }}
diff --git a/resources/views/form-group.blade.php b/resources/views/form-group.blade.php index 179888d7..32d8cc24 100644 --- a/resources/views/form-group.blade.php +++ b/resources/views/form-group.blade.php @@ -1,30 +1,15 @@ -@props([ - 'label' => '', - 'help' => '', - 'hr' => false, -]) - -@php - $required = $attributes['required'] ?? null; - if ($label) { - $label .= ($required ? '*' : ''); - } - $model = $attributes->wire('model'); - $parameter = $model->value(); -@endphp -
@if ($help)
- - + +
@endif diff --git a/resources/views/form/checkbox.blade.php b/resources/views/form/checkbox.blade.php index 55051673..f29cf401 100644 --- a/resources/views/form/checkbox.blade.php +++ b/resources/views/form/checkbox.blade.php @@ -1,30 +1,13 @@ -@props([ - 'label' => '', - 'help' => '', - 'hr' => false, -]) - -@php - $required = $attributes['required'] ?? null; - if ($label) { - $label .= ($required ? '*' : ''); - } - $model = $attributes->wire('model'); - $parameter = $model->value(); -@endphp -
@if ($help)
- - + +
@endif diff --git a/resources/views/form/image.blade.php b/resources/views/form/image.blade.php index fc45bf83..8e560d16 100644 --- a/resources/views/form/image.blade.php +++ b/resources/views/form/image.blade.php @@ -1,45 +1,23 @@ -@props([ - 'label' => '', - 'placeholder' => '', - 'help' => '', - 'hr' => '', - 'outerClass' => '', - 'icon' => '', - 'rightIcon' => '', - 'src' => '', - 'type' => 'file', -]) - -@php - $required = $attributes['required'] ?? false; - $placeholder = $placeholder ?: $label; - $parameter = $attributes->wire('model')->value(); - $hasError = $errors->has($parameter); -@endphp
- {{-- merge(['class' => 'input w-full'.($hasError ? ' text-error' : ''), 'type' => 'text', 'placeholder' => $placeholder ]) }} />--}} {{ $slot }} -
- @if($src) - merge(compact('src')) }} alt="" class="w-6/12 mb-3"/> + + @if ($src) + @endif + @if ($help)
- - + +
@endif + @if ($parameter) - @error($parameter) - - @enderror + @error($parameter)@enderror @endif
- diff --git a/resources/views/form/input.blade.php b/resources/views/form/input.blade.php index e627386e..9e9aee6e 100644 --- a/resources/views/form/input.blade.php +++ b/resources/views/form/input.blade.php @@ -1,40 +1,20 @@ -@props([ - 'label' => '', - 'placeholder' => '', - 'help' => '', - 'hr' => '', - 'outerClass' => '', - 'icon' => '', - 'rightIcon' => '' -]) - -@php - $required = $attributes['required'] ?? false; - $placeholder = $placeholder ?: $label; - $parameter = $attributes->wire('model')->value(); - $hasError = $errors->has($parameter); -@endphp
{{ $slot }} - @if($rightIcon) - {{ $rightIcon }} - @endif + @isset($rightIcon){{ $rightIcon }}@endisset
+ @if ($help)
- - + +
@endif + @if ($parameter) - @error($parameter) - - @enderror + @error($parameter)@enderror @endif
diff --git a/resources/views/form/richtext.blade.php b/resources/views/form/richtext.blade.php index 1552ece8..a5f46482 100644 --- a/resources/views/form/richtext.blade.php +++ b/resources/views/form/richtext.blade.php @@ -1,42 +1,20 @@ -@props([ - 'label' => '', - 'placeholder' => '', - 'help' => '', - 'hr' => '', - 'outerClass' => '', - 'icon' => '', - 'rightIcon' => '' -]) - -@php - $required = $attributes['required'] ?? false; - $placeholder = $placeholder ?: $label; - $parameter = $attributes->wire('model')->value(); - $hasError = $errors->has($parameter); -@endphp
- {{-- merge(['class' => 'input w-full'.($hasError ? ' text-error' : ''), 'type' => 'text', 'placeholder' => $placeholder ]) }} />--}} {{ $slot }} - @if($rightIcon) - {{ $rightIcon }} - @endif + @isset($rightIcon){{ $rightIcon }}@endisset
+ @if ($help)
- - + +
@endif + @if ($parameter) - @error($parameter) - - @enderror + @error($parameter)@enderror @endif
- diff --git a/resources/views/form/select.blade.php b/resources/views/form/select.blade.php index f941c3f4..aefff2e9 100644 --- a/resources/views/form/select.blade.php +++ b/resources/views/form/select.blade.php @@ -1,47 +1,18 @@ -@props([ - 'label' => '', - 'placeholder' => '', - 'help' => '', - 'hr' => '', - 'outerClass' => '', - 'icon' => '', - 'rightIcon' => '' -]) - -@php - $required = $attributes['required'] ?? false; - $placeholder = $placeholder ?: $label; - $parameter = $attributes->wire('model')->value(); - $hasError = $errors->has($parameter); -@endphp
- - {{ $slot }} - + {{ $slot }}
+ @if ($help)
- - + +
@endif + @if ($parameter) - @error($parameter) -
-
- - - - {{ $message }} -
-
- @enderror + @error($parameter)@enderror @endif
diff --git a/resources/views/form/textarea.blade.php b/resources/views/form/textarea.blade.php index a300d1d7..9e36ee07 100644 --- a/resources/views/form/textarea.blade.php +++ b/resources/views/form/textarea.blade.php @@ -1,42 +1,20 @@ -@props([ - 'label' => '', - 'placeholder' => '', - 'help' => '', - 'hr' => '', - 'outerClass' => '', - 'icon' => '', - 'rightIcon' => '' -]) - -@php - $required = $attributes['required'] ?? false; - $placeholder = $placeholder ?: $label; - $parameter = $attributes->wire('model')->value(); - $hasError = $errors->has($parameter); -@endphp
- {{-- merge(['class' => 'input w-full'.($hasError ? ' text-error' : ''), 'type' => 'text', 'placeholder' => $placeholder ]) }} />--}} {{ $slot }} - @if($rightIcon) - {{ $rightIcon }} - @endif + @isset($rightIcon){{ $rightIcon }}@endisset
+ @if ($help)
- - + +
@endif + @if ($parameter) - @error($parameter) - - @enderror + @error($parameter)@enderror @endif
- diff --git a/resources/views/form/toggle.blade.php b/resources/views/form/toggle.blade.php index 607a961c..46e9c36e 100644 --- a/resources/views/form/toggle.blade.php +++ b/resources/views/form/toggle.blade.php @@ -1,46 +1,18 @@ -@props([ - 'label' => '', - 'help' => '', - 'hr' => '', -]) - -@php - $required = $attributes['required'] ?? null; - if ($label) { - $label .= ($required ? '*' : ''); - } - $model = $attributes->wire('model'); - $parameter = $model->value(); -@endphp -
@if ($help)
- - + +
@endif @if ($parameter) - @error($parameter) -
-
- - - - {{ $message }} -
-
- @enderror + @error($parameter)@enderror @endif
diff --git a/resources/views/hero.blade.php b/resources/views/hero.blade.php new file mode 100644 index 00000000..2ebc1e13 --- /dev/null +++ b/resources/views/hero.blade.php @@ -0,0 +1,20 @@ +
+
+
+ @isset($heading) +

attributes->merge(['class' => $viewClasses['title']]) }}>{{ $heading }}

+ @elseif ($title) +

{{ $title }}

+ @endisset + + @isset($lead) +
attributes->merge(['class' => $viewClasses['spacing']]) }}>{{ $lead }}
+ @elseif ($description) +

{{ $description }}

+ @endisset + + {{ $slot }} + @isset($actions)
attributes }}>{{ $actions }}
@endisset +
+
+
diff --git a/resources/views/hover-3d.blade.php b/resources/views/hover-3d.blade.php new file mode 100644 index 00000000..e62c318e --- /dev/null +++ b/resources/views/hover-3d.blade.php @@ -0,0 +1,6 @@ +
+ {{ $slot }} + @unless ($unstyled) + @foreach ($zones as $zone)@endforeach + @endunless +
diff --git a/resources/views/hover-gallery.blade.php b/resources/views/hover-gallery.blade.php new file mode 100644 index 00000000..57ee36f7 --- /dev/null +++ b/resources/views/hover-gallery.blade.php @@ -0,0 +1,6 @@ +
+ @foreach ($images as $image) + {{ $image['alt'] }} + @endforeach + {{ $slot }} +
diff --git a/resources/views/indicator.blade.php b/resources/views/indicator.blade.php new file mode 100644 index 00000000..1cd5796b --- /dev/null +++ b/resources/views/indicator.blade.php @@ -0,0 +1,8 @@ +
+ @isset($marker) + attributes->merge(['class' => $markerClass]) }}>{{ $marker }} + @elseif ($indicator !== null) + {{ $indicator }} + @endisset + {{ $slot }} +
diff --git a/resources/views/input.blade.php b/resources/views/input.blade.php index 73720f55..6eb6d5ce 100644 --- a/resources/views/input.blade.php +++ b/resources/views/input.blade.php @@ -1,10 +1,13 @@ -@props([ - 'placeholder' => '', - 'hasError' => false, -]) +@aware(['join' => false]) -merge([ - 'class' => 'w-full'.($hasError ? ' text-error input-error' : ''), +class([ + 'join-item' => $join, +])->merge([ + 'class' => $controlClass, 'type' => 'text', 'placeholder' => $placeholder, ]) }} /> + +@if ($hint) +

{{ $hint }}

+@endif diff --git a/resources/views/list-row.blade.php b/resources/views/list-row.blade.php new file mode 100644 index 00000000..e27eccf3 --- /dev/null +++ b/resources/views/list-row.blade.php @@ -0,0 +1 @@ +
  • {{ $slot }}
  • diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php new file mode 100644 index 00000000..3b5bbb3f --- /dev/null +++ b/resources/views/list.blade.php @@ -0,0 +1,8 @@ +
      + @foreach ($rows as $row) +
    • + @foreach ($row['cells'] as $cell)
      {{ $cell }}
      @endforeach +
    • + @endforeach + {{ $slot }} +
    diff --git a/resources/views/mask.blade.php b/resources/views/mask.blade.php new file mode 100644 index 00000000..560850d1 --- /dev/null +++ b/resources/views/mask.blade.php @@ -0,0 +1 @@ +
    {{ $slot }}
    diff --git a/resources/views/megamenu.blade.php b/resources/views/megamenu.blade.php new file mode 100644 index 00000000..432760dc --- /dev/null +++ b/resources/views/megamenu.blade.php @@ -0,0 +1,4 @@ +
    + @isset($active){{ $active }}@endisset + {{ $slot }} +
    diff --git a/resources/views/menu-list.blade.php b/resources/views/menu-list.blade.php new file mode 100644 index 00000000..6c555df0 --- /dev/null +++ b/resources/views/menu-list.blade.php @@ -0,0 +1 @@ +
      {{ $slot }}
    diff --git a/resources/views/menu.blade.php b/resources/views/menu.blade.php index 80aeccad..50381e41 100644 --- a/resources/views/menu.blade.php +++ b/resources/views/menu.blade.php @@ -1,80 +1,42 @@ -@props([ - 'route' => '', - 'href' => '#', - 'icon' => '', - 'label' => '', - 'title' => '', - 'show' => true, - 'count' => 0, - 'inlineIcon' => '', - 'indicator' => '', - 'toggle' => false, -]) - -@php - if (! $show) { - return; - } - - $routePath = $route ? route($route, [], false) : $href; - $path = trim($routePath !== '/admin' ? $routePath.'*' : $routePath, '/'); - $count = (int) $count > 99 ? '99+' : $count; -@endphp - @if ($title) - + @endif -
  • - class([ - 'menu-active' => request()->is($path), - ]) }} - @if ($toggle) - @click="open = ! open" - @endif +
  • + -
    - @if ($inlineIcon || $icon) + @if ($inlineIcon || $icon) +
    @if ($inlineIcon) @else - + @endif - @endif -
    -
    {{ $label }}
    - @if ($indicator) - {{ $indicator }} +
    @endif - @if ($count) - {{ $count }} + +
    {{ $label }}
    + + @if ($indicator){{ $indicator }}@endif + + @if ($countLabel) + {{ $countLabel }} @endif + @if ($toggle) - - + + @endif
    @if ($slot->isNotEmpty()) -