asma-ui-core 3.129.0 → 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.
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
import { cn as u } from "../../../helpers/cn.js";
|
|
2
|
-
import { ChevronDownIcon as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
|
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
|
|
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
|
-
},
|
|
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,
|
|
37
|
-
const
|
|
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, !
|
|
42
|
+
className: u(a.content, !m && a.noEmoji),
|
|
40
43
|
children: [/* @__PURE__ */ f("span", {
|
|
41
44
|
className: a.lead,
|
|
42
|
-
children: [
|
|
45
|
+
children: [h, m && /* @__PURE__ */ l("span", {
|
|
43
46
|
className: a.emojiSlot,
|
|
44
|
-
children: /* @__PURE__ */ l(
|
|
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:
|
|
57
|
+
children: R(e, n, o)
|
|
55
58
|
})]
|
|
56
59
|
});
|
|
57
|
-
},
|
|
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
|
-
},
|
|
60
|
-
const
|
|
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":
|
|
64
|
-
"aria-describedby":
|
|
81
|
+
"aria-labelledby": c,
|
|
82
|
+
"aria-describedby": S ? s : void 0,
|
|
65
83
|
"data-testid": e,
|
|
66
|
-
className: u(a.group,
|
|
84
|
+
className: u(a.group, g),
|
|
67
85
|
children: [
|
|
68
|
-
!
|
|
86
|
+
!c && /* @__PURE__ */ l("legend", {
|
|
69
87
|
className: a.question,
|
|
70
|
-
children:
|
|
88
|
+
children: O
|
|
71
89
|
}),
|
|
72
90
|
/* @__PURE__ */ l("div", {
|
|
73
91
|
className: a.options,
|
|
74
|
-
children: n.map((
|
|
75
|
-
const
|
|
92
|
+
children: n.map((r, j) => {
|
|
93
|
+
const C = r.value === o;
|
|
76
94
|
return /* @__PURE__ */ f("label", {
|
|
77
|
-
"data-testid": `${e}-option-${
|
|
78
|
-
className: u(a.card, a.choice, !
|
|
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:
|
|
83
|
-
value:
|
|
84
|
-
checked:
|
|
85
|
-
onChange: () =>
|
|
86
|
-
onKeyDown:
|
|
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(
|
|
90
|
-
option:
|
|
91
|
-
position:
|
|
92
|
-
text:
|
|
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:
|
|
113
|
+
checked: C
|
|
96
114
|
})
|
|
97
115
|
})
|
|
98
116
|
})]
|
|
99
|
-
}, `${
|
|
117
|
+
}, `${j}-${r.value}`);
|
|
100
118
|
})
|
|
101
119
|
}),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
},
|
|
112
|
-
const
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
className:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
},
|
|
183
|
-
const [
|
|
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,
|
|
220
|
+
className: u(a.readOnly, O),
|
|
187
221
|
children: [/* @__PURE__ */ l("dt", {
|
|
188
|
-
id:
|
|
189
|
-
className:
|
|
190
|
-
children:
|
|
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: [
|
|
196
|
-
option:
|
|
197
|
-
position: n.indexOf(
|
|
198
|
-
text:
|
|
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:
|
|
202
|
-
}), n.length > 0 && /* @__PURE__ */ l(
|
|
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":
|
|
208
|
-
"aria-controls":
|
|
209
|
-
"aria-labelledby": `${
|
|
210
|
-
endIcon: /* @__PURE__ */ l(
|
|
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(
|
|
247
|
+
className: u(p && "flip-180")
|
|
214
248
|
}),
|
|
215
|
-
onClick: () =>
|
|
249
|
+
onClick: () => N(!p),
|
|
216
250
|
children: /* @__PURE__ */ l("span", {
|
|
217
|
-
id:
|
|
218
|
-
children:
|
|
251
|
+
id: g,
|
|
252
|
+
children: p ? c.hideOptions : c.showAllOptions(n.length)
|
|
219
253
|
})
|
|
220
254
|
})]
|
|
221
255
|
}), /* @__PURE__ */ l("ul", {
|
|
222
|
-
id:
|
|
223
|
-
hidden: !
|
|
256
|
+
id: b,
|
|
257
|
+
hidden: !p,
|
|
224
258
|
className: a.options,
|
|
225
|
-
children: n.map((s,
|
|
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(
|
|
261
|
+
children: [/* @__PURE__ */ l($, {
|
|
228
262
|
option: s,
|
|
229
|
-
position:
|
|
230
|
-
text:
|
|
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 ===
|
|
268
|
+
checked: s === d
|
|
235
269
|
})
|
|
236
|
-
}), s ===
|
|
270
|
+
}), s === d && /* @__PURE__ */ l("span", {
|
|
237
271
|
className: "sr-only",
|
|
238
|
-
children: `, ${
|
|
272
|
+
children: `, ${c.selected}`
|
|
239
273
|
})]
|
|
240
|
-
}, `${
|
|
274
|
+
}, `${v}-${s.value}`))
|
|
241
275
|
})]
|
|
242
276
|
})]
|
|
243
277
|
});
|
|
244
|
-
},
|
|
245
|
-
const n =
|
|
246
|
-
return e.readOnly ? /* @__PURE__ */ l(
|
|
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 >
|
|
283
|
+
}) : e.options.length > z ? /* @__PURE__ */ l(U, {
|
|
250
284
|
...e,
|
|
251
285
|
text: n
|
|
252
|
-
}) : /* @__PURE__ */ l(
|
|
286
|
+
}) : /* @__PURE__ */ l(Q, {
|
|
253
287
|
...e,
|
|
254
288
|
text: n
|
|
255
289
|
});
|
|
256
290
|
};
|
|
257
291
|
export {
|
|
258
|
-
|
|
292
|
+
me as StyledEmojiChoice
|
|
259
293
|
};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
var _ = "
|
|
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:
|
|
5
|
-
card:
|
|
6
|
-
body:
|
|
7
|
-
fit:
|
|
8
|
-
choice:
|
|
9
|
-
content:
|
|
10
|
-
noEmoji:
|
|
11
|
-
readOnlyCard:
|
|
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:
|
|
14
|
-
emoji:
|
|
15
|
-
text:
|
|
16
|
-
dropdown:
|
|
17
|
-
fieldEmoji:
|
|
18
|
-
menuOption:
|
|
19
|
-
pickerOption:
|
|
20
|
-
readOnly:
|
|
21
|
-
readOnlyAnswer:
|
|
22
|
-
noAnswer:
|
|
23
|
-
showAll:
|
|
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
|
-
|
|
27
|
+
h as default
|
|
27
28
|
};
|
|
@@ -15,6 +15,11 @@ export interface StyledEmojiChoiceProps {
|
|
|
15
15
|
options: readonly EmojiChoiceOption[];
|
|
16
16
|
value?: string | null;
|
|
17
17
|
onValueChange?: (value: string, option: EmojiChoiceOption) => void;
|
|
18
|
+
/**
|
|
19
|
+
* @figmaProp none — an optional question: *Clear selection* under the options while one is chosen,
|
|
20
|
+
* as on `StyledDynamicSelect`. Leave unset for a required question.
|
|
21
|
+
*/
|
|
22
|
+
onClear?: () => void;
|
|
18
23
|
/** The question text. Shown above the options unless `aria-labelledby` points at a heading you render. */
|
|
19
24
|
question: string;
|
|
20
25
|
'aria-labelledby'?: string;
|