themelia-react-ui 2.0.5 → 2.0.6
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 +76 -0
- package/MIGRATION.md +119 -0
- package/README.md +13 -6
- package/dist/{accordion-B9MHG0cT.js → accordion-0tQUZ20r.js} +7 -7
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-Dr8K-ghE.js → action-menu-C0gjzLyE.js} +7 -7
- package/dist/{action-menu-Dr8K-ghE.js.map → action-menu-C0gjzLyE.js.map} +1 -1
- package/dist/{ai-artifact-C58tQcBy.js → ai-artifact-CGGpQryR.js} +172 -157
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/{app-shell-B_IuNWOo.js → app-shell-EHuuRDGy.js} +5 -5
- package/dist/{app-shell-B_IuNWOo.js.map → app-shell-EHuuRDGy.js.map} +1 -1
- package/dist/{attachment-Dg_69lPS.js → attachment-BCpA4e7i.js} +8 -8
- package/dist/{attachment-Dg_69lPS.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-DTkkshS8.js → auth-B0girIk_.js} +15 -15
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-CeZaFmNH.js → avatar-B9Jnp-T-.js} +3 -3
- package/dist/{avatar-CeZaFmNH.js.map → avatar-B9Jnp-T-.js.map} +1 -1
- package/dist/{badge-xIiV_E7f.js → badge-wWauMgAt.js} +3 -3
- package/dist/{badge-xIiV_E7f.js.map → badge-wWauMgAt.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +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 +2 -2
- package/dist/base/display.js +6 -6
- 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 +8 -8
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +195 -188
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +5 -5
- package/dist/base/spinner.js.map +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 +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/{batch-action-bar-Cb8cuvyy.js → batch-action-bar-BoqWIIpV.js} +5 -5
- package/dist/{batch-action-bar-Cb8cuvyy.js.map → batch-action-bar-BoqWIIpV.js.map} +1 -1
- package/dist/blocks/admin.js +17 -17
- package/dist/blocks/ai.js +227 -221
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +424 -449
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +225 -220
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-J-K2kl4c.js → breadcrumbs-Bp9Ke7kd.js} +4 -4
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-S2Cubiiz.js → button-ChBovTx0.js} +2 -2
- package/dist/{button-S2Cubiiz.js.map → button-ChBovTx0.js.map} +1 -1
- package/dist/{buttons-BedGfygC.js → buttons-DeW0bQeK.js} +6 -6
- package/dist/{buttons-BedGfygC.js.map → buttons-DeW0bQeK.js.map} +1 -1
- package/dist/{cards-rNX1M4Xn.js → cards-CNXnmvV5.js} +8 -8
- package/dist/{cards-rNX1M4Xn.js.map → cards-CNXnmvV5.js.map} +1 -1
- package/dist/{cascader-B1MiqkBq.js → cascader-CrAl9zD5.js} +15 -15
- package/dist/{cascader-B1MiqkBq.js.map → cascader-CrAl9zD5.js.map} +1 -1
- package/dist/{chart-Darg_0Kv.js → chart-I7ROnsl8.js} +5 -5
- package/dist/{chart-Darg_0Kv.js.map → chart-I7ROnsl8.js.map} +1 -1
- package/dist/{checkbox-fflqmODR.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-fflqmODR.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-DHGtx0QV.js} +122 -110
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-BzmM9Eig.js → code-block-BSJyq9e-.js} +7 -7
- package/dist/{code-block-BzmM9Eig.js.map → code-block-BSJyq9e-.js.map} +1 -1
- package/dist/{collapsible-BkAI_XD4.js → collapsible-BzJ91LUG.js} +3 -3
- package/dist/{collapsible-BkAI_XD4.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-gDh1v6O4.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-gDh1v6O4.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/{combobox-BEx0vJgF.js → combobox-Bcvu5J8O.js} +11 -10
- package/dist/{combobox-BEx0vJgF.js.map → combobox-Bcvu5J8O.js.map} +1 -1
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-CrlPIL6m.js → command-9e52NPgK.js} +6 -6
- package/dist/{command-CrlPIL6m.js.map → command-9e52NPgK.js.map} +1 -1
- package/dist/{comments-Dmpp0YIc.js → comments-BsgErEqd.js} +33 -28
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/choice-inputs/choice-types.d.ts +4 -0
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- package/dist/components/base/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
- package/dist/components/base/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- package/dist/components/base/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sidebar/sidebar.d.ts +2 -0
- package/dist/components/base/upload/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +2 -2
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +18 -11
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +2 -2
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/types.d.ts +37 -8
- package/dist/components/features/email-composer/types.d.ts +3 -1
- package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +4 -2
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/utils/filter-utils.d.ts +5 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +6 -0
- package/dist/components/features/media-library/media-library.types.d.ts +36 -8
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
- package/dist/components/features/products/products.types.d.ts +2 -2
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +1 -1
- package/dist/components/features/resource/resource.types.d.ts +2 -0
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -0
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +6 -3
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +17 -1
- package/dist/components/layout/header/header.types.d.ts +3 -2
- package/dist/components/layout/layout.types.d.ts +5 -3
- package/dist/components/layout/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- package/dist/components/layout/settings/settings.d.ts +1 -1
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +3 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.types.d.ts +2 -0
- package/dist/components/primitives/link.d.ts +3 -2
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- package/dist/{containers-CIxwbZt5.js → containers-CSdc32h9.js} +2 -2
- package/dist/{containers-CIxwbZt5.js.map → containers-CSdc32h9.js.map} +1 -1
- package/dist/{copyable-DIznBqiT.js → copyable-3fdHfMR3.js} +4 -4
- package/dist/{copyable-DIznBqiT.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-BdgCAw8T.js → data-display-Cmj-xZYl.js} +16 -15
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Cq8ioE4o.js → date-Br0FicVv.js} +4 -4
- package/dist/{date-Cq8ioE4o.js.map → date-Br0FicVv.js.map} +1 -1
- package/dist/date-picker-CyQlFYsP.js +1617 -0
- package/dist/date-picker-CyQlFYsP.js.map +1 -0
- package/dist/date-pickers-tj2MXmXd.js +185 -0
- package/dist/date-pickers-tj2MXmXd.js.map +1 -0
- package/dist/{display-KsZLw9Ov.js → display-CT_N2a3w.js} +7 -7
- package/dist/{display-KsZLw9Ov.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-C08iIugv.js} +6 -6
- package/dist/{dropdown-menu-CLs8Lihj.js.map → dropdown-menu-C08iIugv.js.map} +1 -1
- package/dist/features/activities.js +283 -270
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +40 -27
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +126 -126
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +24 -19
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +129 -125
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +16 -20
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +18 -28
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +331 -314
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1044 -866
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +978 -964
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +159 -152
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +74 -71
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +297 -256
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +57 -50
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +400 -399
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-Dzo1xtAU.js +246 -0
- package/dist/feedback-Dzo1xtAU.js.map +1 -0
- package/dist/{field-affordance-recipes-DWcNcOjh.js → field-affordance-recipes-D6H7tVJi.js} +2 -2
- package/dist/{field-affordance-recipes-DWcNcOjh.js.map → field-affordance-recipes-D6H7tVJi.js.map} +1 -1
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
- package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
- package/dist/{filters-DzgSJpMK.js → filters-Dl80yYtN.js} +763 -605
- package/dist/filters-Dl80yYtN.js.map +1 -0
- package/dist/form-field-CAPdwdnZ.js +74 -0
- package/dist/form-field-CAPdwdnZ.js.map +1 -0
- package/dist/{form-sizing-Bs2qFUeE.js → form-sizing-CgcrUbLU.js} +2 -2
- package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-CgcrUbLU.js.map} +1 -1
- package/dist/{forms-C0RGnJTe.js → forms-B3W8CH7-.js} +8 -8
- package/dist/{forms-C0RGnJTe.js.map → forms-B3W8CH7-.js.map} +1 -1
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-DMMxG__r.js → header-ZIIsRKxP.js} +113 -113
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-DB6CJ4MR.js → hooks-BitHSh-Y.js} +3 -3
- package/dist/{hooks-DB6CJ4MR.js.map → hooks-BitHSh-Y.js.map} +1 -1
- package/dist/{icon-badge-DZF-YjQp.js → icon-badge-npxF1SLX.js} +2 -2
- package/dist/{icon-badge-DZF-YjQp.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{input-CvyDQlY7.js → input-7KAc7XQL.js} +6 -6
- package/dist/{input-CvyDQlY7.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/{input-DMBwAZmr.js → input-DIREVYHs.js} +3 -3
- package/dist/{input-DMBwAZmr.js.map → input-DIREVYHs.js.map} +1 -1
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
- package/dist/{item-DjCcM18E.js → item-FfWnaYST.js} +99 -98
- package/dist/item-FfWnaYST.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 +11 -11
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- package/dist/lib/field-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +2 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +6 -6
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-C-vChPmE.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-C-vChPmE.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-0_4nWuI-.js → mentions-qOnedSt4.js} +236 -167
- package/dist/mentions-qOnedSt4.js.map +1 -0
- package/dist/message-BJHnn43M.js +135 -0
- package/dist/message-BJHnn43M.js.map +1 -0
- package/dist/{metadata-list-C3MkU-Om.js → metadata-list-XkqZ_UXH.js} +11 -11
- package/dist/{metadata-list-C3MkU-Om.js.map → metadata-list-XkqZ_UXH.js.map} +1 -1
- package/dist/{navigation-DaRjthVk.js → navigation-BgtPJAhi.js} +119 -119
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/{navigation-C90-oQFq.js → navigation-Bt-v7rWP.js} +52 -46
- package/dist/navigation-Bt-v7rWP.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/{number-CRU3kGuk.js → number-CYqBcrSj.js} +78 -86
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-BQCA2Zn2.js} +7 -7
- package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-BQCA2Zn2.js.map} +1 -1
- package/dist/{overlays-BSgCtM2v.js → overlays-CC8zI3Du.js} +264 -260
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/{page-DUUKDAjo.js → page-BoQ1VaFJ.js} +13 -13
- package/dist/{page-DUUKDAjo.js.map → page-BoQ1VaFJ.js.map} +1 -1
- package/dist/{page-header-commands-7P3sfE9u.js → page-header-commands-DIKspJfx.js} +4 -4
- package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-DIKspJfx.js.map} +1 -1
- package/dist/{pagination-CgCjElfu.js → pagination-Br8TdV9A.js} +4 -4
- package/dist/{pagination-CgCjElfu.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/{popover-B85RenIl.js → popover-k8TdUcAt.js} +10 -10
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-DJ0AkUan.js} +2 -2
- package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-DJ0AkUan.js.map} +1 -1
- package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-DyUXqUtD.js} +2 -2
- package/dist/{portal-recipes-BpsV_iRw.js.map → portal-recipes-DyUXqUtD.js.map} +1 -1
- package/dist/{primitives-ByWgGUgt.js → primitives-BkkQjYl7.js} +22 -17
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BJhQP9WX.js → progress-DZFXXzPs.js} +4 -4
- package/dist/{progress-BJhQP9WX.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-tOc7B3hw.js → receipt-C7LhOg7Q.js} +6 -6
- package/dist/{receipt-tOc7B3hw.js.map → receipt-C7LhOg7Q.js.map} +1 -1
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/rich-text-editor-CAurDwT5.js +1273 -0
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-laT3tpBT.js → rich-text-editor-toolbar-DbXig7Jk.js} +36 -35
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
- package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
- package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
- package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
- package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
- package/dist/{scroll-area-B0dB2cBi.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-Bb17I4pu.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-Bb17I4pu.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-Ct_WSWTJ.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-Ct_WSWTJ.js.map → separator-DM6gs2vu.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-DZPHgpx4.js +155 -0
- package/dist/settings-DZPHgpx4.js.map +1 -0
- package/dist/{sheet-BGPERY55.js → sheet-C4DHsgLk.js} +6 -6
- package/dist/{sheet-BGPERY55.js.map → sheet-C4DHsgLk.js.map} +1 -1
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/{sidebar-f9gRWXIR.js → sidebar-CmD6a-HK.js} +16 -13
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/{skeleton-BapcJd9C.js → skeleton-DDgdhmu9.js} +5 -5
- package/dist/{skeleton-BapcJd9C.js.map → skeleton-DDgdhmu9.js.map} +1 -1
- package/dist/{smart-card-CW0hjetE.js → smart-card-B6vLxqa_.js} +8 -8
- package/dist/{smart-card-CW0hjetE.js.map → smart-card-B6vLxqa_.js.map} +1 -1
- package/dist/{structure-DuxKl954.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-DuxKl954.js.map → structure-DZJ2wbAU.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
- package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
- package/dist/{table-CFOWY9pQ.js → table-CBonSdTp.js} +534 -486
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-B4TE7iOV.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/{tabs-e7ko9S2o.js → tabs-C4Kr_hCr.js} +50 -49
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-B1culiSK.js → text-inputs-jdkS3ReG.js} +9 -9
- package/dist/{text-inputs-B1culiSK.js.map → text-inputs-jdkS3ReG.js.map} +1 -1
- package/dist/{timelines-D3Sl9ueq.js → timelines-CoPwdJP0.js} +10 -10
- package/dist/{timelines-D3Sl9ueq.js.map → timelines-CoPwdJP0.js.map} +1 -1
- package/dist/{tooltip-8wz5S_Zr.js → tooltip-31NwIpTo.js} +4 -4
- package/dist/{tooltip-8wz5S_Zr.js.map → tooltip-31NwIpTo.js.map} +1 -1
- package/dist/{tree-CzUJHnFs.js → tree-CeYVzdFE.js} +6 -6
- package/dist/{tree-CzUJHnFs.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-BQnine1k.js → typography-C7-YMW1S.js} +2 -2
- package/dist/{typography-BQnine1k.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/{upload-BOW6U2tI.js → upload-Hdm5gObf.js} +303 -291
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-qUXn1ykN.js → upload-queue-D0sYPuqo.js} +8 -8
- package/dist/{upload-queue-qUXn1ykN.js.map → upload-queue-D0sYPuqo.js.map} +1 -1
- package/dist/{usage-card-BeSLY0i0.js → usage-card-9s8hLDfn.js} +9 -9
- package/dist/{usage-card-BeSLY0i0.js.map → usage-card-9s8hLDfn.js.map} +1 -1
- package/dist/{utils-B6kKb8jB.js → utils-DhuoqFy4.js} +31 -37
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/{value-inputs-skdVB2zh.js → value-inputs-D3aPgq9H.js} +15 -15
- package/dist/{value-inputs-skdVB2zh.js.map → value-inputs-D3aPgq9H.js.map} +1 -1
- package/dist/{value-typography-uAmWUAL1.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-DHeHv0qw.js → workspace-CC8Vchiu.js} +12 -12
- package/dist/{workspace-DHeHv0qw.js.map → workspace-CC8Vchiu.js.map} +1 -1
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/references/agents-md.md +19 -19
- package/docs/consumer-skill/references/analytics.md +15 -0
- package/docs/consumer-skill/references/component-contracts.json +14724 -13057
- package/docs/consumer-skill/references/composition.md +21 -4
- package/docs/consumer-skill/references/design-contract.md +1 -0
- package/docs/consumer-skill/references/installation.md +51 -8
- package/docs/consumer-skill/references/integration.md +24 -1
- package/docs/consumer-skill/references/public-api.json +172 -34
- package/docs/consumer-skill/references/review.md +51 -11
- package/docs/consumer-skill/references/rhf-workflows.md +72 -0
- package/docs/consumer-skill/references/theming.md +7 -2
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +144 -30
- package/docs/consumer-skill/scripts/setup-skills.mjs +46 -9
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-B9MHG0cT.js.map +0 -1
- package/dist/ai-artifact-C58tQcBy.js.map +0 -1
- package/dist/auth-DTkkshS8.js.map +0 -1
- package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
- package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
- package/dist/combobox-BwzoXFSG.js +0 -884
- package/dist/combobox-BwzoXFSG.js.map +0 -1
- package/dist/comments-Dmpp0YIc.js.map +0 -1
- package/dist/data-display-BdgCAw8T.js.map +0 -1
- package/dist/date-picker-RlIzKom_.js +0 -1551
- package/dist/date-picker-RlIzKom_.js.map +0 -1
- package/dist/date-pickers-DY-CpXS1.js +0 -179
- package/dist/date-pickers-DY-CpXS1.js.map +0 -1
- package/dist/feedback-Dm4izqFn.js +0 -240
- package/dist/feedback-Dm4izqFn.js.map +0 -1
- package/dist/filters-DzgSJpMK.js.map +0 -1
- package/dist/form-field-BriWAXyg.js +0 -63
- package/dist/form-field-BriWAXyg.js.map +0 -1
- package/dist/forms-numeric-DIhghX1Q.js +0 -910
- package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
- package/dist/header-DMMxG__r.js.map +0 -1
- package/dist/item-DjCcM18E.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-0_4nWuI-.js.map +0 -1
- package/dist/message-g8p7eVtN.js +0 -128
- package/dist/message-g8p7eVtN.js.map +0 -1
- package/dist/navigation-C90-oQFq.js.map +0 -1
- package/dist/navigation-DaRjthVk.js.map +0 -1
- package/dist/number-CRU3kGuk.js.map +0 -1
- package/dist/overlays-BSgCtM2v.js.map +0 -1
- package/dist/popover-B85RenIl.js.map +0 -1
- package/dist/primitives-ByWgGUgt.js.map +0 -1
- package/dist/rich-text-Dth5E882.js +0 -78
- package/dist/rich-text-Dth5E882.js.map +0 -1
- package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
- package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +0 -1
- package/dist/safe-image-src-C6kQSMBZ.js +0 -17
- package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/settings-Bar5wiSo.js +0 -167
- package/dist/settings-Bar5wiSo.js.map +0 -1
- package/dist/sidebar-D-JYMMbY.js +0 -686
- package/dist/sidebar-D-JYMMbY.js.map +0 -1
- package/dist/sidebar-f9gRWXIR.js.map +0 -1
- package/dist/table-B4TE7iOV.js.map +0 -1
- package/dist/table-CFOWY9pQ.js.map +0 -1
- package/dist/tabs-e7ko9S2o.js.map +0 -1
- package/dist/upload-BOW6U2tI.js.map +0 -1
- package/dist/utils-B6kKb8jB.js.map +0 -1
- package/dist/value-typography-uAmWUAL1.js.map +0 -1
package/dist/base/repeaters.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { d as e } from "../ui-provider-C-74NVLc.js";
|
|
3
3
|
import { useStrings as t } from "../lib/strings.js";
|
|
4
|
-
import { t as n } from "../utils-
|
|
4
|
+
import { t as n } from "../utils-DhuoqFy4.js";
|
|
5
5
|
import { t as r } from "../affordance-geometry.generated-P-aVJisu.js";
|
|
6
|
-
import { n as i } from "../buttons-
|
|
7
|
-
import { a, c as o } from "../typography-
|
|
8
|
-
import { t as s } from "../structure-
|
|
9
|
-
import { t as c } from "../interaction-recipes-
|
|
10
|
-
import { t as l } from "../input-
|
|
11
|
-
import { t as u } from "../form-field-
|
|
12
|
-
import { d } from "../text-inputs-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
6
|
+
import { n as i } from "../buttons-DeW0bQeK.js";
|
|
7
|
+
import { a, c as o } from "../typography-C7-YMW1S.js";
|
|
8
|
+
import { t as s } from "../structure-DZJ2wbAU.js";
|
|
9
|
+
import { t as c } from "../interaction-recipes-4wZ2tvfb.js";
|
|
10
|
+
import { t as l } from "../input-7KAc7XQL.js";
|
|
11
|
+
import { t as u } from "../form-field-CAPdwdnZ.js";
|
|
12
|
+
import { d } from "../text-inputs-jdkS3ReG.js";
|
|
13
|
+
import { n as f } from "../field-control-attributes-B6i335wr.js";
|
|
14
|
+
import { forwardRef as p, memo as m, useCallback as h, useId as g, useMemo as _, useReducer as v, useRef as y, useState as b } from "react";
|
|
15
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
16
|
+
import { GripVertical as C, Plus as w, Trash2 as T, X as E } from "lucide-react";
|
|
17
|
+
import { useController as D, useFieldArray as O, useFormContext as k } from "react-hook-form";
|
|
18
|
+
import { DndContext as A, KeyboardSensor as j, PointerSensor as M, closestCenter as N, useSensor as P, useSensors as F } from "@dnd-kit/core";
|
|
19
|
+
import { SortableContext as I, sortableKeyboardCoordinates as L, useSortable as R, verticalListSortingStrategy as z } from "@dnd-kit/sortable";
|
|
20
|
+
import { CSS as B } from "@dnd-kit/utilities";
|
|
20
21
|
//#region src/components/base/repeaters/repeaters.strings.ts
|
|
21
|
-
var
|
|
22
|
+
var V = {
|
|
22
23
|
emptyState: "No items added yet.",
|
|
23
24
|
addItem: "Add item",
|
|
24
25
|
removeAriaLabel: "Remove item"
|
|
25
|
-
},
|
|
26
|
-
emptyState:
|
|
27
|
-
addButton:
|
|
28
|
-
removeAriaLabel:
|
|
26
|
+
}, H = {
|
|
27
|
+
emptyState: V.emptyState,
|
|
28
|
+
addButton: V.addItem,
|
|
29
|
+
removeAriaLabel: V.removeAriaLabel,
|
|
29
30
|
dragHandleAriaLabel: "Drag to reorder"
|
|
30
31
|
};
|
|
31
|
-
function
|
|
32
|
-
let m =
|
|
32
|
+
function ee({ item: e, index: t, sortable: r, rowVariant: a, removeVariant: o, hideRemove: s, disabled: l, strings: u, actionSize: d, onRemove: f, renderRow: p }) {
|
|
33
|
+
let m = R({
|
|
33
34
|
id: e.id,
|
|
34
35
|
disabled: l || !r
|
|
35
36
|
}), h = r ? m.isDragging : !1, g = r ? {
|
|
36
|
-
transform:
|
|
37
|
+
transform: B.Transform.toString(m.transform),
|
|
37
38
|
transition: m.transition,
|
|
38
39
|
opacity: h ? .6 : 1
|
|
39
|
-
} : void 0, _ = r ? m.setNodeRef : void 0, v = r ? m.attributes : {}, y = r ? m.listeners : void 0,
|
|
40
|
+
} : void 0, _ = r ? m.setNodeRef : void 0, v = r ? m.attributes : {}, y = r ? m.listeners : void 0, b = r ? /* @__PURE__ */ x(i, {
|
|
40
41
|
type: "button",
|
|
41
42
|
tone: "secondary",
|
|
42
43
|
buttonStyle: "ghost",
|
|
@@ -47,11 +48,11 @@ function re({ item: e, index: t, sortable: r, rowVariant: a, removeVariant: o, h
|
|
|
47
48
|
className: n("repeater--drag-handle", "shrink-0", `text-muted-foreground ${c.rowHover}`, "cursor-grab active:cursor-grabbing"),
|
|
48
49
|
...v,
|
|
49
50
|
...y,
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ x(C, {
|
|
51
52
|
className: "size-icon",
|
|
52
53
|
"aria-hidden": "true"
|
|
53
54
|
})
|
|
54
|
-
}) : null,
|
|
55
|
+
}) : null, w = s ? null : o === "icon-button" ? /* @__PURE__ */ x(i, {
|
|
55
56
|
type: "button",
|
|
56
57
|
tone: "secondary",
|
|
57
58
|
buttonStyle: "outline",
|
|
@@ -61,11 +62,11 @@ function re({ item: e, index: t, sortable: r, rowVariant: a, removeVariant: o, h
|
|
|
61
62
|
disabled: l,
|
|
62
63
|
onClick: () => f(t),
|
|
63
64
|
className: "repeater--remove shrink-0",
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ x(T, {
|
|
65
66
|
className: "size-icon",
|
|
66
67
|
"aria-hidden": "true"
|
|
67
68
|
})
|
|
68
|
-
}) : /* @__PURE__ */
|
|
69
|
+
}) : /* @__PURE__ */ x(i, {
|
|
69
70
|
type: "button",
|
|
70
71
|
tone: "secondary",
|
|
71
72
|
buttonStyle: "ghost",
|
|
@@ -75,113 +76,113 @@ function re({ item: e, index: t, sortable: r, rowVariant: a, removeVariant: o, h
|
|
|
75
76
|
disabled: l,
|
|
76
77
|
onClick: () => f(t),
|
|
77
78
|
className: n("repeater--remove", "shrink-0", "text-muted-foreground hover:text-destructive"),
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ x(E, {
|
|
79
80
|
className: "size-icon",
|
|
80
81
|
"aria-hidden": "true"
|
|
81
82
|
})
|
|
82
83
|
});
|
|
83
|
-
return a === "card" ? /* @__PURE__ */
|
|
84
|
+
return a === "card" ? /* @__PURE__ */ x("div", {
|
|
84
85
|
ref: _,
|
|
85
86
|
style: g,
|
|
86
87
|
"data-repeater-item-id": e.id,
|
|
87
88
|
className: n("repeater--item", "relative rounded-surface border border-border bg-card text-card-foreground p-surface"),
|
|
88
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ S("div", {
|
|
89
90
|
className: "flex items-start gap-space-md",
|
|
90
91
|
children: [
|
|
91
|
-
|
|
92
|
-
/* @__PURE__ */
|
|
92
|
+
b,
|
|
93
|
+
/* @__PURE__ */ x("div", {
|
|
93
94
|
className: "min-w-0 flex-1",
|
|
94
95
|
children: p(e, {
|
|
95
96
|
index: t,
|
|
96
97
|
isDragging: h
|
|
97
98
|
})
|
|
98
99
|
}),
|
|
99
|
-
|
|
100
|
+
w
|
|
100
101
|
]
|
|
101
102
|
})
|
|
102
|
-
}) : /* @__PURE__ */
|
|
103
|
+
}) : /* @__PURE__ */ S("div", {
|
|
103
104
|
ref: _,
|
|
104
105
|
style: g,
|
|
105
106
|
"data-repeater-item-id": e.id,
|
|
106
107
|
className: "repeater--item flex items-start gap-space-md",
|
|
107
108
|
children: [
|
|
108
|
-
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
b,
|
|
110
|
+
/* @__PURE__ */ x("div", {
|
|
110
111
|
className: "min-w-0 flex-1",
|
|
111
112
|
children: p(e, {
|
|
112
113
|
index: t,
|
|
113
114
|
isDragging: h
|
|
114
115
|
})
|
|
115
116
|
}),
|
|
116
|
-
|
|
117
|
+
w
|
|
117
118
|
]
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
-
let
|
|
121
|
+
function U({ items: r, renderRow: a, onAdd: c, onRemove: l, onMove: u, sortable: d = !1, rowVariant: f = "inline", removeVariant: p = "ghost", hideRemove: m = !1, hideAdd: g = !1, disabled: v = !1, strings: y, className: b }) {
|
|
122
|
+
let C = t(H, y), { defaultScale: T } = e(), E = T ?? "md", D = F(P(M, { activationConstraint: { distance: 4 } }), P(j, { coordinateGetter: L })), O = h((e) => {
|
|
122
123
|
let { active: t, over: n } = e;
|
|
123
124
|
if (!n || t.id === n.id) return;
|
|
124
125
|
let i = r.findIndex((e) => e.id === t.id), a = r.findIndex((e) => e.id === n.id);
|
|
125
126
|
i < 0 || a < 0 || u?.(i, a);
|
|
126
|
-
}, [r, u]),
|
|
127
|
+
}, [r, u]), k = _(() => r.map((e) => e.id), [r]), R = /* @__PURE__ */ x(s, {
|
|
127
128
|
gap: "md",
|
|
128
129
|
className: "repeater--list",
|
|
129
|
-
children: r.map((e, t) => /* @__PURE__ */
|
|
130
|
+
children: r.map((e, t) => /* @__PURE__ */ x(ee, {
|
|
130
131
|
item: e,
|
|
131
132
|
index: t,
|
|
132
133
|
sortable: d,
|
|
133
134
|
rowVariant: f,
|
|
134
135
|
removeVariant: p,
|
|
135
|
-
hideRemove:
|
|
136
|
+
hideRemove: m,
|
|
136
137
|
disabled: v,
|
|
137
|
-
strings:
|
|
138
|
+
strings: C,
|
|
138
139
|
actionSize: E,
|
|
139
140
|
onRemove: l,
|
|
140
141
|
renderRow: a
|
|
141
142
|
}, e.id))
|
|
142
143
|
});
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
+
return /* @__PURE__ */ S(s, {
|
|
144
145
|
gap: "lg",
|
|
145
|
-
className: n("repeater--component",
|
|
146
|
-
children: [r.length === 0 ? /* @__PURE__ */
|
|
146
|
+
className: n("repeater--component", b),
|
|
147
|
+
children: [r.length === 0 ? /* @__PURE__ */ x("div", {
|
|
147
148
|
className: "repeater--empty rounded-surface border border-dashed border-border p-surface",
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ x(o, {
|
|
149
150
|
type: "secondary",
|
|
150
|
-
children:
|
|
151
|
+
children: C.emptyState
|
|
151
152
|
})
|
|
152
|
-
}) : d ? /* @__PURE__ */
|
|
153
|
+
}) : d ? /* @__PURE__ */ x(A, {
|
|
153
154
|
sensors: D,
|
|
154
|
-
collisionDetection:
|
|
155
|
+
collisionDetection: N,
|
|
155
156
|
onDragEnd: O,
|
|
156
|
-
children: /* @__PURE__ */
|
|
157
|
-
items:
|
|
158
|
-
strategy:
|
|
159
|
-
children:
|
|
157
|
+
children: /* @__PURE__ */ x(I, {
|
|
158
|
+
items: k,
|
|
159
|
+
strategy: z,
|
|
160
|
+
children: R
|
|
160
161
|
})
|
|
161
|
-
}) :
|
|
162
|
+
}) : R, !g && /* @__PURE__ */ S(i, {
|
|
162
163
|
type: "button",
|
|
163
164
|
tone: "secondary",
|
|
164
165
|
buttonStyle: "outline",
|
|
165
166
|
disabled: v,
|
|
166
167
|
onClick: c,
|
|
167
168
|
className: "repeater--add self-start",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ x(w, { className: "size-icon" }), C.addButton]
|
|
169
170
|
})]
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
|
-
|
|
173
|
+
U.displayName = "Repeater";
|
|
173
174
|
//#endregion
|
|
174
175
|
//#region src/components/base/repeaters/string-repeater.utils.ts
|
|
175
|
-
function
|
|
176
|
+
function W(e, t, n) {
|
|
176
177
|
let r = [...e], [i] = r.splice(t, 1);
|
|
177
178
|
return i === void 0 ? [...e] : (r.splice(n, 0, i), r);
|
|
178
179
|
}
|
|
179
180
|
//#endregion
|
|
180
181
|
//#region src/components/base/repeaters/string-repeater.tsx
|
|
181
|
-
function
|
|
182
|
+
function G(e, t) {
|
|
182
183
|
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
183
184
|
}
|
|
184
|
-
function
|
|
185
|
+
function te(e, t, n, r, i) {
|
|
185
186
|
let a = /* @__PURE__ */ new Map(), o = i;
|
|
186
187
|
return e.forEach((e, n) => {
|
|
187
188
|
let r = a.get(e) ?? [], i = t[n];
|
|
@@ -191,7 +192,7 @@ function ie(e, t, n, r, i) {
|
|
|
191
192
|
nextId: o
|
|
192
193
|
};
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
+
function K(e, t, n, r = 0) {
|
|
195
196
|
let i = t.map((e, t) => `${n}-row-${r + t}`);
|
|
196
197
|
return {
|
|
197
198
|
name: e,
|
|
@@ -203,7 +204,7 @@ function H(e, t, n, r = 0) {
|
|
|
203
204
|
pendingInternalValues: null
|
|
204
205
|
};
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
+
function q(e, t) {
|
|
207
208
|
if (t.type === "commit") return {
|
|
208
209
|
...e,
|
|
209
210
|
values: t.values,
|
|
@@ -211,13 +212,13 @@ function U(e, t) {
|
|
|
211
212
|
nextId: t.nextId ?? e.nextId,
|
|
212
213
|
pendingInternalValues: t.values
|
|
213
214
|
};
|
|
214
|
-
if (t.name !== e.name) return
|
|
215
|
-
if (e.pendingInternalValues &&
|
|
215
|
+
if (t.name !== e.name) return K(t.name, t.values, e.prefix, e.nextId);
|
|
216
|
+
if (e.pendingInternalValues && G(t.values, e.pendingInternalValues)) return {
|
|
216
217
|
...e,
|
|
217
218
|
lastExternalValues: [...t.values],
|
|
218
219
|
pendingInternalValues: null
|
|
219
220
|
};
|
|
220
|
-
let n =
|
|
221
|
+
let n = te(e.values, e.ids, t.values, e.prefix, e.nextId);
|
|
221
222
|
return {
|
|
222
223
|
...e,
|
|
223
224
|
values: [...t.values],
|
|
@@ -227,28 +228,28 @@ function U(e, t) {
|
|
|
227
228
|
pendingInternalValues: null
|
|
228
229
|
};
|
|
229
230
|
}
|
|
230
|
-
function
|
|
231
|
-
let [r, i] =
|
|
231
|
+
function ne(e, t, n) {
|
|
232
|
+
let [r, i] = v(q, void 0, () => K(e, t, n)), a = r.name !== e || !G(t, r.lastExternalValues), o = {
|
|
232
233
|
type: "sync",
|
|
233
234
|
name: e,
|
|
234
235
|
values: t
|
|
235
|
-
}, s = a ?
|
|
236
|
+
}, s = a ? q(r, o) : r;
|
|
236
237
|
return a && i(o), {
|
|
237
238
|
state: s,
|
|
238
239
|
dispatch: i
|
|
239
240
|
};
|
|
240
241
|
}
|
|
241
|
-
var
|
|
242
|
+
var J = {
|
|
242
243
|
placeholder: "Enter value",
|
|
243
244
|
addButton: "Add item",
|
|
244
245
|
dragHandleAriaLabel: "Drag to reorder",
|
|
245
|
-
...
|
|
246
|
+
...V
|
|
246
247
|
};
|
|
247
|
-
function
|
|
248
|
-
let u = t(
|
|
248
|
+
function Y({ name: e, invalid: r, disabled: i = !1, sortable: a = !1, renderField: o, strings: s, className: c }) {
|
|
249
|
+
let u = t(J, s), { control: d } = k(), { field: f, fieldState: p } = D({
|
|
249
250
|
control: d,
|
|
250
251
|
name: e
|
|
251
|
-
}), m = Array.isArray(f.value) ? f.value : [],
|
|
252
|
+
}), m = Array.isArray(f.value) ? f.value : [], h = !!(r || p.invalid), _ = g().replace(/:/g, ""), { state: v, dispatch: y } = ne(e, m, _), b = (e, t, n) => {
|
|
252
253
|
y({
|
|
253
254
|
type: "commit",
|
|
254
255
|
values: e,
|
|
@@ -257,26 +258,26 @@ function G({ name: e, invalid: r, disabled: i = !1, sortable: a = !1, renderFiel
|
|
|
257
258
|
}), f.onChange(e);
|
|
258
259
|
}, S = (e, t) => {
|
|
259
260
|
let n = [...v.values];
|
|
260
|
-
n[e] = t,
|
|
261
|
+
n[e] = t, b(n, v.ids);
|
|
261
262
|
}, C = () => {
|
|
262
263
|
let e = `${_}-row-${v.nextId}`;
|
|
263
|
-
|
|
264
|
+
b([...v.values, ""], [...v.ids, e], v.nextId + 1);
|
|
264
265
|
}, w = (e) => {
|
|
265
|
-
|
|
266
|
+
b(v.values.filter((t, n) => n !== e), v.ids.filter((t, n) => n !== e));
|
|
266
267
|
}, T = (e, t) => {
|
|
267
|
-
let n =
|
|
268
|
-
|
|
269
|
-
},
|
|
268
|
+
let n = W(v.values, e, t), r = W(v.ids, e, t);
|
|
269
|
+
b(n, r);
|
|
270
|
+
}, E = v.values.map((e, t) => ({
|
|
270
271
|
id: v.ids[t],
|
|
271
272
|
value: e
|
|
272
273
|
}));
|
|
273
|
-
return /* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ x(U, {
|
|
274
275
|
...a ? {
|
|
275
276
|
sortable: !0,
|
|
276
277
|
onMove: T
|
|
277
278
|
} : { sortable: !1 },
|
|
278
279
|
className: n("string-repeater--component", c),
|
|
279
|
-
items:
|
|
280
|
+
items: E,
|
|
280
281
|
disabled: i,
|
|
281
282
|
onAdd: C,
|
|
282
283
|
onRemove: w,
|
|
@@ -292,13 +293,13 @@ function G({ name: e, invalid: r, disabled: i = !1, sortable: a = !1, renderFiel
|
|
|
292
293
|
index: n,
|
|
293
294
|
name: `${e}.${n}`,
|
|
294
295
|
value: t.value,
|
|
295
|
-
invalid:
|
|
296
|
+
invalid: h,
|
|
296
297
|
disabled: i,
|
|
297
298
|
onValueChange: (e) => S(n, e),
|
|
298
299
|
onBlur: f.onBlur,
|
|
299
300
|
ref: n === 0 ? f.ref : void 0
|
|
300
301
|
};
|
|
301
|
-
return o ? o(r) : /* @__PURE__ */
|
|
302
|
+
return o ? o(r) : /* @__PURE__ */ x(l, {
|
|
302
303
|
ref: r.ref,
|
|
303
304
|
name: r.name,
|
|
304
305
|
value: r.value,
|
|
@@ -311,20 +312,20 @@ function G({ name: e, invalid: r, disabled: i = !1, sortable: a = !1, renderFiel
|
|
|
311
312
|
}
|
|
312
313
|
});
|
|
313
314
|
}
|
|
314
|
-
|
|
315
|
+
Y.displayName = "StringRepeater";
|
|
315
316
|
//#endregion
|
|
316
317
|
//#region src/components/base/repeaters/object-repeater.tsx
|
|
317
|
-
var
|
|
318
|
+
var X = {
|
|
318
319
|
addButton: "Add item",
|
|
319
320
|
dragHandleAriaLabel: "Drag to reorder",
|
|
320
|
-
...
|
|
321
|
+
...V
|
|
321
322
|
};
|
|
322
|
-
function
|
|
323
|
-
let
|
|
323
|
+
function Z({ name: e, fields: r, invalid: i, disabled: a = !1, sortable: o = !1, renderField: c, strings: f, className: p }) {
|
|
324
|
+
let m = t(X, f), { control: g, register: _ } = k(), { fields: v, append: y, remove: b, move: S } = O({
|
|
324
325
|
control: g,
|
|
325
326
|
name: e
|
|
326
|
-
}), C =
|
|
327
|
-
return /* @__PURE__ */
|
|
327
|
+
}), C = h(() => r.reduce((e, t) => (e[t.name] = "", e), {}), [r]);
|
|
328
|
+
return /* @__PURE__ */ x(U, {
|
|
328
329
|
...o ? {
|
|
329
330
|
sortable: !0,
|
|
330
331
|
onMove: (e, t) => S(e, t)
|
|
@@ -335,19 +336,19 @@ function q({ name: e, fields: r, invalid: i, disabled: a = !1, sortable: o = !1,
|
|
|
335
336
|
removeVariant: "ghost",
|
|
336
337
|
disabled: a,
|
|
337
338
|
onAdd: () => y(C()),
|
|
338
|
-
onRemove: (e) =>
|
|
339
|
+
onRemove: (e) => b(e),
|
|
339
340
|
strings: {
|
|
340
|
-
emptyState:
|
|
341
|
-
addButton:
|
|
342
|
-
removeAriaLabel:
|
|
343
|
-
dragHandleAriaLabel:
|
|
341
|
+
emptyState: m.emptyState,
|
|
342
|
+
addButton: m.addButton,
|
|
343
|
+
removeAriaLabel: m.removeAriaLabel,
|
|
344
|
+
dragHandleAriaLabel: m.dragHandleAriaLabel
|
|
344
345
|
},
|
|
345
|
-
renderRow: (t, { index: n }) => /* @__PURE__ */
|
|
346
|
+
renderRow: (t, { index: n }) => /* @__PURE__ */ x(s, {
|
|
346
347
|
gap: "lg",
|
|
347
348
|
className: "object-repeater--fields",
|
|
348
349
|
children: r.map((t) => {
|
|
349
350
|
let r = `${e}.${n}.${t.name}`, o = _(r);
|
|
350
|
-
return c ? /* @__PURE__ */
|
|
351
|
+
return c ? /* @__PURE__ */ x("div", {
|
|
351
352
|
className: "object-repeater--field",
|
|
352
353
|
children: c(t, {
|
|
353
354
|
index: n,
|
|
@@ -356,19 +357,19 @@ function q({ name: e, fields: r, invalid: i, disabled: a = !1, sortable: o = !1,
|
|
|
356
357
|
invalid: !!i,
|
|
357
358
|
disabled: a
|
|
358
359
|
})
|
|
359
|
-
}, t.name) : /* @__PURE__ */
|
|
360
|
+
}, t.name) : /* @__PURE__ */ x(u, {
|
|
360
361
|
label: t.label,
|
|
361
362
|
required: t.required,
|
|
362
363
|
hint: t.hint,
|
|
363
364
|
htmlFor: r,
|
|
364
|
-
children: t.type === "textarea" ? /* @__PURE__ */
|
|
365
|
+
children: t.type === "textarea" ? /* @__PURE__ */ x(d, {
|
|
365
366
|
...o,
|
|
366
367
|
id: r,
|
|
367
368
|
placeholder: t.placeholder,
|
|
368
369
|
minRows: 3,
|
|
369
370
|
invalid: i,
|
|
370
371
|
disabled: a
|
|
371
|
-
}) : /* @__PURE__ */
|
|
372
|
+
}) : /* @__PURE__ */ x(l, {
|
|
372
373
|
...o,
|
|
373
374
|
id: r,
|
|
374
375
|
type: t.type || "text",
|
|
@@ -381,10 +382,10 @@ function q({ name: e, fields: r, invalid: i, disabled: a = !1, sortable: o = !1,
|
|
|
381
382
|
})
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
|
-
|
|
385
|
+
Z.displayName = "ObjectRepeater";
|
|
385
386
|
//#endregion
|
|
386
387
|
//#region src/components/base/repeaters/key-value-editor.tsx
|
|
387
|
-
var
|
|
388
|
+
var re = {
|
|
388
389
|
keyLabel: "Key",
|
|
389
390
|
valueLabel: "Value",
|
|
390
391
|
keyPlaceholder: "key",
|
|
@@ -392,17 +393,17 @@ var oe = {
|
|
|
392
393
|
addButton: "Add row",
|
|
393
394
|
removeRowAriaLabel: "Remove row",
|
|
394
395
|
emptyState: "No rows yet."
|
|
395
|
-
},
|
|
396
|
+
}, Q = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : Math.random().toString(36).slice(2, 10), ie = m(function({ row: e, keyPlaceholder: t, valuePlaceholder: r, keyLabel: i, valueLabel: o, invalid: s, onKeyChange: c, onValueChange: u }) {
|
|
396
397
|
let { id: d, key: f, value: p } = e;
|
|
397
|
-
return /* @__PURE__ */
|
|
398
|
+
return /* @__PURE__ */ S("div", {
|
|
398
399
|
className: n("key-value-editor--row", "grid grid-cols-1 @md/key-value-editor:grid-cols-2 gap-space-md"),
|
|
399
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ S("div", {
|
|
400
401
|
className: "grid min-w-0 gap-space-sm",
|
|
401
|
-
children: [!!i && /* @__PURE__ */
|
|
402
|
+
children: [!!i && /* @__PURE__ */ x(a, {
|
|
402
403
|
htmlFor: `${d}-key`,
|
|
403
404
|
className: "text-inherit @md/key-value-editor:sr-only",
|
|
404
405
|
children: i
|
|
405
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ x(l, {
|
|
406
407
|
id: `${d}-key`,
|
|
407
408
|
"aria-label": i || t,
|
|
408
409
|
value: f ?? "",
|
|
@@ -410,13 +411,13 @@ var oe = {
|
|
|
410
411
|
onChange: (e) => c(d, e.target.value),
|
|
411
412
|
invalid: s
|
|
412
413
|
})]
|
|
413
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ S("div", {
|
|
414
415
|
className: "grid min-w-0 gap-space-sm",
|
|
415
|
-
children: [!!o && /* @__PURE__ */
|
|
416
|
+
children: [!!o && /* @__PURE__ */ x(a, {
|
|
416
417
|
htmlFor: `${d}-value`,
|
|
417
418
|
className: "text-inherit @md/key-value-editor:sr-only",
|
|
418
419
|
children: o
|
|
419
|
-
}), /* @__PURE__ */
|
|
420
|
+
}), /* @__PURE__ */ x(l, {
|
|
420
421
|
id: `${d}-value`,
|
|
421
422
|
"aria-label": o || r,
|
|
422
423
|
value: p ?? "",
|
|
@@ -426,116 +427,122 @@ var oe = {
|
|
|
426
427
|
})]
|
|
427
428
|
})]
|
|
428
429
|
});
|
|
429
|
-
}),
|
|
430
|
-
let
|
|
431
|
-
id:
|
|
430
|
+
}), $ = p(function({ value: i, onValueChange: o, invalid: s, sortable: c = !1, strings: l, id: u, "aria-label": d, "aria-labelledby": p, "aria-describedby": m, "aria-invalid": g }, _) {
|
|
431
|
+
let v = t(re, l), { invalid: C, ariaInvalid: w } = f(s, g), { defaultScale: T } = e(), E = y(!1), [D, O] = b(() => i && Object.keys(i).length > 0 ? Object.entries(i).map(([e, t]) => ({
|
|
432
|
+
id: Q(),
|
|
432
433
|
key: e,
|
|
433
434
|
value: String(t ?? "")
|
|
434
435
|
})) : [{
|
|
435
|
-
id:
|
|
436
|
+
id: Q(),
|
|
436
437
|
key: "",
|
|
437
438
|
value: ""
|
|
438
|
-
}]),
|
|
439
|
+
}]), k = h((e) => {
|
|
439
440
|
let t = {};
|
|
440
441
|
e.forEach(({ key: e, value: n }) => {
|
|
441
442
|
e.trim() !== "" && (t[e] = n ?? "");
|
|
442
|
-
}),
|
|
443
|
-
|
|
443
|
+
}), E.current = !0, o?.(t), queueMicrotask(() => {
|
|
444
|
+
E.current = !1;
|
|
444
445
|
});
|
|
445
|
-
}, [o]),
|
|
446
|
-
|
|
446
|
+
}, [o]), A = h((e, t) => {
|
|
447
|
+
O((n) => {
|
|
447
448
|
let r = n.map((n) => n.id === e ? {
|
|
448
449
|
...n,
|
|
449
450
|
key: t
|
|
450
451
|
} : n);
|
|
451
|
-
return
|
|
452
|
+
return k(r), r;
|
|
452
453
|
});
|
|
453
|
-
}, [
|
|
454
|
-
|
|
454
|
+
}, [k]), j = h((e, t) => {
|
|
455
|
+
O((n) => {
|
|
455
456
|
let r = n.map((n) => n.id === e ? {
|
|
456
457
|
...n,
|
|
457
458
|
value: t
|
|
458
459
|
} : n);
|
|
459
|
-
return
|
|
460
|
+
return k(r), r;
|
|
460
461
|
});
|
|
461
|
-
}, [
|
|
462
|
-
|
|
462
|
+
}, [k]), M = h(() => {
|
|
463
|
+
O((e) => {
|
|
463
464
|
let t = [...e, {
|
|
464
|
-
id:
|
|
465
|
+
id: Q(),
|
|
465
466
|
key: "",
|
|
466
467
|
value: ""
|
|
467
468
|
}];
|
|
468
|
-
return
|
|
469
|
+
return k(t), t;
|
|
469
470
|
});
|
|
470
|
-
}, [
|
|
471
|
-
|
|
471
|
+
}, [k]), N = h((e) => {
|
|
472
|
+
O((t) => {
|
|
472
473
|
let n = t.filter((t, n) => n !== e), r = n.length ? n : [{
|
|
473
|
-
id:
|
|
474
|
+
id: Q(),
|
|
474
475
|
key: "",
|
|
475
476
|
value: ""
|
|
476
477
|
}];
|
|
477
|
-
return
|
|
478
|
+
return k(r), r;
|
|
478
479
|
});
|
|
479
|
-
}, [
|
|
480
|
-
|
|
480
|
+
}, [k]), P = h((e, t) => {
|
|
481
|
+
O((n) => {
|
|
481
482
|
let r = [...n], [i] = r.splice(e, 1);
|
|
482
|
-
return r.splice(t, 0, i),
|
|
483
|
+
return r.splice(t, 0, i), k(r), r;
|
|
483
484
|
});
|
|
484
|
-
}, [
|
|
485
|
-
left:
|
|
486
|
-
right:
|
|
487
|
-
},
|
|
485
|
+
}, [k]), F = !!v.keyLabel || !!v.valueLabel, I = r.actionGutter[T === "sm" || T === "lg" ? T : "md"], L = {
|
|
486
|
+
left: I.start,
|
|
487
|
+
right: I.end
|
|
488
|
+
}, R = c ? L.left : "", z = L.right, B = c ? {
|
|
488
489
|
sortable: !0,
|
|
489
|
-
onMove:
|
|
490
|
+
onMove: P
|
|
490
491
|
} : { sortable: !1 };
|
|
491
|
-
return /* @__PURE__ */
|
|
492
|
-
ref:
|
|
492
|
+
return /* @__PURE__ */ S("div", {
|
|
493
|
+
ref: _,
|
|
494
|
+
id: u,
|
|
495
|
+
role: "group",
|
|
496
|
+
"aria-label": d,
|
|
497
|
+
"aria-labelledby": p,
|
|
498
|
+
"aria-describedby": m,
|
|
499
|
+
"aria-invalid": w,
|
|
493
500
|
className: "key-value-editor--component @container/key-value-editor space-y-space-sm",
|
|
494
|
-
children: [
|
|
501
|
+
children: [F && /* @__PURE__ */ S("div", {
|
|
495
502
|
"data-action-gutter": !0,
|
|
496
|
-
className: n("hidden @md/key-value-editor:grid grid-cols-2 gap-space-md",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
503
|
+
className: n("hidden @md/key-value-editor:grid grid-cols-2 gap-space-md", R, z),
|
|
504
|
+
children: [/* @__PURE__ */ x("div", { children: !!v.keyLabel && /* @__PURE__ */ x(a, {
|
|
498
505
|
className: "flex items-center text-inherit",
|
|
499
|
-
children:
|
|
500
|
-
}) }), /* @__PURE__ */
|
|
506
|
+
children: v.keyLabel
|
|
507
|
+
}) }), /* @__PURE__ */ x("div", { children: !!v.valueLabel && /* @__PURE__ */ x(a, {
|
|
501
508
|
className: "flex items-center text-inherit",
|
|
502
|
-
children:
|
|
509
|
+
children: v.valueLabel
|
|
503
510
|
}) })]
|
|
504
|
-
}), /* @__PURE__ */
|
|
505
|
-
...
|
|
506
|
-
items:
|
|
507
|
-
onAdd:
|
|
508
|
-
onRemove:
|
|
511
|
+
}), /* @__PURE__ */ x(U, {
|
|
512
|
+
...B,
|
|
513
|
+
items: D,
|
|
514
|
+
onAdd: M,
|
|
515
|
+
onRemove: N,
|
|
509
516
|
strings: {
|
|
510
|
-
emptyState:
|
|
511
|
-
addButton:
|
|
512
|
-
removeAriaLabel:
|
|
517
|
+
emptyState: v.emptyState,
|
|
518
|
+
addButton: v.addButton,
|
|
519
|
+
removeAriaLabel: v.removeRowAriaLabel
|
|
513
520
|
},
|
|
514
|
-
renderRow: (e) => /* @__PURE__ */
|
|
521
|
+
renderRow: (e) => /* @__PURE__ */ x(ie, {
|
|
515
522
|
row: e,
|
|
516
|
-
keyPlaceholder:
|
|
517
|
-
valuePlaceholder:
|
|
518
|
-
keyLabel:
|
|
519
|
-
valueLabel:
|
|
520
|
-
invalid:
|
|
521
|
-
onKeyChange:
|
|
522
|
-
onValueChange:
|
|
523
|
+
keyPlaceholder: v.keyPlaceholder,
|
|
524
|
+
valuePlaceholder: v.valuePlaceholder,
|
|
525
|
+
keyLabel: v.keyLabel,
|
|
526
|
+
valueLabel: v.valueLabel,
|
|
527
|
+
invalid: C,
|
|
528
|
+
onKeyChange: A,
|
|
529
|
+
onValueChange: j
|
|
523
530
|
})
|
|
524
531
|
})]
|
|
525
532
|
});
|
|
526
533
|
});
|
|
527
|
-
|
|
534
|
+
$.displayName = "KeyValueEditor";
|
|
528
535
|
//#endregion
|
|
529
536
|
//#region src/components/base/repeaters/localized-string-field.tsx
|
|
530
|
-
function
|
|
531
|
-
let { register: u } =
|
|
532
|
-
return t === "textarea" ? /* @__PURE__ */
|
|
537
|
+
function ae({ name: e, type: t = "text", placeholder: r, primaryLocale: i, secondaryLocale: a, activeLocale: o, invalid: s, className: c }) {
|
|
538
|
+
let { register: u } = k(), f = `${e}.${o === "primary" ? i : a}`;
|
|
539
|
+
return t === "textarea" ? /* @__PURE__ */ x(d, {
|
|
533
540
|
...u(f),
|
|
534
541
|
placeholder: r,
|
|
535
542
|
minRows: 3,
|
|
536
543
|
invalid: s,
|
|
537
544
|
className: n("localized-string-field--component", c)
|
|
538
|
-
}, f) : /* @__PURE__ */
|
|
545
|
+
}, f) : /* @__PURE__ */ x(l, {
|
|
539
546
|
...u(f),
|
|
540
547
|
type: t === "number" ? "number" : "text",
|
|
541
548
|
placeholder: r,
|
|
@@ -543,29 +550,29 @@ function X({ name: e, type: t = "text", placeholder: r, primaryLocale: i, second
|
|
|
543
550
|
className: n("localized-string-field--component", c)
|
|
544
551
|
}, f);
|
|
545
552
|
}
|
|
546
|
-
|
|
553
|
+
ae.displayName = "LocalizedStringField";
|
|
547
554
|
//#endregion
|
|
548
555
|
//#region src/components/base/repeaters/localized-object-field.tsx
|
|
549
|
-
function
|
|
550
|
-
let { register: f } =
|
|
551
|
-
return /* @__PURE__ */
|
|
556
|
+
function oe({ name: e, fields: t, primaryLocale: r, secondaryLocale: i, activeLocale: a, invalid: o, className: c }) {
|
|
557
|
+
let { register: f } = k(), p = a === "primary" ? r : i;
|
|
558
|
+
return /* @__PURE__ */ x("div", {
|
|
552
559
|
className: n("localized-object-field--component w-full rounded-surface border border-border p-surface", c),
|
|
553
|
-
children: /* @__PURE__ */
|
|
560
|
+
children: /* @__PURE__ */ x(s, {
|
|
554
561
|
gap: "lg",
|
|
555
562
|
children: t.map((t) => {
|
|
556
563
|
let n = `${e}.${p}.${t.name}`;
|
|
557
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ x(u, {
|
|
558
565
|
label: t.label,
|
|
559
566
|
htmlFor: n,
|
|
560
567
|
required: t.required,
|
|
561
568
|
className: "w-full",
|
|
562
|
-
children: t.type === "textarea" ? /* @__PURE__ */
|
|
569
|
+
children: t.type === "textarea" ? /* @__PURE__ */ x(d, {
|
|
563
570
|
...f(n),
|
|
564
571
|
id: n,
|
|
565
572
|
placeholder: t.placeholder,
|
|
566
573
|
minRows: 3,
|
|
567
574
|
invalid: o
|
|
568
|
-
}) : /* @__PURE__ */
|
|
575
|
+
}) : /* @__PURE__ */ x(l, {
|
|
569
576
|
...f(n),
|
|
570
577
|
id: n,
|
|
571
578
|
type: t.type === "number" ? "number" : "text",
|
|
@@ -577,26 +584,26 @@ function Z({ name: e, fields: t, primaryLocale: r, secondaryLocale: i, activeLoc
|
|
|
577
584
|
})
|
|
578
585
|
});
|
|
579
586
|
}
|
|
580
|
-
|
|
587
|
+
oe.displayName = "LocalizedObjectField";
|
|
581
588
|
//#endregion
|
|
582
589
|
//#region src/components/base/repeaters/localized-string-repeater.tsx
|
|
583
|
-
var
|
|
590
|
+
var se = {
|
|
584
591
|
placeholder: "Enter value",
|
|
585
|
-
addButton:
|
|
586
|
-
emptyState:
|
|
587
|
-
removeAriaLabel:
|
|
592
|
+
addButton: V.addItem,
|
|
593
|
+
emptyState: V.emptyState,
|
|
594
|
+
removeAriaLabel: V.removeAriaLabel,
|
|
588
595
|
dragHandleAriaLabel: "Drag to reorder"
|
|
589
596
|
};
|
|
590
|
-
function
|
|
591
|
-
let f = t(
|
|
592
|
-
return /* @__PURE__ */
|
|
597
|
+
function ce({ name: e, primaryLocale: r, secondaryLocale: i, activeLocale: a, invalid: o, disabled: s = !1, sortable: c = !1, strings: l, className: u }) {
|
|
598
|
+
let f = t(se, l), p = `${e}.${a === "primary" ? r : i}`;
|
|
599
|
+
return /* @__PURE__ */ x(Y, {
|
|
593
600
|
name: p,
|
|
594
601
|
sortable: c,
|
|
595
602
|
invalid: o,
|
|
596
603
|
disabled: s,
|
|
597
604
|
className: n("localized-string-repeater--component", u),
|
|
598
605
|
strings: f,
|
|
599
|
-
renderField: (e) => /* @__PURE__ */
|
|
606
|
+
renderField: (e) => /* @__PURE__ */ x(d, {
|
|
600
607
|
ref: e.ref,
|
|
601
608
|
name: e.name,
|
|
602
609
|
value: e.value,
|
|
@@ -609,8 +616,8 @@ function $({ name: e, primaryLocale: r, secondaryLocale: i, activeLocale: a, inv
|
|
|
609
616
|
})
|
|
610
617
|
});
|
|
611
618
|
}
|
|
612
|
-
|
|
619
|
+
ce.displayName = "LocalizedStringRepeater";
|
|
613
620
|
//#endregion
|
|
614
|
-
export {
|
|
621
|
+
export { $ as KeyValueEditor, oe as LocalizedObjectField, ae as LocalizedStringField, ce as LocalizedStringRepeater, Z as ObjectRepeater, U as Repeater, Y as StringRepeater, se as defaultLocalizedStringRepeaterStrings, X as defaultObjectRepeaterStrings, H as defaultRepeaterPrimitiveStrings, V as defaultRepeaterStrings, J as defaultStringRepeaterStrings };
|
|
615
622
|
|
|
616
623
|
//# sourceMappingURL=repeaters.js.map
|