@alfadocs/ui-kit-debug 1.90.1 → 1.90.2
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-autocomplete-DR4Xn23Z.js +519 -0
- package/dist/_chunks/address-autocomplete-DR4Xn23Z.js.map +1 -0
- package/dist/_chunks/{address-fields-CfnXK8RT.js → address-fields-qxQkGwPf.js} +5 -5
- package/dist/_chunks/{address-fields-CfnXK8RT.js.map → address-fields-qxQkGwPf.js.map} +1 -1
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js → ai-permission-notice-VNh3W57L.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js.map → ai-permission-notice-VNh3W57L.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js → anamnesis-summary-rows-EKPfVCmh.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js.map → anamnesis-summary-rows-EKPfVCmh.js.map} +1 -1
- package/dist/_chunks/autocomplete-BXMcNoa3.js +562 -0
- package/dist/_chunks/autocomplete-BXMcNoa3.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js → balance-badge-cell-D9VhFp0L.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js.map → balance-badge-cell-D9VhFp0L.js.map} +1 -1
- package/dist/_chunks/{booking-C0FoW8Yx.js → booking-CcE_oviI.js} +1896 -1859
- package/dist/_chunks/booking-CcE_oviI.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js → calendar-appointment-editor-dialog-CiAGAX2t.js} +7 -7
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js.map → calendar-appointment-editor-dialog-CiAGAX2t.js.map} +1 -1
- package/dist/_chunks/{checkbox-BjDv-r3o.js → checkbox-a7Sh-dXb.js} +32 -31
- package/dist/_chunks/checkbox-a7Sh-dXb.js.map +1 -0
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js → checkbox-group-eGdv9fZc.js} +2 -2
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js.map → checkbox-group-eGdv9fZc.js.map} +1 -1
- package/dist/_chunks/{city-input-CJVGswxp.js → city-input-CA59CjnV.js} +2 -2
- package/dist/_chunks/{city-input-CJVGswxp.js.map → city-input-CA59CjnV.js.map} +1 -1
- package/dist/_chunks/{combobox-CDPm_n0p.js → combobox-D-gpgEDy.js} +314 -294
- package/dist/_chunks/combobox-D-gpgEDy.js.map +1 -0
- package/dist/_chunks/{country-select-DQ8q7ypA.js → country-select-BfmX9y5i.js} +2 -2
- package/dist/_chunks/{country-select-DQ8q7ypA.js.map → country-select-BfmX9y5i.js.map} +1 -1
- package/dist/_chunks/{data-table-B_IcS0Ke.js → data-table-CqQgoNsU.js} +2 -2
- package/dist/_chunks/{data-table-B_IcS0Ke.js.map → data-table-CqQgoNsU.js.map} +1 -1
- package/dist/_chunks/{face-scheme-BgJGFDTa.js → face-scheme-BKSE98bo.js} +2 -2
- package/dist/_chunks/{face-scheme-BgJGFDTa.js.map → face-scheme-BKSE98bo.js.map} +1 -1
- package/dist/_chunks/{file-manager-C9YOT-Dn.js → file-manager-BnI1ZWZu.js} +2 -2
- package/dist/_chunks/{file-manager-C9YOT-Dn.js.map → file-manager-BnI1ZWZu.js.map} +1 -1
- package/dist/_chunks/{header-settings-BVhjndtV.js → header-settings-BeA2fnol.js} +24 -23
- package/dist/_chunks/header-settings-BeA2fnol.js.map +1 -0
- package/dist/_chunks/{heatmap-HTz3Jvzy.js → heatmap-fCxwNz2o.js} +2 -2
- package/dist/_chunks/{heatmap-HTz3Jvzy.js.map → heatmap-fCxwNz2o.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js → link-cell-renderer-CnCgudvq.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js.map → link-cell-renderer-CnCgudvq.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js → login-dev-card-BZBR58mu.js} +2 -2
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js.map → login-dev-card-BZBR58mu.js.map} +1 -1
- package/dist/_chunks/{map-view-Bvi06RVh.js → map-view-UrNgxBy3.js} +260 -237
- package/dist/_chunks/map-view-UrNgxBy3.js.map +1 -0
- package/dist/_chunks/{index.modern-BeRXQVdc.js → maps-core-gate-DkNqGkm3.js} +360 -319
- package/dist/_chunks/maps-core-gate-DkNqGkm3.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js → marketplace-app-shell-CmZx0Oam.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js.map → marketplace-app-shell-CmZx0Oam.js.map} +1 -1
- package/dist/_chunks/{notes-panel-CZO1qsD-.js → notes-panel-Dywo6R55.js} +2 -2
- package/dist/_chunks/{notes-panel-CZO1qsD-.js.map → notes-panel-Dywo6R55.js.map} +1 -1
- package/dist/_chunks/{patient-details-D0P5eog5.js → patient-details-BUr7Oemx.js} +2 -2
- package/dist/_chunks/{patient-details-D0P5eog5.js.map → patient-details-BUr7Oemx.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-R73dZJY6.js → patient-field-row-bJk8Q_qr.js} +5 -5
- package/dist/_chunks/{patient-field-row-R73dZJY6.js.map → patient-field-row-bJk8Q_qr.js.map} +1 -1
- package/dist/_chunks/patient-search-Ca9j5cWb.js +1306 -0
- package/dist/_chunks/patient-search-Ca9j5cWb.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js → patient-summary-card-CCQZ8X37.js} +2 -2
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js.map → patient-summary-card-CCQZ8X37.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js → periodontal-diagnosis-DD3hrg9X.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js.map → periodontal-diagnosis-DD3hrg9X.js.map} +1 -1
- package/dist/_chunks/{permission-matrix-BoQjENGV.js → permission-matrix-BJ6sg3Zp.js} +3 -3
- package/dist/_chunks/{permission-matrix-BoQjENGV.js.map → permission-matrix-BJ6sg3Zp.js.map} +1 -1
- package/dist/_chunks/{practice-results-B61krlwu.js → practice-results-DQuOfqej.js} +2 -2
- package/dist/_chunks/{practice-results-B61krlwu.js.map → practice-results-DQuOfqej.js.map} +1 -1
- package/dist/_chunks/{province-select-CPdTwEob.js → province-select-D64whw0m.js} +2 -2
- package/dist/_chunks/{province-select-CPdTwEob.js.map → province-select-D64whw0m.js.map} +1 -1
- package/dist/_chunks/{registration-form-DmP3YUfp.js → registration-form-CRm6DaB9.js} +2 -2
- package/dist/_chunks/{registration-form-DmP3YUfp.js.map → registration-form-CRm6DaB9.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-UzQQLb-z.js → reviews-panel-B7InBORU.js} +42 -41
- package/dist/_chunks/reviews-panel-B7InBORU.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js → rich-text-editor-BfEu57dk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js.map → rich-text-editor-BfEu57dk.js.map} +1 -1
- package/dist/_chunks/{slot-grid-Bb13H9Rl.js → slot-grid-DrwynKeN.js} +91 -89
- package/dist/_chunks/{slot-grid-Bb13H9Rl.js.map → slot-grid-DrwynKeN.js.map} +1 -1
- package/dist/_chunks/{task-editor-BOETWbjU.js → task-editor-CI1SKUNc.js} +2 -2
- package/dist/_chunks/{task-editor-BOETWbjU.js.map → task-editor-CI1SKUNc.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js → use-appointment-details-read-BytPq3Ux.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js.map → use-appointment-details-read-BytPq3Ux.js.map} +1 -1
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js → voice-control-panel-BP0otrID.js} +2 -2
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js.map → voice-control-panel-BP0otrID.js.map} +1 -1
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js → workflow-webhook-action-B_nBJ_ht.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js.map → workflow-webhook-action-B_nBJ_ht.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/_shared/maps-core-gate.d.ts +18 -0
- package/dist/components/_shared/maps-core-gate.d.ts.map +1 -0
- package/dist/components/address-autocomplete/address-autocomplete.d.ts.map +1 -1
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.agent.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +2 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/notes-panel/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-search/patient-search.d.ts.map +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/host-compat.css +1 -10
- package/dist/index.js +37 -37
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js +0 -498
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js.map +0 -1
- package/dist/_chunks/autocomplete-CnB1mHGc.js +0 -539
- package/dist/_chunks/autocomplete-CnB1mHGc.js.map +0 -1
- package/dist/_chunks/booking-C0FoW8Yx.js.map +0 -1
- package/dist/_chunks/checkbox-BjDv-r3o.js.map +0 -1
- package/dist/_chunks/combobox-CDPm_n0p.js.map +0 -1
- package/dist/_chunks/header-settings-BVhjndtV.js.map +0 -1
- package/dist/_chunks/index.modern-BeRXQVdc.js.map +0 -1
- package/dist/_chunks/map-view-Bvi06RVh.js.map +0 -1
- package/dist/_chunks/patient-search-CCOUZABE.js +0 -1196
- package/dist/_chunks/patient-search-CCOUZABE.js.map +0 -1
- package/dist/_chunks/reviews-panel-UzQQLb-z.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as
|
|
4
|
-
import { R as
|
|
5
|
-
import { c as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as
|
|
1
|
+
import { jsx as r, jsxs as y, Fragment as at } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as lt, useContext as ct, useMemo as te, useState as L, useRef as f, useEffect as E, useCallback as se } from "react";
|
|
3
|
+
import * as $ from "@radix-ui/react-popover";
|
|
4
|
+
import { R as dt, _ as S, P as ut } from "./index-4xgbg-sn.js";
|
|
5
|
+
import { c as j } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as ft } from "react-i18next";
|
|
7
|
+
import { u as mt, F as pt, b as bt } from "./form-field-context-DtiROUJV.js";
|
|
8
|
+
import { c as vt } from "./compose-refs-C0k0tdqF.js";
|
|
9
9
|
import { n as w } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
10
|
-
import { g as
|
|
11
|
-
import { b as
|
|
12
|
-
import { O as
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
15
|
-
import { I as
|
|
16
|
-
import { u as
|
|
17
|
-
import { X as
|
|
18
|
-
import { C as
|
|
19
|
-
const
|
|
10
|
+
import { g as ht } from "./group-options-BvKhQ3xb.js";
|
|
11
|
+
import { b as gt } from "./menu-row-BAr8bx1I.js";
|
|
12
|
+
import { O as xt, a as yt, o as St, b as Rt, c as Nt } from "./option-row-Dc7BrbK8.js";
|
|
13
|
+
import { u as Et } from "./use-controllable-state-BiY4xTzM.js";
|
|
14
|
+
import { u as re } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
15
|
+
import { I as wt, a as ne, d as oe, c as At } from "./input-surface-iBmxVBfr.js";
|
|
16
|
+
import { u as _t } from "./registry-DvAUVLHh.js";
|
|
17
|
+
import { X as It } from "./x-B5YnXwCz.js";
|
|
18
|
+
import { C as kt } from "./check-DrFSN__t.js";
|
|
19
|
+
const Ft = {
|
|
20
20
|
id: "combobox",
|
|
21
21
|
// Persisted single choice (value state + set_value) → select_single + set_value,
|
|
22
22
|
// plus type-to-filter and open/close of the option list.
|
|
@@ -26,19 +26,19 @@ const Nt = {
|
|
|
26
26
|
type: "string | null",
|
|
27
27
|
descriptionKey: "ui.agent.combobox.state.value",
|
|
28
28
|
description: "Currently-selected option value, or null when nothing is selected.",
|
|
29
|
-
read: (
|
|
29
|
+
read: (i) => i.getValue()
|
|
30
30
|
},
|
|
31
31
|
query: {
|
|
32
32
|
type: "string",
|
|
33
33
|
descriptionKey: "ui.agent.combobox.state.query",
|
|
34
34
|
description: "Current filter query in the combobox input.",
|
|
35
|
-
read: (
|
|
35
|
+
read: (i) => i.getQuery()
|
|
36
36
|
},
|
|
37
37
|
isOpen: {
|
|
38
38
|
type: "boolean",
|
|
39
39
|
descriptionKey: "ui.agent.combobox.state.isOpen",
|
|
40
40
|
description: "True when the option list is visible.",
|
|
41
|
-
read: (
|
|
41
|
+
read: (i) => i.getIsOpen()
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
actions: {
|
|
@@ -60,8 +60,8 @@ const Nt = {
|
|
|
60
60
|
descriptionKey: "ui.agent.combobox.actions.setValue",
|
|
61
61
|
description: "Set the selected value programmatically.",
|
|
62
62
|
examples: [{ args: { value: "it" }, note: 'Select the "it" option.' }],
|
|
63
|
-
invoke: (
|
|
64
|
-
|
|
63
|
+
invoke: (i, c) => {
|
|
64
|
+
i.setValue(c.value);
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
apply_filter: {
|
|
@@ -78,8 +78,8 @@ const Nt = {
|
|
|
78
78
|
idempotent: !0,
|
|
79
79
|
descriptionKey: "ui.agent.combobox.actions.applyFilter",
|
|
80
80
|
description: "Set the filter query for the option list.",
|
|
81
|
-
invoke: (
|
|
82
|
-
|
|
81
|
+
invoke: (i, c) => {
|
|
82
|
+
i.setQuery(c.query);
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
clear_selection: {
|
|
@@ -88,8 +88,8 @@ const Nt = {
|
|
|
88
88
|
idempotent: !0,
|
|
89
89
|
descriptionKey: "ui.agent.combobox.actions.clearSelection",
|
|
90
90
|
description: "Clear the current selection.",
|
|
91
|
-
invoke: (
|
|
92
|
-
|
|
91
|
+
invoke: (i) => {
|
|
92
|
+
i.clear();
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
open: {
|
|
@@ -97,8 +97,8 @@ const Nt = {
|
|
|
97
97
|
idempotent: !0,
|
|
98
98
|
descriptionKey: "ui.agent.combobox.actions.open",
|
|
99
99
|
description: "Open the option list.",
|
|
100
|
-
invoke: (
|
|
101
|
-
|
|
100
|
+
invoke: (i) => {
|
|
101
|
+
i.open();
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
close: {
|
|
@@ -106,8 +106,8 @@ const Nt = {
|
|
|
106
106
|
idempotent: !0,
|
|
107
107
|
descriptionKey: "ui.agent.combobox.actions.close",
|
|
108
108
|
description: "Close the option list.",
|
|
109
|
-
invoke: (
|
|
110
|
-
|
|
109
|
+
invoke: (i) => {
|
|
110
|
+
i.close();
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
},
|
|
@@ -123,7 +123,7 @@ const Nt = {
|
|
|
123
123
|
description: "Each option emits its value as data-option-id."
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, Ct = j(
|
|
127
127
|
[
|
|
128
128
|
"ds:peer ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground",
|
|
129
129
|
"ds:outline-none ds:border-0",
|
|
@@ -141,26 +141,26 @@ const Nt = {
|
|
|
141
141
|
size: "md"
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
),
|
|
144
|
+
), zt = j(
|
|
145
145
|
[
|
|
146
146
|
"ds:group ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:w-full",
|
|
147
|
-
|
|
147
|
+
At
|
|
148
148
|
].join(" "),
|
|
149
149
|
{
|
|
150
150
|
variants: {
|
|
151
151
|
size: {
|
|
152
|
-
sm: `${
|
|
153
|
-
md: `${
|
|
154
|
-
lg: `${
|
|
152
|
+
sm: `${ne.sm} ${oe.sm}`,
|
|
153
|
+
md: `${ne.md} ${oe.md}`,
|
|
154
|
+
lg: `${ne.lg} ${oe.lg}`
|
|
155
155
|
},
|
|
156
|
-
tone:
|
|
156
|
+
tone: wt
|
|
157
157
|
},
|
|
158
158
|
defaultVariants: {
|
|
159
159
|
size: "md",
|
|
160
160
|
tone: "default"
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
),
|
|
163
|
+
), Dt = j(
|
|
164
164
|
[
|
|
165
165
|
"ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-[var(--radix-popover-trigger-width)]",
|
|
166
166
|
// A guard: the list is as wide as the field, so only a field that is
|
|
@@ -169,18 +169,16 @@ const Nt = {
|
|
|
169
169
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
|
|
170
170
|
"ds:shadow-[var(--shadow-lg)]",
|
|
171
171
|
"ds:animate-in ds:fade-in ds:zoom-in-95",
|
|
172
|
-
"ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out",
|
|
173
|
-
"ds:data-[state=closed]:zoom-out-95",
|
|
174
172
|
"ds:data-[side=bottom]:slide-in-from-top-2",
|
|
175
173
|
"ds:data-[side=top]:slide-in-from-bottom-2",
|
|
176
174
|
"ds:motion-reduce:animate-none"
|
|
177
175
|
].join(" ")
|
|
178
|
-
),
|
|
176
|
+
), Re = j(
|
|
179
177
|
[
|
|
180
178
|
"ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
181
179
|
"ds:rounded-[var(--radius-sm)]",
|
|
182
180
|
"ds:text-foreground ds:outline-none ds:select-none",
|
|
183
|
-
|
|
181
|
+
gt.selected,
|
|
184
182
|
"ds:aria-disabled:pointer-events-none ds:aria-disabled:opacity-50"
|
|
185
183
|
].join(" "),
|
|
186
184
|
{
|
|
@@ -195,293 +193,309 @@ const Nt = {
|
|
|
195
193
|
size: "md"
|
|
196
194
|
}
|
|
197
195
|
}
|
|
198
|
-
),
|
|
196
|
+
), Tt = [
|
|
199
197
|
"ds:ps-3 ds:pe-3 ds:py-1.5",
|
|
200
198
|
"type-eyebrow ds:text-muted-foreground"
|
|
201
|
-
].join(" "),
|
|
199
|
+
].join(" "), Ot = "ds:max-h-[18rem] ds:overflow-y-auto ds:p-[var(--spacing-xs)]", Pt = "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", Vt = {
|
|
202
200
|
sm: "ds:size-3.5",
|
|
203
201
|
md: "ds:size-4",
|
|
204
202
|
lg: "ds:size-5"
|
|
205
203
|
};
|
|
206
|
-
function
|
|
207
|
-
search:
|
|
208
|
-
label:
|
|
209
|
-
iconClass:
|
|
204
|
+
function Lt({
|
|
205
|
+
search: i,
|
|
206
|
+
label: c,
|
|
207
|
+
iconClass: q,
|
|
210
208
|
size: H,
|
|
211
|
-
onSelect:
|
|
209
|
+
onSelect: B
|
|
212
210
|
}) {
|
|
213
|
-
return
|
|
214
|
-
|
|
211
|
+
return ut((U) => U.filtered.count) > 0 ? null : /* @__PURE__ */ y(
|
|
212
|
+
S.Item,
|
|
215
213
|
{
|
|
216
|
-
value: `__combobox-create__${
|
|
214
|
+
value: `__combobox-create__${i}`,
|
|
217
215
|
keywords: [],
|
|
218
216
|
forceMount: !0,
|
|
219
|
-
onSelect: () =>
|
|
220
|
-
className:
|
|
217
|
+
onSelect: () => B(i),
|
|
218
|
+
className: Re({ size: H }),
|
|
221
219
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ r(
|
|
223
221
|
"span",
|
|
224
222
|
{
|
|
225
223
|
"aria-hidden": "true",
|
|
226
|
-
className: `ds:inline-flex ds:items-center ds:justify-center ${
|
|
224
|
+
className: `ds:inline-flex ds:items-center ds:justify-center ${q}`
|
|
227
225
|
}
|
|
228
226
|
),
|
|
229
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ r("span", { className: "ds:flex-1 ds:truncate", children: c })
|
|
230
228
|
]
|
|
231
229
|
}
|
|
232
230
|
);
|
|
233
231
|
}
|
|
234
|
-
const
|
|
232
|
+
const Ne = lt(
|
|
235
233
|
function({
|
|
236
|
-
options:
|
|
237
|
-
value:
|
|
234
|
+
options: c,
|
|
235
|
+
value: q,
|
|
238
236
|
defaultValue: H,
|
|
239
|
-
onValueChange:
|
|
240
|
-
placeholder:
|
|
241
|
-
clearable:
|
|
242
|
-
disabled:
|
|
243
|
-
readOnly:
|
|
244
|
-
required:
|
|
245
|
-
name:
|
|
246
|
-
id:
|
|
247
|
-
size:
|
|
248
|
-
tone:
|
|
249
|
-
filter:
|
|
250
|
-
allowCreate:
|
|
251
|
-
onCreate:
|
|
252
|
-
open:
|
|
253
|
-
onOpenChange:
|
|
237
|
+
onValueChange: B,
|
|
238
|
+
placeholder: ie,
|
|
239
|
+
clearable: U = !1,
|
|
240
|
+
disabled: Ee,
|
|
241
|
+
readOnly: we,
|
|
242
|
+
required: Ae,
|
|
243
|
+
name: _e,
|
|
244
|
+
id: ae,
|
|
245
|
+
size: A = "md",
|
|
246
|
+
tone: Ie = "default",
|
|
247
|
+
filter: K,
|
|
248
|
+
allowCreate: ke = !1,
|
|
249
|
+
onCreate: M,
|
|
250
|
+
open: le,
|
|
251
|
+
onOpenChange: R,
|
|
254
252
|
onQueryChange: a,
|
|
255
|
-
emptyMessage:
|
|
256
|
-
className:
|
|
257
|
-
"aria-label":
|
|
258
|
-
"aria-invalid":
|
|
259
|
-
"aria-describedby":
|
|
260
|
-
autoComplete:
|
|
261
|
-
matchAutofill:
|
|
262
|
-
wrapOptionLabels:
|
|
263
|
-
},
|
|
264
|
-
const { t:
|
|
265
|
-
value:
|
|
253
|
+
emptyMessage: Fe,
|
|
254
|
+
className: Ce,
|
|
255
|
+
"aria-label": G,
|
|
256
|
+
"aria-invalid": ze,
|
|
257
|
+
"aria-describedby": De,
|
|
258
|
+
autoComplete: D,
|
|
259
|
+
matchAutofill: ce,
|
|
260
|
+
wrapOptionLabels: de = !1
|
|
261
|
+
}, Te) {
|
|
262
|
+
const { t: _ } = ft("ui"), h = mt(), T = ct(pt) !== null, [Oe, O] = Et({
|
|
263
|
+
value: q,
|
|
266
264
|
defaultValue: H ?? "",
|
|
267
|
-
onChange:
|
|
268
|
-
}),
|
|
269
|
-
() =>
|
|
270
|
-
[
|
|
271
|
-
),
|
|
272
|
-
|
|
273
|
-
const [
|
|
274
|
-
|
|
275
|
-
if (!
|
|
276
|
-
|
|
265
|
+
onChange: B
|
|
266
|
+
}), p = Oe ?? "", N = te(
|
|
267
|
+
() => c.find((e) => e.value === p),
|
|
268
|
+
[c, p]
|
|
269
|
+
), m = (N == null ? void 0 : N.label) ?? "", [b, d] = L(m), [Pe, ue] = L(!1), P = le !== void 0, n = P ? le : Pe, I = f(!1), k = m !== "" && b === m, g = f(null), fe = f(null), V = f(null), [me, Ve] = L(null);
|
|
270
|
+
bt(h, g);
|
|
271
|
+
const [Le, $e] = L(0), pe = f(!1);
|
|
272
|
+
re(() => {
|
|
273
|
+
if (!pe.current) {
|
|
274
|
+
pe.current = !0;
|
|
277
275
|
return;
|
|
278
276
|
}
|
|
279
|
-
|
|
280
|
-
}, [
|
|
281
|
-
const
|
|
277
|
+
k && $e((e) => e + 1);
|
|
278
|
+
}, [k]);
|
|
279
|
+
const F = f(!1);
|
|
282
280
|
E(() => {
|
|
283
|
-
|
|
284
|
-
}, [
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const e =
|
|
289
|
-
|
|
281
|
+
F.current = !1;
|
|
282
|
+
}, [b, n]);
|
|
283
|
+
const W = f(!1), be = f(null);
|
|
284
|
+
re(() => {
|
|
285
|
+
var s;
|
|
286
|
+
const e = V.current;
|
|
287
|
+
if (e !== me || !n || !k || !p || e === be.current) return;
|
|
288
|
+
const t = e == null ? void 0 : e.querySelector(
|
|
289
|
+
`[data-option-id="${CSS.escape(p)}"]`
|
|
290
290
|
);
|
|
291
291
|
if (!e || !t) return;
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
be.current = e;
|
|
293
|
+
const o = () => {
|
|
294
|
+
if (F.current) return;
|
|
295
|
+
const v = e.getBoundingClientRect(), ye = t.getBoundingClientRect(), Se = e.offsetHeight > 0 ? v.height / e.offsetHeight : 1, ot = (ye.top - v.top) / (Se || 1), it = ye.height / (Se || 1);
|
|
296
|
+
e.scrollTop += ot - (e.clientHeight - it) / 2;
|
|
297
|
+
};
|
|
298
|
+
o();
|
|
299
|
+
const l = requestAnimationFrame(o);
|
|
300
|
+
W.current = !0;
|
|
294
301
|
try {
|
|
295
302
|
t.dispatchEvent(new PointerEvent("pointermove", { bubbles: !0 }));
|
|
296
303
|
} finally {
|
|
297
|
-
|
|
304
|
+
W.current = !1;
|
|
298
305
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
+
return (s = g.current) == null || s.setAttribute("aria-activedescendant", t.id), () => cancelAnimationFrame(l);
|
|
307
|
+
}, [n, me, k, p]);
|
|
308
|
+
const C = D && D !== "off" ? D : void 0, X = se(() => {
|
|
309
|
+
var t;
|
|
310
|
+
const e = g.current;
|
|
311
|
+
e && (e.setAttribute("aria-expanded", String(n)), n && ((t = V.current) != null && t.id) ? e.setAttribute("aria-controls", V.current.id) : n || (e.removeAttribute("aria-controls"), e.removeAttribute("aria-activedescendant")), C && e.setAttribute("autocomplete", C));
|
|
312
|
+
}, [n, C]);
|
|
313
|
+
re(X);
|
|
314
|
+
const je = se(
|
|
315
|
+
(e) => {
|
|
316
|
+
V.current = e, X(), e && Ve(e);
|
|
317
|
+
},
|
|
318
|
+
[X]
|
|
319
|
+
), Y = f(!1);
|
|
306
320
|
E(() => {
|
|
307
|
-
const e =
|
|
308
|
-
if (!e || !
|
|
309
|
-
const t = (
|
|
310
|
-
const l =
|
|
311
|
-
|
|
321
|
+
const e = g.current;
|
|
322
|
+
if (!e || !C) return;
|
|
323
|
+
const t = (o) => {
|
|
324
|
+
const l = o.inputType;
|
|
325
|
+
Y.current = !l || l === "insertReplacementText";
|
|
312
326
|
};
|
|
313
327
|
return e.addEventListener("input", t), () => e.removeEventListener("input", t);
|
|
314
|
-
}, [
|
|
315
|
-
|
|
316
|
-
}, [
|
|
317
|
-
const z = (
|
|
318
|
-
() => (e, t,
|
|
319
|
-
if (
|
|
320
|
-
const l = w(e), s = w(t),
|
|
321
|
-
return
|
|
328
|
+
}, [C]), E(() => {
|
|
329
|
+
n || d(m);
|
|
330
|
+
}, [m, n]);
|
|
331
|
+
const z = (T ? h.disabled : !1) || !!Ee, x = !!we, qe = (T ? h.required : !1) || !!Ae, ve = T ? h.invalid : !!ze, He = ve ? "error" : Ie, Be = T && h.describedBy ? h.describedBy : De, J = ie ?? _("inputs.combobox.placeholder", "Search…"), Ue = te(
|
|
332
|
+
() => (e, t, o) => {
|
|
333
|
+
if (I.current || m !== "" && t === m) return 1;
|
|
334
|
+
const l = w(e), s = w(t), v = o == null ? void 0 : o.map(w);
|
|
335
|
+
return K ? K(
|
|
322
336
|
l,
|
|
323
337
|
s,
|
|
324
|
-
(
|
|
325
|
-
) :
|
|
338
|
+
(v == null ? void 0 : v[0]) ?? ""
|
|
339
|
+
) : dt(
|
|
326
340
|
l,
|
|
327
341
|
s,
|
|
328
|
-
|
|
342
|
+
v
|
|
329
343
|
);
|
|
330
344
|
},
|
|
331
|
-
[
|
|
332
|
-
),
|
|
333
|
-
|
|
345
|
+
[K, m]
|
|
346
|
+
), Z = (e) => {
|
|
347
|
+
O(e);
|
|
334
348
|
}, u = (e) => {
|
|
335
|
-
|
|
336
|
-
},
|
|
337
|
-
const t =
|
|
338
|
-
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
-
},
|
|
349
|
+
P || ue(e), R == null || R(e);
|
|
350
|
+
}, Ke = (e) => {
|
|
351
|
+
const t = c.find((o) => o.value === e);
|
|
352
|
+
Z(e), d((t == null ? void 0 : t.label) ?? ""), u(!1);
|
|
353
|
+
}, Me = (e) => {
|
|
354
|
+
M == null || M(e), u(!1);
|
|
355
|
+
}, Ge = (e) => {
|
|
342
356
|
var l;
|
|
343
357
|
const t = w(e.trim());
|
|
344
358
|
if (!t) return;
|
|
345
|
-
const
|
|
359
|
+
const o = ce ? ce(e.trim()) : (l = c.find(
|
|
346
360
|
(s) => w(s.value) === t || w(s.label) === t
|
|
347
361
|
)) == null ? void 0 : l.value;
|
|
348
|
-
return
|
|
349
|
-
},
|
|
350
|
-
if (!
|
|
351
|
-
if (
|
|
352
|
-
|
|
353
|
-
const t =
|
|
362
|
+
return c.find((s) => s.value === o && !s.disabled);
|
|
363
|
+
}, We = (e) => {
|
|
364
|
+
if (!x) {
|
|
365
|
+
if (Y.current) {
|
|
366
|
+
Y.current = !1;
|
|
367
|
+
const t = Ge(e);
|
|
354
368
|
if (t) {
|
|
355
|
-
|
|
369
|
+
Z(t.value), d(t.label), n && u(!1);
|
|
356
370
|
return;
|
|
357
371
|
}
|
|
358
|
-
if (document.activeElement !==
|
|
359
|
-
|
|
372
|
+
if (document.activeElement !== g.current) {
|
|
373
|
+
d(m);
|
|
360
374
|
return;
|
|
361
375
|
}
|
|
362
376
|
}
|
|
363
|
-
|
|
377
|
+
d(e), I.current || a == null || a(e), !n && e.length > 0 && !I.current && u(!0);
|
|
364
378
|
}
|
|
365
|
-
},
|
|
366
|
-
!z && !
|
|
367
|
-
},
|
|
368
|
-
!
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
},
|
|
379
|
+
}, Xe = () => {
|
|
380
|
+
!z && !x && u(!0);
|
|
381
|
+
}, Ye = () => {
|
|
382
|
+
!n && !z && !x && u(!0);
|
|
383
|
+
}, Je = () => {
|
|
384
|
+
I.current = !0;
|
|
385
|
+
}, Ze = () => {
|
|
372
386
|
var t;
|
|
373
|
-
if (
|
|
374
|
-
const e = ((t =
|
|
375
|
-
|
|
376
|
-
},
|
|
387
|
+
if (I.current = !1, x) return;
|
|
388
|
+
const e = ((t = g.current) == null ? void 0 : t.value) ?? "";
|
|
389
|
+
d(e), a == null || a(e), e.length > 0 && u(!0);
|
|
390
|
+
}, Qe = (e) => {
|
|
377
391
|
if (!e.nativeEvent.isComposing) {
|
|
378
|
-
if ((e.key === "ArrowDown" || e.key === "ArrowUp") && !
|
|
392
|
+
if ((e.key === "ArrowDown" || e.key === "ArrowUp") && !n && !z && !x) {
|
|
379
393
|
e.preventDefault(), u(!0);
|
|
380
394
|
return;
|
|
381
395
|
}
|
|
382
396
|
if ((e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" || /* cmdk's own Ctrl+N, J, P and K move the highlight too. */
|
|
383
|
-
e.ctrlKey && ["n", "j", "p", "k"].includes(e.key)) && (
|
|
384
|
-
e.preventDefault(),
|
|
397
|
+
e.ctrlKey && ["n", "j", "p", "k"].includes(e.key)) && (F.current = !0), e.key === "Enter" && (!n || !F.current && (k || b === ""))) {
|
|
398
|
+
e.preventDefault(), n && u(!1);
|
|
385
399
|
return;
|
|
386
400
|
}
|
|
387
|
-
e.key === "Escape" &&
|
|
401
|
+
e.key === "Escape" && n && (e.preventDefault(), u(!1), d(m));
|
|
388
402
|
}
|
|
389
|
-
},
|
|
403
|
+
}, et = (e) => {
|
|
390
404
|
var t;
|
|
391
|
-
e.preventDefault(), e.stopPropagation(),
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
},
|
|
395
|
-
E(() => {
|
|
396
|
-
me.current = b;
|
|
397
|
-
}, [b]);
|
|
398
|
-
const pe = m(p);
|
|
405
|
+
e.preventDefault(), e.stopPropagation(), Z(""), d(""), a == null || a(""), u(!0), (t = g.current) == null || t.focus();
|
|
406
|
+
}, tt = (e) => {
|
|
407
|
+
x && e || (u(e), e || d(m));
|
|
408
|
+
}, he = f(p);
|
|
399
409
|
E(() => {
|
|
400
|
-
|
|
410
|
+
he.current = p;
|
|
401
411
|
}, [p]);
|
|
402
|
-
const
|
|
412
|
+
const ge = f(b);
|
|
403
413
|
E(() => {
|
|
404
|
-
|
|
405
|
-
}, [
|
|
406
|
-
const
|
|
414
|
+
ge.current = b;
|
|
415
|
+
}, [b]);
|
|
416
|
+
const xe = f(n);
|
|
417
|
+
E(() => {
|
|
418
|
+
xe.current = n;
|
|
419
|
+
}, [n]);
|
|
420
|
+
const Q = se(
|
|
407
421
|
(e) => {
|
|
408
|
-
|
|
422
|
+
P || ue(e), R == null || R(e);
|
|
409
423
|
},
|
|
410
|
-
[
|
|
411
|
-
),
|
|
424
|
+
[P, R]
|
|
425
|
+
), st = te(
|
|
412
426
|
() => ({
|
|
413
|
-
getValue: () =>
|
|
414
|
-
getQuery: () =>
|
|
415
|
-
getIsOpen: () =>
|
|
427
|
+
getValue: () => he.current || null,
|
|
428
|
+
getQuery: () => ge.current,
|
|
429
|
+
getIsOpen: () => xe.current,
|
|
416
430
|
setValue: (e) => {
|
|
417
431
|
const t = e ?? "";
|
|
418
|
-
|
|
419
|
-
const
|
|
420
|
-
|
|
432
|
+
O(t);
|
|
433
|
+
const o = c.find((l) => l.value === t);
|
|
434
|
+
d((o == null ? void 0 : o.label) ?? "");
|
|
421
435
|
},
|
|
422
436
|
setQuery: (e) => {
|
|
423
|
-
|
|
437
|
+
d(e), a == null || a(e);
|
|
424
438
|
},
|
|
425
439
|
clear: () => {
|
|
426
|
-
|
|
440
|
+
O(""), d(""), a == null || a("");
|
|
427
441
|
},
|
|
428
|
-
open: () =>
|
|
429
|
-
close: () =>
|
|
442
|
+
open: () => Q(!0),
|
|
443
|
+
close: () => Q(!1)
|
|
430
444
|
}),
|
|
431
|
-
[
|
|
445
|
+
[O, c, Q, a]
|
|
432
446
|
);
|
|
433
|
-
|
|
434
|
-
const
|
|
435
|
-
return /* @__PURE__ */
|
|
436
|
-
|
|
447
|
+
_t(Ft, st, ae);
|
|
448
|
+
const rt = U && !!p && !z && !x, nt = ht(c), ee = Vt[A];
|
|
449
|
+
return /* @__PURE__ */ r($.Root, { open: n, onOpenChange: tt, children: /* @__PURE__ */ y(
|
|
450
|
+
S,
|
|
437
451
|
{
|
|
438
|
-
filter:
|
|
452
|
+
filter: Ue,
|
|
439
453
|
shouldFilter: !0,
|
|
440
454
|
loop: !0,
|
|
441
|
-
label:
|
|
455
|
+
label: G ?? (h.label || J),
|
|
442
456
|
className: "ds:w-full",
|
|
443
457
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ r($.Anchor, { asChild: !0, children: /* @__PURE__ */ y(
|
|
445
459
|
"div",
|
|
446
460
|
{
|
|
447
|
-
ref:
|
|
448
|
-
className:
|
|
449
|
-
size:
|
|
450
|
-
tone:
|
|
451
|
-
className:
|
|
461
|
+
ref: fe,
|
|
462
|
+
className: zt({
|
|
463
|
+
size: A,
|
|
464
|
+
tone: He,
|
|
465
|
+
className: Ce
|
|
452
466
|
}),
|
|
453
467
|
"data-component": "combobox",
|
|
454
|
-
"data-component-id":
|
|
468
|
+
"data-component-id": ae,
|
|
455
469
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
|
|
470
|
+
/* @__PURE__ */ r(
|
|
471
|
+
S.Input,
|
|
458
472
|
{
|
|
459
|
-
ref:
|
|
460
|
-
value:
|
|
461
|
-
onValueChange:
|
|
462
|
-
dir:
|
|
463
|
-
name:
|
|
464
|
-
placeholder:
|
|
473
|
+
ref: vt(Te, g),
|
|
474
|
+
value: b,
|
|
475
|
+
onValueChange: We,
|
|
476
|
+
dir: N == null ? void 0 : N.dir,
|
|
477
|
+
name: _e,
|
|
478
|
+
placeholder: J,
|
|
465
479
|
disabled: z,
|
|
466
|
-
readOnly:
|
|
467
|
-
required:
|
|
468
|
-
autoComplete:
|
|
469
|
-
"aria-describedby":
|
|
470
|
-
"aria-invalid":
|
|
471
|
-
onFocus:
|
|
472
|
-
onClick:
|
|
473
|
-
onKeyDown:
|
|
474
|
-
onCompositionStart:
|
|
475
|
-
onCompositionEnd:
|
|
476
|
-
className:
|
|
480
|
+
readOnly: x,
|
|
481
|
+
required: qe,
|
|
482
|
+
autoComplete: D,
|
|
483
|
+
"aria-describedby": Be,
|
|
484
|
+
"aria-invalid": ve || void 0,
|
|
485
|
+
onFocus: Xe,
|
|
486
|
+
onClick: Ye,
|
|
487
|
+
onKeyDown: Qe,
|
|
488
|
+
onCompositionStart: Je,
|
|
489
|
+
onCompositionEnd: Ze,
|
|
490
|
+
className: Ct({ size: A })
|
|
477
491
|
}
|
|
478
492
|
),
|
|
479
|
-
|
|
493
|
+
rt ? /* @__PURE__ */ r(
|
|
480
494
|
"button",
|
|
481
495
|
{
|
|
482
496
|
type: "button",
|
|
483
|
-
"aria-label":
|
|
484
|
-
onClick:
|
|
497
|
+
"aria-label": _("inputs.combobox.clear", "Clear selection"),
|
|
498
|
+
onClick: et,
|
|
485
499
|
onPointerDown: (e) => e.stopPropagation(),
|
|
486
500
|
className: [
|
|
487
501
|
"ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]",
|
|
@@ -493,66 +507,72 @@ const he = Qe(
|
|
|
493
507
|
/* A 24px hit area with no visual change. */
|
|
494
508
|
"ds:relative ds:before:absolute ds:before:inset-[calc(var(--spacing-xs)*-1)] ds:before:content-['']"
|
|
495
509
|
].join(" "),
|
|
496
|
-
children: /* @__PURE__ */
|
|
510
|
+
children: /* @__PURE__ */ r(It, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
497
511
|
}
|
|
498
512
|
) : null
|
|
499
513
|
]
|
|
500
514
|
}
|
|
501
515
|
) }),
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
516
|
+
/* @__PURE__ */ r($.Portal, { forceMount: !0, children: n ? /* @__PURE__ */ r(
|
|
517
|
+
$.Content,
|
|
504
518
|
{
|
|
505
|
-
|
|
506
|
-
hidden: !i,
|
|
507
|
-
"aria-label": K ?? I("inputs.combobox.popupLabel", "Options"),
|
|
519
|
+
"aria-label": G ?? _("inputs.combobox.popupLabel", "Options"),
|
|
508
520
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
509
521
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
510
522
|
onInteractOutside: (e) => {
|
|
511
|
-
var
|
|
523
|
+
var o;
|
|
512
524
|
const t = e.target;
|
|
513
|
-
t && ((
|
|
525
|
+
t && ((o = fe.current) != null && o.contains(t)) && e.preventDefault();
|
|
514
526
|
},
|
|
515
527
|
sideOffset: 4,
|
|
516
528
|
align: "start",
|
|
517
|
-
className:
|
|
518
|
-
children: /* @__PURE__ */
|
|
519
|
-
|
|
529
|
+
className: Dt(),
|
|
530
|
+
children: /* @__PURE__ */ y(
|
|
531
|
+
S.List,
|
|
520
532
|
{
|
|
521
|
-
ref:
|
|
522
|
-
label:
|
|
523
|
-
className:
|
|
533
|
+
ref: je,
|
|
534
|
+
label: G ?? (h.label || J),
|
|
535
|
+
className: Ot,
|
|
524
536
|
onPointerMove: () => {
|
|
525
|
-
|
|
537
|
+
W.current || (F.current = !0);
|
|
526
538
|
},
|
|
527
539
|
onMouseDown: (e) => e.preventDefault(),
|
|
528
540
|
children: [
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
|
|
541
|
+
/* @__PURE__ */ r(S.Empty, { className: Pt, children: /* @__PURE__ */ r(
|
|
542
|
+
"div",
|
|
543
|
+
{
|
|
544
|
+
role: "option",
|
|
545
|
+
"aria-selected": !1,
|
|
546
|
+
"aria-disabled": "true",
|
|
547
|
+
children: Fe ?? _("inputs.combobox.empty", "No results found")
|
|
548
|
+
}
|
|
549
|
+
) }),
|
|
550
|
+
nt.map(({ group: e, items: t }, o) => {
|
|
531
551
|
const l = t.map((s) => {
|
|
532
|
-
const
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
|
|
552
|
+
const v = s.value === p;
|
|
553
|
+
return /* @__PURE__ */ y(
|
|
554
|
+
S.Item,
|
|
535
555
|
{
|
|
536
556
|
value: s.value,
|
|
537
557
|
"data-option-id": s.value,
|
|
538
558
|
keywords: [s.label],
|
|
539
559
|
disabled: s.disabled,
|
|
540
|
-
onSelect:
|
|
541
|
-
className:
|
|
560
|
+
onSelect: Ke,
|
|
561
|
+
className: Re({ size: A }),
|
|
542
562
|
children: [
|
|
543
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ r(
|
|
544
564
|
"span",
|
|
545
565
|
{
|
|
546
566
|
"aria-hidden": "true",
|
|
547
|
-
className: `ds:inline-flex ds:items-center ds:justify-center ${
|
|
548
|
-
children:
|
|
567
|
+
className: `ds:inline-flex ds:items-center ds:justify-center ${ee}`,
|
|
568
|
+
children: v ? /* @__PURE__ */ r(kt, { className: ee }) : null
|
|
549
569
|
}
|
|
550
570
|
),
|
|
551
571
|
s.startAdornment ? (
|
|
552
572
|
// Decorative by contract — the option's accessible
|
|
553
573
|
// name comes from its label. Hide so a text-bearing
|
|
554
574
|
// adornment can't leak into the computed name.
|
|
555
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ r(
|
|
556
576
|
"span",
|
|
557
577
|
{
|
|
558
578
|
"aria-hidden": "true",
|
|
@@ -561,23 +581,23 @@ const he = Qe(
|
|
|
561
581
|
}
|
|
562
582
|
)
|
|
563
583
|
) : null,
|
|
564
|
-
s.description ||
|
|
584
|
+
s.description || de ? (
|
|
565
585
|
// Stacked: the label and its end content on one
|
|
566
586
|
// row, the description on a line of its own
|
|
567
587
|
// under them. In this DOM order the option's
|
|
568
588
|
// name reads label, end content, description.
|
|
569
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ y(
|
|
570
590
|
"span",
|
|
571
591
|
{
|
|
572
|
-
className: `${
|
|
592
|
+
className: `${xt} ds:py-[var(--spacing-xs)]`,
|
|
573
593
|
children: [
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ y("span", { className: yt, children: [
|
|
595
|
+
/* @__PURE__ */ r(
|
|
576
596
|
"span",
|
|
577
597
|
{
|
|
578
598
|
dir: s.dir,
|
|
579
|
-
className:
|
|
580
|
-
wrap:
|
|
599
|
+
className: St({
|
|
600
|
+
wrap: de,
|
|
581
601
|
className: "ds:flex-1"
|
|
582
602
|
}),
|
|
583
603
|
children: s.label
|
|
@@ -585,13 +605,13 @@ const he = Qe(
|
|
|
585
605
|
),
|
|
586
606
|
s.endContent ? (
|
|
587
607
|
// Announced, as below.
|
|
588
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ r("span", { className: Rt, children: s.endContent })
|
|
589
609
|
) : null
|
|
590
610
|
] }),
|
|
591
|
-
s.description ? /* @__PURE__ */
|
|
611
|
+
s.description ? /* @__PURE__ */ r(
|
|
592
612
|
"span",
|
|
593
613
|
{
|
|
594
|
-
className:
|
|
614
|
+
className: Nt({
|
|
595
615
|
tone: s.descriptionTone
|
|
596
616
|
}),
|
|
597
617
|
children: s.description
|
|
@@ -600,8 +620,8 @@ const he = Qe(
|
|
|
600
620
|
]
|
|
601
621
|
}
|
|
602
622
|
)
|
|
603
|
-
) : /* @__PURE__ */
|
|
604
|
-
/* @__PURE__ */
|
|
623
|
+
) : /* @__PURE__ */ y(at, { children: [
|
|
624
|
+
/* @__PURE__ */ r(
|
|
605
625
|
"span",
|
|
606
626
|
{
|
|
607
627
|
dir: s.dir,
|
|
@@ -615,7 +635,7 @@ const he = Qe(
|
|
|
615
635
|
// (a price, a count) and must reach the
|
|
616
636
|
// option's accessible name. `ms-auto` pins it
|
|
617
637
|
// to the inline-end and flips under RTL.
|
|
618
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ r("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: s.endContent })
|
|
619
639
|
) : null
|
|
620
640
|
] })
|
|
621
641
|
]
|
|
@@ -623,46 +643,46 @@ const he = Qe(
|
|
|
623
643
|
`${s.value}\0${s.label}`
|
|
624
644
|
);
|
|
625
645
|
});
|
|
626
|
-
return e ? /* @__PURE__ */
|
|
627
|
-
|
|
646
|
+
return e ? /* @__PURE__ */ r(
|
|
647
|
+
S.Group,
|
|
628
648
|
{
|
|
629
|
-
heading: /* @__PURE__ */
|
|
649
|
+
heading: /* @__PURE__ */ r("span", { className: Tt, children: e }),
|
|
630
650
|
children: l
|
|
631
651
|
},
|
|
632
652
|
`group-${e}`
|
|
633
|
-
) : /* @__PURE__ */
|
|
653
|
+
) : /* @__PURE__ */ r(S.Group, { children: l }, `group-${o}`);
|
|
634
654
|
}),
|
|
635
|
-
|
|
636
|
-
|
|
655
|
+
ke && b.length > 0 ? /* @__PURE__ */ r(
|
|
656
|
+
Lt,
|
|
637
657
|
{
|
|
638
|
-
search:
|
|
639
|
-
label:
|
|
640
|
-
value:
|
|
658
|
+
search: b,
|
|
659
|
+
label: _("inputs.combobox.create", 'Create "{{value}}"', {
|
|
660
|
+
value: b
|
|
641
661
|
}),
|
|
642
|
-
iconClass:
|
|
643
|
-
size:
|
|
644
|
-
onSelect:
|
|
662
|
+
iconClass: ee,
|
|
663
|
+
size: A,
|
|
664
|
+
onSelect: Me
|
|
645
665
|
}
|
|
646
666
|
) : null
|
|
647
667
|
]
|
|
648
668
|
},
|
|
649
|
-
|
|
669
|
+
Le
|
|
650
670
|
)
|
|
651
671
|
}
|
|
652
|
-
) })
|
|
672
|
+
) : null })
|
|
653
673
|
]
|
|
654
674
|
}
|
|
655
675
|
) });
|
|
656
676
|
}
|
|
657
677
|
);
|
|
658
|
-
|
|
659
|
-
const
|
|
678
|
+
Ne.displayName = "Combobox";
|
|
679
|
+
const ss = Ne;
|
|
660
680
|
export {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
681
|
+
ss as C,
|
|
682
|
+
Dt as a,
|
|
683
|
+
Ct as b,
|
|
684
|
+
Ft as c,
|
|
685
|
+
Re as d,
|
|
686
|
+
zt as e
|
|
667
687
|
};
|
|
668
|
-
//# sourceMappingURL=combobox-
|
|
688
|
+
//# sourceMappingURL=combobox-D-gpgEDy.js.map
|