themelia-react-ui 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +65 -28
- package/dist/{accordion-Cjb6sx0G.js → accordion-96o0pN62.js} +5 -5
- package/dist/{accordion-Cjb6sx0G.js.map → accordion-96o0pN62.js.map} +1 -1
- package/dist/action-menu-CHgs8vmj.js +281 -0
- package/dist/action-menu-CHgs8vmj.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-B8yGOr8-.js} +7 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-BZUGwBq6.js} +277 -276
- package/dist/ai-artifact-BZUGwBq6.js.map +1 -0
- package/dist/{app-shell-C4FhvCqF.js → app-shell-D63ATkIK.js} +84 -83
- package/dist/app-shell-D63ATkIK.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-DkoqHPPl.js} +7 -7
- package/dist/{attachment-BxDfL2mw.js.map → attachment-DkoqHPPl.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-D2FVZ1MH.js} +10 -10
- package/dist/{auth-BGua8ouh.js.map → auth-D2FVZ1MH.js.map} +1 -1
- package/dist/{avatar-DAPlDvhJ.js → avatar-DWO_HHhB.js} +5 -5
- package/dist/{avatar-DAPlDvhJ.js.map → avatar-DWO_HHhB.js.map} +1 -1
- package/dist/{badge-HpFqoqSY.js → badge-DErMA7ul.js} +4 -4
- package/dist/{badge-HpFqoqSY.js.map → badge-DErMA7ul.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +13 -13
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +9 -9
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +6 -6
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +3 -3
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-CdfIkCsV.js} +4 -4
- package/dist/{batch-action-bar-DnUJ21NQ.js.map → batch-action-bar-CdfIkCsV.js.map} +1 -1
- package/dist/blocks/admin.js +20 -20
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +15 -15
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +17 -17
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +570 -567
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-B-WFKecD.js} +4 -4
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-B-WFKecD.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-DkmK-z8E.js} +2 -2
- package/dist/{button-DVzspB_G.js.map → button-DkmK-z8E.js.map} +1 -1
- package/dist/{buttons-DPZekJFu.js → buttons-BbfzgczK.js} +8 -8
- package/dist/{buttons-DPZekJFu.js.map → buttons-BbfzgczK.js.map} +1 -1
- package/dist/{cards-BaBZR-AU.js → cards-4JTWqvVe.js} +10 -10
- package/dist/cards-4JTWqvVe.js.map +1 -0
- package/dist/{chart-ZOYyK2xG.js → chart-C19flDQb.js} +4 -4
- package/dist/{chart-ZOYyK2xG.js.map → chart-C19flDQb.js.map} +1 -1
- package/dist/{checkbox-AWIhNhmo.js → checkbox-CzYUTPeJ.js} +9 -5
- package/dist/checkbox-CzYUTPeJ.js.map +1 -0
- package/dist/{choice-inputs-CNHvARCJ.js → choice-inputs-JLtij2y4.js} +182 -176
- package/dist/choice-inputs-JLtij2y4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-CGNaUtAE.js} +7 -7
- package/dist/{code-block-DeneBJR_.js.map → code-block-CGNaUtAE.js.map} +1 -1
- package/dist/{collapsible-C-_l4hpy.js → collapsible-Do4G0zcC.js} +3 -3
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-Do4G0zcC.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-C0e8SsTm.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-C0e8SsTm.js.map} +1 -1
- package/dist/{combobox-Dxo2fAYQ.js → combobox-CBJDs6w_.js} +12 -12
- package/dist/{combobox-Dxo2fAYQ.js.map → combobox-CBJDs6w_.js.map} +1 -1
- package/dist/{combobox-DaHESuiL.js → combobox-hbhSS18O.js} +7 -7
- package/dist/{combobox-DaHESuiL.js.map → combobox-hbhSS18O.js.map} +1 -1
- package/dist/{command-C25VMRII.js → command-D8NrBj-b.js} +7 -7
- package/dist/{command-C25VMRII.js.map → command-D8NrBj-b.js.map} +1 -1
- package/dist/{comments-DD0DUPwJ.js → comments-Di4w0H_S.js} +383 -382
- package/dist/comments-Di4w0H_S.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +2 -0
- package/dist/components/base/cards/card.recipes.d.ts +12 -5
- package/dist/components/base/cards/smart-card.types.d.ts +12 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +5 -2
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -2
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CRmHf7GP.js +104 -0
- package/dist/containers-CRmHf7GP.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-CnGCZdX4.js} +4 -4
- package/dist/{copyable-ClBuk_UK.js.map → copyable-CnGCZdX4.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-D4oujtx0.js} +239 -238
- package/dist/data-display-D4oujtx0.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Q7jnXxpk.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Q7jnXxpk.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-zOt1oNss.js} +102 -90
- package/dist/date-picker-zOt1oNss.js.map +1 -0
- package/dist/date-pickers-cj8IXbDC.js +179 -0
- package/dist/date-pickers-cj8IXbDC.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-BB4BL_-K.js} +8 -8
- package/dist/{display-hAc1HjpI.js.map → display-BB4BL_-K.js.map} +1 -1
- package/dist/{dropdown-menu-Cl4X7L5S.js → dropdown-menu-CjY8Vt7W.js} +8 -8
- package/dist/{dropdown-menu-Cl4X7L5S.js.map → dropdown-menu-CjY8Vt7W.js.map} +1 -1
- package/dist/features/activities.js +11 -11
- package/dist/features/ai-chat.js +9 -9
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +275 -274
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +199 -198
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +12 -12
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +7 -7
- package/dist/features/media-library.js +623 -622
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +973 -969
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +12 -12
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +113 -112
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +19 -19
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-DZNL5Lg1.js} +9 -9
- package/dist/{feedback-BYIhtitP.js.map → feedback-DZNL5Lg1.js.map} +1 -1
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DjwGx8eM.js} +2 -2
- package/dist/{field-affordance-recipes-DZhnIL_Y.js.map → field-affordance-recipes-DjwGx8eM.js.map} +1 -1
- package/dist/{filters-DJVAveHA.js → filters-BcT-uoFy.js} +19 -19
- package/dist/{filters-DJVAveHA.js.map → filters-BcT-uoFy.js.map} +1 -1
- package/dist/{form-field-CwH9y77i.js → form-field-CsgRmdit.js} +14 -8
- package/dist/form-field-CsgRmdit.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-NXgjkmBG.js} +3 -3
- package/dist/{form-sizing-BdP_Mf5p.js.map → form-sizing-NXgjkmBG.js.map} +1 -1
- package/dist/{forms-B9G_xwzi.js → forms-BV5m5aQF.js} +83 -65
- package/dist/forms-BV5m5aQF.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-Cd33AKbD.js} +288 -288
- package/dist/forms-numeric-Cd33AKbD.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-BA697l4a.js} +14 -14
- package/dist/{header-BSfIEWbI.js.map → header-BA697l4a.js.map} +1 -1
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-BQ-L7Uu2.js} +2 -2
- package/dist/{hooks-ClH9thn4.js.map → hooks-BQ-L7Uu2.js.map} +1 -1
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-COWbCCWu.js} +3 -3
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-COWbCCWu.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-Cdw4k0fb.js +289 -0
- package/dist/input-Cdw4k0fb.js.map +1 -0
- package/dist/{input-CZw8iU99.js → input-DOPL5_QE.js} +3 -3
- package/dist/{input-CZw8iU99.js.map → input-DOPL5_QE.js.map} +1 -1
- package/dist/item-BvZ2DR_x.js +277 -0
- package/dist/item-BvZ2DR_x.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +6 -0
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-CSl5W1Fy.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-CSl5W1Fy.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-RKOQaaIB.js} +8 -8
- package/dist/{mentions-CGlEJ15c.js.map → mentions-RKOQaaIB.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-INU2xsxu.js} +4 -4
- package/dist/{message-DZ_ruyUV.js.map → message-INU2xsxu.js.map} +1 -1
- package/dist/metadata-list-qVV7AVxa.js +443 -0
- package/dist/metadata-list-qVV7AVxa.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-BQNcg1jT.js} +8 -8
- package/dist/{navigation-BzhHI3lo.js.map → navigation-BQNcg1jT.js.map} +1 -1
- package/dist/{navigation-Bnotn4AQ.js → navigation-DLF3E1IC.js} +7 -7
- package/dist/{navigation-Bnotn4AQ.js.map → navigation-DLF3E1IC.js.map} +1 -1
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-WZEs-hYo.js} +2 -2
- package/dist/{navigation-row-recipes-BFLCk_Aq.js.map → navigation-row-recipes-WZEs-hYo.js.map} +1 -1
- package/dist/{number-DbV1Dija.js → number-E_OiIfJz.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-E_OiIfJz.js.map} +1 -1
- package/dist/{overflow-tab-bar-CWY7Nogn.js → overflow-tab-bar-CrbqMteP.js} +107 -105
- package/dist/overflow-tab-bar-CrbqMteP.js.map +1 -0
- package/dist/{overlays-tMkF-VAN.js → overlays-BlKynmde.js} +228 -227
- package/dist/overlays-BlKynmde.js.map +1 -0
- package/dist/page-CIwNUtGr.js +227 -0
- package/dist/page-CIwNUtGr.js.map +1 -0
- package/dist/page-header-commands-DFMlNYzN.js +128 -0
- package/dist/page-header-commands-DFMlNYzN.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-Ch8X_47u.js} +5 -5
- package/dist/{pagination-BL25hu2s.js.map → pagination-Ch8X_47u.js.map} +1 -1
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-BYaCdFhf.js} +6 -6
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
- package/dist/{popover-gnTOhbFM.js → popover-uwzX2vo7.js} +4 -4
- package/dist/{popover-gnTOhbFM.js.map → popover-uwzX2vo7.js.map} +1 -1
- package/dist/{primitives-BFK08r9M.js → primitives-Du64iDbb.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-Du64iDbb.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BvF2oCdV.js} +5 -5
- package/dist/{progress-B1VnCT0K.js.map → progress-BvF2oCdV.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-D789Jwyy.js} +6 -6
- package/dist/{receipt-BVSOH3Xo.js.map → receipt-D789Jwyy.js.map} +1 -1
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-CLJEf76s.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-CLJEf76s.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-Cm1dpUpQ.js} +10 -10
- package/dist/{rich-text-editor-cRLC-eBK.js.map → rich-text-editor-Cm1dpUpQ.js.map} +1 -1
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-L__e4x47.js} +4 -4
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js.map → rich-text-editor-toolbar-L__e4x47.js.map} +1 -1
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-La5RXsEk.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-La5RXsEk.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-DAEV0w65.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-DAEV0w65.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-GNfPG-90.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-GNfPG-90.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-BA2iboic.js +174 -0
- package/dist/settings-BA2iboic.js.map +1 -0
- package/dist/{sheet-ijlsjq-n.js → sheet-DoAxTb2J.js} +7 -7
- package/dist/{sheet-ijlsjq-n.js.map → sheet-DoAxTb2J.js.map} +1 -1
- package/dist/{sidebar-DkTO4VTO.js → sidebar-ByqKR_W5.js} +13 -13
- package/dist/{sidebar-DkTO4VTO.js.map → sidebar-ByqKR_W5.js.map} +1 -1
- package/dist/{sidebar-Db6gkh3U.js → sidebar-D2iSnGJ7.js} +11 -11
- package/dist/{sidebar-Db6gkh3U.js.map → sidebar-D2iSnGJ7.js.map} +1 -1
- package/dist/{skeleton-Byjnt7qr.js → skeleton-CUj8O5Bd.js} +3 -3
- package/dist/{skeleton-Byjnt7qr.js.map → skeleton-CUj8O5Bd.js.map} +1 -1
- package/dist/smart-card-CqkzQsK-.js +614 -0
- package/dist/smart-card-CqkzQsK-.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-C0V0_Fyf.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-C0V0_Fyf.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-CpvnzJn9.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-CpvnzJn9.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-DH7rozUv.js} +19 -19
- package/dist/{table-BweFy_P9.js.map → table-DH7rozUv.js.map} +1 -1
- package/dist/{tabs-CDocW5D1.js → tabs-eqVsJZWO.js} +7 -7
- package/dist/{tabs-CDocW5D1.js.map → tabs-eqVsJZWO.js.map} +1 -1
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-DXItiR0O.js} +101 -98
- package/dist/text-inputs-DXItiR0O.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +152 -112
- package/dist/{timelines-CwM_9IhD.js → timelines-DmtztAY_.js} +10 -10
- package/dist/{timelines-CwM_9IhD.js.map → timelines-DmtztAY_.js.map} +1 -1
- package/dist/{tooltip-yiRJUFjp.js → tooltip-B4hjKtoV.js} +3 -3
- package/dist/{tooltip-yiRJUFjp.js.map → tooltip-B4hjKtoV.js.map} +1 -1
- package/dist/{tree-WnKQzwbq.js → tree-CV11PURP.js} +8 -8
- package/dist/{tree-WnKQzwbq.js.map → tree-CV11PURP.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CSyJrh28.js +117 -0
- package/dist/typography-CSyJrh28.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-C_U0Xma4.js → ui-provider-CQCuCBcy.js} +3 -3
- package/dist/ui-provider-CQCuCBcy.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CXyxmQBP.js → upload-C9SA0X-8.js} +11 -11
- package/dist/{upload-CXyxmQBP.js.map → upload-C9SA0X-8.js.map} +1 -1
- package/dist/{upload-queue-Boscubn9.js → upload-queue-DhQJiSRc.js} +9 -9
- package/dist/{upload-queue-Boscubn9.js.map → upload-queue-DhQJiSRc.js.map} +1 -1
- package/dist/{usage-card-BhO5eqkX.js → usage-card-DVTRDmGz.js} +134 -133
- package/dist/usage-card-DVTRDmGz.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-CF3c95Io.js} +68 -5
- package/dist/utils-CF3c95Io.js.map +1 -0
- package/dist/value-inputs-C0o70p-U.js +980 -0
- package/dist/value-inputs-C0o70p-U.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-ClupF0Gz.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-ClupF0Gz.js.map} +1 -1
- package/dist/workspace-9EFVXUyk.js +410 -0
- package/dist/workspace-9EFVXUyk.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +14 -129
- package/docs/consumer-skill/examples/app-layout.tsx +22 -12
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/manifest.json +51 -1
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +92 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/references/agents-md.md +17 -7
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/component-contracts.json +319824 -0
- package/docs/consumer-skill/references/composition-mapping.md +92 -0
- package/docs/consumer-skill/references/composition.md +43 -19
- package/docs/consumer-skill/references/design-contract.md +32 -0
- package/docs/consumer-skill/references/discovery.md +84 -7
- package/docs/consumer-skill/references/installation.md +40 -36
- package/docs/consumer-skill/references/integration.md +6 -2
- package/docs/consumer-skill/references/public-api.json +1519 -65
- package/docs/consumer-skill/references/review.md +9 -4
- package/docs/consumer-skill/references/rhf-workflows.md +86 -0
- package/docs/consumer-skill/references/screen-archetypes.md +22 -0
- package/docs/consumer-skill/references/theming.md +8 -9
- package/docs/consumer-skill/references/tokens.json +12 -3
- package/docs/consumer-skill/references/workflows.md +2 -1
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +198 -0
- package/docs/consumer-skill/scripts/discovery.mjs +42 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +138 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +76 -0
- package/docs/consumer-skills/themelia-components/SKILL.md +30 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +35 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +14 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +35 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -1,963 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { m as e, s as t } from "./ui-provider-C_U0Xma4.js";
|
|
3
|
-
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-BRhFDwuU.js";
|
|
5
|
-
import { t as i } from "./buttons-DPZekJFu.js";
|
|
6
|
-
import { c as a } from "./typography-UTnveOEy.js";
|
|
7
|
-
import { a as o } from "./text.styles-g4He6UIW.js";
|
|
8
|
-
import { t as s } from "./focus-recipes-B653VaLq.js";
|
|
9
|
-
import { t as c } from "./structure-BmisBK-3.js";
|
|
10
|
-
import { t as l } from "./track-recipes-CDcKmndW.js";
|
|
11
|
-
import { n as u, t as d } from "./popover.recipes-D3j8R8Yp.js";
|
|
12
|
-
import { n as f } from "./collection-content-By56pLog.js";
|
|
13
|
-
import { t as p } from "./badge-HpFqoqSY.js";
|
|
14
|
-
import { t as ee } from "./field-state-recipes-BVA2CWHo.js";
|
|
15
|
-
import { n as m, r as h, t as te } from "./field-affordance-recipes-DZhnIL_Y.js";
|
|
16
|
-
import { t as ne } from "./editable-text-recipe-Cn61kEcv.js";
|
|
17
|
-
import { d as re, l as g, o as ie, p as ae, y as oe } from "./form-sizing-BdP_Mf5p.js";
|
|
18
|
-
import { t as se } from "./input-DQdEd0YD.js";
|
|
19
|
-
import { t as _ } from "./date-picker-B2K3ucWn.js";
|
|
20
|
-
import { o as v, t as y } from "./popover-gnTOhbFM.js";
|
|
21
|
-
import { _ as ce, d as b, f as x, g as le, p as S, v as C } from "./choice-inputs-CNHvARCJ.js";
|
|
22
|
-
import * as w from "react";
|
|
23
|
-
import { forwardRef as T, memo as E, useCallback as D, useId as O, useMemo as k, useRef as ue, useState as A } from "react";
|
|
24
|
-
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
25
|
-
import { Check as de } from "lucide-react";
|
|
26
|
-
import { Slider as N } from "@base-ui/react/slider";
|
|
27
|
-
//#region src/components/base/value-inputs/tags-input.tsx
|
|
28
|
-
var P = {
|
|
29
|
-
placeholder: "Add a tag…",
|
|
30
|
-
emptyRecommendations: "No recommendations found.",
|
|
31
|
-
clearAll: "Clear all",
|
|
32
|
-
summary: (e, t) => `${e} / ${t} tags`,
|
|
33
|
-
removeTag: (e) => `Remove ${e}`,
|
|
34
|
-
notAdded: (e) => `Not added: ${e}.`,
|
|
35
|
-
recommendationsLabel: "Suggested tags"
|
|
36
|
-
};
|
|
37
|
-
function F(e) {
|
|
38
|
-
return e === !0 || e === "true";
|
|
39
|
-
}
|
|
40
|
-
function fe({ id: l, "aria-label": ee, "aria-labelledby": h, "aria-describedby": re, "aria-invalid": ae, "aria-required": se, value: _, defaultValue: ce, onValueChange: b, name: x, placeholder: le, recommendations: S, maxTags: C, showMaxTags: T = !1, allowDuplicates: E = !1, validate: O, disabled: N = !1, showClearAll: fe = !1, renderTag: pe, delimiter: I = /[\n,]/, addOnBlur: me = !0, minLength: L = 1, maxLength: he, sortTags: ge = !1, caseSensitive: _e = !1, field: R, invalid: ve, className: ye, strings: be }) {
|
|
41
|
-
let { defaultTextSize: xe } = e(), { defaultScale: z } = t(), B = oe(void 0, z), V = n(P, le === void 0 ? void 0 : { placeholder: le }), H = n(V, be), Se = _ !== void 0, [Ce, we] = A(() => ce ?? []), U = _ ?? Ce, [W, Te] = A(""), [Ee, De] = A(null), [Oe, ke] = A(""), [Ae, G] = A(!1), [je, K] = A(-1), [Me, Ne] = A(null), Pe = ue(null), Fe = ue(null), Ie = w.useId(), Le = w.useId(), Re = C !== void 0 && U.length >= C, ze = !!S?.length, q = D((e) => {
|
|
42
|
-
if (typeof e == "string") return e;
|
|
43
|
-
if (R && typeof e == "object" && e) {
|
|
44
|
-
let t = e[R];
|
|
45
|
-
return typeof t == "string" ? t : t == null ? "" : String(t);
|
|
46
|
-
}
|
|
47
|
-
return String(e);
|
|
48
|
-
}, [R]), Be = D((e) => R ? { [R]: e } : e, [R]), J = D((e) => _e ? e : e.toLowerCase(), [_e]), Ve = D((e, t) => {
|
|
49
|
-
let n = J(e);
|
|
50
|
-
return t.some((e) => J(q(e)) === n);
|
|
51
|
-
}, [J, q]), He = k(() => S ? S.map((e, t) => {
|
|
52
|
-
if (e && typeof e == "object" && "value" in e && "label" in e) {
|
|
53
|
-
let n = e;
|
|
54
|
-
return {
|
|
55
|
-
key: `${t}:${n.label}`,
|
|
56
|
-
value: n.value,
|
|
57
|
-
label: n.label
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
let n = q(e);
|
|
61
|
-
return {
|
|
62
|
-
key: `${t}:${n}`,
|
|
63
|
-
value: e,
|
|
64
|
-
label: n
|
|
65
|
-
};
|
|
66
|
-
}) : [], [S, q]), Y = k(() => {
|
|
67
|
-
if (!He.length) return He;
|
|
68
|
-
let e = J(W.trim()), t = new Set(U.map((e) => J(q(e))));
|
|
69
|
-
return He.filter((n) => {
|
|
70
|
-
let r = J(q(n.value));
|
|
71
|
-
return !E && t.has(r) ? !1 : !e || J(n.label).includes(e) || r.includes(e);
|
|
72
|
-
});
|
|
73
|
-
}, [
|
|
74
|
-
He,
|
|
75
|
-
W,
|
|
76
|
-
U,
|
|
77
|
-
E,
|
|
78
|
-
J,
|
|
79
|
-
q
|
|
80
|
-
]), X = Ae && !N && ze && !Re, Z = X && je >= 0 && je < Y.length ? je : -1, Ue = D((e) => [...e].sort((e, t) => q(e).localeCompare(q(t))), [q]), We = D((e) => {
|
|
81
|
-
Se || we(e), b?.(e);
|
|
82
|
-
}, [Se, b]), Ge = D((e) => {
|
|
83
|
-
let t = [...U], n = [];
|
|
84
|
-
for (let r of e) {
|
|
85
|
-
let e = typeof r == "string", i = (e ? r : q(r)).trim();
|
|
86
|
-
if (!i) continue;
|
|
87
|
-
let a = e ? Be(i) : r;
|
|
88
|
-
if (i.length < L || he !== void 0 && i.length > he || C !== void 0 && t.length >= C || !E && Ve(i, t) || O && !O(a)) {
|
|
89
|
-
n.push(i);
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
t.push(a);
|
|
93
|
-
}
|
|
94
|
-
return t.length !== U.length && (ge && (t = Ue(t)), We(t)), n;
|
|
95
|
-
}, [
|
|
96
|
-
U,
|
|
97
|
-
q,
|
|
98
|
-
Be,
|
|
99
|
-
L,
|
|
100
|
-
he,
|
|
101
|
-
C,
|
|
102
|
-
E,
|
|
103
|
-
Ve,
|
|
104
|
-
O,
|
|
105
|
-
ge,
|
|
106
|
-
Ue,
|
|
107
|
-
We
|
|
108
|
-
]), Q = D((e) => {
|
|
109
|
-
let t = Ge(e), n = t.join(typeof I == "string" ? I : ", ");
|
|
110
|
-
Te(n), De(n || null), ke(t.length ? (H.notAdded ?? P.notAdded)(t.join(", ")) : ""), G(!1), K(-1);
|
|
111
|
-
}, [
|
|
112
|
-
Ge,
|
|
113
|
-
I,
|
|
114
|
-
H
|
|
115
|
-
]), Ke = k(() => {
|
|
116
|
-
let e = /* @__PURE__ */ new Map();
|
|
117
|
-
return U.map((t, n) => {
|
|
118
|
-
let r = q(t), i = e.get(r) ?? 0;
|
|
119
|
-
return e.set(r, i + 1), {
|
|
120
|
-
tag: t,
|
|
121
|
-
index: n,
|
|
122
|
-
display: r,
|
|
123
|
-
key: `${r}::${i}`
|
|
124
|
-
};
|
|
125
|
-
});
|
|
126
|
-
}, [U, q]), $ = k(() => ge ? [...Ke].sort((e, t) => e.display.localeCompare(t.display)) : Ke, [Ke, ge]), qe = D((e) => {
|
|
127
|
-
We(U.filter((t, n) => n !== e));
|
|
128
|
-
}, [U, We]), Je = D((e) => {
|
|
129
|
-
Ne(Math.max(0, $.findIndex((t) => t.index === e))), qe(e);
|
|
130
|
-
}, [$, qe]);
|
|
131
|
-
w.useLayoutEffect(() => {
|
|
132
|
-
if (Me === null) return;
|
|
133
|
-
Ne(null);
|
|
134
|
-
let e = Fe.current?.querySelectorAll("[data-tag-remove]:not(:disabled)");
|
|
135
|
-
((e && e.length > 0 ? e[Math.min(Me, e.length - 1)] : void 0) ?? Pe.current)?.focus();
|
|
136
|
-
}, [Me]);
|
|
137
|
-
let Ye = D((e) => {
|
|
138
|
-
let t = e.target.value;
|
|
139
|
-
if (t.split(I).length > 1) {
|
|
140
|
-
Q(t.split(I));
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
Te(t), De(null), K(-1), ze && G(!0);
|
|
144
|
-
}, [
|
|
145
|
-
I,
|
|
146
|
-
Q,
|
|
147
|
-
ze
|
|
148
|
-
]), Xe = D((e) => {
|
|
149
|
-
N || e.nativeEvent.isComposing || e.keyCode === 229 || (e.key === "Enter" ? (e.preventDefault(), Z >= 0 ? Q([Y[Z].value]) : W.trim() && Q(W.split(I))) : e.key === "ArrowDown" ? X ? (e.preventDefault(), K((e) => e < Y.length - 1 ? e + 1 : e)) : ze && !Re && Y.length > 0 && G(!0) : e.key === "ArrowUp" ? X && (e.preventDefault(), K((e) => e > 0 ? e - 1 : 0)) : e.key === "Escape" ? (G(!1), K(-1)) : e.key === "Backspace" && W === "" && $.length > 0 && (e.preventDefault(), qe($[$.length - 1].index)));
|
|
150
|
-
}, [
|
|
151
|
-
N,
|
|
152
|
-
Z,
|
|
153
|
-
Y,
|
|
154
|
-
Q,
|
|
155
|
-
W,
|
|
156
|
-
I,
|
|
157
|
-
X,
|
|
158
|
-
ze,
|
|
159
|
-
Re,
|
|
160
|
-
$,
|
|
161
|
-
qe
|
|
162
|
-
]), Ze = D((e) => {
|
|
163
|
-
if (N) return;
|
|
164
|
-
let t = e.clipboardData.getData("text");
|
|
165
|
-
if (!t) return;
|
|
166
|
-
let n = e.currentTarget.selectionStart ?? W.length, r = e.currentTarget.selectionEnd ?? n, i = `${W.slice(0, n)}${t}${W.slice(r)}`.split(I);
|
|
167
|
-
i.length <= 1 || (e.preventDefault(), Q(i));
|
|
168
|
-
}, [
|
|
169
|
-
N,
|
|
170
|
-
W,
|
|
171
|
-
I,
|
|
172
|
-
Q
|
|
173
|
-
]), Qe = D(() => {
|
|
174
|
-
G(!1), K(-1), me && !N && W.trim() && W !== Ee && Q(W.split(I));
|
|
175
|
-
}, [
|
|
176
|
-
me,
|
|
177
|
-
N,
|
|
178
|
-
W,
|
|
179
|
-
Ee,
|
|
180
|
-
I,
|
|
181
|
-
Q
|
|
182
|
-
]), $e = D(() => {
|
|
183
|
-
We([]), Te(""), De(null), ke(""), Pe.current?.focus();
|
|
184
|
-
}, [We]), et = H.removeTag ?? P.removeTag, tt = B === "sm" ? "sm" : "md", nt = (e, t, n) => {
|
|
185
|
-
let i = q(e);
|
|
186
|
-
return /* @__PURE__ */ M(p, {
|
|
187
|
-
tone: "secondary",
|
|
188
|
-
size: tt,
|
|
189
|
-
className: r("tags-input--component tags-input--tag", "max-w-full gap-space-xs pe-space-xs"),
|
|
190
|
-
children: [/* @__PURE__ */ j(a, {
|
|
191
|
-
tag: "span",
|
|
192
|
-
size: "inherit",
|
|
193
|
-
weight: "normal",
|
|
194
|
-
lineHeight: "none",
|
|
195
|
-
className: "min-w-0 truncate text-inherit",
|
|
196
|
-
children: i
|
|
197
|
-
}), /* @__PURE__ */ j("button", {
|
|
198
|
-
type: "button",
|
|
199
|
-
"data-tag-remove": "",
|
|
200
|
-
"aria-label": et(i),
|
|
201
|
-
className: r("tags-input--tag-remove relative after:absolute after:-inset-space-xs", m.inline, s.edge, m.clear, "disabled:pointer-events-none disabled:cursor-not-allowed"),
|
|
202
|
-
onClick: () => n(t),
|
|
203
|
-
disabled: N,
|
|
204
|
-
children: /* @__PURE__ */ j(te, {
|
|
205
|
-
className: m.icon,
|
|
206
|
-
"aria-hidden": "true"
|
|
207
|
-
})
|
|
208
|
-
})]
|
|
209
|
-
});
|
|
210
|
-
}, rt = !!ve || F(ae) || Ee !== null, it = C !== void 0 && U.length > C, at = T ? C : void 0, ot = at !== void 0, st = fe && U.length > 0, ct = [re, ot ? Le : void 0].filter(Boolean).join(" ") || void 0;
|
|
211
|
-
return /* @__PURE__ */ M(c, {
|
|
212
|
-
gap: "xs",
|
|
213
|
-
className: r("tags-input--root w-full relative", ye),
|
|
214
|
-
children: [
|
|
215
|
-
/* @__PURE__ */ j("span", {
|
|
216
|
-
role: "status",
|
|
217
|
-
"aria-live": "polite",
|
|
218
|
-
"aria-atomic": "true",
|
|
219
|
-
className: "tags-input--status sr-only",
|
|
220
|
-
children: Oe
|
|
221
|
-
}),
|
|
222
|
-
!!x && Ke.map((e) => /* @__PURE__ */ j("input", {
|
|
223
|
-
type: "hidden",
|
|
224
|
-
name: `${x}[]`,
|
|
225
|
-
value: e.display,
|
|
226
|
-
disabled: N
|
|
227
|
-
}, e.key)),
|
|
228
|
-
/* @__PURE__ */ M(v, {
|
|
229
|
-
open: X,
|
|
230
|
-
onOpenChange: (e, t) => {
|
|
231
|
-
!e && t.reason === "outside-press" && t.event.target instanceof Node && Fe.current?.contains(t.event.target) || (G(e), e || K(-1));
|
|
232
|
-
},
|
|
233
|
-
children: [/* @__PURE__ */ M("div", {
|
|
234
|
-
ref: Fe,
|
|
235
|
-
"data-slot": "tags-input-field",
|
|
236
|
-
"data-disabled": N || void 0,
|
|
237
|
-
"aria-invalid": rt || void 0,
|
|
238
|
-
onClick: (e) => {
|
|
239
|
-
e.target instanceof Element && e.target.closest("button, a, input") || Pe.current?.focus();
|
|
240
|
-
},
|
|
241
|
-
className: r("tags-input--field", "box-border flex w-full min-w-0 cursor-text flex-wrap items-center rounded-inner border border-input bg-transparent font-sans text-foreground shadow-none outline-none transition-[color,box-shadow]", g[B], ie[B], B === "lg" ? "gap-space-sm" : "gap-space-xs", "py-[calc(0.25rem*var(--density-scale))]", "has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-ring/50", "aria-invalid:border-destructive aria-invalid:has-[input:focus-visible]:border-destructive aria-invalid:has-[input:focus-visible]:ring-destructive/30 dark:aria-invalid:has-[input:focus-visible]:ring-destructive/50", "data-disabled:cursor-not-allowed data-disabled:opacity-50"),
|
|
242
|
-
children: [$.map((e) => /* @__PURE__ */ j(w.Fragment, { children: pe ? pe(e.tag, e.index, Je) : nt(e.tag, e.index, Je) }, e.key)), /* @__PURE__ */ j("input", {
|
|
243
|
-
ref: Pe,
|
|
244
|
-
id: l,
|
|
245
|
-
type: "text",
|
|
246
|
-
"data-slot": "tags-input-control",
|
|
247
|
-
"aria-label": ee,
|
|
248
|
-
"aria-labelledby": h,
|
|
249
|
-
"aria-describedby": ct,
|
|
250
|
-
"aria-invalid": rt || void 0,
|
|
251
|
-
"aria-required": se,
|
|
252
|
-
role: S ? "combobox" : void 0,
|
|
253
|
-
"aria-autocomplete": S ? "list" : void 0,
|
|
254
|
-
"aria-expanded": S ? X : void 0,
|
|
255
|
-
"aria-controls": X ? Ie : void 0,
|
|
256
|
-
"aria-activedescendant": Z >= 0 ? `${Ie}-${Z}` : void 0,
|
|
257
|
-
placeholder: U.length === 0 ? H.placeholder : void 0,
|
|
258
|
-
value: W,
|
|
259
|
-
onChange: Ye,
|
|
260
|
-
onKeyDown: Xe,
|
|
261
|
-
onPaste: Ze,
|
|
262
|
-
onBlur: Qe,
|
|
263
|
-
onFocus: () => {
|
|
264
|
-
ze && !Re && Y.length > 0 && G(!0);
|
|
265
|
-
},
|
|
266
|
-
disabled: N,
|
|
267
|
-
autoComplete: "off",
|
|
268
|
-
className: r("tags-input--input", "box-border min-w-20 flex-1 border-0 bg-transparent p-0 font-sans text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed", ne[B])
|
|
269
|
-
})]
|
|
270
|
-
}), !!S && /* @__PURE__ */ j(y, {
|
|
271
|
-
anchor: Fe,
|
|
272
|
-
align: "start",
|
|
273
|
-
type: "menu",
|
|
274
|
-
initialFocus: !1,
|
|
275
|
-
finalFocus: !1,
|
|
276
|
-
role: "listbox",
|
|
277
|
-
id: Ie,
|
|
278
|
-
"aria-label": H.recommendationsLabel ?? P.recommendationsLabel,
|
|
279
|
-
className: "tags-input--recommendations w-(--anchor-width) max-h-[200px]",
|
|
280
|
-
children: /* @__PURE__ */ j("div", { children: Y.length > 0 ? Y.map((e, t) => {
|
|
281
|
-
let n = U.some((t) => q(t) === q(e.value));
|
|
282
|
-
return /* @__PURE__ */ M("button", {
|
|
283
|
-
id: `${Ie}-${t}`,
|
|
284
|
-
role: "option",
|
|
285
|
-
"aria-selected": Z === t,
|
|
286
|
-
tabIndex: -1,
|
|
287
|
-
type: "button",
|
|
288
|
-
onPointerDown: (e) => e.preventDefault(),
|
|
289
|
-
onClick: () => {
|
|
290
|
-
Q([e.value]), Pe.current?.focus();
|
|
291
|
-
},
|
|
292
|
-
onMouseEnter: () => K(t),
|
|
293
|
-
className: r(d.interactive, u(), o[xe ?? "sm"], "box-border w-full cursor-pointer justify-between border-0 bg-transparent font-sans text-foreground", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none", Z === t && "bg-accent text-accent-foreground"),
|
|
294
|
-
children: [/* @__PURE__ */ j(f, { children: e.label }), /* @__PURE__ */ j(de, { className: r("ml-auto size-icon-sm", n ? "opacity-100" : "opacity-0") })]
|
|
295
|
-
}, e.key);
|
|
296
|
-
}) : /* @__PURE__ */ j(a, {
|
|
297
|
-
tag: "div",
|
|
298
|
-
size: "xs",
|
|
299
|
-
type: "secondary",
|
|
300
|
-
className: "px-row-x py-row-y",
|
|
301
|
-
children: H.emptyRecommendations
|
|
302
|
-
}) })
|
|
303
|
-
})]
|
|
304
|
-
}),
|
|
305
|
-
(ot || st) && /* @__PURE__ */ M("div", {
|
|
306
|
-
className: "tags-input--footer flex items-center justify-between gap-space-sm",
|
|
307
|
-
children: [at !== void 0 && /* @__PURE__ */ j(a, {
|
|
308
|
-
id: Le,
|
|
309
|
-
tag: "span",
|
|
310
|
-
size: "xs",
|
|
311
|
-
type: it ? "error" : "secondary",
|
|
312
|
-
className: "tags-input--count tabular-nums",
|
|
313
|
-
children: H.summary(U.length, at)
|
|
314
|
-
}), !!st && /* @__PURE__ */ j(i, {
|
|
315
|
-
type: "button",
|
|
316
|
-
size: "sm",
|
|
317
|
-
onClick: $e,
|
|
318
|
-
disabled: N,
|
|
319
|
-
className: "tags-input--clear ms-auto",
|
|
320
|
-
children: H.clearAll
|
|
321
|
-
})]
|
|
322
|
-
})
|
|
323
|
-
]
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
fe.displayName = "TagsInput";
|
|
327
|
-
//#endregion
|
|
328
|
-
//#region src/components/base/value-inputs/phone-input.tsx
|
|
329
|
-
var pe = {
|
|
330
|
-
prefixPlaceholder: "Prefix",
|
|
331
|
-
prefixAriaLabel: "Country prefix"
|
|
332
|
-
}, I = {
|
|
333
|
-
US: {
|
|
334
|
-
value: "+1",
|
|
335
|
-
label: "United States",
|
|
336
|
-
iso: "US"
|
|
337
|
-
},
|
|
338
|
-
CA: {
|
|
339
|
-
value: "+1",
|
|
340
|
-
label: "Canada",
|
|
341
|
-
iso: "CA"
|
|
342
|
-
},
|
|
343
|
-
AU: {
|
|
344
|
-
value: "+61",
|
|
345
|
-
label: "Australia",
|
|
346
|
-
iso: "AU"
|
|
347
|
-
},
|
|
348
|
-
BG: {
|
|
349
|
-
value: "+359",
|
|
350
|
-
label: "Bulgaria",
|
|
351
|
-
iso: "BG"
|
|
352
|
-
},
|
|
353
|
-
GR: {
|
|
354
|
-
value: "+30",
|
|
355
|
-
label: "Greece",
|
|
356
|
-
iso: "GR"
|
|
357
|
-
},
|
|
358
|
-
GB: {
|
|
359
|
-
value: "+44",
|
|
360
|
-
label: "United Kingdom",
|
|
361
|
-
iso: "GB"
|
|
362
|
-
},
|
|
363
|
-
DE: {
|
|
364
|
-
value: "+49",
|
|
365
|
-
label: "Germany",
|
|
366
|
-
iso: "DE"
|
|
367
|
-
},
|
|
368
|
-
FR: {
|
|
369
|
-
value: "+33",
|
|
370
|
-
label: "France",
|
|
371
|
-
iso: "FR"
|
|
372
|
-
},
|
|
373
|
-
IT: {
|
|
374
|
-
value: "+39",
|
|
375
|
-
label: "Italy",
|
|
376
|
-
iso: "IT"
|
|
377
|
-
},
|
|
378
|
-
ES: {
|
|
379
|
-
value: "+34",
|
|
380
|
-
label: "Spain",
|
|
381
|
-
iso: "ES"
|
|
382
|
-
},
|
|
383
|
-
NL: {
|
|
384
|
-
value: "+31",
|
|
385
|
-
label: "Netherlands",
|
|
386
|
-
iso: "NL"
|
|
387
|
-
},
|
|
388
|
-
BE: {
|
|
389
|
-
value: "+32",
|
|
390
|
-
label: "Belgium",
|
|
391
|
-
iso: "BE"
|
|
392
|
-
},
|
|
393
|
-
AT: {
|
|
394
|
-
value: "+43",
|
|
395
|
-
label: "Austria",
|
|
396
|
-
iso: "AT"
|
|
397
|
-
},
|
|
398
|
-
CH: {
|
|
399
|
-
value: "+41",
|
|
400
|
-
label: "Switzerland",
|
|
401
|
-
iso: "CH"
|
|
402
|
-
},
|
|
403
|
-
PL: {
|
|
404
|
-
value: "+48",
|
|
405
|
-
label: "Poland",
|
|
406
|
-
iso: "PL"
|
|
407
|
-
},
|
|
408
|
-
RO: {
|
|
409
|
-
value: "+40",
|
|
410
|
-
label: "Romania",
|
|
411
|
-
iso: "RO"
|
|
412
|
-
},
|
|
413
|
-
RS: {
|
|
414
|
-
value: "+381",
|
|
415
|
-
label: "Serbia",
|
|
416
|
-
iso: "RS"
|
|
417
|
-
},
|
|
418
|
-
HR: {
|
|
419
|
-
value: "+385",
|
|
420
|
-
label: "Croatia",
|
|
421
|
-
iso: "HR"
|
|
422
|
-
},
|
|
423
|
-
SI: {
|
|
424
|
-
value: "+386",
|
|
425
|
-
label: "Slovenia",
|
|
426
|
-
iso: "SI"
|
|
427
|
-
},
|
|
428
|
-
MK: {
|
|
429
|
-
value: "+389",
|
|
430
|
-
label: "North Macedonia",
|
|
431
|
-
iso: "MK"
|
|
432
|
-
},
|
|
433
|
-
TR: {
|
|
434
|
-
value: "+90",
|
|
435
|
-
label: "Turkey",
|
|
436
|
-
iso: "TR"
|
|
437
|
-
},
|
|
438
|
-
RU: {
|
|
439
|
-
value: "+7",
|
|
440
|
-
label: "Russia",
|
|
441
|
-
iso: "RU"
|
|
442
|
-
},
|
|
443
|
-
UA: {
|
|
444
|
-
value: "+380",
|
|
445
|
-
label: "Ukraine",
|
|
446
|
-
iso: "UA"
|
|
447
|
-
},
|
|
448
|
-
SK: {
|
|
449
|
-
value: "+421",
|
|
450
|
-
label: "Slovakia",
|
|
451
|
-
iso: "SK"
|
|
452
|
-
},
|
|
453
|
-
CZ: {
|
|
454
|
-
value: "+420",
|
|
455
|
-
label: "Czech Republic",
|
|
456
|
-
iso: "CZ"
|
|
457
|
-
},
|
|
458
|
-
HU: {
|
|
459
|
-
value: "+36",
|
|
460
|
-
label: "Hungary",
|
|
461
|
-
iso: "HU"
|
|
462
|
-
},
|
|
463
|
-
PT: {
|
|
464
|
-
value: "+351",
|
|
465
|
-
label: "Portugal",
|
|
466
|
-
iso: "PT"
|
|
467
|
-
},
|
|
468
|
-
IE: {
|
|
469
|
-
value: "+353",
|
|
470
|
-
label: "Ireland",
|
|
471
|
-
iso: "IE"
|
|
472
|
-
},
|
|
473
|
-
SE: {
|
|
474
|
-
value: "+46",
|
|
475
|
-
label: "Sweden",
|
|
476
|
-
iso: "SE"
|
|
477
|
-
},
|
|
478
|
-
NO: {
|
|
479
|
-
value: "+47",
|
|
480
|
-
label: "Norway",
|
|
481
|
-
iso: "NO"
|
|
482
|
-
},
|
|
483
|
-
DK: {
|
|
484
|
-
value: "+45",
|
|
485
|
-
label: "Denmark",
|
|
486
|
-
iso: "DK"
|
|
487
|
-
},
|
|
488
|
-
FI: {
|
|
489
|
-
value: "+358",
|
|
490
|
-
label: "Finland",
|
|
491
|
-
iso: "FI"
|
|
492
|
-
},
|
|
493
|
-
CY: {
|
|
494
|
-
value: "+357",
|
|
495
|
-
label: "Cyprus",
|
|
496
|
-
iso: "CY"
|
|
497
|
-
},
|
|
498
|
-
AL: {
|
|
499
|
-
value: "+355",
|
|
500
|
-
label: "Albania",
|
|
501
|
-
iso: "AL"
|
|
502
|
-
},
|
|
503
|
-
ME: {
|
|
504
|
-
value: "+382",
|
|
505
|
-
label: "Montenegro",
|
|
506
|
-
iso: "ME"
|
|
507
|
-
},
|
|
508
|
-
BA: {
|
|
509
|
-
value: "+387",
|
|
510
|
-
label: "Bosnia and Herzegovina",
|
|
511
|
-
iso: "BA"
|
|
512
|
-
},
|
|
513
|
-
XK: {
|
|
514
|
-
value: "+383",
|
|
515
|
-
label: "Kosovo",
|
|
516
|
-
iso: "XK"
|
|
517
|
-
},
|
|
518
|
-
MD: {
|
|
519
|
-
value: "+373",
|
|
520
|
-
label: "Moldova",
|
|
521
|
-
iso: "MD"
|
|
522
|
-
},
|
|
523
|
-
BY: {
|
|
524
|
-
value: "+375",
|
|
525
|
-
label: "Belarus",
|
|
526
|
-
iso: "BY"
|
|
527
|
-
},
|
|
528
|
-
LT: {
|
|
529
|
-
value: "+370",
|
|
530
|
-
label: "Lithuania",
|
|
531
|
-
iso: "LT"
|
|
532
|
-
},
|
|
533
|
-
LV: {
|
|
534
|
-
value: "+371",
|
|
535
|
-
label: "Latvia",
|
|
536
|
-
iso: "LV"
|
|
537
|
-
},
|
|
538
|
-
EE: {
|
|
539
|
-
value: "+372",
|
|
540
|
-
label: "Estonia",
|
|
541
|
-
iso: "EE"
|
|
542
|
-
}
|
|
543
|
-
}, me = [
|
|
544
|
-
"US",
|
|
545
|
-
"CA",
|
|
546
|
-
"GB",
|
|
547
|
-
"DE",
|
|
548
|
-
"FR",
|
|
549
|
-
"IT",
|
|
550
|
-
"ES",
|
|
551
|
-
"AU"
|
|
552
|
-
], L = (e) => typeof e == "string" ? I[e.toUpperCase()] ?? null : e, he = (e) => e.map(L).filter((e) => e !== null), ge = (e, t) => {
|
|
553
|
-
let n = e.trim().replace(/\s+/g, " ").replace(/[^\d ()+-]/g, "");
|
|
554
|
-
return t && n.startsWith(t) && (n = n.slice(t.length).replace(/^[\s-]+/, "")), t && n.startsWith("0") && (n = n.slice(1)), n;
|
|
555
|
-
}, _e = (e, t) => e ? e.startsWith("+") ? e : I[e.toUpperCase()]?.value ?? e : t[0]?.value ?? "";
|
|
556
|
-
function R({ normalizeOnBlur: e = !0, onBlur: i, onChange: o, prefix: s, defaultPrefix: c, prefixes: l = me, onPrefixChange: u, disablePrefixSelector: d = !1, prefixPlaceholder: f, prefixWidth: p = "w-30", showCountryName: m = !0, showPrefixInDropdown: te = !0, invalid: g, disabled: _, readOnly: v, loading: y, className: w, size: T, strings: E, ...O }, ue) {
|
|
557
|
-
let { defaultScale: de } = t(), N = oe(T, de), P = _ || y, F = P || v, fe = n(pe, E), L = k(() => he(l), [l]), R = k(() => _e(c, L), [c, L]), [ve, ye] = A(R), [be, xe] = A(() => {
|
|
558
|
-
let e = s ?? c;
|
|
559
|
-
return e && !e.startsWith("+") ? e.toUpperCase() : L.find((e) => e.value === R)?.iso;
|
|
560
|
-
}), z = s !== void 0, B = z ? _e(s, L) : ve, V = k(() => {
|
|
561
|
-
if (!B || L.some((e) => e.value === B)) return L;
|
|
562
|
-
let e = Object.values(I).find((e) => e.value === B);
|
|
563
|
-
return e ? [e, ...L] : L;
|
|
564
|
-
}, [L, B]), H = k(() => V.find((e) => e.iso === (s && !s.startsWith("+") ? s.toUpperCase() : be) && e.value === B) ?? V.find((e) => e.value === B), [
|
|
565
|
-
V,
|
|
566
|
-
B,
|
|
567
|
-
be,
|
|
568
|
-
s
|
|
569
|
-
]), Se = D((e) => {
|
|
570
|
-
if (e === null || F) return;
|
|
571
|
-
let t = V.find((t) => t.iso === e);
|
|
572
|
-
t && (xe(t.iso), z || ye(t.value), u?.(t.value));
|
|
573
|
-
}, [
|
|
574
|
-
z,
|
|
575
|
-
u,
|
|
576
|
-
V,
|
|
577
|
-
F
|
|
578
|
-
]), Ce = D((e) => {
|
|
579
|
-
if (F || !o) return;
|
|
580
|
-
let t = e.target.value;
|
|
581
|
-
if (B && t.startsWith(B)) {
|
|
582
|
-
let n = t.slice(B.length).replace(/^[\s-]+/, ""), r = n.startsWith("0") ? n.slice(1) : n;
|
|
583
|
-
if (r !== t) {
|
|
584
|
-
o({
|
|
585
|
-
...e,
|
|
586
|
-
target: {
|
|
587
|
-
...e.target,
|
|
588
|
-
value: r
|
|
589
|
-
},
|
|
590
|
-
currentTarget: {
|
|
591
|
-
...e.currentTarget,
|
|
592
|
-
value: r
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
return;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
o(e);
|
|
599
|
-
}, [
|
|
600
|
-
F,
|
|
601
|
-
o,
|
|
602
|
-
B
|
|
603
|
-
]), we = D((t) => {
|
|
604
|
-
if (!F && e && typeof o == "function") {
|
|
605
|
-
let e = ge(t.target.value, B);
|
|
606
|
-
e !== t.target.value && o({
|
|
607
|
-
...t,
|
|
608
|
-
target: {
|
|
609
|
-
...t.target,
|
|
610
|
-
value: e
|
|
611
|
-
},
|
|
612
|
-
currentTarget: {
|
|
613
|
-
...t.currentTarget,
|
|
614
|
-
value: e
|
|
615
|
-
}
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
i?.(t);
|
|
619
|
-
}, [
|
|
620
|
-
F,
|
|
621
|
-
e,
|
|
622
|
-
o,
|
|
623
|
-
i,
|
|
624
|
-
B
|
|
625
|
-
]);
|
|
626
|
-
if (V.length === 0 || d) {
|
|
627
|
-
let e = B || c;
|
|
628
|
-
return e ? /* @__PURE__ */ M("div", {
|
|
629
|
-
className: "flex items-start gap-space-md",
|
|
630
|
-
children: [/* @__PURE__ */ j("div", {
|
|
631
|
-
"aria-invalid": g || void 0,
|
|
632
|
-
className: r("phone-input--prefix flex shrink-0 items-center justify-center rounded-inner border border-input bg-muted", re[N], ne[N], ie[N], P && "opacity-50", ee.invalid),
|
|
633
|
-
children: /* @__PURE__ */ j(a, {
|
|
634
|
-
tag: "span",
|
|
635
|
-
size: "inherit",
|
|
636
|
-
type: "secondary",
|
|
637
|
-
lineHeight: "tight",
|
|
638
|
-
children: e
|
|
639
|
-
})
|
|
640
|
-
}), /* @__PURE__ */ j("div", {
|
|
641
|
-
className: "flex-1",
|
|
642
|
-
children: /* @__PURE__ */ j(se, {
|
|
643
|
-
ref: ue,
|
|
644
|
-
size: N,
|
|
645
|
-
type: "tel",
|
|
646
|
-
autoComplete: "tel",
|
|
647
|
-
inputMode: "tel",
|
|
648
|
-
onChange: Ce,
|
|
649
|
-
onBlur: we,
|
|
650
|
-
invalid: g,
|
|
651
|
-
disabled: P,
|
|
652
|
-
readOnly: v,
|
|
653
|
-
loading: y,
|
|
654
|
-
className: w,
|
|
655
|
-
...O
|
|
656
|
-
})
|
|
657
|
-
})]
|
|
658
|
-
}) : /* @__PURE__ */ j(se, {
|
|
659
|
-
ref: ue,
|
|
660
|
-
size: N,
|
|
661
|
-
type: "tel",
|
|
662
|
-
autoComplete: "tel",
|
|
663
|
-
inputMode: "tel",
|
|
664
|
-
onChange: Ce,
|
|
665
|
-
onBlur: we,
|
|
666
|
-
invalid: g,
|
|
667
|
-
disabled: P,
|
|
668
|
-
readOnly: v,
|
|
669
|
-
loading: y,
|
|
670
|
-
className: r("phone-input--component", w),
|
|
671
|
-
...O
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
return /* @__PURE__ */ M("div", {
|
|
675
|
-
className: "flex items-start gap-space-md",
|
|
676
|
-
children: [/* @__PURE__ */ M(le, {
|
|
677
|
-
value: H?.iso ?? null,
|
|
678
|
-
onValueChange: (e) => Se(e),
|
|
679
|
-
disabled: F,
|
|
680
|
-
children: [/* @__PURE__ */ j(ce, {
|
|
681
|
-
"aria-label": fe.prefixAriaLabel,
|
|
682
|
-
"aria-invalid": g || void 0,
|
|
683
|
-
iconClassName: h.icon[N],
|
|
684
|
-
className: r("phone-input--prefix-trigger", ae(N), "shrink-0", p),
|
|
685
|
-
children: /* @__PURE__ */ j(C, {
|
|
686
|
-
placeholder: /* @__PURE__ */ j(a, {
|
|
687
|
-
tag: "span",
|
|
688
|
-
size: "inherit",
|
|
689
|
-
type: "secondary",
|
|
690
|
-
lineHeight: "tight",
|
|
691
|
-
className: "text-inherit",
|
|
692
|
-
children: f ?? fe.prefixPlaceholder
|
|
693
|
-
}),
|
|
694
|
-
children: !!H && /* @__PURE__ */ j(a, {
|
|
695
|
-
tag: "span",
|
|
696
|
-
size: "inherit",
|
|
697
|
-
lineHeight: "tight",
|
|
698
|
-
className: "text-inherit",
|
|
699
|
-
children: H.value
|
|
700
|
-
})
|
|
701
|
-
})
|
|
702
|
-
}), /* @__PURE__ */ j(b, { children: /* @__PURE__ */ j(x, { children: V.map((e) => /* @__PURE__ */ j(S, {
|
|
703
|
-
value: e.iso,
|
|
704
|
-
size: N,
|
|
705
|
-
children: /* @__PURE__ */ M("div", {
|
|
706
|
-
className: "flex items-center gap-space-md",
|
|
707
|
-
children: [!!te && /* @__PURE__ */ j(a, {
|
|
708
|
-
tag: "span",
|
|
709
|
-
size: "inherit",
|
|
710
|
-
weight: "medium",
|
|
711
|
-
lineHeight: "tight",
|
|
712
|
-
className: "min-w-13 tabular-nums text-inherit",
|
|
713
|
-
children: e.value
|
|
714
|
-
}), !!m && /* @__PURE__ */ j(a, {
|
|
715
|
-
tag: "span",
|
|
716
|
-
size: "inherit",
|
|
717
|
-
lineHeight: "tight",
|
|
718
|
-
className: "text-inherit",
|
|
719
|
-
children: e.label
|
|
720
|
-
})]
|
|
721
|
-
})
|
|
722
|
-
}, e.iso)) }) })]
|
|
723
|
-
}), /* @__PURE__ */ j("div", {
|
|
724
|
-
className: "flex-1",
|
|
725
|
-
children: /* @__PURE__ */ j(se, {
|
|
726
|
-
ref: ue,
|
|
727
|
-
size: N,
|
|
728
|
-
type: "tel",
|
|
729
|
-
autoComplete: "tel",
|
|
730
|
-
inputMode: "tel",
|
|
731
|
-
onChange: Ce,
|
|
732
|
-
onBlur: we,
|
|
733
|
-
invalid: g,
|
|
734
|
-
disabled: P,
|
|
735
|
-
readOnly: v,
|
|
736
|
-
loading: y,
|
|
737
|
-
className: w,
|
|
738
|
-
...O
|
|
739
|
-
})
|
|
740
|
-
})]
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
var ve = E(w.forwardRef(R));
|
|
744
|
-
ve.displayName = "PhoneInput";
|
|
745
|
-
//#endregion
|
|
746
|
-
//#region src/components/base/value-inputs/color-input.tsx
|
|
747
|
-
var ye = { chooseColor: "Choose color" }, be = {
|
|
748
|
-
sm: "size-control-sm",
|
|
749
|
-
md: "size-control",
|
|
750
|
-
lg: "size-control-lg"
|
|
751
|
-
};
|
|
752
|
-
function xe(e) {
|
|
753
|
-
let t = e.trim().toLowerCase();
|
|
754
|
-
return /^#[0-9a-f]{6}$/.test(t) ? t : /^#[0-9a-f]{3}$/.test(t) ? `#${t.slice(1).split("").map((e) => `${e}${e}`).join("")}` : null;
|
|
755
|
-
}
|
|
756
|
-
function z(e, t) {
|
|
757
|
-
let n = Number(e.toFixed(t));
|
|
758
|
-
return Object.is(n, -0) ? 0 : n;
|
|
759
|
-
}
|
|
760
|
-
function B(e) {
|
|
761
|
-
let t = xe(e);
|
|
762
|
-
if (!t) return e;
|
|
763
|
-
let [n, r, i] = [
|
|
764
|
-
1,
|
|
765
|
-
3,
|
|
766
|
-
5
|
|
767
|
-
].map((e) => Number.parseInt(t.slice(e, e + 2), 16) / 255).map((e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4), a = Math.cbrt(.4122214708 * n + .5363325363 * r + .0514459929 * i), o = Math.cbrt(.2119034982 * n + .6806995451 * r + .1073969566 * i), s = Math.cbrt(.0883024619 * n + .2817188376 * r + .6299787005 * i), c = .2104542553 * a + .793617785 * o - .0040720468 * s, l = 1.9779984951 * a - 2.428592205 * o + .4505937099 * s, u = .0259040371 * a + .7827717662 * o - .808675766 * s, d = Math.hypot(l, u), f = d < 5e-5 ? 0 : Math.atan2(u, l) * 180 / Math.PI + (u < 0 ? 360 : 0);
|
|
768
|
-
return `oklch(${z(c, 4)} ${z(d, 4)} ${z(f, 2)})`;
|
|
769
|
-
}
|
|
770
|
-
function V(e, t) {
|
|
771
|
-
let n = window.getComputedStyle(e).backgroundColor, r = xe(n);
|
|
772
|
-
if (r) return r;
|
|
773
|
-
if (typeof CanvasRenderingContext2D > "u") return t;
|
|
774
|
-
try {
|
|
775
|
-
let e = document.createElement("canvas");
|
|
776
|
-
e.width = 1, e.height = 1;
|
|
777
|
-
let r = e.getContext("2d", { willReadFrequently: !0 });
|
|
778
|
-
if (!r) return t;
|
|
779
|
-
r.clearRect(0, 0, 1, 1), r.fillStyle = n, r.fillRect(0, 0, 1, 1);
|
|
780
|
-
let [i, a, o, s] = r.getImageData(0, 0, 1, 1).data;
|
|
781
|
-
return s === 0 ? t : `#${[
|
|
782
|
-
i,
|
|
783
|
-
a,
|
|
784
|
-
o
|
|
785
|
-
].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
786
|
-
} catch {
|
|
787
|
-
return t;
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
var H = w.forwardRef(function({ className: e, value: i, defaultValue: a, onChange: o, onValueChange: s, previewValue: l, pickerAriaLabel: u, size: d, disabled: f, readOnly: p, loading: m, invalid: h, strings: te, inputStrings: ne, ...re }, g) {
|
|
791
|
-
let ie = n(ye, te), { defaultScale: ae } = t(), _ = oe(d, ae), v = f || p || m, [y, ce] = w.useState(a ?? ""), b = i ?? y, x = l ?? b, le = xe(b) ?? "#000000", [S, C] = w.useState(le), T = w.useRef(null);
|
|
792
|
-
w.useLayoutEffect(() => {
|
|
793
|
-
let e = xe(x);
|
|
794
|
-
if (e) {
|
|
795
|
-
C(e);
|
|
796
|
-
return;
|
|
797
|
-
}
|
|
798
|
-
T.current && typeof window < "u" && C((e) => V(T.current, e));
|
|
799
|
-
}, [x]);
|
|
800
|
-
let E = (e) => {
|
|
801
|
-
i === void 0 && ce(e.target.value), o?.(e), s?.(e.target.value);
|
|
802
|
-
};
|
|
803
|
-
return /* @__PURE__ */ M(c, {
|
|
804
|
-
direction: "horizontal",
|
|
805
|
-
gap: "sm",
|
|
806
|
-
align: "center",
|
|
807
|
-
wrap: !1,
|
|
808
|
-
className: r("color-input--component min-w-0 [&>.input--component]:min-w-0 [&>.input--component]:flex-1", e),
|
|
809
|
-
children: [/* @__PURE__ */ M("label", {
|
|
810
|
-
"aria-invalid": h || void 0,
|
|
811
|
-
className: r("color-input--picker box-border relative shrink-0 cursor-pointer overflow-hidden rounded-inner border border-input bg-background shadow-none outline-none transition-[color,box-shadow]", "has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-ring/50", ee.invalid, "aria-invalid:has-[input:focus-visible]:border-destructive aria-invalid:has-[input:focus-visible]:ring-destructive/30 dark:aria-invalid:has-[input:focus-visible]:ring-destructive/50", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", be[_]),
|
|
812
|
-
"data-disabled": v || void 0,
|
|
813
|
-
children: [/* @__PURE__ */ j("span", {
|
|
814
|
-
ref: T,
|
|
815
|
-
"aria-hidden": "true",
|
|
816
|
-
"data-user-color": !0,
|
|
817
|
-
className: "color-input--swatch absolute inset-1 rounded-radius-xs",
|
|
818
|
-
style: { background: x || "transparent" }
|
|
819
|
-
}), /* @__PURE__ */ j("input", {
|
|
820
|
-
type: "color",
|
|
821
|
-
value: S,
|
|
822
|
-
disabled: v,
|
|
823
|
-
"aria-label": u ?? ie.chooseColor,
|
|
824
|
-
onInput: (e) => {
|
|
825
|
-
if (v) return;
|
|
826
|
-
let t = B(e.currentTarget.value);
|
|
827
|
-
i === void 0 && ce(t), o && o({
|
|
828
|
-
...e,
|
|
829
|
-
target: {
|
|
830
|
-
...e.currentTarget,
|
|
831
|
-
value: t
|
|
832
|
-
},
|
|
833
|
-
currentTarget: {
|
|
834
|
-
...e.currentTarget,
|
|
835
|
-
value: t
|
|
836
|
-
}
|
|
837
|
-
}), s?.(t);
|
|
838
|
-
},
|
|
839
|
-
className: "color-input--native absolute inset-0 size-full cursor-pointer opacity-0"
|
|
840
|
-
})]
|
|
841
|
-
}), /* @__PURE__ */ j(se, {
|
|
842
|
-
...re,
|
|
843
|
-
ref: g,
|
|
844
|
-
size: _,
|
|
845
|
-
value: b,
|
|
846
|
-
disabled: f,
|
|
847
|
-
readOnly: p,
|
|
848
|
-
loading: m,
|
|
849
|
-
invalid: h,
|
|
850
|
-
onChange: E,
|
|
851
|
-
strings: ne,
|
|
852
|
-
className: "min-w-0 flex-1 font-mono"
|
|
853
|
-
})]
|
|
854
|
-
});
|
|
855
|
-
});
|
|
856
|
-
H.displayName = "ColorInput";
|
|
857
|
-
//#endregion
|
|
858
|
-
//#region src/components/base/value-inputs/slider.tsx
|
|
859
|
-
var Se = { ariaLabel: "Value" };
|
|
860
|
-
function Ce({ name: e, id: t, "aria-label": i, "aria-labelledby": o, "aria-describedby": s, strings: c, value: u, defaultValue: d, min: f = 0, max: p = 100, step: ee = 1, disabled: m = !1, invalid: h = !1, onChange: te, onValueChange: ne, onValueCommitted: re, showValue: g = !1, formatValue: ie, unit: ae, className: oe, orientation: se = "horizontal" }, _) {
|
|
861
|
-
let v = O(), y = n(Se, c), ce = t ?? `slider-${v}`, b = e ?? ce, x = i ?? y.ariaLabel, le = u !== void 0, [S, C] = A(() => d ?? f), w = D((e) => {
|
|
862
|
-
let t = Array.isArray(e) ? e[0] : e;
|
|
863
|
-
le || C(t), ne?.(t), te?.({ target: {
|
|
864
|
-
name: b,
|
|
865
|
-
value: t
|
|
866
|
-
} });
|
|
867
|
-
}, [
|
|
868
|
-
le,
|
|
869
|
-
b,
|
|
870
|
-
te,
|
|
871
|
-
ne
|
|
872
|
-
]), T = D((e) => {
|
|
873
|
-
let t = Array.isArray(e) ? e[0] : e;
|
|
874
|
-
re?.(t);
|
|
875
|
-
}, [re]), E = k(() => {
|
|
876
|
-
if (!g) return null;
|
|
877
|
-
let e = Math.min(p, Math.max(f, u ?? S));
|
|
878
|
-
return ie ? ie(e) : ae ? `${e}${ae}` : String(e);
|
|
879
|
-
}, [
|
|
880
|
-
g,
|
|
881
|
-
u,
|
|
882
|
-
S,
|
|
883
|
-
f,
|
|
884
|
-
p,
|
|
885
|
-
ie,
|
|
886
|
-
ae
|
|
887
|
-
]), ue = u === void 0 ? void 0 : [u], de = d === void 0 ? [f] : [d];
|
|
888
|
-
return /* @__PURE__ */ M("div", {
|
|
889
|
-
className: r("slider--component", "flex items-center gap-space-lg", oe),
|
|
890
|
-
children: [/* @__PURE__ */ j(N.Root, {
|
|
891
|
-
ref: _,
|
|
892
|
-
"data-slot": "slider",
|
|
893
|
-
id: ce,
|
|
894
|
-
"aria-label": x,
|
|
895
|
-
"aria-labelledby": o,
|
|
896
|
-
"aria-describedby": s,
|
|
897
|
-
value: ue,
|
|
898
|
-
defaultValue: de,
|
|
899
|
-
min: f,
|
|
900
|
-
max: p,
|
|
901
|
-
step: ee,
|
|
902
|
-
disabled: m,
|
|
903
|
-
orientation: se,
|
|
904
|
-
onValueChange: w,
|
|
905
|
-
onValueCommitted: T,
|
|
906
|
-
"aria-invalid": h || void 0,
|
|
907
|
-
className: r("box-border data-[orientation=horizontal]:w-full data-[orientation=horizontal]:px-[calc(var(--icon)/2)] data-[orientation=vertical]:h-full", "min-w-0 flex-1", h && "[&_[data-slot=slider-range]]:bg-destructive"),
|
|
908
|
-
children: /* @__PURE__ */ M(N.Control, {
|
|
909
|
-
className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-[orientation=horizontal]:min-h-control data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
910
|
-
children: [/* @__PURE__ */ j(N.Track, {
|
|
911
|
-
"data-slot": "slider-track",
|
|
912
|
-
className: r("relative grow overflow-hidden rounded-full bg-muted select-none data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full", l),
|
|
913
|
-
children: /* @__PURE__ */ j(N.Indicator, {
|
|
914
|
-
"data-slot": "slider-range",
|
|
915
|
-
className: "absolute bg-primary select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
916
|
-
})
|
|
917
|
-
}), /* @__PURE__ */ j(N.Thumb, {
|
|
918
|
-
index: 0,
|
|
919
|
-
"data-slot": "slider-thumb",
|
|
920
|
-
getAriaLabel: () => x,
|
|
921
|
-
className: r("block size-icon shrink-0 rounded-full border border-primary bg-background shadow-sm transition-[color,box-shadow] select-none", "has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/50 data-disabled:pointer-events-none", h && "border-destructive has-[:focus-visible]:ring-destructive/30 dark:has-[:focus-visible]:ring-destructive/50")
|
|
922
|
-
})]
|
|
923
|
-
})
|
|
924
|
-
}), !!g && E !== null && /* @__PURE__ */ j(a, {
|
|
925
|
-
tag: "span",
|
|
926
|
-
type: h ? "error" : "secondary",
|
|
927
|
-
className: "min-w-8 shrink-0 text-right tabular-nums",
|
|
928
|
-
children: E
|
|
929
|
-
})]
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
var we = w.forwardRef(Ce);
|
|
933
|
-
we.displayName = "SliderField";
|
|
934
|
-
//#endregion
|
|
935
|
-
//#region src/components/base/value-inputs/date-time-input.tsx
|
|
936
|
-
var U = T(function({ value: e, onValueChange: t, placeholder: n, readableFormat: r = "dd-MM-yyyy HH:mm", stepMinutes: i = 30, modal: a = !0, invalid: o, disabled: s, id: c }, l) {
|
|
937
|
-
let u = e ? new Date(e) : void 0, d = D((e) => {
|
|
938
|
-
t?.(e.date ? e.date.toISOString() : void 0);
|
|
939
|
-
}, [t]);
|
|
940
|
-
return /* @__PURE__ */ j(_, {
|
|
941
|
-
ref: l,
|
|
942
|
-
className: "date-time-input--component",
|
|
943
|
-
id: c,
|
|
944
|
-
mode: "single",
|
|
945
|
-
disabled: s,
|
|
946
|
-
invalid: o,
|
|
947
|
-
placeholder: n,
|
|
948
|
-
value: u,
|
|
949
|
-
onValueChange: d,
|
|
950
|
-
readableFormat: r,
|
|
951
|
-
withTime: {
|
|
952
|
-
enabled: !0,
|
|
953
|
-
format: "24",
|
|
954
|
-
step: i * 60
|
|
955
|
-
},
|
|
956
|
-
modal: a
|
|
957
|
-
});
|
|
958
|
-
});
|
|
959
|
-
U.displayName = "DateTimeInput";
|
|
960
|
-
//#endregion
|
|
961
|
-
export { ye as a, ve as c, P as d, H as i, pe as l, we as n, I as o, Se as r, me as s, U as t, fe as u };
|
|
962
|
-
|
|
963
|
-
//# sourceMappingURL=value-inputs-TaX4OjNk.js.map
|