@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,456 +0,0 @@
|
|
|
1
|
-
import { jsx as L, jsxs as ue } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as fe, useContext as de, forwardRef as ee, useState as Z, useRef as H, useCallback as X, useEffect as se, useImperativeHandle as pe, useId as me, useMemo as ze, Children as be, useLayoutEffect as ge, isValidElement as ve, cloneElement as re } from "react";
|
|
3
|
-
import { c as te } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as Se } from "react-i18next";
|
|
5
|
-
const ie = fe(null);
|
|
6
|
-
function ae() {
|
|
7
|
-
const e = de(ie);
|
|
8
|
-
if (!e)
|
|
9
|
-
throw new Error("useResizable must be used within a PanelGroup");
|
|
10
|
-
return e;
|
|
11
|
-
}
|
|
12
|
-
const oe = "ui-kit:resizable:";
|
|
13
|
-
function he(e) {
|
|
14
|
-
if (!e) return null;
|
|
15
|
-
try {
|
|
16
|
-
const c = localStorage.getItem(`${oe}${e}`);
|
|
17
|
-
if (!c) return null;
|
|
18
|
-
const u = JSON.parse(c);
|
|
19
|
-
return u.v !== 1 || !Array.isArray(u.sizes) ? null : u.sizes;
|
|
20
|
-
} catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function ye(e, c) {
|
|
25
|
-
try {
|
|
26
|
-
localStorage.setItem(
|
|
27
|
-
`${oe}${e}`,
|
|
28
|
-
JSON.stringify({ v: 1, sizes: c })
|
|
29
|
-
);
|
|
30
|
-
} catch {
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function we(e) {
|
|
34
|
-
const c = e.reduce((u, v) => u + v, 0);
|
|
35
|
-
return c === 0 ? e.map(() => 100 / e.length) : e.map((u) => u / c * 100);
|
|
36
|
-
}
|
|
37
|
-
function xe(e, c, u, v, C) {
|
|
38
|
-
const r = [...e], d = c, g = c + 1;
|
|
39
|
-
if (d >= r.length || g >= r.length) return r;
|
|
40
|
-
const s = v[d], a = v[g], p = r[d] + r[g], A = C > 0 ? 20 / C * 100 : 2;
|
|
41
|
-
let o = r[d] + u, f = p - o;
|
|
42
|
-
if (s.collapsible && o < s.minSize) {
|
|
43
|
-
if (o < s.minSize - A)
|
|
44
|
-
return r[d] = s.collapsedSize, r[g] = p - s.collapsedSize, r;
|
|
45
|
-
o = s.minSize, f = p - o;
|
|
46
|
-
}
|
|
47
|
-
if (a.collapsible && f < a.minSize) {
|
|
48
|
-
if (f < a.minSize - A)
|
|
49
|
-
return r[g] = a.collapsedSize, r[d] = p - a.collapsedSize, r;
|
|
50
|
-
f = a.minSize, o = p - f;
|
|
51
|
-
}
|
|
52
|
-
const E = s.collapsible ? s.collapsedSize : s.minSize, l = a.collapsible ? a.collapsedSize : a.minSize;
|
|
53
|
-
return o = Math.max(E, Math.min(s.maxSize, o)), f = p - o, f = Math.max(l, Math.min(a.maxSize, f)), o = p - f, o = Math.max(E, Math.min(s.maxSize, o)), r[d] = Math.max(0, o), r[g] = Math.max(0, p - r[d]), r;
|
|
54
|
-
}
|
|
55
|
-
const Re = te(
|
|
56
|
-
[
|
|
57
|
-
"ds:relative ds:flex ds:items-center ds:justify-center ds:shrink-0 ds:select-none",
|
|
58
|
-
"ds:bg-[var(--border)]",
|
|
59
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
60
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
61
|
-
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
62
|
-
"ds:hover:bg-[var(--accent)] ds:data-[dragging]:bg-[var(--accent)]",
|
|
63
|
-
"ds:before:absolute ds:before:content-['']"
|
|
64
|
-
],
|
|
65
|
-
{
|
|
66
|
-
variants: {
|
|
67
|
-
orientation: {
|
|
68
|
-
horizontal: [
|
|
69
|
-
"ds:[inline-size:var(--resizable-handle-size)] ds:cursor-col-resize ds:[block-size:100%]",
|
|
70
|
-
"ds:before:[block-size:100%]",
|
|
71
|
-
"ds:before:[inline-size:var(--min-target-size)]",
|
|
72
|
-
"ds:before:[inset-block:0]",
|
|
73
|
-
"ds:before:[inset-inline:calc(0px_-_(var(--min-target-size)_-_var(--resizable-handle-size))_/_2)]"
|
|
74
|
-
],
|
|
75
|
-
vertical: [
|
|
76
|
-
"ds:[block-size:var(--resizable-handle-size)] ds:cursor-row-resize ds:[inline-size:100%]",
|
|
77
|
-
"ds:before:[inline-size:100%]",
|
|
78
|
-
"ds:before:[block-size:var(--min-target-size)]",
|
|
79
|
-
"ds:before:[inset-inline:0]",
|
|
80
|
-
"ds:before:[inset-block:calc(0px_-_(var(--min-target-size)_-_var(--resizable-handle-size))_/_2)]"
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
defaultVariants: { orientation: "horizontal" }
|
|
85
|
-
}
|
|
86
|
-
), ke = te("ds:flex ds:overflow-hidden", {
|
|
87
|
-
variants: {
|
|
88
|
-
direction: {
|
|
89
|
-
horizontal: "ds:flex-row",
|
|
90
|
-
vertical: "ds:flex-col"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
defaultVariants: { direction: "horizontal" }
|
|
94
|
-
}), Me = te("ds:[flex:0_0_var(--panel-self-size,50%)] ds:overflow-auto", {
|
|
95
|
-
variants: {
|
|
96
|
-
direction: {
|
|
97
|
-
horizontal: "ds:[min-inline-size:0]",
|
|
98
|
-
vertical: "ds:[min-block-size:0]"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
defaultVariants: { direction: "horizontal" }
|
|
102
|
-
}), Pe = ee(
|
|
103
|
-
({ direction: e, groupId: c, id: u, onLayout: v, className: C, children: r }, d) => {
|
|
104
|
-
const g = me(), s = H(null), a = H(/* @__PURE__ */ new Map()), p = H(null), [A, o] = Z(""), { panelConfigs: f, processedChildren: E } = ze(() => {
|
|
105
|
-
const n = [];
|
|
106
|
-
let k = 0, m = 0;
|
|
107
|
-
const B = (D) => {
|
|
108
|
-
if (!ve(D)) return D;
|
|
109
|
-
if (D.type === le) {
|
|
110
|
-
const _ = k, Y = D.props;
|
|
111
|
-
return n.push({
|
|
112
|
-
id: `${g}-panel-${_}`,
|
|
113
|
-
index: _,
|
|
114
|
-
defaultSize: Y.defaultSize,
|
|
115
|
-
minSize: Y.minSize ?? 10,
|
|
116
|
-
maxSize: Y.maxSize ?? 90,
|
|
117
|
-
collapsible: Y.collapsible ?? !1,
|
|
118
|
-
collapsedSize: Y.collapsedSize ?? 0
|
|
119
|
-
}), k++, re(D, {
|
|
120
|
-
_panelIndex: _,
|
|
121
|
-
_panelId: `${g}-panel-${_}`
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
if (D.type === ce) {
|
|
125
|
-
const _ = m++;
|
|
126
|
-
return re(
|
|
127
|
-
D,
|
|
128
|
-
{ _handleIndex: _ }
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
return D;
|
|
132
|
-
};
|
|
133
|
-
return {
|
|
134
|
-
panelConfigs: n,
|
|
135
|
-
processedChildren: be.map(r, B)
|
|
136
|
-
};
|
|
137
|
-
}, [r, g]), [l, x] = Z(() => {
|
|
138
|
-
if (f.length === 0) return [];
|
|
139
|
-
const n = he(c);
|
|
140
|
-
return n && n.length === f.length ? n : we(f.map((k) => k.defaultSize));
|
|
141
|
-
}), R = H(l);
|
|
142
|
-
se(() => {
|
|
143
|
-
R.current = l;
|
|
144
|
-
}, [l]);
|
|
145
|
-
const N = X((n) => {
|
|
146
|
-
R.current = n, a.current.forEach((k, m) => {
|
|
147
|
-
m < n.length && k.style.setProperty("--panel-self-size", `${n[m]}%`);
|
|
148
|
-
});
|
|
149
|
-
}, []), $ = X(
|
|
150
|
-
(n) => {
|
|
151
|
-
R.current = n, x(n), v == null || v(n), c && (p.current && clearTimeout(p.current), p.current = setTimeout(
|
|
152
|
-
() => ye(c, n),
|
|
153
|
-
120
|
|
154
|
-
));
|
|
155
|
-
},
|
|
156
|
-
[c, v]
|
|
157
|
-
);
|
|
158
|
-
ge(() => {
|
|
159
|
-
a.current.forEach((n, k) => {
|
|
160
|
-
k < l.length && n.style.setProperty("--panel-self-size", `${l[k]}%`);
|
|
161
|
-
});
|
|
162
|
-
}, [l]);
|
|
163
|
-
const F = X(
|
|
164
|
-
(n, k) => {
|
|
165
|
-
a.current.set(n, k);
|
|
166
|
-
const m = R.current[n];
|
|
167
|
-
m !== void 0 && k.style.setProperty("--panel-self-size", `${m}%`);
|
|
168
|
-
},
|
|
169
|
-
[]
|
|
170
|
-
), j = X((n) => {
|
|
171
|
-
a.current.delete(n);
|
|
172
|
-
}, []), P = X((n) => {
|
|
173
|
-
o(n);
|
|
174
|
-
}, []), G = ke({ direction: e, className: C }), Q = {
|
|
175
|
-
direction: e,
|
|
176
|
-
sizes: l,
|
|
177
|
-
liveSizesRef: R,
|
|
178
|
-
panels: f,
|
|
179
|
-
groupRef: s,
|
|
180
|
-
updateSizesImperative: N,
|
|
181
|
-
commitSizes: $,
|
|
182
|
-
registerPanelElement: F,
|
|
183
|
-
unregisterPanelElement: j,
|
|
184
|
-
setAnnounceText: P
|
|
185
|
-
}, W = (n) => {
|
|
186
|
-
s.current = n, typeof d == "function" ? d(n) : d && (d.current = n);
|
|
187
|
-
};
|
|
188
|
-
return /* @__PURE__ */ L(ie.Provider, { value: Q, children: /* @__PURE__ */ ue(
|
|
189
|
-
"div",
|
|
190
|
-
{
|
|
191
|
-
ref: W,
|
|
192
|
-
className: G,
|
|
193
|
-
"data-component": "resizable",
|
|
194
|
-
"data-component-id": u,
|
|
195
|
-
"data-panel-group": !0,
|
|
196
|
-
"data-direction": e,
|
|
197
|
-
children: [
|
|
198
|
-
E,
|
|
199
|
-
/* @__PURE__ */ L("span", { className: "ds:sr-only", "aria-live": "polite", "aria-atomic": "true", children: A })
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
) });
|
|
203
|
-
}
|
|
204
|
-
);
|
|
205
|
-
Pe.displayName = "PanelGroup";
|
|
206
|
-
const le = ee(
|
|
207
|
-
({
|
|
208
|
-
_panelIndex: e = 0,
|
|
209
|
-
_panelId: c,
|
|
210
|
-
minSize: u = 10,
|
|
211
|
-
maxSize: v = 90,
|
|
212
|
-
children: C,
|
|
213
|
-
className: r
|
|
214
|
-
}, d) => {
|
|
215
|
-
const {
|
|
216
|
-
direction: g,
|
|
217
|
-
liveSizesRef: s,
|
|
218
|
-
panels: a,
|
|
219
|
-
updateSizesImperative: p,
|
|
220
|
-
commitSizes: A,
|
|
221
|
-
registerPanelElement: o,
|
|
222
|
-
unregisterPanelElement: f
|
|
223
|
-
} = ae(), E = H(null);
|
|
224
|
-
return se(() => {
|
|
225
|
-
const l = E.current;
|
|
226
|
-
if (l)
|
|
227
|
-
return o(e, l), () => f(e);
|
|
228
|
-
}, [e, o, f]), pe(
|
|
229
|
-
d,
|
|
230
|
-
() => ({
|
|
231
|
-
resize: (l) => {
|
|
232
|
-
const x = [...s.current], R = Math.max(u, Math.min(v, l)), N = R - (x[e] ?? 0);
|
|
233
|
-
if (Math.abs(N) < 1e-3) return;
|
|
234
|
-
const $ = [...x];
|
|
235
|
-
$[e] = R;
|
|
236
|
-
const F = x.map((P, G) => G).filter((P) => P !== e), j = F.reduce(
|
|
237
|
-
(P, G) => P + (x[G] ?? 0),
|
|
238
|
-
0
|
|
239
|
-
);
|
|
240
|
-
F.forEach((P) => {
|
|
241
|
-
$[P] = j > 0 ? (x[P] ?? 0) - N * ((x[P] ?? 0) / j) : (x[P] ?? 0) - N / F.length;
|
|
242
|
-
}), p($), A($);
|
|
243
|
-
}
|
|
244
|
-
}),
|
|
245
|
-
[e, u, v, a, s, p, A]
|
|
246
|
-
), /* @__PURE__ */ L(
|
|
247
|
-
"div",
|
|
248
|
-
{
|
|
249
|
-
ref: E,
|
|
250
|
-
id: c,
|
|
251
|
-
"data-panel": !0,
|
|
252
|
-
"data-panel-index": e,
|
|
253
|
-
className: Me({ direction: g, className: r }),
|
|
254
|
-
children: C
|
|
255
|
-
}
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
);
|
|
259
|
-
le.displayName = "Panel";
|
|
260
|
-
const ce = ee(
|
|
261
|
-
({ _handleIndex: e = 0, className: c }, u) => {
|
|
262
|
-
const { t: v, i18n: C } = Se(), {
|
|
263
|
-
direction: r,
|
|
264
|
-
sizes: d,
|
|
265
|
-
liveSizesRef: g,
|
|
266
|
-
panels: s,
|
|
267
|
-
groupRef: a,
|
|
268
|
-
updateSizesImperative: p,
|
|
269
|
-
commitSizes: A,
|
|
270
|
-
setAnnounceText: o
|
|
271
|
-
} = ae(), [f, E] = Z(!1), l = H(null), x = H(null), R = H(null), N = H(null), $ = X(
|
|
272
|
-
(t, i = !1) => {
|
|
273
|
-
R.current !== null && (cancelAnimationFrame(R.current), R.current = null), x.current && (clearTimeout(x.current), x.current = null);
|
|
274
|
-
const h = new Intl.NumberFormat(C.language, {
|
|
275
|
-
style: "percent"
|
|
276
|
-
}).format(t / 100), S = v("ui.resizable.sizeAnnounce", { percent: h });
|
|
277
|
-
i ? o(S) : R.current = requestAnimationFrame(() => {
|
|
278
|
-
R.current = null, x.current = setTimeout(() => o(S), 200);
|
|
279
|
-
});
|
|
280
|
-
},
|
|
281
|
-
[v, C.language, o]
|
|
282
|
-
), F = X(() => a.current ? getComputedStyle(a.current).direction === "rtl" : !1, [a]), j = (t) => {
|
|
283
|
-
a.current && (t.currentTarget.setPointerCapture(t.pointerId), t.currentTarget.style.setProperty("touch-action", "none"), l.current = {
|
|
284
|
-
startX: t.clientX,
|
|
285
|
-
startY: t.clientY,
|
|
286
|
-
startSizes: [...g.current],
|
|
287
|
-
groupRect: a.current.getBoundingClientRect()
|
|
288
|
-
}, E(!0));
|
|
289
|
-
}, P = (t) => {
|
|
290
|
-
if (!l.current) return;
|
|
291
|
-
const { startX: i, startY: h, startSizes: S, groupRect: T } = l.current, V = r === "horizontal", O = V ? T.width : T.height;
|
|
292
|
-
if (O === 0) return;
|
|
293
|
-
const J = V ? t.clientX - i : t.clientY - h, K = (V && F() ? -J : J) / O * 100, I = xe(
|
|
294
|
-
S,
|
|
295
|
-
e,
|
|
296
|
-
K,
|
|
297
|
-
s,
|
|
298
|
-
O
|
|
299
|
-
);
|
|
300
|
-
if (p(I), N.current) {
|
|
301
|
-
const M = Math.round(I[e]);
|
|
302
|
-
N.current.setAttribute("aria-valuenow", String(M)), N.current.setAttribute(
|
|
303
|
-
"aria-valuetext",
|
|
304
|
-
new Intl.NumberFormat(C.language, { style: "percent" }).format(
|
|
305
|
-
M / 100
|
|
306
|
-
)
|
|
307
|
-
);
|
|
308
|
-
}
|
|
309
|
-
$(I[e]);
|
|
310
|
-
}, G = (t) => {
|
|
311
|
-
if (!l.current) return;
|
|
312
|
-
t.currentTarget.releasePointerCapture(t.pointerId), t.currentTarget.style.removeProperty("touch-action"), l.current = null, E(!1);
|
|
313
|
-
const i = g.current;
|
|
314
|
-
A(i), $(i[e], !0);
|
|
315
|
-
}, Q = (t) => {
|
|
316
|
-
if (!l.current) return;
|
|
317
|
-
t.currentTarget.releasePointerCapture(t.pointerId), t.currentTarget.style.removeProperty("touch-action"), l.current = null, E(!1);
|
|
318
|
-
const i = g.current;
|
|
319
|
-
A(i);
|
|
320
|
-
}, W = (t) => {
|
|
321
|
-
const i = e, h = e + 1;
|
|
322
|
-
if (i >= s.length || h >= s.length) return;
|
|
323
|
-
const S = s[i], T = s[h], V = r === "horizontal", O = V && F(), J = t.shiftKey ? 10 : 1, y = [...g.current], K = (w = J) => {
|
|
324
|
-
const z = Math.min(
|
|
325
|
-
w,
|
|
326
|
-
S.maxSize - y[i],
|
|
327
|
-
y[h] - (T.collapsible ? T.collapsedSize : T.minSize)
|
|
328
|
-
);
|
|
329
|
-
if (z <= 0) return null;
|
|
330
|
-
const b = [...y];
|
|
331
|
-
return b[i] += z, b[h] -= z, b;
|
|
332
|
-
}, I = (w = J) => {
|
|
333
|
-
const z = S.collapsible ? S.collapsedSize : S.minSize, b = Math.min(w, y[i] - z);
|
|
334
|
-
if (b <= 0) return null;
|
|
335
|
-
const U = [...y];
|
|
336
|
-
return U[i] -= b, U[h] += b, U;
|
|
337
|
-
};
|
|
338
|
-
let M = null;
|
|
339
|
-
switch (t.key) {
|
|
340
|
-
case "ArrowRight":
|
|
341
|
-
if (!V) break;
|
|
342
|
-
t.preventDefault(), M = O ? I() : K();
|
|
343
|
-
break;
|
|
344
|
-
case "ArrowLeft":
|
|
345
|
-
if (!V) break;
|
|
346
|
-
t.preventDefault(), M = O ? K() : I();
|
|
347
|
-
break;
|
|
348
|
-
case "ArrowDown":
|
|
349
|
-
if (V) break;
|
|
350
|
-
t.preventDefault(), M = K();
|
|
351
|
-
break;
|
|
352
|
-
case "ArrowUp":
|
|
353
|
-
if (V) break;
|
|
354
|
-
t.preventDefault(), M = I();
|
|
355
|
-
break;
|
|
356
|
-
case "Home": {
|
|
357
|
-
t.preventDefault();
|
|
358
|
-
const w = S.collapsible ? S.collapsedSize : S.minSize, z = y[i] - w;
|
|
359
|
-
if (z > 0) {
|
|
360
|
-
const b = [...y];
|
|
361
|
-
b[i] = w, b[h] += z, M = b;
|
|
362
|
-
}
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
case "End": {
|
|
366
|
-
t.preventDefault();
|
|
367
|
-
const w = T.collapsible ? T.collapsedSize : T.minSize, z = Math.min(
|
|
368
|
-
S.maxSize - y[i],
|
|
369
|
-
y[h] - w
|
|
370
|
-
);
|
|
371
|
-
if (z > 0) {
|
|
372
|
-
const b = [...y];
|
|
373
|
-
b[i] += z, b[h] -= z, M = b;
|
|
374
|
-
}
|
|
375
|
-
break;
|
|
376
|
-
}
|
|
377
|
-
case "Enter": {
|
|
378
|
-
t.preventDefault();
|
|
379
|
-
const w = S.collapsible ? S : T.collapsible ? T : null, z = S.collapsible ? i : T.collapsible ? h : -1;
|
|
380
|
-
if (!w || z < 0) break;
|
|
381
|
-
const b = z === i ? h : i, U = Math.abs(y[z] - w.collapsedSize) < 0.5, ne = y[i] + y[h], q = [...y];
|
|
382
|
-
U ? (q[z] = w.minSize, q[b] = ne - w.minSize) : (q[z] = w.collapsedSize, q[b] = ne - w.collapsedSize), M = q;
|
|
383
|
-
break;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
M && (p(M), A(M), $(M[i], !0));
|
|
387
|
-
}, n = e, k = e + 1, m = s[n], B = s[k], D = r === "horizontal" ? "horizontal" : "vertical", _ = (t) => new Intl.NumberFormat(C.language, { style: "percent" }).format(t / 100);
|
|
388
|
-
return /* @__PURE__ */ L(
|
|
389
|
-
"div",
|
|
390
|
-
{
|
|
391
|
-
ref: (t) => {
|
|
392
|
-
N.current = t, typeof u == "function" ? u(t) : u && (u.current = t);
|
|
393
|
-
},
|
|
394
|
-
role: "separator",
|
|
395
|
-
tabIndex: 0,
|
|
396
|
-
"aria-orientation": D,
|
|
397
|
-
"aria-valuemin": m ? m.collapsible ? m.collapsedSize : m.minSize : 0,
|
|
398
|
-
"aria-valuemax": (m == null ? void 0 : m.maxSize) ?? 100,
|
|
399
|
-
"aria-valuenow": Math.round(d[n] ?? 0),
|
|
400
|
-
"aria-valuetext": _(d[n] ?? 0),
|
|
401
|
-
"aria-controls": [m == null ? void 0 : m.id, B == null ? void 0 : B.id].filter(Boolean).join(" ") || void 0,
|
|
402
|
-
"aria-label": v("ui.resizable.resizeLabel"),
|
|
403
|
-
"data-dragging": f ? "" : void 0,
|
|
404
|
-
className: Re({ orientation: D, className: c }),
|
|
405
|
-
onPointerDown: j,
|
|
406
|
-
onPointerMove: P,
|
|
407
|
-
onPointerUp: G,
|
|
408
|
-
onPointerCancel: Q,
|
|
409
|
-
onKeyDown: W
|
|
410
|
-
}
|
|
411
|
-
);
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
ce.displayName = "Handle";
|
|
415
|
-
const De = {
|
|
416
|
-
id: "resizable",
|
|
417
|
-
capabilities: ["range_navigate"],
|
|
418
|
-
state: {
|
|
419
|
-
sizes: {
|
|
420
|
-
type: "number[]",
|
|
421
|
-
description: "Current per-panel sizes as percentages of the group.",
|
|
422
|
-
read: (e) => e.getSizes()
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
actions: {
|
|
426
|
-
set_sizes: {
|
|
427
|
-
safety: "read",
|
|
428
|
-
argsType: "{ sizes: number[] }",
|
|
429
|
-
description: "Replace the panel sizes (percentages, summing to 100).",
|
|
430
|
-
invoke: (e, c) => {
|
|
431
|
-
e.setSizes(c.sizes);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
domHooks: {
|
|
436
|
-
root: { attr: "data-component", value: "resizable" },
|
|
437
|
-
instanceId: {
|
|
438
|
-
attr: "data-component-id",
|
|
439
|
-
sourceProp: "id",
|
|
440
|
-
description: "Sourced from the id prop on PanelGroup."
|
|
441
|
-
},
|
|
442
|
-
item: {
|
|
443
|
-
attr: "data-panel-id",
|
|
444
|
-
description: "Each Panel forwards its `id` to react-resizable-panels which emits it as `data-panel-id`."
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
export {
|
|
449
|
-
ce as H,
|
|
450
|
-
le as P,
|
|
451
|
-
ie as R,
|
|
452
|
-
Pe as a,
|
|
453
|
-
De as r,
|
|
454
|
-
ae as u
|
|
455
|
-
};
|
|
456
|
-
//# sourceMappingURL=resizable.agent-CMwZzvsi.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
const t = {
|
|
2
|
-
id: "sheet",
|
|
3
|
-
capabilities: ["open", "close", "dismiss"],
|
|
4
|
-
state: {
|
|
5
|
-
isOpen: {
|
|
6
|
-
type: "boolean",
|
|
7
|
-
description: "True when the sheet is currently open.",
|
|
8
|
-
read: (e) => e.getIsOpen()
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
actions: {
|
|
12
|
-
open: {
|
|
13
|
-
safety: "read",
|
|
14
|
-
description: "Open the sheet.",
|
|
15
|
-
invoke: (e) => {
|
|
16
|
-
e.open();
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
close: {
|
|
20
|
-
safety: "write",
|
|
21
|
-
description: "Close the sheet. Reversible by reopening.",
|
|
22
|
-
invoke: (e) => {
|
|
23
|
-
e.close();
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
dismiss: {
|
|
27
|
-
safety: "destructive",
|
|
28
|
-
description: "Dismiss the sheet. Loses any in-progress input that has not been committed.",
|
|
29
|
-
invoke: (e) => {
|
|
30
|
-
e.close();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
domHooks: {
|
|
35
|
-
root: { attr: "data-component", value: "sheet" },
|
|
36
|
-
instanceId: {
|
|
37
|
-
attr: "data-component-id",
|
|
38
|
-
sourceProp: "id",
|
|
39
|
-
description: "Sourced from the id prop on Sheet.Root."
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
export {
|
|
44
|
-
t as s
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=sheet.agent-QAyTOxgk.js.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const i = {
|
|
2
|
-
id: "sidebar",
|
|
3
|
-
capabilities: ["expand", "select_single", "navigate"],
|
|
4
|
-
state: {
|
|
5
|
-
isCollapsed: {
|
|
6
|
-
type: "boolean",
|
|
7
|
-
description: "True when the sidebar is in its collapsed (rail) state.",
|
|
8
|
-
read: (e) => e.getIsCollapsed()
|
|
9
|
-
},
|
|
10
|
-
activeItem: {
|
|
11
|
-
type: "string | null",
|
|
12
|
-
description: "Id of the currently-active navigation item, or null.",
|
|
13
|
-
read: (e) => e.getActiveItem()
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
actions: {
|
|
17
|
-
toggle_collapsed: {
|
|
18
|
-
safety: "read",
|
|
19
|
-
description: "Toggle the sidebar between collapsed and expanded.",
|
|
20
|
-
invoke: (e) => {
|
|
21
|
-
e.toggleCollapsed();
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
select_item: {
|
|
25
|
-
safety: "read",
|
|
26
|
-
argsType: "{ id: string }",
|
|
27
|
-
description: "Mark the navigation item with the given id as active.",
|
|
28
|
-
invoke: (e, t) => {
|
|
29
|
-
e.selectItem(t.id);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
domHooks: {
|
|
34
|
-
root: { attr: "data-component", value: "sidebar" },
|
|
35
|
-
instanceId: {
|
|
36
|
-
attr: "data-component-id",
|
|
37
|
-
sourceProp: "id",
|
|
38
|
-
description: "Sourced from the id prop."
|
|
39
|
-
},
|
|
40
|
-
item: {
|
|
41
|
-
attr: "data-nav-id",
|
|
42
|
-
description: "Each Sidebar.Item emits its key as data-nav-id."
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
i as s
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=sidebar.agent-C9TM_ZDZ.js.map
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as A, useRef as B, useState as I, useEffect as L, useLayoutEffect as O, useMemo as $, useImperativeHandle as q } from "react";
|
|
3
|
-
import { c as n } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as D } from "react-i18next";
|
|
5
|
-
const F = n("ds:flex ds:w-full", {
|
|
6
|
-
variants: {
|
|
7
|
-
captionPosition: {
|
|
8
|
-
top: "ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
9
|
-
bottom: "ds:flex-col-reverse ds:gap-[var(--spacing-xs)]"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
defaultVariants: { captionPosition: "top" }
|
|
13
|
-
}), G = n(
|
|
14
|
-
"ds:relative ds:w-full ds:overflow-hidden ds:rounded-[var(--radius-full)] ds:bg-[var(--muted)]",
|
|
15
|
-
{
|
|
16
|
-
variants: {
|
|
17
|
-
size: {
|
|
18
|
-
sm: "ds:h-[var(--spacing-xs)]",
|
|
19
|
-
default: "ds:h-[var(--spacing-sm)]"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: { size: "default" }
|
|
23
|
-
}
|
|
24
|
-
), J = n(
|
|
25
|
-
[
|
|
26
|
-
"ds:block ds:h-full ds:rounded-[var(--radius-full)]",
|
|
27
|
-
"ds:[inline-size:calc(var(--stepper-progress-value,0)*1%)]",
|
|
28
|
-
"ds:transition-[inline-size,background-color] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
|
|
29
|
-
"ds:motion-reduce:transition-none"
|
|
30
|
-
].join(" "),
|
|
31
|
-
{
|
|
32
|
-
variants: {
|
|
33
|
-
tone: {
|
|
34
|
-
progress: "ds:bg-[var(--primary)]",
|
|
35
|
-
error: "ds:bg-[var(--destructive)]",
|
|
36
|
-
complete: "ds:bg-[var(--success,var(--primary))]"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: { tone: "progress" }
|
|
40
|
-
}
|
|
41
|
-
), K = n(
|
|
42
|
-
"ds:flex ds:items-baseline ds:gap-[var(--spacing-sm)] ds:flex-wrap",
|
|
43
|
-
{
|
|
44
|
-
variants: {
|
|
45
|
-
tone: {
|
|
46
|
-
progress: "ds:text-[var(--foreground)]",
|
|
47
|
-
error: "ds:text-[var(--destructive)]",
|
|
48
|
-
complete: "ds:text-[var(--foreground)]"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: { tone: "progress" }
|
|
52
|
-
}
|
|
53
|
-
), Q = A(
|
|
54
|
-
({
|
|
55
|
-
activeStep: y,
|
|
56
|
-
steps: d,
|
|
57
|
-
"aria-label": M,
|
|
58
|
-
hideCaption: N = !1,
|
|
59
|
-
size: V = "default",
|
|
60
|
-
captionPosition: w = "top",
|
|
61
|
-
id: c,
|
|
62
|
-
onStepChange: t,
|
|
63
|
-
className: P,
|
|
64
|
-
...T
|
|
65
|
-
}, j) => {
|
|
66
|
-
const { t: u } = D(), p = B(null), e = d.length, r = Math.max(0, Math.min(y, e - 1)), s = d[r], f = (s == null ? void 0 : s.status) === "error" ? "error" : "current", m = r + 1, z = e === 0 ? 0 : m / e * 100, v = f === "error" ? "error" : r === e - 1 && e > 0 ? "complete" : "progress", [k, R] = I(!1);
|
|
67
|
-
L(() => {
|
|
68
|
-
R(!0);
|
|
69
|
-
}, []);
|
|
70
|
-
const g = k ? z : 0;
|
|
71
|
-
O(() => {
|
|
72
|
-
var a;
|
|
73
|
-
(a = p.current) == null || a.style.setProperty(
|
|
74
|
-
"--stepper-progress-value",
|
|
75
|
-
String(g)
|
|
76
|
-
);
|
|
77
|
-
}, [g]);
|
|
78
|
-
const x = u("navigation.stepper.stepOfTotal", {
|
|
79
|
-
n: r + 1,
|
|
80
|
-
total: e
|
|
81
|
-
}), E = M ?? u("navigation.stepper.label"), i = f === "error" && (s != null && s.description) ? s.description : null, H = [
|
|
82
|
-
x,
|
|
83
|
-
s ? `— ${s.label}` : null,
|
|
84
|
-
i
|
|
85
|
-
].filter(Boolean).join(" "), b = $(
|
|
86
|
-
() => ({
|
|
87
|
-
getCurrentStep: () => r,
|
|
88
|
-
getTotalSteps: () => e,
|
|
89
|
-
gotoStep: (a) => {
|
|
90
|
-
if (!t) return;
|
|
91
|
-
const h = Math.max(0, Math.min(a, Math.max(e - 1, 0)));
|
|
92
|
-
h !== r && t(h);
|
|
93
|
-
},
|
|
94
|
-
next: () => {
|
|
95
|
-
t && r < e - 1 && t(r + 1);
|
|
96
|
-
},
|
|
97
|
-
previous: () => {
|
|
98
|
-
t && r > 0 && t(r - 1);
|
|
99
|
-
}
|
|
100
|
-
}),
|
|
101
|
-
[r, e, t]
|
|
102
|
-
);
|
|
103
|
-
return q(j, () => b, [b]), /* @__PURE__ */ l(
|
|
104
|
-
"div",
|
|
105
|
-
{
|
|
106
|
-
id: c,
|
|
107
|
-
"data-component": "stepper-progress",
|
|
108
|
-
"data-component-id": c,
|
|
109
|
-
className: F({ captionPosition: w, className: P }),
|
|
110
|
-
...T,
|
|
111
|
-
children: [
|
|
112
|
-
N ? null : /* @__PURE__ */ l("div", { className: K({ tone: v }), "aria-hidden": "true", children: [
|
|
113
|
-
/* @__PURE__ */ o("span", { className: "type-meta ds:font-[var(--font-weight-semibold)]", children: x }),
|
|
114
|
-
s ? /* @__PURE__ */ l("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: [
|
|
115
|
-
"— ",
|
|
116
|
-
s.label
|
|
117
|
-
] }) : null,
|
|
118
|
-
i ? /* @__PURE__ */ o("span", { className: "type-meta ds:ms-auto ds:text-[var(--destructive)]", children: i }) : null
|
|
119
|
-
] }),
|
|
120
|
-
/* @__PURE__ */ o(
|
|
121
|
-
"div",
|
|
122
|
-
{
|
|
123
|
-
role: "progressbar",
|
|
124
|
-
"aria-label": E,
|
|
125
|
-
"aria-valuemin": 0,
|
|
126
|
-
"aria-valuemax": e,
|
|
127
|
-
"aria-valuenow": m,
|
|
128
|
-
"aria-valuetext": H,
|
|
129
|
-
className: G({ size: V }),
|
|
130
|
-
children: /* @__PURE__ */ o(
|
|
131
|
-
"span",
|
|
132
|
-
{
|
|
133
|
-
ref: p,
|
|
134
|
-
"aria-hidden": "true",
|
|
135
|
-
className: J({ tone: v })
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
]
|
|
141
|
-
}
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
Q.displayName = "StepperProgress";
|
|
146
|
-
export {
|
|
147
|
-
Q as S
|
|
148
|
-
};
|
|
149
|
-
//# sourceMappingURL=stepper-progress-Bmen-YXB.js.map
|