@rescui/select 0.18.4 → 0.19.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 (37) hide show
  1. package/lib/_virtual/check-outline.js +294 -63
  2. package/lib/_virtual/close-outline.js +294 -63
  3. package/lib/_virtual/down-outline.js +294 -63
  4. package/lib/_virtual/index.css.js +12 -12
  5. package/lib/_virtual/loading-outline.js +310 -79
  6. package/lib/hooks/use-a11y.d.ts +2 -2
  7. package/lib/hooks/use-a11y.js +124 -36
  8. package/lib/hooks/use-actual-size-from-css.d.ts +3 -4
  9. package/lib/hooks/use-actual-size-from-css.js +47 -18
  10. package/lib/hooks/use-focus.js +54 -10
  11. package/lib/hooks/use-hover.js +54 -10
  12. package/lib/hooks/use-label-focus.js +45 -15
  13. package/lib/hooks/use-multi-handlers.js +113 -38
  14. package/lib/hooks/use-options.d.ts +2 -1
  15. package/lib/hooks/use-options.js +92 -56
  16. package/lib/hooks/use-primary-contrast-css-var-transfer.d.ts +2 -3
  17. package/lib/hooks/use-primary-contrast-css-var-transfer.js +45 -15
  18. package/lib/index.css +194 -194
  19. package/lib/multiselect.js +527 -174
  20. package/lib/native-select.js +416 -118
  21. package/lib/parts/form-trigger-wrapper.js +159 -39
  22. package/lib/parts/hidden-select.js +105 -29
  23. package/lib/parts/icons.js +191 -49
  24. package/lib/parts/list-box.js +277 -74
  25. package/lib/parts/multi-trigger.d.ts +2 -2
  26. package/lib/parts/multi-trigger.js +125 -48
  27. package/lib/parts/native-select-options-with-groups.js +154 -52
  28. package/lib/parts/popup-content.d.ts +3 -3
  29. package/lib/parts/popup-content.js +146 -46
  30. package/lib/select-basic.js +456 -147
  31. package/lib/select-searchable.js +448 -155
  32. package/lib/select.js +228 -56
  33. package/lib/styles/common.p.module.css.js +29 -29
  34. package/lib/styles/form-trigger.p.module.css.js +12 -12
  35. package/lib/styles/list-box.p.module.css.js +13 -13
  36. package/lib/utils/get-text-from-nodes.js +1 -1
  37. package/package.json +12 -11
@@ -1,4 +1,5 @@
1
1
  import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
2
+ import { c } from 'react-compiler-runtime';
2
3
  import React from 'react';
3
4
  import PropTypes from 'prop-types';
4
5
  import cn from 'classnames';
@@ -15,101 +16,331 @@ const Size = {
15
16
  "m": "m",
16
17
  "l": "l"
17
18
  };
18
- const LoadingOutlineIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
19
- viewBox: "0 0 16 16"
20
- }, props, {
21
- ref: ref
22
- }), /*#__PURE__*/React.createElement("path", {
23
- d: "M8 3a5 5 0 1 0 4.933 4.177.5.5 0 0 1 .986-.163Q14 7.496 14 8a6 6 0 1 1-5.014-5.92.5.5 0 1 1-.163.987A5 5 0 0 0 8 3",
24
- style: {
25
- animation: "rs-icon-rotate 1s linear infinite",
26
- transformOrigin: "center center"
27
- }
28
- })));
19
+ const LoadingOutlineIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => {
20
+ const $ = c(4);
21
+ let t0;
22
+
23
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
24
+ t0 = /*#__PURE__*/React.createElement("path", {
25
+ d: "M8 3a5 5 0 1 0 4.933 4.177.5.5 0 0 1 .986-.163Q14 7.496 14 8a6 6 0 1 1-5.014-5.92.5.5 0 1 1-.163.987A5 5 0 0 0 8 3",
26
+ style: {
27
+ animation: "rs-icon-rotate 1s linear infinite",
28
+ transformOrigin: "center center"
29
+ }
30
+ });
31
+ $[0] = t0;
32
+ } else {
33
+ t0 = $[0];
34
+ }
35
+
36
+ let t1;
37
+
38
+ if ($[1] !== props || $[2] !== ref) {
39
+ t1 = /*#__PURE__*/React.createElement("svg", _extends({
40
+ viewBox: "0 0 16 16"
41
+ }, props, {
42
+ ref: ref
43
+ }), t0);
44
+ $[1] = props;
45
+ $[2] = ref;
46
+ $[3] = t1;
47
+ } else {
48
+ t1 = $[3];
49
+ }
50
+
51
+ return t1;
52
+ });
29
53
  LoadingOutlineIcon16.displayName = 'LoadingOutlineIcon16';
