asma-ui-core 3.128.2 → 3.130.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.
Files changed (34) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/widget/widget/StyledWidget.js +4 -4
  3. package/dist/components/data-display/card/Card.js +327 -0
  4. package/dist/components/data-display/card/Card.module.js +7 -0
  5. package/dist/components/data-display/card/Card.types.js +21 -0
  6. package/dist/components/data-display/card/CardList.js +85 -0
  7. package/dist/components/data-display/card/CardParts.js +97 -0
  8. package/dist/components/data-display/card/cardModel.js +46 -0
  9. package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +4 -4
  10. package/dist/components/feedback/dialog/StyledDialog.js +5 -5
  11. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +7 -7
  12. package/dist/components/inputs/button/StyledButton.js +1 -1
  13. package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +4 -4
  14. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +1 -1
  15. package/dist/components/inputs/emoji-choice/StyledEmojiChoice.js +184 -150
  16. package/dist/components/inputs/emoji-choice/StyledEmojiChoice.module.js +22 -21
  17. package/dist/components/inputs/phone-field/CountryCodeSelect.js +4 -4
  18. package/dist/components/inputs/select-autocomplete/SelectAutocompletePicker.js +1 -1
  19. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +4 -4
  20. package/dist/components/navigation/menu/StyledMenuList.js +1 -1
  21. package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +9 -9
  22. package/dist/components/utils/popover/PopoverSheet.js +10 -10
  23. package/dist/index.js +632 -619
  24. package/dist/src/components/data-display/card/Card.d.ts +9 -0
  25. package/dist/src/components/data-display/card/Card.types.d.ts +193 -0
  26. package/dist/src/components/data-display/card/CardList.d.ts +45 -0
  27. package/dist/src/components/data-display/card/CardParts.d.ts +44 -0
  28. package/dist/src/components/data-display/card/cardModel.d.ts +61 -0
  29. package/dist/src/components/data-display/card/cardModel.test.d.ts +1 -0
  30. package/dist/src/components/data-display/card/index.d.ts +5 -0
  31. package/dist/src/components/data-display/card/story/cardStoryFixtures.d.ts +95 -0
  32. package/dist/src/components/inputs/emoji-choice/StyledEmojiChoice.d.ts +5 -0
  33. package/dist/src/index.d.ts +1 -0
  34. package/package.json +1 -1
@@ -2,9 +2,9 @@ import { cn as n } from "../../../../helpers/cn.js";
2
2
  import { firstTabbable as A } from "../../../../helpers/focusable.js";
3
3
  import { StyledTooltip as le } from "../../../data-display/tooltip/StyledTooltip.js";
4
4
  import { DialogBusyContext as L, useDialogBusyBoundary as ie } from "../../dialog/DialogBusyContext.js";
5
- import { useMobileMediaQuery as oe } from "../../../../hooks/useMediaQuery.hook.js";
6
- import { OverlayBackOwnerContext as ae, isOverlayBackNavigationPending as re, useBackCloses as se } from "../../../../hooks/useBackCloses.hook.js";
7
- import { useFocusTrap as ce } from "../../../../hooks/useFocusTrap.hook.js";
5
+ import { OverlayBackOwnerContext as oe, isOverlayBackNavigationPending as ae, useBackCloses as re } from "../../../../hooks/useBackCloses.hook.js";
6
+ import { useFocusTrap as se } from "../../../../hooks/useFocusTrap.hook.js";
7
+ import { useMobileMediaQuery as ce } from "../../../../hooks/useMediaQuery.hook.js";
8
8
  import { fullScreenFieldWidthVars as me } from "../../../inputs/field-styles.js";
9
9
  import { CloseBtn as V } from "../components/CloseBtn.js";
10
10
  import { MinimizeBtn as $ } from "../components/MinimizeBtn.js";
@@ -20,7 +20,7 @@ var Pe = (C) => {
20
20
  maximized: "",
21
21
  minimized: "",
22
22
  fullscreen: ""
23
- }, dataTest: K, actionNode: X, locale: Y = "en", busyReason: Z, style: k, initialFocusRef: B } = C, r = oe(), i = ue(Y), o = m(null), f = m(null), F = m(null), S = m(null), w = m(!1), y = m(null), p = W(), T = W(), { minimized: t, setMinimized: I, fullScreen: s, setFullScreen: M } = xe(C), c = s && !t, j = !!N, { busy: g, busyReason: E, contextValue: P } = ie(Z ?? i.waitUntilSaved), h = () => {
23
+ }, dataTest: K, actionNode: X, locale: Y = "en", busyReason: Z, style: k, initialFocusRef: B } = C, r = ce(), i = ue(Y), o = m(null), f = m(null), F = m(null), S = m(null), w = m(!1), y = m(null), p = W(), T = W(), { minimized: t, setMinimized: I, fullScreen: s, setFullScreen: M } = xe(C), c = s && !t, j = !!N, { busy: g, busyReason: E, contextValue: P } = ie(Z ?? i.waitUntilSaved), h = () => {
24
24
  if (g) return !1;
25
25
  I(!1), J();
26
26
  };
