@alfadocs/ui-kit-debug 1.80.0 → 1.82.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-GnoSkvh6.js → address-fields-CfnXK8RT.js} +4 -4
- package/dist/_chunks/{address-fields-GnoSkvh6.js.map → address-fields-CfnXK8RT.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-M6u29f87.js → ai-prompt-input-DH_rnV-F.js} +33 -26
- package/dist/_chunks/{ai-prompt-input-M6u29f87.js.map → ai-prompt-input-DH_rnV-F.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-lONg-zja.js → anamnesis-summary-rows-6gMuu0ZK.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-lONg-zja.js.map → anamnesis-summary-rows-6gMuu0ZK.js.map} +1 -1
- package/dist/_chunks/{autocomplete-DosDnGie.js → autocomplete-CnB1mHGc.js} +65 -64
- package/dist/_chunks/{autocomplete-DosDnGie.js.map → autocomplete-CnB1mHGc.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-Dzd-Z_5W.js → balance-badge-cell-BHXJS8Ga.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-Dzd-Z_5W.js.map → balance-badge-cell-BHXJS8Ga.js.map} +1 -1
- package/dist/_chunks/{benefit-card-BWBClvdF.js → benefit-card-BcPtRHgM.js} +37 -36
- package/dist/_chunks/{benefit-card-BWBClvdF.js.map → benefit-card-BcPtRHgM.js.map} +1 -1
- package/dist/_chunks/booking-dsgiuhKg.js +4304 -0
- package/dist/_chunks/booking-dsgiuhKg.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-DhTTWgXw.js → calendar-appointment-editor-dialog-BuumJbcv.js} +4 -4
- package/dist/_chunks/{calendar-appointment-editor-dialog-DhTTWgXw.js.map → calendar-appointment-editor-dialog-BuumJbcv.js.map} +1 -1
- package/dist/_chunks/{city-input-3J3bz9EO.js → city-input-CJVGswxp.js} +2 -2
- package/dist/_chunks/{city-input-3J3bz9EO.js.map → city-input-CJVGswxp.js.map} +1 -1
- package/dist/_chunks/{combobox-vF9O-QoG.js → combobox-CDPm_n0p.js} +93 -92
- package/dist/_chunks/{combobox-vF9O-QoG.js.map → combobox-CDPm_n0p.js.map} +1 -1
- package/dist/_chunks/{command-palette-D9TBzmOG.js → command-palette-B3dVqm9D.js} +68 -68
- package/dist/_chunks/{command-palette-D9TBzmOG.js.map → command-palette-B3dVqm9D.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-DKk94l-d.js → contact-profile-card-Da1vmJQI.js} +115 -102
- package/dist/_chunks/contact-profile-card-Da1vmJQI.js.map +1 -0
- package/dist/_chunks/{country-select-CSE2Zm_s.js → country-select-DQ8q7ypA.js} +2 -2
- package/dist/_chunks/{country-select-CSE2Zm_s.js.map → country-select-DQ8q7ypA.js.map} +1 -1
- package/dist/_chunks/{face-scheme-BIPJqw9f.js → face-scheme-BgJGFDTa.js} +2 -2
- package/dist/_chunks/{face-scheme-BIPJqw9f.js.map → face-scheme-BgJGFDTa.js.map} +1 -1
- package/dist/_chunks/{header-settings-BYpVmLip.js → header-settings-CifwJEKB.js} +2 -2
- package/dist/_chunks/{header-settings-BYpVmLip.js.map → header-settings-CifwJEKB.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-B0riA_h_.js → link-cell-renderer-C0ynDik7.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-B0riA_h_.js.map → link-cell-renderer-C0ynDik7.js.map} +1 -1
- package/dist/_chunks/{locale-picker-DzdGDSBI.js → locale-picker-QbT1p60X.js} +39 -38
- package/dist/_chunks/{locale-picker-DzdGDSBI.js.map → locale-picker-QbT1p60X.js.map} +1 -1
- package/dist/_chunks/{map-view-C6MIVaqn.js → map-view-Bvi06RVh.js} +2 -2
- package/dist/_chunks/{map-view-C6MIVaqn.js.map → map-view-Bvi06RVh.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-mS7Q2-81.js → marketplace-app-shell-vON3WhD0.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-mS7Q2-81.js.map → marketplace-app-shell-vON3WhD0.js.map} +1 -1
- package/dist/_chunks/{multi-select-BOad3za9.js → multi-select-i5MFRpXg.js} +194 -187
- package/dist/_chunks/multi-select-i5MFRpXg.js.map +1 -0
- package/dist/_chunks/{otp-input-BgEZi0py.js → otp-input-gV1446Dw.js} +70 -70
- package/dist/_chunks/otp-input-gV1446Dw.js.map +1 -0
- package/dist/_chunks/{patient-details-B-I9Xkh9.js → patient-details-D0P5eog5.js} +2 -2
- package/dist/_chunks/{patient-details-B-I9Xkh9.js.map → patient-details-D0P5eog5.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-Bn0z6lAZ.js → patient-field-row-R73dZJY6.js} +5 -5
- package/dist/_chunks/{patient-field-row-Bn0z6lAZ.js.map → patient-field-row-R73dZJY6.js.map} +1 -1
- package/dist/_chunks/{patient-search-CxqNcth4.js → patient-search-Dy0sxcwv.js} +2 -2
- package/dist/_chunks/{patient-search-CxqNcth4.js.map → patient-search-Dy0sxcwv.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-bhDo0gVX.js → patient-summary-card-6U74-ivO.js} +2 -2
- package/dist/_chunks/{patient-summary-card-bhDo0gVX.js.map → patient-summary-card-6U74-ivO.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-AQpHOS1X.js → payment-automation-upsell-D1YdO1xY.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-AQpHOS1X.js.map → payment-automation-upsell-D1YdO1xY.js.map} +1 -1
- package/dist/_chunks/{phone-input-C3NrD-nl.js → phone-input-DJ4BN8tG.js} +70 -63
- package/dist/_chunks/{phone-input-C3NrD-nl.js.map → phone-input-DJ4BN8tG.js.map} +1 -1
- package/dist/_chunks/{practice-results-CtOanuzZ.js → practice-results-B61krlwu.js} +2 -2
- package/dist/_chunks/{practice-results-CtOanuzZ.js.map → practice-results-B61krlwu.js.map} +1 -1
- package/dist/_chunks/{province-select-CDjs5obD.js → province-select-CPdTwEob.js} +2 -2
- package/dist/_chunks/{province-select-CDjs5obD.js.map → province-select-CPdTwEob.js.map} +1 -1
- package/dist/_chunks/{registration-form-CNBfUduG.js → registration-form-DmP3YUfp.js} +3 -3
- package/dist/_chunks/{registration-form-CNBfUduG.js.map → registration-form-DmP3YUfp.js.map} +1 -1
- package/dist/_chunks/{send-registration-link-form-vTn1HxjA.js → send-registration-link-form-CZYOO7NO.js} +2 -2
- package/dist/_chunks/{send-registration-link-form-vTn1HxjA.js.map → send-registration-link-form-CZYOO7NO.js.map} +1 -1
- package/dist/_chunks/{task-editor-Cpw-NmND.js → task-editor-BOETWbjU.js} +2 -2
- package/dist/_chunks/{task-editor-Cpw-NmND.js.map → task-editor-BOETWbjU.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-lFUL4kkd.js → use-appointment-details-read-CWN-nJCZ.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-lFUL4kkd.js.map → use-appointment-details-read-CWN-nJCZ.js.map} +1 -1
- package/dist/agent-catalog.json +4 -4
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/ai-prompt-input/ai-prompt-input.d.ts.map +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/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/benefit-card/benefit-card.d.ts +7 -1
- package/dist/components/benefit-card/benefit-card.d.ts.map +1 -1
- package/dist/components/benefit-card/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +35 -2
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/code-step.d.ts +4 -2
- package/dist/components/booking/code-step.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts +2 -0
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/handover.d.ts +12 -0
- package/dist/components/booking/handover.d.ts.map +1 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/booking/reserved.d.ts +24 -0
- package/dist/components/booking/reserved.d.ts.map +1 -0
- package/dist/components/booking/use-booking-payment.d.ts +3 -1
- package/dist/components/booking/use-booking-payment.d.ts.map +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/command-palette/index.js +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts +4 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.d.ts +1 -1
- package/dist/components/otp-input/otp-input.d.ts.map +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/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +8 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +8 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +8 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +8 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +8 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +8 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +8 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +8 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +8 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +8 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +8 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +8 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +8 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +8 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +8 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +8 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +8 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +8 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +8 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +8 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +8 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +8 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +8 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +8 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +8 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +8 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +8 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +8 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +8 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +8 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +8 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +8 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +8 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +8 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +8 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +8 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +30 -30
- package/dist/locales/ar.json +8 -0
- package/dist/locales/de.json +8 -0
- package/dist/locales/el.json +8 -0
- package/dist/locales/en.json +8 -0
- package/dist/locales/es.json +8 -0
- package/dist/locales/fr.json +8 -0
- package/dist/locales/hi.json +8 -0
- package/dist/locales/it.json +8 -0
- package/dist/locales/ja.json +8 -0
- package/dist/locales/nl.json +8 -0
- package/dist/locales/pl.json +8 -0
- package/dist/locales/pt.json +8 -0
- package/dist/locales/ro.json +8 -0
- package/dist/locales/ru.json +8 -0
- package/dist/locales/sq.json +8 -0
- package/dist/locales/sv.json +8 -0
- package/dist/locales/tr.json +8 -0
- package/dist/locales/zh.json +8 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-By4I_1A-.js +0 -4068
- package/dist/_chunks/booking-By4I_1A-.js.map +0 -1
- package/dist/_chunks/contact-profile-card-DKk94l-d.js.map +0 -1
- package/dist/_chunks/multi-select-BOad3za9.js.map +0 -1
- package/dist/_chunks/otp-input-BgEZi0py.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as
|
|
1
|
+
import { jsx as r, jsxs as g, Fragment as tt } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as st, useContext as rt, useState as R, useRef as S, useId as nt, useMemo as T, useEffect as W, useCallback as fe } from "react";
|
|
3
|
+
import * as z from "@radix-ui/react-popover";
|
|
4
4
|
import { _ as c } from "./index-4xgbg-sn.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { u as
|
|
8
|
-
import { T as
|
|
9
|
-
import { c as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { g as
|
|
13
|
-
import { b as
|
|
14
|
-
import { O as
|
|
15
|
-
import { b as
|
|
16
|
-
import { u as
|
|
17
|
-
import { X as
|
|
18
|
-
import { C as
|
|
19
|
-
const
|
|
5
|
+
import { c as ve } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as it } from "react-i18next";
|
|
7
|
+
import { u as at, F as ot, b as lt } from "./form-field-context-DtiROUJV.js";
|
|
8
|
+
import { T as he } from "./tooltip-uEBdD1-5.js";
|
|
9
|
+
import { c as dt } from "./compose-refs-C0k0tdqF.js";
|
|
10
|
+
import { u as ct } from "./use-controllable-state-BiY4xTzM.js";
|
|
11
|
+
import { u as E } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
12
|
+
import { g as ut } from "./group-options-BvKhQ3xb.js";
|
|
13
|
+
import { b as ye } from "./menu-row-BAr8bx1I.js";
|
|
14
|
+
import { O as mt, a as pt, o as ft, b as ht, c as bt } from "./option-row-Dc7BrbK8.js";
|
|
15
|
+
import { b as X, c as gt } from "./input-surface-iBmxVBfr.js";
|
|
16
|
+
import { u as vt } from "./registry-DvAUVLHh.js";
|
|
17
|
+
import { X as yt } from "./x-B5YnXwCz.js";
|
|
18
|
+
import { C as St } from "./check-DrFSN__t.js";
|
|
19
|
+
const It = {
|
|
20
20
|
id: "multi-select",
|
|
21
21
|
// Persisted multi-choice (selection state + set_selection) → select_multiple,
|
|
22
22
|
// plus type-to-filter and open/close of the option list.
|
|
@@ -129,24 +129,24 @@ const yt = {
|
|
|
129
129
|
description: "Each option emits its value as data-option-id."
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
},
|
|
132
|
+
}, xt = ve(
|
|
133
133
|
[
|
|
134
134
|
"ds:inline-flex ds:flex-wrap ds:items-center ds:gap-1 ds:w-full",
|
|
135
|
-
|
|
135
|
+
gt,
|
|
136
136
|
"ds:aria-[invalid=true]:border-destructive",
|
|
137
137
|
"ds:aria-disabled:cursor-not-allowed ds:aria-disabled:opacity-50"
|
|
138
138
|
],
|
|
139
139
|
{
|
|
140
140
|
variants: {
|
|
141
141
|
size: {
|
|
142
|
-
sm: `ds:min-h-8 ds:ps-2 ds:pe-2 ds:py-1 ${
|
|
143
|
-
md: `ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:py-1.5 ${
|
|
144
|
-
lg: `ds:min-h-12 ds:ps-4 ds:pe-4 ds:py-2 ${
|
|
142
|
+
sm: `ds:min-h-8 ds:ps-2 ds:pe-2 ds:py-1 ${X.sm}`,
|
|
143
|
+
md: `ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:py-1.5 ${X.md}`,
|
|
144
|
+
lg: `ds:min-h-12 ds:ps-4 ds:pe-4 ds:py-2 ${X.lg}`
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
defaultVariants: { size: "md" }
|
|
148
148
|
}
|
|
149
|
-
),
|
|
149
|
+
), be = ve(
|
|
150
150
|
[
|
|
151
151
|
"ds:inline-flex ds:items-center ds:gap-1",
|
|
152
152
|
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-muted",
|
|
@@ -166,7 +166,7 @@ const yt = {
|
|
|
166
166
|
},
|
|
167
167
|
defaultVariants: { size: "md" }
|
|
168
168
|
}
|
|
169
|
-
),
|
|
169
|
+
), Nt = [
|
|
170
170
|
"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
|
|
171
171
|
"ds:rounded-[var(--radius-sm)]",
|
|
172
172
|
"ds:text-muted-foreground ds:hover:text-foreground",
|
|
@@ -175,7 +175,7 @@ const yt = {
|
|
|
175
175
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
176
176
|
"ds:size-4",
|
|
177
177
|
'ds:relative ds:before:absolute ds:before:inset-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""]'
|
|
178
|
-
].join(" "),
|
|
178
|
+
].join(" "), wt = [
|
|
179
179
|
"ds:z-[var(--z-dropdown)] ds:overflow-hidden",
|
|
180
180
|
// At least as wide as the field, at most as wide as the screen allows: a
|
|
181
181
|
// long option wraps or ends in an ellipsis instead of running off the
|
|
@@ -190,34 +190,34 @@ const yt = {
|
|
|
190
190
|
"ds:data-[side=bottom]:slide-in-from-top-2",
|
|
191
191
|
"ds:data-[side=top]:slide-in-from-bottom-2",
|
|
192
192
|
"ds:motion-reduce:animate-none"
|
|
193
|
-
].join(" "),
|
|
193
|
+
].join(" "), Ct = [
|
|
194
194
|
"ds:relative ds:flex ds:cursor-pointer ds:items-center",
|
|
195
195
|
"ds:rounded-[var(--radius-sm)] ds:ps-2 ds:pe-2 ds:py-1.5",
|
|
196
196
|
"ds:text-[var(--font-size-sm)] ds:text-foreground ds:outline-none ds:select-none",
|
|
197
|
-
|
|
197
|
+
ye.selected,
|
|
198
198
|
"ds:aria-[disabled=true]:pointer-events-none ds:aria-[disabled=true]:opacity-50",
|
|
199
199
|
"ds:data-[disabled=true]:pointer-events-none ds:data-[disabled=true]:opacity-50"
|
|
200
200
|
].join(" "), ge = [
|
|
201
201
|
"ds:relative ds:flex ds:cursor-pointer ds:items-center",
|
|
202
202
|
"ds:rounded-[var(--radius-sm)] ds:ps-2 ds:pe-2 ds:py-1.5",
|
|
203
203
|
"ds:text-[var(--font-size-sm)] ds:font-medium ds:text-primary ds:outline-none ds:select-none",
|
|
204
|
-
|
|
205
|
-
].join(" "),
|
|
204
|
+
ye.selected
|
|
205
|
+
].join(" "), At = "__ui-multiselect-select-all__", _t = "__ui-multiselect-clear-all__", Se = st(
|
|
206
206
|
function({
|
|
207
207
|
options: l,
|
|
208
|
-
value:
|
|
208
|
+
value: Ie,
|
|
209
209
|
defaultValue: xe,
|
|
210
|
-
onChange:
|
|
211
|
-
onComplete:
|
|
212
|
-
placeholder:
|
|
213
|
-
maxSelections:
|
|
214
|
-
allowSelectAll:
|
|
215
|
-
allowClear:
|
|
216
|
-
filter:
|
|
217
|
-
size:
|
|
218
|
-
disabled:
|
|
219
|
-
wrapOptionLabels:
|
|
220
|
-
className:
|
|
210
|
+
onChange: Ne,
|
|
211
|
+
onComplete: P,
|
|
212
|
+
placeholder: we,
|
|
213
|
+
maxSelections: x,
|
|
214
|
+
allowSelectAll: J = !1,
|
|
215
|
+
allowClear: Z = !1,
|
|
216
|
+
filter: B,
|
|
217
|
+
size: O = "md",
|
|
218
|
+
disabled: Ce,
|
|
219
|
+
wrapOptionLabels: ee = !1,
|
|
220
|
+
className: Ae,
|
|
221
221
|
id: j,
|
|
222
222
|
// Pull `aria-label` out of the div spread so it names the combobox
|
|
223
223
|
// INPUT (the interactive control) rather than the wrapper div. Lets a
|
|
@@ -226,86 +226,93 @@ const yt = {
|
|
|
226
226
|
// after its column). Untouched callers fall back to the placeholder.
|
|
227
227
|
// Inside a FormField the field's label names the input and this is
|
|
228
228
|
// ignored, so it can never override the visible text (WCAG 2.5.3).
|
|
229
|
-
"aria-label":
|
|
230
|
-
...
|
|
231
|
-
},
|
|
232
|
-
const { t: u } =
|
|
233
|
-
value:
|
|
229
|
+
"aria-label": te,
|
|
230
|
+
..._e
|
|
231
|
+
}, ke) {
|
|
232
|
+
const { t: u } = it("ui"), m = at(), I = rt(ot) !== null, [Re, K] = ct({
|
|
233
|
+
value: Ie,
|
|
234
234
|
defaultValue: xe ?? [],
|
|
235
|
-
onChange:
|
|
236
|
-
}), i =
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
onChange: Ne
|
|
236
|
+
}), i = Re ?? [], [w, p] = R(!1), [f, $] = R(""), v = S(null), se = `${nt()}-count`, N = S([]), F = S(null), Te = dt(ke, F), [Ee, Oe] = R(!1);
|
|
237
|
+
E(() => {
|
|
238
|
+
var e;
|
|
239
|
+
Oe(
|
|
240
|
+
!!((e = F.current) != null && e.closest("fieldset:disabled"))
|
|
241
|
+
);
|
|
242
|
+
});
|
|
243
|
+
const y = I && m.disabled || !!Ce || Ee, Fe = I && m.required, re = I && m.invalid, Ve = I && m.describedBy ? m.describedBy : void 0, Le = j ?? (I ? m.id : void 0);
|
|
244
|
+
lt(m, v);
|
|
245
|
+
const De = T(() => {
|
|
239
246
|
const e = /* @__PURE__ */ new Map();
|
|
240
247
|
for (const t of l) e.set(t.value, t.label);
|
|
241
248
|
return e;
|
|
242
|
-
}, [l]),
|
|
249
|
+
}, [l]), qe = T(() => {
|
|
243
250
|
const e = /* @__PURE__ */ new Map();
|
|
244
251
|
for (const t of l) e.set(t.value, t.dir);
|
|
245
252
|
return e;
|
|
246
|
-
}, [l]),
|
|
247
|
-
|
|
248
|
-
},
|
|
253
|
+
}, [l]), ne = typeof x == "number" && i.length >= x, C = (e) => {
|
|
254
|
+
K(e);
|
|
255
|
+
}, Me = (e) => {
|
|
249
256
|
if (i.includes(e)) {
|
|
250
257
|
C(i.filter((t) => t !== e));
|
|
251
258
|
return;
|
|
252
259
|
}
|
|
253
|
-
|
|
260
|
+
ne || C([...i, e]);
|
|
254
261
|
}, U = (e) => {
|
|
255
262
|
const t = i.filter((n, a) => a !== e);
|
|
256
263
|
return C(t), t;
|
|
257
|
-
},
|
|
258
|
-
const e = l.filter((n) => !n.disabled).map((n) => n.value), t = typeof
|
|
264
|
+
}, ze = () => {
|
|
265
|
+
const e = l.filter((n) => !n.disabled).map((n) => n.value), t = typeof x == "number" ? x : e.length;
|
|
259
266
|
C(e.slice(0, t));
|
|
260
|
-
},
|
|
267
|
+
}, Pe = () => {
|
|
261
268
|
C([]);
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
|
|
269
|
+
}, ie = S(i);
|
|
270
|
+
W(() => {
|
|
271
|
+
ie.current = i;
|
|
265
272
|
}, [i]);
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
273
|
+
const ae = S(f);
|
|
274
|
+
W(() => {
|
|
275
|
+
ae.current = f;
|
|
269
276
|
}, [f]);
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
277
|
+
const oe = S(w);
|
|
278
|
+
W(() => {
|
|
279
|
+
oe.current = w;
|
|
273
280
|
}, [w]);
|
|
274
|
-
const H =
|
|
281
|
+
const H = fe(
|
|
275
282
|
(e) => {
|
|
276
|
-
|
|
283
|
+
K(e);
|
|
277
284
|
},
|
|
278
|
-
[
|
|
279
|
-
),
|
|
285
|
+
[K]
|
|
286
|
+
), Be = T(
|
|
280
287
|
() => ({
|
|
281
|
-
getSelection: () => [...
|
|
282
|
-
getQuery: () =>
|
|
283
|
-
getIsOpen: () =>
|
|
288
|
+
getSelection: () => [...ie.current],
|
|
289
|
+
getQuery: () => ae.current,
|
|
290
|
+
getIsOpen: () => oe.current,
|
|
284
291
|
setSelection: (e) => H(e),
|
|
285
292
|
clearSelection: () => H([]),
|
|
286
|
-
setQuery: (e) =>
|
|
293
|
+
setQuery: (e) => $(e),
|
|
287
294
|
open: () => p(!0),
|
|
288
295
|
close: () => p(!1)
|
|
289
296
|
}),
|
|
290
297
|
[H]
|
|
291
298
|
);
|
|
292
|
-
|
|
293
|
-
const
|
|
299
|
+
vt(It, Be, j);
|
|
300
|
+
const le = we ?? u("inputs.multiSelect.placeholder", "Select…"), de = T(() => {
|
|
294
301
|
if (!f) return l;
|
|
295
302
|
const e = f.toLowerCase();
|
|
296
|
-
return l.filter((t) =>
|
|
297
|
-
}, [l, f,
|
|
298
|
-
() =>
|
|
303
|
+
return l.filter((t) => B ? B(f, t) : t.label.toLowerCase().includes(e));
|
|
304
|
+
}, [l, f, B]), je = T(
|
|
305
|
+
() => ut(de),
|
|
299
306
|
[de]
|
|
300
|
-
),
|
|
307
|
+
), Ke = (e) => {
|
|
301
308
|
var a;
|
|
302
309
|
const t = e.currentTarget;
|
|
303
310
|
if (e.key === "Backspace" && f === "" && i.length > 0) {
|
|
304
311
|
e.preventDefault();
|
|
305
312
|
const s = i.length - 1, d = U(s).length - 1;
|
|
306
313
|
d >= 0 && requestAnimationFrame(() => {
|
|
307
|
-
var
|
|
308
|
-
(
|
|
314
|
+
var b;
|
|
315
|
+
(b = N.current[d]) == null || b.focus();
|
|
309
316
|
});
|
|
310
317
|
return;
|
|
311
318
|
}
|
|
@@ -324,50 +331,50 @@ const yt = {
|
|
|
324
331
|
return;
|
|
325
332
|
}
|
|
326
333
|
!w && (e.key === "ArrowDown" || e.key === "Enter") && p(!0);
|
|
327
|
-
},
|
|
328
|
-
var h, d,
|
|
334
|
+
}, $e = (e) => (t) => {
|
|
335
|
+
var h, d, b, _;
|
|
329
336
|
if (t.key === "Backspace" || t.key === "Delete" || t.key === "Enter" || t.key === " ") {
|
|
330
337
|
t.preventDefault(), t.stopPropagation();
|
|
331
|
-
const
|
|
332
|
-
if (
|
|
338
|
+
const M = U(e);
|
|
339
|
+
if (M.length === 0) {
|
|
333
340
|
requestAnimationFrame(() => {
|
|
334
341
|
var k;
|
|
335
342
|
return (k = v.current) == null ? void 0 : k.focus();
|
|
336
343
|
});
|
|
337
344
|
return;
|
|
338
345
|
}
|
|
339
|
-
const
|
|
346
|
+
const et = Math.min(e, M.length - 1);
|
|
340
347
|
requestAnimationFrame(() => {
|
|
341
348
|
var k;
|
|
342
|
-
(k = N.current[
|
|
349
|
+
(k = N.current[et]) == null || k.focus();
|
|
343
350
|
});
|
|
344
351
|
return;
|
|
345
352
|
}
|
|
346
353
|
const n = document.dir === "rtl", a = n ? "ArrowRight" : "ArrowLeft", s = n ? "ArrowLeft" : "ArrowRight";
|
|
347
354
|
if (t.key === a) {
|
|
348
355
|
t.preventDefault();
|
|
349
|
-
const
|
|
350
|
-
(h = N.current[
|
|
356
|
+
const M = Math.max(0, e - 1);
|
|
357
|
+
(h = N.current[M]) == null || h.focus();
|
|
351
358
|
return;
|
|
352
359
|
}
|
|
353
360
|
if (t.key === s) {
|
|
354
|
-
t.preventDefault(), e < i.length - 1 ? (d = N.current[e + 1]) == null || d.focus() : (
|
|
361
|
+
t.preventDefault(), e < i.length - 1 ? (d = N.current[e + 1]) == null || d.focus() : (b = v.current) == null || b.focus();
|
|
355
362
|
return;
|
|
356
363
|
}
|
|
357
364
|
t.key === "Escape" && (p(!1), (_ = v.current) == null || _.focus());
|
|
358
|
-
}, [
|
|
365
|
+
}, [V, Y] = R(
|
|
359
366
|
Number.POSITIVE_INFINITY
|
|
360
|
-
), [
|
|
361
|
-
|
|
367
|
+
), [Ue, He] = R(0), ce = S(-1), L = fe(() => {
|
|
368
|
+
Y(Number.POSITIVE_INFINITY), He((e) => e + 1);
|
|
362
369
|
}, []);
|
|
363
|
-
|
|
364
|
-
const e =
|
|
370
|
+
E(() => {
|
|
371
|
+
const e = F.current;
|
|
365
372
|
if (!e) return;
|
|
366
373
|
const t = Array.from(
|
|
367
374
|
e.querySelectorAll('[data-ui-chip="true"]')
|
|
368
375
|
);
|
|
369
376
|
if (t.length === 0) {
|
|
370
|
-
|
|
377
|
+
Y(Number.POSITIVE_INFINITY);
|
|
371
378
|
return;
|
|
372
379
|
}
|
|
373
380
|
const n = t[0].offsetTop;
|
|
@@ -375,81 +382,81 @@ const yt = {
|
|
|
375
382
|
for (const s of t)
|
|
376
383
|
if (s.offsetTop === n) a++;
|
|
377
384
|
else break;
|
|
378
|
-
|
|
385
|
+
Y(
|
|
379
386
|
a === t.length ? Number.POSITIVE_INFINITY : Math.max(1, a - 1)
|
|
380
387
|
);
|
|
381
|
-
}, [
|
|
382
|
-
|
|
383
|
-
}, [i.length,
|
|
384
|
-
const e =
|
|
388
|
+
}, [Ue]), E(() => {
|
|
389
|
+
L();
|
|
390
|
+
}, [i.length, O, L]), E(() => {
|
|
391
|
+
const e = F.current;
|
|
385
392
|
if (!e) return;
|
|
386
393
|
const t = new ResizeObserver((n) => {
|
|
387
394
|
var s;
|
|
388
395
|
const a = Math.round(
|
|
389
396
|
((s = n[0]) == null ? void 0 : s.contentRect.width) ?? e.clientWidth
|
|
390
397
|
);
|
|
391
|
-
a !== ce.current && (ce.current = a,
|
|
398
|
+
a !== ce.current && (ce.current = a, L());
|
|
392
399
|
});
|
|
393
400
|
return t.observe(e), () => t.disconnect();
|
|
394
|
-
}, [
|
|
395
|
-
const
|
|
401
|
+
}, [L]);
|
|
402
|
+
const D = i.map((e) => ({
|
|
396
403
|
value: e,
|
|
397
|
-
label:
|
|
398
|
-
})), ue =
|
|
404
|
+
label: De.get(e) ?? e
|
|
405
|
+
})), ue = V === Number.POSITIVE_INFINITY || V >= D.length, Ye = ue ? D : D.slice(0, V), me = ue ? [] : D.slice(V), A = me.length, Ge = (e) => {
|
|
399
406
|
var n;
|
|
400
|
-
if (
|
|
407
|
+
if (y) return;
|
|
401
408
|
const t = e.target;
|
|
402
409
|
t.closest('[data-ui-chip="true"]') || t.closest('[data-ui-chip-dismiss="true"]') || (p(!0), (n = v.current) == null || n.focus());
|
|
403
|
-
},
|
|
404
|
-
if (
|
|
410
|
+
}, Qe = (e) => {
|
|
411
|
+
if (y) {
|
|
405
412
|
p(!1);
|
|
406
413
|
return;
|
|
407
414
|
}
|
|
408
|
-
p(e), e || (
|
|
409
|
-
},
|
|
415
|
+
p(e), e || ($(""), P == null || P(i));
|
|
416
|
+
}, We = J || Z, Xe = u("inputs.multiSelect.selected", {
|
|
410
417
|
count: i.length,
|
|
411
418
|
defaultValue: `${i.length} selected`
|
|
412
|
-
}),
|
|
413
|
-
|
|
419
|
+
}), pe = I && m.label || te || le, Je = [se, Ve].filter(Boolean).join(" "), G = I ? `${m.id}-label` : void 0, q = S(null);
|
|
420
|
+
E(() => {
|
|
414
421
|
const e = v.current;
|
|
415
422
|
if (!e) return;
|
|
416
423
|
const t = e.getAttribute("aria-labelledby");
|
|
417
|
-
if (
|
|
418
|
-
if (t ===
|
|
419
|
-
|
|
420
|
-
} else
|
|
424
|
+
if (G) {
|
|
425
|
+
if (t === G) return;
|
|
426
|
+
q.current = t, e.setAttribute("aria-labelledby", G);
|
|
427
|
+
} else q.current !== null && (e.setAttribute("aria-labelledby", q.current), q.current = null);
|
|
421
428
|
});
|
|
422
|
-
const { onClick:
|
|
423
|
-
return /* @__PURE__ */ r(c, { shouldFilter: !1, label:
|
|
424
|
-
/* @__PURE__ */ r(
|
|
429
|
+
const { onClick: Q, ...Ze } = _e;
|
|
430
|
+
return /* @__PURE__ */ r(c, { shouldFilter: !1, label: pe, children: /* @__PURE__ */ g(z.Root, { open: w, onOpenChange: Qe, children: [
|
|
431
|
+
/* @__PURE__ */ r(z.Anchor, { asChild: !0, children: /* @__PURE__ */ g(
|
|
425
432
|
"div",
|
|
426
433
|
{
|
|
427
|
-
ref:
|
|
428
|
-
className:
|
|
429
|
-
"aria-disabled":
|
|
430
|
-
"aria-invalid":
|
|
434
|
+
ref: Te,
|
|
435
|
+
className: xt({ size: O, className: Ae }),
|
|
436
|
+
"aria-disabled": y || void 0,
|
|
437
|
+
"aria-invalid": re || void 0,
|
|
431
438
|
"data-component": "multi-select",
|
|
432
439
|
"data-component-id": j,
|
|
433
440
|
onClick: (e) => {
|
|
434
|
-
|
|
441
|
+
Q == null || Q(e), Ge(e);
|
|
435
442
|
},
|
|
436
|
-
...
|
|
443
|
+
...Ze,
|
|
437
444
|
children: [
|
|
438
|
-
|
|
445
|
+
Ye.map((e, t) => (
|
|
439
446
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions -- chip pill receives focus via roving tabindex; chip removal uses an inner button
|
|
440
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ g(
|
|
441
448
|
"span",
|
|
442
449
|
{
|
|
443
450
|
ref: (n) => {
|
|
444
451
|
N.current[t] = n;
|
|
445
452
|
},
|
|
446
|
-
tabIndex:
|
|
453
|
+
tabIndex: y ? -1 : 0,
|
|
447
454
|
"data-ui-chip": "true",
|
|
448
|
-
className:
|
|
449
|
-
onKeyDown:
|
|
455
|
+
className: be({ size: O }),
|
|
456
|
+
onKeyDown: $e(t),
|
|
450
457
|
"aria-label": e.label,
|
|
451
458
|
children: [
|
|
452
|
-
/* @__PURE__ */ r("span", { dir:
|
|
459
|
+
/* @__PURE__ */ r("span", { dir: qe.get(e.value), children: e.label }),
|
|
453
460
|
/* @__PURE__ */ r(
|
|
454
461
|
"button",
|
|
455
462
|
{
|
|
@@ -460,15 +467,15 @@ const yt = {
|
|
|
460
467
|
label: e.label,
|
|
461
468
|
defaultValue: `Remove ${e.label}`
|
|
462
469
|
}),
|
|
463
|
-
disabled:
|
|
470
|
+
disabled: y,
|
|
464
471
|
onClick: (n) => {
|
|
465
472
|
n.stopPropagation(), U(t), requestAnimationFrame(() => {
|
|
466
473
|
var a;
|
|
467
474
|
return (a = v.current) == null ? void 0 : a.focus();
|
|
468
475
|
});
|
|
469
476
|
},
|
|
470
|
-
className:
|
|
471
|
-
children: /* @__PURE__ */ r(
|
|
477
|
+
className: Nt,
|
|
478
|
+
children: /* @__PURE__ */ r(yt, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
472
479
|
}
|
|
473
480
|
)
|
|
474
481
|
]
|
|
@@ -477,15 +484,15 @@ const yt = {
|
|
|
477
484
|
)
|
|
478
485
|
)),
|
|
479
486
|
A > 0 ? /* @__PURE__ */ r(
|
|
480
|
-
|
|
487
|
+
he,
|
|
481
488
|
{
|
|
482
489
|
label: me.map((e) => e.label).join(", "),
|
|
483
490
|
delayDuration: 200,
|
|
484
491
|
children: /* @__PURE__ */ r(
|
|
485
492
|
"span",
|
|
486
493
|
{
|
|
487
|
-
className:
|
|
488
|
-
tabIndex: 0,
|
|
494
|
+
className: be({ size: O }),
|
|
495
|
+
tabIndex: y ? -1 : 0,
|
|
489
496
|
role: "button",
|
|
490
497
|
"aria-label": u("inputs.multiSelect.overflow", {
|
|
491
498
|
count: A,
|
|
@@ -504,17 +511,17 @@ const yt = {
|
|
|
504
511
|
{
|
|
505
512
|
ref: v,
|
|
506
513
|
value: f,
|
|
507
|
-
onValueChange:
|
|
508
|
-
onKeyDown:
|
|
514
|
+
onValueChange: $,
|
|
515
|
+
onKeyDown: Ke,
|
|
509
516
|
onFocus: () => {
|
|
510
|
-
|
|
517
|
+
y || p(!0);
|
|
511
518
|
},
|
|
512
|
-
placeholder: i.length === 0 ?
|
|
513
|
-
id:
|
|
514
|
-
"aria-describedby":
|
|
515
|
-
"aria-invalid":
|
|
516
|
-
"aria-required":
|
|
517
|
-
disabled:
|
|
519
|
+
placeholder: i.length === 0 ? le : "",
|
|
520
|
+
id: Le,
|
|
521
|
+
"aria-describedby": Je,
|
|
522
|
+
"aria-invalid": re || void 0,
|
|
523
|
+
"aria-required": Fe || void 0,
|
|
524
|
+
disabled: y,
|
|
518
525
|
className: [
|
|
519
526
|
"ds:flex-1 ds:min-w-[6rem] ds:bg-transparent ds:outline-none",
|
|
520
527
|
"ds:placeholder:text-muted-foreground ds:text-start",
|
|
@@ -522,12 +529,12 @@ const yt = {
|
|
|
522
529
|
].join(" ")
|
|
523
530
|
}
|
|
524
531
|
),
|
|
525
|
-
/* @__PURE__ */ r("span", { id:
|
|
532
|
+
/* @__PURE__ */ r("span", { id: se, hidden: !0, children: Xe })
|
|
526
533
|
]
|
|
527
534
|
}
|
|
528
535
|
) }),
|
|
529
|
-
/* @__PURE__ */ r(
|
|
530
|
-
|
|
536
|
+
/* @__PURE__ */ r(z.Portal, { children: /* @__PURE__ */ r(
|
|
537
|
+
z.Content,
|
|
531
538
|
{
|
|
532
539
|
"data-component": "multi-select-list",
|
|
533
540
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
@@ -535,50 +542,50 @@ const yt = {
|
|
|
535
542
|
align: "start",
|
|
536
543
|
sideOffset: 4,
|
|
537
544
|
collisionPadding: 8,
|
|
538
|
-
className:
|
|
539
|
-
children: /* @__PURE__ */
|
|
545
|
+
className: wt,
|
|
546
|
+
children: /* @__PURE__ */ g(
|
|
540
547
|
c.List,
|
|
541
548
|
{
|
|
542
549
|
role: "listbox",
|
|
543
550
|
"aria-multiselectable": "true",
|
|
544
|
-
|
|
551
|
+
label: pe,
|
|
545
552
|
className: "ds:max-h-[20rem] ds:overflow-y-auto ds:p-1",
|
|
546
553
|
children: [
|
|
547
|
-
|
|
548
|
-
|
|
554
|
+
We ? /* @__PURE__ */ g(c.Group, { children: [
|
|
555
|
+
J ? /* @__PURE__ */ r(
|
|
549
556
|
c.Item,
|
|
550
557
|
{
|
|
551
|
-
value:
|
|
552
|
-
onSelect:
|
|
558
|
+
value: At,
|
|
559
|
+
onSelect: ze,
|
|
553
560
|
className: ge,
|
|
554
561
|
children: u("inputs.multiSelect.selectAll", "Select all")
|
|
555
562
|
}
|
|
556
563
|
) : null,
|
|
557
|
-
|
|
564
|
+
Z ? /* @__PURE__ */ r(
|
|
558
565
|
c.Item,
|
|
559
566
|
{
|
|
560
|
-
value:
|
|
561
|
-
onSelect:
|
|
567
|
+
value: _t,
|
|
568
|
+
onSelect: Pe,
|
|
562
569
|
className: ge,
|
|
563
570
|
children: u("inputs.multiSelect.clearAll", "Clear all")
|
|
564
571
|
}
|
|
565
572
|
) : null
|
|
566
573
|
] }) : null,
|
|
567
574
|
/* @__PURE__ */ r(c.Empty, { className: "ds:ps-2 ds:pe-2 ds:py-2 type-body-sm ds:text-muted-foreground", children: u("inputs.multiSelect.noOptions", "No options found") }),
|
|
568
|
-
|
|
575
|
+
je.map(({ group: e, items: t }, n) => {
|
|
569
576
|
const a = t.map((s) => {
|
|
570
|
-
const h = i.includes(s.value), d = !h &&
|
|
577
|
+
const h = i.includes(s.value), d = !h && ne, b = !!s.disabled || d, _ = /* @__PURE__ */ g(
|
|
571
578
|
c.Item,
|
|
572
579
|
{
|
|
573
580
|
value: s.value,
|
|
574
581
|
"data-option-id": s.value,
|
|
575
|
-
disabled:
|
|
582
|
+
disabled: b,
|
|
576
583
|
onSelect: () => {
|
|
577
|
-
|
|
584
|
+
b || Me(s.value);
|
|
578
585
|
},
|
|
579
586
|
"aria-selected": h,
|
|
580
|
-
"aria-disabled":
|
|
581
|
-
className:
|
|
587
|
+
"aria-disabled": b || void 0,
|
|
588
|
+
className: Ct,
|
|
582
589
|
children: [
|
|
583
590
|
/* @__PURE__ */ r(
|
|
584
591
|
"span",
|
|
@@ -589,7 +596,7 @@ const yt = {
|
|
|
589
596
|
h ? "ds:bg-primary ds:border-primary ds:text-primary-foreground" : "ds:bg-background ds:border-[color:var(--control-border)]"
|
|
590
597
|
].join(" "),
|
|
591
598
|
"aria-hidden": "true",
|
|
592
|
-
children: h ? /* @__PURE__ */ r(
|
|
599
|
+
children: h ? /* @__PURE__ */ r(St, { className: "ds:size-3.5" }) : null
|
|
593
600
|
}
|
|
594
601
|
),
|
|
595
602
|
s.startAdornment ? (
|
|
@@ -604,18 +611,18 @@ const yt = {
|
|
|
604
611
|
}
|
|
605
612
|
)
|
|
606
613
|
) : null,
|
|
607
|
-
s.description ||
|
|
614
|
+
s.description || ee ? (
|
|
608
615
|
// Stacked, as in Combobox: the label and its end
|
|
609
616
|
// content on one row, the description under them.
|
|
610
617
|
// The option's name reads in that order.
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ g("span", { className: mt, children: [
|
|
619
|
+
/* @__PURE__ */ g("span", { className: pt, children: [
|
|
613
620
|
/* @__PURE__ */ r(
|
|
614
621
|
"span",
|
|
615
622
|
{
|
|
616
623
|
dir: s.dir,
|
|
617
|
-
className:
|
|
618
|
-
wrap:
|
|
624
|
+
className: ft({
|
|
625
|
+
wrap: ee,
|
|
619
626
|
className: "ds:flex-1 ds:text-start"
|
|
620
627
|
}),
|
|
621
628
|
children: s.label
|
|
@@ -623,13 +630,13 @@ const yt = {
|
|
|
623
630
|
),
|
|
624
631
|
s.endContent ? (
|
|
625
632
|
// Announced, as below.
|
|
626
|
-
/* @__PURE__ */ r("span", { className:
|
|
633
|
+
/* @__PURE__ */ r("span", { className: ht, children: s.endContent })
|
|
627
634
|
) : null
|
|
628
635
|
] }),
|
|
629
636
|
s.description ? /* @__PURE__ */ r(
|
|
630
637
|
"span",
|
|
631
638
|
{
|
|
632
|
-
className:
|
|
639
|
+
className: bt({
|
|
633
640
|
tone: s.descriptionTone,
|
|
634
641
|
className: "ds:text-start"
|
|
635
642
|
}),
|
|
@@ -637,7 +644,7 @@ const yt = {
|
|
|
637
644
|
}
|
|
638
645
|
) : null
|
|
639
646
|
] })
|
|
640
|
-
) : /* @__PURE__ */
|
|
647
|
+
) : /* @__PURE__ */ g(tt, { children: [
|
|
641
648
|
/* @__PURE__ */ r(
|
|
642
649
|
"span",
|
|
643
650
|
{
|
|
@@ -660,11 +667,11 @@ const yt = {
|
|
|
660
667
|
s.value
|
|
661
668
|
);
|
|
662
669
|
return d ? /* @__PURE__ */ r(
|
|
663
|
-
|
|
670
|
+
he,
|
|
664
671
|
{
|
|
665
672
|
label: u("inputs.multiSelect.maxReached", {
|
|
666
|
-
count:
|
|
667
|
-
defaultValue: `Maximum ${
|
|
673
|
+
count: x,
|
|
674
|
+
defaultValue: `Maximum ${x} selections`
|
|
668
675
|
}),
|
|
669
676
|
delayDuration: 200,
|
|
670
677
|
children: _
|
|
@@ -690,11 +697,11 @@ const yt = {
|
|
|
690
697
|
] }) });
|
|
691
698
|
}
|
|
692
699
|
);
|
|
693
|
-
|
|
694
|
-
const
|
|
700
|
+
Se.displayName = "MultiSelect";
|
|
701
|
+
const Ut = Se;
|
|
695
702
|
export {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
703
|
+
Ut as M,
|
|
704
|
+
xt as a,
|
|
705
|
+
It as m
|
|
699
706
|
};
|
|
700
|
-
//# sourceMappingURL=multi-select-
|
|
707
|
+
//# sourceMappingURL=multi-select-i5MFRpXg.js.map
|