@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
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const e = {
|
|
2
|
-
id: "popover",
|
|
3
|
-
capabilities: ["open", "close"],
|
|
4
|
-
state: {
|
|
5
|
-
isOpen: {
|
|
6
|
-
type: "boolean",
|
|
7
|
-
description: "True when the popover is currently open.",
|
|
8
|
-
read: (o) => o.getIsOpen()
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
actions: {
|
|
12
|
-
open: {
|
|
13
|
-
safety: "read",
|
|
14
|
-
description: "Open the popover.",
|
|
15
|
-
invoke: (o) => {
|
|
16
|
-
o.open();
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
close: {
|
|
20
|
-
safety: "read",
|
|
21
|
-
description: "Close the popover.",
|
|
22
|
-
invoke: (o) => {
|
|
23
|
-
o.close();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
domHooks: {
|
|
28
|
-
root: { attr: "data-component", value: "popover" },
|
|
29
|
-
instanceId: {
|
|
30
|
-
attr: "data-component-id",
|
|
31
|
-
sourceProp: "id",
|
|
32
|
-
description: "Sourced from the id prop on Popover.Root."
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
e as p
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=popover.agent-K_d1cfbj.js.map
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as I } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as M, useId as ue, useRef as p, useState as me, useEffect as fe, useLayoutEffect as G, useImperativeHandle as ge, createContext as pe, useContext as ve } from "react";
|
|
3
|
-
import { c as K } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as C } from "react-i18next";
|
|
5
|
-
const j = pe(null);
|
|
6
|
-
function Q() {
|
|
7
|
-
const o = ve(j);
|
|
8
|
-
if (!o) throw new Error("Progress sub-components must be used within <Progress>");
|
|
9
|
-
return o;
|
|
10
|
-
}
|
|
11
|
-
const N = {
|
|
12
|
-
sm: { viewBox: "0 0 24 24", cx: 12, cy: 12, r: 10 },
|
|
13
|
-
md: { viewBox: "0 0 40 40", cx: 20, cy: 20, r: 18 },
|
|
14
|
-
lg: { viewBox: "0 0 56 56", cx: 28, cy: 28, r: 26 }
|
|
15
|
-
}, be = K(
|
|
16
|
-
"ds:relative ds:w-full ds:overflow-hidden ds:rounded-[var(--radius-full)] ds:bg-[var(--progress-track)]",
|
|
17
|
-
{
|
|
18
|
-
variants: {
|
|
19
|
-
size: { sm: "ds:h-1", md: "ds:h-2", lg: "ds:h-3" }
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: { size: "md" }
|
|
22
|
-
}
|
|
23
|
-
), J = K("", {
|
|
24
|
-
variants: {
|
|
25
|
-
size: {
|
|
26
|
-
sm: "ds:w-6 ds:h-6",
|
|
27
|
-
md: "ds:w-10 ds:h-10",
|
|
28
|
-
lg: "ds:w-14 ds:h-14"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: { size: "md" }
|
|
32
|
-
}), U = M(({ children: o, className: u, ...e }, t) => {
|
|
33
|
-
const r = Q(), { t: d, i18n: m } = C(), f = r.isIndeterminate ? d("ui.common.loading", "Loading...") : d("ui.common.progress_label", {
|
|
34
|
-
percent: new Intl.NumberFormat(m.language, {
|
|
35
|
-
style: "percent",
|
|
36
|
-
maximumFractionDigits: 0
|
|
37
|
-
}).format((r.value ?? 0) / r.max)
|
|
38
|
-
});
|
|
39
|
-
return /* @__PURE__ */ l(
|
|
40
|
-
"span",
|
|
41
|
-
{
|
|
42
|
-
ref: t,
|
|
43
|
-
id: r.labelId,
|
|
44
|
-
className: [
|
|
45
|
-
"type-label ds:text-foreground",
|
|
46
|
-
u
|
|
47
|
-
].filter(Boolean).join(" "),
|
|
48
|
-
...e,
|
|
49
|
-
children: o ?? f
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
});
|
|
53
|
-
U.displayName = "Progress.Label";
|
|
54
|
-
const W = M(({ className: o, ...u }, e) => {
|
|
55
|
-
const t = Q(), { t: r, i18n: d } = C(), m = t.isIndeterminate ? r("ui.common.loading", "Loading...") : new Intl.NumberFormat(d.language, {
|
|
56
|
-
style: "percent",
|
|
57
|
-
maximumFractionDigits: 0
|
|
58
|
-
}).format((t.value ?? 0) / t.max);
|
|
59
|
-
return /* @__PURE__ */ l(
|
|
60
|
-
"span",
|
|
61
|
-
{
|
|
62
|
-
ref: e,
|
|
63
|
-
className: ["type-body-sm ds:tabular-nums ds:text-muted-foreground", o].filter(Boolean).join(" "),
|
|
64
|
-
...u,
|
|
65
|
-
children: m
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
});
|
|
69
|
-
W.displayName = "Progress.Value";
|
|
70
|
-
const Y = M(
|
|
71
|
-
({
|
|
72
|
-
id: o,
|
|
73
|
-
value: u,
|
|
74
|
-
max: e = 100,
|
|
75
|
-
shape: t = "bar",
|
|
76
|
-
size: r = "md",
|
|
77
|
-
ariaLabel: d,
|
|
78
|
-
ariaValueText: m,
|
|
79
|
-
debouncePercent: f = 1,
|
|
80
|
-
disabled: L = !1,
|
|
81
|
-
className: Z,
|
|
82
|
-
children: R,
|
|
83
|
-
...V
|
|
84
|
-
}, $) => {
|
|
85
|
-
const B = ue(), { t: D, i18n: z } = C(), x = p(null), P = p(null), k = p(null), w = p(null), g = p(null), s = u === void 0, i = s ? void 0 : Math.min(e, Math.max(0, u)), ee = i !== void 0 ? i / e * 100 : void 0, [re, te] = me(!1);
|
|
86
|
-
fe(() => {
|
|
87
|
-
te(!0);
|
|
88
|
-
}, []);
|
|
89
|
-
const v = re || s ? ee : 0;
|
|
90
|
-
G(() => {
|
|
91
|
-
var a, c;
|
|
92
|
-
if (!(s || v === void 0))
|
|
93
|
-
if (t === "bar")
|
|
94
|
-
(a = P.current) == null || a.style.setProperty(
|
|
95
|
-
"--progress-value",
|
|
96
|
-
String(v)
|
|
97
|
-
);
|
|
98
|
-
else {
|
|
99
|
-
const { r: n } = N[r], h = 2 * Math.PI * n * (1 - v / 100);
|
|
100
|
-
(c = w.current) == null || c.style.setProperty(
|
|
101
|
-
"stroke-dashoffset",
|
|
102
|
-
String(h)
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
}, [s, v, t, r]), G(() => {
|
|
106
|
-
const a = t === "bar" ? x.current : k.current;
|
|
107
|
-
if (!a) return;
|
|
108
|
-
if (s) {
|
|
109
|
-
a.removeAttribute("aria-valuenow"), g.current = null;
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (i === void 0) return;
|
|
113
|
-
const c = i / e * 100, n = g.current;
|
|
114
|
-
(n === null ? 1 / 0 : Math.abs(c - n)) >= f && (a.setAttribute("aria-valuenow", String(i)), g.current = c);
|
|
115
|
-
}, [s, i, e, f, t]), ge(
|
|
116
|
-
$,
|
|
117
|
-
() => ({
|
|
118
|
-
setValue: (a) => {
|
|
119
|
-
var X, q;
|
|
120
|
-
const c = Math.min(e, Math.max(0, a)), n = c / e * 100;
|
|
121
|
-
if (t === "bar")
|
|
122
|
-
(X = P.current) == null || X.style.setProperty(
|
|
123
|
-
"--progress-value",
|
|
124
|
-
String(n)
|
|
125
|
-
);
|
|
126
|
-
else {
|
|
127
|
-
const { r: le } = N[r], de = 2 * Math.PI * le * (1 - n / 100);
|
|
128
|
-
(q = w.current) == null || q.style.setProperty(
|
|
129
|
-
"stroke-dashoffset",
|
|
130
|
-
String(de)
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
const y = t === "bar" ? x.current : k.current, h = g.current;
|
|
134
|
-
(h === null ? 1 / 0 : Math.abs(n - h)) >= f && y && (y.setAttribute("aria-valuenow", String(c)), g.current = n);
|
|
135
|
-
}
|
|
136
|
-
}),
|
|
137
|
-
[e, t, r, f]
|
|
138
|
-
);
|
|
139
|
-
const se = s ? D("ui.common.loading", "Loading...") : D("ui.common.progress_label", {
|
|
140
|
-
percent: new Intl.NumberFormat(z.language, {
|
|
141
|
-
style: "percent",
|
|
142
|
-
maximumFractionDigits: 0
|
|
143
|
-
}).format((i ?? 0) / e)
|
|
144
|
-
}), F = d ? { "aria-label": d } : { "aria-labelledby": B, "aria-label": se }, S = s ? { "aria-busy": !0, "aria-valuemin": 0, "aria-valuemax": e } : {
|
|
145
|
-
"aria-valuemin": 0,
|
|
146
|
-
"aria-valuemax": e,
|
|
147
|
-
...m ? { "aria-valuetext": m } : {}
|
|
148
|
-
}, E = L ? { "aria-disabled": !0 } : {}, A = [
|
|
149
|
-
"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
150
|
-
L && "ds:opacity-50",
|
|
151
|
-
Z
|
|
152
|
-
].filter(Boolean).join(" "), T = {
|
|
153
|
-
labelId: B,
|
|
154
|
-
isIndeterminate: s,
|
|
155
|
-
value: i,
|
|
156
|
-
max: e
|
|
157
|
-
};
|
|
158
|
-
if (t === "bar") {
|
|
159
|
-
const a = s ? [
|
|
160
|
-
"ds:absolute ds:[inset-block:0] ds:bg-primary ds:rounded-[var(--radius-full)]",
|
|
161
|
-
"ds:[@media(prefers-reduced-motion:no-preference)]:animate-[progress-bar-indeterminate_1200ms_ease-in-out_infinite]",
|
|
162
|
-
"ds:[.theme-accessible_&]:animate-none",
|
|
163
|
-
"ds:motion-reduce:animate-[progress-indeterminate-pulse_var(--animation-duration)_ease-in-out_infinite]"
|
|
164
|
-
].join(" ") : [
|
|
165
|
-
"ds:absolute ds:[inset-block:0] ds:start-0",
|
|
166
|
-
"ds:[inline-size:calc(var(--progress-value,0)*1%)]",
|
|
167
|
-
"ds:bg-primary ds:rounded-[var(--radius-full)]",
|
|
168
|
-
"ds:transition-[inline-size] ds:duration-[var(--animation-duration)]",
|
|
169
|
-
"ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
|
|
170
|
-
].join(" ");
|
|
171
|
-
return /* @__PURE__ */ l(j.Provider, { value: T, children: /* @__PURE__ */ I("div", { className: A, "data-component": "progress", "data-component-id": o, ...V, children: [
|
|
172
|
-
R,
|
|
173
|
-
/* @__PURE__ */ l(
|
|
174
|
-
"div",
|
|
175
|
-
{
|
|
176
|
-
ref: x,
|
|
177
|
-
role: "progressbar",
|
|
178
|
-
...F,
|
|
179
|
-
...S,
|
|
180
|
-
...E,
|
|
181
|
-
className: be({ size: r }),
|
|
182
|
-
children: /* @__PURE__ */ l("div", { ref: P, className: a })
|
|
183
|
-
}
|
|
184
|
-
)
|
|
185
|
-
] }) });
|
|
186
|
-
}
|
|
187
|
-
const { viewBox: ae, cx: O, cy: H, r: _ } = N[r], b = 2 * Math.PI * _, ne = b * 0.25, oe = s ? ne : b, ie = s ? [
|
|
188
|
-
J({ size: r }),
|
|
189
|
-
"ds:[transform:rotate(-90deg)]",
|
|
190
|
-
"ds:[@media(prefers-reduced-motion:no-preference)]:animate-[progress-circular-spin_1200ms_linear_infinite]",
|
|
191
|
-
"ds:[.theme-accessible_&]:animate-none",
|
|
192
|
-
"ds:motion-reduce:animate-[progress-indeterminate-pulse_var(--animation-duration)_ease-in-out_infinite]"
|
|
193
|
-
].join(" ") : [
|
|
194
|
-
J({ size: r }),
|
|
195
|
-
"ds:[transform:rotate(-90deg)]",
|
|
196
|
-
"ds:rtl:[transform:rotate(-90deg)_scaleX(-1)]"
|
|
197
|
-
].join(" "), ce = [
|
|
198
|
-
"ds:stroke-primary ds:[stroke-width:var(--spacing-xs)]",
|
|
199
|
-
!s && "ds:transition-[stroke-dashoffset] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
|
|
200
|
-
].filter(Boolean).join(" ");
|
|
201
|
-
return /* @__PURE__ */ l(j.Provider, { value: T, children: /* @__PURE__ */ I("div", { className: A, "data-component": "progress", ...V, children: [
|
|
202
|
-
R,
|
|
203
|
-
/* @__PURE__ */ I(
|
|
204
|
-
"svg",
|
|
205
|
-
{
|
|
206
|
-
ref: k,
|
|
207
|
-
role: "progressbar",
|
|
208
|
-
...F,
|
|
209
|
-
...S,
|
|
210
|
-
...E,
|
|
211
|
-
viewBox: ae,
|
|
212
|
-
className: ie,
|
|
213
|
-
children: [
|
|
214
|
-
/* @__PURE__ */ l(
|
|
215
|
-
"circle",
|
|
216
|
-
{
|
|
217
|
-
cx: O,
|
|
218
|
-
cy: H,
|
|
219
|
-
r: _,
|
|
220
|
-
fill: "none",
|
|
221
|
-
strokeDasharray: b,
|
|
222
|
-
className: "ds:[stroke:var(--progress-track)] ds:[stroke-width:var(--spacing-xs)]"
|
|
223
|
-
}
|
|
224
|
-
),
|
|
225
|
-
/* @__PURE__ */ l(
|
|
226
|
-
"circle",
|
|
227
|
-
{
|
|
228
|
-
ref: w,
|
|
229
|
-
cx: O,
|
|
230
|
-
cy: H,
|
|
231
|
-
r: _,
|
|
232
|
-
fill: "none",
|
|
233
|
-
strokeLinecap: "round",
|
|
234
|
-
strokeDasharray: b,
|
|
235
|
-
strokeDashoffset: oe,
|
|
236
|
-
className: ce
|
|
237
|
-
}
|
|
238
|
-
)
|
|
239
|
-
]
|
|
240
|
-
}
|
|
241
|
-
)
|
|
242
|
-
] }) });
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
Y.displayName = "Progress";
|
|
246
|
-
const _e = Object.assign(Y, {
|
|
247
|
-
Label: U,
|
|
248
|
-
Value: W
|
|
249
|
-
});
|
|
250
|
-
export {
|
|
251
|
-
_e as P
|
|
252
|
-
};
|
|
253
|
-
//# sourceMappingURL=progress-wNsqkw8I.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const o = {
|
|
2
|
-
id: "progress",
|
|
3
|
-
capabilities: [],
|
|
4
|
-
state: {},
|
|
5
|
-
actions: {
|
|
6
|
-
set_value: {
|
|
7
|
-
safety: "read",
|
|
8
|
-
argsType: "{ value: number }",
|
|
9
|
-
description: "Set the displayed progress value (0–100).",
|
|
10
|
-
invoke: (e, t) => {
|
|
11
|
-
e.setValue(t.value);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
domHooks: {
|
|
16
|
-
root: { attr: "data-component", value: "progress" },
|
|
17
|
-
instanceId: {
|
|
18
|
-
attr: "data-component-id",
|
|
19
|
-
sourceProp: "id",
|
|
20
|
-
description: "Sourced from the id prop."
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
o as p
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=progress.agent-C68rDOXL.js.map
|