@alfadocs/ui-kit 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/_chunks/accordion-DOmxGEWU.js +228 -0
- package/dist/_chunks/{agenda-card-DwLIxgi7.js → agenda-card-CalZqycc.js} +12 -3
- package/dist/_chunks/{agenda-tray-DUvengGQ.js → agenda-tray-3ffFDQZC.js} +54 -51
- package/dist/_chunks/{ai-prompt-input.agent-0NHYLTWD.js → ai-prompt-input-BBiDlEIS.js} +231 -231
- package/dist/_chunks/{alert-BlOUMkXj.js → alert-B1sj8Ss0.js} +24 -14
- package/dist/_chunks/{apexcharts-theme-BkSShpEy.js → apexcharts-theme-BJigns_V.js} +7 -2
- package/dist/_chunks/{app-frame-6d7Lu4ea.js → app-frame-CDJOgPXe.js} +7 -16
- package/dist/_chunks/{audio-recorder.agent--VKeykUp.js → audio-recorder-B4U1LuiQ.js} +161 -162
- package/dist/_chunks/{audio-visualiser-CeMPCZkd.js → audio-visualiser-ByDEFLNm.js} +25 -19
- package/dist/_chunks/autocomplete-D4oUZbsP.js +466 -0
- package/dist/_chunks/{badge-mrstWxve.js → badge-DKFbntoa.js} +16 -13
- package/dist/_chunks/{balance-cell-renderer-5CA7zpAi.js → balance-cell-renderer-B8zgIM-m.js} +63 -44
- package/dist/_chunks/{breadcrumb.agent-GM2hAKFX.js → breadcrumb-D1snXjPb.js} +165 -157
- package/dist/_chunks/{button-7mLWcMp_.js → button-DD_0Xdmr.js} +12 -2
- package/dist/_chunks/{calendar-nGEgelJs.js → calendar-zy0tUUVG.js} +13 -18
- package/dist/_chunks/{card-BEy58ZKp.js → card-CWzuTLYE.js} +40 -34
- package/dist/_chunks/{chart.agent-_pRYS17d.js → chart-BLvFl169.js} +147 -131
- package/dist/_chunks/chat-container-ClzsWXp2.js +220 -0
- package/dist/_chunks/chat-input-DOlsB1fm.js +333 -0
- package/dist/_chunks/{chat-message-ByouZpPP.js → chat-message-DoAhgUTj.js} +23 -13
- package/dist/_chunks/{collapsible.agent-DkS1jVyn.js → collapsible-CuxUBoHJ.js} +97 -99
- package/dist/_chunks/{color-picker-94qcBZqZ.js → color-picker-CTIcHlDF.js} +111 -45
- package/dist/_chunks/combobox-DCNXqbC7.js +460 -0
- package/dist/_chunks/command-palette-C_vgSgrI.js +441 -0
- package/dist/_chunks/{date-picker-BqPTn7bO.js → date-picker-B1PO1ZQP.js} +190 -181
- package/dist/_chunks/{date-range-picker-B2hGsffw.js → date-range-picker-mix2nEVC.js} +21 -8
- package/dist/_chunks/{date-time-picker-Bzt0S8yO.js → date-time-picker-Dnong_BY.js} +30 -15
- package/dist/_chunks/{description-list-DvJbp6Yg.js → description-list-BYA77Yud.js} +26 -23
- package/dist/_chunks/dialog-BPD7wlGE.js +211 -0
- package/dist/_chunks/dropdown-menu-CpiF6CPz.js +300 -0
- package/dist/_chunks/{empty-state-DQPtRp2b.js → empty-state-3CLJIXSj.js} +132 -101
- package/dist/_chunks/file-upload-C947ACDK.js +829 -0
- package/dist/_chunks/{floating-action-button-Cnw-f6AG.js → floating-action-button-C8OYj8mE.js} +9 -2
- package/dist/_chunks/{form-field-BfsPLTSc.js → form-field-Bmkeh7WY.js} +12 -11
- package/dist/_chunks/{form-field-context-94LwgYTQ.js → form-field-context-B3APVHKx.js} +4 -2
- package/dist/_chunks/{freemium-paywall.agent-_nQqLyRF.js → freemium-paywall-CnvceDav.js} +124 -117
- package/dist/_chunks/{header-BGn1mRp8.js → header-D0ULgQl3.js} +69 -68
- package/dist/_chunks/{icon-button-Wnnde5lc.js → icon-button-C4CGcYuz.js} +11 -3
- package/dist/_chunks/{kbd-8baVw3KU.js → kbd-Cglkd7CY.js} +6 -2
- package/dist/_chunks/{key-value-pair-JRFS9Xrh.js → key-value-pair-CgWvAIGb.js} +2 -2
- package/dist/_chunks/{leo-sidebar-BwINPdix.js → leo-sidebar-CfEY-xi2.js} +16 -20
- package/dist/_chunks/{link-QheANk74.js → link-8QmFjIz2.js} +2 -5
- package/dist/_chunks/list-qP6p0NTw.js +434 -0
- package/dist/_chunks/{logo-BpFoCL-s.js → logo-_Z-jLq80.js} +155 -26
- package/dist/_chunks/{matrix-rain-BEkvux64.js → matrix-rain-CRPMXcVx.js} +8 -2
- package/dist/_chunks/{message-card-qhoGv947.js → message-card-ChCX9Iv6.js} +63 -60
- package/dist/_chunks/{message-tray-xHUCra-Y.js → message-tray-n8q9ITXI.js} +71 -76
- package/dist/_chunks/{multi-select.agent-Do6CeQUT.js → multi-select-wqqrgjUQ.js} +326 -291
- package/dist/_chunks/{navigation-menu.agent-D69ND6Qq.js → navigation-menu-ClbHeawy.js} +136 -123
- package/dist/_chunks/{notification-card-CsVEYJE-.js → notification-card-hBlPN1-c.js} +3 -3
- package/dist/_chunks/{notification-tray-DTXMq42J.js → notification-tray-C5cnXbl9.js} +70 -66
- package/dist/_chunks/{number-input-fvGmnRy9.js → number-input-Q7wkHnvQ.js} +7 -3
- package/dist/_chunks/{otp-input-EglXOUue.js → otp-input-C9gUByF0.js} +6 -3
- package/dist/_chunks/{pagination.agent-BkZQl45y.js → pagination-3AC4zTsi.js} +234 -194
- package/dist/_chunks/{password-input-D6kuYXmr.js → password-input-C4LmjIH1.js} +6 -9
- package/dist/_chunks/{patient-shell-BRmrrUUW.js → patient-shell-BlsEUKWB.js} +10 -15
- package/dist/_chunks/{payment-form-BWaXas8z.js → payment-form-C3vT_npe.js} +195 -186
- package/dist/_chunks/{pdf-viewer.agent-BaGEDheA.js → pdf-viewer-CZIfY08H.js} +270 -241
- package/dist/_chunks/{phone-input-C8Op4sEc.js → phone-input-CSHJOJ13.js} +4 -9
- package/dist/_chunks/popover-DekUKNBk.js +293 -0
- package/dist/_chunks/{privacy-lock.agent-C1i1-T58.js → privacy-lock-BKsI6ReN.js} +117 -109
- package/dist/_chunks/progress-C11tqhoI.js +298 -0
- package/dist/_chunks/{recaptcha-widget.agent-BGHpU5zD.js → recaptcha-widget-NyfOfLII.js} +95 -86
- package/dist/_chunks/resizable-mpXXyIsN.js +483 -0
- package/dist/_chunks/{rich-text-editor.agent-DnE125Tz.js → rich-text-editor-C7TCIlQO.js} +298 -209
- package/dist/_chunks/{scroll-area-DLr5w9Dd.js → scroll-area-DEDU-lp-.js} +67 -54
- package/dist/_chunks/{search-bar.agent-DxFAxctc.js → search-bar-BTDfgYtg.js} +291 -268
- package/dist/_chunks/{search-input-Xw3cdWXW.js → search-input-CdJIEjFo.js} +116 -107
- package/dist/_chunks/{select-DY1Cb2Tg.js → select-y6bXV1f1.js} +84 -83
- package/dist/_chunks/{separator-B4wXDLNC.js → separator-CYU_bGFn.js} +2 -5
- package/dist/_chunks/{sheet-B9kH9pcI.js → sheet-4tgMFwj0.js} +135 -60
- package/dist/_chunks/{sidebar-CHF5xr_P.js → sidebar-Bx3wCDyy.js} +546 -457
- package/dist/_chunks/{sign-in-with-alfadocs-button-BN_FPGHT.js → sign-in-with-alfadocs-button-B9UrqOqH.js} +9 -5
- package/dist/_chunks/{signature-capture.agent-BpeDwFht.js → signature-capture-DjMlFOzS.js} +210 -212
- package/dist/_chunks/{skeleton-dtqyF09N.js → skeleton-CZbwyJAA.js} +9 -3
- package/dist/_chunks/{slider-CcsQTZTA.js → slider-BT2bZWsy.js} +138 -134
- package/dist/_chunks/{slot-grid-D_l5VsHG.js → slot-grid-CgpYgBkW.js} +105 -95
- package/dist/_chunks/{sparkline.agent-56Sj7nOP.js → sparkline-_gy8aJDG.js} +107 -100
- package/dist/_chunks/{spinner-GCcv67vh.js → spinner-DLaYfLPl.js} +66 -14
- package/dist/_chunks/{stat-DUB6g90R.js → stat-B9PHSPbN.js} +45 -27
- package/dist/_chunks/{stepper-calendar.agent-9iT3ClIB.js → stepper-calendar-BLOJUE0-.js} +189 -187
- package/dist/_chunks/stepper-progress-jFY8BSf7.js +208 -0
- package/dist/_chunks/{suggestion-chip-DhFrkRPj.js → suggestion-chip-C4Jz0LrM.js} +50 -52
- package/dist/_chunks/{switch-BYEH8I53.js → switch-C0psfIQF.js} +2 -2
- package/dist/_chunks/{tabs.agent-h7NvsTR1.js → tabs-DaFA3Muo.js} +183 -155
- package/dist/_chunks/{tag-BqidXKo3.js → tag-DuLMjRbF.js} +90 -32
- package/dist/_chunks/{task-card-CY5ztNkU.js → task-card-Dw_ZJDL8.js} +5 -2
- package/dist/_chunks/{task-tray-CCoUdorl.js → task-tray-XlIW9ueh.js} +50 -49
- package/dist/_chunks/{text-area-C_M8wliK.js → text-area-CO9Dz0qX.js} +2 -2
- package/dist/_chunks/{text-input-BX39e6T6.js → text-input-DZwt9L8H.js} +65 -62
- package/dist/_chunks/{theme-root-DDb0TJjd.js → theme-root-CSKD5ZRm.js} +9 -2
- package/dist/_chunks/{theme-toggle.agent-btmXTWdW.js → theme-toggle-B9zzCnvl.js} +179 -177
- package/dist/_chunks/{time-picker-B8AMIrX7.js → time-picker-DvPUmHH-.js} +95 -93
- package/dist/_chunks/{timeline.agent-CRPza9wc.js → timeline-BvmnQadS.js} +96 -96
- package/dist/_chunks/{toast.agent-BjEGuq1Z.js → toast.agent-BwKXA0km.js} +46 -8
- package/dist/_chunks/{tooth-scheme.agent-CWrQBjJM.js → tooth-scheme-3mITSXiZ.js} +146 -162
- package/dist/_chunks/{transcript-panel.agent-BXEYP6w-.js → transcript-panel-Bx5ANMsv.js} +110 -101
- package/dist/_chunks/{typing-indicator-CbUBf-Dx.js → typing-indicator-BZ5jXZPn.js} +27 -5
- package/dist/_chunks/{use-theme-BMUhembX.js → use-theme-B1cwAXJR.js} +2 -5
- package/dist/_chunks/{visually-hidden-Bw7vBHLm.js → visually-hidden-BHxEUGyT.js} +11 -2
- package/dist/_chunks/{warning-stack-8Pa3pekh.js → warning-stack-VygGHSqC.js} +11 -13
- package/dist/_chunks/{workflow-map-D2A7rTEG.js → workflow-map-C-nlogPC.js} +430 -452
- package/dist/agent-catalog.json +580 -15
- package/dist/components/_shared/index.d.ts +2 -2
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/index.js +5 -6
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/agenda-tray.d.ts +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-prompt-input/ai-prompt-input.d.ts +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/audio-visualiser/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/chart/index.d.ts +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +1 -1
- package/dist/components/chat-container/index.js +2 -3
- package/dist/components/chat-input/chat-input.d.ts +1 -1
- package/dist/components/chat-input/index.js +3 -4
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/checkbox-group/index.d.ts +1 -1
- package/dist/components/collapsible/collapsible.d.ts +1 -1
- package/dist/components/collapsible/index.d.ts +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +46 -13
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts +3 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/data-table/toolbar.d.ts +6 -5
- package/dist/components/date-picker/date-picker.d.ts +1 -1
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.d.ts +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/description-list.d.ts +1 -2
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -16
- package/dist/components/dropdown-menu/index.js +3 -4
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-upload/index.d.ts +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/floating-action-button/index.js +1 -1
- package/dist/components/form-field/index.js +2 -2
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/kbd/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/matrix-rain/index.js +1 -1
- package/dist/components/message-card/index.d.ts +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/message-tray/message-tray.d.ts +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +1 -1
- package/dist/components/notification-card/index.d.ts +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/notification-tray/notification-tray.d.ts +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/pagination.d.ts +4 -6
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/payment-form/index.js +7 -8
- package/dist/components/payment-form/payment-form.d.ts +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/phone-input/index.d.ts +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +3 -4
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/privacy-lock/privacy-lock.d.ts +1 -1
- package/dist/components/progress/index.js +3 -4
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/resizable/index.d.ts +1 -1
- package/dist/components/resizable/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-bar/search-bar.d.ts +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/separator/index.js +1 -1
- package/dist/components/sheet/index.js +3 -4
- package/dist/components/sheet/sheet.d.ts +2 -2
- package/dist/components/sidebar/index.js +7 -8
- package/dist/components/sidebar/sidebar.d.ts +0 -2
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stepper-calendar/index.js +1 -1
- package/dist/components/stepper-calendar/stepper-calendar.d.ts +1 -1
- package/dist/components/stepper-progress/index.d.ts +1 -1
- package/dist/components/stepper-progress/index.js +1 -2
- package/dist/components/stepper-progress/stepper-progress.d.ts +1 -1
- package/dist/components/suggestion-chip/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/task-tray/task-tray.d.ts +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/theme-root/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/theme-toggle/theme-toggle.d.ts +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/time-picker.d.ts +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timeline/timeline.d.ts +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/transcript-panel/transcript-panel.d.ts +1 -1
- package/dist/components/typing-indicator/index.js +1 -1
- package/dist/components/visually-hidden/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow/workflow-editor.d.ts +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +392 -402
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/safe-html/index.js +20 -3
- package/dist/tokens.css +2 -2
- package/package.json +12 -2
- package/dist/_chunks/accordion-BEnrZmAn.js +0 -120
- package/dist/_chunks/accordion.agent-BTjeO1Sx.js +0 -52
- package/dist/_chunks/autocomplete.agent-Dh7KioS6.js +0 -432
- package/dist/_chunks/chat-container-Dl0Kfy5a.js +0 -175
- package/dist/_chunks/chat-container.agent-CM4WModE.js +0 -27
- package/dist/_chunks/chat-input-C_tMQv92.js +0 -252
- package/dist/_chunks/chat-input.agent-Bsz3ckGa.js +0 -69
- package/dist/_chunks/combobox.agent-CAvUkkIe.js +0 -410
- package/dist/_chunks/command-palette.agent-HatEt_EM.js +0 -391
- package/dist/_chunks/dialog.agent-Daf1TTko.js +0 -179
- package/dist/_chunks/dropdown-menu-C7AZipNz.js +0 -219
- package/dist/_chunks/dropdown-menu.agent-BcxIKOjK.js +0 -43
- package/dist/_chunks/file-upload.agent-DJaH2dHg.js +0 -681
- package/dist/_chunks/list.agent-D0iWt4VI.js +0 -420
- package/dist/_chunks/payment-form.agent-kuIfodCj.js +0 -31
- package/dist/_chunks/popover-kFN8s84V.js +0 -229
- package/dist/_chunks/popover.agent-K_d1cfbj.js +0 -39
- package/dist/_chunks/progress-wNsqkw8I.js +0 -253
- package/dist/_chunks/progress.agent-C68rDOXL.js +0 -27
- package/dist/_chunks/resizable.agent-CMwZzvsi.js +0 -456
- package/dist/_chunks/sheet.agent-QAyTOxgk.js +0 -46
- package/dist/_chunks/sidebar.agent-C9TM_ZDZ.js +0 -49
- package/dist/_chunks/stepper-progress-Bmen-YXB.js +0 -149
- package/dist/_chunks/stepper-progress.agent-q9InWca4.js +0 -61
|
@@ -23,8 +23,16 @@ const K = H(
|
|
|
23
23
|
defaultVariants: { size: "md" }
|
|
24
24
|
}
|
|
25
25
|
), O = U(
|
|
26
|
-
({
|
|
27
|
-
|
|
26
|
+
({
|
|
27
|
+
stream: p,
|
|
28
|
+
size: T = "md",
|
|
29
|
+
barCount: t = 32,
|
|
30
|
+
deviceName: A,
|
|
31
|
+
label: V,
|
|
32
|
+
className: k,
|
|
33
|
+
...q
|
|
34
|
+
}, B) => {
|
|
35
|
+
const { t: M } = J(), o = i([]), c = i(null), f = i(null), l = i(null), h = i(null), v = i(null), [R, j] = _(!1);
|
|
28
36
|
b(() => {
|
|
29
37
|
var n;
|
|
30
38
|
if (typeof window > "u") return;
|
|
@@ -32,12 +40,12 @@ const K = H(
|
|
|
32
40
|
j(e.matches);
|
|
33
41
|
const r = () => j(e.matches);
|
|
34
42
|
return (n = e.addEventListener) == null || n.call(e, "change", r), () => {
|
|
35
|
-
var
|
|
36
|
-
return (
|
|
43
|
+
var d;
|
|
44
|
+
return (d = e.removeEventListener) == null ? void 0 : d.call(e, "change", r);
|
|
37
45
|
};
|
|
38
46
|
}, []), b(() => {
|
|
39
|
-
if (!
|
|
40
|
-
|
|
47
|
+
if (!p) {
|
|
48
|
+
o.current.forEach((s) => {
|
|
41
49
|
s == null || s.style.setProperty("--bar-height", "10%");
|
|
42
50
|
});
|
|
43
51
|
return;
|
|
@@ -46,8 +54,8 @@ const K = H(
|
|
|
46
54
|
if (!e) return;
|
|
47
55
|
const r = new e(), n = r.createAnalyser();
|
|
48
56
|
n.fftSize = 256;
|
|
49
|
-
const
|
|
50
|
-
|
|
57
|
+
const d = r.createMediaStreamSource(p);
|
|
58
|
+
d.connect(n), f.current = r, l.current = n, h.current = d, v.current = new Uint8Array(n.frequencyBinCount);
|
|
51
59
|
let z = 0;
|
|
52
60
|
const x = (s) => {
|
|
53
61
|
var E;
|
|
@@ -62,12 +70,12 @@ const K = H(
|
|
|
62
70
|
a
|
|
63
71
|
);
|
|
64
72
|
const y = Math.max(1, Math.floor(a.length / t));
|
|
65
|
-
for (let
|
|
73
|
+
for (let m = 0; m < t; m += 1) {
|
|
66
74
|
let L = 0;
|
|
67
75
|
for (let w = 0; w < y; w += 1)
|
|
68
|
-
L += a[
|
|
76
|
+
L += a[m * y + w] ?? 0;
|
|
69
77
|
const D = L / y, I = Math.max(8, Math.min(100, D / 255 * 100));
|
|
70
|
-
(E =
|
|
78
|
+
(E = o.current[m]) == null || E.style.setProperty("--bar-height", `${I}%`);
|
|
71
79
|
}
|
|
72
80
|
c.current = requestAnimationFrame(x);
|
|
73
81
|
};
|
|
@@ -85,19 +93,17 @@ const K = H(
|
|
|
85
93
|
(u = f.current) == null || u.close().catch(() => {
|
|
86
94
|
}), f.current = null, l.current = null, h.current = null, v.current = null;
|
|
87
95
|
};
|
|
88
|
-
}, [
|
|
89
|
-
const N = $(
|
|
90
|
-
() => Array.from({ length: t }),
|
|
91
|
-
[t]
|
|
92
|
-
);
|
|
96
|
+
}, [p, t, R]);
|
|
97
|
+
const N = $(() => Array.from({ length: t }), [t]);
|
|
93
98
|
b(() => {
|
|
94
|
-
|
|
99
|
+
o.current.length > t && (o.current.length = t);
|
|
95
100
|
}, [t]);
|
|
96
101
|
const P = V ?? M("ui.chat.audio.visualiserLabel"), g = A ? M("ui.chat.audio.device", { name: A }) : null, F = G();
|
|
97
102
|
return /* @__PURE__ */ C(
|
|
98
103
|
"div",
|
|
99
104
|
{
|
|
100
105
|
ref: B,
|
|
106
|
+
role: "img",
|
|
101
107
|
"aria-label": P,
|
|
102
108
|
"aria-describedby": g ? F : void 0,
|
|
103
109
|
"data-component": "audio-visualiser",
|
|
@@ -108,7 +114,7 @@ const K = H(
|
|
|
108
114
|
"div",
|
|
109
115
|
{
|
|
110
116
|
ref: (n) => {
|
|
111
|
-
|
|
117
|
+
o.current[r] = n;
|
|
112
118
|
},
|
|
113
119
|
"aria-hidden": "true",
|
|
114
120
|
className: [
|
|
@@ -136,4 +142,4 @@ O.displayName = "AudioVisualiser";
|
|
|
136
142
|
export {
|
|
137
143
|
O as A
|
|
138
144
|
};
|
|
139
|
-
//# sourceMappingURL=audio-visualiser-
|
|
145
|
+
//# sourceMappingURL=audio-visualiser-ByDEFLNm.js.map
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { jsx as o, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ye, useId as Ze, useState as I, useRef as c, useCallback as T, useEffect as N, useMemo as S } from "react";
|
|
3
|
+
import { _ as m } from "./index-4xgbg-sn.js";
|
|
4
|
+
import * as A from "@radix-ui/react-popover";
|
|
5
|
+
import { c as F } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as et } from "react-i18next";
|
|
7
|
+
import { S as me } from "./spinner-DLaYfLPl.js";
|
|
8
|
+
import { u as tt } from "./form-field-context-B3APVHKx.js";
|
|
9
|
+
import { u as st } from "./use-debounced-callback-BisrB-Fq.js";
|
|
10
|
+
import { g as nt } from "./group-options-BvKhQ3xb.js";
|
|
11
|
+
import { I as ot, a as X, b as J, c as at } from "./input-surface-u4QB0lxe.js";
|
|
12
|
+
import { u as rt } from "./registry-C9nwlNyL.js";
|
|
13
|
+
const it = {
|
|
14
|
+
id: "autocomplete",
|
|
15
|
+
capabilities: ["filter", "pick", "open", "close"],
|
|
16
|
+
state: {
|
|
17
|
+
value: {
|
|
18
|
+
type: "string | null",
|
|
19
|
+
description: "Currently-selected option value, or null when nothing is committed.",
|
|
20
|
+
read: (s) => s.getValue()
|
|
21
|
+
},
|
|
22
|
+
query: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Current free-text query in the input.",
|
|
25
|
+
read: (s) => s.getQuery()
|
|
26
|
+
},
|
|
27
|
+
isOpen: {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
description: "True when the suggestion list is visible.",
|
|
30
|
+
read: (s) => s.getIsOpen()
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
actions: {
|
|
34
|
+
set_value: {
|
|
35
|
+
safety: "read",
|
|
36
|
+
argsType: "{ value: string | null }",
|
|
37
|
+
description: "Set the committed value programmatically.",
|
|
38
|
+
invoke: (s, l) => {
|
|
39
|
+
s.setValue(l.value);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
apply_filter: {
|
|
43
|
+
safety: "read",
|
|
44
|
+
argsType: "{ query: string }",
|
|
45
|
+
description: "Set the input query, which filters the suggestion list.",
|
|
46
|
+
invoke: (s, l) => {
|
|
47
|
+
s.setQuery(l.query);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
clear: {
|
|
51
|
+
safety: "read",
|
|
52
|
+
description: "Clear the value and the query.",
|
|
53
|
+
invoke: (s) => {
|
|
54
|
+
s.clear();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
open: {
|
|
58
|
+
safety: "read",
|
|
59
|
+
description: "Open the suggestion list.",
|
|
60
|
+
invoke: (s) => {
|
|
61
|
+
s.open();
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
close: {
|
|
65
|
+
safety: "read",
|
|
66
|
+
description: "Close the suggestion list.",
|
|
67
|
+
invoke: (s) => {
|
|
68
|
+
s.close();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
domHooks: {
|
|
73
|
+
root: { attr: "data-component", value: "autocomplete" },
|
|
74
|
+
instanceId: {
|
|
75
|
+
attr: "data-component-id",
|
|
76
|
+
sourceProp: "id",
|
|
77
|
+
description: "Sourced from the id prop."
|
|
78
|
+
},
|
|
79
|
+
item: {
|
|
80
|
+
attr: "data-option-id",
|
|
81
|
+
description: "Each suggestion emits its value as data-option-id."
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, dt = F(
|
|
85
|
+
["ds:flex ds:w-full ds:items-center", at].join(" "),
|
|
86
|
+
{
|
|
87
|
+
variants: {
|
|
88
|
+
size: {
|
|
89
|
+
sm: `${X.sm} ${J.sm}`,
|
|
90
|
+
md: `${X.md} ${J.md}`,
|
|
91
|
+
lg: `${X.lg} ${J.lg}`
|
|
92
|
+
},
|
|
93
|
+
tone: ot
|
|
94
|
+
},
|
|
95
|
+
defaultVariants: { size: "md", tone: "default" }
|
|
96
|
+
}
|
|
97
|
+
), lt = F(
|
|
98
|
+
[
|
|
99
|
+
"ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground",
|
|
100
|
+
"ds:placeholder:text-muted-foreground",
|
|
101
|
+
"ds:outline-none ds:focus:outline-none ds:focus-visible:outline-none",
|
|
102
|
+
"ds:disabled:cursor-not-allowed",
|
|
103
|
+
"ds:read-only:cursor-default"
|
|
104
|
+
].join(" "),
|
|
105
|
+
{
|
|
106
|
+
variants: {
|
|
107
|
+
hasStart: { true: "ds:ps-2", false: "ds:ps-3" },
|
|
108
|
+
hasEnd: { true: "ds:pe-2", false: "ds:pe-3" }
|
|
109
|
+
},
|
|
110
|
+
defaultVariants: { hasStart: !1, hasEnd: !1 }
|
|
111
|
+
}
|
|
112
|
+
), ut = F(
|
|
113
|
+
[
|
|
114
|
+
"ds:z-[var(--z-dropdown)] ds:overflow-hidden",
|
|
115
|
+
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-background",
|
|
116
|
+
"ds:shadow-[var(--shadow-md)]",
|
|
117
|
+
"ds:w-[var(--radix-popover-trigger-width)]",
|
|
118
|
+
"ds:animate-in ds:fade-in ds:zoom-in-95",
|
|
119
|
+
"ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out",
|
|
120
|
+
"ds:data-[state=closed]:zoom-out-95",
|
|
121
|
+
"ds:motion-reduce:animate-none"
|
|
122
|
+
].join(" ")
|
|
123
|
+
), ge = F(
|
|
124
|
+
[
|
|
125
|
+
"ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
126
|
+
"ds:ps-3 ds:pe-3 ds:py-2 ds:text-[length:var(--font-size-sm)] ds:text-foreground",
|
|
127
|
+
"ds:rounded-[var(--radius-sm)] ds:select-none ds:cursor-pointer",
|
|
128
|
+
"ds:data-[disabled=true]:pointer-events-none ds:data-[disabled=true]:opacity-50",
|
|
129
|
+
"ds:data-[selected=true]:bg-primary ds:data-[selected=true]:text-primary-foreground",
|
|
130
|
+
"ds:hover:bg-muted ds:data-[selected=true]:hover:bg-primary"
|
|
131
|
+
].join(" ")
|
|
132
|
+
), he = [
|
|
133
|
+
"ds:[&_[cmdk-group-heading]]:ps-3",
|
|
134
|
+
"ds:[&_[cmdk-group-heading]]:pe-3",
|
|
135
|
+
"ds:[&_[cmdk-group-heading]]:py-1.5",
|
|
136
|
+
"ds:[&_[cmdk-group-heading]]:type-eyebrow",
|
|
137
|
+
"ds:[&_[cmdk-group-heading]]:text-muted-foreground"
|
|
138
|
+
].join(" "), W = "ds:inline-flex ds:items-center ds:shrink-0 ds:text-muted-foreground ds:[&_svg]:size-4";
|
|
139
|
+
function Y(s, l, B) {
|
|
140
|
+
return `${s}-${l}-${B}`;
|
|
141
|
+
}
|
|
142
|
+
function ve(s, l) {
|
|
143
|
+
return `${s}:${l}`;
|
|
144
|
+
}
|
|
145
|
+
const ct = Ye(
|
|
146
|
+
function({
|
|
147
|
+
loadOptions: l,
|
|
148
|
+
debounceMs: B = 250,
|
|
149
|
+
value: Z,
|
|
150
|
+
defaultValue: be,
|
|
151
|
+
onChange: R,
|
|
152
|
+
onSelect: u,
|
|
153
|
+
recents: v,
|
|
154
|
+
onRecentSelect: M,
|
|
155
|
+
snapOnBlur: ye = !1,
|
|
156
|
+
size: we = "md",
|
|
157
|
+
tone: ke = "default",
|
|
158
|
+
startAdornment: P,
|
|
159
|
+
endAdornment: z,
|
|
160
|
+
placeholder: ee,
|
|
161
|
+
disabled: xe,
|
|
162
|
+
readOnly: b,
|
|
163
|
+
required: Ce,
|
|
164
|
+
name: Ve,
|
|
165
|
+
id: j,
|
|
166
|
+
className: Ie,
|
|
167
|
+
"aria-label": te
|
|
168
|
+
}, k) {
|
|
169
|
+
const { t: x, i18n: Ne } = et(), C = tt(), Re = Ze(), g = j ?? C.id ?? Re, se = `${g}-listbox`, Ee = `${g}-live`, h = !!(C.disabled || xe), _e = !!(C.required || Ce), ne = C.invalid, $e = ne ? "error" : ke ?? "default", De = C.describedBy || void 0, U = Z !== void 0, [Te, Ae] = I(
|
|
170
|
+
be ?? ""
|
|
171
|
+
), r = U ? Z : Te, [i, d] = I(!1), [y, oe] = I([]), [V, q] = I(!1), [p, Fe] = I(""), E = c(!1), H = c(null), O = c(r), ae = c(/* @__PURE__ */ new Map()), re = c(/* @__PURE__ */ new Map()), Q = c(null), G = c(null), Be = T(
|
|
172
|
+
(e) => {
|
|
173
|
+
Q.current = e, typeof k == "function" ? k(e) : k && (k.current = e);
|
|
174
|
+
},
|
|
175
|
+
[k]
|
|
176
|
+
), ie = Ne.language;
|
|
177
|
+
N(() => {
|
|
178
|
+
const e = /* @__PURE__ */ new Map();
|
|
179
|
+
for (const t of y) e.set(t.value, t);
|
|
180
|
+
ae.current = e;
|
|
181
|
+
}, [y]), N(() => {
|
|
182
|
+
const e = /* @__PURE__ */ new Map();
|
|
183
|
+
if (v) for (const t of v) e.set(t.value, t);
|
|
184
|
+
re.current = e;
|
|
185
|
+
}, [v]);
|
|
186
|
+
const Me = T(
|
|
187
|
+
(e) => {
|
|
188
|
+
var n;
|
|
189
|
+
if (h || b || E.current) return;
|
|
190
|
+
(n = H.current) == null || n.abort();
|
|
191
|
+
const t = new AbortController();
|
|
192
|
+
H.current = t, O.current = e, q(!0), l(e, { signal: t.signal, locale: ie }).then((a) => {
|
|
193
|
+
t.signal.aborted || O.current === e && (oe(a), q(!1));
|
|
194
|
+
}).catch((a) => {
|
|
195
|
+
t.signal.aborted || a && typeof a == "object" && "name" in a && a.name === "AbortError" || O.current === e && (oe([]), q(!1));
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
[h, b, l, ie]
|
|
199
|
+
), w = st(Me, B);
|
|
200
|
+
N(() => () => {
|
|
201
|
+
var e;
|
|
202
|
+
w.cancel(), (e = H.current) == null || e.abort();
|
|
203
|
+
}, [w]);
|
|
204
|
+
const f = T(
|
|
205
|
+
(e) => {
|
|
206
|
+
U || Ae(e), R == null || R(e);
|
|
207
|
+
},
|
|
208
|
+
[U, R]
|
|
209
|
+
), de = T(
|
|
210
|
+
(e) => {
|
|
211
|
+
const [t, n] = e.split(":");
|
|
212
|
+
if (!n || t !== "recent" && t !== "option") return null;
|
|
213
|
+
const fe = (t === "recent" ? re.current : ae.current).get(n);
|
|
214
|
+
return fe ? { kind: t, option: fe } : null;
|
|
215
|
+
},
|
|
216
|
+
[]
|
|
217
|
+
), Pe = (e) => {
|
|
218
|
+
f(e), !(h || b) && (i || d(!0), !E.current && w(e));
|
|
219
|
+
}, ze = (e) => {
|
|
220
|
+
E.current = !0;
|
|
221
|
+
}, je = (e) => {
|
|
222
|
+
E.current = !1;
|
|
223
|
+
const t = e.currentTarget.value;
|
|
224
|
+
w(t);
|
|
225
|
+
}, Ue = (e) => {
|
|
226
|
+
h || b || (d(!0), r && w(r));
|
|
227
|
+
}, qe = (e) => {
|
|
228
|
+
const t = e.relatedTarget;
|
|
229
|
+
if (!(t && G.current && G.current.contains(t))) {
|
|
230
|
+
if (ye && p) {
|
|
231
|
+
const n = de(p);
|
|
232
|
+
n && (f(n.option.label), u == null || u(n.option));
|
|
233
|
+
}
|
|
234
|
+
d(!1);
|
|
235
|
+
}
|
|
236
|
+
}, He = (e) => {
|
|
237
|
+
if (!e.nativeEvent.isComposing) {
|
|
238
|
+
if (e.key === "Escape") {
|
|
239
|
+
i && (e.preventDefault(), e.stopPropagation(), d(!1));
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (e.key === "ArrowDown" && !i) {
|
|
243
|
+
e.preventDefault(), d(!0), r && w(r);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
if (e.key === "Tab" && i && p) {
|
|
247
|
+
const t = de(p);
|
|
248
|
+
t && (f(t.option.label), u == null || u(t.option), d(!1));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}, le = (e, t) => {
|
|
252
|
+
var n;
|
|
253
|
+
f(t.label), e === "recent" ? M == null || M(t) : u == null || u(t), d(!1), (n = Q.current) == null || n.focus();
|
|
254
|
+
}, L = (e) => {
|
|
255
|
+
e.preventDefault();
|
|
256
|
+
}, _ = !!(v && v.length > 0) && r.length === 0, Oe = S(
|
|
257
|
+
() => nt(y),
|
|
258
|
+
[y]
|
|
259
|
+
), Qe = !!P, Ge = !!z || V, Le = dt({
|
|
260
|
+
size: we,
|
|
261
|
+
tone: $e,
|
|
262
|
+
className: Ie
|
|
263
|
+
}), Ke = S(() => {
|
|
264
|
+
if (!p) return;
|
|
265
|
+
const [e, t] = p.split(":");
|
|
266
|
+
if (!(!t || e !== "recent" && e !== "option"))
|
|
267
|
+
return Y(g, e, t);
|
|
268
|
+
}, [p, g]), $ = y.length > 0, ue = !_ && !$ && !V && r.length > 0, ce = V && !$, Se = _ || $ || ue || ce, K = c(r);
|
|
269
|
+
N(() => {
|
|
270
|
+
K.current = r;
|
|
271
|
+
}, [r]);
|
|
272
|
+
const pe = c(i);
|
|
273
|
+
N(() => {
|
|
274
|
+
pe.current = i;
|
|
275
|
+
}, [i]);
|
|
276
|
+
const Xe = S(
|
|
277
|
+
() => ({
|
|
278
|
+
getValue: () => K.current || null,
|
|
279
|
+
getQuery: () => K.current,
|
|
280
|
+
getIsOpen: () => pe.current,
|
|
281
|
+
setValue: (e) => {
|
|
282
|
+
f(e ?? "");
|
|
283
|
+
},
|
|
284
|
+
setQuery: (e) => {
|
|
285
|
+
f(e);
|
|
286
|
+
},
|
|
287
|
+
clear: () => {
|
|
288
|
+
f("");
|
|
289
|
+
},
|
|
290
|
+
open: () => {
|
|
291
|
+
d(!0);
|
|
292
|
+
},
|
|
293
|
+
close: () => {
|
|
294
|
+
d(!1);
|
|
295
|
+
}
|
|
296
|
+
}),
|
|
297
|
+
[f]
|
|
298
|
+
);
|
|
299
|
+
rt(it, Xe, j);
|
|
300
|
+
const Je = y.length, We = V ? x("ui.common.loading", "Loading…") : i && r.length > 0 ? x("ui.inputs.autocomplete.results", {
|
|
301
|
+
count: Je,
|
|
302
|
+
defaultValue: "{{count}} results"
|
|
303
|
+
}) : "";
|
|
304
|
+
return /* @__PURE__ */ o(
|
|
305
|
+
m,
|
|
306
|
+
{
|
|
307
|
+
shouldFilter: !1,
|
|
308
|
+
value: p,
|
|
309
|
+
onValueChange: Fe,
|
|
310
|
+
label: te ?? ee,
|
|
311
|
+
className: "ds:w-full",
|
|
312
|
+
children: /* @__PURE__ */ D(
|
|
313
|
+
A.Root,
|
|
314
|
+
{
|
|
315
|
+
open: i && !h && !b && Se,
|
|
316
|
+
children: [
|
|
317
|
+
/* @__PURE__ */ o(A.Anchor, { asChild: !0, children: /* @__PURE__ */ D(
|
|
318
|
+
"div",
|
|
319
|
+
{
|
|
320
|
+
className: Le,
|
|
321
|
+
"data-component": "autocomplete",
|
|
322
|
+
"data-component-id": j,
|
|
323
|
+
"data-disabled": h || void 0,
|
|
324
|
+
children: [
|
|
325
|
+
P ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${W} ds:ps-3`, children: P }) : null,
|
|
326
|
+
/* @__PURE__ */ o(
|
|
327
|
+
m.Input,
|
|
328
|
+
{
|
|
329
|
+
ref: Be,
|
|
330
|
+
id: g,
|
|
331
|
+
name: Ve,
|
|
332
|
+
placeholder: ee,
|
|
333
|
+
value: r,
|
|
334
|
+
onValueChange: Pe,
|
|
335
|
+
onFocus: Ue,
|
|
336
|
+
onBlur: qe,
|
|
337
|
+
onKeyDown: He,
|
|
338
|
+
onCompositionStart: ze,
|
|
339
|
+
onCompositionEnd: je,
|
|
340
|
+
disabled: h,
|
|
341
|
+
readOnly: b,
|
|
342
|
+
required: _e,
|
|
343
|
+
role: "combobox",
|
|
344
|
+
"aria-autocomplete": "both",
|
|
345
|
+
"aria-expanded": i,
|
|
346
|
+
"aria-controls": i ? se : void 0,
|
|
347
|
+
"aria-activedescendant": Ke,
|
|
348
|
+
"aria-describedby": De,
|
|
349
|
+
"aria-invalid": ne || void 0,
|
|
350
|
+
"aria-label": te,
|
|
351
|
+
autoComplete: "off",
|
|
352
|
+
className: lt({ hasStart: Qe, hasEnd: Ge })
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
V ? /* @__PURE__ */ o("span", { className: `${W} ds:pe-3`, "aria-hidden": "true", children: /* @__PURE__ */ o(me, { size: "sm" }) }) : z ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${W} ds:pe-3`, children: z }) : null,
|
|
356
|
+
/* @__PURE__ */ o(
|
|
357
|
+
"span",
|
|
358
|
+
{
|
|
359
|
+
id: Ee,
|
|
360
|
+
role: "status",
|
|
361
|
+
"aria-live": "polite",
|
|
362
|
+
"aria-atomic": "true",
|
|
363
|
+
className: "ds:sr-only",
|
|
364
|
+
children: We
|
|
365
|
+
}
|
|
366
|
+
)
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
) }),
|
|
370
|
+
/* @__PURE__ */ o(A.Portal, { forceMount: !0, children: /* @__PURE__ */ o(
|
|
371
|
+
A.Content,
|
|
372
|
+
{
|
|
373
|
+
ref: G,
|
|
374
|
+
forceMount: !0,
|
|
375
|
+
hidden: !i,
|
|
376
|
+
side: "bottom",
|
|
377
|
+
align: "start",
|
|
378
|
+
sideOffset: 4,
|
|
379
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
380
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
381
|
+
onPointerDownOutside: (e) => {
|
|
382
|
+
var n;
|
|
383
|
+
const t = e.target;
|
|
384
|
+
if (t && ((n = Q.current) != null && n.contains(t))) {
|
|
385
|
+
e.preventDefault();
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
d(!1);
|
|
389
|
+
},
|
|
390
|
+
onEscapeKeyDown: () => d(!1),
|
|
391
|
+
onMouseDown: L,
|
|
392
|
+
className: ut(),
|
|
393
|
+
children: /* @__PURE__ */ D(
|
|
394
|
+
m.List,
|
|
395
|
+
{
|
|
396
|
+
id: se,
|
|
397
|
+
className: "ds:max-h-[min(24rem,var(--radix-popover-content-available-height))] ds:overflow-auto ds:p-1",
|
|
398
|
+
children: [
|
|
399
|
+
_ ? /* @__PURE__ */ o(
|
|
400
|
+
m.Group,
|
|
401
|
+
{
|
|
402
|
+
heading: x("ui.inputs.autocomplete.recent", "Recent"),
|
|
403
|
+
className: he,
|
|
404
|
+
children: (v ?? []).map((e) => /* @__PURE__ */ o(
|
|
405
|
+
m.Item,
|
|
406
|
+
{
|
|
407
|
+
id: Y(g, "recent", e.value),
|
|
408
|
+
value: ve("recent", e.value),
|
|
409
|
+
disabled: e.disabled,
|
|
410
|
+
onSelect: () => le("recent", e),
|
|
411
|
+
onMouseDown: L,
|
|
412
|
+
className: ge(),
|
|
413
|
+
children: e.label
|
|
414
|
+
},
|
|
415
|
+
`recent-${e.value}`
|
|
416
|
+
))
|
|
417
|
+
}
|
|
418
|
+
) : null,
|
|
419
|
+
ue ? /* @__PURE__ */ o("div", { className: "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: x("ui.inputs.autocomplete.noResults", "No results") }) : null,
|
|
420
|
+
ce ? /* @__PURE__ */ D("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: [
|
|
421
|
+
/* @__PURE__ */ o(me, { size: "sm" }),
|
|
422
|
+
/* @__PURE__ */ o("span", { children: x("ui.common.loading", "Loading…") })
|
|
423
|
+
] }) : null,
|
|
424
|
+
!_ && $ ? Oe.map((e, t) => {
|
|
425
|
+
const n = e.items.map((a) => /* @__PURE__ */ o(
|
|
426
|
+
m.Item,
|
|
427
|
+
{
|
|
428
|
+
id: Y(g, "option", a.value),
|
|
429
|
+
value: ve("option", a.value),
|
|
430
|
+
disabled: a.disabled,
|
|
431
|
+
onSelect: () => le("option", a),
|
|
432
|
+
onMouseDown: L,
|
|
433
|
+
className: ge(),
|
|
434
|
+
children: a.label
|
|
435
|
+
},
|
|
436
|
+
`option-${a.value}`
|
|
437
|
+
));
|
|
438
|
+
return e.group ? /* @__PURE__ */ o(
|
|
439
|
+
m.Group,
|
|
440
|
+
{
|
|
441
|
+
heading: e.group,
|
|
442
|
+
className: he,
|
|
443
|
+
children: n
|
|
444
|
+
},
|
|
445
|
+
`group-${e.group}`
|
|
446
|
+
) : /* @__PURE__ */ o(m.Group, { children: n }, `group-${t}`);
|
|
447
|
+
}) : null
|
|
448
|
+
]
|
|
449
|
+
}
|
|
450
|
+
)
|
|
451
|
+
}
|
|
452
|
+
) })
|
|
453
|
+
]
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
), pt = ct;
|
|
460
|
+
pt.displayName = "Autocomplete";
|
|
461
|
+
export {
|
|
462
|
+
pt as A,
|
|
463
|
+
it as a,
|
|
464
|
+
dt as b
|
|
465
|
+
};
|
|
466
|
+
//# sourceMappingURL=autocomplete-D4oUZbsP.js.map
|
|
@@ -41,18 +41,21 @@ const z = r(
|
|
|
41
41
|
shape: "pill"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
), N = r(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
44
|
+
), N = r(
|
|
45
|
+
"ds:text-[length:var(--font-size-dot)] ds:leading-none ds:shrink-0",
|
|
46
|
+
{
|
|
47
|
+
variants: {
|
|
48
|
+
variant: {
|
|
49
|
+
neutral: "ds:text-muted-foreground",
|
|
50
|
+
info: "ds:text-info",
|
|
51
|
+
success: "ds:text-success",
|
|
52
|
+
warning: "ds:text-warning",
|
|
53
|
+
error: "ds:text-destructive"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: { variant: "neutral" }
|
|
57
|
+
}
|
|
58
|
+
), V = r("ds:shrink-0 ds:[&>svg]:block", {
|
|
56
59
|
variants: {
|
|
57
60
|
size: {
|
|
58
61
|
// Icons shrink with the compact Badge scale: sm badge is 16 px tall, so
|
|
@@ -102,4 +105,4 @@ j.displayName = "Badge";
|
|
|
102
105
|
export {
|
|
103
106
|
j as B
|
|
104
107
|
};
|
|
105
|
-
//# sourceMappingURL=badge-
|
|
108
|
+
//# sourceMappingURL=badge-DKFbntoa.js.map
|