30
- const LoadingOutlineIcon20 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
31
- viewBox: "0 0 20 20"
32
- }, props, {
33
- ref: ref
34
- }), /*#__PURE__*/React.createElement("path", {
35
- d: "M10 3.75a6.25 6.25 0 1 0 6.166 5.221.75.75 0 0 1 1.48-.244 7.75 7.75 0 1 1-6.372-6.372.75.75 0 0 1-.245 1.48A6.3 6.3 0 0 0 10 3.75",
36
- style: {
37
- animation: "rs-icon-rotate 1s linear infinite",
38
- transformOrigin: "center center"
39
- }
40
- })));
54
+ const LoadingOutlineIcon20 = /*#__PURE__*/React.forwardRef((props, ref) => {
55
+ const $ = c(4);
56
+ let t0;
57
+
58
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
59
+ t0 = /*#__PURE__*/React.createElement("path", {
60
+ d: "M10 3.75a6.25 6.25 0 1 0 6.166 5.221.75.75 0 0 1 1.48-.244 7.75 7.75 0 1 1-6.372-6.372.75.75 0 0 1-.245 1.48A6.3 6.3 0 0 0 10 3.75",
61
+ style: {
62
+ animation: "rs-icon-rotate 1s linear infinite",
63
+ transformOrigin: "center center"
64
+ }
65
+ });
66
+ $[0] = t0;
67
+ } else {
68
+ t0 = $[0];
69
+ }
70
+
71
+ let t1;
72
+
73
+ if ($[1] !== props || $[2] !== ref) {
74
+ t1 = /*#__PURE__*/React.createElement("svg", _extends({
75
+ viewBox: "0 0 20 20"
76
+ }, props, {
77
+ ref: ref
78
+ }), t0);
79
+ $[1] = props;
80
+ $[2] = ref;
81
+ $[3] = t1;
82
+ } else {
83
+ t1 = $[3];
84
+ }
85
+
86
+ return t1;
87
+ });
41
88
  LoadingOutlineIcon20.displayName = 'LoadingOutlineIcon20';
42
- const LoadingOutlineIcon24 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
43
- viewBox: "0 0 24 24"
44
- }, props, {
45
- ref: ref
46
- }), /*#__PURE__*/React.createElement("path", {
47
- d: "M12 5a7 7 0 1 0 6.906 5.848 1 1 0 1 1 1.973-.327q.12.724.121 1.479a9 9 0 1 1-7.521-8.879 1 1 0 0 1-.327 1.973A7 7 0 0 0 12 5",
48
- style: {
49
- animation: "rs-icon-rotate 1s linear infinite",
50
- transformOrigin: "center center"
51
- }
52
- })));
89
+ const LoadingOutlineIcon24 = /*#__PURE__*/React.forwardRef((props, ref) => {
90
+ const $ = c(4);
91
+ let t0;
92
+
93
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
94
+ t0 = /*#__PURE__*/React.createElement("path", {
95
+ d: "M12 5a7 7 0 1 0 6.906 5.848 1 1 0 1 1 1.973-.327q.12.724.121 1.479a9 9 0 1 1-7.521-8.879 1 1 0 0 1-.327 1.973A7 7 0 0 0 12 5",
96
+ style: {
97
+ animation: "rs-icon-rotate 1s linear infinite",
98
+ transformOrigin: "center center"
99
+ }
100
+ });
101
+ $[0] = t0;
102
+ } else {
103
+ t0 = $[0];
104
+ }
105
+
106
+ let t1;
107
+
108
+ if ($[1] !== props || $[2] !== ref) {
109
+ t1 = /*#__PURE__*/React.createElement("svg", _extends({
110
+ viewBox: "0 0 24 24"
111
+ }, props, {
112
+ ref: ref
113
+ }), t0);
114
+ $[1] = props;
115
+ $[2] = ref;
116
+ $[3] = t1;
117
+ } else {
118
+ t1 = $[3];
119
+ }
120
+
121
+ return t1;
122
+ });
53
123
  LoadingOutlineIcon24.displayName = 'LoadingOutlineIcon24';
