diff --git a/src/Toolkit/CHANGELOG.md b/src/Toolkit/CHANGELOG.md index f5529d1b814..c3b500b7898 100644 --- a/src/Toolkit/CHANGELOG.md +++ b/src/Toolkit/CHANGELOG.md @@ -4,6 +4,8 @@ - [Toolkit] Add `avatar` recipe - [Toolkit] Add `dropdown` recipe +- [Shadcn] Add `dropdown-menu` recipe +- [Shadcn] Add `sidebar` recipe ## 3.0.0 diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/assets/controllers/dropdown_menu_controller.js b/src/Toolkit/kits/shadcn/dropdown-menu/assets/controllers/dropdown_menu_controller.js new file mode 100644 index 00000000000..07fd7d1273a --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/assets/controllers/dropdown_menu_controller.js @@ -0,0 +1,63 @@ +import { Controller } from '@hotwired/stimulus'; + +export default class extends Controller { + static targets = ['trigger', 'content']; + + static values = { + open: { type: Boolean, default: false }, + }; + + connect() { + this.updateState(); + } + + toggle(event) { + event?.preventDefault(); + this.openValue = !this.openValue; + } + + close() { + this.openValue = false; + } + + openValueChanged() { + this.updateState(); + } + + handleOutsideClick(event) { + if (!this.openValue || this.element.contains(event.target)) { + return; + } + this.openValue = false; + } + + handleEscape(event) { + if (!this.openValue || event.key !== 'Escape') { + return; + } + this.openValue = false; + this.triggerTargets[0]?.focus(); + } + + updateState() { + const open = this.openValue; + const state = open ? 'open' : 'closed'; + + this.element.dataset.state = state; + + for (const trigger of this.triggerTargets) { + trigger.setAttribute('aria-expanded', String(open)); + trigger.dataset.state = state; + } + + for (const content of this.contentTargets) { + content.dataset.state = state; + content.setAttribute('aria-hidden', String(!open)); + if (open) { + content.removeAttribute('hidden'); + } else { + content.setAttribute('hidden', ''); + } + } + } +} diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Avatar.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Avatar.html.twig new file mode 100644 index 00000000000..78cff9e3d72 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Avatar.html.twig @@ -0,0 +1,29 @@ + + + + + + LR + + + + + + + Account + + + + Billing + + + + Notifications + + + + + Sign Out + + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Basic.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Basic.html.twig new file mode 100644 index 00000000000..0442e53ec4e --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Basic.html.twig @@ -0,0 +1,15 @@ + + + Open + + + My Account + Profile + Billing + Settings + + GitHub + Support + API + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Checkboxes Icons.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Checkboxes Icons.html.twig new file mode 100644 index 00000000000..aa9dd386ab9 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Checkboxes Icons.html.twig @@ -0,0 +1,23 @@ + + + Notifications + + + Notification Preferences + {% set items = [ + {name: 'email', icon: 'lucide:mail', label: 'Email notifications', checked: true}, + {name: 'sms', icon: 'lucide:message-square', label: 'SMS notifications', checked: false}, + {name: 'push', icon: 'lucide:bell', label: 'Push notifications', checked: true}, + ] %} + {% for it in items %} + + {% endfor %} + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Checkboxes.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Checkboxes.html.twig new file mode 100644 index 00000000000..b091838cf24 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Checkboxes.html.twig @@ -0,0 +1,11 @@ + + + Open + + + Appearance + Status Bar + Activity Bar + Panel + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Complex.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Complex.html.twig new file mode 100644 index 00000000000..6cb3ecbef48 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Complex.html.twig @@ -0,0 +1,191 @@ + + + Complex Menu + + + File + + + New File⌘N + + + + New Folder⇧⌘N + + + + + + Open Recent + + + + Recent Projects + + + Project Alpha + + + + Project Beta + + + + + + More Projects + + + + + + Project Gamma + + + + Project Delta + + + + + + + Browse... + + + + + + + Save⌘S + + + + Export⇧⌘E + + + View + + + + + + + Theme + + + + Appearance + {% set themes = [ + {value: 'light', icon: 'lucide:sun', label: 'Light', checked: true}, + {value: 'dark', icon: 'lucide:moon', label: 'Dark', checked: false}, + {value: 'system', icon: 'lucide:monitor', label: 'System', checked: false}, + ] %} + {% for t in themes %} + + {% endfor %} + + + + Account + + + Profile⇧⌘P + + + + Billing + + + + + + Settings + + + + Preferences + + + Keyboard Shortcuts + + + + Language + + + + + + Notifications + + + + Notification Types + + + + + + + + Privacy & Security + + + + + + + Help & Support + + + + Documentation + + + + + Sign Out⇧⌘Q + + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Demo.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Demo.html.twig new file mode 100644 index 00000000000..35e8792f0e2 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Demo.html.twig @@ -0,0 +1,34 @@ + + + Open + + + My Account + Profile⇧⌘P + Billing⌘B + Settings⌘S + + Team + + + + Invite users + + + + Email + Message + + More... + + + New Team⌘+T + + GitHub + Support + API + + Log out⇧⌘Q + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Destructive.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Destructive.html.twig new file mode 100644 index 00000000000..60aa8c27cdb --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Destructive.html.twig @@ -0,0 +1,20 @@ + + + Actions + + + + + Edit + + + + Share + + + + + Delete + + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Icons.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Icons.html.twig new file mode 100644 index 00000000000..cb32db5b565 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Icons.html.twig @@ -0,0 +1,24 @@ + + + Open + + + + + Profile + + + + Billing + + + + Settings + + + + + Log out + + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/RTL.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/RTL.html.twig new file mode 100644 index 00000000000..d6e5a4f1213 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/RTL.html.twig @@ -0,0 +1,201 @@ +
+ {# Arabic #} +
+ + + افتح القائمة + + + + + + الحساب + + + + + + الملف الشخصي + + + + الفوترة + + + + الإعدادات + + + + + الفريق + الفريق + + + + دعوة المستخدمين + + + + البريد الإلكتروني + رسالة + + + + المزيد + + + + تقويم + دردشة + + خطاف ويب + + + + متقدم... + + + فريق جديد⌘+T + + عرض + {% for it in [ + {name: 'ar-statusbar', label: 'شريط الحالة', checked: true}, + {name: 'ar-activitybar', label: 'شريط النشاط', checked: false}, + {name: 'ar-panel', label: 'اللوحة', checked: false}, + ] %} + + {% endfor %} + + الموضع + {% for it in [ + {value: 'top', label: 'أعلى', checked: false}, + {value: 'bottom', label: 'أسفل', checked: true}, + {value: 'right', label: 'يمين', checked: false}, + {value: 'left', label: 'يسار', checked: false}, + ] %} + + {% endfor %} + + + تسجيل الخروج + + + +
+ + {# Hebrew #} +
+ + + פתח תפריט + + + + + + חשבון + + + + + + פרופיל + + + + חיוב + + + + הגדרות + + + + + הצוות + הצוות + + + + הזמן משתמשים + + + + אימייל + הודעה + + + + עוד + + + + יומן + צ'אט + + Webhook + + + + מתקדם... + + + צוות חדש⌘+T + + תצוגה + {% for it in [ + {name: 'he-statusbar', label: 'שורת סטטוס', checked: true}, + {name: 'he-activitybar', label: 'שורת פעילות', checked: false}, + {name: 'he-panel', label: 'לוח', checked: false}, + ] %} + + {% endfor %} + + מיקום + {% for it in [ + {value: 'top', label: 'למעלה', checked: false}, + {value: 'bottom', label: 'למטה', checked: true}, + {value: 'right', label: 'ימין', checked: false}, + {value: 'left', label: 'שמאל', checked: false}, + ] %} + + {% endfor %} + + + התנתק + + + +
+
diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Radio Icons.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Radio Icons.html.twig new file mode 100644 index 00000000000..860b2058484 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Radio Icons.html.twig @@ -0,0 +1,23 @@ + + + Payment Method + + + Select Payment Method + {% set items = [ + {value: 'card', icon: 'lucide:credit-card', label: 'Credit Card', checked: true}, + {value: 'paypal', icon: 'lucide:wallet', label: 'PayPal', checked: false}, + {value: 'bank', icon: 'lucide:building-2', label: 'Bank Transfer', checked: false}, + ] %} + {% for it in items %} + + {% endfor %} + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Radio.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Radio.html.twig new file mode 100644 index 00000000000..14af400845f --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Radio.html.twig @@ -0,0 +1,22 @@ + + + Open + + + Panel Position + {% set items = [ + {value: 'top', label: 'Top', checked: false}, + {value: 'bottom', label: 'Bottom', checked: true}, + {value: 'right', label: 'Right', checked: false}, + ] %} + {% for it in items %} + + {% endfor %} + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Shortcuts.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Shortcuts.html.twig new file mode 100644 index 00000000000..ed4f2857c8b --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Shortcuts.html.twig @@ -0,0 +1,13 @@ + + + Open + + + My Account + Profile⇧⌘P + Billing⌘B + Settings⌘S + + Log out⇧⌘Q + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Submenu.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Submenu.html.twig new file mode 100644 index 00000000000..16ac3331ce6 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Submenu.html.twig @@ -0,0 +1,37 @@ + + + Open + + + Team + + + + Invite users + + + + Email + Message + + + + More options + + + + Calendly + Slack + + Webhook + + + + Advanced... + + + New Team⌘+T + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/examples/Usage.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Usage.html.twig new file mode 100644 index 00000000000..aaac7ad1f20 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/examples/Usage.html.twig @@ -0,0 +1,10 @@ + + + Open menu + + + Profile + Settings + Sign out + + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/manifest.json b/src/Toolkit/kits/shadcn/dropdown-menu/manifest.json new file mode 100644 index 00000000000..d2eb72cc897 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/manifest.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Dropdown Menu", + "description": "A click-triggered menu that lists a set of actions.", + "copy-files": { + "assets/": "assets/", + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu.html.twig new file mode 100644 index 00000000000..4ab4affc9ce --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu.html.twig @@ -0,0 +1,19 @@ +{# @prop open boolean Whether the menu is open on initial render. Defaults to `false` #} +{# @block content A `DropdownMenu:Trigger` and a `DropdownMenu:Content` #} +{%- props open = false -%} +{%- set _dropdown_menu_open = open -%} +
dropdown-menu#handleOutsideClick', + 'keydown.esc@window->dropdown-menu#handleEscape', + ]|join(' ')|html_attr_type('sst'), + 'data-state': open ? 'open' : 'closed', + }) }} +> + {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/CheckboxItem.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/CheckboxItem.html.twig new file mode 100644 index 00000000000..2adc16d4983 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/CheckboxItem.html.twig @@ -0,0 +1,16 @@ +{# @prop name string The checkbox form field name #} +{# @prop checked bool Whether the checkbox is initially checked #} +{# @block content The label text #} +{%- props name = null, checked = false -%} + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Content.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Content.html.twig new file mode 100644 index 00000000000..dc098959c58 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Content.html.twig @@ -0,0 +1,14 @@ +{# @block content The menu items #} + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Group.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Group.html.twig new file mode 100644 index 00000000000..8574a9dc204 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Group.html.twig @@ -0,0 +1,10 @@ +{# @block content The items grouped together #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Item.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Item.html.twig new file mode 100644 index 00000000000..0aace069dd0 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Item.html.twig @@ -0,0 +1,11 @@ +{# @block content The item label #} + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Label.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Label.html.twig new file mode 100644 index 00000000000..75d573f3703 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Label.html.twig @@ -0,0 +1,9 @@ +{# @block content The label text #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/RadioGroup.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/RadioGroup.html.twig new file mode 100644 index 00000000000..f3ddc2003f2 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/RadioGroup.html.twig @@ -0,0 +1,14 @@ +{# @prop name string The radio group form field name (shared by all items) #} +{# @block content One or more `DropdownMenu:RadioItem` components #} +{%- props name = null -%} +{%- set _dropdown_menu_radio_group_name = name -%} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/RadioItem.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/RadioItem.html.twig new file mode 100644 index 00000000000..01d5492596b --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/RadioItem.html.twig @@ -0,0 +1,18 @@ +{# @prop name string The radio form field name. Falls back to the parent `DropdownMenu:RadioGroup`'s `name` when omitted. #} +{# @prop value string The radio value #} +{# @prop checked bool Whether this radio is initially checked #} +{# @block content The label text #} +{%- props name = null, value = '', checked = false -%} +{%- set _radio_name = name ?? (_dropdown_menu_radio_group_name ?? null) -%} + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Separator.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Separator.html.twig new file mode 100644 index 00000000000..c578b03d5d5 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Separator.html.twig @@ -0,0 +1,7 @@ + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Shortcut.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Shortcut.html.twig new file mode 100644 index 00000000000..5451b17263c --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Shortcut.html.twig @@ -0,0 +1,9 @@ +{# @block content The shortcut label, e.g. "⌘T" #} + + {%- block content %}{% endblock -%} + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Sub.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Sub.html.twig new file mode 100644 index 00000000000..3fdab0120b9 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Sub.html.twig @@ -0,0 +1,9 @@ +{# @block content A `DropdownMenu:SubTrigger` and a `DropdownMenu:SubContent` #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/SubContent.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/SubContent.html.twig new file mode 100644 index 00000000000..e234db2d1f7 --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/SubContent.html.twig @@ -0,0 +1,10 @@ +{# @block content The sub-menu items revealed on hover or focus #} + diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/SubTrigger.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/SubTrigger.html.twig new file mode 100644 index 00000000000..7337404359d --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/SubTrigger.html.twig @@ -0,0 +1,7 @@ +{# @block content The sub-menu trigger label (e.g., a `button`) that opens the sub-menu on hover or focus #} +{%- set dropdown_menu_sub_trigger_attrs = { + 'data-slot': 'dropdown-menu-sub-trigger', + role: 'menuitem', + tabindex: 0, +} -%} +{%- block content %}{% endblock -%} diff --git a/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Trigger.html.twig b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Trigger.html.twig new file mode 100644 index 00000000000..988fb32e74c --- /dev/null +++ b/src/Toolkit/kits/shadcn/dropdown-menu/templates/components/DropdownMenu/Trigger.html.twig @@ -0,0 +1,10 @@ +{# @block content The clickable trigger (e.g., a `Button`) that opens the menu #} +{%- set dropdown_menu_trigger_attrs = { + 'data-slot': 'dropdown-menu-trigger', + 'data-dropdown-menu-target': 'trigger', + 'data-action': 'click->dropdown-menu#toggle'|html_attr_type('sst'), + 'aria-haspopup': 'menu', + 'aria-expanded': _dropdown_menu_open ? 'true' : 'false', + 'data-state': _dropdown_menu_open ? 'open' : 'closed', +} -%} +{%- block content %}{% endblock -%} diff --git a/src/Toolkit/kits/shadcn/sidebar/examples/Demo.html.twig b/src/Toolkit/kits/shadcn/sidebar/examples/Demo.html.twig new file mode 100644 index 00000000000..b2c43ad9d58 --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/examples/Demo.html.twig @@ -0,0 +1,23 @@ + + +
Acme Inc.
+
team@acme.dev
+
+ + + Application + Dashboard + Projects + Team + + + Settings + General + Billing + API (soon) + + + + Sign out + +
\ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/examples/Usage.html.twig b/src/Toolkit/kits/shadcn/sidebar/examples/Usage.html.twig new file mode 100644 index 00000000000..61dbe9e0301 --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/examples/Usage.html.twig @@ -0,0 +1,12 @@ + + +
Acme Inc.
+
+ + Dashboard + Settings + + + Sign out + +
\ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/manifest.json b/src/Toolkit/kits/shadcn/sidebar/manifest.json new file mode 100644 index 00000000000..4a89572d42b --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Sidebar", + "description": "A fixed-width sidebar layout with a header, body and footer.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar.html.twig b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar.html.twig new file mode 100644 index 00000000000..59edf8c080f --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar.html.twig @@ -0,0 +1,12 @@ +{# @prop side 'left'|'right' On which side the sidebar sits. Defaults to `left` #} +{# @block content The sidebar sections, typically a Header, a Content and a Footer #} +{%- props side = 'left' -%} + \ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Content.html.twig b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Content.html.twig new file mode 100644 index 00000000000..5383fac21b3 --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Content.html.twig @@ -0,0 +1,9 @@ +{# @block content The scrollable sidebar body #} +
+ {%- block content %}{% endblock -%} +
\ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Footer.html.twig b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Footer.html.twig new file mode 100644 index 00000000000..792f1ef939e --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Footer.html.twig @@ -0,0 +1,9 @@ +{# @block content The sidebar footer content #} +
+ {%- block content %}{% endblock -%} +
\ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Group.html.twig b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Group.html.twig new file mode 100644 index 00000000000..64efee9b36d --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Group.html.twig @@ -0,0 +1,9 @@ +{# @block content The group content #} +
+ {%- block content %}{% endblock -%} +
\ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/GroupLabel.html.twig b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/GroupLabel.html.twig new file mode 100644 index 00000000000..f40188d75dc --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/GroupLabel.html.twig @@ -0,0 +1,9 @@ +{# @block content The group label text #} +
+ {%- block content %}{% endblock -%} +
\ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Header.html.twig b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Header.html.twig new file mode 100644 index 00000000000..0f7792cda27 --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/Header.html.twig @@ -0,0 +1,9 @@ +{# @block content The sidebar header content #} +
+ {%- block content %}{% endblock -%} +
\ No newline at end of file diff --git a/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/MenuButton.html.twig b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/MenuButton.html.twig new file mode 100644 index 00000000000..56663cbb00c --- /dev/null +++ b/src/Toolkit/kits/shadcn/sidebar/templates/components/Sidebar/MenuButton.html.twig @@ -0,0 +1,13 @@ +{# @prop active boolean Whether this menu button represents the active route. Defaults to `false` #} +{# @block content The menu button label and/or icon #} +{%- props active = false -%} + \ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Avatar.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Avatar.html.twig__1.html new file mode 100644 index 00000000000..c70ef4c518f --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Avatar.html.twig__1.html @@ -0,0 +1,59 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Basic.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Basic.html.twig__1.html new file mode 100644 index 00000000000..b06575c2976 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Basic.html.twig__1.html @@ -0,0 +1,36 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Checkboxes Icons.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Checkboxes Icons.html.twig__1.html new file mode 100644 index 00000000000..2e8188d8950 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Checkboxes Icons.html.twig__1.html @@ -0,0 +1,60 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Checkboxes.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Checkboxes.html.twig__1.html new file mode 100644 index 00000000000..00d0328b5cb --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Checkboxes.html.twig__1.html @@ -0,0 +1,39 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Complex.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Complex.html.twig__1.html new file mode 100644 index 00000000000..fbd0b7fc720 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Complex.html.twig__1.html @@ -0,0 +1,371 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Demo.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Demo.html.twig__1.html new file mode 100644 index 00000000000..0129e805a24 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Demo.html.twig__1.html @@ -0,0 +1,79 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Destructive.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Destructive.html.twig__1.html new file mode 100644 index 00000000000..0fc8b0e7442 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Destructive.html.twig__1.html @@ -0,0 +1,43 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Icons.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Icons.html.twig__1.html new file mode 100644 index 00000000000..672e339fc57 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Icons.html.twig__1.html @@ -0,0 +1,50 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file RTL.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file RTL.html.twig__1.html new file mode 100644 index 00000000000..04ac401e771 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file RTL.html.twig__1.html @@ -0,0 +1,435 @@ + +
+
+
+ + +
+
+ +
+
+ + +
+
+
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Radio Icons.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Radio Icons.html.twig__1.html new file mode 100644 index 00000000000..3da49a1f205 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Radio Icons.html.twig__1.html @@ -0,0 +1,60 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Radio.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Radio.html.twig__1.html new file mode 100644 index 00000000000..5bbc2670ffd --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Radio.html.twig__1.html @@ -0,0 +1,56 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Shortcuts.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Shortcuts.html.twig__1.html new file mode 100644 index 00000000000..6244a7ad1c4 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Shortcuts.html.twig__1.html @@ -0,0 +1,36 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Submenu.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Submenu.html.twig__1.html new file mode 100644 index 00000000000..fd7a7e7725e --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component dropdown-menu, code file Submenu.html.twig__1.html @@ -0,0 +1,76 @@ + +
+ + +
\ No newline at end of file diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component sidebar, code file Demo.html.twig__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component sidebar, code file Demo.html.twig__1.html new file mode 100644 index 00000000000..ba3b4eb5d68 --- /dev/null +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component sidebar, code file Demo.html.twig__1.html @@ -0,0 +1,38 @@ + + \ No newline at end of file