@alfadocs/ui-kit 1.138.0 → 1.139.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/dist/_chunks/{address-fields-DvSWdeR0.js → address-fields-Bh9JZJHZ.js} +4 -4
- package/dist/_chunks/{ai-prompt-input-CVNeusoW.js → ai-prompt-input-B2QFwuJ1.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-Dr2V1Rtf.js → anamnesis-summary-rows-BgfBnjp0.js} +4 -4
- package/dist/_chunks/{audio-recorder-BOF5YYoC.js → audio-recorder-6dUq8I38.js} +2 -2
- package/dist/_chunks/autocomplete-HZNW7_Pa.js +642 -0
- package/dist/_chunks/{balance-badge-cell-BSB02Bwo.js → balance-badge-cell-CRrIv2hy.js} +4 -4
- package/dist/_chunks/{bill-line-table-By-YL2ms.js → bill-line-table-DCqxhode.js} +3 -3
- package/dist/_chunks/{bishop-score-DWGESRP9.js → bishop-score-M7Fi-ykx.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-SxSkOTnO.js → calendar-appointment-editor-dialog-GdnaPIOV.js} +7 -7
- package/dist/_chunks/{calendar-editor-discard-host-DjUhoFr2.js → calendar-editor-discard-host-BcMEgVEq.js} +2 -2
- package/dist/_chunks/{calendar-waiting-list-panel-331vzAdl.js → calendar-waiting-list-panel-CkZBAv_E.js} +3 -3
- package/dist/_chunks/{calendar.sheets-aodjllWd.js → calendar.sheets-B0jP2Yt0.js} +112 -111
- package/dist/_chunks/{calls-panel-BIfatK90.js → calls-panel-CtxJAzkJ.js} +2 -2
- package/dist/_chunks/{city-input-DXipzTfZ.js → city-input-DARVDJhH.js} +2 -2
- package/dist/_chunks/{combobox-BBCVQS-S.js → combobox-BYl6mY4c.js} +12 -13
- package/dist/_chunks/{communications-panel-SQ-55e3V.js → communications-panel-DBWM9II9.js} +2 -2
- package/dist/_chunks/{country-select-C2GdvRtS.js → country-select-BPISkYVU.js} +3 -3
- package/dist/_chunks/{data-grid-CxKz8flO.js → data-grid-bQ6iFm10.js} +15 -7
- package/dist/_chunks/{data-table-_tgj0C_T.js → data-table-CnLfOwxg.js} +2 -2
- package/dist/_chunks/{default-tabs-oDWQzbN7.js → default-tabs-Dm_vk6hd.js} +3 -3
- package/dist/_chunks/{document-preview-CirR3C_m.js → document-preview-FTCHXYhk.js} +2 -2
- package/dist/_chunks/{face-scheme-D_Y1StPl.js → face-scheme-Bxt7ZnJn.js} +2 -2
- package/dist/_chunks/{file-manager-CEi4z2i0.js → file-manager-Bsccb8Jj.js} +2 -2
- package/dist/_chunks/{forgot-password-form-YvI9vX-G.js → forgot-password-form-B4ufmBFn.js} +5 -4
- package/dist/_chunks/{gestational-age-calculator-CHbpC4vL.js → gestational-age-calculator-DXSPWG8u.js} +2 -2
- package/dist/_chunks/{heatmap-_546qI2V.js → heatmap-CFPaEKD_.js} +2 -2
- package/dist/_chunks/{invoice-upload-list-CQI9MUl6.js → invoice-upload-list-Dz3CXHPP.js} +3 -3
- package/dist/_chunks/{kit-extensions-BNBf4m8O.js → kit-extensions-BB_ksnVl.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-Xx5T8u5Q.js → link-cell-renderer-CSA0KKPe.js} +5 -5
- package/dist/_chunks/{login-dev-card-Dz3ezx1o.js → login-dev-card-oRh9h7N2.js} +18 -17
- package/dist/_chunks/medication-I6QvOq6k.js +21 -0
- package/dist/_chunks/medication-line-CHdlh-F7.js +222 -0
- package/dist/_chunks/medication-search-DoEDakoM.js +380 -0
- package/dist/_chunks/{multi-select-Df3R8lv_.js → multi-select-DeMiHm8T.js} +4 -5
- package/dist/_chunks/{muscle-scheme-D_rSyGDj.js → muscle-scheme-BB2eBfww.js} +2 -2
- package/dist/_chunks/normalize-diacritics-DhJjQ3Bp.js +7 -0
- package/dist/_chunks/{notes-panel-DsEKNtsw.js → notes-panel-CnmQqhwq.js} +2 -2
- package/dist/_chunks/{optical-prescription-DaSbsh4p.js → optical-prescription-C4jpDFOE.js} +2 -2
- package/dist/_chunks/{option-row-Dc7BrbK8.js → option-row-DpCnuUqo.js} +25 -12
- package/dist/_chunks/{patient-account-settings-Cs9y-pVA.js → patient-account-settings-DfEPHmCh.js} +2 -2
- package/dist/_chunks/{patient-check-in-resume-4qi_klQV.js → patient-check-in-resume-TWs8CPQr.js} +3 -3
- package/dist/_chunks/{patient-details-Dv7EiTCo.js → patient-details-DQTxSWY4.js} +2 -2
- package/dist/_chunks/{patient-field-row-DuHWGlLz.js → patient-field-row-CXuWQeQJ.js} +6 -6
- package/dist/_chunks/patient-picker-CQNsqYn2.js +163 -0
- package/dist/_chunks/{patient-search-DBvLFArV.js → patient-search-aTFd7p9s.js} +2 -2
- package/dist/_chunks/{patient-summary-card-D-cDzOim.js → patient-summary-card-j5u7c5Us.js} +2 -2
- package/dist/_chunks/{phone-input-BL8Sj6OG.js → phone-input-DRKcJUi4.js} +2 -2
- package/dist/_chunks/{portal-details-BGc_FLQk.js → portal-details-VfeOI4PB.js} +2 -2
- package/dist/_chunks/{portal-documents-BSI1U5lI.js → portal-documents-hGHlwmbv.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-lJbzai73.js → pregnancy-dating-C-3NLI6K.js} +2 -2
- package/dist/_chunks/prescription-history-748qDVwZ.js +1544 -0
- package/dist/_chunks/print-sheet-CSeqkM3_.js +318 -0
- package/dist/_chunks/{province-select-CTM8A9SM.js → province-select-D-iY9bQG.js} +3 -3
- package/dist/_chunks/{registration-form-CuLiTA52.js → registration-form-Cs9o6e5q.js} +7 -6
- package/dist/_chunks/{reserved.agent-CabZHFJC.js → reserved.agent-L2ElYPuj.js} +7 -7
- package/dist/_chunks/{reset-password-form-D_TePSM1.js → reset-password-form-DwtSNhnA.js} +18 -17
- package/dist/_chunks/{rich-text-editor-C48omVjq.js → rich-text-editor-DFsH5RAj.js} +2 -2
- package/dist/_chunks/save-Dn8uje3f.js +22 -0
- package/dist/_chunks/{search-bar-CQ9_V3EJ.js → search-bar-k1mS5yZl.js} +2 -2
- package/dist/_chunks/{select-CIXKyUMw.js → select-Bm8s3q-X.js} +16 -17
- package/dist/_chunks/{send-registration-link-form-BjkXr0TD.js → send-registration-link-form-C1vw6H1M.js} +6 -5
- package/dist/_chunks/{signature-request-vJDSHZld.js → signature-request-D3sLLOM6.js} +2 -2
- package/dist/_chunks/sync-tray-BhnkgXKK.js +567 -0
- package/dist/_chunks/{tabs-Czkmw5ou.js → tabs-BXr5XeGq.js} +2 -2
- package/dist/_chunks/{task-editor-wKbFbGqW.js → task-editor-DDVDPKJf.js} +26 -25
- package/dist/_chunks/{tasks-panel-DbtJS4QI.js → tasks-panel-BHXaPNOZ.js} +2 -2
- package/dist/_chunks/{toolbar-DjG-cpD_.js → toolbar-Dz_hAUIZ.js} +2 -2
- package/dist/_chunks/{unit-converter-CUAUTu2B.js → unit-converter-CBy7S4Tl.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-jGkJalX8.js → use-appointment-details-read-CBSpX4DI.js} +2 -2
- package/dist/_chunks/use-error-summary-CecJZo6w.js +32 -0
- package/dist/_chunks/use-registration-submit-CVukOAQk.js +84 -0
- package/dist/_chunks/{variables-menu-DQl8H4Gh.js → variables-menu-C4NcClKi.js} +2 -2
- package/dist/_chunks/{voice-control-panel-Cp4vs1iy.js → voice-control-panel-Dc_NFH2R.js} +2 -2
- package/dist/agent-catalog.json +455 -1
- package/dist/agent-i18n/en.json +53 -0
- package/dist/appointment-editor-panel/index.js +2 -2
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/medication.d.ts +28 -0
- package/dist/components/_shared/normalize-diacritics.d.ts +5 -0
- package/dist/components/_shared/patient-picker.d.ts +7 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +50 -0
- package/dist/components/autocomplete/index.d.ts +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calls-panel/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/communications-panel/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/medication-line/index.d.ts +6 -0
- package/dist/components/medication-line/index.js +7 -0
- package/dist/components/medication-line/medication-line.agent.d.ts +14 -0
- package/dist/components/medication-line/medication-line.d.ts +40 -0
- package/dist/components/medication-search/index.d.ts +6 -0
- package/dist/components/medication-search/index.js +10 -0
- package/dist/components/medication-search/medication-search.agent.d.ts +15 -0
- package/dist/components/medication-search/medication-search.d.ts +49 -0
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/print-sheet/index.d.ts +5 -0
- package/dist/components/print-sheet/index.js +6 -0
- package/dist/components/print-sheet/print-isolation.d.ts +17 -0
- package/dist/components/print-sheet/print-sheet.agent.d.ts +19 -0
- package/dist/components/print-sheet/print-sheet.d.ts +54 -0
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/sync-tray/index.d.ts +4 -0
- package/dist/components/sync-tray/index.js +7 -0
- package/dist/components/sync-tray/sync-tray.agent.d.ts +15 -0
- package/dist/components/sync-tray/sync-tray.d.ts +77 -0
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/variables-menu/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-compat.css +13 -1
- package/dist/i18n/locales/ar.d.ts +134 -0
- package/dist/i18n/locales/ar.js +134 -0
- package/dist/i18n/locales/de.d.ts +134 -0
- package/dist/i18n/locales/de.js +134 -0
- package/dist/i18n/locales/el.d.ts +134 -0
- package/dist/i18n/locales/el.js +134 -0
- package/dist/i18n/locales/en.d.ts +134 -0
- package/dist/i18n/locales/en.js +134 -0
- package/dist/i18n/locales/es.d.ts +134 -0
- package/dist/i18n/locales/es.js +134 -0
- package/dist/i18n/locales/fr.d.ts +134 -0
- package/dist/i18n/locales/fr.js +134 -0
- package/dist/i18n/locales/hi.d.ts +134 -0
- package/dist/i18n/locales/hi.js +134 -0
- package/dist/i18n/locales/it.d.ts +134 -0
- package/dist/i18n/locales/it.js +134 -0
- package/dist/i18n/locales/ja.d.ts +134 -0
- package/dist/i18n/locales/ja.js +134 -0
- package/dist/i18n/locales/nl.d.ts +134 -0
- package/dist/i18n/locales/nl.js +134 -0
- package/dist/i18n/locales/pl.d.ts +134 -0
- package/dist/i18n/locales/pl.js +134 -0
- package/dist/i18n/locales/pt.d.ts +134 -0
- package/dist/i18n/locales/pt.js +134 -0
- package/dist/i18n/locales/ro.d.ts +134 -0
- package/dist/i18n/locales/ro.js +134 -0
- package/dist/i18n/locales/ru.d.ts +134 -0
- package/dist/i18n/locales/ru.js +134 -0
- package/dist/i18n/locales/sq.d.ts +134 -0
- package/dist/i18n/locales/sq.js +134 -0
- package/dist/i18n/locales/sv.d.ts +134 -0
- package/dist/i18n/locales/sv.js +134 -0
- package/dist/i18n/locales/tr.d.ts +134 -0
- package/dist/i18n/locales/tr.js +134 -0
- package/dist/i18n/locales/zh.d.ts +134 -0
- package/dist/i18n/locales/zh.js +134 -0
- package/dist/index.js +1002 -974
- package/dist/locales/ar.json +134 -0
- package/dist/locales/de.json +134 -0
- package/dist/locales/el.json +134 -0
- package/dist/locales/en.json +134 -0
- package/dist/locales/es.json +134 -0
- package/dist/locales/fr.json +134 -0
- package/dist/locales/hi.json +134 -0
- package/dist/locales/it.json +134 -0
- package/dist/locales/ja.json +134 -0
- package/dist/locales/nl.json +134 -0
- package/dist/locales/pl.json +134 -0
- package/dist/locales/pt.json +134 -0
- package/dist/locales/ro.json +134 -0
- package/dist/locales/ru.json +134 -0
- package/dist/locales/sq.json +134 -0
- package/dist/locales/sv.json +134 -0
- package/dist/locales/tr.json +134 -0
- package/dist/locales/zh.json +134 -0
- package/dist/online-bookings-panel/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +3 -3
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/patterns/prescription/index.d.ts +11 -0
- package/dist/patterns/prescription/index.js +13 -0
- package/dist/patterns/prescription/prescription-composer-errors.d.ts +6 -0
- package/dist/patterns/prescription/prescription-composer-item.d.ts +34 -0
- package/dist/patterns/prescription/prescription-composer.d.ts +89 -0
- package/dist/patterns/prescription/prescription-history.d.ts +48 -0
- package/dist/patterns/prescription/prescription-patient-block.d.ts +13 -0
- package/dist/patterns/prescription/prescription-sheet.d.ts +52 -0
- package/dist/patterns/prescription/prescription-status-badge.d.ts +5 -0
- package/dist/patterns/prescription/prescription-types.d.ts +97 -0
- package/dist/patterns/prescription/prescription-validation.d.ts +40 -0
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/reset-password-form/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/dist/waiting-list-panel/index.js +2 -2
- package/package.json +21 -1
- package/dist/_chunks/autocomplete-D10ydpgi.js +0 -562
- package/dist/_chunks/group-options-BvKhQ3xb.js +0 -16
- package/dist/_chunks/normalize-diacritics-BNGbFNlJ.js +0 -7
- package/dist/_chunks/patient-picker-BZJuOgMw.js +0 -173
- package/dist/_chunks/use-registration-submit-CLGHxwoT.js +0 -112
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
import { jsx as n, jsxs as g, Fragment as ht } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as vt, useId as bt, useState as T, useRef as d, useCallback as _, useEffect as I, useMemo as ae, useImperativeHandle as yt } from "react";
|
|
3
|
+
import { _ as w } from "./index-4xgbg-sn.js";
|
|
4
|
+
import * as j from "@radix-ui/react-popover";
|
|
5
|
+
import { c as q } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as wt } from "react-i18next";
|
|
7
|
+
import { S as Ae } from "./spinner-CoflYlEx.js";
|
|
8
|
+
import { u as Ct, b as Nt } from "./form-field-context-DtiROUJV.js";
|
|
9
|
+
import { u as xt } from "./use-controllable-state-BiY4xTzM.js";
|
|
10
|
+
import { u as re } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
11
|
+
import { g as kt, O as At, a as _t, b as It, o as Rt } from "./option-row-DpCnuUqo.js";
|
|
12
|
+
import { b as Vt } from "./menu-row-BAr8bx1I.js";
|
|
13
|
+
import { I as Et, a as oe, b as ie, c as Tt } from "./input-surface-BMffm2Vd.js";
|
|
14
|
+
import { u as Ft } from "./registry-DvAUVLHh.js";
|
|
15
|
+
import { u as $t } from "./use-debounced-callback-BisrB-Fq.js";
|
|
16
|
+
const Dt = {
|
|
17
|
+
id: "autocomplete",
|
|
18
|
+
capabilities: ["select_single", "filter", "open", "close"],
|
|
19
|
+
state: {
|
|
20
|
+
value: {
|
|
21
|
+
type: "string | null",
|
|
22
|
+
descriptionKey: "ui.agent.autocomplete.state.value",
|
|
23
|
+
description: "Currently-selected option value, or null when nothing is committed.",
|
|
24
|
+
read: (r) => r.getValue()
|
|
25
|
+
},
|
|
26
|
+
query: {
|
|
27
|
+
type: "string",
|
|
28
|
+
descriptionKey: "ui.agent.autocomplete.state.query",
|
|
29
|
+
description: "Current free-text query in the input.",
|
|
30
|
+
read: (r) => r.getQuery()
|
|
31
|
+
},
|
|
32
|
+
isOpen: {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
descriptionKey: "ui.agent.autocomplete.state.isOpen",
|
|
35
|
+
description: "True when the suggestion popup is visible. Open with no suggestions to show reads false.",
|
|
36
|
+
read: (r) => r.getIsOpen()
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
actions: {
|
|
40
|
+
set_value: {
|
|
41
|
+
safety: "write",
|
|
42
|
+
argsType: "{ value: string | null }",
|
|
43
|
+
argsSchema: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: { value: { type: ["string", "null"] } },
|
|
46
|
+
required: ["value"]
|
|
47
|
+
},
|
|
48
|
+
idempotent: !0,
|
|
49
|
+
descriptionKey: "ui.agent.autocomplete.actions.setValue",
|
|
50
|
+
description: "Set the committed value programmatically.",
|
|
51
|
+
invoke: (r, u) => {
|
|
52
|
+
r.setValue(u.value);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
apply_filter: {
|
|
56
|
+
safety: "read",
|
|
57
|
+
argsType: "{ query: string }",
|
|
58
|
+
argsSchema: {
|
|
59
|
+
type: "object",
|
|
60
|
+
properties: { query: { type: "string" } },
|
|
61
|
+
required: ["query"]
|
|
62
|
+
},
|
|
63
|
+
idempotent: !0,
|
|
64
|
+
descriptionKey: "ui.agent.autocomplete.actions.applyFilter",
|
|
65
|
+
description: "Set the input query, which filters the suggestion list.",
|
|
66
|
+
invoke: (r, u) => {
|
|
67
|
+
r.setQuery(u.query);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
clear: {
|
|
71
|
+
safety: "destructive",
|
|
72
|
+
idempotent: !0,
|
|
73
|
+
descriptionKey: "ui.agent.autocomplete.actions.clear",
|
|
74
|
+
description: "Clear the committed value and the query. Discards the typed input.",
|
|
75
|
+
invoke: (r) => {
|
|
76
|
+
r.clear();
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
open: {
|
|
80
|
+
safety: "read",
|
|
81
|
+
idempotent: !0,
|
|
82
|
+
descriptionKey: "ui.agent.autocomplete.actions.open",
|
|
83
|
+
description: "Open the suggestion list.",
|
|
84
|
+
invoke: (r) => {
|
|
85
|
+
r.open();
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
close: {
|
|
89
|
+
safety: "read",
|
|
90
|
+
idempotent: !0,
|
|
91
|
+
descriptionKey: "ui.agent.autocomplete.actions.close",
|
|
92
|
+
description: "Close the suggestion list.",
|
|
93
|
+
invoke: (r) => {
|
|
94
|
+
r.close();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
domHooks: {
|
|
99
|
+
root: { attr: "data-component", value: "autocomplete" },
|
|
100
|
+
instanceId: {
|
|
101
|
+
attr: "data-component-id",
|
|
102
|
+
sourceProp: "id",
|
|
103
|
+
description: "Sourced from the id prop."
|
|
104
|
+
},
|
|
105
|
+
item: {
|
|
106
|
+
attr: "data-option-id",
|
|
107
|
+
description: "Each suggestion emits its value as data-option-id."
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, St = q(
|
|
111
|
+
["ds:flex ds:w-full ds:items-center", Tt].join(" "),
|
|
112
|
+
{
|
|
113
|
+
variants: {
|
|
114
|
+
size: {
|
|
115
|
+
sm: `${oe.sm} ${ie.sm}`,
|
|
116
|
+
md: `${oe.md} ${ie.md}`,
|
|
117
|
+
lg: `${oe.lg} ${ie.lg}`
|
|
118
|
+
},
|
|
119
|
+
tone: Et
|
|
120
|
+
},
|
|
121
|
+
defaultVariants: { size: "md", tone: "default" }
|
|
122
|
+
}
|
|
123
|
+
), Bt = q(
|
|
124
|
+
[
|
|
125
|
+
"ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground",
|
|
126
|
+
"ds:placeholder:text-muted-foreground",
|
|
127
|
+
"ds:outline-none ds:focus:outline-none ds:focus-visible:outline-none",
|
|
128
|
+
"ds:disabled:cursor-not-allowed",
|
|
129
|
+
"ds:read-only:cursor-default"
|
|
130
|
+
].join(" "),
|
|
131
|
+
{
|
|
132
|
+
variants: {
|
|
133
|
+
hasStart: { true: "ds:ps-2", false: "ds:ps-3" },
|
|
134
|
+
hasEnd: { true: "ds:pe-2", false: "ds:pe-3" }
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: { hasStart: !1, hasEnd: !1 }
|
|
137
|
+
}
|
|
138
|
+
), Ot = q(
|
|
139
|
+
[
|
|
140
|
+
"ds:z-[var(--z-dropdown)] ds:overflow-hidden",
|
|
141
|
+
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-background",
|
|
142
|
+
"ds:shadow-[var(--shadow-md)]",
|
|
143
|
+
"ds:w-[var(--radix-popover-trigger-width)]",
|
|
144
|
+
"ds:animate-in ds:fade-in ds:zoom-in-95",
|
|
145
|
+
"ds:motion-reduce:animate-none"
|
|
146
|
+
].join(" ")
|
|
147
|
+
), _e = q(
|
|
148
|
+
[
|
|
149
|
+
"ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
150
|
+
"ds:ps-3 ds:pe-3 ds:py-2 ds:text-[length:var(--font-size-sm)] ds:text-foreground",
|
|
151
|
+
"ds:rounded-[var(--radius-sm)] ds:select-none ds:cursor-pointer",
|
|
152
|
+
"ds:data-[disabled=true]:pointer-events-none ds:data-[disabled=true]:opacity-50",
|
|
153
|
+
// cmdk moves the selection on pointer move, so hover needs no tint.
|
|
154
|
+
Vt.selected
|
|
155
|
+
].join(" ")
|
|
156
|
+
), Ie = [
|
|
157
|
+
"ds:[&_[cmdk-group-heading]]:ps-3",
|
|
158
|
+
"ds:[&_[cmdk-group-heading]]:pe-3",
|
|
159
|
+
"ds:[&_[cmdk-group-heading]]:py-1.5",
|
|
160
|
+
"ds:[&_[cmdk-group-heading]]:type-eyebrow",
|
|
161
|
+
"ds:[&_[cmdk-group-heading]]:text-muted-foreground"
|
|
162
|
+
].join(" "), le = "ds:inline-flex ds:items-center ds:shrink-0 ds:text-muted-foreground ds:[&_svg]:size-4";
|
|
163
|
+
function de(r, u, K) {
|
|
164
|
+
return `${r}-${u}-${K}`;
|
|
165
|
+
}
|
|
166
|
+
function Re(r, u) {
|
|
167
|
+
return `${r}:${u}`;
|
|
168
|
+
}
|
|
169
|
+
const Pt = vt(
|
|
170
|
+
function({
|
|
171
|
+
loadOptions: u,
|
|
172
|
+
debounceMs: K = 250,
|
|
173
|
+
value: Ve,
|
|
174
|
+
defaultValue: Ee,
|
|
175
|
+
onChange: Te,
|
|
176
|
+
onSelect: c,
|
|
177
|
+
recents: x,
|
|
178
|
+
onRecentSelect: M,
|
|
179
|
+
snapOnBlur: Fe = !1,
|
|
180
|
+
size: $e = "md",
|
|
181
|
+
tone: De = "default",
|
|
182
|
+
startAdornment: z,
|
|
183
|
+
endAdornment: H,
|
|
184
|
+
placeholder: U,
|
|
185
|
+
disabled: Se,
|
|
186
|
+
readOnly: h,
|
|
187
|
+
required: Be,
|
|
188
|
+
name: Oe,
|
|
189
|
+
id: L,
|
|
190
|
+
className: Pe,
|
|
191
|
+
"aria-label": G,
|
|
192
|
+
"aria-invalid": je,
|
|
193
|
+
"aria-describedby": qe,
|
|
194
|
+
autoComplete: Q,
|
|
195
|
+
"aria-labelledby": F,
|
|
196
|
+
emptyMessage: Ke,
|
|
197
|
+
showDescriptions: Me = !1,
|
|
198
|
+
handleRef: ze,
|
|
199
|
+
onLoadError: $,
|
|
200
|
+
inputDir: ue,
|
|
201
|
+
registerAgent: ce = !0,
|
|
202
|
+
openOnFocus: He = !0
|
|
203
|
+
}, R) {
|
|
204
|
+
const { t: C, i18n: Ue } = wt("ui"), p = Ct(), Le = bt(), N = L ?? p.id ?? Le, pe = `${N}-listbox`, Ge = `${N}-live`, m = !!(p.disabled || Se), Qe = !!(p.required || Be), me = p.invalid || !!je, We = me ? "error" : De ?? "default", Xe = [p.describedBy, qe].filter(Boolean).join(" ") || void 0, [Ye, fe] = xt({
|
|
205
|
+
value: Ve,
|
|
206
|
+
defaultValue: Ee ?? "",
|
|
207
|
+
onChange: Te
|
|
208
|
+
}), o = Ye ?? "", [k, i] = T(!1), [A, ge] = T([]), [V, W] = T(!1), [Je, he] = T(!1), [v, Ze] = T(""), D = d(!1), X = d(null), Y = d(o), ve = d(/* @__PURE__ */ new Map()), be = d(/* @__PURE__ */ new Map()), b = d(null), S = d(null);
|
|
209
|
+
Nt(p, b);
|
|
210
|
+
const J = Q && Q !== "off" ? Q : void 0;
|
|
211
|
+
re(() => {
|
|
212
|
+
var e;
|
|
213
|
+
J && ((e = b.current) == null || e.setAttribute("autocomplete", J));
|
|
214
|
+
});
|
|
215
|
+
const et = _(
|
|
216
|
+
(e) => {
|
|
217
|
+
b.current = e, typeof R == "function" ? R(e) : R && (R.current = e);
|
|
218
|
+
},
|
|
219
|
+
[R]
|
|
220
|
+
), ye = Ue.language, B = d($);
|
|
221
|
+
I(() => {
|
|
222
|
+
B.current = $;
|
|
223
|
+
}, [$]), I(() => {
|
|
224
|
+
const e = /* @__PURE__ */ new Map();
|
|
225
|
+
for (const t of A) e.set(t.value, t);
|
|
226
|
+
ve.current = e;
|
|
227
|
+
}, [A]), I(() => {
|
|
228
|
+
const e = /* @__PURE__ */ new Map();
|
|
229
|
+
if (x) for (const t of x) e.set(t.value, t);
|
|
230
|
+
be.current = e;
|
|
231
|
+
}, [x]);
|
|
232
|
+
const tt = _(
|
|
233
|
+
(e) => {
|
|
234
|
+
var a;
|
|
235
|
+
if (m || h || D.current) return;
|
|
236
|
+
(a = X.current) == null || a.abort();
|
|
237
|
+
const t = new AbortController();
|
|
238
|
+
X.current = t, Y.current = e, W(!0), he(!1), u(e, { signal: t.signal, locale: ye }).then((s) => {
|
|
239
|
+
t.signal.aborted || Y.current === e && (ge(s), W(!1));
|
|
240
|
+
}).catch((s) => {
|
|
241
|
+
var E;
|
|
242
|
+
t.signal.aborted || s && typeof s == "object" && "name" in s && s.name === "AbortError" || ((E = B.current) == null || E.call(B, s), Y.current === e && (he(!0), ge([]), W(!1)));
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
[m, h, u, ye]
|
|
246
|
+
), y = $t(tt, K);
|
|
247
|
+
I(() => () => {
|
|
248
|
+
var e;
|
|
249
|
+
y.cancel(), (e = X.current) == null || e.abort();
|
|
250
|
+
}, [y]);
|
|
251
|
+
const f = _(
|
|
252
|
+
(e) => {
|
|
253
|
+
fe(e);
|
|
254
|
+
},
|
|
255
|
+
[fe]
|
|
256
|
+
), we = _(
|
|
257
|
+
(e) => {
|
|
258
|
+
const [t, a] = e.split(":");
|
|
259
|
+
if (!a || t !== "recent" && t !== "option") return null;
|
|
260
|
+
const E = (t === "recent" ? be.current : ve.current).get(a);
|
|
261
|
+
return E ? { kind: t, option: E } : null;
|
|
262
|
+
},
|
|
263
|
+
[]
|
|
264
|
+
), st = (e) => {
|
|
265
|
+
f(e), !(m || h) && (J && document.activeElement !== b.current || (k || i(!0), !D.current && y(e)));
|
|
266
|
+
}, nt = (e) => {
|
|
267
|
+
D.current = !0;
|
|
268
|
+
}, at = (e) => {
|
|
269
|
+
D.current = !1;
|
|
270
|
+
const t = e.currentTarget.value;
|
|
271
|
+
y(t);
|
|
272
|
+
}, rt = (e) => {
|
|
273
|
+
m || h || !He || (i(!0), o && y(o));
|
|
274
|
+
}, ot = (e) => {
|
|
275
|
+
const t = e.relatedTarget;
|
|
276
|
+
if (!(t && S.current && S.current.contains(t))) {
|
|
277
|
+
if (Fe && v) {
|
|
278
|
+
const a = we(v);
|
|
279
|
+
a && (f(a.option.label), c == null || c(a.option));
|
|
280
|
+
}
|
|
281
|
+
i(!1);
|
|
282
|
+
}
|
|
283
|
+
}, it = (e) => {
|
|
284
|
+
if (!e.nativeEvent.isComposing) {
|
|
285
|
+
if (e.key === "Escape") {
|
|
286
|
+
k && (e.preventDefault(), e.stopPropagation(), i(!1));
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
if (e.key === "ArrowDown" && !k) {
|
|
290
|
+
e.preventDefault(), i(!0), o && y(o);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (e.key === "Tab" && k && v) {
|
|
294
|
+
const t = we(v);
|
|
295
|
+
t && (f(t.option.label), c == null || c(t.option), i(!1));
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}, Ce = (e, t) => {
|
|
299
|
+
var a;
|
|
300
|
+
f(t.label), e === "recent" ? M == null || M(t) : c == null || c(t), i(!1), (a = b.current) == null || a.focus();
|
|
301
|
+
}, Z = (e) => {
|
|
302
|
+
e.preventDefault();
|
|
303
|
+
}, O = !!(x && x.length > 0) && o.length === 0, lt = ae(
|
|
304
|
+
() => kt(A),
|
|
305
|
+
[A]
|
|
306
|
+
), dt = !!z, ut = !!H || V, ct = St({
|
|
307
|
+
size: $e,
|
|
308
|
+
tone: We,
|
|
309
|
+
className: Pe
|
|
310
|
+
}), pt = ae(() => {
|
|
311
|
+
if (!v) return;
|
|
312
|
+
const [e, t] = v.split(":");
|
|
313
|
+
if (!(!t || e !== "recent" && e !== "option"))
|
|
314
|
+
return de(N, e, t);
|
|
315
|
+
}, [v, N]), P = A.length > 0, Ne = !O && !P && !V && o.length > 0, xe = V && !P, l = k && !m && !h && (O || P || Ne || xe), ee = _(() => {
|
|
316
|
+
var a;
|
|
317
|
+
const e = b.current;
|
|
318
|
+
if (!e) return;
|
|
319
|
+
e.setAttribute("aria-expanded", String(l));
|
|
320
|
+
const t = (a = S.current) == null ? void 0 : a.querySelector("[cmdk-list]");
|
|
321
|
+
l && (t != null && t.id) ? e.setAttribute("aria-controls", t.id) : l || (e.removeAttribute("aria-controls"), e.removeAttribute("aria-activedescendant"));
|
|
322
|
+
}, [l]);
|
|
323
|
+
re(ee);
|
|
324
|
+
const mt = _(
|
|
325
|
+
(e) => {
|
|
326
|
+
S.current = e, ee();
|
|
327
|
+
},
|
|
328
|
+
[ee]
|
|
329
|
+
), te = d(o);
|
|
330
|
+
I(() => {
|
|
331
|
+
te.current = o;
|
|
332
|
+
}, [o]);
|
|
333
|
+
const ke = d(l);
|
|
334
|
+
I(() => {
|
|
335
|
+
ke.current = l;
|
|
336
|
+
}, [l]);
|
|
337
|
+
const se = ae(
|
|
338
|
+
() => ({
|
|
339
|
+
getValue: () => te.current || null,
|
|
340
|
+
getQuery: () => te.current,
|
|
341
|
+
getIsOpen: () => ke.current,
|
|
342
|
+
setValue: (e) => {
|
|
343
|
+
f(e ?? "");
|
|
344
|
+
},
|
|
345
|
+
setQuery: (e) => {
|
|
346
|
+
f(e);
|
|
347
|
+
},
|
|
348
|
+
search: (e) => {
|
|
349
|
+
f(e), !(m || h) && (i(!0), y(e));
|
|
350
|
+
},
|
|
351
|
+
clear: () => {
|
|
352
|
+
f("");
|
|
353
|
+
},
|
|
354
|
+
open: () => {
|
|
355
|
+
i(!0);
|
|
356
|
+
},
|
|
357
|
+
close: () => {
|
|
358
|
+
i(!1);
|
|
359
|
+
}
|
|
360
|
+
}),
|
|
361
|
+
[f, y, m, h]
|
|
362
|
+
);
|
|
363
|
+
yt(ze, () => se, [se]), Ft(
|
|
364
|
+
Dt,
|
|
365
|
+
se,
|
|
366
|
+
ce ? L : void 0
|
|
367
|
+
);
|
|
368
|
+
const ne = d(null);
|
|
369
|
+
re(() => {
|
|
370
|
+
const e = b.current;
|
|
371
|
+
if (!e) return;
|
|
372
|
+
ne.current === null && (ne.current = e.getAttribute("aria-labelledby") ?? "");
|
|
373
|
+
const t = F || ne.current;
|
|
374
|
+
t && e.getAttribute("aria-labelledby") !== t && e.setAttribute("aria-labelledby", t);
|
|
375
|
+
});
|
|
376
|
+
const ft = A.length, gt = V ? C("common.loading", "Loading…") : k && o.length > 0 && !(Je && $) ? C("inputs.autocomplete.results", {
|
|
377
|
+
count: ft,
|
|
378
|
+
defaultValue: "{{count}} results"
|
|
379
|
+
}) : "";
|
|
380
|
+
return /* @__PURE__ */ n(
|
|
381
|
+
w,
|
|
382
|
+
{
|
|
383
|
+
shouldFilter: !1,
|
|
384
|
+
value: v,
|
|
385
|
+
onValueChange: Ze,
|
|
386
|
+
label: G ?? (p.label || U),
|
|
387
|
+
className: "ds:w-full",
|
|
388
|
+
children: /* @__PURE__ */ g(j.Root, { open: l, children: [
|
|
389
|
+
/* @__PURE__ */ n(j.Anchor, { asChild: !0, children: /* @__PURE__ */ g(
|
|
390
|
+
"div",
|
|
391
|
+
{
|
|
392
|
+
className: ct,
|
|
393
|
+
"data-component": "autocomplete",
|
|
394
|
+
"data-component-id": ce ? L : void 0,
|
|
395
|
+
"data-disabled": m || void 0,
|
|
396
|
+
children: [
|
|
397
|
+
z ? /* @__PURE__ */ n("span", { "aria-hidden": "true", className: `${le} ds:ps-3`, children: z }) : null,
|
|
398
|
+
/* @__PURE__ */ n(
|
|
399
|
+
w.Input,
|
|
400
|
+
{
|
|
401
|
+
ref: et,
|
|
402
|
+
id: N,
|
|
403
|
+
name: Oe,
|
|
404
|
+
placeholder: U,
|
|
405
|
+
value: o,
|
|
406
|
+
onValueChange: st,
|
|
407
|
+
onFocus: rt,
|
|
408
|
+
onBlur: ot,
|
|
409
|
+
onKeyDown: it,
|
|
410
|
+
onCompositionStart: nt,
|
|
411
|
+
onCompositionEnd: at,
|
|
412
|
+
disabled: m,
|
|
413
|
+
readOnly: h,
|
|
414
|
+
required: Qe,
|
|
415
|
+
role: "combobox",
|
|
416
|
+
"aria-autocomplete": "both",
|
|
417
|
+
"aria-expanded": l,
|
|
418
|
+
"aria-controls": l ? pe : void 0,
|
|
419
|
+
"aria-activedescendant": pt,
|
|
420
|
+
"aria-describedby": Xe,
|
|
421
|
+
"aria-invalid": me || void 0,
|
|
422
|
+
dir: ue && o ? ue : void 0,
|
|
423
|
+
"aria-label": G ?? (p.label || (F ? void 0 : C("inputs.autocomplete.ariaLabel"))),
|
|
424
|
+
autoComplete: "off",
|
|
425
|
+
className: Bt({ hasStart: dt, hasEnd: ut })
|
|
426
|
+
}
|
|
427
|
+
),
|
|
428
|
+
V ? /* @__PURE__ */ n("span", { className: `${le} ds:pe-3`, "aria-hidden": "true", children: /* @__PURE__ */ n(Ae, { variant: "pulse", size: "sm" }) }) : H ? /* @__PURE__ */ n("span", { "aria-hidden": "true", className: `${le} ds:pe-3`, children: H }) : null,
|
|
429
|
+
/* @__PURE__ */ n(
|
|
430
|
+
"span",
|
|
431
|
+
{
|
|
432
|
+
id: Ge,
|
|
433
|
+
role: "status",
|
|
434
|
+
"aria-live": "polite",
|
|
435
|
+
"aria-atomic": "true",
|
|
436
|
+
className: "ds:sr-only",
|
|
437
|
+
children: gt
|
|
438
|
+
}
|
|
439
|
+
)
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
) }),
|
|
443
|
+
l ? /* @__PURE__ */ n(j.Portal, { children: /* @__PURE__ */ n(
|
|
444
|
+
j.Content,
|
|
445
|
+
{
|
|
446
|
+
ref: mt,
|
|
447
|
+
role: "presentation",
|
|
448
|
+
side: "bottom",
|
|
449
|
+
align: "start",
|
|
450
|
+
sideOffset: 4,
|
|
451
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
452
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
453
|
+
onPointerDownOutside: (e) => {
|
|
454
|
+
var a;
|
|
455
|
+
const t = e.target;
|
|
456
|
+
if (t && ((a = b.current) != null && a.contains(t))) {
|
|
457
|
+
e.preventDefault();
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
i(!1);
|
|
461
|
+
},
|
|
462
|
+
onEscapeKeyDown: () => i(!1),
|
|
463
|
+
onMouseDown: Z,
|
|
464
|
+
className: Ot(),
|
|
465
|
+
children: /* @__PURE__ */ g(
|
|
466
|
+
w.List,
|
|
467
|
+
{
|
|
468
|
+
id: pe,
|
|
469
|
+
label: G ?? (p.label || (F ? (
|
|
470
|
+
// Empty, so cmdk's English "Suggestions" does
|
|
471
|
+
// not sit beside the labelledby.
|
|
472
|
+
""
|
|
473
|
+
) : U || C("inputs.autocomplete.ariaLabel"))),
|
|
474
|
+
"aria-labelledby": F,
|
|
475
|
+
className: "ds:max-h-[min(24rem,var(--radix-popover-content-available-height))] ds:overflow-auto ds:p-1",
|
|
476
|
+
children: [
|
|
477
|
+
O ? /* @__PURE__ */ n(
|
|
478
|
+
w.Group,
|
|
479
|
+
{
|
|
480
|
+
heading: C("inputs.autocomplete.recent", "Recent"),
|
|
481
|
+
className: Ie,
|
|
482
|
+
children: (x ?? []).map((e) => /* @__PURE__ */ g(
|
|
483
|
+
w.Item,
|
|
484
|
+
{
|
|
485
|
+
id: de(N, "recent", e.value),
|
|
486
|
+
"data-option-id": e.value,
|
|
487
|
+
value: Re("recent", e.value),
|
|
488
|
+
disabled: e.disabled,
|
|
489
|
+
onSelect: () => Ce("recent", e),
|
|
490
|
+
onMouseDown: Z,
|
|
491
|
+
className: _e(),
|
|
492
|
+
children: [
|
|
493
|
+
e.startAdornment ? /* @__PURE__ */ n(
|
|
494
|
+
"span",
|
|
495
|
+
{
|
|
496
|
+
"aria-hidden": "true",
|
|
497
|
+
className: "ds:inline-flex ds:items-center ds:shrink-0",
|
|
498
|
+
children: e.startAdornment
|
|
499
|
+
}
|
|
500
|
+
) : null,
|
|
501
|
+
/* @__PURE__ */ n(
|
|
502
|
+
"span",
|
|
503
|
+
{
|
|
504
|
+
dir: e.dir,
|
|
505
|
+
className: "ds:flex-1 ds:truncate",
|
|
506
|
+
children: e.label
|
|
507
|
+
}
|
|
508
|
+
),
|
|
509
|
+
e.endContent ? (
|
|
510
|
+
// Deliberately NOT aria-hidden — unlike
|
|
511
|
+
// `startAdornment`, this slot carries meaning
|
|
512
|
+
// and must reach the option's accessible name.
|
|
513
|
+
/* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: e.endContent })
|
|
514
|
+
) : null
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
`recent-${e.value}`
|
|
518
|
+
))
|
|
519
|
+
}
|
|
520
|
+
) : null,
|
|
521
|
+
Ne ? /* @__PURE__ */ n(
|
|
522
|
+
"div",
|
|
523
|
+
{
|
|
524
|
+
role: "option",
|
|
525
|
+
"aria-disabled": "true",
|
|
526
|
+
"aria-selected": "false",
|
|
527
|
+
className: "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground",
|
|
528
|
+
children: Ke ?? C("inputs.autocomplete.noResults", "No results")
|
|
529
|
+
}
|
|
530
|
+
) : null,
|
|
531
|
+
xe ? /* @__PURE__ */ g(
|
|
532
|
+
"div",
|
|
533
|
+
{
|
|
534
|
+
role: "option",
|
|
535
|
+
"aria-disabled": "true",
|
|
536
|
+
"aria-selected": "false",
|
|
537
|
+
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",
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ n(Ae, { variant: "pulse", size: "sm" }),
|
|
540
|
+
/* @__PURE__ */ n("span", { children: C("common.loading", "Loading…") })
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
) : null,
|
|
544
|
+
!O && P ? lt.map((e, t) => {
|
|
545
|
+
const a = e.items.map((s) => /* @__PURE__ */ g(
|
|
546
|
+
w.Item,
|
|
547
|
+
{
|
|
548
|
+
id: de(N, "option", s.value),
|
|
549
|
+
"data-option-id": s.value,
|
|
550
|
+
value: Re("option", s.value),
|
|
551
|
+
disabled: s.disabled,
|
|
552
|
+
onSelect: () => Ce("option", s),
|
|
553
|
+
onMouseDown: Z,
|
|
554
|
+
className: _e(),
|
|
555
|
+
children: [
|
|
556
|
+
s.startAdornment ? /* @__PURE__ */ n(
|
|
557
|
+
"span",
|
|
558
|
+
{
|
|
559
|
+
"aria-hidden": "true",
|
|
560
|
+
className: "ds:inline-flex ds:items-center ds:shrink-0",
|
|
561
|
+
children: s.startAdornment
|
|
562
|
+
}
|
|
563
|
+
) : null,
|
|
564
|
+
Me ? /* @__PURE__ */ g(
|
|
565
|
+
"span",
|
|
566
|
+
{
|
|
567
|
+
className: `${At} ds:py-[var(--spacing-xs)]`,
|
|
568
|
+
children: [
|
|
569
|
+
/* @__PURE__ */ g("span", { className: _t, children: [
|
|
570
|
+
/* @__PURE__ */ n(
|
|
571
|
+
"span",
|
|
572
|
+
{
|
|
573
|
+
dir: s.dir,
|
|
574
|
+
className: "ds:min-w-0 ds:flex-1 ds:[overflow-wrap:anywhere]",
|
|
575
|
+
children: s.label
|
|
576
|
+
}
|
|
577
|
+
),
|
|
578
|
+
s.endContent ? (
|
|
579
|
+
// Announced, as in the one-line row.
|
|
580
|
+
/* @__PURE__ */ n("span", { className: It, children: s.endContent })
|
|
581
|
+
) : null
|
|
582
|
+
] }),
|
|
583
|
+
s.description ? /* @__PURE__ */ n(
|
|
584
|
+
"span",
|
|
585
|
+
{
|
|
586
|
+
dir: s.dir,
|
|
587
|
+
className: Rt({
|
|
588
|
+
tone: s.descriptionTone,
|
|
589
|
+
className: "ds:[overflow-wrap:anywhere]"
|
|
590
|
+
}),
|
|
591
|
+
children: s.description
|
|
592
|
+
}
|
|
593
|
+
) : null
|
|
594
|
+
]
|
|
595
|
+
}
|
|
596
|
+
) : /* @__PURE__ */ g(ht, { children: [
|
|
597
|
+
/* @__PURE__ */ n(
|
|
598
|
+
"span",
|
|
599
|
+
{
|
|
600
|
+
dir: s.dir,
|
|
601
|
+
className: "ds:flex-1 ds:truncate",
|
|
602
|
+
children: s.label
|
|
603
|
+
}
|
|
604
|
+
),
|
|
605
|
+
s.endContent ? (
|
|
606
|
+
// Deliberately NOT aria-hidden — unlike
|
|
607
|
+
// `startAdornment`, this slot carries meaning
|
|
608
|
+
// and must reach the option's accessible name.
|
|
609
|
+
/* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: s.endContent })
|
|
610
|
+
) : null
|
|
611
|
+
] })
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
`option-${s.value}`
|
|
615
|
+
));
|
|
616
|
+
return e.group ? /* @__PURE__ */ n(
|
|
617
|
+
w.Group,
|
|
618
|
+
{
|
|
619
|
+
heading: e.group,
|
|
620
|
+
className: Ie,
|
|
621
|
+
children: a
|
|
622
|
+
},
|
|
623
|
+
`group-${e.group}`
|
|
624
|
+
) : /* @__PURE__ */ n(w.Group, { children: a }, `group-${t}`);
|
|
625
|
+
}) : null
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
)
|
|
629
|
+
}
|
|
630
|
+
) }) : null
|
|
631
|
+
] })
|
|
632
|
+
}
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
), jt = Pt;
|
|
636
|
+
jt.displayName = "Autocomplete";
|
|
637
|
+
export {
|
|
638
|
+
jt as A,
|
|
639
|
+
Dt as a,
|
|
640
|
+
St as b
|
|
641
|
+
};
|
|
642
|
+
//# sourceMappingURL=autocomplete-HZNW7_Pa.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as C, jsxs as M } from "react/jsx-runtime";
|
|
2
2
|
import { createElement as G, useRef as k, useEffect as ae, useCallback as K, forwardRef as be, useState as ie, useImperativeHandle as ge, useMemo as X } from "react";
|
|
3
3
|
import { useTranslation as Y } from "react-i18next";
|
|
4
|
-
import { a as b, T as g, D as S, d as Ce } from "./data-table-
|
|
4
|
+
import { a as b, T as g, D as S, d as Ce } from "./data-table-CnLfOwxg.js";
|
|
5
5
|
import { A as ve, a as re } from "./actions-cell-renderer-C-l_ppP6.js";
|
|
6
|
-
import { S as Te } from "./select-
|
|
6
|
+
import { S as Te } from "./select-Bm8s3q-X.js";
|
|
7
7
|
import { u as we } from "./registry-DvAUVLHh.js";
|
|
8
|
-
import { I as Ne, L as Fe, b as z, a as H, c as $, N as j, d as w, S as N, T as le, D as Q, g as Re, f as Ie, U as ye, e as Pe } from "./link-cell-renderer-
|
|
8
|
+
import { I as Ne, L as Fe, b as z, a as H, c as $, N as j, d as w, S as N, T as le, D as Q, g as Re, f as Ie, U as ye, e as Pe } from "./link-cell-renderer-CSA0KKPe.js";
|
|
9
9
|
import { T as Se } from "./transaction-chip-CkYd-3ky.js";
|
|
10
10
|
import { B as oe } from "./badge-BUk4RjTS.js";
|
|
11
11
|
import { c as We } from "./index-D2ZczOXr.js";
|
|
@@ -1180,4 +1180,4 @@ export {
|
|
|
1180
1180
|
se as g,
|
|
1181
1181
|
nt as u
|
|
1182
1182
|
};
|
|
1183
|
-
//# sourceMappingURL=balance-badge-cell-
|
|
1183
|
+
//# sourceMappingURL=balance-badge-cell-CRrIv2hy.js.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as w, jsx as l, Fragment as ot } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext as Jt, useContext as we, useRef as A, useLayoutEffect as Kn, useMemo as E, forwardRef as Pn, useEffect as Ae, useState as qe, useCallback as B, useImperativeHandle as $n, useId as Fn } from "react";
|
|
3
3
|
import { useTranslation as Pe } from "react-i18next";
|
|
4
4
|
import { u as zn } from "./registry-DvAUVLHh.js";
|
|
5
|
-
import { e as Yn } from "./data-grid-
|
|
5
|
+
import { e as Yn } from "./data-grid-bQ6iFm10.js";
|
|
6
6
|
import { a as K } from "./format-number-DdzqwMs1.js";
|
|
7
7
|
import { i as Vt } from "./is-development-CLUAnsU7.js";
|
|
8
8
|
import { B as st } from "./badge-BUk4RjTS.js";
|
|
@@ -12,7 +12,7 @@ import { V as $e } from "./visually-hidden-BHxEUGyT.js";
|
|
|
12
12
|
import { c as x } from "./index-D2ZczOXr.js";
|
|
13
13
|
import { a as jn } from "./compact-editor-fields-cP6yh7xv.js";
|
|
14
14
|
import { E as Hn } from "./eye-off-C_4xkbRP.js";
|
|
15
|
-
import { C as Gn } from "./combobox-
|
|
15
|
+
import { C as Gn } from "./combobox-BYl6mY4c.js";
|
|
16
16
|
import { M as Xn } from "./money-OE6_oDPH.js";
|
|
17
17
|
import { divideDecimal as Zn, formatDecimal as ae, multiplyDecimal as Jn, sumDecimals as Ue, parseDecimal as fe, FATTURAPA_VALUE as pe, compareDecimal as Ne, decimalToNumber as Fe, negateDecimal as en, rescaleDecimal as tn, numberToDecimal as ei, shiftDecimal as ti } from "../decimal/index.js";
|
|
18
18
|
import { W as be, a as ni } from "./maps-MpMxTBov.js";
|
|
@@ -1997,4 +1997,4 @@ export {
|
|
|
1997
1997
|
Ci as u,
|
|
1998
1998
|
Yt as v
|
|
1999
1999
|
};
|
|
2000
|
-
//# sourceMappingURL=bill-line-table-
|
|
2000
|
+
//# sourceMappingURL=bill-line-table-DCqxhode.js.map
|