54
- const LoadingOutlineIcon28 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
55
- viewBox: "0 0 28 28"
56
- }, props, {
57
- ref: ref
58
- }), /*#__PURE__*/React.createElement("path", {
59
- d: "M14 6a8 8 0 1 0 7.892 6.683 1 1 0 1 1 1.974-.326q.133.803.134 1.643c0 5.523-4.477 10-10 10S4 19.523 4 14 8.477 4 14 4q.775.001 1.52.115a1 1 0 1 1-.302 1.977A8 8 0 0 0 14 6",
60
- style: {
61
- animation: "rs-icon-rotate 1s linear infinite",
62
- transformOrigin: "center center"
63
- }
64
- })));
124
+ const LoadingOutlineIcon28 = /*#__PURE__*/React.forwardRef((props, ref) => {
125
+ const $ = c(4);
126
+ let t0;
127
+
128
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
129
+ t0 = /*#__PURE__*/React.createElement("path", {
130
+ d: "M14 6a8 8 0 1 0 7.892 6.683 1 1 0 1 1 1.974-.326q.133.803.134 1.643c0 5.523-4.477 10-10 10S4 19.523 4 14 8.477 4 14 4q.775.001 1.52.115a1 1 0 1 1-.302 1.977A8 8 0 0 0 14 6",
131
+ style: {
132
+ animation: "rs-icon-rotate 1s linear infinite",
133
+ transformOrigin: "center center"
134
+ }
135
+ });
136
+ $[0] = t0;
137
+ } else {
138
+ t0 = $[0];
139
+ }
140
+
141
+ let t1;
142
+
143
+ if ($[1] !== props || $[2] !== ref) {
144
+ t1 = /*#__PURE__*/React.createElement("svg", _extends({
145
+ viewBox: "0 0 28 28"
146
+ }, props, {
147
+ ref: ref
148
+ }), t0);
149
+ $[1] = props;
150
+ $[2] = ref;
151
+ $[3] = t1;
152
+ } else {
153
+ t1 = $[3];
154
+ }
155
+
156
+ return t1;
157
+ });
65
158
  LoadingOutlineIcon28.displayName = 'LoadingOutlineIcon28';