@@ -49,9 +49,9 @@ var Pe = (C) => {
49
49
  d && (d.querySelector('[data-testid="toggle-minimize-btn"]') ?? A(d))?.focus({ preventScroll: !0 });
50
50
  });
51
51
  };
52
- ce(l && c, o, h), se({
52
+ se(l && c, o, h), re({
53
53
  active: l && !t,
54
- requestClose: () => !c && re() ? !1 : h(),
54
+ requestClose: () => !c && ae() ? !1 : h(),
55
55
  ownerRef: o
56
56
  });
57
57
  const ee = c ? r ? {
@@ -129,7 +129,7 @@ var Pe = (C) => {
129
129
  "aria-modal": c ? !0 : void 0,
130
130
  "aria-labelledby": te,
131
131
  className: n(v.dialog, t && v.hidden, !s && b.maximized, s && b.fullscreen, c && "fixed z-[53] duration-0"),
132
- children: /* @__PURE__ */ a(ae.Provider, {
132
+ children: /* @__PURE__ */ a(oe.Provider, {
133
133
  value: o,
134
134
  children: [/* @__PURE__ */ a("div", {
135
135
  className: n("flex flex-col border-b-[1px] border-delta-200 px-4", r ? "py-3" : "py-4"),
@@ -1,6 +1,6 @@
1
1
  import { StyledTooltip as O } from "../../data-display/tooltip/StyledTooltip.js";
2
- import { LoadingIcon as W } from "../../icons/loading-icon/LoadingIcon.js";
3
2
  import e from "./StyledButton.module.js";
3
+ import { LoadingIcon as W } from "../../icons/loading-icon/LoadingIcon.js";
4
4
  import { useReportDialogBusy as _ } from "../../feedback/dialog/DialogBusyContext.js";
5
5
  import y from "clsx";
6
6
  import "react";
@@ -2,9 +2,9 @@ import { cn as v } from "../../../../helpers/cn.js";
2
2
  import { StyledTooltip as X } from "../../../data-display/tooltip/StyledTooltip.js";
3
3
  import { CloseIcon as j } from "../../../icons/close-icon/CloseIcon.js";
4
4
  import { ErrorOutlineIcon as Y } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
5
- import { StyledChip as Z } from "../../../data-display/chip/StyledChip.js";
5
+ import { StyledButton as Z } from "../../button/StyledButton.js";
6
+ import { StyledChip as _ } from "../../../data-display/chip/StyledChip.js";
6
7
  import { StyledInteractiveChip as O } from "../../../data-display/interactive-chip/StyledInteractiveChip.js";
7
- import { StyledButton as _ } from "../../button/StyledButton.js";
8
8
  import { useHelperSlot as ee } from "../../../../helpers/useHelperSlot.js";
9
9
  import { fieldWidthStyle as te } from "../../field-styles.js";
10
10
  import { useWrap as le } from "../helpers/useWrap.js";
@@ -71,7 +71,7 @@ var ve = ae((V, D) => {
71
71
  arrow: !0,
72
72
  children: /* @__PURE__ */ t("span", {
73
73
  className: v(h && "cursor-not-allowed"),
74
- children: i && !y ? /* @__PURE__ */ t(Z, {
74
+ children: i && !y ? /* @__PURE__ */ t(_, {
75
75
  ref: k,
76
76
  disabled: !!x || h,
77
77
  classes: { root: "min-h-[32px] h-full" },
@@ -98,7 +98,7 @@ var ve = ae((V, D) => {
98
98
  }, c(e));
99
99
  }) : /* @__PURE__ */ t("span", { children: "-" })
100
100
  }),
101
- !R && J && !i && !x && /* @__PURE__ */ t(_, {
101
+ !R && J && !i && !x && /* @__PURE__ */ t(Z, {
102
102
  dataTest: "clear-selection-btn",
103
103
  variant: "text",
104
104
  startIcon: w === "medium" ? /* @__PURE__ */ t(j, {
@@ -3,8 +3,8 @@ import { StyledTooltip as E } from "../../../data-display/tooltip/StyledTooltip.
3
3
  import { LoadingIcon as ie } from "../../../icons/loading-icon/LoadingIcon.js";
4
4
  import { CheckIcon as ae } from "../../../icons/check-icon/CheckIcon.js";
5
5
  import { PlusIconCircle as oe } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
6
- import { StyledChip as F } from "../../../data-display/chip/StyledChip.js";
7
6
  import { StyledCheckbox as ne } from "../../checkbox/base-ui/StyledCheckbox.js";
7
+ import { StyledChip as F } from "../../../data-display/chip/StyledChip.js";
8
8
  import { fieldWidthStyle as de } from "../../field-styles.js";
9
9
  import { StyledInputField as se } from "../../input-field/StyledInputField.js";
10
10
  import { StyledSelectAutocomplete as ce } from "../../select-autocomplete/StyledSelectAutocomplete.js";
@@ -1,31 +1,34 @@
1
1
  import { cn as u } from "../../../helpers/cn.js";
2
- import { ChevronDownIcon as P } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
- import { StyledRadio as $ } from "../radio-button/base-ui/StyledRadio.js";
4
- import { StyledButton as x } from "../button/StyledButton.js";
5
- import { HelperRow as H } from "../../../helpers/HelperRow.js";
6
- import { useHelperSlot as q } from "../../../helpers/useHelperSlot.js";
7
- import { StyledInputField as D } from "../input-field/StyledInputField.js";
8
- import { getPickerText as L } from "../full-screen-picker/pickerCopy.js";
9
- import { StyledSelectAutocomplete as F } from "../select-autocomplete/StyledSelectAutocomplete.js";
2
+ import { ChevronDownIcon as L } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
+ import { CloseIcon as F } from "../../icons/close-icon/CloseIcon.js";
4
+ import { StyledButton as q } from "../button/StyledButton.js";
5
+ import { StyledRadio as T } from "../radio-button/base-ui/StyledRadio.js";
6
+ import { HelperRow as M } from "../../../helpers/HelperRow.js";
7
+ import { useHelperSlot as V } from "../../../helpers/useHelperSlot.js";
8
+ import { StyledInputField as K } from "../input-field/StyledInputField.js";
9
+ import { getPickerText as X } from "../full-screen-picker/pickerCopy.js";
10
+ import { StyledSelectAutocomplete as B } from "../select-autocomplete/StyledSelectAutocomplete.js";
10
11
  import a from "./StyledEmojiChoice.module.js";
11
- import { useId as j, useRef as M, useState as T } from "react";
12
+ import { useId as w, useRef as E, useState as x } from "react";
12
13
  import { jsx as l, jsxs as f } from "react/jsx-runtime";
13
- var V = {
14
+ var G = {
14
15
  en: {
15
16
  noAnswer: "No answer",
16
17
  showAllOptions: (e) => `Show all options (${e})`,
17
18
  hideOptions: "Hide options",
18
19
  selected: "selected",
19
- option: (e) => `Option ${e}`
20
+ option: (e) => `Option ${e}`,
21
+ clearSelection: "Clear selection"
20
22
  },
21
23
  no: {
22
24
  noAnswer: "Ingen svar",
23
25
  showAllOptions: (e) => `Vis alle alternativ (${e})`,
24
26
  hideOptions: "Skjul alternativ",
25
27
  selected: "valgt",
26
- option: (e) => `Alternativ ${e}`
28
+ option: (e) => `Alternativ ${e}`,
29
+ clearSelection: "Fjern valget"
27
30
  }
28
- }, K = 5, C = (e, n, h) => e.label ? e.label : e.emoji ? e.emoji : h.option(n), R = ({ option: e, className: n }) => e.emoji ? /* @__PURE__ */ l("span", {
31
+ }, z = 5, R = (e, n, o) => e.label ? e.label : e.emoji ? e.emoji : o.option(n), H = ({ option: e, className: n }) => e.emoji ? /* @__PURE__ */ l("span", {
29
32
  "aria-hidden": "true",
30
33
  className: n,
31
34
  children: e.emoji
@@ -33,15 +36,15 @@ var V = {
33
36
  alt: "",
34
37
  src: e.emojiImageSrc,
35
38
  className: n
36
- }) : null, S = ({ option: e, position: n, text: h, radio: N }) => {
37
- const p = !!e.emoji || !!e.emojiImageSrc;
39
+ }) : null, $ = ({ option: e, position: n, text: o, radio: h }) => {
40
+ const m = !!e.emoji || !!e.emojiImageSrc;
38
41
  return /* @__PURE__ */ f("span", {
39
- className: u(a.content, !p && a.noEmoji),
42
+ className: u(a.content, !m && a.noEmoji),
40
43
  children: [/* @__PURE__ */ f("span", {
41
44
  className: a.lead,
42
- children: [N, p && /* @__PURE__ */ l("span", {
45
+ children: [h, m && /* @__PURE__ */ l("span", {
43
46
  className: a.emojiSlot,
44
- children: /* @__PURE__ */ l(R, {
47
+ children: /* @__PURE__ */ l(H, {
45
48
  option: e,
46
49
  className: a.emoji
47
50
  })
@@ -51,209 +54,240 @@ var V = {
51
54
  children: e.label
52
55
  }) : /* @__PURE__ */ l("span", {
53
56
  className: "sr-only",
54
- children: C(e, n, h)
57
+ children: R(e, n, o)
55
58
  })]
56
59
  });
57
- }, X = (e) => {
60
+ }, D = ({ dataTest: e, text: n, onClear: o, focusAfter: h }) => /* @__PURE__ */ l(q, {
61
+ dataTest: `${e}-clear`,
62
+ variant: "text",
63
+ type: "button",
64
+ className: a.clear,
65
+ startIcon: /* @__PURE__ */ l(F, {
66
+ width: 24,
67
+ height: 24
68
+ }),
69
+ onClick: () => {
70
+ o(), h()?.focus({ preventScroll: !0 });
71
+ },
72
+ children: n.clearSelection
73
+ }), J = (e) => {
58
74
  e.key === "Enter" && (e.preventDefault(), e.currentTarget.click());
59
- }, B = ({ dataTest: e, options: n, value: h, onValueChange: N, question: p, "aria-labelledby": y, name: m, error: o, helperText: b, className: O, text: w }) => {
60
- const v = j(), c = j(), { show: s, role: g } = q("StyledEmojiChoice", o, b);
75
+ }, Q = ({ dataTest: e, options: n, value: o, onValueChange: h, onClear: m, question: O, "aria-labelledby": c, name: p, error: N, helperText: y, className: g, text: b }) => {
76
+ const d = w(), s = w(), v = E(null), { show: S, role: A } = V("StyledEmojiChoice", N, y), I = n.some((r) => r.value === o);
61
77
  return /* @__PURE__ */ f("fieldset", {
78
+ ref: v,
79
+ tabIndex: -1,
62
80
  role: "group",
63
- "aria-labelledby": y,
64
- "aria-describedby": s ? c : void 0,
81
+ "aria-labelledby": c,
82
+ "aria-describedby": S ? s : void 0,
65
83
  "data-testid": e,
66
- className: u(a.group, O),
84
+ className: u(a.group, g),
67
85
  children: [
68
- !y && /* @__PURE__ */ l("legend", {
86
+ !c && /* @__PURE__ */ l("legend", {
69
87
  className: a.question,
70
- children: p
88
+ children: O
71
89
  }),
72
90
  /* @__PURE__ */ l("div", {
73
91
  className: a.options,
74
- children: n.map((d, t) => {
75
- const I = d.value === h;
92
+ children: n.map((r, j) => {
93
+ const C = r.value === o;
76
94
  return /* @__PURE__ */ f("label", {
77
- "data-testid": `${e}-option-${t}`,
78
- className: u(a.card, a.choice, !d.label && a.fit),
95
+ "data-testid": `${e}-option-${j}`,
96
+ className: u(a.card, a.choice, !r.label && a.fit),
79
97
  children: [/* @__PURE__ */ l("input", {
80
98
  type: "radio",
81
99
  className: "sr-only",
82
- name: m ?? v,
83
- value: d.value,
84
- checked: I,
85
- onChange: () => N?.(d.value, d),
86
- onKeyDown: X
100
+ name: p ?? d,
101
+ value: r.value,
102
+ checked: C,
103
+ onChange: () => h?.(r.value, r),
104
+ onKeyDown: J
87
105
  }), /* @__PURE__ */ l("span", {
88
106
  className: a.body,
89
- children: /* @__PURE__ */ l(S, {
90
- option: d,
91
- position: t + 1,
92
- text: w,
93
- radio: /* @__PURE__ */ l($, {
107
+ children: /* @__PURE__ */ l($, {
108
+ option: r,
109
+ position: j + 1,
110
+ text: b,
111
+ radio: /* @__PURE__ */ l(T, {
94
112
  decorative: !0,
95
- checked: I
113
+ checked: C
96
114
  })
97
115
  })
98
116
  })]
99
- }, `${t}-${d.value}`);
117
+ }, `${j}-${r.value}`);
100
118
  })
101
119
  }),
102
- s && /* @__PURE__ */ l(H, {
103
- id: c,
104
- role: g,
105
- error: o,
106
- message: b,
107
- className: u("m-0", o && "font-medium")
120
+ m && I && /* @__PURE__ */ l(D, {
121
+ dataTest: e,
122
+ text: b,
123
+ onClear: m,
124
+ focusAfter: () => v.current
125
+ }),
126
+ S && /* @__PURE__ */ l(M, {
127
+ id: s,
128
+ role: A,
129
+ error: N,
130
+ message: y,
131
+ className: u("m-0", N && "font-medium")
108
132
  })
109
133
  ]
110
134
  });
111
- }, G = ({ dataTest: e, options: n, value: h, onValueChange: N, question: p, "aria-labelledby": y, error: m, helperText: o, placeholder: b, locale: O, className: w, text: v }) => {
112
- const c = j(), [s, g] = T(null), d = M(!1), t = n.find((r) => r.value === h) ?? null, I = t ? C(t, n.indexOf(t) + 1, v) : "", _ = s === null && t !== null && (t.label !== "" || !t.emoji);
135
+ }, U = ({ dataTest: e, options: n, value: o, onValueChange: h, onClear: m, question: O, "aria-labelledby": c, error: p, helperText: N, placeholder: y, locale: g, className: b, text: d }) => {
136
+ const s = w(), v = E(null), [S, A] = x(null), I = E(!1), r = n.find((t) => t.value === o) ?? null, j = r ? R(r, n.indexOf(r) + 1, d) : "", C = S === null && r !== null && (r.label !== "" || !r.emoji);
113
137
  return /* @__PURE__ */ f("div", {
114
- className: u(a.dropdown, w),
115
- children: [!y && /* @__PURE__ */ l("span", {
116
- id: c,
117
- className: a.question,
118
- children: p
119
- }), /* @__PURE__ */ l(F, {
120
- dataTest: e,
121
- options: n,
122
- value: t,
123
- onChange: (r, i) => {
124
- i && N?.(i.value, i);
125
- },
126
- getOptionLabel: (r) => C(r, n.indexOf(r) + 1, v),
127
- getOptionKey: (r) => r.value,
128
- isOptionEqualToValue: (r, i) => r.value === i.value,
129
- inputValue: s ?? I,
130
- onInputChange: (r, i, A) => g(A === "input" ? i : null),
131
- onClose: () => g(null),
132
- disableClearable: !0,
133
- error: m,
134
- helperText: o,
135
- pickerTitle: p,
136
- locale: O,
137
- noOptionsText: L(O ?? "en").noMatches,
138
- maxListHeight: 322,
139
- slotProps: { popper: { className: a.menu } },
140
- renderOption: ({ key: r, className: i, ...A }, E, k) => /* @__PURE__ */ l("li", {
141
- ...A,
142
- className: u(a.menuOption, k.inPicker && a.pickerOption),
143
- children: /* @__PURE__ */ l("span", {
144
- className: u(a.card, a.body),
145
- children: /* @__PURE__ */ l(S, {
146
- option: E,
147
- position: n.indexOf(E) + 1,
148
- text: v,
149
- radio: /* @__PURE__ */ l($, {
150
- decorative: !0,
151
- checked: k.selected
138
+ ref: v,
139
+ className: u(a.dropdown, b),
140
+ children: [
141
+ !c && /* @__PURE__ */ l("span", {
142
+ id: s,
143
+ className: a.question,
144
+ children: O
145
+ }),
146
+ /* @__PURE__ */ l(B, {
147
+ dataTest: e,
148
+ options: n,
149
+ value: r,
150
+ onChange: (t, i) => {
151
+ i && h?.(i.value, i);
152
+ },
153
+ getOptionLabel: (t) => R(t, n.indexOf(t) + 1, d),
154
+ getOptionKey: (t) => t.value,
155
+ isOptionEqualToValue: (t, i) => t.value === i.value,
156
+ inputValue: S ?? j,
157
+ onInputChange: (t, i, k) => A(k === "input" ? i : null),
158
+ onClose: () => A(null),
159
+ disableClearable: !0,
160
+ error: p,
161
+ helperText: N,
162
+ pickerTitle: O,
163
+ locale: g,
164
+ noOptionsText: X(g ?? "en").noMatches,
165
+ maxListHeight: 322,
166
+ slotProps: { popper: { className: a.menu } },
167
+ renderOption: ({ key: t, className: i, ...k }, _, P) => /* @__PURE__ */ l("li", {
168
+ ...k,
169
+ className: u(a.menuOption, P.inPicker && a.pickerOption),
170
+ children: /* @__PURE__ */ l("span", {
171
+ className: u(a.card, a.body),
172
+ children: /* @__PURE__ */ l($, {
173
+ option: _,
174
+ position: n.indexOf(_) + 1,
175
+ text: d,
176
+ radio: /* @__PURE__ */ l(T, {
177
+ decorative: !0,
178
+ checked: P.selected
179
+ })
152
180
  })
153
181
  })
154
- })
155
- }, r),
156
- renderInput: (r) => /* @__PURE__ */ l(D, {
157
- ...r,
158
- dataTest: `${e}-input`,
159
- placeholder: b,
160
- onFocus: (i) => {
161
- r.onFocus?.(), i.currentTarget.select(), d.current = !0;
162
- },
163
- onClick: (i) => {
164
- d.current && i.target instanceof HTMLInputElement && i.target.select(), d.current = !1;
165
- },
166
- slotProps: {
167
- htmlInput: {
168
- ...r.slotProps.htmlInput,
169
- "aria-labelledby": y ?? c
182
+ }, t),
183
+ renderInput: (t) => /* @__PURE__ */ l(K, {
184
+ ...t,
185
+ dataTest: `${e}-input`,
186
+ placeholder: y,
187
+ onFocus: (i) => {
188
+ t.onFocus?.(), i.currentTarget.select(), I.current = !0;
189
+ },
190
+ onClick: (i) => {
191
+ I.current && i.target instanceof HTMLInputElement && i.target.select(), I.current = !1;
170
192
  },
171
- input: {
172
- ...r.slotProps.input,
173
- startAdornment: t && _ ? /* @__PURE__ */ l(R, {
174
- option: t,
175
- className: a.fieldEmoji
176
- }) : void 0
193
+ slotProps: {
194
+ htmlInput: {
195
+ ...t.slotProps.htmlInput,
196
+ "aria-labelledby": c ?? s
197
+ },
198
+ input: {
199
+ ...t.slotProps.input,
200
+ startAdornment: r && C ? /* @__PURE__ */ l(H, {
201
+ option: r,
202
+ className: a.fieldEmoji
203
+ }) : void 0
204
+ }
177
205
  }
178
- }
206
+ })
207
+ }),
208
+ m && r && /* @__PURE__ */ l(D, {
209
+ dataTest: e,
210
+ text: d,
211
+ onClear: m,
212
+ focusAfter: () => v.current?.querySelector("input")
179
213
  })
180
- })]
214
+ ]
181
215
  });
182
- }, z = ({ dataTest: e, options: n, value: h, question: N, "aria-labelledby": p, className: y, text: m }) => {
183
- const [o, b] = T(!1), O = j(), w = j(), v = j(), c = n.find((s) => s.value === h);
216
+ }, W = ({ dataTest: e, options: n, value: o, question: h, "aria-labelledby": m, className: O, text: c }) => {
217
+ const [p, N] = x(!1), y = w(), g = w(), b = w(), d = n.find((s) => s.value === o);
184
218
  return /* @__PURE__ */ f("dl", {
185
219
  "data-testid": e,
186
- className: u(a.readOnly, y),
220
+ className: u(a.readOnly, O),
187
221
  children: [/* @__PURE__ */ l("dt", {
188
- id: O,
189
- className: p ? "sr-only" : a.question,
190
- children: N
222
+ id: y,
223
+ className: m ? "sr-only" : a.question,
224
+ children: h
191
225
  }), /* @__PURE__ */ f("dd", {
192
226
  className: a.readOnlyAnswer,
193
227
  children: [/* @__PURE__ */ f("div", {
194
228
  className: a.readOnlyCard,
195
- children: [c ? /* @__PURE__ */ l(S, {
196
- option: c,
197
- position: n.indexOf(c) + 1,
198
- text: m
229
+ children: [d ? /* @__PURE__ */ l($, {
230
+ option: d,
231
+ position: n.indexOf(d) + 1,
232
+ text: c
199
233
  }) : /* @__PURE__ */ l("span", {
200
234
  className: a.noAnswer,
201
- children: m.noAnswer
202
- }), n.length > 0 && /* @__PURE__ */ l(x, {
235
+ children: c.noAnswer
236
+ }), n.length > 0 && /* @__PURE__ */ l(q, {
203
237
  dataTest: `${e}-show-all`,
204
238
  variant: "text",
205
239
  type: "button",
206
240
  className: a.showAll,
207
- "aria-expanded": o,
208
- "aria-controls": v,
209
- "aria-labelledby": `${w} ${O}`,
210
- endIcon: /* @__PURE__ */ l(P, {
241
+ "aria-expanded": p,
242
+ "aria-controls": b,
243
+ "aria-labelledby": `${g} ${y}`,
244
+ endIcon: /* @__PURE__ */ l(L, {
211
245
  width: 24,
212
246
  height: 24,
213
- className: u(o && "flip-180")
247
+ className: u(p && "flip-180")
214
248
  }),
215
- onClick: () => b(!o),
249
+ onClick: () => N(!p),
216
250
  children: /* @__PURE__ */ l("span", {
217
- id: w,
218
- children: o ? m.hideOptions : m.showAllOptions(n.length)
251
+ id: g,
252
+ children: p ? c.hideOptions : c.showAllOptions(n.length)
219
253
  })
220
254
  })]
221
255
  }), /* @__PURE__ */ l("ul", {
222
- id: v,
223
- hidden: !o,
256
+ id: b,
257
+ hidden: !p,
224
258
  className: a.options,
225
- children: n.map((s, g) => /* @__PURE__ */ f("li", {
259
+ children: n.map((s, v) => /* @__PURE__ */ f("li", {
226
260
  className: u(a.card, a.body, !s.label && a.fit),
227
- children: [/* @__PURE__ */ l(S, {
261
+ children: [/* @__PURE__ */ l($, {
228
262
  option: s,
229
- position: g + 1,
230
- text: m,
231
- radio: /* @__PURE__ */ l($, {
263
+ position: v + 1,
264
+ text: c,
265
+ radio: /* @__PURE__ */ l(T, {
232
266
  decorative: !0,
233
267
  readOnly: !0,
234
- checked: s === c
268
+ checked: s === d
235
269
  })
236
- }), s === c && /* @__PURE__ */ l("span", {
270
+ }), s === d && /* @__PURE__ */ l("span", {
237
271
  className: "sr-only",
238
- children: `, ${m.selected}`
272
+ children: `, ${c.selected}`
239
273
  })]
240
- }, `${g}-${s.value}`))
274
+ }, `${v}-${s.value}`))
241
275
  })]
242
276
  })]
243
277
  });
244
- }, te = (e) => {
245
- const n = V[e.locale ?? "en"];
246
- return e.readOnly ? /* @__PURE__ */ l(z, {
278
+ }, me = (e) => {
279
+ const n = G[e.locale ?? "en"];
280
+ return e.readOnly ? /* @__PURE__ */ l(W, {
247
281
  ...e,
248
282
  text: n
249
- }) : e.options.length > K ? /* @__PURE__ */ l(G, {
283
+ }) : e.options.length > z ? /* @__PURE__ */ l(U, {
250
284
  ...e,
251
285
  text: n
252
- }) : /* @__PURE__ */ l(B, {
286
+ }) : /* @__PURE__ */ l(Q, {
253
287
  ...e,
254
288
  text: n
255
289
  });
256
290
  };
257
291
  export {
258
- te as StyledEmojiChoice
292
+ me as StyledEmojiChoice
259
293
  };
@@ -1,27 +1,28 @@
1
- var _ = "_group_xgzbu_1", r = "_question_xgzbu_9", o = "_options_xgzbu_19", a = "_card_xgzbu_31", e = "_body_xgzbu_45", u = "_fit_xgzbu_52", n = "_choice_xgzbu_57", i = "_content_xgzbu_86", x = "_noEmoji_xgzbu_94", b = "_readOnlyCard_xgzbu_97", d = "_lead_xgzbu_101", g = "_emojiSlot_xgzbu_109", t = "_emoji_xgzbu_109", v = "_text_xgzbu_131", z = "_dropdown_xgzbu_139", l = "_fieldEmoji_xgzbu_144", p = "_menuOption_xgzbu_156", m = "_pickerOption_xgzbu_165", c = "_readOnly_xgzbu_97", s = "_readOnlyAnswer_xgzbu_200", O = "_noAnswer_xgzbu_220", j = "_showAll_xgzbu_224", y = {
1
+ var _ = "_group_1lqw7_1", r = "_question_1lqw7_12", l = "_options_1lqw7_22", o = "_card_1lqw7_34", a = "_body_1lqw7_48", e = "_fit_1lqw7_55", w = "_choice_1lqw7_60", n = "_content_1lqw7_89", i = "_noEmoji_1lqw7_97", q = "_readOnlyCard_1lqw7_100", d = "_lead_1lqw7_104", t = "_emojiSlot_1lqw7_112", v = "_emoji_1lqw7_112", c = "_text_1lqw7_134", p = "_dropdown_1lqw7_142", m = "_fieldEmoji_1lqw7_147", s = "_menuOption_1lqw7_159", O = "_pickerOption_1lqw7_168", j = "_readOnly_1lqw7_100", u = "_readOnlyAnswer_1lqw7_203", y = "_noAnswer_1lqw7_223", f = "_showAll_1lqw7_227", A = "_clear_1lqw7_232", h = {
2
2
  group: _,
3
3
  question: r,
4
- options: o,
5
- card: a,
6
- body: e,
7
- fit: u,
8
- choice: n,
9
- content: i,
10
- noEmoji: x,
11
- readOnlyCard: b,
4
+ options: l,
5
+ card: o,
6
+ body: a,
7
+ fit: e,
8
+ choice: w,
9
+ content: n,
10
+ noEmoji: i,
11
+ readOnlyCard: q,
12
12
  lead: d,
13
- emojiSlot: g,
14
- emoji: t,
15
- text: v,
16
- dropdown: z,
17
- fieldEmoji: l,
18
- menuOption: p,
19
- pickerOption: m,
20
- readOnly: c,
21
- readOnlyAnswer: s,
22
- noAnswer: O,
23
- showAll: j
13
+ emojiSlot: t,
14
+ emoji: v,
15
+ text: c,
16
+ dropdown: p,
17
+ fieldEmoji: m,
18
+ menuOption: s,
19
+ pickerOption: O,
20
+ readOnly: j,
21
+ readOnlyAnswer: u,
22
+ noAnswer: y,
23
+ showAll: f,
24
+ clear: A
24
25
  };
25
26
  export {
26
- y as default
27
+ h as default
27
28
  };
@@ -1,7 +1,7 @@
1
1
  import { cn as f } from "../../../helpers/cn.js";
2
2
  import { ChevronDownIcon as F } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
- import { useFullScreenPickerMediaQuery as M } from "../../../hooks/useMediaQuery.hook.js";
4
- import { StyledPopover as Q } from "../../utils/popover/StyledPopover.js";
3
+ import { StyledPopover as M } from "../../utils/popover/StyledPopover.js";
4
+ import { useFullScreenPickerMediaQuery as Q } from "../../../hooks/useMediaQuery.hook.js";
5
5
  import { notchedOutlineClass as U } from "../field-styles.js";
6
6
  import { StyledSearchField as q } from "../search-field/StyledSearchField.js";
7
7
  import { FullScreenPicker as L } from "../full-screen-picker/FullScreenPicker.js";
@@ -10,7 +10,7 @@ import { useCountryPicker as H } from "./useCountryPicker.js";
10
10
  import { useEffect as P, useId as J, useRef as w, useState as m } from "react";
11
11
  import { Fragment as V, jsx as n, jsxs as h } from "react/jsx-runtime";
12
12
  var ae = ({ dataTest: r, countries: y, value: s, onChange: O, disabled: c, selectCountryLabel: g, searchPlaceholder: A, renderFlag: x, labelledBy: E, className: B }) => {
13
- const [t, d] = m(!1), [R, u] = m(!1), [b, a] = m(""), [W, j] = m(null), v = w(null), I = w(null), C = w(!1), i = M(), l = `${J()}-country-listbox`, k = y.find((e) => e.iso2 === s), D = k === void 0 ? "" : `+${k.dialCode}`, o = H({
13
+ const [t, d] = m(!1), [R, u] = m(!1), [b, a] = m(""), [W, j] = m(null), v = w(null), I = w(null), C = w(!1), i = Q(), l = `${J()}-country-listbox`, k = y.find((e) => e.iso2 === s), D = k === void 0 ? "" : `+${k.dialCode}`, o = H({
14
14
  countries: y,
15
15
  selectedIso2: s,
16
16
  query: b,
@@ -152,7 +152,7 @@ var ae = ({ dataTest: r, countries: y, value: s, onChange: O, disabled: c, selec
152
152
  slotProps: { htmlInput: S }
153
153
  }),
154
154
  children: N(!0)
155
- }) : /* @__PURE__ */ n(Q, {
155
+ }) : /* @__PURE__ */ n(M, {
156
156
  open: t,
157
157
  anchorEl: W,
158
158
  onClose: o.dismiss,
@@ -1,6 +1,6 @@
1
1
  import { cn as re } from "../../../helpers/cn.js";
2
- import { StyledCheckbox as Ne } from "../checkbox/base-ui/StyledCheckbox.js";
3
2
  import { StyledButton as F } from "../button/StyledButton.js";
3
+ import { StyledCheckbox as Ne } from "../checkbox/base-ui/StyledCheckbox.js";
4
4
  import { StyledEmptyPage as De } from "../../feedback/empty-page/StyledEmptyPage.js";
5
5
  import { StyledSearchField as Se } from "../search-field/StyledSearchField.js";
6
6
  import { useAnnouncer as $e } from "../full-screen-picker/PickerLiveRegion.js";