@alfadocs/ui-kit 0.1.8 → 0.1.9
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/dist/_chunks/{accordion-B6fyINUk.js → accordion-BEnrZmAn.js} +34 -32
- package/dist/_chunks/accordion.agent-BTjeO1Sx.js +52 -0
- package/dist/_chunks/{agenda-card-DIWDvWum.js → agenda-card-DwLIxgi7.js} +2 -1
- package/dist/_chunks/agenda-card.agent-B_R47-c9.js +22 -0
- package/dist/_chunks/agenda-tray-DUvengGQ.js +178 -0
- package/dist/_chunks/ai-prompt-input.agent-0NHYLTWD.js +476 -0
- package/dist/_chunks/{aspect-ratio-CxsdG8vk.js → aspect-ratio-DeSNzASA.js} +12 -12
- package/dist/_chunks/audio-recorder.agent--VKeykUp.js +458 -0
- package/dist/_chunks/autocomplete.agent-Dh7KioS6.js +432 -0
- package/dist/_chunks/{balance-cell-renderer-BWm3knY9.js → balance-cell-renderer-5CA7zpAi.js} +3 -3
- package/dist/_chunks/breadcrumb.agent-GM2hAKFX.js +371 -0
- package/dist/_chunks/{chart.agent-BdS-_8MO.js → chart.agent-_pRYS17d.js} +112 -105
- package/dist/_chunks/{chat-container-Cm3SlR2p.js → chat-container-Dl0Kfy5a.js} +33 -32
- package/dist/_chunks/{chat-container.agent-Dhw9xCJt.js → chat-container.agent-CM4WModE.js} +9 -4
- package/dist/_chunks/{chat-input-DreOPP8A.js → chat-input-C_tMQv92.js} +108 -82
- package/dist/_chunks/chat-input.agent-Bsz3ckGa.js +69 -0
- package/dist/_chunks/checkbox-CtPM6Rup.js +196 -0
- package/dist/_chunks/checkbox-group-BTdEB6Yo.js +208 -0
- package/dist/_chunks/collapsible.agent-DkS1jVyn.js +149 -0
- package/dist/_chunks/{color-picker-e9PmpaGH.js → color-picker-94qcBZqZ.js} +234 -184
- package/dist/_chunks/combobox.agent-CAvUkkIe.js +410 -0
- package/dist/_chunks/{command-palette.agent-js2rxgeR.js → command-palette.agent-HatEt_EM.js} +161 -121
- package/dist/_chunks/date-picker-BqPTn7bO.js +1813 -0
- package/dist/_chunks/date-range-picker-B2hGsffw.js +274 -0
- package/dist/_chunks/date-time-picker-Bzt0S8yO.js +293 -0
- package/dist/_chunks/dialog.agent-Daf1TTko.js +179 -0
- package/dist/_chunks/{dropdown-menu-Cw3EyPZv.js → dropdown-menu-C7AZipNz.js} +75 -71
- package/dist/_chunks/dropdown-menu.agent-BcxIKOjK.js +43 -0
- package/dist/_chunks/{file-upload.agent-B9AN82LA.js → file-upload.agent-DJaH2dHg.js} +275 -243
- package/dist/_chunks/freemium-paywall.agent-_nQqLyRF.js +260 -0
- package/dist/_chunks/{leo-sidebar-nbHib2D-.js → leo-sidebar-BwINPdix.js} +6 -6
- package/dist/_chunks/link-QheANk74.js +121 -0
- package/dist/_chunks/list.agent-D0iWt4VI.js +420 -0
- package/dist/_chunks/{message-card-qAp2-WQK.js → message-card-qhoGv947.js} +2 -1
- package/dist/_chunks/message-card.agent-4IeIgrnJ.js +22 -0
- package/dist/_chunks/message-tray-xHUCra-Y.js +419 -0
- package/dist/_chunks/{multi-select.agent-CNsyW3n9.js → multi-select.agent-Do6CeQUT.js} +239 -179
- package/dist/_chunks/navigation-menu.agent-D69ND6Qq.js +266 -0
- package/dist/_chunks/{notification-card-BF2_veHy.js → notification-card-CsVEYJE-.js} +13 -12
- package/dist/_chunks/notification-card.agent-Rqt3ofk9.js +22 -0
- package/dist/_chunks/notification-tray-DTXMq42J.js +444 -0
- package/dist/_chunks/number-input-fvGmnRy9.js +333 -0
- package/dist/_chunks/otp-input-EglXOUue.js +257 -0
- package/dist/_chunks/pagination.agent-BkZQl45y.js +422 -0
- package/dist/_chunks/password-input-D6kuYXmr.js +304 -0
- package/dist/_chunks/{patient-shell-7cXqIMFg.js → patient-shell-BRmrrUUW.js} +3 -3
- package/dist/_chunks/{payment-form-hcl-gGrp.js → payment-form-BWaXas8z.js} +120 -118
- package/dist/_chunks/{payment-form.agent-BkEnRerR.js → payment-form.agent-kuIfodCj.js} +7 -2
- package/dist/_chunks/{pdf-viewer.agent-CfIHhcHx.js → pdf-viewer.agent-BaGEDheA.js} +358 -351
- package/dist/_chunks/phone-input-C8Op4sEc.js +513 -0
- package/dist/_chunks/popover-kFN8s84V.js +229 -0
- package/dist/_chunks/popover.agent-K_d1cfbj.js +39 -0
- package/dist/_chunks/privacy-lock.agent-C1i1-T58.js +185 -0
- package/dist/_chunks/progress-wNsqkw8I.js +253 -0
- package/dist/_chunks/progress.agent-C68rDOXL.js +27 -0
- package/dist/_chunks/{radio-cs8N1wJi.js → radio-DvF59ThA.js} +14 -13
- package/dist/_chunks/radio-group-Cz1a4QCA.js +152 -0
- package/dist/_chunks/recaptcha-widget.agent-BGHpU5zD.js +183 -0
- package/dist/_chunks/resizable.agent-CMwZzvsi.js +456 -0
- package/dist/_chunks/{rich-text-editor.agent-COSb5_2D.js → rich-text-editor.agent-DnE125Tz.js} +221 -214
- package/dist/_chunks/search-bar.agent-DxFAxctc.js +562 -0
- package/dist/_chunks/search-input-Xw3cdWXW.js +227 -0
- package/dist/_chunks/search-input.agent-CfZvViOd.js +69 -0
- package/dist/_chunks/select-DY1Cb2Tg.js +410 -0
- package/dist/_chunks/{sheet-BhNpLHc9.js → sheet-B9kH9pcI.js} +55 -54
- package/dist/_chunks/sheet.agent-QAyTOxgk.js +46 -0
- package/dist/_chunks/{sidebar-OVzwN3jE.js → sidebar-CHF5xr_P.js} +188 -185
- package/dist/_chunks/sidebar.agent-C9TM_ZDZ.js +49 -0
- package/dist/_chunks/{signature-capture.agent-C38VPXxg.js → signature-capture.agent-BpeDwFht.js} +127 -120
- package/dist/_chunks/slider-CcsQTZTA.js +322 -0
- package/dist/_chunks/sparkline.agent-56Sj7nOP.js +245 -0
- package/dist/_chunks/stepper-accordion.agent-ckKYZCIP.js +322 -0
- package/dist/_chunks/stepper-calendar.agent-9iT3ClIB.js +646 -0
- package/dist/_chunks/stepper-progress-Bmen-YXB.js +149 -0
- package/dist/_chunks/stepper-progress.agent-q9InWca4.js +61 -0
- package/dist/_chunks/suggestion-chip-DhFrkRPj.js +169 -0
- package/dist/_chunks/suggestion-chip.agent-6sNWFj7m.js +46 -0
- package/dist/_chunks/switch-BYEH8I53.js +196 -0
- package/dist/_chunks/{tabs.agent-BpbVA-Zh.js → tabs.agent-h7NvsTR1.js} +146 -123
- package/dist/_chunks/{task-card-yW7tKlG4.js → task-card-CY5ztNkU.js} +2 -1
- package/dist/_chunks/task-card.agent-CUPKYd7w.js +22 -0
- package/dist/_chunks/task-tray-CCoUdorl.js +194 -0
- package/dist/_chunks/text-area-C_M8wliK.js +239 -0
- package/dist/_chunks/text-input-BX39e6T6.js +272 -0
- package/dist/_chunks/theme-toggle.agent-btmXTWdW.js +394 -0
- package/dist/_chunks/time-picker-B8AMIrX7.js +410 -0
- package/dist/_chunks/timeline.agent-CRPza9wc.js +279 -0
- package/dist/_chunks/{toast-lOhJDKOH.js → toast.agent-BjEGuq1Z.js} +403 -342
- package/dist/_chunks/{tooth-scheme.agent-BlDyu-Gx.js → tooth-scheme.agent-CWrQBjJM.js} +218 -211
- package/dist/_chunks/transcript-panel.agent-BXEYP6w-.js +337 -0
- package/dist/_chunks/{workflow-map-XeqHDFvp.js → workflow-map-D2A7rTEG.js} +465 -368
- package/dist/agent-catalog.json +2929 -268
- package/dist/components/accordion/accordion.agent.d.ts +2 -1
- package/dist/components/accordion/accordion.d.ts +6 -0
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/agenda-card/agenda-card.agent.d.ts +3 -0
- package/dist/components/agenda-card/index.d.ts +1 -0
- package/dist/components/agenda-card/index.js +3 -1
- package/dist/components/agenda-tray/agenda-tray.agent.d.ts +4 -0
- package/dist/components/agenda-tray/agenda-tray.d.ts +19 -2
- package/dist/components/agenda-tray/index.d.ts +2 -1
- package/dist/components/agenda-tray/index.js +3 -2
- package/dist/components/ai-prompt-input/ai-prompt-input.agent.d.ts +4 -0
- package/dist/components/ai-prompt-input/ai-prompt-input.d.ts +18 -1
- package/dist/components/ai-prompt-input/index.d.ts +2 -1
- package/dist/components/ai-prompt-input/index.js +3 -2
- package/dist/components/aspect-ratio/index.js +1 -1
- package/dist/components/audio-recorder/audio-recorder.agent.d.ts +4 -0
- package/dist/components/audio-recorder/audio-recorder.d.ts +10 -1
- package/dist/components/audio-recorder/index.d.ts +2 -1
- package/dist/components/audio-recorder/index.js +3 -2
- package/dist/components/autocomplete/autocomplete.agent.d.ts +2 -1
- package/dist/components/autocomplete/autocomplete.d.ts +10 -0
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.agent.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +21 -2
- package/dist/components/breadcrumb/index.d.ts +2 -1
- package/dist/components/breadcrumb/index.js +5 -4
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/chart/chart.d.ts +2 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +3 -1
- package/dist/components/chat-container/index.js +2 -2
- package/dist/components/chat-input/chat-input.agent.d.ts +4 -0
- package/dist/components/chat-input/chat-input.d.ts +10 -1
- package/dist/components/chat-input/index.d.ts +2 -1
- package/dist/components/chat-input/index.js +4 -2
- package/dist/components/checkbox/checkbox.agent.d.ts +4 -0
- package/dist/components/checkbox/checkbox.d.ts +6 -0
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.agent.d.ts +4 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +8 -0
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/collapsible.agent.d.ts +4 -0
- package/dist/components/collapsible/collapsible.d.ts +8 -1
- package/dist/components/collapsible/index.d.ts +2 -1
- package/dist/components/collapsible/index.js +4 -3
- package/dist/components/color-picker/color-picker.agent.d.ts +4 -0
- package/dist/components/color-picker/color-picker.d.ts +5 -0
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/combobox.agent.d.ts +2 -1
- package/dist/components/combobox/combobox.d.ts +10 -0
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.agent.d.ts +2 -1
- package/dist/components/command-palette/command-palette.d.ts +7 -0
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.agent.d.ts +4 -0
- package/dist/components/date-picker/date-picker.d.ts +16 -1
- package/dist/components/date-picker/index.d.ts +2 -1
- package/dist/components/date-picker/index.js +3 -2
- package/dist/components/date-range-picker/date-range-picker.agent.d.ts +4 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +16 -1
- package/dist/components/date-range-picker/index.d.ts +2 -1
- package/dist/components/date-range-picker/index.js +3 -2
- package/dist/components/date-time-picker/date-time-picker.agent.d.ts +4 -0
- package/dist/components/date-time-picker/date-time-picker.d.ts +16 -1
- package/dist/components/date-time-picker/index.d.ts +2 -1
- package/dist/components/date-time-picker/index.js +3 -2
- package/dist/components/dialog/dialog.agent.d.ts +5 -6
- package/dist/components/dialog/dialog.d.ts +11 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.agent.d.ts +2 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +10 -2
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/file-upload/file-upload.agent.d.ts +2 -1
- package/dist/components/file-upload/file-upload.d.ts +12 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.agent.d.ts +4 -0
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +8 -1
- package/dist/components/freemium-paywall/index.d.ts +2 -1
- package/dist/components/freemium-paywall/index.js +3 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/link/index.js +5 -0
- package/dist/components/link/link.d.ts +39 -0
- package/dist/components/list/index.d.ts +2 -1
- package/dist/components/list/index.js +3 -2
- package/dist/components/list/list.agent.d.ts +4 -0
- package/dist/components/list/list.d.ts +8 -2
- package/dist/components/message-card/index.d.ts +1 -0
- package/dist/components/message-card/index.js +5 -3
- package/dist/components/message-card/message-card.agent.d.ts +3 -0
- package/dist/components/message-tray/index.d.ts +2 -1
- package/dist/components/message-tray/index.js +3 -2
- package/dist/components/message-tray/message-tray.agent.d.ts +4 -0
- package/dist/components/message-tray/message-tray.d.ts +27 -2
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.agent.d.ts +2 -1
- package/dist/components/multi-select/multi-select.d.ts +10 -0
- package/dist/components/navigation-menu/index.d.ts +2 -1
- package/dist/components/navigation-menu/index.js +7 -6
- package/dist/components/navigation-menu/navigation-menu.agent.d.ts +4 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +28 -2
- package/dist/components/notification-card/index.d.ts +1 -0
- package/dist/components/notification-card/index.js +5 -3
- package/dist/components/notification-card/notification-card.agent.d.ts +3 -0
- package/dist/components/notification-tray/index.d.ts +2 -1
- package/dist/components/notification-tray/index.js +3 -2
- package/dist/components/notification-tray/notification-tray.agent.d.ts +4 -0
- package/dist/components/notification-tray/notification-tray.d.ts +27 -2
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.agent.d.ts +4 -0
- package/dist/components/number-input/number-input.d.ts +7 -0
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.agent.d.ts +4 -0
- package/dist/components/otp-input/otp-input.d.ts +10 -0
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/pagination.agent.d.ts +2 -1
- package/dist/components/pagination/pagination.d.ts +7 -0
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/password-input/password-input.agent.d.ts +4 -0
- package/dist/components/password-input/password-input.d.ts +9 -0
- package/dist/components/payment-form/index.js +2 -2
- package/dist/components/payment-form/payment-form.d.ts +2 -0
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +2 -0
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.agent.d.ts +4 -0
- package/dist/components/phone-input/phone-input.d.ts +7 -0
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.agent.d.ts +2 -1
- package/dist/components/popover/popover.d.ts +8 -1
- package/dist/components/privacy-lock/index.d.ts +2 -1
- package/dist/components/privacy-lock/index.js +3 -2
- package/dist/components/privacy-lock/privacy-lock.agent.d.ts +4 -0
- package/dist/components/privacy-lock/privacy-lock.d.ts +7 -1
- package/dist/components/progress/index.js +2 -2
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radio-group/radio-group.agent.d.ts +4 -0
- package/dist/components/radio-group/radio-group.d.ts +5 -0
- package/dist/components/recaptcha-widget/index.d.ts +3 -0
- package/dist/components/recaptcha-widget/index.js +6 -0
- package/dist/components/recaptcha-widget/recaptcha-widget.agent.d.ts +4 -0
- package/dist/components/recaptcha-widget/recaptcha-widget.d.ts +56 -0
- package/dist/components/resizable/index.js +1 -1
- package/dist/components/resizable/resizable.agent.d.ts +2 -1
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +2 -0
- package/dist/components/search-bar/index.d.ts +2 -1
- package/dist/components/search-bar/index.js +3 -2
- package/dist/components/search-bar/search-bar.agent.d.ts +4 -0
- package/dist/components/search-bar/search-bar.d.ts +27 -1
- package/dist/components/search-input/index.d.ts +2 -1
- package/dist/components/search-input/index.js +4 -2
- package/dist/components/search-input/search-input.agent.d.ts +4 -0
- package/dist/components/search-input/search-input.d.ts +27 -0
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.agent.d.ts +4 -0
- package/dist/components/select/select.d.ts +9 -0
- package/dist/components/sheet/index.js +2 -2
- package/dist/components/sheet/sheet.agent.d.ts +2 -1
- package/dist/components/sheet/sheet.d.ts +11 -2
- package/dist/components/sidebar/index.js +2 -2
- package/dist/components/sidebar/sidebar.agent.d.ts +2 -1
- package/dist/components/sidebar/sidebar.d.ts +6 -0
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/signature-capture/signature-capture.d.ts +2 -0
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/slider.agent.d.ts +4 -0
- package/dist/components/slider/slider.d.ts +5 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/stepper-accordion/index.d.ts +2 -1
- package/dist/components/stepper-accordion/index.js +3 -2
- package/dist/components/stepper-accordion/stepper-accordion.agent.d.ts +4 -0
- package/dist/components/stepper-accordion/stepper-accordion.d.ts +19 -1
- package/dist/components/stepper-calendar/index.d.ts +2 -1
- package/dist/components/stepper-calendar/index.js +3 -2
- package/dist/components/stepper-calendar/stepper-calendar.agent.d.ts +4 -0
- package/dist/components/stepper-calendar/stepper-calendar.d.ts +19 -1
- package/dist/components/stepper-progress/index.d.ts +2 -1
- package/dist/components/stepper-progress/index.js +4 -2
- package/dist/components/stepper-progress/stepper-progress.agent.d.ts +4 -0
- package/dist/components/stepper-progress/stepper-progress.d.ts +26 -1
- package/dist/components/suggestion-chip/index.d.ts +2 -1
- package/dist/components/suggestion-chip/index.js +5 -3
- package/dist/components/suggestion-chip/suggestion-chip.agent.d.ts +4 -0
- package/dist/components/suggestion-chip/suggestion-chip.d.ts +7 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/switch.agent.d.ts +4 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tabs.agent.d.ts +2 -1
- package/dist/components/tabs/tabs.d.ts +4 -0
- package/dist/components/task-card/index.d.ts +1 -0
- package/dist/components/task-card/index.js +5 -3
- package/dist/components/task-card/task-card.agent.d.ts +3 -0
- package/dist/components/task-tray/index.d.ts +2 -1
- package/dist/components/task-tray/index.js +3 -2
- package/dist/components/task-tray/task-tray.agent.d.ts +4 -0
- package/dist/components/task-tray/task-tray.d.ts +25 -2
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-area/text-area.agent.d.ts +4 -0
- package/dist/components/text-area/text-area.d.ts +7 -0
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/text-input/text-input.agent.d.ts +4 -0
- package/dist/components/text-input/text-input.d.ts +10 -0
- package/dist/components/theme-toggle/index.d.ts +2 -1
- package/dist/components/theme-toggle/index.js +3 -2
- package/dist/components/theme-toggle/theme-toggle.agent.d.ts +4 -0
- package/dist/components/theme-toggle/theme-toggle.d.ts +9 -2
- package/dist/components/time-picker/index.d.ts +2 -1
- package/dist/components/time-picker/index.js +3 -2
- package/dist/components/time-picker/time-picker.agent.d.ts +4 -0
- package/dist/components/time-picker/time-picker.d.ts +16 -1
- package/dist/components/timeline/index.d.ts +2 -1
- package/dist/components/timeline/index.js +3 -2
- package/dist/components/timeline/timeline.agent.d.ts +4 -0
- package/dist/components/timeline/timeline.d.ts +8 -1
- package/dist/components/toast/index.d.ts +3 -2
- package/dist/components/toast/index.js +7 -5
- package/dist/components/toast/toast.agent.d.ts +4 -0
- package/dist/components/toast/toast.d.ts +8 -0
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +2 -0
- package/dist/components/transcript-panel/index.d.ts +2 -1
- package/dist/components/transcript-panel/index.js +3 -2
- package/dist/components/transcript-panel/transcript-panel.agent.d.ts +4 -0
- package/dist/components/transcript-panel/transcript-panel.d.ts +10 -1
- package/dist/components/workflow/index.d.ts +2 -1
- package/dist/components/workflow/index.js +10 -7
- package/dist/components/workflow/workflow-editor.d.ts +7 -1
- package/dist/components/workflow/workflow-map.d.ts +2 -0
- package/dist/components/workflow/workflow.agent.d.ts +6 -0
- package/dist/i18n/config.js +24 -11
- package/dist/i18n/resources.d.ts +7 -0
- package/dist/index.js +471 -423
- package/dist/locales/en.json +7 -0
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +18 -2
- package/dist/_chunks/accordion.agent-Cz-yglRa.js +0 -17
- package/dist/_chunks/agenda-tray-BqQZwiHc.js +0 -120
- package/dist/_chunks/ai-prompt-input-CI27KmZ1.js +0 -380
- package/dist/_chunks/audio-recorder-B-8SKgKn.js +0 -376
- package/dist/_chunks/autocomplete.agent-DqOy0_1P.js +0 -372
- package/dist/_chunks/breadcrumb-D6xpsP7n.js +0 -293
- package/dist/_chunks/checkbox-DNK4qS2_.js +0 -116
- package/dist/_chunks/checkbox-group-CWpGZEF6.js +0 -146
- package/dist/_chunks/collapsible-D4LOdLxp.js +0 -67
- package/dist/_chunks/combobox.agent-ByobCLJ_.js +0 -350
- package/dist/_chunks/date-picker-DYXNsWmM.js +0 -1726
- package/dist/_chunks/date-range-picker-BcNDJI7m.js +0 -183
- package/dist/_chunks/date-time-picker-CmGiTU__.js +0 -202
- package/dist/_chunks/dialog.agent-DEG_fVzG.js +0 -147
- package/dist/_chunks/dropdown-menu.agent-Cry4Nmes.js +0 -17
- package/dist/_chunks/freemium-paywall-CkefGLM_.js +0 -198
- package/dist/_chunks/list-B1ozIjQe.js +0 -359
- package/dist/_chunks/message-tray-VaLpQU5t.js +0 -303
- package/dist/_chunks/navigation-menu-EVFau1O2.js +0 -180
- package/dist/_chunks/notification-tray-B7U5YZYg.js +0 -328
- package/dist/_chunks/number-input-DjpT_RXJ.js +0 -249
- package/dist/_chunks/otp-input-De5_Ih7B.js +0 -189
- package/dist/_chunks/pagination.agent-oEaqmtx5.js +0 -380
- package/dist/_chunks/password-input-DJDVznWH.js +0 -193
- package/dist/_chunks/phone-input-DE_39q65.js +0 -428
- package/dist/_chunks/popover-C3CTUsqh.js +0 -227
- package/dist/_chunks/popover.agent-C0qOx9WT.js +0 -13
- package/dist/_chunks/privacy-lock-CQpgkLec.js +0 -132
- package/dist/_chunks/progress-B4Of_pzz.js +0 -252
- package/dist/_chunks/progress.agent-CXkHURjX.js +0 -22
- package/dist/_chunks/radio-group-BIUbpWml.js +0 -89
- package/dist/_chunks/resizable.agent-DBpPGNdy.js +0 -435
- package/dist/_chunks/search-bar-fcGqDFW3.js +0 -397
- package/dist/_chunks/search-input-BVMCONyN.js +0 -197
- package/dist/_chunks/select-IY_JQa-F.js +0 -321
- package/dist/_chunks/sheet.agent-DwQlBqK9.js +0 -13
- package/dist/_chunks/sidebar.agent-B0fnH9CC.js +0 -17
- package/dist/_chunks/slider-DjyRt3Mp.js +0 -274
- package/dist/_chunks/sparkline.agent-C_xp3NRB.js +0 -238
- package/dist/_chunks/stepper-accordion-CGog0JSF.js +0 -233
- package/dist/_chunks/stepper-calendar-_fLOAjus.js +0 -570
- package/dist/_chunks/stepper-progress-rE7tn7WY.js +0 -129
- package/dist/_chunks/suggestion-chip-BNJ2M8Os.js +0 -158
- package/dist/_chunks/switch-aN2EYxHh.js +0 -138
- package/dist/_chunks/task-tray-BzahI5FQ.js +0 -100
- package/dist/_chunks/text-area-DmKSd2DG.js +0 -152
- package/dist/_chunks/text-input-CRHvl5zk.js +0 -188
- package/dist/_chunks/theme-toggle-BHiMMEQN.js +0 -329
- package/dist/_chunks/time-picker-D-EueWUG.js +0 -322
- package/dist/_chunks/timeline-RgAIzpMd.js +0 -220
- package/dist/_chunks/transcript-panel-CNbVGG9L.js +0 -266
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { jsxs as be, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as J, forwardRef as ge, useRef as A, useState as E, useCallback as $, useEffect as he } from "react";
|
|
3
|
+
import { c as Ne } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as ye } from "react-i18next";
|
|
5
|
+
import { u as we } from "./form-field-context-94LwgYTQ.js";
|
|
6
|
+
import { c as Ie } from "./compose-refs-C0k0tdqF.js";
|
|
7
|
+
import { u as De } from "./registry-C9nwlNyL.js";
|
|
8
|
+
import { C as Fe } from "./chevron-down-BX_NP2Yh.js";
|
|
9
|
+
import { C as xe } from "./chevron-up-zOEDrmBB.js";
|
|
10
|
+
const Se = {
|
|
11
|
+
id: "number-input",
|
|
12
|
+
capabilities: ["edit_inline"],
|
|
13
|
+
state: {
|
|
14
|
+
value: {
|
|
15
|
+
type: "number | null",
|
|
16
|
+
descriptionKey: "ui.agent.numberInput.state.value",
|
|
17
|
+
description: "Current numeric value, or null when empty.",
|
|
18
|
+
read: (t) => t.getValue()
|
|
19
|
+
},
|
|
20
|
+
isEmpty: {
|
|
21
|
+
type: "boolean",
|
|
22
|
+
descriptionKey: "ui.agent.numberInput.state.isEmpty",
|
|
23
|
+
description: "Whether the input has no value.",
|
|
24
|
+
read: (t) => t.getValue() === null
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
actions: {
|
|
28
|
+
set_value: {
|
|
29
|
+
safety: "write",
|
|
30
|
+
argsType: "{ value: number | null }",
|
|
31
|
+
descriptionKey: "ui.agent.numberInput.actions.setValue",
|
|
32
|
+
description: "Replace the numeric value, or pass null to clear.",
|
|
33
|
+
invoke: (t, r) => {
|
|
34
|
+
t.setValue(r.value);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
clear: {
|
|
38
|
+
safety: "destructive",
|
|
39
|
+
descriptionKey: "ui.agent.numberInput.actions.clear",
|
|
40
|
+
description: "Empty the input. Loses any typed value.",
|
|
41
|
+
invoke: (t) => {
|
|
42
|
+
t.clear();
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
focus: {
|
|
46
|
+
safety: "read",
|
|
47
|
+
descriptionKey: "ui.agent.numberInput.actions.focus",
|
|
48
|
+
description: "Move keyboard focus to the input.",
|
|
49
|
+
invoke: (t) => {
|
|
50
|
+
t.focus();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
domHooks: {
|
|
55
|
+
root: {
|
|
56
|
+
attr: "data-component",
|
|
57
|
+
value: "number-input",
|
|
58
|
+
description: "Marks the NumberInput wrapper."
|
|
59
|
+
},
|
|
60
|
+
instanceId: {
|
|
61
|
+
attr: "data-component-id",
|
|
62
|
+
sourceProp: "id",
|
|
63
|
+
description: "Sourced from the id prop."
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
function Me(t) {
|
|
68
|
+
let r = "";
|
|
69
|
+
for (const u of t) {
|
|
70
|
+
const n = u.codePointAt(0);
|
|
71
|
+
n !== void 0 && (n >= 1632 && n <= 1641 ? r += String.fromCodePoint(48 + (n - 1632)) : n >= 1776 && n <= 1785 ? r += String.fromCodePoint(48 + (n - 1776)) : r += u);
|
|
72
|
+
}
|
|
73
|
+
return r;
|
|
74
|
+
}
|
|
75
|
+
function Ve(t, r, u) {
|
|
76
|
+
return J(() => {
|
|
77
|
+
var M, V;
|
|
78
|
+
const n = new Intl.NumberFormat(t).formatToParts(1234.5), d = ((M = n.find((a) => a.type === "decimal")) == null ? void 0 : M.value) ?? ".", S = ((V = n.find((a) => a.type === "group")) == null ? void 0 : V.value) ?? ",", p = r === "currency" ? new Intl.NumberFormat(t, {
|
|
79
|
+
style: "currency",
|
|
80
|
+
currency: u ?? "USD"
|
|
81
|
+
}) : r === "percentage" ? new Intl.NumberFormat(t, {
|
|
82
|
+
style: "percent",
|
|
83
|
+
maximumFractionDigits: 4
|
|
84
|
+
}) : r === "integer" ? new Intl.NumberFormat(t, { maximumFractionDigits: 0 }) : new Intl.NumberFormat(t, { maximumFractionDigits: 10 }), T = (a) => Number.isFinite(a) ? p.format(a) : "", z = (a) => {
|
|
85
|
+
if (!a) return NaN;
|
|
86
|
+
const k = Me(a), g = k.trim(), I = g.startsWith("-") || g.startsWith("−");
|
|
87
|
+
let c = "";
|
|
88
|
+
for (const h of k)
|
|
89
|
+
h >= "0" && h <= "9" ? c += h : h === d && (c += ".");
|
|
90
|
+
if (!c || c === ".") return NaN;
|
|
91
|
+
let m = Number(c);
|
|
92
|
+
return Number.isFinite(m) ? (I && (m = -m), r === "percentage" && (m = m / 100), m) : NaN;
|
|
93
|
+
};
|
|
94
|
+
let b = "decimal";
|
|
95
|
+
if (r === "integer")
|
|
96
|
+
b = "numeric";
|
|
97
|
+
else if (r === "currency")
|
|
98
|
+
try {
|
|
99
|
+
const { maximumFractionDigits: a } = new Intl.NumberFormat(t, {
|
|
100
|
+
style: "currency",
|
|
101
|
+
currency: u ?? "USD"
|
|
102
|
+
}).resolvedOptions();
|
|
103
|
+
b = a === 0 ? "numeric" : "decimal";
|
|
104
|
+
} catch {
|
|
105
|
+
b = "decimal";
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
format: T,
|
|
109
|
+
parse: z,
|
|
110
|
+
decimalSeparator: d,
|
|
111
|
+
groupingSeparator: S,
|
|
112
|
+
inputMode: b
|
|
113
|
+
};
|
|
114
|
+
}, [t, r, u]);
|
|
115
|
+
}
|
|
116
|
+
const ke = Ne(
|
|
117
|
+
[
|
|
118
|
+
"ds:flex ds:items-center ds:w-full ds:rounded-[var(--radius-sm)]",
|
|
119
|
+
"ds:border ds:bg-background ds:text-foreground",
|
|
120
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
121
|
+
"ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid",
|
|
122
|
+
"ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]",
|
|
123
|
+
"ds:has-[:disabled]:cursor-not-allowed ds:has-[:disabled]:opacity-50"
|
|
124
|
+
].join(" "),
|
|
125
|
+
{
|
|
126
|
+
variants: {
|
|
127
|
+
size: {
|
|
128
|
+
sm: "ds:h-8 ds:text-[length:var(--font-size-sm)]",
|
|
129
|
+
md: "ds:h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)]",
|
|
130
|
+
lg: "ds:h-12 ds:text-[length:var(--font-size-lg)]"
|
|
131
|
+
},
|
|
132
|
+
tone: {
|
|
133
|
+
default: "ds:border-border",
|
|
134
|
+
error: "ds:border-destructive ds:focus-within:outline-destructive"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
defaultVariants: { size: "md", tone: "default" }
|
|
138
|
+
}
|
|
139
|
+
), G = [
|
|
140
|
+
"ds:inline-flex ds:items-center ds:justify-center",
|
|
141
|
+
"ds:h-full ds:shrink-0",
|
|
142
|
+
"ds:text-muted-foreground ds:hover:text-foreground",
|
|
143
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
144
|
+
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
|
|
145
|
+
].join(" "), Ce = () => typeof navigator < "u" && navigator.language ? navigator.language : "en-US";
|
|
146
|
+
function Te(t) {
|
|
147
|
+
if (!Number.isFinite(t)) return 0;
|
|
148
|
+
const r = String(t), u = r.indexOf(".");
|
|
149
|
+
return u === -1 ? 0 : r.length - u - 1;
|
|
150
|
+
}
|
|
151
|
+
function ze(t, r) {
|
|
152
|
+
if (r <= 0 || !Number.isFinite(r)) return t;
|
|
153
|
+
const n = 10 ** Te(r);
|
|
154
|
+
return Math.round(t * n) / n;
|
|
155
|
+
}
|
|
156
|
+
const Pe = ge(
|
|
157
|
+
({
|
|
158
|
+
value: t,
|
|
159
|
+
defaultValue: r,
|
|
160
|
+
onChange: u,
|
|
161
|
+
min: n,
|
|
162
|
+
max: d,
|
|
163
|
+
step: S = 1,
|
|
164
|
+
mode: p = "integer",
|
|
165
|
+
currency: T,
|
|
166
|
+
locale: z,
|
|
167
|
+
size: b = "md",
|
|
168
|
+
tone: M,
|
|
169
|
+
className: V,
|
|
170
|
+
id: a,
|
|
171
|
+
disabled: k,
|
|
172
|
+
onFocus: g,
|
|
173
|
+
onBlur: I,
|
|
174
|
+
onKeyDown: c,
|
|
175
|
+
...m
|
|
176
|
+
}, h) => {
|
|
177
|
+
const { t: U } = ye(), D = we(), Q = a ?? D.id, C = !!(D.disabled || k), X = z ?? Ce(), P = Ve(X, p, T), { decimalSeparator: B, format: R, parse: K } = P, L = A(null), Y = Ie(h, L), H = t !== void 0, [Z, ee] = E(
|
|
178
|
+
r ?? null
|
|
179
|
+
), s = H ? t ?? null : Z, W = A(s);
|
|
180
|
+
W.current = s;
|
|
181
|
+
const F = $(
|
|
182
|
+
(e) => {
|
|
183
|
+
const i = p === "percentage" ? e * 100 : e;
|
|
184
|
+
return (Number.isInteger(i) ? String(i) : i.toString()).replace(".", B);
|
|
185
|
+
},
|
|
186
|
+
[p, B]
|
|
187
|
+
), f = $(
|
|
188
|
+
(e) => e == null || Number.isNaN(e) ? "" : R(e),
|
|
189
|
+
[R]
|
|
190
|
+
), [j, l] = E(
|
|
191
|
+
() => f(s)
|
|
192
|
+
), N = A(!1), [te, y] = E(!1);
|
|
193
|
+
he(() => {
|
|
194
|
+
N.current || l(f(s));
|
|
195
|
+
}, [s, f]);
|
|
196
|
+
const ne = te || s !== null && (n !== void 0 && s < n || d !== void 0 && s > d), q = D.invalid || ne, re = q ? "error" : M ?? "default", v = (e) => {
|
|
197
|
+
H || ee(e), u == null || u(e);
|
|
198
|
+
}, w = (e) => {
|
|
199
|
+
let o = (s ?? 0) + S * e;
|
|
200
|
+
n !== void 0 && (o = Math.max(n, o)), d !== void 0 && (o = Math.min(d, o)), o = ze(o, S), v(o), y(!1), l(
|
|
201
|
+
N.current ? F(o) : f(o)
|
|
202
|
+
);
|
|
203
|
+
}, O = (e) => {
|
|
204
|
+
v(e), y(!1), l(
|
|
205
|
+
N.current ? F(e) : f(e)
|
|
206
|
+
);
|
|
207
|
+
}, se = (e) => {
|
|
208
|
+
if (c == null || c(e), e.defaultPrevented || C) return;
|
|
209
|
+
const { key: i, shiftKey: o } = e;
|
|
210
|
+
i === "ArrowUp" ? (e.preventDefault(), w(o ? 10 : 1)) : i === "ArrowDown" ? (e.preventDefault(), w(o ? -10 : -1)) : i === "PageUp" ? (e.preventDefault(), w(100)) : i === "PageDown" ? (e.preventDefault(), w(-100)) : i === "Home" && n !== void 0 ? (e.preventDefault(), O(n)) : i === "End" && d !== void 0 && (e.preventDefault(), O(d));
|
|
211
|
+
}, ie = (e) => {
|
|
212
|
+
const i = e.target.value;
|
|
213
|
+
if (l(i), i.trim() === "") {
|
|
214
|
+
v(null), y(!1);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const o = K(i);
|
|
218
|
+
Number.isNaN(o) || v(o);
|
|
219
|
+
}, oe = (e) => {
|
|
220
|
+
g == null || g(e), N.current = !0, s != null && l(F(s));
|
|
221
|
+
}, ae = (e) => {
|
|
222
|
+
if (I == null || I(e), N.current = !1, j.trim() === "") {
|
|
223
|
+
v(null), y(!1), l("");
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const i = K(j);
|
|
227
|
+
if (Number.isNaN(i)) {
|
|
228
|
+
l(f(s));
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const o = n !== void 0 && i < n || d !== void 0 && i > d;
|
|
232
|
+
y(o), v(i), l(f(i));
|
|
233
|
+
}, _ = (e) => {
|
|
234
|
+
e.preventDefault();
|
|
235
|
+
}, ue = () => w(1), de = () => w(-1), le = J(
|
|
236
|
+
() => ({
|
|
237
|
+
getValue: () => W.current,
|
|
238
|
+
setValue: (e) => {
|
|
239
|
+
v(e), l(
|
|
240
|
+
e === null ? "" : N.current ? F(e) : f(e)
|
|
241
|
+
);
|
|
242
|
+
},
|
|
243
|
+
clear: () => {
|
|
244
|
+
v(null), l(""), y(!1);
|
|
245
|
+
},
|
|
246
|
+
focus: () => {
|
|
247
|
+
var e;
|
|
248
|
+
return (e = L.current) == null ? void 0 : e.focus();
|
|
249
|
+
}
|
|
250
|
+
}),
|
|
251
|
+
// The handle is reconstructed per render; consumers (the agent runtime)
|
|
252
|
+
// re-register only when the identity changes, which is a cheap no-op.
|
|
253
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
254
|
+
[F, f]
|
|
255
|
+
);
|
|
256
|
+
De(Se, le, a);
|
|
257
|
+
const ce = C || n !== void 0 && s !== null && s <= n, fe = C || d !== void 0 && s !== null && s >= d, pe = s ?? void 0, me = (p === "currency" || p === "percentage") && s !== null && s !== null ? R(s) : void 0, ve = P.inputMode === "numeric" ? "[0-9]*" : void 0;
|
|
258
|
+
return /* @__PURE__ */ be(
|
|
259
|
+
"div",
|
|
260
|
+
{
|
|
261
|
+
className: ke({
|
|
262
|
+
size: b,
|
|
263
|
+
tone: re,
|
|
264
|
+
className: V
|
|
265
|
+
}),
|
|
266
|
+
"data-component": "number-input",
|
|
267
|
+
"data-component-id": a,
|
|
268
|
+
"data-mode": p,
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ x(
|
|
271
|
+
"button",
|
|
272
|
+
{
|
|
273
|
+
type: "button",
|
|
274
|
+
tabIndex: -1,
|
|
275
|
+
"aria-label": U("ui.inputs.number.decrement", "Decrement"),
|
|
276
|
+
onClick: de,
|
|
277
|
+
onMouseDown: _,
|
|
278
|
+
disabled: ce,
|
|
279
|
+
className: `${G} ds:ps-2 ds:pe-1`,
|
|
280
|
+
children: /* @__PURE__ */ x(Fe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
/* @__PURE__ */ x(
|
|
284
|
+
"input",
|
|
285
|
+
{
|
|
286
|
+
ref: Y,
|
|
287
|
+
id: Q,
|
|
288
|
+
type: "text",
|
|
289
|
+
role: "spinbutton",
|
|
290
|
+
inputMode: P.inputMode,
|
|
291
|
+
pattern: ve,
|
|
292
|
+
autoComplete: "off",
|
|
293
|
+
value: j,
|
|
294
|
+
disabled: C,
|
|
295
|
+
"aria-valuemin": n,
|
|
296
|
+
"aria-valuemax": d,
|
|
297
|
+
"aria-valuenow": pe,
|
|
298
|
+
"aria-valuetext": me,
|
|
299
|
+
"aria-invalid": q || void 0,
|
|
300
|
+
"aria-required": D.required || void 0,
|
|
301
|
+
"aria-describedby": D.describedBy || void 0,
|
|
302
|
+
onChange: ie,
|
|
303
|
+
onFocus: oe,
|
|
304
|
+
onBlur: ae,
|
|
305
|
+
onKeyDown: se,
|
|
306
|
+
className: "ds:flex-1 ds:w-full ds:min-w-0 ds:bg-transparent ds:outline-none ds:ps-2 ds:pe-2 ds:text-start ds:tabular-nums ds:disabled:cursor-not-allowed",
|
|
307
|
+
...m
|
|
308
|
+
}
|
|
309
|
+
),
|
|
310
|
+
/* @__PURE__ */ x(
|
|
311
|
+
"button",
|
|
312
|
+
{
|
|
313
|
+
type: "button",
|
|
314
|
+
tabIndex: -1,
|
|
315
|
+
"aria-label": U("ui.inputs.number.increment", "Increment"),
|
|
316
|
+
onClick: ue,
|
|
317
|
+
onMouseDown: _,
|
|
318
|
+
disabled: fe,
|
|
319
|
+
className: `${G} ds:ps-1 ds:pe-2`,
|
|
320
|
+
children: /* @__PURE__ */ x(xe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
Pe.displayName = "NumberInput";
|
|
329
|
+
export {
|
|
330
|
+
Pe as N,
|
|
331
|
+
Ve as u
|
|
332
|
+
};
|
|
333
|
+
//# sourceMappingURL=number-input-fvGmnRy9.js.map
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { jsxs as ee, jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as te, useId as re, useState as L, useRef as R, useEffect as se, useCallback as N, useMemo as oe } from "react";
|
|
3
|
+
import { c as O } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as ae } from "react-i18next";
|
|
5
|
+
import { u as ie } from "./form-field-context-94LwgYTQ.js";
|
|
6
|
+
import { u as ne } from "./registry-C9nwlNyL.js";
|
|
7
|
+
const ce = {
|
|
8
|
+
id: "otp-input",
|
|
9
|
+
capabilities: ["edit_inline", "submit"],
|
|
10
|
+
state: {
|
|
11
|
+
value: {
|
|
12
|
+
type: "string",
|
|
13
|
+
descriptionKey: "ui.agent.otpInput.state.value",
|
|
14
|
+
description: "Current digits entered, packed into a single string.",
|
|
15
|
+
read: (e) => e.getValue()
|
|
16
|
+
},
|
|
17
|
+
isComplete: {
|
|
18
|
+
type: "boolean",
|
|
19
|
+
descriptionKey: "ui.agent.otpInput.state.isComplete",
|
|
20
|
+
description: "Whether all required digits have been entered.",
|
|
21
|
+
read: (e) => e.isComplete()
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
actions: {
|
|
25
|
+
set_value: {
|
|
26
|
+
safety: "write",
|
|
27
|
+
argsType: "{ value: string }",
|
|
28
|
+
descriptionKey: "ui.agent.otpInput.actions.setValue",
|
|
29
|
+
description: "Replace the entered digits.",
|
|
30
|
+
invoke: (e, o) => {
|
|
31
|
+
e.setValue(o.value);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
clear: {
|
|
35
|
+
safety: "destructive",
|
|
36
|
+
descriptionKey: "ui.agent.otpInput.actions.clear",
|
|
37
|
+
description: "Empty all digit cells. Loses any typed value.",
|
|
38
|
+
invoke: (e) => {
|
|
39
|
+
e.clear();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
focus: {
|
|
43
|
+
safety: "read",
|
|
44
|
+
descriptionKey: "ui.agent.otpInput.actions.focus",
|
|
45
|
+
description: "Move keyboard focus to the active digit cell.",
|
|
46
|
+
invoke: (e) => {
|
|
47
|
+
e.focus();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
domHooks: {
|
|
52
|
+
root: {
|
|
53
|
+
attr: "data-component",
|
|
54
|
+
value: "otp-input",
|
|
55
|
+
description: "Marks the OTPInput wrapper. Completion is observable via state.isComplete; the host onComplete callback fires once when all digits are filled."
|
|
56
|
+
},
|
|
57
|
+
instanceId: {
|
|
58
|
+
attr: "data-component-id",
|
|
59
|
+
sourceProp: "id",
|
|
60
|
+
description: "Sourced from the id prop."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}, ue = O("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"), le = O(
|
|
64
|
+
[
|
|
65
|
+
"ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
|
|
66
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
67
|
+
"ds:border ds:bg-background ds:text-foreground ds:text-center ds:font-medium ds:text-[length:var(--font-size-lg)]",
|
|
68
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
69
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
70
|
+
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
71
|
+
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
|
|
72
|
+
].join(" "),
|
|
73
|
+
{
|
|
74
|
+
variants: {
|
|
75
|
+
tone: {
|
|
76
|
+
default: "ds:border-border",
|
|
77
|
+
error: "ds:border-destructive"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
defaultVariants: { tone: "default" }
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
function F(e) {
|
|
84
|
+
return e.replace(/[\u0660-\u0669]/g, (o) => String(o.charCodeAt(0) - 1632)).replace(/[\u06F0-\u06F9]/g, (o) => String(o.charCodeAt(0) - 1776));
|
|
85
|
+
}
|
|
86
|
+
function g(e, o) {
|
|
87
|
+
return F(e).replace(/\D/g, "").slice(0, o);
|
|
88
|
+
}
|
|
89
|
+
function de(e, o) {
|
|
90
|
+
const m = g(e, o), l = new Array(o).fill("");
|
|
91
|
+
for (let n = 0; n < m.length; n += 1)
|
|
92
|
+
l[n] = m[n];
|
|
93
|
+
return l;
|
|
94
|
+
}
|
|
95
|
+
const pe = te(
|
|
96
|
+
({
|
|
97
|
+
length: e = 6,
|
|
98
|
+
value: o,
|
|
99
|
+
defaultValue: m,
|
|
100
|
+
onChange: l,
|
|
101
|
+
onComplete: n,
|
|
102
|
+
disabled: S,
|
|
103
|
+
error: $,
|
|
104
|
+
label: y,
|
|
105
|
+
id: K,
|
|
106
|
+
className: j
|
|
107
|
+
}, z) => {
|
|
108
|
+
const { t: H } = ae(), v = ie(), _ = re(), P = y ? _ : void 0, I = o !== void 0, [q, W] = L(
|
|
109
|
+
() => g(m ?? "", e)
|
|
110
|
+
), p = g(I ? o : q, e), G = de(p, e), k = v.disabled || !!S, B = v.invalid || !!$, J = B ? "error" : "default", C = R([]), w = R(p.length === e), d = R(p);
|
|
111
|
+
d.current = p;
|
|
112
|
+
const Q = () => {
|
|
113
|
+
const r = p.length;
|
|
114
|
+
return r >= e ? e - 1 : r;
|
|
115
|
+
}, [f, V] = L(Q);
|
|
116
|
+
se(() => {
|
|
117
|
+
f >= e && V(e - 1);
|
|
118
|
+
}, [f, e]);
|
|
119
|
+
const c = N(
|
|
120
|
+
(r) => {
|
|
121
|
+
const t = Math.max(0, Math.min(e - 1, r));
|
|
122
|
+
V(t);
|
|
123
|
+
const s = C.current[t];
|
|
124
|
+
s && (s.focus(), s.select());
|
|
125
|
+
},
|
|
126
|
+
[e]
|
|
127
|
+
), u = N(
|
|
128
|
+
(r) => {
|
|
129
|
+
const t = g(r, e);
|
|
130
|
+
I || W(t), d.current = t, l == null || l(t), t.length === e ? w.current || (w.current = !0, n == null || n(t)) : w.current = !1;
|
|
131
|
+
},
|
|
132
|
+
[I, e, l, n]
|
|
133
|
+
), U = (r) => (t) => {
|
|
134
|
+
const s = t.target.value, a = F(s).replace(/\D/g, ""), i = d.current;
|
|
135
|
+
if (a.length === 0) {
|
|
136
|
+
if (s === "" && r < i.length) {
|
|
137
|
+
const A = i.slice(0, r) + i.slice(r + 1);
|
|
138
|
+
u(A);
|
|
139
|
+
}
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const b = i.slice(0, r), h = i.slice(r + a.length), D = (b + a + h).slice(0, e);
|
|
143
|
+
u(D);
|
|
144
|
+
const T = Math.min(r + a.length, e - 1);
|
|
145
|
+
c(T);
|
|
146
|
+
}, X = (r) => (t) => {
|
|
147
|
+
const s = d.current;
|
|
148
|
+
if (t.key === "Backspace") {
|
|
149
|
+
if (s[r]) {
|
|
150
|
+
t.preventDefault();
|
|
151
|
+
const a = s.slice(0, r) + s.slice(r + 1);
|
|
152
|
+
u(a);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (r > 0) {
|
|
156
|
+
t.preventDefault();
|
|
157
|
+
const a = s.slice(0, r - 1) + s.slice(r);
|
|
158
|
+
u(a), c(r - 1);
|
|
159
|
+
}
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (t.key === "ArrowLeft") {
|
|
163
|
+
t.preventDefault(), r > 0 && c(r - 1);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (t.key === "ArrowRight") {
|
|
167
|
+
t.preventDefault(), r < e - 1 && c(r + 1);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (t.key === "Home") {
|
|
171
|
+
t.preventDefault(), c(0);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
t.key === "End" && (t.preventDefault(), c(e - 1));
|
|
175
|
+
}, Y = (r) => (t) => {
|
|
176
|
+
const a = t.clipboardData.getData("text").replace(/\s+/g, ""), i = F(a);
|
|
177
|
+
if (!/^[0-9]+$/.test(i)) return;
|
|
178
|
+
t.preventDefault();
|
|
179
|
+
const b = d.current, h = b.slice(0, r), D = b.slice(r + i.length), T = (h + i + D).slice(0, e);
|
|
180
|
+
u(T);
|
|
181
|
+
const A = Math.min(r + i.length, e - 1);
|
|
182
|
+
c(A);
|
|
183
|
+
}, Z = (r) => (t) => {
|
|
184
|
+
V(r), t.currentTarget.select();
|
|
185
|
+
}, E = v.id, x = oe(
|
|
186
|
+
() => ({
|
|
187
|
+
getValue: () => d.current,
|
|
188
|
+
setValue: (r) => u(r),
|
|
189
|
+
clear: () => u(""),
|
|
190
|
+
focus: () => c(f),
|
|
191
|
+
isComplete: () => d.current.length === e
|
|
192
|
+
}),
|
|
193
|
+
[u, c, f, e]
|
|
194
|
+
);
|
|
195
|
+
return ne(ce, x, K), /* @__PURE__ */ ee("div", { className: ue({ className: j }), children: [
|
|
196
|
+
y ? /* @__PURE__ */ M(
|
|
197
|
+
"label",
|
|
198
|
+
{
|
|
199
|
+
id: P,
|
|
200
|
+
htmlFor: `${E}-0`,
|
|
201
|
+
className: "type-label ds:text-foreground",
|
|
202
|
+
children: y
|
|
203
|
+
}
|
|
204
|
+
) : null,
|
|
205
|
+
/* @__PURE__ */ M(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
ref: z,
|
|
209
|
+
role: "group",
|
|
210
|
+
dir: "ltr",
|
|
211
|
+
"aria-labelledby": P,
|
|
212
|
+
"aria-invalid": B || void 0,
|
|
213
|
+
"aria-describedby": v.describedBy || void 0,
|
|
214
|
+
"aria-disabled": k || void 0,
|
|
215
|
+
"data-component": "otp-input",
|
|
216
|
+
"data-component-id": K,
|
|
217
|
+
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
218
|
+
children: G.map((r, t) => {
|
|
219
|
+
const s = !k && t === f;
|
|
220
|
+
return /* @__PURE__ */ M(
|
|
221
|
+
"input",
|
|
222
|
+
{
|
|
223
|
+
ref: (a) => {
|
|
224
|
+
C.current[t] = a;
|
|
225
|
+
},
|
|
226
|
+
id: `${E}-${t}`,
|
|
227
|
+
type: "text",
|
|
228
|
+
inputMode: "numeric",
|
|
229
|
+
pattern: "[0-9]*",
|
|
230
|
+
autoComplete: t === 0 ? "one-time-code" : "off",
|
|
231
|
+
maxLength: 1,
|
|
232
|
+
value: r,
|
|
233
|
+
disabled: k,
|
|
234
|
+
tabIndex: s ? 0 : -1,
|
|
235
|
+
"aria-label": H("ui.inputs.otp.digitLabel", {
|
|
236
|
+
current: t + 1,
|
|
237
|
+
total: e
|
|
238
|
+
}),
|
|
239
|
+
onChange: U(t),
|
|
240
|
+
onKeyDown: X(t),
|
|
241
|
+
onPaste: Y(t),
|
|
242
|
+
onFocus: Z(t),
|
|
243
|
+
className: le({ tone: J })
|
|
244
|
+
},
|
|
245
|
+
t
|
|
246
|
+
);
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
] });
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
pe.displayName = "OTPInput";
|
|
254
|
+
export {
|
|
255
|
+
pe as O
|
|
256
|
+
};
|
|
257
|
+
//# sourceMappingURL=otp-input-EglXOUue.js.map
|