themelia-react-ui 2.0.2 → 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 +67 -7
- package/README.md +70 -37
- package/THIRD_PARTY_NOTICES.md +6 -12
- 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-ax2BqjrI.js → auth-D2FVZ1MH.js} +10 -10
- package/dist/{auth-ax2BqjrI.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 +2 -2
- 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-C0EQW6dr.js → combobox-CBJDs6w_.js} +349 -347
- package/dist/combobox-CBJDs6w_.js.map +1 -0
- package/dist/{combobox-xCQ2RMNE.js → combobox-hbhSS18O.js} +158 -112
- package/dist/combobox-hbhSS18O.js.map +1 -0
- 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-BYYlTA8E.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/combobox/combobox-field.d.ts +16 -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/components/ui/combobox-dismiss.d.ts +16 -0
- package/dist/components/ui/combobox.d.ts +11 -6
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/sheet.d.ts +1 -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-ay0Pha_a.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-BGfvjP4d.js → filters-BcT-uoFy.js} +19 -19
- package/dist/{filters-BGfvjP4d.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-CGXuhcRm.js → header-BA697l4a.js} +14 -14
- package/dist/{header-CGXuhcRm.js.map → header-BA697l4a.js.map} +1 -1
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-Dkz0K2WT.js → hooks-BQ-L7Uu2.js} +2 -2
- package/dist/{hooks-Dkz0K2WT.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/use-popup-focus-recovery.d.ts +8 -0
- 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-utuUvH1K.js → mentions-RKOQaaIB.js} +8 -8
- package/dist/{mentions-utuUvH1K.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-DNWmZrJ4.js → overlays-BlKynmde.js} +322 -319
- 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-B9WWygpa.js → popover-menu-BYaCdFhf.js} +6 -6
- package/dist/{popover-menu-B9WWygpa.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
- package/dist/{popover-7_m66eYW.js → popover-uwzX2vo7.js} +65 -63
- package/dist/popover-uwzX2vo7.js.map +1 -0
- 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-CGpB3omz.js → sheet-DoAxTb2J.js} +75 -73
- package/dist/sheet-DoAxTb2J.js.map +1 -0
- package/dist/{sidebar-A0ElHINE.js → sidebar-ByqKR_W5.js} +13 -13
- package/dist/{sidebar-A0ElHINE.js.map → sidebar-ByqKR_W5.js.map} +1 -1
- package/dist/{sidebar-CPx_7YBa.js → sidebar-D2iSnGJ7.js} +11 -11
- package/dist/{sidebar-CPx_7YBa.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/use-popup-focus-recovery-C0QPvgOR.js +36 -0
- package/dist/use-popup-focus-recovery-C0QPvgOR.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 +45 -35
- package/docs/consumer-skill/references/integration.md +6 -2
- package/docs/consumer-skill/references/public-api.json +1520 -66
- 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 +7 -5
- 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 +6 -4
- 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/combobox-C0EQW6dr.js.map +0 -1
- package/dist/combobox-xCQ2RMNE.js.map +0 -1
- package/dist/comments-BYYlTA8E.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-ay0Pha_a.js.map +0 -1
- package/dist/date-pickers-Ccw8DL2b.js +0 -175
- package/dist/date-pickers-Ccw8DL2b.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-DNWmZrJ4.js.map +0 -1
- package/dist/page-Bgl1F560.js +0 -224
- package/dist/page-Bgl1F560.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/popover-7_m66eYW.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-CGpB3omz.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-DXPDjvBU.js +0 -963
- package/dist/value-inputs-DXPDjvBU.js.map +0 -1
- package/dist/workspace-Cdrg7k9f.js +0 -408
- package/dist/workspace-Cdrg7k9f.js.map +0 -1
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import { useId, useMemo, useState } from 'react';
|
|
2
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
3
|
+
import {
|
|
4
|
+
Mail,
|
|
5
|
+
MapPin,
|
|
6
|
+
Plus,
|
|
7
|
+
ShoppingBag,
|
|
8
|
+
} from 'lucide-react';
|
|
9
|
+
|
|
10
|
+
import { Badge } from 'themelia-react-ui/base/badge';
|
|
11
|
+
import { Button } from 'themelia-react-ui/base/buttons';
|
|
12
|
+
import { Card } from 'themelia-react-ui/base/cards';
|
|
13
|
+
import { Select, ToggleField } from 'themelia-react-ui/base/choice-inputs';
|
|
14
|
+
import { FormField, FormSection } from 'themelia-react-ui/base/forms';
|
|
15
|
+
import { DecimalInput } from 'themelia-react-ui/base/forms-numeric';
|
|
16
|
+
import { Grid, Stack } from 'themelia-react-ui/base/structure';
|
|
17
|
+
import { Input, Textarea } from 'themelia-react-ui/base/text-inputs';
|
|
18
|
+
import { PhoneInput, TagsInput } from 'themelia-react-ui/base/value-inputs';
|
|
19
|
+
import { MetricBar, type MetricData } from 'themelia-react-ui/blocks/analytics';
|
|
20
|
+
import { AddressCard } from 'themelia-react-ui/blocks/commerce';
|
|
21
|
+
import { MetadataList } from 'themelia-react-ui/base/metadata-list';
|
|
22
|
+
import { ActivityLog, type ActivityLogEntry } from 'themelia-react-ui/features/activities';
|
|
23
|
+
import { ActionDialog, ActionDrawer, useOverlayVisibility } from 'themelia-react-ui/features/overlays';
|
|
24
|
+
import { DataTable } from 'themelia-react-ui/features/table';
|
|
25
|
+
import { TwoColumnLayout } from 'themelia-react-ui/layout/containers';
|
|
26
|
+
import { Page } from 'themelia-react-ui/layout/page';
|
|
27
|
+
import { Date as DateValue, Money, useMoneyFormatter } from 'themelia-react-ui/primitives';
|
|
28
|
+
import { Text } from 'themelia-react-ui/typography';
|
|
29
|
+
|
|
30
|
+
interface CustomerOrderSummary {
|
|
31
|
+
id: string;
|
|
32
|
+
orderNumber: string;
|
|
33
|
+
/** ISO date; the Date primitive formats it with the app's date policy. */
|
|
34
|
+
placedAt: string;
|
|
35
|
+
paymentStatus: 'Paid' | 'Partially refunded';
|
|
36
|
+
fulfillmentStatus: 'Fulfilled' | 'In transit';
|
|
37
|
+
itemsCount: number;
|
|
38
|
+
total: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const CUSTOMER_ORDERS: CustomerOrderSummary[] = [
|
|
42
|
+
{
|
|
43
|
+
id: 'ord-1042',
|
|
44
|
+
orderNumber: '#1042',
|
|
45
|
+
placedAt: '2026-10-14',
|
|
46
|
+
paymentStatus: 'Partially refunded',
|
|
47
|
+
fulfillmentStatus: 'In transit',
|
|
48
|
+
itemsCount: 4,
|
|
49
|
+
total: 354.21,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'ord-1019',
|
|
53
|
+
orderNumber: '#1019',
|
|
54
|
+
placedAt: '2026-09-22',
|
|
55
|
+
paymentStatus: 'Paid',
|
|
56
|
+
fulfillmentStatus: 'Fulfilled',
|
|
57
|
+
itemsCount: 2,
|
|
58
|
+
total: 240.0,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'ord-0984',
|
|
62
|
+
orderNumber: '#0984',
|
|
63
|
+
placedAt: '2026-08-11',
|
|
64
|
+
paymentStatus: 'Paid',
|
|
65
|
+
fulfillmentStatus: 'Fulfilled',
|
|
66
|
+
itemsCount: 3,
|
|
67
|
+
total: 315.0,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'ord-0941',
|
|
71
|
+
orderNumber: '#0941',
|
|
72
|
+
placedAt: '2026-06-29',
|
|
73
|
+
paymentStatus: 'Paid',
|
|
74
|
+
fulfillmentStatus: 'Fulfilled',
|
|
75
|
+
itemsCount: 1,
|
|
76
|
+
total: 145.0,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
const INITIAL_ACTIVITY: ActivityLogEntry[] = [
|
|
81
|
+
{
|
|
82
|
+
id: 'act-1',
|
|
83
|
+
kind: 'event',
|
|
84
|
+
actor: { name: 'Elena Rostova', initials: 'ER' },
|
|
85
|
+
action: 'placed',
|
|
86
|
+
target: 'Order #1042 (354.21 USD)',
|
|
87
|
+
timestamp: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(),
|
|
88
|
+
icon: ShoppingBag,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'act-2',
|
|
92
|
+
kind: 'event',
|
|
93
|
+
actor: { name: 'Maya Lin', initials: 'ML' },
|
|
94
|
+
action: 'updated default shipping address for',
|
|
95
|
+
target: 'Elena Rostova',
|
|
96
|
+
timestamp: new Date(Date.now() - 22 * 24 * 60 * 60 * 1000).toISOString(),
|
|
97
|
+
icon: MapPin,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'act-3',
|
|
101
|
+
kind: 'event',
|
|
102
|
+
actor: { name: 'Online Store', initials: 'OS' },
|
|
103
|
+
action: 'sent autumn collection preview email to',
|
|
104
|
+
target: 'elena.rostova@example.com',
|
|
105
|
+
timestamp: new Date(Date.now() - 48 * 24 * 60 * 60 * 1000).toISOString(),
|
|
106
|
+
icon: Mail,
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
export function CustomersAdminTemplate() {
|
|
111
|
+
// Sample records are priced in USD; bind that once for every text amount.
|
|
112
|
+
const formatMoney = useMoneyFormatter({ currency: 'USD' });
|
|
113
|
+
const contactFormId = useId();
|
|
114
|
+
const creditFormId = useId();
|
|
115
|
+
const [customerName, setCustomerName] = useState('Elena Rostova');
|
|
116
|
+
const [customerEmail, setCustomerEmail] = useState('elena.rostova@example.com');
|
|
117
|
+
const [customerPhone, setCustomerPhone] = useState('+1 (212) 555-0192');
|
|
118
|
+
const [marketingOptIn, setMarketingOptIn] = useState(true);
|
|
119
|
+
const [taxSetting, setTaxSetting] = useState('collect');
|
|
120
|
+
const [customerTags, setCustomerTags] = useState<string[]>([
|
|
121
|
+
'repeat-customer',
|
|
122
|
+
'knitwear',
|
|
123
|
+
'soho-pos',
|
|
124
|
+
]);
|
|
125
|
+
const [customerNote, setCustomerNote] = useState(
|
|
126
|
+
'Prefers UPS ground delivery with signature waived. Measurements on file at SoHo store.',
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
const [storeCreditBalance, setStoreCreditBalance] = useState(75);
|
|
130
|
+
const [creditAddAmount, setCreditAddAmount] = useState('25');
|
|
131
|
+
const [creditReason, setCreditReason] = useState('Return shipping courtesy credit');
|
|
132
|
+
const [activityEntries, setActivityEntries] = useState<ActivityLogEntry[]>(INITIAL_ACTIVITY);
|
|
133
|
+
|
|
134
|
+
const [contactDraft, setContactDraft] = useState({
|
|
135
|
+
name: customerName, email: customerEmail, phone: customerPhone,
|
|
136
|
+
marketingOptIn, taxSetting,
|
|
137
|
+
});
|
|
138
|
+
const editDrawer = useOverlayVisibility();
|
|
139
|
+
const creditDialog = useOverlayVisibility();
|
|
140
|
+
const openContactEditor = () => {
|
|
141
|
+
setContactDraft({ name: customerName, email: customerEmail, phone: customerPhone, marketingOptIn, taxSetting });
|
|
142
|
+
editDrawer.show();
|
|
143
|
+
};
|
|
144
|
+
const saveContact = () => {
|
|
145
|
+
setCustomerName(contactDraft.name.trim());
|
|
146
|
+
setCustomerEmail(contactDraft.email.trim());
|
|
147
|
+
setCustomerPhone(contactDraft.phone);
|
|
148
|
+
setMarketingOptIn(contactDraft.marketingOptIn);
|
|
149
|
+
setTaxSetting(contactDraft.taxSetting);
|
|
150
|
+
editDrawer.hide();
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
const customerMetrics: MetricData[] = useMemo(
|
|
155
|
+
() => [
|
|
156
|
+
{
|
|
157
|
+
id: 'lifetime-spent',
|
|
158
|
+
label: 'Amount spent',
|
|
159
|
+
value: 1840,
|
|
160
|
+
valueType: 'currency',
|
|
161
|
+
currency: 'USD',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 'orders-count',
|
|
165
|
+
label: 'Orders',
|
|
166
|
+
value: 12,
|
|
167
|
+
valueType: 'number',
|
|
168
|
+
subtitle: 'Since Mar 2024',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: 'avg-order',
|
|
172
|
+
label: 'Average order value',
|
|
173
|
+
value: 153.33,
|
|
174
|
+
valueType: 'currency',
|
|
175
|
+
currency: 'USD',
|
|
176
|
+
change: { value: '+8.2% vs store avg', direction: 'up', trend: 'up' },
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'store-credit',
|
|
180
|
+
label: 'Store credit',
|
|
181
|
+
value: storeCreditBalance,
|
|
182
|
+
valueType: 'currency',
|
|
183
|
+
currency: 'USD',
|
|
184
|
+
subtitle: 'Available at checkout',
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
[storeCreditBalance],
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
const orderColumns = useMemo<ColumnDef<CustomerOrderSummary>[]>(
|
|
191
|
+
() => [
|
|
192
|
+
{
|
|
193
|
+
accessorKey: 'orderNumber',
|
|
194
|
+
header: 'Order',
|
|
195
|
+
cell: ({ row }) => (
|
|
196
|
+
<Stack gap="none">
|
|
197
|
+
<Text weight="medium">{row.original.orderNumber}</Text>
|
|
198
|
+
<Text size="xs" type="secondary">
|
|
199
|
+
{row.original.itemsCount} {row.original.itemsCount === 1 ? 'item' : 'items'}
|
|
200
|
+
</Text>
|
|
201
|
+
</Stack>
|
|
202
|
+
),
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
accessorKey: 'placedAt',
|
|
206
|
+
header: 'Date',
|
|
207
|
+
cell: ({ row }) => <DateValue value={row.original.placedAt} />,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
accessorKey: 'paymentStatus',
|
|
211
|
+
header: 'Payment',
|
|
212
|
+
cell: ({ row }) => (
|
|
213
|
+
<Badge
|
|
214
|
+
tone={row.original.paymentStatus === 'Paid' ? 'success' : 'warning'}
|
|
215
|
+
>
|
|
216
|
+
{row.original.paymentStatus}
|
|
217
|
+
</Badge>
|
|
218
|
+
),
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
accessorKey: 'fulfillmentStatus',
|
|
222
|
+
header: 'Fulfillment',
|
|
223
|
+
cell: ({ row }) => (
|
|
224
|
+
<Badge
|
|
225
|
+
tone={row.original.fulfillmentStatus === 'Fulfilled' ? 'success' : 'info'}
|
|
226
|
+
>
|
|
227
|
+
{row.original.fulfillmentStatus}
|
|
228
|
+
</Badge>
|
|
229
|
+
),
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
accessorKey: 'total',
|
|
233
|
+
header: 'Total',
|
|
234
|
+
meta: { align: 'end' },
|
|
235
|
+
cell: ({ row }) => (
|
|
236
|
+
<Money
|
|
237
|
+
amount={row.original.total}
|
|
238
|
+
currency="USD"
|
|
239
|
+
weight="semibold"
|
|
240
|
+
/>
|
|
241
|
+
),
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
[],
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
const handleIssueStoreCredit = () => {
|
|
248
|
+
const added = Math.round(Number(creditAddAmount) * 100) / 100;
|
|
249
|
+
if (!Number.isFinite(added) || added < 5 || added > 500 || !creditReason.trim()) return;
|
|
250
|
+
if (added > 0) {
|
|
251
|
+
setStoreCreditBalance((prev) => prev + added);
|
|
252
|
+
setActivityEntries((prev) => [
|
|
253
|
+
{
|
|
254
|
+
id: `act-credit-${Date.now()}`,
|
|
255
|
+
kind: 'event',
|
|
256
|
+
actor: { name: 'Maya Lin', initials: 'ML' },
|
|
257
|
+
action: 'issued store credit of',
|
|
258
|
+
target: formatMoney(added),
|
|
259
|
+
description: creditReason,
|
|
260
|
+
timestamp: new Date().toISOString(),
|
|
261
|
+
icon: Plus,
|
|
262
|
+
},
|
|
263
|
+
...prev,
|
|
264
|
+
]);
|
|
265
|
+
}
|
|
266
|
+
creditDialog.hide();
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
return (
|
|
270
|
+
<Page
|
|
271
|
+
header={{
|
|
272
|
+
title: customerName,
|
|
273
|
+
description: 'New York, NY · Customer since March 2024',
|
|
274
|
+
primaryAction: { label: 'Edit customer', onClick: openContactEditor },
|
|
275
|
+
secondaryActions: [{ label: 'Issue store credit', onClick: creditDialog.show }],
|
|
276
|
+
}}
|
|
277
|
+
>
|
|
278
|
+
<Stack gap="2xl">
|
|
279
|
+
<MetricBar metrics={customerMetrics} />
|
|
280
|
+
|
|
281
|
+
<TwoColumnLayout
|
|
282
|
+
stickyAside
|
|
283
|
+
main={
|
|
284
|
+
<Stack gap="2xl">
|
|
285
|
+
<Card
|
|
286
|
+
title="Orders placed"
|
|
287
|
+
titleSuffix={<Badge tone="neutral">{CUSTOMER_ORDERS.length}</Badge>}
|
|
288
|
+
description="Orders placed across Online Store and SoHo POS."
|
|
289
|
+
>
|
|
290
|
+
<DataTable<CustomerOrderSummary>
|
|
291
|
+
columns={orderColumns}
|
|
292
|
+
data={CUSTOMER_ORDERS}
|
|
293
|
+
surface="flat"
|
|
294
|
+
enableSorting
|
|
295
|
+
getRowId={(order) => order.id}
|
|
296
|
+
/>
|
|
297
|
+
</Card>
|
|
298
|
+
|
|
299
|
+
<Card
|
|
300
|
+
title="Timeline"
|
|
301
|
+
description="Order history, address changes, and store credit adjustments."
|
|
302
|
+
>
|
|
303
|
+
<ActivityLog bare entries={activityEntries} itemSpacing="compact" />
|
|
304
|
+
</Card>
|
|
305
|
+
</Stack>
|
|
306
|
+
}
|
|
307
|
+
aside={
|
|
308
|
+
<Stack gap="2xl">
|
|
309
|
+
{/* 1. Customer details via MetadataList */}
|
|
310
|
+
<Card
|
|
311
|
+
title="Customer"
|
|
312
|
+
headerAction={
|
|
313
|
+
<Button
|
|
314
|
+
size="sm"
|
|
315
|
+
tone="secondary"
|
|
316
|
+
buttonStyle="ghost"
|
|
317
|
+
onClick={openContactEditor}
|
|
318
|
+
>
|
|
319
|
+
Edit
|
|
320
|
+
</Button>
|
|
321
|
+
}
|
|
322
|
+
>
|
|
323
|
+
<MetadataList
|
|
324
|
+
columns={1}
|
|
325
|
+
items={[
|
|
326
|
+
{
|
|
327
|
+
id: 'email',
|
|
328
|
+
label: 'Email',
|
|
329
|
+
value: { kind: 'email', value: customerEmail },
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: 'phone',
|
|
333
|
+
label: 'Phone',
|
|
334
|
+
value: { kind: 'phone', value: customerPhone },
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
id: 'marketing',
|
|
338
|
+
label: 'Marketing',
|
|
339
|
+
value: {
|
|
340
|
+
kind: 'badge',
|
|
341
|
+
value: marketingOptIn ? 'Email subscribed' : 'Not subscribed',
|
|
342
|
+
badgeTone: marketingOptIn ? 'success' : 'neutral',
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: 'tax',
|
|
347
|
+
label: 'Tax status',
|
|
348
|
+
value:
|
|
349
|
+
taxSetting === 'collect' ? 'Collect retail tax' : 'Tax exempt',
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
id: 'customer-since',
|
|
353
|
+
label: 'Customer since',
|
|
354
|
+
value: { kind: 'date', value: '2024-03-14' },
|
|
355
|
+
},
|
|
356
|
+
]}
|
|
357
|
+
/>
|
|
358
|
+
</Card>
|
|
359
|
+
|
|
360
|
+
{/* 2. Default shipping address */}
|
|
361
|
+
<AddressCard
|
|
362
|
+
surface="card"
|
|
363
|
+
kind="shipping"
|
|
364
|
+
name={customerName}
|
|
365
|
+
line1="214 Mercer Street"
|
|
366
|
+
line2="Apt 4B"
|
|
367
|
+
city="New York, NY"
|
|
368
|
+
postalCode="10012"
|
|
369
|
+
country="United States"
|
|
370
|
+
phone="+1 (212) 555-0192"
|
|
371
|
+
default
|
|
372
|
+
/>
|
|
373
|
+
|
|
374
|
+
{/* 3. Tags Card (separated from Notes) */}
|
|
375
|
+
<Card
|
|
376
|
+
title="Tags"
|
|
377
|
+
description="Used for customer segmentation and loyalty tiers."
|
|
378
|
+
>
|
|
379
|
+
<FormField label="Customer tags">
|
|
380
|
+
<TagsInput
|
|
381
|
+
aria-label="Tags"
|
|
382
|
+
value={customerTags}
|
|
383
|
+
onValueChange={setCustomerTags}
|
|
384
|
+
placeholder="Add tag…"
|
|
385
|
+
/>
|
|
386
|
+
</FormField>
|
|
387
|
+
</Card>
|
|
388
|
+
|
|
389
|
+
{/* 4. Notes Card (separated from Tags) */}
|
|
390
|
+
<Card
|
|
391
|
+
title="Notes"
|
|
392
|
+
description="Private note visible only to store staff."
|
|
393
|
+
>
|
|
394
|
+
<FormField label="Staff note">
|
|
395
|
+
<Textarea
|
|
396
|
+
aria-label="Internal staff note"
|
|
397
|
+
rows={3}
|
|
398
|
+
value={customerNote}
|
|
399
|
+
onChange={(event) => setCustomerNote(event.target.value)}
|
|
400
|
+
/>
|
|
401
|
+
</FormField>
|
|
402
|
+
</Card>
|
|
403
|
+
</Stack>
|
|
404
|
+
}
|
|
405
|
+
/>
|
|
406
|
+
</Stack>
|
|
407
|
+
|
|
408
|
+
<ActionDrawer
|
|
409
|
+
{...editDrawer.overlayProps}
|
|
410
|
+
title="Edit customer"
|
|
411
|
+
description="Update contact details, marketing consent, and tax settings."
|
|
412
|
+
width="lg"
|
|
413
|
+
strings={{
|
|
414
|
+
confirm: 'Save changes',
|
|
415
|
+
cancel: 'Cancel',
|
|
416
|
+
}}
|
|
417
|
+
formId={contactFormId}
|
|
418
|
+
>
|
|
419
|
+
<form id={contactFormId} onSubmit={(event) => { event.preventDefault(); saveContact(); }}>
|
|
420
|
+
<Stack gap="xl">
|
|
421
|
+
<FormSection title="Contact information">
|
|
422
|
+
<Grid columns={{ base: 1, sm: 2 }} gap="lg">
|
|
423
|
+
<FormField label="Full name" required>
|
|
424
|
+
<Input
|
|
425
|
+
aria-label="Full name" required
|
|
426
|
+
value={contactDraft.name}
|
|
427
|
+
onChange={(event) => setContactDraft((draft) => ({ ...draft, name: event.target.value }))}
|
|
428
|
+
/>
|
|
429
|
+
</FormField>
|
|
430
|
+
<FormField label="Email address" required>
|
|
431
|
+
<Input
|
|
432
|
+
aria-label="Email address" required
|
|
433
|
+
type="email"
|
|
434
|
+
value={contactDraft.email}
|
|
435
|
+
onChange={(event) => setContactDraft((draft) => ({ ...draft, email: event.target.value }))}
|
|
436
|
+
/>
|
|
437
|
+
</FormField>
|
|
438
|
+
<FormField label="Phone number">
|
|
439
|
+
<PhoneInput
|
|
440
|
+
aria-label="Phone number"
|
|
441
|
+
value={contactDraft.phone}
|
|
442
|
+
onChange={(event) => setContactDraft((draft) => ({ ...draft, phone: event.target.value }))}
|
|
443
|
+
defaultPrefix="US"
|
|
444
|
+
/>
|
|
445
|
+
</FormField>
|
|
446
|
+
<FormField label="Tax setting">
|
|
447
|
+
<Select
|
|
448
|
+
aria-label="Tax setting"
|
|
449
|
+
options={[
|
|
450
|
+
{ value: 'collect', label: 'Collect tax' },
|
|
451
|
+
{ value: 'exempt', label: 'Do not collect tax (Resale exempt)' },
|
|
452
|
+
]}
|
|
453
|
+
value={contactDraft.taxSetting}
|
|
454
|
+
onValueChange={(value) => setContactDraft((draft) => ({ ...draft, taxSetting: String(value) }))}
|
|
455
|
+
/>
|
|
456
|
+
</FormField>
|
|
457
|
+
</Grid>
|
|
458
|
+
<ToggleField
|
|
459
|
+
kind="checkbox"
|
|
460
|
+
value={contactDraft.marketingOptIn}
|
|
461
|
+
onValueChange={(checked) => setContactDraft((draft) => ({ ...draft, marketingOptIn: Boolean(checked) }))}
|
|
462
|
+
label="Customer agreed to receive marketing emails"
|
|
463
|
+
/>
|
|
464
|
+
</FormSection>
|
|
465
|
+
</Stack>
|
|
466
|
+
</form>
|
|
467
|
+
</ActionDrawer>
|
|
468
|
+
|
|
469
|
+
<ActionDialog
|
|
470
|
+
{...creditDialog.overlayProps}
|
|
471
|
+
title="Issue store credit"
|
|
472
|
+
description="Add store credit to Elena Rostova's account balance."
|
|
473
|
+
strings={{
|
|
474
|
+
confirm: `Add ${formatMoney(Number(creditAddAmount || 0))} credit`,
|
|
475
|
+
cancel: 'Cancel',
|
|
476
|
+
}}
|
|
477
|
+
formId={creditFormId}
|
|
478
|
+
>
|
|
479
|
+
<form id={creditFormId} onSubmit={(event) => { event.preventDefault(); handleIssueStoreCredit(); }}>
|
|
480
|
+
<FormSection title="Store credit adjustment">
|
|
481
|
+
<FormField
|
|
482
|
+
label="Credit amount (USD)"
|
|
483
|
+
required
|
|
484
|
+
hint={`New balance: ${formatMoney(storeCreditBalance + Number(creditAddAmount || 0))}`}
|
|
485
|
+
>
|
|
486
|
+
<DecimalInput
|
|
487
|
+
aria-label="Credit amount" required
|
|
488
|
+
decimalPlaces={2}
|
|
489
|
+
value={creditAddAmount}
|
|
490
|
+
onChange={(event) => setCreditAddAmount(event.target.value)}
|
|
491
|
+
min={5}
|
|
492
|
+
max={500}
|
|
493
|
+
step={5}
|
|
494
|
+
/>
|
|
495
|
+
</FormField>
|
|
496
|
+
<FormField label="Reason" required>
|
|
497
|
+
<Input
|
|
498
|
+
aria-label="Reason" required
|
|
499
|
+
value={creditReason}
|
|
500
|
+
onChange={(event) => setCreditReason(event.target.value)}
|
|
501
|
+
/>
|
|
502
|
+
</FormField>
|
|
503
|
+
</FormSection>
|
|
504
|
+
</form>
|
|
505
|
+
</ActionDialog>
|
|
506
|
+
</Page>
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
export default CustomersAdminTemplate;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AdminStarterShell,
|
|
3
|
+
AdminTemplatesShowcase,
|
|
4
|
+
AnalyticsOperationsTemplatePreview,
|
|
5
|
+
CustomersTemplatePreview,
|
|
6
|
+
OrdersTemplatePreview,
|
|
7
|
+
ProductsTemplatePreview,
|
|
8
|
+
UserPermissionsTemplatePreview,
|
|
9
|
+
adminStarterUIDefaults,
|
|
10
|
+
type AdminStarterShellProps,
|
|
11
|
+
type AdminTemplateId,
|
|
12
|
+
type AdminTemplatesShowcaseProps,
|
|
13
|
+
} from './admin-shell-template';
|
|
14
|
+
|
|
15
|
+
export { OrdersAdminTemplate } from './orders-template';
|
|
16
|
+
|
|
17
|
+
export { ProductsAdminTemplate } from './products-template';
|
|
18
|
+
|
|
19
|
+
export { CustomersAdminTemplate } from './customers-template';
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
UserPermissionsTemplate,
|
|
23
|
+
UserPermissionsTemplate as UserPermissionsAdminTemplate,
|
|
24
|
+
} from './user-permissions-template';
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
AnalyticsOperationsTemplate,
|
|
28
|
+
AnalyticsOperationsTemplate as AnalyticsOperationsAdminTemplate,
|
|
29
|
+
} from './analytics-operations-template';
|