66
- const LoadingOutlineIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
67
- let {
68
- theme,
69
- size: sizeFromProps = "m",
70
- className,
71
- style,
72
- ['data-render-all-sizes']: renderAllSizes = false,
73
- ...props
74
- } = _ref;
159
+ const LoadingOutlineIcon = /*#__PURE__*/React.forwardRef((t0, ref) => {
160
+ const $ = c(34);
161
+ let className;
162
+ let props;
163
+ let style;
164
+ let t1;
165
+ let t2;
166
+ let theme;
167
+
168
+ if ($[0] !== t0) {
169
+ ({
170
+ theme,
171
+ size: t1,
172
+ className,
173
+ style,
174
+ "data-render-all-sizes": t2,
175
+ ...props
176
+ } = t0);
177
+ $[0] = t0;
178
+ $[1] = className;
179
+ $[2] = props;
180
+ $[3] = style;
181
+ $[4] = t1;
182
+ $[5] = t2;
183
+ $[6] = theme;
184
+ } else {
185
+ className = $[1];
186
+ props = $[2];
187
+ style = $[3];
188
+ t1 = $[4];
189
+ t2 = $[5];
190
+ theme = $[6];
191
+ }
192
+
193
+ const sizeFromProps = t1 === undefined ? "m" : t1;
194
+ const renderAllSizes = t2 === undefined ? false : t2;
75
195
  const size = sizeFromProps in Size ? sizeFromProps : "m";
76
- const mainProps = { ...props,
77
- className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
78
- style: renderAllSizes ? {
79
- '--rs-icon-ar-width': 28,
80
- '--rs-icon-ar-height': 28,
196
+ const t3 = styles[theme];
197
+ const t4 = sizeStyles[size];
198
+ const t5 = renderAllSizes && styles.allVariants;
199
+ let t6;
200
+
201
+ if ($[7] !== className || $[8] !== t3 || $[9] !== t4 || $[10] !== t5) {
202
+ t6 = cn(styles.icon, t3, t4, t5, className);
203
+ $[7] = className;
204
+ $[8] = t3;
205
+ $[9] = t4;
206
+ $[10] = t5;
207
+ $[11] = t6;
208
+ } else {
209
+ t6 = $[11];
210
+ }
211
+
212
+ let t7;
213
+
214
+ if ($[12] !== renderAllSizes || $[13] !== style) {
215
+ t7 = renderAllSizes ? {
216
+ "--rs-icon-ar-width": 28,
217
+ "--rs-icon-ar-height": 28,
81
218
  ...style
82
- } : style,
83
- ref
84
- };
219
+ } : style;
220
+ $[12] = renderAllSizes;
221
+ $[13] = style;
222
+ $[14] = t7;
223
+ } else {
224
+ t7 = $[14];
225
+ }
226
+
227
+ let t8;
228
+
229
+ if ($[15] !== props || $[16] !== ref || $[17] !== t6 || $[18] !== t7) {
230
+ t8 = { ...props,
231
+ className: t6,
232
+ style: t7,
233
+ ref
234
+ };
235
+ $[15] = props;
236
+ $[16] = ref;
237
+ $[17] = t6;
238
+ $[18] = t7;
239
+ $[19] = t8;
240
+ } else {
241
+ t8 = $[19];
242
+ }
243
+
244
+ const mainProps = t8;
85
245
 
86
246
  if (renderAllSizes) {
87
- return /*#__PURE__*/React.createElement("svg", _extends({
88
- viewBox: "0 0 28 28"
89
- }, mainProps), /*#__PURE__*/React.createElement(LoadingOutlineIcon16, {
90
- className: styles.variant16
91
- }), /*#__PURE__*/React.createElement(LoadingOutlineIcon20, {
92
- className: styles.variant20
93
- }), /*#__PURE__*/React.createElement(LoadingOutlineIcon24, {
94
- className: styles.variant24
95
- }), /*#__PURE__*/React.createElement(LoadingOutlineIcon28, {
96
- className: styles.variant28
97
- }));
247
+ let t10;
248
+ let t11;
249
+ let t12;
250
+ let t9;
251
+
252
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
253
+ t9 = /*#__PURE__*/React.createElement(LoadingOutlineIcon16, {
254
+ className: styles.variant16
255
+ });
256
+ t10 = /*#__PURE__*/React.createElement(LoadingOutlineIcon20, {
257
+ className: styles.variant20
258
+ });
259
+ t11 = /*#__PURE__*/React.createElement(LoadingOutlineIcon24, {
260
+ className: styles.variant24
261
+ });
262
+ t12 = /*#__PURE__*/React.createElement(LoadingOutlineIcon28, {
263
+ className: styles.variant28
264
+ });
265
+ $[20] = t10;
266
+ $[21] = t11;
267
+ $[22] = t12;
268
+ $[23] = t9;
269
+ } else {
270
+ t10 = $[20];
271
+ t11 = $[21];
272
+ t12 = $[22];
273
+ t9 = $[23];
274
+ }
275
+
276
+ let t13;
277
+
278
+ if ($[24] !== mainProps) {
279
+ t13 = /*#__PURE__*/React.createElement("svg", _extends({
280
+ viewBox: "0 0 28 28"
281
+ }, mainProps), t9, t10, t11, t12);
282
+ $[24] = mainProps;
283
+ $[25] = t13;
284
+ } else {
285
+ t13 = $[25];
286
+ }
287
+
288
+ return t13;
98
289
  }
99
290
 
100
- if (size === Size['xs']) {
101
- return /*#__PURE__*/React.createElement(LoadingOutlineIcon16, mainProps);
291
+ if (size === Size.xs) {
292
+ let t9;
293
+
294
+ if ($[26] !== mainProps) {
295
+ t9 = /*#__PURE__*/React.createElement(LoadingOutlineIcon16, mainProps);
296
+ $[26] = mainProps;
297
+ $[27] = t9;
298
+ } else {
299
+ t9 = $[27];
300
+ }
301
+
302
+ return t9;
102
303
  }
103
304
 
104
- if (size === Size['s']) {
105
- return /*#__PURE__*/React.createElement(LoadingOutlineIcon20, mainProps);
305
+ if (size === Size.s) {
306
+ let t9;
307
+
308
+ if ($[28] !== mainProps) {
309
+ t9 = /*#__PURE__*/React.createElement(LoadingOutlineIcon20, mainProps);
310
+ $[28] = mainProps;
311
+ $[29] = t9;
312
+ } else {
313
+ t9 = $[29];
314
+ }
315
+
316
+ return t9;
317
+ }
318
+
319
+ if (size === Size.m) {
320
+ let t9;
321
+
322
+ if ($[30] !== mainProps) {
323
+ t9 = /*#__PURE__*/React.createElement(LoadingOutlineIcon24, mainProps);
324
+ $[30] = mainProps;
325
+ $[31] = t9;
326
+ } else {
327
+ t9 = $[31];
328
+ }
329
+
330
+ return t9;
106
331
  }
107
332
 
108
- if (size === Size['m']) {
109
- return /*#__PURE__*/React.createElement(LoadingOutlineIcon24, mainProps);
333
+ let t9;
334
+
335
+ if ($[32] !== mainProps) {
336
+ t9 = /*#__PURE__*/React.createElement(LoadingOutlineIcon28, mainProps);
337
+ $[32] = mainProps;
338
+ $[33] = t9;
339
+ } else {
340
+ t9 = $[33];
110
341
  }
111
342
 
112
- return /*#__PURE__*/React.createElement(LoadingOutlineIcon28, mainProps);
343
+ return t9;
113
344
  });
114
345
  LoadingOutlineIcon.displayName = 'LoadingOutlineIcon';
115
346
  LoadingOutlineIcon.propTypes = {
@@ -5,10 +5,10 @@ export type UseA11yArgs = {
5
5
  description?: React.ReactNode;
6
6
  error?: React.ReactNode;
7
7
  label?: React.ReactNode;
8
- fieldRef?: React.RefObject<HTMLElement>;
8
+ fieldEl?: HTMLElement | null;
9
9
  isDisabled?: boolean;
10
10
  };
11
- export declare const useA11y: ({ baseId: baseIdFromProps, prefix, description, error, label, fieldRef, isDisabled }: UseA11yArgs) => {
11
+ export declare const useA11y: ({ baseId: baseIdFromProps, prefix, description, error, label, fieldEl, isDisabled }: UseA11yArgs) => {
12
12
  baseId: string;
13
13
  fieldProps: {
14
14
  'aria-invalid': boolean;
@@ -1,56 +1,144 @@
1
- import { useSafeId } from './use-safe-id.js'; // eslint-disable-next-line complexity
1
+ import { c } from 'react-compiler-runtime';
2
+ import { useSafeId } from './use-safe-id.js';
2
3
 
3
- const useA11y = _ref => {
4
- let {
4
+ const useA11y = t0 => {
5
+ const $ = c(26);
6
+ const {
5
7
  baseId: baseIdFromProps,
6
- prefix = '',
8
+ prefix: t1,
7
9
  description,
8
10
  error,
9
11
  label,
10
- fieldRef,
11
- isDisabled = false
12
- } = _ref;
13
- const uniqueId = `${prefix ? `${prefix}-` : ''}${useSafeId()}`;
12
+ fieldEl,
13
+ isDisabled: t2
14
+ } = t0;
15
+ const prefix = t1 === undefined ? "" : t1;
16
+ const isDisabled = t2 === undefined ? false : t2;
17
+ const uniqueId = `${prefix ? `${prefix}-` : ""}${useSafeId()}`;
14
18
  const baseId = baseIdFromProps ?? uniqueId;
15
19
  const fieldId = `${baseId}-field`;
16
20
  const descriptionId = description ? `${baseId}-description` : undefined;
17
21
  const errorId = error ? `${baseId}-error` : undefined;
18
22
  const labelId = label ? `${baseId}-label` : undefined;
19
- const describedBy = [descriptionId, errorId].filter(Boolean).join(' ') || undefined;
20
- const fieldProps = {
21
- 'aria-invalid': Boolean(error),
22
- 'aria-describedby': describedBy,
23
- 'aria-labelledby': labelId,
24
- id: fieldId
25
- };
26
- const errorMessageProps = {
27
- id: errorId
28
- };
29
- const descriptionProps = {
30
- id: descriptionId
31
- };
32
- const labelProps = {
33
- id: labelId,
34
- htmlFor: fieldId,
35
- onClick: () => {
23
+ let t3;
24
+
25
+ if ($[0] !== descriptionId || $[1] !== errorId) {
26
+ t3 = [descriptionId, errorId].filter(Boolean).join(" ") || undefined;
27
+ $[0] = descriptionId;
28
+ $[1] = errorId;
29
+ $[2] = t3;
30
+ } else {
31
+ t3 = $[2];
32
+ }
33
+
34
+ const describedBy = t3;
35
+ const t4 = Boolean(error);
36
+ let t5;
37
+
38
+ if ($[3] !== describedBy || $[4] !== fieldId || $[5] !== labelId || $[6] !== t4) {
39
+ t5 = {
40
+ "aria-invalid": t4,
41
+ "aria-describedby": describedBy,
42
+ "aria-labelledby": labelId,
43
+ id: fieldId
44
+ };
45
+ $[3] = describedBy;
46
+ $[4] = fieldId;
47
+ $[5] = labelId;
48
+ $[6] = t4;
49
+ $[7] = t5;
50
+ } else {
51
+ t5 = $[7];
52
+ }
53
+
54
+ const fieldProps = t5;
55
+ let t6;
56
+
57
+ if ($[8] !== errorId) {
58
+ t6 = {
59
+ id: errorId
60
+ };
61
+ $[8] = errorId;
62
+ $[9] = t6;
63
+ } else {
64
+ t6 = $[9];
65
+ }
66
+
67
+ const errorMessageProps = t6;
68
+ let t7;
69
+
70
+ if ($[10] !== descriptionId) {
71
+ t7 = {
72
+ id: descriptionId
73
+ };
74
+ $[10] = descriptionId;
75
+ $[11] = t7;
76
+ } else {
77
+ t7 = $[11];
78
+ }
79
+
80
+ const descriptionProps = t7;
81
+ let t8;
82
+
83
+ if ($[12] !== fieldEl || $[13] !== fieldId || $[14] !== isDisabled) {
84
+ t8 = () => {
36
85
  if (isDisabled) {
37
86
  return;
38
87
  }
39
88
 
40
- if (fieldRef?.current) {
41
- fieldRef.current.focus();
89
+ if (fieldEl) {
90
+ fieldEl.focus();
42
91
  } else {
43
92
  document.getElementById(fieldId)?.focus();
44
93
  }
45
- }
46
- };
47
- return {
48
- baseId,
49
- fieldProps,
50
- descriptionProps,
51
- errorMessageProps,
52
- labelProps
53
- };
94
+ };
95
+
96
+ $[12] = fieldEl;
97
+ $[13] = fieldId;
98
+ $[14] = isDisabled;
99
+ $[15] = t8;
100
+ } else {
101
+ t8 = $[15];
102
+ }
103
+
104
+ let t9;
105
+
106
+ if ($[16] !== fieldId || $[17] !== labelId || $[18] !== t8) {
107
+ t9 = {
108
+ id: labelId,
109
+ htmlFor: fieldId,
110
+ onClick: t8
111
+ };
112
+ $[16] = fieldId;
113
+ $[17] = labelId;
114
+ $[18] = t8;
115
+ $[19] = t9;
116
+ } else {
117
+ t9 = $[19];
118
+ }
119
+
120
+ const labelProps = t9;
121
+ let t10;
122
+
123
+ if ($[20] !== baseId || $[21] !== descriptionProps || $[22] !== errorMessageProps || $[23] !== fieldProps || $[24] !== labelProps) {
124
+ t10 = {
125
+ baseId,
126
+ fieldProps,
127
+ descriptionProps,
128
+ errorMessageProps,
129
+ labelProps
130
+ };
131
+ $[20] = baseId;
132
+ $[21] = descriptionProps;
133
+ $[22] = errorMessageProps;
134
+ $[23] = fieldProps;
135
+ $[24] = labelProps;
136
+ $[25] = t10;
137
+ } else {
138
+ t10 = $[25];
139
+ }
140
+
141
+ return t10;
54
142
  };
55
143
 
56
144
  export { useA11y };
@@ -1,10 +1,9 @@
1
- import React from 'react';
2
1
  import type { SelectSize } from '../types';
3
2
  export type UseActualSizeFromCssParams = {
4
3
  sizeFromProps: SelectSize;
5
- triggerRef: React.RefObject<HTMLElement>;
4
+ triggerEl: HTMLElement | null;
6
5
  };
7
- export declare const useActualSizeFromCss: ({ sizeFromProps, triggerRef }: UseActualSizeFromCssParams) => {
8
- observableRef: React.RefObject<HTMLDivElement>;
6
+ export declare const useActualSizeFromCss: ({ sizeFromProps, triggerEl }: UseActualSizeFromCssParams) => {
7
+ observableRef: import("react").RefObject<HTMLDivElement>;
9
8
  size: "l" | "m" | "s";
10
9
  };