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,5 +1,6 @@
|
|
|
1
1
|
// One public anatomy vocabulary, shared by repository and opt-in consumer checks.
|
|
2
2
|
export const surfaceParts = {
|
|
3
|
+
cards: /^Card(?:Header|Content|Footer)?$/,
|
|
3
4
|
popover: /^(PopoverContent|PopoverHeader|PopoverFooter)$/,
|
|
4
5
|
command: /^Command(Input|List|Group|Item|Empty|Separator)?$/,
|
|
5
6
|
navigation: /^DropdownMenu(Content|SubContent|Label|Item|LinkItem|SubTrigger|CheckboxItem|RadioItem|Separator)$/,
|
|
@@ -10,6 +11,41 @@ export const surfaceForwarders = { 'choice-inputs': 'Select', 'popover-menu': 'P
|
|
|
10
11
|
export const paddingClass = /^(?:p[xytrblse]?|p(?:bs|be)|padding)-|^\[padding/;
|
|
11
12
|
export const paddingProperty = /^padding(?:Inline|Block)?(?:Start|End)?$|^padding(?:Top|Right|Bottom|Left)$|^padding-(?:(?:inline|block)(?:-(?:start|end))?|top|right|bottom|left)$/;
|
|
12
13
|
|
|
14
|
+
// One root, two owned roles: outer shells and inner controls/collection rows.
|
|
15
|
+
// Circular shapes and joined-edge resets retain their explicit mechanics.
|
|
16
|
+
export const sharedCornerParts = {
|
|
17
|
+
cards: /^Card$/,
|
|
18
|
+
popover: /^PopoverContent$/,
|
|
19
|
+
command: /^Command(?:Item)?$/,
|
|
20
|
+
navigation: /^(?:DropdownMenu(?:Content|SubContent|Item|LinkItem|SubTrigger|CheckboxItem|RadioItem)|TabsList|TabsTrigger)$/,
|
|
21
|
+
'choice-inputs': /^SelectPopup(?:Content|Item)$/,
|
|
22
|
+
item: /^Item$/,
|
|
23
|
+
combobox: /^Combobox(?:Popup|Content|Item)$/,
|
|
24
|
+
display: /^(?:DialogContent|AlertDialogContent)$/,
|
|
25
|
+
sheet: /^SheetContent$/,
|
|
26
|
+
};
|
|
27
|
+
export const displayNames = /^(?:Text|Heading|DisplayLabel|Label|TextLink)$/;
|
|
28
|
+
export const nativeDisplayNames = /^(?:p|h[1-6])$/;
|
|
29
|
+
export const marginProperty = /^margin(?:Inline|Block)?(?:Start|End)?$|^margin(?:Top|Right|Bottom|Left)$|^margin-(?:(?:inline|block)(?:-(?:start|end))?|top|right|bottom|left)$/;
|
|
30
|
+
export const radiusProperty = /^border(?:(?:Top|Bottom)(?:Left|Right)|(?:Start|End)(?:Start|End))?Radius$|^border-(?:(?:top|bottom)-(?:left|right)-|(?:start|end)-(?:start|end)-)?radius$/;
|
|
31
|
+
|
|
32
|
+
export function cornerRole(family, symbol) {
|
|
33
|
+
if (family === 'item' && symbol === 'Item' || family === 'navigation' && /^(?:TabsList|TabsTrigger)$/.test(symbol)) return 'inner';
|
|
34
|
+
return sharedCornerParts[family]?.test(symbol) && /(?:Item|SubTrigger)$/.test(symbol) ? 'inner' : 'radius';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function replacesSharedRadius(token, role = 'radius') {
|
|
38
|
+
const value = utility(token);
|
|
39
|
+
if (new RegExp(`^rounded(?:-[trblse]{1,2})?-(?:${role}|none)$`).test(value)) return false;
|
|
40
|
+
return /^rounded(?:-|$)/.test(value) || /^\[border-(?:(?:top|bottom)-(?:left|right)-|(?:start|end)-(?:start|end)-)?radius:/.test(value);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function addsCopyMargin(token) {
|
|
44
|
+
const value = utility(token);
|
|
45
|
+
const match = value.match(/^-?m(?:[xytrblse]|bs|be)?-(.+)$|^\[margin[^:]*:(.+)\]$/);
|
|
46
|
+
return !!match && !/^(?:0(?:px|rem|em|%)?|\[0(?:px|rem|em|%)?\])$/.test(match[1] ?? match[2]);
|
|
47
|
+
}
|
|
48
|
+
|
|
13
49
|
export function utility(token) {
|
|
14
50
|
let depth = 0;
|
|
15
51
|
let start = 0;
|
|
@@ -20,3 +56,11 @@ export function utility(token) {
|
|
|
20
56
|
}
|
|
21
57
|
return token.slice(start).replace(/^!|!$/g, '');
|
|
22
58
|
}
|
|
59
|
+
|
|
60
|
+
/** Shared focus roles are contrast-tested at full strength, unlike status tints. */
|
|
61
|
+
export function attenuatedFocusRing(token) {
|
|
62
|
+
const match = utility(token).match(/^ring-(?:ring|sidebar-ring)\/(?:(\d+(?:\.\d+)?|\.\d+)|\[(\d+(?:\.\d+)?|\.\d+)(%)?\])$/);
|
|
63
|
+
if (!match) return false;
|
|
64
|
+
const opacity = Number(match[1] ?? match[2]);
|
|
65
|
+
return opacity < (match[1] !== undefined || match[3] ? 100 : 1);
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "themelia-react-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A composable React UI library for modern admin applications, built on Base UI and Tailwind with shadcn-compatible themes, shared design tokens, reusable layouts, blocks and workflows.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"./style.css": "./dist/style.css",
|
|
64
64
|
"./theme.css": "./dist/theme.css",
|
|
65
|
+
"./themes/green.css": "./dist/themes/green.css",
|
|
65
66
|
"./component-vocabulary": {
|
|
66
67
|
"types": "./dist/lib/component-vocabulary.d.ts",
|
|
67
68
|
"import": "./dist/component-vocabulary.js"
|
|
@@ -447,8 +448,8 @@
|
|
|
447
448
|
"test:browser": "npm run build:preview && node scripts/run-browser.mjs",
|
|
448
449
|
"check:package": "node scripts/check-package.mjs",
|
|
449
450
|
"check": "npm run check:contract && npm run check:preview && npm run check:docs && npm run lint && npm run check:design-lint && npm run typecheck && npm test && npm run build && npm run check:skill && npm run check:maps && npm run check:package && npm run build:preview",
|
|
450
|
-
"check:contract": "node --test scripts/test-runtime-ownership.mjs scripts/test-primitive-geometry.mjs scripts/test-source-entrypoints.mjs && node scripts/check-contract.mjs",
|
|
451
|
-
"lint": "node scripts/generate-utilities.mjs && oxlint src/components src/lib src/preview docs/consumer-skill/examples --deny-warnings",
|
|
451
|
+
"check:contract": "node --test scripts/test-runtime-ownership.mjs scripts/test-primitive-geometry.mjs scripts/test-source-entrypoints.mjs scripts/test-utility-vocabulary.mjs scripts/test-theme-contrast.mjs && node scripts/check-contract.mjs",
|
|
452
|
+
"lint": "node scripts/generate-utilities.mjs && oxlint src/components src/lib src/preview docs/consumer-skill/examples templates --deny-warnings",
|
|
452
453
|
"check:design-lint": "node scripts/generate-utilities.mjs && node scripts/check-design-lint.mjs",
|
|
453
454
|
"check:preview": "node scripts/check-preview.mjs",
|
|
454
455
|
"docs:sync-skill": "node scripts/sync-consumer-skill.mjs",
|
|
@@ -460,10 +461,11 @@
|
|
|
460
461
|
"check:docs": "node --test scripts/test-public-docs.mjs && node scripts/refresh-prop-docs.mjs --check",
|
|
461
462
|
"collect:browser": "npm run build:preview && node scripts/run-browser.mjs --collectors",
|
|
462
463
|
"check:all": "npm run check && node scripts/run-browser.mjs",
|
|
464
|
+
"check:quick": "npm run check:contract && npm run lint && npm run check:design-lint && npm run typecheck && npm test && npm run build",
|
|
463
465
|
"check:maps": "node scripts/test-client-boundaries.mjs --built",
|
|
464
466
|
"build:docs": "node scripts/build-static-docs.mjs",
|
|
465
467
|
"check:static-docs": "node scripts/check-static-docs.mjs",
|
|
466
|
-
"check:agent": "node --test scripts/test-consumer-discovery.mjs scripts/test-consumer-composition.mjs scripts/test-consumer-skill-assets.mjs scripts/test-static-docs.mjs scripts/test-fixture-install.mjs && npm run check:skill",
|
|
468
|
+
"check:agent": "node --test scripts/test-consumer-discovery.mjs scripts/test-consumer-composition.mjs scripts/test-button-codemod.mjs scripts/test-consumer-skill-assets.mjs scripts/test-static-docs.mjs scripts/test-fixture-install.mjs && npm run check:skill",
|
|
467
469
|
"check:release": "npm run check:all && npm run check:agent && npm run build:docs && npm run check:static-docs"
|
|
468
470
|
},
|
|
469
471
|
"peerDependencies": {
|
|
@@ -516,6 +518,8 @@
|
|
|
516
518
|
"@mdx-js/rollup": "^3.1.1",
|
|
517
519
|
"@playwright/test": "^1.63.0",
|
|
518
520
|
"@shadcn/lint": "0.2.0",
|
|
521
|
+
"@tailwindcss/node": "^4.3.3",
|
|
522
|
+
"@tailwindcss/oxide": "^4.3.3",
|
|
519
523
|
"@tailwindcss/vite": "^4.3.3",
|
|
520
524
|
"@tanstack/react-table": "^8.21.3",
|
|
521
525
|
"@testing-library/jest-dom": "^6.0.0",
|
|
@@ -540,7 +544,9 @@
|
|
|
540
544
|
"leaflet-draw": "^1.0.4",
|
|
541
545
|
"leaflet.fullscreen": "^5.3.1",
|
|
542
546
|
"leaflet.markercluster": "^1.5.3",
|
|
547
|
+
"lightningcss": "^1.33.0",
|
|
543
548
|
"lucide-react": "^1.14.0",
|
|
549
|
+
"magic-string": "^0.30.21",
|
|
544
550
|
"oxlint": "1.87.0",
|
|
545
551
|
"qrcode": "^1.5.4",
|
|
546
552
|
"react": "^19.2.5",
|
|
@@ -556,8 +562,7 @@
|
|
|
556
562
|
"tw-animate-css": "^1.4.0",
|
|
557
563
|
"typescript": "^5.9.3",
|
|
558
564
|
"vite": "^8.0.0",
|
|
559
|
-
"vitest": "^5.0.3"
|
|
560
|
-
"magic-string": "^0.30.21"
|
|
565
|
+
"vitest": "^5.0.3"
|
|
561
566
|
},
|
|
562
567
|
"engines": {
|
|
563
568
|
"node": ">=22.12.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-B-5Focs8.js","names":["Accordion","AccordionPrimitive","AccordionItem","AccordionTrigger","AccordionContent","Accordion","React","PrimitiveAccordion","PrimitiveAccordionItem","PrimitiveAccordionTrigger","PrimitiveAccordionContent","Accordion","Text","motionRecipes","Stack","DisclosurePanelElement","IconBadge","React$1","Accordion$2","props","Accordion","cn","className","AccordionItem$1","AccordionTrigger$1","children","ChevronDownIcon","AccordionContent$1","panelProps","Accordion$1","AccordionItem","AccordionTrigger","isSimpleText","AccordionContent","ACCORDION_ROOT_VARIANT_CLASS","ACCORDION_ITEM_VARIANT_CLASS","ACCORDION_TRIGGER_BASE","ACCORDION_CONTENT_PADDING","defaultSmartAccordionStrings","SmartAccordion","forwardRef","stringsProp","strings","useStrings","hasIconColumn","iconStyle","items","item","contentPadding","triggerGridClass","onValueChange","next","variant","itemClassName","triggerClassName","SmartAccordionIcon","isSimpleContent","contentClassName","content","reserveSpace","icon"],"sources":["../src/components/ui/accordion.tsx","../src/components/base/accordion/accordion.tsx","../src/components/base/accordion/accordion-variants.ts","../src/components/base/accordion/accordion.strings.ts","../src/components/base/accordion/smart-accordion.tsx"],"sourcesContent":["import { DisclosurePanelElement } from './disclosure-panel';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\"\n\nimport { cn } from \"../../lib/utils\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"border-border accordion--component flex w-full flex-col border box-border overflow-hidden\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"border-border accordion-item--component border-b last:border-b-0\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: AccordionPrimitive.Trigger.Props) {\n return (\n <AccordionPrimitive.Header className=\"accordion-header m-0\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\"accordion-trigger--component flex w-full items-center justify-between border-0 bg-transparent outline-none cursor-pointer box-border\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon data-slot=\"accordion-trigger-icon\" className={cn(\"accordion-trigger--icon size-icon text-muted-foreground shrink-0 [[aria-expanded=true]_&]:rotate-180\", motionRecipes.chevron)} />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n render,\n ...props\n}: AccordionPrimitive.Panel.Props) {\n return (\n <AccordionPrimitive.Panel\n data-slot=\"accordion-content\"\n className={cn(\"accordion-content--component box-border text-foreground h-(--accordion-panel-height)\", motionRecipes.disclosure, className)}\n {...props}\n render={(panelProps, state) => <DisclosurePanelElement props={panelProps} state={state} render={render} heightVariable=\"--accordion-panel-height\" />}\n >\n {children}\n </AccordionPrimitive.Panel>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n\n","/**\n * Accordion — tokenized base wrapper around the shadcn/Base UI primitive.\n *\n * The internal primitive intentionally keeps shadcn's roomy defaults. This\n * public layer calibrates them for admin surfaces: radius tokens, 12px row\n * insets, density-aware vertical rhythm, quiet hover/focus treatments, and\n * matching trigger/content columns. Consumers retain the complete compound\n * API and can override any treatment with `className`.\n */\nimport * as React from 'react';\n\nimport {\n\tAccordion as PrimitiveAccordion,\n\tAccordionContent as PrimitiveAccordionContent,\n\tAccordionItem as PrimitiveAccordionItem,\n\tAccordionTrigger as PrimitiveAccordionTrigger,\n} from '../../ui/accordion';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nexport type AccordionProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordion>;\nexport type AccordionItemProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionItem>;\nexport type AccordionTriggerProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionTrigger>;\nexport type AccordionContentProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionContent>;\n\nconst Accordion = React.forwardRef<React.ElementRef<typeof PrimitiveAccordion>, AccordionProps>(\n\tfunction Accordion({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<PrimitiveAccordion\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion--component rounded-radius-lg border-border bg-card',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAccordion.displayName = 'Accordion';\n\nconst AccordionItem = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionItem>, AccordionItemProps>(\n\tfunction AccordionItem({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<PrimitiveAccordionItem\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-item--component border-border data-open:bg-muted/30',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionTrigger>, AccordionTriggerProps>(\n\tfunction AccordionTrigger({ className, children, ...props }, ref) {\n\t\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\t\treturn (\n\t\t\t<PrimitiveAccordionTrigger\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-trigger--component min-h-action items-center gap-space-lg px-row-x py-row-y',\n\t\t\t\t\t'text-left text-sm font-medium transition-colors hover:bg-muted/40 hover:no-underline',\n\t\t\t\t\t'focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-ring/50',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText ? (\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</PrimitiveAccordionTrigger>\n\t\t);\n\t},\n);\nAccordionTrigger.displayName = 'AccordionTrigger';\n\nconst AccordionContent = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionContent>, AccordionContentProps>(\n\tfunction AccordionContent({ className, children, ...props }, ref) {\n\t\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\t\treturn (\n\t\t\t<PrimitiveAccordionContent\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-content--component px-row-x pb-space-lg text-sm',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText ? (\n\t\t\t\t\t<Text tag=\"div\" size=\"inherit\" lineHeight=\"relaxed\" className=\"text-inherit\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</PrimitiveAccordionContent>\n\t\t);\n\t},\n);\nAccordionContent.displayName = 'AccordionContent';\n\nexport {\n\tAccordion,\n\tAccordionItem,\n\tAccordionTrigger,\n\tAccordionContent,\n};\n","/**\n * Shared accordion-shell variant classes — used by both `SmartAccordion`\n * and any blocks surface that builds on `base/accordion` directly\n * (e.g. `blocks/onboarding/checklist`).\n *\n * Exported because two consumers already keep it in lockstep; a third\n * one will copy this exact map. Centralising means a future tweak\n * (e.g. tighten `card` items to `border-border/70`) propagates.\n *\n * Padding tokens for trigger / content live alongside so the rhythm\n * is shared too:\n *\n * - Trigger: `gap-space-lg px-row-x py-row-y` — density-driven,\n * `<UIProvider>`\n * override flows through.\n * - Content padding accounts for the base panel's `px-row-x`.\n * Medallion and inline rows use shared media/spacing tokens, and\n * no-icon rows add no extra left padding so body copy tracks the\n * trigger text column instead of drifting.\n */\nimport type { DisclosureSurface } from '../../../lib/component-vocabulary';\n\nexport type AccordionShellVariant = DisclosureSurface;\n\nexport const ACCORDION_ROOT_VARIANT_CLASS: Record<AccordionShellVariant, string> = {\n\tcard: 'gap-space-md border-0 rounded-none bg-transparent overflow-visible',\n\tbordered: 'rounded-radius-lg border border-border bg-card overflow-hidden',\n\tflat: 'border-0 rounded-none bg-transparent overflow-visible',\n};\n\nexport const ACCORDION_ITEM_VARIANT_CLASS: Record<AccordionShellVariant, string> = {\n\tcard: 'border border-border bg-card rounded-radius data-open:bg-muted/25',\n\tbordered: 'bg-transparent not-last:border-b border-border data-open:bg-muted/30',\n\tflat: 'border-0 not-last:border-b-0 bg-transparent data-open:bg-muted/30 rounded-radius',\n};\n\nexport const ACCORDION_TRIGGER_BASE =\n\t'items-center gap-space-lg px-row-x py-row-y text-left hover:no-underline';\n\n/**\n * Content-padding presets keyed off the leading-icon width. Use\n * `withMedallion` when the trigger renders a default `IconBadge`\n * plus the shared row gap so body text aligns under the title at every\n * consumer density.\n */\nexport const ACCORDION_CONTENT_PADDING = {\n\twithMedallion: 'pl-[calc(var(--spacing-row-x)+var(--spacing-avatar)+var(--spacing-space-lg))] pr-row-x pt-0',\n\twithInline: 'pl-[calc(var(--spacing-row-x)+var(--spacing-icon-lg)+var(--spacing-space-lg))] pr-row-x pt-0',\n\twithoutIcon: 'px-row-x pt-0',\n} as const;\n","/**\n * Strings for `SmartAccordion`. There aren't many — Radix handles the\n * trigger ARIA states automatically, so the only library-owned copy is\n * the optional landmark label on the wrapping nav region. Consumers\n * override per-item `title` / `badge` / `content` directly via\n * `SmartAccordionItem` props (the strings live in the data, not here).\n */\nexport interface SmartAccordionStrings {\n\t/**\n\t * Sets `aria-label` on the wrapping element so screen readers can name\n\t * the accordion region. Optional — when absent, no aria-label is set.\n\t */\n\tregionAriaLabel?: string;\n}\n\nexport const defaultSmartAccordionStrings: SmartAccordionStrings = {\n\tregionAriaLabel: undefined,\n};\n","/**\n * SmartAccordion — the canonical \"icon + title + optional badge + body\"\n * accordion pattern, with three visual variants for the surface chrome\n * (`card` | `bordered` | `flat`) and three icon framings (`medallion` |\n * `inline` | `none`).\n *\n * Composes the wrapped `base/accordion` parts (rule 2 — blocks-style\n * convenience built from re-exports, not the raw shadcn primitive).\n *\n * For richer rows (multi-line metadata, custom layouts), drop down to\n * the compound API:\n *\n * import { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n * from '.';\n */\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { IconBadge } from '../display/icon-badge';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion';\nimport {\n\tACCORDION_CONTENT_PADDING,\n\tACCORDION_ITEM_VARIANT_CLASS,\n\tACCORDION_ROOT_VARIANT_CLASS,\n\tACCORDION_TRIGGER_BASE,\n} from './accordion-variants';\nimport { defaultSmartAccordionStrings } from './accordion.strings';\nimport type {\n\tSmartAccordionIconStyle,\n\tSmartAccordionProps,\n} from './accordion.types';\n\n/**\n * Bounded accordion composition for repeated icon, title, description, badge,\n * and body sections. Use the compound Accordion parts when row structure or\n * per-item presentation differs.\n */\nexport const SmartAccordion = forwardRef<HTMLDivElement, SmartAccordionProps>(function SmartAccordion({\n\titems,\n\tmultiple = false,\n\tdefaultValue,\n\tvalue,\n\tonValueChange,\n\tvariant = 'bordered',\n\ticonStyle = 'inline',\n\tclassName,\n\titemClassName,\n\ttriggerClassName,\n\tcontentClassName,\n\tstrings: stringsProp,\n}, ref) {\n\tconst strings = useStrings(defaultSmartAccordionStrings, stringsProp);\n\tconst hasIconColumn = iconStyle !== 'none' && items.some((item) => item.icon != null);\n\tconst contentPadding =\n\t\t!hasIconColumn\n\t\t\t? ACCORDION_CONTENT_PADDING.withoutIcon\n\t\t\t: iconStyle === 'medallion'\n\t\t\t? ACCORDION_CONTENT_PADDING.withMedallion\n\t\t\t: ACCORDION_CONTENT_PADDING.withInline;\n\tconst triggerGridClass = !hasIconColumn\n\t\t? 'grid-cols-[minmax(0,1fr)]'\n\t\t: 'grid-cols-[auto_minmax(0,1fr)]';\n\treturn (\n\t\t<Accordion\n\t\t\tref={ref}\n\t\t\tmultiple={multiple}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tvalue={value}\n\t\t\tonValueChange={\n\t\t\t\tonValueChange\n\t\t\t\t\t? (next) => onValueChange(next as string[])\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-label={strings.regionAriaLabel}\n\t\t\tdata-variant={variant}\n\t\t\tdata-icon-style={iconStyle}\n\t\t\tclassName={cn('smart-accordion--component', ACCORDION_ROOT_VARIANT_CLASS[variant], className)}\n\t\t>\n\t\t\t{items.map((item) => (\n\t\t\t\t<AccordionItem\n\t\t\t\t\tkey={item.value}\n\t\t\t\t\tvalue={item.value}\n\t\t\t\t\tclassName={cn('smart-accordion--item', ACCORDION_ITEM_VARIANT_CLASS[variant], itemClassName)}\n\t\t\t\t>\n\t\t\t\t\t<AccordionTrigger\n\t\t\t\t\t\tclassName={cn('smart-accordion--trigger', ACCORDION_TRIGGER_BASE, triggerClassName)}\n\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={cn('grid min-w-0 flex-1 items-center gap-x-space-lg', triggerGridClass)}>\n\t\t\t\t\t\t\t<SmartAccordionIcon\n\t\t\t\t\t\t\t\ticonStyle={iconStyle}\n\t\t\t\t\t\t\t\ticon={item.icon}\n\t\t\t\t\t\t\t\treserveSpace={hasIconColumn}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Stack render={<span />} gap=\"dense\" className=\"smart-accordion--heading flex-1\">\n\t\t\t\t\t\t\t\t<span className=\"flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-xs\">\n\t\t\t\t\t\t\t\t\t{isSimpleContent(item.title) ? (\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" weight=\"semibold\" className=\"smart-accordion--title min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : item.title}\n\t\t\t\t\t\t\t\t\t{item.badge != null && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"smart-accordion--badge inline-flex shrink-0\">{item.badge}</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{!!item.description && (\n\t\t\t\t\t\t\t\t\tisSimpleContent(item.description) ? (\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"secondary\" className=\"smart-accordion--description min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t{item.description}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : item.description\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</AccordionTrigger>\n\t\t\t\t\t<AccordionContent\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'smart-accordion--content',\n\t\t\t\t\t\t\tcontentPadding,\n\t\t\t\t\t\t\tcontentClassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isSimpleContent(item.content) ? (\n\t\t\t\t\t\t\t<Text tag=\"div\" type=\"secondary\" lineHeight=\"relaxed\">\n\t\t\t\t\t\t\t\t{item.content}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : item.content}\n\t\t\t\t\t</AccordionContent>\n\t\t\t\t</AccordionItem>\n\t\t\t))}\n\t\t</Accordion>\n\t);\n});\n\nSmartAccordion.displayName = 'SmartAccordion';\n\nfunction isSimpleContent(content: ReactNode): content is string | number | bigint {\n\treturn typeof content === 'string' || typeof content === 'number' || typeof content === 'bigint';\n}\n\nfunction SmartAccordionIcon({\n\ticonStyle,\n\ticon,\n\treserveSpace,\n}: {\n\ticonStyle: SmartAccordionIconStyle;\n\ticon?: ReactNode;\n\treserveSpace: boolean;\n}) {\n\tif (iconStyle === 'none' || !reserveSpace) return null;\n\tif (!icon) {\n\t\treturn (\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'smart-accordion--icon inline-flex shrink-0',\n\t\t\t\t\ticonStyle === 'inline' ? 'size-icon-lg' : 'size-avatar',\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t}\n\tif (iconStyle === 'inline') {\n\t\treturn (\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"smart-accordion--icon inline-flex size-icon-lg shrink-0 self-center text-muted-foreground [&>svg]:size-icon\"\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t);\n\t}\n\treturn (\n\t\t<IconBadge size=\"md\" tone=\"neutral\" shape=\"circle\" aria-hidden=\"true\" className=\"smart-accordion--icon self-center\">\n\t\t\t{icon}\n\t\t</IconBadge>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;AAOA,SAASA,EAAU,EAAE,cAAW,GAAGmB,KAAwC;CACzE,OACE,kBAAClB,EAAmB,MAApB;EACE,aAAU;EACV,WAAWoB,EAAG,6FAA6FC,CAAS;EACpH,GAAIH;CACL,CAAA;AAEL;AAEA,SAASjB,EAAc,EAAE,cAAW,GAAGiB,KAAwC;CAC7E,OACE,kBAAClB,EAAmB,MAApB;EACE,aAAU;EACV,WAAWoB,EAAG,oEAAoEC,CAAS;EAC3F,GAAIH;CACL,CAAA;AAEL;AAEA,SAAShB,EAAiB,EACxB,cACA,aACA,GAAGgB,KACgC;CACnC,OACE,kBAAClB,EAAmB,QAApB;EAA2B,WAAU;EACnC,UAAA,kBAACA,EAAmB,SAApB;GACE,aAAU;GACV,WAAWoB,EAAG,wIAAwIC,CAAS;GAC/J,GAAIH;GAHN,UAAA,CAKGM,GACD,kBAACC,GAAD;IAAiB,aAAU;IAAyB,WAAWL,EAAG,wGAAwGR,EAAc,OAAO;GAAI,CAAA,CACzK;;CACH,CAAA;AAE/B;AAEA,SAAST,EAAiB,EACxB,cACA,aACA,WACA,GAAGe,KAC8B;CACjC,OACE,kBAAClB,EAAmB,OAApB;EACE,aAAU;EACV,WAAWoB,EAAG,wFAAwFR,EAAc,YAAYS,CAAS;EACzI,GAAIH;EACJ,SAAS,GAAY,MAAU,kBAACJ,GAAD;GAAwB,OAAOa;GAAmB;GAAe;GAAQ,gBAAe;EAA4B,CAAA;EAElJ;CACuB,CAAA;AAE9B;;;ACrCA,IAAMvB,IAAYC,EAAM,WACvB,SAA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mC,EAAK;OACD,CAAA,IACHA,EAAK,OACRA,EAAK,SAAS,QACd,kBAAC,QAAD;QAAM,WAAU;QAA+C,UAAAA,EAAK;OAAY,CAAA,CAE5E;MACL,CAAA,GAAA,CAAC,CAACA,EAAK,gBACPS,EAAgBT,EAAK,WAAW,IAC/B,kBAACnC,GAAD;OAAM,KAAI;OAAO,MAAK;OAAY,WAAU;OAC1C,UAAAmC,EAAK;MACD,CAAA,IACHA,EAAK,YAEJ;KACH,CAAA,CAAA;;GACY,CAAA,GAClB,kBAACd,GAAD;IACC,WAAWZ,EACV,4BACA2B,GACAS,CACD;IAEC,UAAAD,EAAgBT,EAAK,OAAO,IAC5B,kBAACnC,GAAD;KAAM,KAAI;KAAM,MAAK;KAAY,YAAW;KAC1C,UAAAmC,EAAK;IACD,CAAA,IACHA,EAAK;GACQ,CAAA,CACJ;EAhDT,GAAAA,EAAK,KAgDI,CACf;CACS,CAAA;AAEb,CAAC;AAED,EAAe,cAAc;AAE7B,SAASS,EAAgB,GAAyD;CACjF,OAAO,OAAOE,KAAY,YAAY,OAAOA,KAAY,YAAY,OAAOA,KAAY;AACzF;AAEA,SAASH,EAAmB,EAC3B,cACA,SACA,mBAKE;CAuBF,OAtBIV,MAAc,UAAU,CAACc,IAAqB,OAC7CC,IAWDf,MAAc,WAEhB,kBAAC,QAAD;EACC,eAAY;EACZ,WAAU;EAET,UAAAe;CACI,CAAA,IAIP,kBAAC5C,GAAD;EAAW,MAAK;EAAK,MAAK;EAAU,OAAM;EAAS,eAAY;EAAO,WAAU;EAC9E,UAAA4C;CACS,CAAA,IAtBV,kBAAC,QAAD;EACC,eAAY;EACZ,WAAWvC,EACV,8CACAwB,MAAc,WAAW,iBAAiB,aAC3C;CACA,CAAA;AAkBJ"}
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useStrings as e } from "./lib/strings.js";
|
|
3
|
-
import { t } from "./utils-C2EKeIw3.js";
|
|
4
|
-
import { n } from "./buttons-Co6GavvM.js";
|
|
5
|
-
import { a as r, r as i } from "./typography-Cv8MT-82.js";
|
|
6
|
-
import { t as a } from "./popover.recipes-zgBhMlUu.js";
|
|
7
|
-
import { t as o } from "./collection-content-C4fthJV_.js";
|
|
8
|
-
import { a as s, d as c, g as l, i as u, n as d, o as f, r as p, s as m, t as h } from "./dropdown-menu-BlnyHr-9.js";
|
|
9
|
-
import g, { isValidElement as _ } from "react";
|
|
10
|
-
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
11
|
-
import { MoreVertical as x } from "lucide-react";
|
|
12
|
-
//#region src/components/base/action-menu/action-menu.strings.ts
|
|
13
|
-
var S = { openMenuLabel: "Open menu" };
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/components/base/action-menu/action-menu.tsx
|
|
16
|
-
function C(e) {
|
|
17
|
-
return e.tone === "destructive";
|
|
18
|
-
}
|
|
19
|
-
function w(e, t = !1) {
|
|
20
|
-
let n = e.filter((e) => e.visible !== !1);
|
|
21
|
-
if (t) return n;
|
|
22
|
-
let r = n.filter((e) => !C(e)), i = n.filter(C);
|
|
23
|
-
return [...r, ...i];
|
|
24
|
-
}
|
|
25
|
-
function T(e, t) {
|
|
26
|
-
return e.id ?? (typeof e.label == "string" ? e.label : `action-${t}`);
|
|
27
|
-
}
|
|
28
|
-
function E(e) {
|
|
29
|
-
return e ? _(e) ? e : typeof e == "function" ? /* @__PURE__ */ y(e, {
|
|
30
|
-
className: "size-icon-sm",
|
|
31
|
-
"aria-hidden": "true"
|
|
32
|
-
}) : typeof e == "object" && e && "$$typeof" in e ? /* @__PURE__ */ y(e, {
|
|
33
|
-
className: "size-icon-sm",
|
|
34
|
-
"aria-hidden": !0
|
|
35
|
-
}) : e : null;
|
|
36
|
-
}
|
|
37
|
-
function D(e, n) {
|
|
38
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */ y(r, {
|
|
39
|
-
tag: "span",
|
|
40
|
-
lineHeight: "tight",
|
|
41
|
-
className: t("text-inherit", n),
|
|
42
|
-
children: e
|
|
43
|
-
}) : n ? /* @__PURE__ */ y("span", {
|
|
44
|
-
className: n,
|
|
45
|
-
children: e
|
|
46
|
-
}) : e;
|
|
47
|
-
}
|
|
48
|
-
function O(e) {
|
|
49
|
-
return e === "destructive" ? "destructive" : "default";
|
|
50
|
-
}
|
|
51
|
-
function k(e) {
|
|
52
|
-
let t = e.tone ?? "primary", n = e.buttonStyle ?? "solid";
|
|
53
|
-
return n === "link" ? {
|
|
54
|
-
tone: t,
|
|
55
|
-
buttonStyle: "ghost",
|
|
56
|
-
className: "underline underline-offset-4"
|
|
57
|
-
} : {
|
|
58
|
-
tone: t,
|
|
59
|
-
buttonStyle: n
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function A({ action: e, index: n, density: r, closeOnSelect: i, renderLink: c }) {
|
|
63
|
-
let l = T(e, n), u = e.closeOnSelect ?? i;
|
|
64
|
-
if (e.render) return /* @__PURE__ */ y("div", {
|
|
65
|
-
className: "action-menu--item",
|
|
66
|
-
children: e.render
|
|
67
|
-
}, l);
|
|
68
|
-
let f = E(e.icon), p = /* @__PURE__ */ y(o, {
|
|
69
|
-
label: e.label,
|
|
70
|
-
leading: f,
|
|
71
|
-
wrap: !0,
|
|
72
|
-
className: t("action-menu--item-content w-full", e.contentClassName),
|
|
73
|
-
leadingClassName: "action-menu--item-icon text-inherit",
|
|
74
|
-
labelClassName: "action-menu--item-label"
|
|
75
|
-
}), h = t("action-menu--item", r === "table" && a.tableRow, e.className);
|
|
76
|
-
if (e.type === "checkbox") return /* @__PURE__ */ y(d, {
|
|
77
|
-
checked: !!e.checked,
|
|
78
|
-
disabled: e.disabled,
|
|
79
|
-
closeOnClick: u,
|
|
80
|
-
onCheckedChange: e.onCheckedChange,
|
|
81
|
-
className: h,
|
|
82
|
-
children: p
|
|
83
|
-
}, l);
|
|
84
|
-
if (e.href && !e.disabled) {
|
|
85
|
-
let t = e.href;
|
|
86
|
-
return /* @__PURE__ */ y(m, {
|
|
87
|
-
href: t,
|
|
88
|
-
variant: O(e.tone),
|
|
89
|
-
closeOnClick: u,
|
|
90
|
-
onClick: e.onClick,
|
|
91
|
-
render: c ? c({
|
|
92
|
-
href: t,
|
|
93
|
-
children: p,
|
|
94
|
-
target: e.target,
|
|
95
|
-
rel: e.rel,
|
|
96
|
-
external: e.external,
|
|
97
|
-
disabled: e.disabled
|
|
98
|
-
}) : (n) => /* @__PURE__ */ y("a", {
|
|
99
|
-
...n,
|
|
100
|
-
href: t,
|
|
101
|
-
target: e.target,
|
|
102
|
-
rel: e.rel
|
|
103
|
-
}),
|
|
104
|
-
className: h,
|
|
105
|
-
children: p
|
|
106
|
-
}, l);
|
|
107
|
-
}
|
|
108
|
-
return /* @__PURE__ */ y(s, {
|
|
109
|
-
disabled: e.disabled,
|
|
110
|
-
variant: O(e.tone),
|
|
111
|
-
closeOnClick: u,
|
|
112
|
-
onClick: e.onClick,
|
|
113
|
-
className: h,
|
|
114
|
-
children: p
|
|
115
|
-
}, l);
|
|
116
|
-
}
|
|
117
|
-
function j(e) {
|
|
118
|
-
let t = [], n = null;
|
|
119
|
-
return e.actions.forEach((r, a) => {
|
|
120
|
-
let o = r.group ?? null, s = o !== n;
|
|
121
|
-
t.length > 0 && s && t.push(/* @__PURE__ */ y(c, {}, `sep-${n ?? "root"}-${o ?? "root"}-${a}`)), s && (n = o, typeof o == "string" && t.push(/* @__PURE__ */ y(f, {
|
|
122
|
-
className: "normal-case",
|
|
123
|
-
children: /* @__PURE__ */ y(i, {
|
|
124
|
-
tag: "span",
|
|
125
|
-
children: o
|
|
126
|
-
})
|
|
127
|
-
}, `group-${o}-${a}`))), t.push(A({
|
|
128
|
-
...e,
|
|
129
|
-
action: r,
|
|
130
|
-
index: a
|
|
131
|
-
}));
|
|
132
|
-
}), t;
|
|
133
|
-
}
|
|
134
|
-
function M(e, t) {
|
|
135
|
-
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
136
|
-
}
|
|
137
|
-
var N = g.forwardRef(function({ actions: i, label: a, icon: o = x, srText: s, buttonProps: c, align: d = "end", side: f = "bottom", contentClassName: m = "", width: _ = "w-auto", closeOnSelect: C = !0, density: T = "default", labelVisibility: D = "visible", preserveOrder: O = !1, renderLink: k, renderTrigger: A, strings: N }, P) {
|
|
138
|
-
let [F, I] = g.useState(!1), L = e(S, N), R = s ?? L.openMenuLabel, z = g.useMemo(() => w(i, O), [i, O]);
|
|
139
|
-
if (z.length === 0) return null;
|
|
140
|
-
let B = !!a && D === "visible", V = {
|
|
141
|
-
tone: "secondary",
|
|
142
|
-
buttonStyle: "ghost",
|
|
143
|
-
size: B ? "sm" : "md",
|
|
144
|
-
iconOnly: !B,
|
|
145
|
-
className: B ? void 0 : a && D === "responsive" ? "size-action p-0 sm:w-auto sm:gap-space-sm sm:px-control-sm" : "size-action p-0"
|
|
146
|
-
}, { tone: H = "secondary", buttonStyle: U = "ghost", size: W = "md", iconOnly: G = !B, className: K, ...q } = {
|
|
147
|
-
...V,
|
|
148
|
-
...c,
|
|
149
|
-
className: t(V.className, c?.className)
|
|
150
|
-
}, J = D === "hidden" ? "sr-only" : D === "responsive" ? "sr-only sm:not-sr-only" : void 0, Y = E(o), X = a ? /* @__PURE__ */ b(v, { children: [Y, /* @__PURE__ */ y(r, {
|
|
151
|
-
tag: "span",
|
|
152
|
-
size: "inherit",
|
|
153
|
-
weight: "medium",
|
|
154
|
-
lineHeight: "tight",
|
|
155
|
-
className: t("whitespace-nowrap text-inherit", J),
|
|
156
|
-
children: a
|
|
157
|
-
})] }) : /* @__PURE__ */ b(v, { children: [Y, /* @__PURE__ */ y(r, {
|
|
158
|
-
tag: "span",
|
|
159
|
-
size: "inherit",
|
|
160
|
-
className: "sr-only",
|
|
161
|
-
children: R
|
|
162
|
-
})] });
|
|
163
|
-
return /* @__PURE__ */ b(h, {
|
|
164
|
-
open: F,
|
|
165
|
-
onOpenChange: I,
|
|
166
|
-
children: [/* @__PURE__ */ y(l, { render: A ?? ((e) => {
|
|
167
|
-
let { ref: r } = e, i = (e) => {
|
|
168
|
-
M(r, e), M(P, e);
|
|
169
|
-
};
|
|
170
|
-
return /* @__PURE__ */ y(n, {
|
|
171
|
-
...q,
|
|
172
|
-
...e,
|
|
173
|
-
ref: i,
|
|
174
|
-
type: "button",
|
|
175
|
-
tone: H,
|
|
176
|
-
buttonStyle: U,
|
|
177
|
-
size: W,
|
|
178
|
-
iconOnly: G,
|
|
179
|
-
className: t("action-menu--component", K, e.className),
|
|
180
|
-
children: X
|
|
181
|
-
});
|
|
182
|
-
}) }), /* @__PURE__ */ y(p, {
|
|
183
|
-
density: T === "table" ? "compact" : T,
|
|
184
|
-
align: d,
|
|
185
|
-
side: f,
|
|
186
|
-
className: t("action-menu--content", _, "min-w-36", m),
|
|
187
|
-
children: /* @__PURE__ */ y(u, {
|
|
188
|
-
className: "action-menu--group",
|
|
189
|
-
children: j({
|
|
190
|
-
actions: z,
|
|
191
|
-
density: T,
|
|
192
|
-
closeOnSelect: C,
|
|
193
|
-
renderLink: k
|
|
194
|
-
})
|
|
195
|
-
})
|
|
196
|
-
})]
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
N.displayName = "ActionMenu";
|
|
200
|
-
var P = g.forwardRef(function({ actions: e, className: r, buttonClassName: i, size: a = "sm", renderLink: o }, s) {
|
|
201
|
-
let c = w(e, !0);
|
|
202
|
-
return c.length === 0 ? null : /* @__PURE__ */ y("div", {
|
|
203
|
-
ref: s,
|
|
204
|
-
className: t("action-buttons--component flex flex-wrap items-center gap-space-sm", r),
|
|
205
|
-
children: c.map((e, r) => {
|
|
206
|
-
let s = T(e, r);
|
|
207
|
-
if (e.render) return /* @__PURE__ */ y(g.Fragment, { children: e.render }, s);
|
|
208
|
-
let c = E(e.icon), l = k(e), u = /* @__PURE__ */ b(v, { children: [!!c && /* @__PURE__ */ y("span", {
|
|
209
|
-
className: "action-buttons--icon inline-flex shrink-0 items-center",
|
|
210
|
-
children: c
|
|
211
|
-
}), D(e.label, "action-buttons--label")] });
|
|
212
|
-
if (e.href && !e.disabled && o) {
|
|
213
|
-
let r = e.href;
|
|
214
|
-
return /* @__PURE__ */ y(n, {
|
|
215
|
-
type: "button",
|
|
216
|
-
tone: l.tone,
|
|
217
|
-
buttonStyle: l.buttonStyle,
|
|
218
|
-
size: e.buttonSize ?? a,
|
|
219
|
-
nativeButton: !1,
|
|
220
|
-
className: t("action-buttons--item leading-tight", l.className, i, e.className),
|
|
221
|
-
onClick: () => {
|
|
222
|
-
e.onClick?.();
|
|
223
|
-
},
|
|
224
|
-
render: (t) => o({
|
|
225
|
-
...t,
|
|
226
|
-
href: r,
|
|
227
|
-
children: t.children,
|
|
228
|
-
target: e.target,
|
|
229
|
-
rel: e.rel,
|
|
230
|
-
external: e.external,
|
|
231
|
-
disabled: e.disabled
|
|
232
|
-
}),
|
|
233
|
-
children: u
|
|
234
|
-
}, s);
|
|
235
|
-
}
|
|
236
|
-
return e.href && !e.disabled ? /* @__PURE__ */ y(n, {
|
|
237
|
-
href: e.href,
|
|
238
|
-
target: e.target,
|
|
239
|
-
rel: e.rel,
|
|
240
|
-
tone: l.tone,
|
|
241
|
-
buttonStyle: l.buttonStyle,
|
|
242
|
-
size: e.buttonSize ?? a,
|
|
243
|
-
className: t("action-buttons--item leading-tight", l.className, i, e.className),
|
|
244
|
-
onClick: e.onClick,
|
|
245
|
-
children: u
|
|
246
|
-
}, s) : /* @__PURE__ */ y(n, {
|
|
247
|
-
type: "button",
|
|
248
|
-
tone: l.tone,
|
|
249
|
-
buttonStyle: l.buttonStyle,
|
|
250
|
-
size: e.buttonSize ?? a,
|
|
251
|
-
className: t("action-buttons--item leading-tight", l.className, i, e.className),
|
|
252
|
-
disabled: !!e.disabled,
|
|
253
|
-
onClick: () => {
|
|
254
|
-
e.onClick?.();
|
|
255
|
-
},
|
|
256
|
-
children: u
|
|
257
|
-
}, s);
|
|
258
|
-
})
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
P.displayName = "ActionButtons";
|
|
262
|
-
//#endregion
|
|
263
|
-
export { N as n, S as r, P as t };
|
|
264
|
-
|
|
265
|
-
//# sourceMappingURL=action-menu-Cx3SdfbN.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-menu-Cx3SdfbN.js","names":["Icon","_Fragment","_jsx","Text","DisplayLabel","collectionRecipes","CollectionContent","DropdownMenuItem","DropdownMenuSeparator","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuCheckboxItem","DropdownMenuLabel","DropdownMenuContent","DropdownMenuLinkItem","DropdownMenu","React","Fragment$1","defaultActionMenuStrings","isDestructiveAction","action","resolveActions","visible","actions","preserveOrder","standard","destructive","getActionKey","index","renderActionIcon","icon","isValidElement","renderActionLabel","label","cn","className","toMenuVariant","tone","toButtonPresentation","buttonStyle","renderMenuAction","key","shouldCloseOnSelect","closeOnSelect","content","density","href","renderLink","props","renderGroupedActions","nodes","currentGroup","args","nextGroup","groupChanged","assignRef","ref","node","ActionMenu","MoreVertical","stringsProp","open","setOpen","strings","useStrings","resolvedSrText","srText","resolvedActions","hasVisibleLabel","labelVisibility","defaultButtonProps","triggerClassName","triggerProps","buttonProps","labelClassName","triggerIcon","buttonContent","renderTrigger","baseTriggerRef","dropdownTriggerProps","composedRef","Button","width","contentClassName","ActionButtons","visibleActions","resolved","children","size","buttonClassName","buttonRenderProps"],"sources":["../src/components/base/action-menu/action-menu.strings.ts","../src/components/base/action-menu/action-menu.tsx"],"sourcesContent":["export interface ActionMenuStrings {\n\topenMenuLabel: string;\n}\n\nexport const defaultActionMenuStrings: ActionMenuStrings = {\n\topenMenuLabel: 'Open menu',\n};\n","/**\n * ActionMenu — centralized action chrome for page, card, table, and row\n * overflow menus.\n *\n * Primary API is definition-driven: pass `actions={[...]}` and the component\n * renders the trigger, menu surface, grouping, checkbox rows, destructive\n * separation, links, disabled state, and density. `ActionButtons` renders the\n * same definitions as inline buttons for page/toolbars that need visible\n * actions plus an overflow menu.\n */\nimport type { LucideIcon } from 'lucide-react';\nimport { MoreVertical } from 'lucide-react';\nimport React, { isValidElement, type ComponentType, type ElementType, type ReactElement, type ReactNode } from 'react';\n\nimport { Button, type ButtonSize, type ButtonStyle } from '../buttons';\nimport { Stack } from '../structure';\nimport { collectionRecipes, type CollectionDensity } from '../popover/popover.recipes';\nimport { CollectionContent } from '../popover/collection-content';\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuLinkItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from '../navigation/dropdown-menu';\nimport { DisplayLabel, Text } from '../../typography';\nimport type { ActionButtonStyle, ActionPresentation } from '../../../lib/action-presentation';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tdefaultActionMenuStrings,\n\ttype ActionMenuStrings,\n} from './action-menu.strings';\n\ntype ActionMenuButtonProps = Partial<React.ComponentPropsWithoutRef<typeof Button>> & {\n\t[key: `data-${string}`]: string | boolean | undefined;\n\t'aria-label'?: string;\n\tonPointerDown?: React.PointerEventHandler<HTMLButtonElement>;\n};\nexport type ActionMenuDensity = CollectionDensity | 'table';\nexport type ActionMenuLabelVisibility = 'visible' | 'responsive' | 'hidden';\nexport interface ActionMenuLinkRenderProps extends React.ComponentPropsWithoutRef<'a'> {\n\thref: string;\n\tdisabled?: boolean;\n\texternal?: boolean;\n}\n\nexport type ActionMenuIcon = LucideIcon | ComponentType<{ className?: string }> | ReactNode;\n\nexport interface ActionMenuAction extends ActionPresentation {\n\t/** Stable React key. Falls back to a string `label`, then the index. */\n\tid?: string;\n\t/** Visible label for the entry. */\n\tlabel: ReactNode;\n\t/** Leading glyph. Accepts a Lucide icon, a component, or a rendered node. */\n\ticon?: ActionMenuIcon;\n\t/** `'checkbox'` renders a toggle driven by `checked`/`onCheckedChange`. Defaults to `'item'`. */\n\ttype?: 'item' | 'checkbox';\n\t/**\n\t * Renders the entry as a link. By default this is a native `<a href>`, so it\n\t * performs a full page navigation; pass `renderLink` on `ActionMenu` to route\n\t * it through your framework's router instead.\n\t */\n\thref?: string;\n\t/** Anchor target forwarded to the rendered link. Requires `href`. */\n\ttarget?: string;\n\t/** Anchor rel forwarded to the rendered link. Requires `href`. */\n\trel?: string;\n\t/** Marks the destination as leaving the app; forwarded to `renderLink`. */\n\texternal?: boolean;\n\t/** Runs when the entry is chosen. This is the handler for a normal item. */\n\tonClick?: () => void;\n\t/** Checked state for a `'checkbox'` entry. */\n\tchecked?: boolean;\n\t/** Fires with the next checked state for a `'checkbox'` entry. */\n\tonCheckedChange?: (checked: boolean) => void;\n\t/**\n\t * Starts a new group, drawing a separator above this entry. A string also\n\t * captions the group; `true` rules off without a heading, for the common\n\t * case of holding one entry apart (a sign-out, a delete) with no label to\n\t * write.\n\t */\n\tgroup?: string | true;\n\t/** Overrides the button size when the action renders as a button. */\n\tbuttonSize?: ButtonSize;\n\t/** Escape hatch merged onto the entry root. */\n\tclassName?: string;\n\t/** Escape hatch merged onto the entry's inner content. */\n\tcontentClassName?: string;\n\t/** Overrides the menu's `closeOnSelect` for this entry. */\n\tcloseOnSelect?: boolean;\n\t/** Replaces the rendered entry, e.g. to emit a framework `<Link>`. */\n\trender?: ReactNode;\n}\n\nexport interface ActionMenuProps {\n\t/**\n\t * Commands to offer. Destructive entries are moved last unless\n\t * `preserveOrder` is set.\n\t */\n\tactions: readonly ActionMenuAction[];\n\t/** Trigger text. Omit for an icon-only trigger, and set `srText` instead. */\n\tlabel?: string;\n\t/** Trigger glyph. Defaults to the horizontal ellipsis. */\n\ticon?: ActionMenuIcon;\n\t/** Accessible name when the trigger shows no visible `label`. */\n\tsrText?: string;\n\t/** Escape hatch forwarded to the trigger button. */\n\tbuttonProps?: ActionMenuButtonProps;\n\t/** Menu alignment against the trigger. Defaults to `end`. */\n\talign?: 'center' | 'start' | 'end';\n\t/** Which edge of the trigger the menu opens from. Defaults to `bottom`. */\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\t/** Merged onto the menu surface. */\n\tcontentClassName?: string;\n\t/** Fixed menu width. Defaults to sizing from the widest item. */\n\twidth?: string;\n\t/** Closes the menu after an action runs. Defaults to `true`. */\n\tcloseOnSelect?: boolean;\n\t/** Vertical row rhythm; table preserves the legacy tight action spacing. Inline room stays stable. */\n\tdensity?: ActionMenuDensity;\n\t/** Whether the trigger's `label` is visible, hidden, or responsive. */\n\tlabelVisibility?: ActionMenuLabelVisibility;\n\t/** Preserve incoming action order instead of moving destructive items last. */\n\tpreserveOrder?: boolean;\n\t/**\n\t * Renders actions carrying an `href` through the consumer's router, keeping\n\t * this component framework-agnostic. Without it, such actions render as\n\t * plain anchors.\n\t */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n\t/**\n\t * Replaces the default trigger button entirely, so a menu can hang off a\n\t * shape that is not a button with a glyph — an account block, a sidebar\n\t * row, a tab that has to match its siblings.\n\t *\n\t * Takes Base UI's `render` contract: either an element, whose props are\n\t * merged for you, or a function receiving the props to spread. Either way\n\t * the ARIA wiring, the open/close handlers and the popup's anchor ref reach\n\t * a real DOM node without anyone cloning anything.\n\t *\n\t * For a plain button that just needs different words or a different glyph,\n\t * `label`, `icon` and `buttonProps` are the smaller tools; reach for this\n\t * only when the trigger is a different thing.\n\t */\n\trenderTrigger?: React.ComponentProps<typeof DropdownMenuTrigger>['render'];\n\t/** Overrides the menu's own copy (the default trigger label). */\n\tstrings?: StringsProp<ActionMenuStrings>;\n}\n\nexport interface ActionButtonsProps {\n\t/** Commands to render side by side rather than collapsed into a menu. */\n\tactions: readonly ActionMenuAction[];\n\t/** Merged onto the button group. */\n\tclassName?: string;\n\t/** Merged onto every button in the group. */\n\tbuttonClassName?: string;\n\t/** Height preset applied to each button. */\n\tsize?: ButtonSize;\n\t/** Renders actions carrying an `href` through the consumer's router. */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}\n\nfunction isDestructiveAction(action: ActionMenuAction) {\n\treturn action.tone === 'destructive';\n}\n\nfunction resolveActions(actions: readonly ActionMenuAction[], preserveOrder = false) {\n\tconst visible = actions.filter((action) => action.visible !== false);\n\tif (preserveOrder) return visible;\n\n\tconst standard = visible.filter((action) => !isDestructiveAction(action));\n\tconst destructive = visible.filter(isDestructiveAction);\n\treturn [...standard, ...destructive];\n}\n\nfunction getActionKey(action: ActionMenuAction, index: number) {\n\treturn action.id ?? (typeof action.label === 'string' ? action.label : `action-${index}`);\n}\n\nfunction renderActionIcon(icon: ActionMenuAction['icon']) {\n\tif (!icon) return null;\n\tif (isValidElement(icon)) return icon;\n\tif (typeof icon === 'function') {\n\t\tconst Icon = icon as LucideIcon;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden=\"true\" />;\n\t}\n\tif (typeof icon === 'object' && icon !== null && '$$typeof' in icon) {\n\t\tconst Icon = icon as unknown as ElementType<{ className?: string; 'aria-hidden'?: boolean }>;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden />;\n\t}\n\treturn icon;\n}\n\nfunction renderActionLabel(label: ReactNode, className?: string) {\n\tif (typeof label === 'string' || typeof label === 'number' || typeof label === 'bigint') {\n\t\treturn <Text tag=\"span\" lineHeight=\"tight\" className={cn('text-inherit', className)}>{label}</Text>;\n\t}\n\treturn className ? <span className={className}>{label}</span> : label;\n}\n\nfunction toMenuVariant(tone: ActionMenuAction['tone']): 'default' | 'destructive' {\n\treturn tone === 'destructive' ? 'destructive' : 'default';\n}\n\nfunction toButtonPresentation(action: Pick<ActionMenuAction, 'tone' | 'buttonStyle'>): {\n\ttone: NonNullable<ActionMenuAction['tone']>;\n\tbuttonStyle: ButtonStyle;\n\tclassName?: string;\n} {\n\tconst tone = action.tone ?? 'primary';\n\tconst buttonStyle: ActionButtonStyle = action.buttonStyle ?? 'solid';\n\tif (buttonStyle === 'link') {\n\t\treturn {\n\t\t\ttone,\n\t\t\tbuttonStyle: 'ghost',\n\t\t\tclassName: 'underline underline-offset-4',\n\t\t};\n\t}\n\treturn { tone, buttonStyle };\n}\n\nfunction renderMenuAction({\n\taction,\n\tindex,\n\tdensity,\n\tcloseOnSelect,\n\trenderLink,\n}: {\n\taction: ActionMenuAction;\n\tindex: number;\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst key = getActionKey(action, index);\n\tconst shouldCloseOnSelect = action.closeOnSelect ?? closeOnSelect;\n\tif (action.render) {\n\t\treturn <div key={key} className=\"action-menu--item\">{action.render}</div>;\n\t}\n\n\tconst icon = renderActionIcon(action.icon);\n\tconst content = (\n\t\t<CollectionContent label={action.label} leading={icon} wrap\n\t\t className={cn('action-menu--item-content w-full',action.contentClassName)}\n\t\t leadingClassName=\"action-menu--item-icon text-inherit\" labelClassName=\"action-menu--item-label\"/>\n\t);\n\tconst className = cn(\n\t\t'action-menu--item',\n\t\tdensity === 'table' && collectionRecipes.tableRow,\n\t\taction.className,\n\t);\n\tif (action.type === 'checkbox') {\n\t\treturn (\n\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\tkey={key}\n\t\t\t\tchecked={!!action.checked}\n\t\t\t\tdisabled={action.disabled}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonCheckedChange={action.onCheckedChange}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuCheckboxItem>\n\t\t);\n\t}\n\n\tif (action.href && !action.disabled) {\n\t\tconst href = action.href;\n\t\treturn (\n\t\t\t<DropdownMenuLinkItem\n\t\t\t\tkey={key}\n\t\t\t\thref={href}\n\t\t\t\tvariant={toMenuVariant(action.tone)}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonClick={action.onClick}\n\t\t\t\t// Element form, not a function, when the consumer supplies a link\n\t\t\t\t// renderer. The function form hands the menu-item props to the\n\t\t\t\t// consumer and trusts them to spread — and the renderer people\n\t\t\t\t// actually write destructures href/children/className and drops the\n\t\t\t\t// rest, which silently costs the row its `role=\"menuitem\"`. Handing\n\t\t\t\t// back an element lets the menu merge its own props on afterwards,\n\t\t\t\t// so a narrow renderer stays accessible.\n\t\t\t\trender={\n\t\t\t\t\trenderLink\n\t\t\t\t\t\t? (renderLink({\n\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\tchildren: content,\n\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t}) as ReactElement)\n\t\t\t\t\t\t: (props) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\thref={href}\n\t\t\t\t\t\t\t\ttarget={action.target}\n\t\t\t\t\t\t\t\trel={action.rel}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuLinkItem>\n\t\t);\n\t}\n\n\treturn (\n\t\t<DropdownMenuItem\n\t\tkey={key}\n\t\tdisabled={action.disabled}\n\t\tvariant={toMenuVariant(action.tone)}\n\t\tcloseOnClick={shouldCloseOnSelect}\n\t\tonClick={action.onClick}\n\t\tclassName={className}\n\t\t>\n\t\t\t{content}\n\t\t</DropdownMenuItem>\n\t);\n}\n\nfunction renderGroupedActions(args: {\n\tactions: readonly ActionMenuAction[];\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst nodes: ReactNode[] = [];\n\tlet currentGroup: string | true | null = null;\n\n\targs.actions.forEach((action, index) => {\n\t\tconst nextGroup = action.group ?? null;\n\t\tconst groupChanged = nextGroup !== currentGroup;\n\n\t\tif (nodes.length > 0 && groupChanged) {\n\t\t\tnodes.push(<DropdownMenuSeparator key={`sep-${currentGroup ?? 'root'}-${nextGroup ?? 'root'}-${index}`} />);\n\t\t}\n\n\t\tif (groupChanged) {\n\t\t\tcurrentGroup = nextGroup;\n\t\t\tif (typeof nextGroup === 'string') {\n\t\t\t\tnodes.push(\n\t\t\t\t\t<DropdownMenuLabel\n\t\t\t\t\t\tkey={`group-${nextGroup}-${index}`}\n\t\t\t\t\t\tclassName=\"normal-case\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<DisplayLabel tag=\"span\">{nextGroup}</DisplayLabel>\n\t\t\t\t\t</DropdownMenuLabel>,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tnodes.push(renderMenuAction({ ...args, action, index }));\n\t});\n\n\treturn nodes;\n}\n\n/**\n * Writes a node into a ref of either shape. `ActionMenu` has two claims on its\n * trigger — Base UI's own anchor ref and the consumer's — so neither may\n * overwrite the other.\n */\nfunction assignRef<T>(ref: React.Ref<T> | undefined, node: T | null) {\n\tif (typeof ref === 'function') {\n\t\tref(node);\n\t} else if (ref) {\n\t\t(ref as React.RefObject<T | null>).current = node;\n\t}\n}\n\nexport const ActionMenu = React.forwardRef<HTMLButtonElement, ActionMenuProps>(function ActionMenu({\n\tactions,\n\tlabel,\n\ticon = MoreVertical,\n\tsrText,\n\tbuttonProps,\n\talign = 'end',\n\tside = 'bottom',\n\tcontentClassName = '',\n\twidth = 'w-auto',\n\tcloseOnSelect = true,\n\tdensity = 'default',\n\tlabelVisibility = 'visible',\n\tpreserveOrder = false,\n\trenderLink,\n\trenderTrigger,\n\tstrings: stringsProp,\n}: ActionMenuProps, ref) {\n\tconst [open, setOpen] = React.useState(false);\n\tconst strings = useStrings(defaultActionMenuStrings, stringsProp);\n\tconst resolvedSrText = srText ?? strings.openMenuLabel;\n\tconst resolvedActions = React.useMemo(\n\t\t() => resolveActions(actions, preserveOrder),\n\t\t[actions, preserveOrder],\n\t);\n\n\tif (resolvedActions.length === 0) return null;\n\tconst hasVisibleLabel = Boolean(label) && labelVisibility === 'visible';\n\tconst hasResponsiveLabel = Boolean(label) && labelVisibility === 'responsive';\n\n\tconst defaultButtonProps: ActionMenuButtonProps = {\n\t\ttone: 'secondary',\n\t\tbuttonStyle: 'ghost',\n\t\tsize: hasVisibleLabel ? 'sm' : 'md',\n\t\ticonOnly: !hasVisibleLabel,\n\t\tclassName: hasVisibleLabel\n\t\t\t? undefined\n\t\t\t: hasResponsiveLabel\n\t\t\t\t? 'size-action p-0 sm:w-auto sm:gap-space-sm sm:px-control-sm'\n\t\t\t\t: 'size-action p-0',\n\t};\n\n\tconst mergedButtonProps = {\n\t\t...defaultButtonProps,\n\t\t...buttonProps,\n\t\tclassName: cn(defaultButtonProps.className, buttonProps?.className),\n\t};\n\n\tconst {\n\t\ttone = 'secondary',\n\t\tbuttonStyle = 'ghost',\n\t\tsize = 'md',\n\t\ticonOnly = !hasVisibleLabel,\n\t\tclassName: triggerClassName,\n\t\t...triggerProps\n\t} = mergedButtonProps;\n\n\tconst labelClassName =\n\t\tlabelVisibility === 'hidden'\n\t\t\t? 'sr-only'\n\t\t\t: labelVisibility === 'responsive'\n\t\t\t\t? 'sr-only sm:not-sr-only'\n\t\t\t\t: undefined;\n\n\tconst triggerIcon = renderActionIcon(icon);\n\n\tconst buttonContent = label ? (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('whitespace-nowrap text-inherit', labelClassName)}>\n\t\t\t\t{label}\n\t\t\t</Text>\n\t\t</>\n\t) : (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"sr-only\">{resolvedSrText}</Text>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<DropdownMenu open={open} onOpenChange={setOpen}>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\trender={renderTrigger ?? ((dropdownTriggerProps) => {\n\t\t\t\t\t// Base UI supplies its own trigger ref through `render`. Composing\n\t\t\t\t\t// rather than overwriting keeps the popup anchored while still\n\t\t\t\t\t// handing the consumer the trigger element.\n\t\t\t\t\tconst { ref: baseTriggerRef } = dropdownTriggerProps as {\n\t\t\t\t\t\tref?: React.Ref<HTMLButtonElement>;\n\t\t\t\t\t};\n\n\t\t\t\t\tconst composedRef = (node: HTMLButtonElement | null) => {\n\t\t\t\t\t\tassignRef(baseTriggerRef, node);\n\t\t\t\t\t\tassignRef(ref, node);\n\t\t\t\t\t};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t{...triggerProps}\n\t\t\t\t\t\t\t{...dropdownTriggerProps}\n\t\t\t\t\t\t\tref={composedRef}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={tone}\n\t\t\t\t\t\t\tbuttonStyle={buttonStyle}\n\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\ticonOnly={iconOnly}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'action-menu--component',\n\t\t\t\t\t\t\t\ttriggerClassName,\n\t\t\t\t\t\t\t\t(dropdownTriggerProps as { className?: string }).className,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{buttonContent}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t/>\n\t\t\t<DropdownMenuContent\n\t\t\t\tdensity={density === 'table' ? 'compact' : density}\n\t\t\t\talign={align}\n\t\t\t\tside={side}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-menu--content',\n\t\t\t\t\twidth,\n\t\t\t\t\t'min-w-36',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<DropdownMenuGroup className=\"action-menu--group\">\n\t\t\t\t\t{renderGroupedActions({\n\t\t\t\t\t\tactions: resolvedActions,\n\t\t\t\t\t\tdensity,\n\t\t\t\t\t\tcloseOnSelect,\n\t\t\t\t\t\trenderLink,\n\t\t\t\t\t})}\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n});\n\nActionMenu.displayName = 'ActionMenu';\n\nexport const ActionButtons = React.forwardRef<HTMLDivElement, ActionButtonsProps>(function ActionButtons({\n\tactions,\n\tclassName,\n\tbuttonClassName,\n\tsize = 'sm',\n\trenderLink,\n}: ActionButtonsProps, ref) {\n\tconst visibleActions = resolveActions(actions, true);\n\tif (visibleActions.length === 0) return null;\n\n\treturn (\n\t\t<div ref={ref} className={cn('action-buttons--component flex flex-wrap items-center gap-space-sm', className)}>\n\t\t\t{visibleActions.map((action, index) => {\n\t\t\t\tconst key = getActionKey(action, index);\n\t\t\t\tif (action.render) {\n\t\t\t\t\treturn <React.Fragment key={key}>{action.render}</React.Fragment>;\n\t\t\t\t}\n\n\t\t\t\tconst icon = renderActionIcon(action.icon);\n\t\t\t\tconst resolved = toButtonPresentation(action);\n\t\t\t\tconst children = (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{!!icon && <span className=\"action-buttons--icon inline-flex shrink-0 items-center\">{icon}</span>}\n\t\t\t\t\t\t{renderActionLabel(action.label, 'action-buttons--label')}\n\t\t\t\t\t</>\n\t\t\t\t);\n\n\t\t\t\tif (action.href && !action.disabled && renderLink) {\n\t\t\t\t\tconst href = action.href;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\t\tnativeButton={false}\n\t\t\t\t\t\t\tclassName={cn('action-buttons--item leading-tight', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\trender={(buttonRenderProps) =>\n\t\t\t\t\t\t\t\trenderLink({\n\t\t\t\t\t\t\t\t\t...buttonRenderProps,\n\t\t\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\t\t\tchildren: buttonRenderProps.children,\n\t\t\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (action.href && !action.disabled) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button key={key} href={action.href} target={action.target} rel={action.rel} tone={resolved.tone} buttonStyle={resolved.buttonStyle} size={action.buttonSize ?? size} className={cn('action-buttons--item leading-tight', resolved.className, buttonClassName, action.className)} onClick={action.onClick}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst button = (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\tclassName={cn('action-buttons--item leading-tight', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\tdisabled={!!action.disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\n\t\t\t\treturn button;\n\t\t\t})}\n\t\t</div>\n\t);\n});\n\nActionButtons.displayName = 'ActionButtons';\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,cAAc;KACd,WAAWtD,EAAG,sCAAsCoD,EAAS,WAAWG,GAAiBrE,EAAO,SAAS;KACzG,eAAe;MACd,EAAO,UAAU;KAClB;KACA,SAAS,MACR2B,EAAW;MACV,GAAG2C;MACH;MACA,UAAUA,EAAkB;MAC5B,QAAQtE,EAAO;MACf,KAAKA,EAAO;MACZ,UAAUA,EAAO;MACjB,UAAUA,EAAO;KAClB,CAAC;KAGD;IACM,GAvBFqB,CAuBE;GAEV;GA2BA,OAzBIrB,EAAO,QAAQ,CAACA,EAAO,WAEzB,kBAAC6D,GAAD;IAAkB,MAAM7D,EAAO;IAAM,QAAQA,EAAO;IAAQ,KAAKA,EAAO;IAAK,MAAMkE,EAAS;IAAM,aAAaA,EAAS;IAAa,MAAMlE,EAAO,cAAcoE;IAAM,WAAWtD,EAAG,sCAAsCoD,EAAS,WAAWG,GAAiBrE,EAAO,SAAS;IAAG,SAASA,EAAO;IAChS;GACM,GAFKqB,CAEL,IAKTvC,kBAAC+E,GAAD;IAEC,MAAK;IACL,MAAMK,EAAS;IACf,aAAaA,EAAS;IACtB,MAAMlE,EAAO,cAAcoE;IAC3B,WAAWtD,EAAG,sCAAsCoD,EAAS,WAAWG,GAAiBrE,EAAO,SAAS;IACzG,UAAU,CAAC,CAACA,EAAO;IACnB,eAAe;KACd,EAAO,UAAU;IAClB;IAEC;GACM,GAZFqB,CAeA;EACR,CAAC;CACG,CAAA;AAEP,CAAC;AAED,EAAc,cAAc"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//#region src/lib/affordance-geometry.generated.ts
|
|
2
|
-
var e = {
|
|
3
|
-
inlineEditColumns: {
|
|
4
|
-
single: "grid-cols-[minmax(0,1fr)_calc(var(--height-action)*0.8888889*var(--density-scale)*2+0.25rem*var(--space-scale))]",
|
|
5
|
-
multiline: "grid-cols-[minmax(0,1fr)_calc(var(--height-action)*0.8888889*var(--density-scale))]"
|
|
6
|
-
},
|
|
7
|
-
avatarOverlap: {
|
|
8
|
-
sm: "has-data-[scale=sm]:-space-x-[calc(var(--avatar)*0.75*var(--space-scale)/4)]",
|
|
9
|
-
md: "-space-x-[calc(var(--avatar)*var(--space-scale)/4)]",
|
|
10
|
-
lg: "has-data-[scale=lg]:-space-x-[calc(var(--avatar)*1.25*var(--space-scale)/4)]"
|
|
11
|
-
},
|
|
12
|
-
navigationGuideStart: "ms-[calc(var(--control-x)*0.8333333*var(--space-scale)+var(--icon)*0.75*var(--space-scale)/2)]",
|
|
13
|
-
clearEnd: {
|
|
14
|
-
sm: "end-[calc(var(--control-x)*0.8333333*var(--space-scale))]",
|
|
15
|
-
md: "end-[calc(var(--control-x)*var(--space-scale))]",
|
|
16
|
-
lg: "end-[calc(var(--control-x)*var(--space-scale))]"
|
|
17
|
-
},
|
|
18
|
-
clearPadding: {
|
|
19
|
-
sm: "pe-[calc(var(--control-x)*0.8333333*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]",
|
|
20
|
-
md: "pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]",
|
|
21
|
-
lg: "pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]"
|
|
22
|
-
},
|
|
23
|
-
togglePadding: "pe-[calc(1.375rem*var(--density-scale)+0.625rem*var(--space-scale))]",
|
|
24
|
-
largeIconStart: "ps-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]",
|
|
25
|
-
largeIconEnd: "pe-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]",
|
|
26
|
-
overlayClose: "absolute top-[calc(var(--surface-y)*var(--space-scale))] end-[calc(var(--surface-x)*var(--space-scale))]",
|
|
27
|
-
overlayHeader: "[[data-slot$=-content]:has(>[data-overlay-close])>&]:pe-[calc(var(--surface-x)*var(--space-scale)+var(--height-action)*0.8888889*var(--density-scale)+0.5rem*var(--space-scale))]"
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
export { e as t };
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=affordance-geometry.generated-D8Jcfb0G.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"affordance-geometry.generated-D8Jcfb0G.js","names":["affordanceGeometry","\"inlineEditColumns\"","\"single\"","\"multiline\"","\"avatarOverlap\"","\"sm\"","\"md\"","\"lg\"","\"navigationGuideStart\"","\"clearEnd\"","\"clearPadding\"","\"togglePadding\"","\"largeIconStart\"","\"largeIconEnd\"","\"overlayClose\"","\"overlayHeader\""],"sources":["../src/lib/affordance-geometry.generated.ts"],"sourcesContent":["/* Generated by scripts/primitive-geometry.mjs; recipes, not theme roots. */\nexport const affordanceGeometry = {\n \"inlineEditColumns\": {\n \"single\": \"grid-cols-[minmax(0,1fr)_calc(var(--height-action)*0.8888889*var(--density-scale)*2+0.25rem*var(--space-scale))]\",\n \"multiline\": \"grid-cols-[minmax(0,1fr)_calc(var(--height-action)*0.8888889*var(--density-scale))]\"\n },\n \"avatarOverlap\": {\n \"sm\": \"has-data-[scale=sm]:-space-x-[calc(var(--avatar)*0.75*var(--space-scale)/4)]\",\n \"md\": \"-space-x-[calc(var(--avatar)*var(--space-scale)/4)]\",\n \"lg\": \"has-data-[scale=lg]:-space-x-[calc(var(--avatar)*1.25*var(--space-scale)/4)]\"\n },\n \"navigationGuideStart\": \"ms-[calc(var(--control-x)*0.8333333*var(--space-scale)+var(--icon)*0.75*var(--space-scale)/2)]\",\n \"clearEnd\": {\n \"sm\": \"end-[calc(var(--control-x)*0.8333333*var(--space-scale))]\",\n \"md\": \"end-[calc(var(--control-x)*var(--space-scale))]\",\n \"lg\": \"end-[calc(var(--control-x)*var(--space-scale))]\"\n },\n \"clearPadding\": {\n \"sm\": \"pe-[calc(var(--control-x)*0.8333333*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]\",\n \"md\": \"pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]\",\n \"lg\": \"pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]\"\n },\n \"togglePadding\": \"pe-[calc(1.375rem*var(--density-scale)+0.625rem*var(--space-scale))]\",\n \"largeIconStart\": \"ps-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]\",\n \"largeIconEnd\": \"pe-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]\",\n \"overlayClose\": \"absolute top-[calc(var(--surface-y)*var(--space-scale))] end-[calc(var(--surface-x)*var(--space-scale))]\",\n \"overlayHeader\": \"[[data-slot$=-content]:has(>[data-overlay-close])>&]:pe-[calc(var(--surface-x)*var(--space-scale)+var(--height-action)*0.8888889*var(--density-scale)+0.5rem*var(--space-scale))]\"\n} as const;\n"],"mappings":";AACA,IAAaA,IAAqB;CAChCC,mBAAqB;EACnBC,QAAU;EACVC,WAAa;CACf;CACAC,eAAiB;EACfC,IAAM;EACNC,IAAM;EACNC,IAAM;CACR;CACAC,sBAAwB;CACxBC,UAAY;EACVJ,IAAM;EACNC,IAAM;EACNC,IAAM;CACR;CACAG,cAAgB;EACdL,IAAM;EACNC,IAAM;EACNC,IAAM;CACR;CACAI,eAAiB;CACjBC,gBAAkB;CAClBC,cAAgB;CAChBC,cAAgB;CAChBC,eAAiB;AACnB"}
|