themelia-react-ui 1.0.1 → 2.0.0
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 +417 -0
- package/README.md +67 -16
- package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
- package/dist/accordion-CQXVcd7Q.js.map +1 -0
- package/dist/action-menu-BTpyPWJ2.js +264 -0
- package/dist/action-menu-BTpyPWJ2.js.map +1 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
- package/dist/app-shell-BE_j8-AT.js.map +1 -0
- package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
- package/dist/attachment-q69dlt5Y.js.map +1 -0
- package/dist/auth-M3vGMgDR.js +723 -0
- package/dist/auth-M3vGMgDR.js.map +1 -0
- package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
- package/dist/badge-0tATj-tW.js.map +1 -0
- 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/buttons.js +3 -2
- package/dist/base/cards.js +3 -3
- package/dist/base/carousel.js +33 -35
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +246 -222
- package/dist/base/cascader.js.map +1 -1
- 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 +3 -3
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +94 -92
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.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 +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +53 -53
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +84 -82
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- 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 +7 -7
- package/dist/base/toaster.js.map +1 -1
- 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/blocks/admin.js +228 -219
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +182 -212
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +665 -620
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +2 -2
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1439 -1553
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +88 -97
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
- package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
- package/dist/button-BS3KDg00.js +674 -0
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
- package/dist/button-R9CCoH7A.js.map +1 -0
- package/dist/buttons-DS0ZIwJ_.js +99 -0
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
- package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/chart-DwYRKKc-.js +152 -0
- package/dist/chart-DwYRKKc-.js.map +1 -0
- package/dist/checkbox-B7ygNTYp.js +35 -0
- package/dist/checkbox-B7ygNTYp.js.map +1 -0
- package/dist/choice-inputs-DrJ17tpL.js +752 -0
- package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
- package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
- package/dist/code-block-CD0B7M93.js.map +1 -0
- package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/combobox-6dvVny2q.js +272 -0
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/combobox-CB7039j7.js +865 -0
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
- package/dist/comments-You0Bzbr.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +7 -2
- package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/buttons/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.recipes.d.ts +10 -19
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
- package/dist/components/base/cards/card.recipes.d.ts +13 -5
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
- package/dist/components/base/cards/smart-card.types.d.ts +1 -1
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
- package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
- package/dist/components/base/display/alert-dialog.d.ts +8 -2
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +12 -5
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-field.d.ts +1 -0
- package/dist/components/base/forms/form-sizing.d.ts +35 -3
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
- package/dist/components/base/navigation/tabs.d.ts +3 -5
- package/dist/components/base/popover/popover.recipes.d.ts +3 -3
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +14 -5
- package/dist/components/base/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- package/dist/components/base/table/index.d.ts +1 -1
- package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
- package/dist/components/base/upload/upload.recipes.d.ts +11 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/types.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/combobox/components/error-message.d.ts +1 -1
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
- package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
- package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.types.d.ts +9 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +46 -22
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +2 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.d.ts +0 -1
- package/dist/components/layout/page/page.types.d.ts +62 -6
- package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
- package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
- package/dist/components/primitives/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +13 -2
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +23 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +37 -5
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/overlay.recipes.d.ts +15 -2
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/table.d.ts +2 -1
- package/dist/container.recipes-D9t8MHR3.js +27 -0
- package/dist/container.recipes-D9t8MHR3.js.map +1 -0
- package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
- package/dist/containers-D_L4mTVb.js.map +1 -0
- package/dist/control-group-recipes-DBXmfh2E.js +21 -0
- package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
- package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
- package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/data-display-3xWQUnMA.js +1335 -0
- package/dist/data-display-3xWQUnMA.js.map +1 -0
- package/dist/date-picker-DrDFj8Lo.js +1527 -0
- package/dist/date-picker-DrDFj8Lo.js.map +1 -0
- package/dist/date-pickers-CnFCb0n2.js +174 -0
- package/dist/date-pickers-CnFCb0n2.js.map +1 -0
- package/dist/date-uf3z37Nm.js +144 -0
- package/dist/date-uf3z37Nm.js.map +1 -0
- package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +177 -163
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +187 -183
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +25 -23
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +353 -355
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +346 -354
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +225 -227
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +29 -29
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +59 -58
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +898 -900
- 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 +1412 -1444
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +51 -49
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +103 -97
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +13 -13
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +187 -183
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +508 -503
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
- package/dist/feedback-C7nR0UtT.js.map +1 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
- package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
- package/dist/form-field-VZRULhUK.js.map +1 -0
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
- package/dist/forms-DDeEnXSY.js.map +1 -0
- package/dist/forms-numeric-D3CO60IF.js +905 -0
- package/dist/forms-numeric-D3CO60IF.js.map +1 -0
- package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
- package/dist/http-CdEIHyQf.js.map +1 -0
- package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
- package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-BoLm9Hks.js +20 -0
- package/dist/input-BoLm9Hks.js.map +1 -0
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/input-DhQdBnV3.js.map +1 -0
- package/dist/item-xzh8Df65.js +264 -0
- package/dist/item-xzh8Df65.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 +46 -10
- package/dist/lib/control-group-recipes.d.ts +22 -0
- package/dist/lib/field-affordance-recipes.d.ts +70 -2
- package/dist/lib/field-state-recipes.d.ts +6 -4
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/navigation-row-recipes.d.ts +3 -2
- package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
- package/dist/lib/surface-recipes.d.ts +13 -8
- package/dist/lib/token-merge.generated.d.ts +144 -2
- package/dist/lib/track-recipes.d.ts +1 -1
- package/dist/lib/ui-provider/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +9 -4
- package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/lib/utils.js +1 -1
- package/dist/media-gallery-DQUQ0m3O.js +201 -0
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
- package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/message-YfFmbXNP.js +127 -0
- package/dist/message-YfFmbXNP.js.map +1 -0
- package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/navigation-Cs1npsPm.js +300 -0
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
- package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
- package/dist/number-CKRBYmZK.js +352 -0
- package/dist/number-CKRBYmZK.js.map +1 -0
- package/dist/overlay.recipes-CNO2S9V6.js +34 -0
- package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
- package/dist/overlays-DhZO7N-I.js +994 -0
- package/dist/overlays-DhZO7N-I.js.map +1 -0
- package/dist/page-C6R_8jFt.js +325 -0
- package/dist/page-C6R_8jFt.js.map +1 -0
- package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
- package/dist/pagination-Cm0jqa3I.js.map +1 -0
- package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
- package/dist/popover-Dcv_9jxr.js.map +1 -0
- package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
- package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
- package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/rich-text-editor-CF8QYt5p.js +574 -0
- package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
- package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
- package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
- package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
- package/dist/separator-Do5GWDYi.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +4 -0
- package/dist/services/actions.js +8 -3
- package/dist/services/actions.js.map +1 -1
- package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
- package/dist/settings-DHk0L2MF.js.map +1 -0
- package/dist/sheet-DRFNY1_D.js +207 -0
- package/dist/sheet-DRFNY1_D.js.map +1 -0
- package/dist/sidebar-Cb8WzOvE.js +511 -0
- package/dist/sidebar-Cb8WzOvE.js.map +1 -0
- package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
- package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/smart-card-Bek-TwUp.js +599 -0
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-DOdoBXGm.js +28 -0
- package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
- package/dist/table-D6zKeYQX.js +162 -0
- package/dist/table-D6zKeYQX.js.map +1 -0
- package/dist/table-Dn4XSrSB.js +1444 -0
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/tabs-Dk8E_knt.js +189 -0
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/text-inputs-BFpku0Qd.js +331 -0
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +90 -124
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
- package/dist/timelines-CxuAFIc2.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CAr3dQhX.js +116 -0
- package/dist/typography-CAr3dQhX.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
- package/dist/usage-card-U0YBLTNT.js.map +1 -0
- package/dist/utils-Cospvlj1.js +4445 -0
- package/dist/utils-Cospvlj1.js.map +1 -0
- package/dist/value-inputs-CjfzGMsN.js +854 -0
- package/dist/value-inputs-CjfzGMsN.js.map +1 -0
- package/dist/value-typography-Deb3yQZg.js +116 -0
- package/dist/value-typography-Deb3yQZg.js.map +1 -0
- package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +123 -119
- package/docs/consumer-skill/examples/analytics.tsx +34 -0
- package/docs/consumer-skill/examples/app-layout.tsx +42 -14
- package/docs/consumer-skill/examples/detail.tsx +20 -5
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +37 -3
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/examples/website.tsx +56 -0
- package/docs/consumer-skill/references/analytics.md +70 -0
- package/docs/consumer-skill/references/composition.md +195 -9
- package/docs/consumer-skill/references/design-contract.md +33 -7
- package/docs/consumer-skill/references/discovery.md +80 -5
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +46 -1
- package/docs/consumer-skill/references/public-api.json +2083 -237
- package/docs/consumer-skill/references/review.md +74 -6
- package/docs/consumer-skill/references/theming.md +59 -8
- package/docs/consumer-skill/references/tokens.json +180 -9
- package/docs/consumer-skill/references/workflows.md +34 -0
- package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
- package/docs/consumer-skill/scripts/discovery.mjs +69 -9
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
- package/package.json +11 -6
- package/dist/accordion-B-5Focs8.js.map +0 -1
- package/dist/action-menu-Cx3SdfbN.js +0 -265
- package/dist/action-menu-Cx3SdfbN.js.map +0 -1
- package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
- package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
- package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
- package/dist/app-shell-at8Kt4l_.js.map +0 -1
- package/dist/attachment-BO2R47wn.js.map +0 -1
- package/dist/auth-OFwWSAap.js +0 -704
- package/dist/auth-OFwWSAap.js.map +0 -1
- package/dist/avatar-Bpzty83c.js.map +0 -1
- package/dist/badge-BZXZT9wd.js.map +0 -1
- package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
- package/dist/button-BS6l5JUw.js.map +0 -1
- package/dist/buttons-Co6GavvM.js +0 -674
- package/dist/buttons-Co6GavvM.js.map +0 -1
- package/dist/chart-DVfcwQu6.js +0 -149
- package/dist/chart-DVfcwQu6.js.map +0 -1
- package/dist/checkbox-BavDRjF7.js +0 -34
- package/dist/checkbox-BavDRjF7.js.map +0 -1
- package/dist/choice-inputs-CC7XqPQO.js +0 -619
- package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
- package/dist/code-block-xHKbAJDj.js.map +0 -1
- package/dist/combobox-DEbdr-3u.js +0 -273
- package/dist/combobox-DEbdr-3u.js.map +0 -1
- package/dist/combobox-xv3yJbzl.js +0 -850
- package/dist/combobox-xv3yJbzl.js.map +0 -1
- package/dist/command-C0xe7u9B.js.map +0 -1
- package/dist/comments-DviPLnwy.js.map +0 -1
- package/dist/containers-6s-ucRQQ.js.map +0 -1
- package/dist/data-display-cWIRdeaf.js +0 -1129
- package/dist/data-display-cWIRdeaf.js.map +0 -1
- package/dist/date-BFNMnrS5.js +0 -140
- package/dist/date-BFNMnrS5.js.map +0 -1
- package/dist/date-picker-CA6ogMQB.js +0 -1521
- package/dist/date-picker-CA6ogMQB.js.map +0 -1
- package/dist/date-pickers-BPIKLdsD.js +0 -224
- package/dist/date-pickers-BPIKLdsD.js.map +0 -1
- package/dist/display-CFM5myut.js.map +0 -1
- package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
- package/dist/feedback-DWUkgEjR.js.map +0 -1
- package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
- package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
- package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
- package/dist/filters-BhsUtsxW.js.map +0 -1
- package/dist/form-field-Bn7ZH1rA.js.map +0 -1
- package/dist/form-sizing-BWs70_a2.js +0 -100
- package/dist/form-sizing-BWs70_a2.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B7pzS25o.js.map +0 -1
- package/dist/forms-numeric-BUBxELBv.js +0 -867
- package/dist/forms-numeric-BUBxELBv.js.map +0 -1
- package/dist/header-C59QZyxV.js.map +0 -1
- package/dist/http-CLTVJc5I.js.map +0 -1
- package/dist/input-WwYQZJzG.js +0 -202
- package/dist/input-WwYQZJzG.js.map +0 -1
- package/dist/input-ci9fIgFH.js +0 -20
- package/dist/input-ci9fIgFH.js.map +0 -1
- package/dist/item-pJ0GsOiJ.js +0 -257
- package/dist/item-pJ0GsOiJ.js.map +0 -1
- package/dist/media-gallery-DhDRgnVZ.js +0 -200
- package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
- package/dist/message-COsdEvXT.js +0 -108
- package/dist/message-COsdEvXT.js.map +0 -1
- package/dist/navigation-BUIn2Qxx.js.map +0 -1
- package/dist/navigation-DBEu4POU.js +0 -267
- package/dist/navigation-DBEu4POU.js.map +0 -1
- package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
- package/dist/number-BNT_BIzJ.js +0 -269
- package/dist/number-BNT_BIzJ.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-B11wZka6.js +0 -982
- package/dist/overlays-B11wZka6.js.map +0 -1
- package/dist/page-BV6ioQg3.js +0 -202
- package/dist/page-BV6ioQg3.js.map +0 -1
- package/dist/page-header-DQRa0jug.js.map +0 -1
- package/dist/pagination-C29vvt3I.js.map +0 -1
- package/dist/popover-CoLDEg19.js.map +0 -1
- package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
- package/dist/primitives-DKPOGVpj.js +0 -330
- package/dist/primitives-DKPOGVpj.js.map +0 -1
- package/dist/progress-BOe8l_FZ.js.map +0 -1
- package/dist/rich-text-editor-CoVrTiSv.js +0 -575
- package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
- package/dist/scroll-area-BheMQ270.js.map +0 -1
- package/dist/select-B2mb-qN2.js +0 -108
- package/dist/select-B2mb-qN2.js.map +0 -1
- package/dist/separator-Gk_WXH-l.js.map +0 -1
- package/dist/settings-BnCyyPOJ.js.map +0 -1
- package/dist/sheet-B-q914Ad.js +0 -205
- package/dist/sheet-B-q914Ad.js.map +0 -1
- package/dist/sidebar-C_2p3Tfj.js +0 -501
- package/dist/sidebar-C_2p3Tfj.js.map +0 -1
- package/dist/sidebar-DPR7fmqN.js.map +0 -1
- package/dist/smart-card-CYLn46e6.js +0 -578
- package/dist/smart-card-CYLn46e6.js.map +0 -1
- package/dist/spinner-BY9HbUEh.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-CQfRr-VL.js +0 -27
- package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
- package/dist/table-BS39xnlq.js +0 -1424
- package/dist/table-BS39xnlq.js.map +0 -1
- package/dist/table-DnlAJ-xR.js +0 -146
- package/dist/table-DnlAJ-xR.js.map +0 -1
- package/dist/tabs-B5cNMWiP.js +0 -187
- package/dist/tabs-B5cNMWiP.js.map +0 -1
- package/dist/text-inputs-Dh9XGyiS.js +0 -331
- package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
- package/dist/text.styles-BwB7vAF2.js.map +0 -1
- package/dist/timelines-B9ICkQcV.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-Cv8MT-82.js +0 -96
- package/dist/typography-Cv8MT-82.js.map +0 -1
- package/dist/ui-provider-CftIB6TY.js.map +0 -1
- package/dist/upload-D8Za5x_c.js.map +0 -1
- package/dist/upload-queue-hIIYBLS7.js.map +0 -1
- package/dist/usage-card-DnmnJ58D.js.map +0 -1
- package/dist/utils-C2EKeIw3.js +0 -72
- package/dist/utils-C2EKeIw3.js.map +0 -1
- package/dist/value-inputs-DX2dbxjj.js +0 -824
- package/dist/value-inputs-DX2dbxjj.js.map +0 -1
- package/dist/workspace-C1PZmk8L.js.map +0 -1
|
@@ -1,135 +1,139 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: themelia-react-ui-consumer
|
|
3
|
-
description: Use when building, integrating, theming or migrating
|
|
3
|
+
description: Use when building, integrating, theming or migrating React apps and public websites with themelia-react-ui, including admin pages, forms, layouts and workflows; not for library internals.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Themelia React UI consumer
|
|
7
7
|
|
|
8
|
-
Build
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Build from the public owner that fits the task: resolve the installed contract,
|
|
9
|
+
pick the exact family import in the table or finder, read its declaration and
|
|
10
|
+
recipe, then adapt the app's data and callbacks. Never infer props from names.
|
|
11
|
+
|
|
12
|
+
## House rules
|
|
13
|
+
|
|
14
|
+
Each rule has an owning prop or component, and the [optional checker](references/review.md) warns on most; depart only for a nameable product reason.
|
|
15
|
+
|
|
16
|
+
1. Mount `UIProvider` (`themelia-react-ui/ui-provider`) once at the app root; calls inherit its currency, locale, date, density, button, badge and card defaults.
|
|
17
|
+
2. Give every admin route a `Page` (`themelia-react-ui/layout/page`); its title is the route's `h1`, so do not repeat it in the body.
|
|
18
|
+
3. Give commands roles: one `header.primaryAction`, ordered `header.secondaryActions`, `destructive: true` plus `ConfirmDialog`. An untoned `Button` is the neutral outline; give only the main command `tone="primary"` (solid), one per page or surface.
|
|
19
|
+
4. Space siblings with `Stack`/`Grid` and their semantic `gap` (`themelia-react-ui/base/structure`), not flex divs with gap or margin utilities.
|
|
20
|
+
5. Write copy with `Heading`/`Text`, not raw `h1`–`h6`; show values with `Money`, `Date`, `Number` and `Percent`, and use `useMoneyFormatter()` inside strings.
|
|
21
|
+
6. Color with semantic classes (`bg-muted`, `text-muted-foreground`, `border-border`, status tones); palette classes such as `bg-blue-500` bypass theming and dark mode.
|
|
22
|
+
7. Badges stay neutral unless the status means `success`, `warning`, `destructive` or `info`. Titles, facts and rows get no decorative icons, and gaps, not dividers, separate a card's sections.
|
|
23
|
+
8. In a Card, badges go in `titleSuffix`, one quick control in `headerAction`, a command list in `actions` and the commit action in `footerSlot`.
|
|
24
|
+
9. Dialogs, confirmations, drawers and sheets come only from `themelia-react-ui/features/overlays` (`ActionDialog`, `ConfirmDialog`, `ActionDrawer` with `useOverlayVisibility`); never hand-roll a modal, import `Dialog`/`Sheet` primitives or add a modal library.
|
|
25
|
+
|
|
26
|
+
## Start with an owner
|
|
27
|
+
|
|
28
|
+
| Task | Exact import and starting symbols |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| KPI cards, revenue, trends, comparisons | `themelia-react-ui/blocks/analytics`: `Metric`, `MetricGrid`, `MetricBar`, `MetricComparison`, `MetricGradient`, `MetricMicroGrid`, `ChartCard`, `ActivityHeatmap` |
|
|
31
|
+
| Used/limit quotas and period/retry states | `themelia-react-ui/blocks/analytics/usage-card`: `UsageCard` |
|
|
32
|
+
| Record facts, one plain value, empty regions | `themelia-react-ui/blocks/data-display`: `MetadataList`, `InlineStat`, `EmptyState` |
|
|
33
|
+
| Query-driven directory or tabular comparison | `themelia-react-ui/features/data-view`: `DataView`; `themelia-react-ui/features/table`: `DataTable`, `ResourceCell` |
|
|
34
|
+
| Query criteria and facets | `themelia-react-ui/features/filters`: `FilterLayout`, `SelectFacet`, `SearchFacet`, `DateFacet` |
|
|
35
|
+
| Modal action, confirmation, drawer | `themelia-react-ui/features/overlays`: `ActionDialog`, `ConfirmDialog`, `ActionDrawer`, `useOverlayVisibility` |
|
|
36
|
+
| Fields, schema-driven forms, inline drafts | `themelia-react-ui/base/forms`: `FormField`, `FormSection`, `FormActionsBar`; `themelia-react-ui/features/schema-form`: `SchemaForm`; `themelia-react-ui/base/inline-edit`: `InlineEdit` |
|
|
37
|
+
| Passive rows, stacks, tracks and spans | `themelia-react-ui/base/structure`: `Stack`, `Grid`, `GridCell`, `AdaptiveGrid`; a row is `Stack direction="horizontal"` |
|
|
38
|
+
| Content measure, sections, main/aside split | `themelia-react-ui/layout/containers`: `Container`, `Section`, `TwoColumnLayout`, `PageViewport` |
|
|
39
|
+
| Application shell, sidebar, route identity | `themelia-react-ui/layout/app-shell`: `AppLayout`; `themelia-react-ui/layout/sidebar`: `AppSidebar`; `themelia-react-ui/layout/page`: `Page` |
|
|
40
|
+
| Public website and content sections | `themelia-react-ui/layout/containers`: `Container`, `Section`, `PageViewport` |
|
|
41
|
+
| Task summaries and conversation messages | `themelia-react-ui/blocks/planning`: `TaskCard`; `themelia-react-ui/blocks/collaboration`: `Message`, `MessageBubble` |
|
|
42
|
+
| Timelines, activity, commerce workflows | `themelia-react-ui/blocks/timelines`: `Timeline`, `StepsCard`; `themelia-react-ui/features/activities`: `ActivityLog`; discover the commerce subject below |
|
|
43
|
+
| Money, dates, counts and contact values | `themelia-react-ui/primitives`: `Money`, `Date`, `DateTime`, `Number`, `Percent`, `Email`, `Phone` |
|
|
44
|
+
| Display roles and sanitized rich HTML | `themelia-react-ui/typography`: `Heading`, `Text`, `DisplayLabel`, `Label`, `TextLink`; `themelia-react-ui/typography/rich-text`: `RichText` |
|
|
45
|
+
|
|
46
|
+
For example, a KPI owns formatting, hierarchy and trend presentation:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import { Metric, MetricGrid, type MetricData } from 'themelia-react-ui/blocks/analytics';
|
|
50
|
+
import { InlineStat, MetadataList } from 'themelia-react-ui/blocks/data-display';
|
|
51
|
+
|
|
52
|
+
const revenue: MetricData = {
|
|
53
|
+
id: 'revenue', label: 'Revenue', value: 42500,
|
|
54
|
+
valueType: 'currency', currency: 'USD',
|
|
55
|
+
change: { value: '+12%', direction: 'up' }, trend: 'positive',
|
|
56
|
+
};
|
|
57
|
+
export const Revenue = () => <Metric variant="card" data={revenue} />;
|
|
58
|
+
export const Dashboard = () => <MetricGrid metrics={[revenue]} columns={3} />;
|
|
59
|
+
export const InvoiceCount = () => <InlineStat label="Invoices" value={18} />;
|
|
60
|
+
export const AccountFacts = () => <MetadataList items={[
|
|
61
|
+
{ id: 'email', label: 'Email', value: 'morgan@example.com' },
|
|
62
|
+
]} />;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`Metric variant="card"`, default `MetricGrid`, `UsageCard` and `TaskCard` already
|
|
66
|
+
own their surfaces. MetadataList, InlineStat and ChartCard delegate framing;
|
|
67
|
+
Receipt owns its flat paper and insets. Choose a custom subject when its content
|
|
68
|
+
or lifecycle calls for it; reuse the appropriate lower owners within it. The analytics
|
|
69
|
+
barrel needs optional `recharts`; UsageCard's focused import does not. See [analytics](references/analytics.md).
|
|
11
70
|
|
|
12
71
|
## Resolve the installed contract
|
|
13
72
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
73
|
+
Follow [installed setup](references/installation.md) to resolve the app's package
|
|
74
|
+
and check copied guidance after upgrades. Import `themelia-react-ui/style.css`
|
|
75
|
+
once; shipped components need no source scanning. Apps authoring semantic
|
|
76
|
+
utilities process `theme.css` in their Tailwind v4 build.
|
|
18
77
|
|
|
19
|
-
|
|
20
|
-
for exact imports, symbols, responsibilities, alternatives and optional peers.
|
|
21
|
-
Search the task or exact symbol; shorten an empty query instead of guessing APIs.
|
|
22
|
-
For conventional node_modules layouts, run from the app:
|
|
78
|
+
For another task or an unfamiliar prop, run the bundled [finder](references/discovery.md):
|
|
23
79
|
|
|
24
80
|
```sh
|
|
25
81
|
node node_modules/themelia-react-ui/docs/consumer-skill/scripts/find-components.mjs record directory --limit 5
|
|
26
82
|
```
|
|
27
83
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Keep copy textGap normal/dense, row density, control size and surface inset
|
|
71
|
-
independent. Use gap-normal/gap-dense through the headed owner or Stack/Grid;
|
|
72
|
-
avoid adding description margins. rounded-radius is the default, rounded-inner
|
|
73
|
-
is for intentional nested regions. Do not replace control geometry/typography
|
|
74
|
-
or anchored-region padding through classes, contentClassName or inline styles.
|
|
75
|
-
PopoverMenu owns routine searchable selection; custom popups use public regions.
|
|
76
|
-
|
|
77
|
-
## Integrate themes, layouts and workflows
|
|
78
|
-
|
|
79
|
-
Import themelia-react-ui/style.css once; shipped components need no source scanning.
|
|
80
|
-
Apps authoring semantic utilities process theme.css in their Tailwind v4 build.
|
|
81
|
-
Keep broad resets in the lower-priority base layer. Retheme existing semantic
|
|
82
|
-
surface/foreground pairs and structural roots; derived utilities are not new knobs.
|
|
83
|
-
CSS owns appearance, UIProvider stable defaults, callbacks per-mount app state.
|
|
84
|
-
Use ThemeScope for scoped portals, and native dir plus DirectionProvider for RTL.
|
|
85
|
-
|
|
86
|
-
Reuse public shells/sidebars/headers. Constrain app-shell height and preserve one
|
|
87
|
-
scroll owner, useful gutters, DOM/focus order and action wrapping. Check usable
|
|
88
|
-
parent width as well as viewport width; embedded layouts may need container
|
|
89
|
-
adaptation. Placement, alignment and overflow remain valid app-owned mechanics.
|
|
90
|
-
|
|
91
|
-
Keep controlled values authoritative and accept callback proposals in the parent.
|
|
92
|
-
Keep state mode fixed while mounted; choose explicit reset/remount behavior when
|
|
93
|
-
the subject changes. Stabilize lifecycle-sensitive loader/schema/column inputs
|
|
94
|
-
when their meaning is unchanged. The app owns routing, permissions, translation,
|
|
95
|
-
transport, cancellation and persistence; use href/callback/render integration.
|
|
96
|
-
|
|
97
|
-
Show relevant loading, empty, missing, error/retry, disabled, validation and success
|
|
98
|
-
states. Preserve rejected drafts and ignore superseded results. A toast alone is
|
|
99
|
-
not persistence; UI cancellation does not prove a server operation stopped.
|
|
100
|
-
Use library overlays for modal workflows and their pending/dismissal contracts.
|
|
101
|
-
Keep labels, field associations, icon-action names and translated strings meaningful.
|
|
102
|
-
In server-component apps, mount interactive families from a client wrapper;
|
|
103
|
-
use a family's published pure helpers where provided, without assuming SSR support.
|
|
104
|
-
|
|
105
|
-
## Read the relevant detail and recipe
|
|
106
|
-
|
|
107
|
-
| Task | Reference and example |
|
|
84
|
+
Task nouns return richer alternatives; exact symbols such as `DataTable` and
|
|
85
|
+
exact imports select one contract. Follow `relevantSymbols` and `nextReads`,
|
|
86
|
+
check reported optional peers, and replace any name listed under `deprecated`.
|
|
87
|
+
The [public index](references/public-api.json) lists all families; catalogue
|
|
88
|
+
routes and source paths are not imports. RichText takes sanitized HTML, not Markdown.
|
|
89
|
+
|
|
90
|
+
## Compose and adapt the screen
|
|
91
|
+
|
|
92
|
+
Use Page for routes and Container/Section for content-led sites. Header `actions`
|
|
93
|
+
holds non-command controls such as a period select, never command button rows.
|
|
94
|
+
Card frames one independent subject; `headerStart` holds pre-title context and
|
|
95
|
+
`surface="flat" padding="none"` composes within an existing boundary.
|
|
96
|
+
For headed commerce/variants blocks, choose their `surface` prop instead of
|
|
97
|
+
adding a second Card boundary; see [headed blocks](references/composition.md#headed-blocks-inside-surfaces).
|
|
98
|
+
Use the table/query/selection/row-action seams when they fit the workflow.
|
|
99
|
+
Keep fixed parent context while criteria change; make command scope clear.
|
|
100
|
+
|
|
101
|
+
Give each inset and gap one owner: page/container gutters, surface padding,
|
|
102
|
+
section rhythm and Stack/Grid sibling gaps. Peer Card stacks in TwoColumnLayout
|
|
103
|
+
use `gap="2xl"` to match its default grid rhythm in both axes. Choose Heading
|
|
104
|
+
`tag` for semantics and `size` for emphasis; keep typography margin-free and
|
|
105
|
+
primary rows at the shared size. Choose `textGap`, density, control `size` and
|
|
106
|
+
surface padding independently. Shells own global corners; controls/rows own
|
|
107
|
+
bounded inner corners. Change `--radius` at the theme boundary, never per
|
|
108
|
+
component. Public props and regions own internal anatomy; application
|
|
109
|
+
placement, alignment and overflow remain flexible.
|
|
110
|
+
|
|
111
|
+
Treat appearance feedback as an acceptance criterion: inspect the reported state
|
|
112
|
+
and improve its owning composition or recipe, since a passing static check cannot
|
|
113
|
+
show that hierarchy, contrast, corners or spacing look right. Theme through
|
|
114
|
+
semantic pairs and structural roots; use ThemeScope for scoped portals and
|
|
115
|
+
native `dir` plus DirectionProvider for RTL. See [theming](references/theming.md).
|
|
116
|
+
|
|
117
|
+
Keep controlled values authoritative and per-mount callbacks in the component.
|
|
118
|
+
The app owns routes, permissions, translation, transport and persistence. Preserve
|
|
119
|
+
pending drafts and ignore superseded results; show loading, empty, error/retry,
|
|
120
|
+
disabled and validation states. Use overlay focus/dismissal/pending contracts.
|
|
121
|
+
For server-component apps, mount interactive families from a client wrapper.
|
|
122
|
+
|
|
123
|
+
## Read the matching recipe and verify
|
|
124
|
+
|
|
125
|
+
| Work | Focused guidance and complete example |
|
|
108
126
|
| --- | --- |
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
relevant recipe, adapt product labels/callbacks, and read its actual declarations.
|
|
123
|
-
|
|
124
|
-
## Verify the integrated result
|
|
125
|
-
|
|
126
|
-
Run the app's types/lint/tests/build. The optional check-composition.mjs script
|
|
127
|
-
uses app TypeScript and checks direct imports/static anatomy; errors, warnings
|
|
128
|
-
and unresolved expressions are distinct. It is not a full visual/accessibility audit.
|
|
129
|
-
Separately inspect long copy, missing values, narrow/desktop and light/dark/RTL
|
|
130
|
-
states. Open menus/overlays, execute callbacks and failure/retry, check keyboard
|
|
131
|
-
selection/dismissal/focus return and reduced motion, and report unverified limits.
|
|
132
|
-
|
|
133
|
-
This skill ships with the package and requires separate manual installation.
|
|
134
|
-
No theme-publish/skill-install CLI exists. It grants no authorization to publish,
|
|
135
|
-
deploy, message users or change other repositories.
|
|
127
|
+
| Rows, grids, regions and peer gaps | [Layout-owner map](references/composition.md#structure-and-spacing), [layout blocks](examples/layout-blocks.tsx) |
|
|
128
|
+
| Card, public websites, heading scale | [Composition](references/composition.md), [website](examples/website.tsx) |
|
|
129
|
+
| Shell/sidebar/header and parent adaptation | [Layout composition](references/composition.md#application-layouts), [workspace](examples/app-layout.tsx) |
|
|
130
|
+
| Directory, detail, editing and confirmation | [Workflows](references/workflows.md), [directory](examples/scoped-directory.tsx), [detail](examples/detail.tsx), [edit](examples/edit.tsx), [confirmation](examples/destructive-confirm.tsx) |
|
|
131
|
+
| KPI, facts, quota/task summaries | [Analytics](references/analytics.md), [analytics recipe](examples/analytics.tsx), [task/usage/inline edit](examples/planning-usage-edit.tsx) |
|
|
132
|
+
| Email, receipts, files, messages and integrations | [Domain composition](references/composition.md#receipts), [recipe exports/peers](examples/manifest.json), [integration](references/integration.md) |
|
|
133
|
+
| Shared anatomy and source review | [Design contract](references/design-contract.md), [optional read-only checker](references/review.md) |
|
|
134
|
+
|
|
135
|
+
Run the app's type/lint/behavior checks. Inspect long content and missing values
|
|
136
|
+
at narrow/desktop parent widths in light/dark themes. Open menus/overlays and run
|
|
137
|
+
keyboard selection, dismissal/focus return, callbacks, validation and retry. Keep
|
|
138
|
+
source findings, inspected images and executed interactions separate; the checker
|
|
139
|
+
reports errors, warnings and unresolved expressions. Recopy the skill on upgrade.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ErrorState, LoadingState } from 'themelia-react-ui/base/feedback';
|
|
2
|
+
import { Metric, MetricGrid, type MetricData } from 'themelia-react-ui/blocks/analytics';
|
|
3
|
+
import { EmptyState, InlineStat } from 'themelia-react-ui/blocks/data-display';
|
|
4
|
+
|
|
5
|
+
export type RevenueOverviewState =
|
|
6
|
+
| { status: 'loading'; metrics: MetricData[] }
|
|
7
|
+
| { status: 'ready'; metrics: MetricData[] }
|
|
8
|
+
| { status: 'error'; message: string };
|
|
9
|
+
|
|
10
|
+
/** The app owns accepted values, loading labels, requests and retry effects. */
|
|
11
|
+
export function RevenueOverview({ state, onRetry }: {
|
|
12
|
+
state: RevenueOverviewState;
|
|
13
|
+
onRetry: () => void;
|
|
14
|
+
}) {
|
|
15
|
+
if (state.status === 'error') {
|
|
16
|
+
return <ErrorState title="Revenue unavailable" description={state.message}
|
|
17
|
+
onRetry={onRetry} retryLabel="Retry revenue" />;
|
|
18
|
+
}
|
|
19
|
+
if (!state.metrics.length) {
|
|
20
|
+
return state.status === 'loading'
|
|
21
|
+
? <LoadingState label="Loading revenue" />
|
|
22
|
+
: <EmptyState title="No revenue metrics" description="Choose a period with reported revenue." />;
|
|
23
|
+
}
|
|
24
|
+
return <MetricGrid metrics={state.metrics} columns={4} loading={state.status === 'loading'} />;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function RevenueMetric({ data, loading = false }: { data: MetricData; loading?: boolean }) {
|
|
28
|
+
return <Metric data={data} variant="card" loading={loading} />;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** A factual count has no comparison/trend semantics and owns no extra Card. */
|
|
32
|
+
export function PlainStatistic({ invoices }: { invoices: number | null }) {
|
|
33
|
+
return <InlineStat label="Invoices" value={invoices} />;
|
|
34
|
+
}
|
|
@@ -1,31 +1,59 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { Button } from 'themelia-react-ui/base/buttons';
|
|
3
2
|
import { Card } from 'themelia-react-ui/base/cards';
|
|
4
3
|
import { SidebarTrigger } from 'themelia-react-ui/base/sidebar';
|
|
5
|
-
import { Stack } from 'themelia-react-ui/base/structure';
|
|
6
4
|
import { AppLayout, type AppLayoutVariant } from 'themelia-react-ui/layout/app-shell';
|
|
5
|
+
import { HeaderUserMenu, type HeaderUserMenuProps } from 'themelia-react-ui/layout/header';
|
|
7
6
|
import { Page } from 'themelia-react-ui/layout/page';
|
|
8
|
-
import { LayoutSidebarProvider } from 'themelia-react-ui/layout/sidebar';
|
|
7
|
+
import { AppSidebar, LayoutSidebarProvider, SidebarNavigationUser, type AppSidebarProps } from 'themelia-react-ui/layout/sidebar';
|
|
8
|
+
import type { UIConfig } from 'themelia-react-ui/ui-provider';
|
|
9
9
|
import { Text } from 'themelia-react-ui/typography';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
export
|
|
11
|
+
/** Use at the application's single UIProvider mount; CSS owns palette/geometry. */
|
|
12
|
+
export const workspaceUIDefaults: UIConfig = {
|
|
13
|
+
density: { defaultScale: 'md' },
|
|
14
|
+
card: { defaultSurface: 'card', defaultHeaderDivider: true, defaultFooterDivider: true },
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export interface WorkspaceLayoutProps {
|
|
13
18
|
variant?: AppLayoutVariant;
|
|
14
|
-
|
|
19
|
+
/** Optional replacement for the assembled AppSidebar. */
|
|
20
|
+
sidebar?: ReactNode;
|
|
21
|
+
navigationGroups?: AppSidebarProps['navigationGroups'];
|
|
22
|
+
currentUrl?: string;
|
|
23
|
+
renderLink?: AppSidebarProps['renderLink'];
|
|
24
|
+
workspaceLinks?: AppSidebarProps['workspaceLinks'];
|
|
25
|
+
/** Custom pinned control; replaces the built-in workspace-link trigger. */
|
|
26
|
+
workspaceSwitcher?: ReactNode;
|
|
27
|
+
user?: HeaderUserMenuProps['user'];
|
|
28
|
+
onLogout?: () => void;
|
|
15
29
|
onCreate: () => void;
|
|
16
|
-
|
|
17
|
-
|
|
30
|
+
narrow?: boolean;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The app accepts route/identity data and wires navigation/persistence callbacks. */
|
|
35
|
+
export function WorkspaceLayout({ variant = 'inset', sidebar, navigationGroups = {},
|
|
36
|
+
currentUrl, renderLink, workspaceLinks, workspaceSwitcher, user, onLogout,
|
|
37
|
+
onCreate, narrow, children }: WorkspaceLayoutProps) {
|
|
38
|
+
const sidebarAccount = !sidebar && (variant === 'sidebar' || variant === 'inset');
|
|
39
|
+
const brand = <Text weight="semibold">Admin</Text>;
|
|
40
|
+
const account = user && !sidebarAccount ? <HeaderUserMenu user={user} onLogout={onLogout} /> : null;
|
|
41
|
+
const navigation = sidebar ?? <AppSidebar className="h-full" logo={brand} collapsedLogo={<Text>A</Text>}
|
|
42
|
+
currentUrl={currentUrl} renderLink={renderLink} navigationGroups={navigationGroups}
|
|
43
|
+
workspaceLinks={workspaceSwitcher ? undefined : workspaceLinks}
|
|
44
|
+
slots={{ headerEnd: workspaceSwitcher, footer: user && sidebarAccount ? <SidebarNavigationUser user={user} onLogout={onLogout} /> : undefined }} />;
|
|
45
|
+
const content = <Page narrow={narrow} gutter={variant === 'stacked' ? 'none' : undefined}
|
|
18
46
|
header={{ title: 'Workspace', description: 'Review activity and manage your records.',
|
|
19
|
-
|
|
20
|
-
<Card title="Activity"><Text>Application content goes here.</Text></Card>
|
|
47
|
+
primaryAction: { label: 'Create record', onClick: onCreate } }}>
|
|
48
|
+
{children ?? <Card title="Activity" footerText="Latest workspace activity"><Text>Application content goes here.</Text></Card>}
|
|
21
49
|
</Page>;
|
|
22
|
-
const brand = <Text weight="semibold">Admin</Text>;
|
|
23
50
|
const trigger = <SidebarTrigger />;
|
|
24
51
|
return <LayoutSidebarProvider adaptTo="container" className="min-h-0">
|
|
25
52
|
{variant === 'stacked' ? <AppLayout variant="stacked" className="h-svh min-h-0" logo={brand}
|
|
26
|
-
|
|
53
|
+
slots={{headerEnd: account}}>{content}</AppLayout>
|
|
27
54
|
: variant === 'sidebar' || variant === 'inset' ? <AppLayout variant={variant} className="h-svh min-h-0"
|
|
28
|
-
sidebar={
|
|
29
|
-
: <AppLayout variant={variant} className="h-svh min-h-0" logo={brand} sidebar={
|
|
55
|
+
sidebar={navigation} sidebarTrigger={trigger} slots={{ toolbarStart: brand, toolbarEnd: account }}>{content}</AppLayout>
|
|
56
|
+
: <AppLayout variant={variant} className="h-svh min-h-0" logo={brand} sidebar={navigation}
|
|
57
|
+
sidebarTrigger={trigger} slots={{headerEnd: account}}>{content}</AppLayout>}
|
|
30
58
|
</LayoutSidebarProvider>;
|
|
31
59
|
}
|
|
@@ -2,6 +2,7 @@ import { Button } from 'themelia-react-ui/base/buttons';
|
|
|
2
2
|
import { Card } from 'themelia-react-ui/base/cards';
|
|
3
3
|
import { MetadataList } from 'themelia-react-ui/blocks/data-display';
|
|
4
4
|
import { Date, Email, Money, Value } from 'themelia-react-ui/primitives';
|
|
5
|
+
import { Page } from 'themelia-react-ui/layout/page';
|
|
5
6
|
|
|
6
7
|
export interface AccountDetailRecord {
|
|
7
8
|
id: string; name: string; email: string | null;
|
|
@@ -14,14 +15,28 @@ export interface AccountDetailProps {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export function AccountDetail({ account, onEdit, onBack }: AccountDetailProps) {
|
|
17
|
-
return <Card title={account.name}
|
|
18
|
-
headerAction={<Button onClick={() => onEdit(account.id)}>Edit account</Button>}
|
|
18
|
+
return <Card title={account.name} headerPlacement="frame"
|
|
19
|
+
headerAction={<Button tone="primary" onClick={() => onEdit(account.id)}>Edit account</Button>}
|
|
19
20
|
footerSlot={<Button tone="secondary" buttonStyle="outline" onClick={onBack}>Back to accounts</Button>}>
|
|
20
|
-
<
|
|
21
|
+
<AccountFacts account={account}/>
|
|
22
|
+
</Card>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** A focused resource route: Page owns measure, gutters, identity and commands. */
|
|
26
|
+
export function AccountDetailPage({account,onEdit,onBack}:AccountDetailProps) {
|
|
27
|
+
return <Page narrow header={{title:account.name,description:'Account details',onBack,
|
|
28
|
+
backLabel:'Back to accounts',primaryAction:{label:'Edit account',onClick:()=>onEdit(account.id)}}}>
|
|
29
|
+
<Card title="Contact and billing" headerPlacement="frame">
|
|
30
|
+
<AccountFacts account={account}/>
|
|
31
|
+
</Card>
|
|
32
|
+
</Page>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function AccountFacts({account}:{account:AccountDetailRecord}) {
|
|
36
|
+
return <MetadataList columns={{ base: 1, md: 2 }} items={[
|
|
21
37
|
{ id: 'id', label: 'Account ID', value: <Value>{account.id}</Value> },
|
|
22
38
|
{ id: 'email', label: 'Email', value: <Email value={account.email} /> },
|
|
23
39
|
{ id: 'created', label: 'Created', value: <Date value={account.createdAt} /> },
|
|
24
40
|
{ id: 'balance', label: 'Balance', value: <Money amount={account.balanceMinor} currency={account.currency} unit="minor" /> },
|
|
25
|
-
]}
|
|
26
|
-
</Card>;
|
|
41
|
+
]} />;
|
|
27
42
|
}
|
|
@@ -52,7 +52,7 @@ export function AccountEdit({ initial, onSave, onCancel }: AccountEditProps) {
|
|
|
52
52
|
{error && <Text role="alert" type="error">{error}</Text>}
|
|
53
53
|
{saved && <Text role="status">Account saved.</Text>}
|
|
54
54
|
<Stack direction={{ base: 'vertical', sm: 'horizontal' }} gap="sm">
|
|
55
|
-
<Button type="submit" loading={pending} strings={{ loading: 'Saving account…' }}>Save account</Button>
|
|
55
|
+
<Button tone="primary" type="submit" loading={pending} strings={{ loading: 'Saving account…' }}>Save account</Button>
|
|
56
56
|
<Button type="button" tone="secondary" buttonStyle="outline" disabled={pending} onClick={onCancel}>Cancel edit</Button>
|
|
57
57
|
</Stack>
|
|
58
58
|
</Stack>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { Stack } from 'themelia-react-ui/base/structure';
|
|
3
|
+
import { TwoColumnLayout } from 'themelia-react-ui/layout/containers';
|
|
4
|
+
|
|
5
|
+
export interface LayoutBlocksProps {
|
|
6
|
+
summary?: ReactNode;
|
|
7
|
+
primary: ReactNode;
|
|
8
|
+
secondary: ReactNode;
|
|
9
|
+
support: ReactNode;
|
|
10
|
+
actions?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Place inside Page. Pass independently framed subjects; this composition adds no Card or gutter. */
|
|
14
|
+
export function LayoutBlocks({ summary, primary, secondary, support, actions }: LayoutBlocksProps) {
|
|
15
|
+
return <TwoColumnLayout adaptTo="container" header={summary}
|
|
16
|
+
main={<Stack gap="2xl">{primary}{secondary}</Stack>}
|
|
17
|
+
aside={<Stack gap="2xl">{support}</Stack>}
|
|
18
|
+
footer={actions ? <Stack direction="horizontal" justify="end" gap="md">{actions}</Stack> : undefined}
|
|
19
|
+
/>;
|
|
20
|
+
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"file": "website.tsx",
|
|
6
|
+
"exports": [
|
|
7
|
+
"WebsiteLandingPage"
|
|
8
|
+
],
|
|
9
|
+
"phase": "basic",
|
|
10
|
+
"optionalPeers": []
|
|
11
|
+
},
|
|
4
12
|
{
|
|
5
13
|
"file": "composition.tsx",
|
|
6
14
|
"exports": [
|
|
@@ -21,14 +29,20 @@
|
|
|
21
29
|
},
|
|
22
30
|
{
|
|
23
31
|
"file": "scoped-directory.tsx",
|
|
24
|
-
"exports": [
|
|
32
|
+
"exports": [
|
|
33
|
+
"ScopedDirectory"
|
|
34
|
+
],
|
|
25
35
|
"phase": "optional",
|
|
26
|
-
"optionalPeers": [
|
|
36
|
+
"optionalPeers": [
|
|
37
|
+
"@tanstack/react-table",
|
|
38
|
+
"react-day-picker"
|
|
39
|
+
]
|
|
27
40
|
},
|
|
28
41
|
{
|
|
29
42
|
"file": "detail.tsx",
|
|
30
43
|
"exports": [
|
|
31
|
-
"AccountDetail"
|
|
44
|
+
"AccountDetail",
|
|
45
|
+
"AccountDetailPage"
|
|
32
46
|
],
|
|
33
47
|
"phase": "basic",
|
|
34
48
|
"optionalPeers": []
|
|
@@ -103,6 +117,26 @@
|
|
|
103
117
|
],
|
|
104
118
|
"phase": "basic",
|
|
105
119
|
"optionalPeers": []
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"file": "analytics.tsx",
|
|
123
|
+
"exports": [
|
|
124
|
+
"RevenueOverview",
|
|
125
|
+
"RevenueMetric",
|
|
126
|
+
"PlainStatistic"
|
|
127
|
+
],
|
|
128
|
+
"phase": "optional",
|
|
129
|
+
"optionalPeers": [
|
|
130
|
+
"recharts"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"file": "layout-blocks.tsx",
|
|
135
|
+
"exports": [
|
|
136
|
+
"LayoutBlocks"
|
|
137
|
+
],
|
|
138
|
+
"phase": "basic",
|
|
139
|
+
"optionalPeers": []
|
|
106
140
|
}
|
|
107
141
|
]
|
|
108
142
|
}
|
|
@@ -50,11 +50,11 @@ export function ScopedDirectory(props: ScopedDirectoryProps) {
|
|
|
50
50
|
const rowActions = useMemo<DataTableProps<DirectoryContact, unknown>['rowActions']>(() => [
|
|
51
51
|
{ id: 'open', label: 'Open contact', onClick: contact => props.onOpen(contact.id) },
|
|
52
52
|
], [props.onOpen]);
|
|
53
|
-
return <Page header={{ title: 'Contacts',
|
|
53
|
+
return <Page header={{ title: 'Contacts',
|
|
54
54
|
description: 'People responsible for bookings, billing and operations.',
|
|
55
55
|
onBack: props.onBack, backLabel: 'All businesses',
|
|
56
56
|
slots: { beforeTitle: <Text type="secondary">Business: {props.scope.label}</Text> },
|
|
57
|
-
|
|
57
|
+
primaryAction: props.onCreate ? { label: 'New contact', onClick: props.onCreate } : undefined,
|
|
58
58
|
}}>
|
|
59
59
|
<FilterProvider filters={criteria} activeFilters={props.filters}
|
|
60
60
|
navigating={props.state.status === 'loading'}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useId } from 'react';
|
|
2
|
+
import { Button } from 'themelia-react-ui/base/buttons';
|
|
3
|
+
import { Card } from 'themelia-react-ui/base/cards';
|
|
4
|
+
import { Grid, Stack } from 'themelia-react-ui/base/structure';
|
|
5
|
+
import { Container, Section } from 'themelia-react-ui/layout/containers';
|
|
6
|
+
import { Money, type MoneyValue } from 'themelia-react-ui/primitives';
|
|
7
|
+
import { Heading, Text } from 'themelia-react-ui/typography';
|
|
8
|
+
|
|
9
|
+
export interface ServiceOffer {
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
price: MoneyValue;
|
|
14
|
+
priceNote: string;
|
|
15
|
+
href: string;
|
|
16
|
+
actionLabel: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Copy, prices, billing terms, destinations and site navigation belong to the app. */
|
|
20
|
+
export function WebsiteLandingPage({ title, description, actionLabel, actionHref, servicesTitle, offers, locale }: {
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
actionLabel: string;
|
|
24
|
+
actionHref: string;
|
|
25
|
+
servicesTitle: string;
|
|
26
|
+
offers: readonly ServiceOffer[];
|
|
27
|
+
locale?: string;
|
|
28
|
+
}) {
|
|
29
|
+
const introId = useId();
|
|
30
|
+
const servicesId = useId();
|
|
31
|
+
return <Container render={<main />} maxWidth="xl" className="py-surface-lg">
|
|
32
|
+
<Stack gap="2xl">
|
|
33
|
+
<Section aria-labelledby={introId}>
|
|
34
|
+
<Stack gap="normal">
|
|
35
|
+
<Heading tag="h1" size="4xl" id={introId}>{title}</Heading>
|
|
36
|
+
<Text type="secondary">{description}</Text>
|
|
37
|
+
</Stack>
|
|
38
|
+
<Stack direction="horizontal" gap="md">
|
|
39
|
+
<Button href={actionHref} tone="primary">{actionLabel}</Button>
|
|
40
|
+
</Stack>
|
|
41
|
+
</Section>
|
|
42
|
+
<Section aria-labelledby={servicesId}>
|
|
43
|
+
<Heading tag="h2" size="2xl" id={servicesId}>{servicesTitle}</Heading>
|
|
44
|
+
<Grid columns={{ base: 1, md: 2, lg: 3 }} gap="xl">
|
|
45
|
+
{offers.map(offer => <Card key={offer.id} title={offer.title} description={offer.description}
|
|
46
|
+
footerSlot={<Button href={offer.href} tone="secondary" buttonStyle="outline">{offer.actionLabel}</Button>}>
|
|
47
|
+
<Stack gap="dense">
|
|
48
|
+
<Money {...offer.price} locale={locale} align="left" weight="semibold" />
|
|
49
|
+
<Text type="secondary" size="xs">{offer.priceNote}</Text>
|
|
50
|
+
</Stack>
|
|
51
|
+
</Card>)}
|
|
52
|
+
</Grid>
|
|
53
|
+
</Section>
|
|
54
|
+
</Stack>
|
|
55
|
+
</Container>;
|
|
56
|
+
}
|