themelia-react-ui 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +65 -28
- package/dist/{accordion-Cjb6sx0G.js → accordion-96o0pN62.js} +5 -5
- package/dist/{accordion-Cjb6sx0G.js.map → accordion-96o0pN62.js.map} +1 -1
- package/dist/action-menu-CHgs8vmj.js +281 -0
- package/dist/action-menu-CHgs8vmj.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-B8yGOr8-.js} +7 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-BZUGwBq6.js} +277 -276
- package/dist/ai-artifact-BZUGwBq6.js.map +1 -0
- package/dist/{app-shell-C4FhvCqF.js → app-shell-D63ATkIK.js} +84 -83
- package/dist/app-shell-D63ATkIK.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-DkoqHPPl.js} +7 -7
- package/dist/{attachment-BxDfL2mw.js.map → attachment-DkoqHPPl.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-D2FVZ1MH.js} +10 -10
- package/dist/{auth-BGua8ouh.js.map → auth-D2FVZ1MH.js.map} +1 -1
- package/dist/{avatar-DAPlDvhJ.js → avatar-DWO_HHhB.js} +5 -5
- package/dist/{avatar-DAPlDvhJ.js.map → avatar-DWO_HHhB.js.map} +1 -1
- package/dist/{badge-HpFqoqSY.js → badge-DErMA7ul.js} +4 -4
- package/dist/{badge-HpFqoqSY.js.map → badge-DErMA7ul.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +13 -13
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +9 -9
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +6 -6
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +3 -3
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-CdfIkCsV.js} +4 -4
- package/dist/{batch-action-bar-DnUJ21NQ.js.map → batch-action-bar-CdfIkCsV.js.map} +1 -1
- package/dist/blocks/admin.js +20 -20
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +15 -15
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +17 -17
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +570 -567
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-B-WFKecD.js} +4 -4
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-B-WFKecD.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-DkmK-z8E.js} +2 -2
- package/dist/{button-DVzspB_G.js.map → button-DkmK-z8E.js.map} +1 -1
- package/dist/{buttons-DPZekJFu.js → buttons-BbfzgczK.js} +8 -8
- package/dist/{buttons-DPZekJFu.js.map → buttons-BbfzgczK.js.map} +1 -1
- package/dist/{cards-BaBZR-AU.js → cards-4JTWqvVe.js} +10 -10
- package/dist/cards-4JTWqvVe.js.map +1 -0
- package/dist/{chart-ZOYyK2xG.js → chart-C19flDQb.js} +4 -4
- package/dist/{chart-ZOYyK2xG.js.map → chart-C19flDQb.js.map} +1 -1
- package/dist/{checkbox-AWIhNhmo.js → checkbox-CzYUTPeJ.js} +9 -5
- package/dist/checkbox-CzYUTPeJ.js.map +1 -0
- package/dist/{choice-inputs-CNHvARCJ.js → choice-inputs-JLtij2y4.js} +182 -176
- package/dist/choice-inputs-JLtij2y4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-CGNaUtAE.js} +7 -7
- package/dist/{code-block-DeneBJR_.js.map → code-block-CGNaUtAE.js.map} +1 -1
- package/dist/{collapsible-C-_l4hpy.js → collapsible-Do4G0zcC.js} +3 -3
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-Do4G0zcC.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-C0e8SsTm.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-C0e8SsTm.js.map} +1 -1
- package/dist/{combobox-Dxo2fAYQ.js → combobox-CBJDs6w_.js} +12 -12
- package/dist/{combobox-Dxo2fAYQ.js.map → combobox-CBJDs6w_.js.map} +1 -1
- package/dist/{combobox-DaHESuiL.js → combobox-hbhSS18O.js} +7 -7
- package/dist/{combobox-DaHESuiL.js.map → combobox-hbhSS18O.js.map} +1 -1
- package/dist/{command-C25VMRII.js → command-D8NrBj-b.js} +7 -7
- package/dist/{command-C25VMRII.js.map → command-D8NrBj-b.js.map} +1 -1
- package/dist/{comments-DD0DUPwJ.js → comments-Di4w0H_S.js} +383 -382
- package/dist/comments-Di4w0H_S.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +2 -0
- package/dist/components/base/cards/card.recipes.d.ts +12 -5
- package/dist/components/base/cards/smart-card.types.d.ts +12 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +5 -2
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -2
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CRmHf7GP.js +104 -0
- package/dist/containers-CRmHf7GP.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-CnGCZdX4.js} +4 -4
- package/dist/{copyable-ClBuk_UK.js.map → copyable-CnGCZdX4.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-D4oujtx0.js} +239 -238
- package/dist/data-display-D4oujtx0.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Q7jnXxpk.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Q7jnXxpk.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-zOt1oNss.js} +102 -90
- package/dist/date-picker-zOt1oNss.js.map +1 -0
- package/dist/date-pickers-cj8IXbDC.js +179 -0
- package/dist/date-pickers-cj8IXbDC.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-BB4BL_-K.js} +8 -8
- package/dist/{display-hAc1HjpI.js.map → display-BB4BL_-K.js.map} +1 -1
- package/dist/{dropdown-menu-Cl4X7L5S.js → dropdown-menu-CjY8Vt7W.js} +8 -8
- package/dist/{dropdown-menu-Cl4X7L5S.js.map → dropdown-menu-CjY8Vt7W.js.map} +1 -1
- package/dist/features/activities.js +11 -11
- package/dist/features/ai-chat.js +9 -9
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +275 -274
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +199 -198
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +12 -12
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +7 -7
- package/dist/features/media-library.js +623 -622
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +973 -969
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +12 -12
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +113 -112
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +19 -19
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-DZNL5Lg1.js} +9 -9
- package/dist/{feedback-BYIhtitP.js.map → feedback-DZNL5Lg1.js.map} +1 -1
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DjwGx8eM.js} +2 -2
- package/dist/{field-affordance-recipes-DZhnIL_Y.js.map → field-affordance-recipes-DjwGx8eM.js.map} +1 -1
- package/dist/{filters-DJVAveHA.js → filters-BcT-uoFy.js} +19 -19
- package/dist/{filters-DJVAveHA.js.map → filters-BcT-uoFy.js.map} +1 -1
- package/dist/{form-field-CwH9y77i.js → form-field-CsgRmdit.js} +14 -8
- package/dist/form-field-CsgRmdit.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-NXgjkmBG.js} +3 -3
- package/dist/{form-sizing-BdP_Mf5p.js.map → form-sizing-NXgjkmBG.js.map} +1 -1
- package/dist/{forms-B9G_xwzi.js → forms-BV5m5aQF.js} +83 -65
- package/dist/forms-BV5m5aQF.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-Cd33AKbD.js} +288 -288
- package/dist/forms-numeric-Cd33AKbD.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-BA697l4a.js} +14 -14
- package/dist/{header-BSfIEWbI.js.map → header-BA697l4a.js.map} +1 -1
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-BQ-L7Uu2.js} +2 -2
- package/dist/{hooks-ClH9thn4.js.map → hooks-BQ-L7Uu2.js.map} +1 -1
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-COWbCCWu.js} +3 -3
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-COWbCCWu.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-Cdw4k0fb.js +289 -0
- package/dist/input-Cdw4k0fb.js.map +1 -0
- package/dist/{input-CZw8iU99.js → input-DOPL5_QE.js} +3 -3
- package/dist/{input-CZw8iU99.js.map → input-DOPL5_QE.js.map} +1 -1
- package/dist/item-BvZ2DR_x.js +277 -0
- package/dist/item-BvZ2DR_x.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +6 -0
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-CSl5W1Fy.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-CSl5W1Fy.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-RKOQaaIB.js} +8 -8
- package/dist/{mentions-CGlEJ15c.js.map → mentions-RKOQaaIB.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-INU2xsxu.js} +4 -4
- package/dist/{message-DZ_ruyUV.js.map → message-INU2xsxu.js.map} +1 -1
- package/dist/metadata-list-qVV7AVxa.js +443 -0
- package/dist/metadata-list-qVV7AVxa.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-BQNcg1jT.js} +8 -8
- package/dist/{navigation-BzhHI3lo.js.map → navigation-BQNcg1jT.js.map} +1 -1
- package/dist/{navigation-Bnotn4AQ.js → navigation-DLF3E1IC.js} +7 -7
- package/dist/{navigation-Bnotn4AQ.js.map → navigation-DLF3E1IC.js.map} +1 -1
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-WZEs-hYo.js} +2 -2
- package/dist/{navigation-row-recipes-BFLCk_Aq.js.map → navigation-row-recipes-WZEs-hYo.js.map} +1 -1
- package/dist/{number-DbV1Dija.js → number-E_OiIfJz.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-E_OiIfJz.js.map} +1 -1
- package/dist/{overflow-tab-bar-CWY7Nogn.js → overflow-tab-bar-CrbqMteP.js} +107 -105
- package/dist/overflow-tab-bar-CrbqMteP.js.map +1 -0
- package/dist/{overlays-tMkF-VAN.js → overlays-BlKynmde.js} +228 -227
- package/dist/overlays-BlKynmde.js.map +1 -0
- package/dist/page-CIwNUtGr.js +227 -0
- package/dist/page-CIwNUtGr.js.map +1 -0
- package/dist/page-header-commands-DFMlNYzN.js +128 -0
- package/dist/page-header-commands-DFMlNYzN.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-Ch8X_47u.js} +5 -5
- package/dist/{pagination-BL25hu2s.js.map → pagination-Ch8X_47u.js.map} +1 -1
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-BYaCdFhf.js} +6 -6
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
- package/dist/{popover-gnTOhbFM.js → popover-uwzX2vo7.js} +4 -4
- package/dist/{popover-gnTOhbFM.js.map → popover-uwzX2vo7.js.map} +1 -1
- package/dist/{primitives-BFK08r9M.js → primitives-Du64iDbb.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-Du64iDbb.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BvF2oCdV.js} +5 -5
- package/dist/{progress-B1VnCT0K.js.map → progress-BvF2oCdV.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-D789Jwyy.js} +6 -6
- package/dist/{receipt-BVSOH3Xo.js.map → receipt-D789Jwyy.js.map} +1 -1
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-CLJEf76s.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-CLJEf76s.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-Cm1dpUpQ.js} +10 -10
- package/dist/{rich-text-editor-cRLC-eBK.js.map → rich-text-editor-Cm1dpUpQ.js.map} +1 -1
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-L__e4x47.js} +4 -4
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js.map → rich-text-editor-toolbar-L__e4x47.js.map} +1 -1
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-La5RXsEk.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-La5RXsEk.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-DAEV0w65.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-DAEV0w65.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-GNfPG-90.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-GNfPG-90.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-BA2iboic.js +174 -0
- package/dist/settings-BA2iboic.js.map +1 -0
- package/dist/{sheet-ijlsjq-n.js → sheet-DoAxTb2J.js} +7 -7
- package/dist/{sheet-ijlsjq-n.js.map → sheet-DoAxTb2J.js.map} +1 -1
- package/dist/{sidebar-DkTO4VTO.js → sidebar-ByqKR_W5.js} +13 -13
- package/dist/{sidebar-DkTO4VTO.js.map → sidebar-ByqKR_W5.js.map} +1 -1
- package/dist/{sidebar-Db6gkh3U.js → sidebar-D2iSnGJ7.js} +11 -11
- package/dist/{sidebar-Db6gkh3U.js.map → sidebar-D2iSnGJ7.js.map} +1 -1
- package/dist/{skeleton-Byjnt7qr.js → skeleton-CUj8O5Bd.js} +3 -3
- package/dist/{skeleton-Byjnt7qr.js.map → skeleton-CUj8O5Bd.js.map} +1 -1
- package/dist/smart-card-CqkzQsK-.js +614 -0
- package/dist/smart-card-CqkzQsK-.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-C0V0_Fyf.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-C0V0_Fyf.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-CpvnzJn9.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-CpvnzJn9.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-DH7rozUv.js} +19 -19
- package/dist/{table-BweFy_P9.js.map → table-DH7rozUv.js.map} +1 -1
- package/dist/{tabs-CDocW5D1.js → tabs-eqVsJZWO.js} +7 -7
- package/dist/{tabs-CDocW5D1.js.map → tabs-eqVsJZWO.js.map} +1 -1
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-DXItiR0O.js} +101 -98
- package/dist/text-inputs-DXItiR0O.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +152 -112
- package/dist/{timelines-CwM_9IhD.js → timelines-DmtztAY_.js} +10 -10
- package/dist/{timelines-CwM_9IhD.js.map → timelines-DmtztAY_.js.map} +1 -1
- package/dist/{tooltip-yiRJUFjp.js → tooltip-B4hjKtoV.js} +3 -3
- package/dist/{tooltip-yiRJUFjp.js.map → tooltip-B4hjKtoV.js.map} +1 -1
- package/dist/{tree-WnKQzwbq.js → tree-CV11PURP.js} +8 -8
- package/dist/{tree-WnKQzwbq.js.map → tree-CV11PURP.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CSyJrh28.js +117 -0
- package/dist/typography-CSyJrh28.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-C_U0Xma4.js → ui-provider-CQCuCBcy.js} +3 -3
- package/dist/ui-provider-CQCuCBcy.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CXyxmQBP.js → upload-C9SA0X-8.js} +11 -11
- package/dist/{upload-CXyxmQBP.js.map → upload-C9SA0X-8.js.map} +1 -1
- package/dist/{upload-queue-Boscubn9.js → upload-queue-DhQJiSRc.js} +9 -9
- package/dist/{upload-queue-Boscubn9.js.map → upload-queue-DhQJiSRc.js.map} +1 -1
- package/dist/{usage-card-BhO5eqkX.js → usage-card-DVTRDmGz.js} +134 -133
- package/dist/usage-card-DVTRDmGz.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-CF3c95Io.js} +68 -5
- package/dist/utils-CF3c95Io.js.map +1 -0
- package/dist/value-inputs-C0o70p-U.js +980 -0
- package/dist/value-inputs-C0o70p-U.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-ClupF0Gz.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-ClupF0Gz.js.map} +1 -1
- package/dist/workspace-9EFVXUyk.js +410 -0
- package/dist/workspace-9EFVXUyk.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +14 -129
- package/docs/consumer-skill/examples/app-layout.tsx +22 -12
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/manifest.json +51 -1
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +92 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/references/agents-md.md +17 -7
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/component-contracts.json +319824 -0
- package/docs/consumer-skill/references/composition-mapping.md +92 -0
- package/docs/consumer-skill/references/composition.md +43 -19
- package/docs/consumer-skill/references/design-contract.md +32 -0
- package/docs/consumer-skill/references/discovery.md +84 -7
- package/docs/consumer-skill/references/installation.md +40 -36
- package/docs/consumer-skill/references/integration.md +6 -2
- package/docs/consumer-skill/references/public-api.json +1519 -65
- package/docs/consumer-skill/references/review.md +9 -4
- package/docs/consumer-skill/references/rhf-workflows.md +86 -0
- package/docs/consumer-skill/references/screen-archetypes.md +22 -0
- package/docs/consumer-skill/references/theming.md +8 -9
- package/docs/consumer-skill/references/tokens.json +12 -3
- package/docs/consumer-skill/references/workflows.md +2 -1
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +198 -0
- package/docs/consumer-skill/scripts/discovery.mjs +42 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +138 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +76 -0
- package/docs/consumer-skills/themelia-components/SKILL.md +30 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +35 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +14 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +35 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Button } from 'themelia-react-ui/base/buttons';
|
|
4
|
+
import { Card } from 'themelia-react-ui/base/cards';
|
|
5
|
+
import { Select, ToggleField } from 'themelia-react-ui/base/choice-inputs';
|
|
6
|
+
import { DirtyStateBanner, FormField } from 'themelia-react-ui/base/forms';
|
|
7
|
+
import { Grid, Stack } from 'themelia-react-ui/base/structure';
|
|
8
|
+
import { Input, Textarea } from 'themelia-react-ui/base/text-inputs';
|
|
9
|
+
import { MetadataList } from 'themelia-react-ui/base/metadata-list';
|
|
10
|
+
import { ConfirmDialog, useOverlayVisibility } from 'themelia-react-ui/features/overlays';
|
|
11
|
+
import { TwoColumnLayout } from 'themelia-react-ui/layout/containers';
|
|
12
|
+
import { Page } from 'themelia-react-ui/layout/page';
|
|
13
|
+
import { Text } from 'themelia-react-ui/typography';
|
|
14
|
+
|
|
15
|
+
interface PermissionGroup {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
permissions: {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description: string;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const INITIAL_PERMISSION_GROUPS: PermissionGroup[] = [
|
|
27
|
+
{
|
|
28
|
+
id: 'orders',
|
|
29
|
+
title: 'Orders & fulfillment',
|
|
30
|
+
permissions: [
|
|
31
|
+
{
|
|
32
|
+
id: 'orders-view',
|
|
33
|
+
label: 'View and manage orders',
|
|
34
|
+
description: 'View order details, edit shipping addresses, and add staff notes.',
|
|
35
|
+
enabled: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'orders-fulfill',
|
|
39
|
+
label: 'Fulfill and ship items',
|
|
40
|
+
description: 'Print packing slips, purchase carrier labels, and mark orders fulfilled.',
|
|
41
|
+
enabled: true,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'orders-refund',
|
|
45
|
+
label: 'Refund and cancel orders',
|
|
46
|
+
description: 'Issue full or partial refunds and return items to warehouse stock.',
|
|
47
|
+
enabled: true,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'catalog',
|
|
53
|
+
title: 'Products & inventory',
|
|
54
|
+
permissions: [
|
|
55
|
+
{
|
|
56
|
+
id: 'products-edit',
|
|
57
|
+
label: 'Create and edit products',
|
|
58
|
+
description: 'Modify product descriptions, media, variants, and collections.',
|
|
59
|
+
enabled: true,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'inventory-adjust',
|
|
63
|
+
label: 'Manage inventory quantities',
|
|
64
|
+
description: 'Adjust stock counts across Brooklyn Warehouse and SoHo POS.',
|
|
65
|
+
enabled: true,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 'pricing-edit',
|
|
69
|
+
label: 'Change retail and compare-at prices',
|
|
70
|
+
description: 'Update variant pricing, unit costs, and discount eligibility.',
|
|
71
|
+
enabled: true,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'customers',
|
|
77
|
+
title: 'Customers & store credit',
|
|
78
|
+
permissions: [
|
|
79
|
+
{
|
|
80
|
+
id: 'customers-edit',
|
|
81
|
+
label: 'View and edit customers',
|
|
82
|
+
description: 'Manage customer contact details, addresses, and tax exemption status.',
|
|
83
|
+
enabled: true,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'customers-credit',
|
|
87
|
+
label: 'Issue store credit and gift cards',
|
|
88
|
+
description: 'Create and adjust store credit balances on customer accounts.',
|
|
89
|
+
enabled: true,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'administration',
|
|
95
|
+
title: 'Store administration',
|
|
96
|
+
permissions: [
|
|
97
|
+
{
|
|
98
|
+
id: 'reports-view',
|
|
99
|
+
label: 'View financial reports and payouts',
|
|
100
|
+
description: 'Access net sales summaries, tax breakdowns, and settlement reports.',
|
|
101
|
+
enabled: true,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 'staff-manage',
|
|
105
|
+
label: 'Manage staff accounts and permissions',
|
|
106
|
+
description: 'Invite staff members, assign role presets, and suspend accounts.',
|
|
107
|
+
enabled: true,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
const ROLE_PRESET_OPTIONS = [
|
|
114
|
+
{ value: 'admin', label: 'Store Administrator (Full access)' },
|
|
115
|
+
{ value: 'fulfillment', label: 'Fulfillment & Inventory Specialist' },
|
|
116
|
+
{ value: 'support', label: 'Customer Support Associate' },
|
|
117
|
+
{ value: 'custom', label: 'Custom permissions' },
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
export function UserPermissionsTemplate() {
|
|
121
|
+
const [firstName, setFirstName] = useState('Marcus');
|
|
122
|
+
const [lastName, setLastName] = useState('Vance');
|
|
123
|
+
const [workEmail, setWorkEmail] = useState('marcus.vance@oakandloom.com');
|
|
124
|
+
const [phone, setPhone] = useState('+1 (917) 555-0164');
|
|
125
|
+
const [jobTitle, setJobTitle] = useState('Store Operations Lead');
|
|
126
|
+
const [timezone, setTimezone] = useState('America/New_York');
|
|
127
|
+
const [roleNote, setRoleNote] = useState(
|
|
128
|
+
'Primary operations lead for Brooklyn Warehouse fulfillment and high-value order approvals.',
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
const [rolePreset, setRolePreset] = useState('admin');
|
|
132
|
+
const [permissionGroups, setPermissionGroups] = useState<PermissionGroup[]>(
|
|
133
|
+
INITIAL_PERMISSION_GROUPS,
|
|
134
|
+
);
|
|
135
|
+
const [savedProfile, setSavedProfile] = useState({ firstName, lastName, workEmail, phone, jobTitle, timezone, roleNote, rolePreset, permissionGroups });
|
|
136
|
+
const [accountSuspended, setAccountSuspended] = useState(false);
|
|
137
|
+
|
|
138
|
+
const suspendAccountDialog = useOverlayVisibility();
|
|
139
|
+
|
|
140
|
+
const fullName = `${firstName} ${lastName}`.trim() || 'Staff Member';
|
|
141
|
+
|
|
142
|
+
const profile = { firstName, lastName, workEmail, phone, jobTitle, timezone, roleNote, rolePreset, permissionGroups };
|
|
143
|
+
const isDirty = JSON.stringify(profile) !== JSON.stringify(savedProfile);
|
|
144
|
+
|
|
145
|
+
// This example saves in memory. Replace this commit with your app's persistence callback.
|
|
146
|
+
const handleSaveProfile = () => setSavedProfile(profile);
|
|
147
|
+
|
|
148
|
+
const handleResetProfile = () => {
|
|
149
|
+
setFirstName(savedProfile.firstName);
|
|
150
|
+
setLastName(savedProfile.lastName);
|
|
151
|
+
setWorkEmail(savedProfile.workEmail);
|
|
152
|
+
setPhone(savedProfile.phone);
|
|
153
|
+
setJobTitle(savedProfile.jobTitle);
|
|
154
|
+
setTimezone(savedProfile.timezone);
|
|
155
|
+
setRoleNote(savedProfile.roleNote);
|
|
156
|
+
setRolePreset(savedProfile.rolePreset);
|
|
157
|
+
setPermissionGroups(savedProfile.permissionGroups);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const handlePresetChange = (preset: string) => {
|
|
161
|
+
setRolePreset(preset);
|
|
162
|
+
setPermissionGroups((current) =>
|
|
163
|
+
current.map((group) => ({
|
|
164
|
+
...group,
|
|
165
|
+
permissions: group.permissions.map((perm) => {
|
|
166
|
+
if (preset === 'admin') return { ...perm, enabled: true };
|
|
167
|
+
if (preset === 'fulfillment') {
|
|
168
|
+
return {
|
|
169
|
+
...perm,
|
|
170
|
+
enabled:
|
|
171
|
+
perm.id === 'orders-view' ||
|
|
172
|
+
perm.id === 'orders-fulfill' ||
|
|
173
|
+
perm.id === 'inventory-adjust',
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
if (preset === 'support') {
|
|
177
|
+
return {
|
|
178
|
+
...perm,
|
|
179
|
+
enabled:
|
|
180
|
+
perm.id === 'orders-view' ||
|
|
181
|
+
perm.id === 'orders-refund' ||
|
|
182
|
+
perm.id === 'customers-edit' ||
|
|
183
|
+
perm.id === 'customers-credit',
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
return perm;
|
|
187
|
+
}),
|
|
188
|
+
})),
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const handleTogglePermission = (groupId: string, permId: string, checked: boolean) => {
|
|
193
|
+
setRolePreset('custom');
|
|
194
|
+
setPermissionGroups((current) =>
|
|
195
|
+
current.map((group) =>
|
|
196
|
+
group.id === groupId
|
|
197
|
+
? {
|
|
198
|
+
...group,
|
|
199
|
+
permissions: group.permissions.map((perm) =>
|
|
200
|
+
perm.id === permId ? { ...perm, enabled: checked } : perm,
|
|
201
|
+
),
|
|
202
|
+
}
|
|
203
|
+
: group,
|
|
204
|
+
),
|
|
205
|
+
);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
return (
|
|
209
|
+
<Page
|
|
210
|
+
header={{
|
|
211
|
+
title: fullName,
|
|
212
|
+
description: `${workEmail} · Staff member since Jan 2025`,
|
|
213
|
+
titleBadges: [
|
|
214
|
+
{
|
|
215
|
+
label: accountSuspended ? 'Suspended' : 'Active',
|
|
216
|
+
tone: accountSuspended ? 'destructive' : 'success',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
label:
|
|
220
|
+
ROLE_PRESET_OPTIONS.find((opt) => opt.value === rolePreset)?.label.split(
|
|
221
|
+
' (',
|
|
222
|
+
)[0] ?? 'Custom role',
|
|
223
|
+
// A role is a kind, not a status.
|
|
224
|
+
tone: 'neutral',
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
primaryAction: { label: 'Save changes', disabled: !isDirty, onClick: handleSaveProfile },
|
|
228
|
+
// Destructive commands move into the More actions menu and confirm before they run.
|
|
229
|
+
secondaryActions: [
|
|
230
|
+
{
|
|
231
|
+
label: 'Suspend staff account',
|
|
232
|
+
destructive: true,
|
|
233
|
+
visible: !accountSuspended,
|
|
234
|
+
onClick: suspendAccountDialog.show,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
}}
|
|
238
|
+
>
|
|
239
|
+
<Stack gap="2xl">
|
|
240
|
+
{isDirty && (
|
|
241
|
+
<DirtyStateBanner
|
|
242
|
+
title="Unsaved profile or permission changes"
|
|
243
|
+
description="Save changes to update this staff member's access level."
|
|
244
|
+
actions={
|
|
245
|
+
<Button size="sm" onClick={handleResetProfile}>
|
|
246
|
+
Discard
|
|
247
|
+
</Button>
|
|
248
|
+
}
|
|
249
|
+
/>
|
|
250
|
+
)}
|
|
251
|
+
|
|
252
|
+
<TwoColumnLayout
|
|
253
|
+
stickyAside
|
|
254
|
+
main={
|
|
255
|
+
<Stack gap="2xl">
|
|
256
|
+
{/* 1. Profile Details Card */}
|
|
257
|
+
<Card
|
|
258
|
+
title="Staff profile"
|
|
259
|
+
description="Identity and contact information displayed on order audits and internal notes."
|
|
260
|
+
>
|
|
261
|
+
<Stack gap="lg">
|
|
262
|
+
<Grid columns={{ base: 1, sm: 2 }} gap="lg">
|
|
263
|
+
<FormField label="First name" required>
|
|
264
|
+
<Input
|
|
265
|
+
aria-label="First name"
|
|
266
|
+
value={firstName}
|
|
267
|
+
onChange={(event) => setFirstName(event.target.value)}
|
|
268
|
+
/>
|
|
269
|
+
</FormField>
|
|
270
|
+
<FormField label="Last name" required>
|
|
271
|
+
<Input
|
|
272
|
+
aria-label="Last name"
|
|
273
|
+
value={lastName}
|
|
274
|
+
onChange={(event) => setLastName(event.target.value)}
|
|
275
|
+
/>
|
|
276
|
+
</FormField>
|
|
277
|
+
<FormField label="Work email" required>
|
|
278
|
+
<Input
|
|
279
|
+
aria-label="Work email"
|
|
280
|
+
type="email"
|
|
281
|
+
value={workEmail}
|
|
282
|
+
onChange={(event) => setWorkEmail(event.target.value)}
|
|
283
|
+
/>
|
|
284
|
+
</FormField>
|
|
285
|
+
<FormField label="Phone number">
|
|
286
|
+
<Input
|
|
287
|
+
aria-label="Phone number"
|
|
288
|
+
value={phone}
|
|
289
|
+
onChange={(event) => setPhone(event.target.value)}
|
|
290
|
+
/>
|
|
291
|
+
</FormField>
|
|
292
|
+
<FormField label="Job title">
|
|
293
|
+
<Input
|
|
294
|
+
aria-label="Job title"
|
|
295
|
+
value={jobTitle}
|
|
296
|
+
onChange={(event) => setJobTitle(event.target.value)}
|
|
297
|
+
/>
|
|
298
|
+
</FormField>
|
|
299
|
+
<FormField label="Timezone">
|
|
300
|
+
<Select
|
|
301
|
+
aria-label="Timezone"
|
|
302
|
+
options={[
|
|
303
|
+
{
|
|
304
|
+
value: 'America/New_York',
|
|
305
|
+
label: 'Eastern Time (US & Canada)',
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
value: 'America/Los_Angeles',
|
|
309
|
+
label: 'Pacific Time (US & Canada)',
|
|
310
|
+
},
|
|
311
|
+
{ value: 'Europe/London', label: 'London (GMT)' },
|
|
312
|
+
]}
|
|
313
|
+
value={timezone}
|
|
314
|
+
onValueChange={(value) => setTimezone(String(value))}
|
|
315
|
+
/>
|
|
316
|
+
</FormField>
|
|
317
|
+
</Grid>
|
|
318
|
+
|
|
319
|
+
<FormField label="Internal role note">
|
|
320
|
+
<Textarea
|
|
321
|
+
aria-label="Internal role note"
|
|
322
|
+
rows={2}
|
|
323
|
+
value={roleNote}
|
|
324
|
+
onChange={(event) => setRoleNote(event.target.value)}
|
|
325
|
+
/>
|
|
326
|
+
</FormField>
|
|
327
|
+
</Stack>
|
|
328
|
+
</Card>
|
|
329
|
+
|
|
330
|
+
{/* 2. Permissions Card */}
|
|
331
|
+
<Card
|
|
332
|
+
title="Permissions"
|
|
333
|
+
description="Assign a role preset or customize granular capabilities for this staff member."
|
|
334
|
+
>
|
|
335
|
+
<Stack gap="2xl">
|
|
336
|
+
<FormField label="Role preset">
|
|
337
|
+
<Select
|
|
338
|
+
aria-label="Role preset"
|
|
339
|
+
options={ROLE_PRESET_OPTIONS}
|
|
340
|
+
value={rolePreset}
|
|
341
|
+
onValueChange={(value) => handlePresetChange(String(value))}
|
|
342
|
+
/>
|
|
343
|
+
</FormField>
|
|
344
|
+
|
|
345
|
+
<Stack gap="2xl">
|
|
346
|
+
{permissionGroups.map((group) => (
|
|
347
|
+
<Stack key={group.id} gap="md">
|
|
348
|
+
<Text weight="semibold">{group.title}</Text>
|
|
349
|
+
<Stack gap="sm">
|
|
350
|
+
{group.permissions.map((perm) => (
|
|
351
|
+
<ToggleField
|
|
352
|
+
key={perm.id}
|
|
353
|
+
kind="checkbox"
|
|
354
|
+
value={perm.enabled}
|
|
355
|
+
onValueChange={(checked) =>
|
|
356
|
+
handleTogglePermission(
|
|
357
|
+
group.id,
|
|
358
|
+
perm.id,
|
|
359
|
+
Boolean(checked),
|
|
360
|
+
)
|
|
361
|
+
}
|
|
362
|
+
label={perm.label}
|
|
363
|
+
description={perm.description}
|
|
364
|
+
/>
|
|
365
|
+
))}
|
|
366
|
+
</Stack>
|
|
367
|
+
</Stack>
|
|
368
|
+
))}
|
|
369
|
+
</Stack>
|
|
370
|
+
</Stack>
|
|
371
|
+
</Card>
|
|
372
|
+
</Stack>
|
|
373
|
+
}
|
|
374
|
+
aside={
|
|
375
|
+
<Stack gap="2xl">
|
|
376
|
+
<Card title="Access summary">
|
|
377
|
+
<MetadataList
|
|
378
|
+
columns={1}
|
|
379
|
+
items={[
|
|
380
|
+
{
|
|
381
|
+
id: 'email',
|
|
382
|
+
label: 'Work email',
|
|
383
|
+
value: { kind: 'email', value: workEmail },
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
id: 'phone',
|
|
387
|
+
label: 'Phone',
|
|
388
|
+
value: { kind: 'phone', value: phone },
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
id: 'locations',
|
|
392
|
+
label: 'Locations',
|
|
393
|
+
value: 'Brooklyn Warehouse & SoHo POS',
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
id: 'pos-pin',
|
|
397
|
+
label: 'POS PIN',
|
|
398
|
+
value: 'Configured',
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
id: 'last-login',
|
|
402
|
+
label: 'Last sign-in',
|
|
403
|
+
value: { kind: 'datetime', value: '2026-10-15T08:42:00-04:00' },
|
|
404
|
+
},
|
|
405
|
+
]}
|
|
406
|
+
/>
|
|
407
|
+
</Card>
|
|
408
|
+
|
|
409
|
+
<Card title="Security & authentication">
|
|
410
|
+
<MetadataList
|
|
411
|
+
columns={1}
|
|
412
|
+
items={[
|
|
413
|
+
{
|
|
414
|
+
id: '2fa',
|
|
415
|
+
label: 'Two-factor auth',
|
|
416
|
+
value: {
|
|
417
|
+
kind: 'badge',
|
|
418
|
+
value: 'Passkey active',
|
|
419
|
+
badgeTone: 'success',
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
id: 'password',
|
|
424
|
+
label: 'Password updated',
|
|
425
|
+
value: { kind: 'date', value: '2026-09-02' },
|
|
426
|
+
},
|
|
427
|
+
]}
|
|
428
|
+
/>
|
|
429
|
+
</Card>
|
|
430
|
+
|
|
431
|
+
</Stack>
|
|
432
|
+
}
|
|
433
|
+
/>
|
|
434
|
+
</Stack>
|
|
435
|
+
|
|
436
|
+
<ConfirmDialog
|
|
437
|
+
{...suspendAccountDialog.overlayProps}
|
|
438
|
+
title="Suspend staff account?"
|
|
439
|
+
description={`This immediately blocks admin sign-in for ${fullName}. Order and fulfillment audit history is kept.`}
|
|
440
|
+
tone="destructive"
|
|
441
|
+
strings={{ confirm: 'Suspend account', cancel: 'Keep access' }}
|
|
442
|
+
onConfirm={() => {
|
|
443
|
+
setAccountSuspended(true);
|
|
444
|
+
suspendAccountDialog.hide();
|
|
445
|
+
}}
|
|
446
|
+
/>
|
|
447
|
+
</Page>
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
export default UserPermissionsTemplate;
|