@rockshin/tao-ui 0.0.1

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 (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/dist/components/button/button.css +1055 -0
  4. package/dist/components/button/button.d.ts +15 -0
  5. package/dist/components/button/button.js +93 -0
  6. package/dist/components/checkbox/checkbox.css +1035 -0
  7. package/dist/components/checkbox/checkbox.d.ts +33 -0
  8. package/dist/components/checkbox/checkbox.js +312 -0
  9. package/dist/components/date-picker/calendar/calendar-grid.d.ts +18 -0
  10. package/dist/components/date-picker/calendar/calendar-grid.js +173 -0
  11. package/dist/components/date-picker/calendar/calendar-header.d.ts +10 -0
  12. package/dist/components/date-picker/calendar/calendar-header.js +336 -0
  13. package/dist/components/date-picker/calendar/month-grid.d.ts +9 -0
  14. package/dist/components/date-picker/calendar/month-grid.js +61 -0
  15. package/dist/components/date-picker/calendar/time-panel.d.ts +12 -0
  16. package/dist/components/date-picker/calendar/time-panel.js +233 -0
  17. package/dist/components/date-picker/calendar/use-calendar.d.ts +15 -0
  18. package/dist/components/date-picker/calendar/use-calendar.js +24 -0
  19. package/dist/components/date-picker/calendar/year-grid.d.ts +9 -0
  20. package/dist/components/date-picker/calendar/year-grid.js +60 -0
  21. package/dist/components/date-picker/date-picker.css +1799 -0
  22. package/dist/components/date-picker/date-picker.d.ts +29 -0
  23. package/dist/components/date-picker/date-picker.js +663 -0
  24. package/dist/components/date-picker/presets.d.ts +9 -0
  25. package/dist/components/date-picker/presets.js +36 -0
  26. package/dist/components/date-picker/range-picker.d.ts +30 -0
  27. package/dist/components/date-picker/range-picker.js +432 -0
  28. package/dist/components/date-picker/types.d.ts +39 -0
  29. package/dist/components/date-picker/types.js +7 -0
  30. package/dist/components/drawer/drawer.css +1112 -0
  31. package/dist/components/drawer/drawer.d.ts +17 -0
  32. package/dist/components/drawer/drawer.js +184 -0
  33. package/dist/components/form-actions/form-actions.d.ts +12 -0
  34. package/dist/components/form-actions/form-actions.js +42 -0
  35. package/dist/components/form-field/form-field.d.ts +17 -0
  36. package/dist/components/form-field/form-field.js +101 -0
  37. package/dist/components/form-field/form.css +1036 -0
  38. package/dist/components/form-section/form-section.d.ts +14 -0
  39. package/dist/components/form-section/form-section.js +92 -0
  40. package/dist/components/input/input.css +1185 -0
  41. package/dist/components/input/input.d.ts +15 -0
  42. package/dist/components/input/input.js +143 -0
  43. package/dist/components/pagination/pagination.css +1099 -0
  44. package/dist/components/pagination/pagination.d.ts +22 -0
  45. package/dist/components/pagination/pagination.js +310 -0
  46. package/dist/components/radio/radio.css +1045 -0
  47. package/dist/components/radio/radio.d.ts +34 -0
  48. package/dist/components/radio/radio.js +215 -0
  49. package/dist/components/scroll-area/scroll-area.css +1099 -0
  50. package/dist/components/scroll-area/scroll-area.d.ts +33 -0
  51. package/dist/components/scroll-area/scroll-area.js +375 -0
  52. package/dist/components/select/mobile-select.css +1044 -0
  53. package/dist/components/select/mobile-select.d.ts +19 -0
  54. package/dist/components/select/mobile-select.js +224 -0
  55. package/dist/components/select/select.css +1327 -0
  56. package/dist/components/select/select.d.ts +32 -0
  57. package/dist/components/select/select.js +532 -0
  58. package/dist/components/select/use-is-mobile.d.ts +1 -0
  59. package/dist/components/select/use-is-mobile.js +30 -0
  60. package/dist/components/splitter/splitter.css +1104 -0
  61. package/dist/components/splitter/splitter.d.ts +33 -0
  62. package/dist/components/splitter/splitter.js +451 -0
  63. package/dist/components/switch/switch.css +1170 -0
  64. package/dist/components/switch/switch.d.ts +19 -0
  65. package/dist/components/switch/switch.js +143 -0
  66. package/dist/components/table/table.css +1255 -0
  67. package/dist/components/table/table.d.ts +73 -0
  68. package/dist/components/table/table.js +1022 -0
  69. package/dist/components/tabs/tabs.css +1076 -0
  70. package/dist/components/tabs/tabs.d.ts +24 -0
  71. package/dist/components/tabs/tabs.js +256 -0
  72. package/dist/components/tag/tag.css +1124 -0
  73. package/dist/components/tag/tag.d.ts +33 -0
  74. package/dist/components/tag/tag.js +237 -0
  75. package/dist/index.d.ts +23 -0
  76. package/dist/index.js +23 -0
  77. package/dist/layouts/form-layout/form-layout.d.ts +6 -0
  78. package/dist/layouts/form-layout/form-layout.js +18 -0
  79. package/dist/layouts/stack/layout.css +1003 -0
  80. package/dist/layouts/stack/stack.d.ts +9 -0
  81. package/dist/layouts/stack/stack.js +27 -0
  82. package/dist/number-input/cursor.d.ts +9 -0
  83. package/dist/number-input/cursor.js +44 -0
  84. package/dist/number-input/format.d.ts +5 -0
  85. package/dist/number-input/format.js +50 -0
  86. package/dist/number-input/index.d.ts +5 -0
  87. package/dist/number-input/index.js +2 -0
  88. package/dist/number-input/number-input.d.ts +9 -0
  89. package/dist/number-input/number-input.js +101 -0
  90. package/dist/number-input/percentage.d.ts +3 -0
  91. package/dist/number-input/percentage.js +28 -0
  92. package/dist/number-input/types.d.ts +5 -0
  93. package/dist/number-input/types.js +0 -0
  94. package/dist/number-input/use-number-input.d.ts +30 -0
  95. package/dist/number-input/use-number-input.js +211 -0
  96. package/dist/number-input/validate.d.ts +3 -0
  97. package/dist/number-input/validate.js +17 -0
  98. package/dist/provider/tao-provider.d.ts +42 -0
  99. package/dist/provider/tao-provider.js +67 -0
  100. package/dist/theme/control.css +1061 -0
  101. package/dist/theme/theme.css +957 -0
  102. package/dist/utils/semantic.d.ts +10 -0
  103. package/dist/utils/semantic.js +5 -0
  104. package/llms.txt +67 -0
  105. package/package.json +97 -0
@@ -0,0 +1,32 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type TaoSize, type TaoVariant } from '../../provider/tao-provider';
3
+ import './select.css';
4
+ export interface SelectOption {
5
+ label: ReactNode;
6
+ value: string;
7
+ disabled?: boolean;
8
+ }
9
+ export interface SelectProps {
10
+ options: SelectOption[];
11
+ value?: string;
12
+ onChange?: (value: string) => void;
13
+ placeholder?: string;
14
+ size?: TaoSize;
15
+ variant?: TaoVariant;
16
+ disabled?: boolean;
17
+ /** Show search input in dropdown */
18
+ showSearch?: boolean;
19
+ /** Custom filter function, default matches label string */
20
+ filterOption?: (input: string, option: SelectOption) => boolean;
21
+ /** Allow clearing the value */
22
+ allowClear?: boolean;
23
+ /** Show loading spinner */
24
+ loading?: boolean;
25
+ /** Content when no options match */
26
+ notFoundContent?: ReactNode;
27
+ /** Prefix icon/element */
28
+ prefix?: ReactNode;
29
+ /** Force mobile mode (bottom sheet) regardless of screen size */
30
+ mobile?: boolean;
31
+ }
32
+ export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,532 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { useState } from "react";
4
+ import { useTaoConfig } from "../../provider/tao-provider.js";
5
+ import { MobileSelectDrawer } from "./mobile-select.js";
6
+ import "./select.css";
7
+ import { useIsMobile } from "./use-is-mobile.js";
8
+ import * as __rspack_external__radix_ui_react_select_36a82244 from "@radix-ui/react-select";
9
+ const defaultFilter = (input, option)=>{
10
+ const label = 'string' == typeof option.label ? option.label : String(option.label);
11
+ return label.toLowerCase().includes(input.toLowerCase());
12
+ };
13
+ function Select(props) {
14
+ const $ = c(95);
15
+ const { options, value, onChange, placeholder, size, variant, disabled, showSearch, filterOption, allowClear, loading, notFoundContent: t0, prefix, mobile } = props;
16
+ const notFoundContent = void 0 === t0 ? "No results" : t0;
17
+ const ctx = useTaoConfig();
18
+ const resolvedSize = size ?? ctx.size;
19
+ const resolvedVariant = variant ?? ctx.variant;
20
+ const resolvedDisabled = disabled ?? ctx.disabled;
21
+ const autoMobile = useIsMobile();
22
+ const isMobile = mobile ?? autoMobile;
23
+ const [open, setOpen] = useState(false);
24
+ const [search, setSearch] = useState("");
25
+ const [hovering, setHovering] = useState(false);
26
+ let t1;
27
+ bb0: {
28
+ if (!showSearch || !search) {
29
+ t1 = options;
30
+ break bb0;
31
+ }
32
+ const fn = filterOption ?? defaultFilter;
33
+ let t2;
34
+ if ($[0] !== fn || $[1] !== options || $[2] !== search) {
35
+ let t3;
36
+ if ($[4] !== fn || $[5] !== search) {
37
+ t3 = (o)=>fn(search, o);
38
+ $[4] = fn;
39
+ $[5] = search;
40
+ $[6] = t3;
41
+ } else t3 = $[6];
42
+ t2 = options.filter(t3);
43
+ $[0] = fn;
44
+ $[1] = options;
45
+ $[2] = search;
46
+ $[3] = t2;
47
+ } else t2 = $[3];
48
+ t1 = t2;
49
+ }
50
+ const filteredOptions = t1;
51
+ let t2;
52
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
53
+ t2 = (nextOpen)=>{
54
+ setOpen(nextOpen);
55
+ if (!nextOpen) setSearch("");
56
+ };
57
+ $[7] = t2;
58
+ } else t2 = $[7];
59
+ const handleOpenChange = t2;
60
+ let t3;
61
+ if ($[8] !== onChange) {
62
+ t3 = (e)=>{
63
+ e.stopPropagation();
64
+ onChange?.("");
65
+ };
66
+ $[8] = onChange;
67
+ $[9] = t3;
68
+ } else t3 = $[9];
69
+ const handleClear = t3;
70
+ const showClearBtn = allowClear && value && !resolvedDisabled;
71
+ let t4;
72
+ if ($[10] !== options || $[11] !== value) {
73
+ let t5;
74
+ if ($[13] !== value) {
75
+ t5 = (o_0)=>o_0.value === value;
76
+ $[13] = value;
77
+ $[14] = t5;
78
+ } else t5 = $[14];
79
+ t4 = options.find(t5);
80
+ $[10] = options;
81
+ $[11] = value;
82
+ $[12] = t4;
83
+ } else t4 = $[12];
84
+ const selectedOption = t4;
85
+ if (isMobile) {
86
+ const t5 = resolvedDisabled || void 0;
87
+ let t6;
88
+ let t7;
89
+ let t8;
90
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
91
+ t6 = ()=>setOpen(true);
92
+ t7 = ()=>setHovering(true);
93
+ t8 = ()=>setHovering(false);
94
+ $[15] = t6;
95
+ $[16] = t7;
96
+ $[17] = t8;
97
+ } else {
98
+ t6 = $[15];
99
+ t7 = $[16];
100
+ t8 = $[17];
101
+ }
102
+ let t9;
103
+ if ($[18] !== prefix) {
104
+ t9 = null != prefix && /*#__PURE__*/ jsx("span", {
105
+ "data-tao-select-prefix": "",
106
+ children: prefix
107
+ });
108
+ $[18] = prefix;
109
+ $[19] = t9;
110
+ } else t9 = $[19];
111
+ let t10;
112
+ if ($[20] !== placeholder || $[21] !== selectedOption) {
113
+ t10 = selectedOption ? selectedOption.label : /*#__PURE__*/ jsx("span", {
114
+ "data-tao-select-placeholder": "",
115
+ children: placeholder
116
+ });
117
+ $[20] = placeholder;
118
+ $[21] = selectedOption;
119
+ $[22] = t10;
120
+ } else t10 = $[22];
121
+ let t11;
122
+ if ($[23] !== t10) {
123
+ t11 = /*#__PURE__*/ jsx("span", {
124
+ "data-tao-select-value": "",
125
+ children: t10
126
+ });
127
+ $[23] = t10;
128
+ $[24] = t11;
129
+ } else t11 = $[24];
130
+ let t12;
131
+ if ($[25] !== loading) {
132
+ t12 = loading && /*#__PURE__*/ jsx(LoadingIcon, {});
133
+ $[25] = loading;
134
+ $[26] = t12;
135
+ } else t12 = $[26];
136
+ let t13;
137
+ if ($[27] !== handleClear || $[28] !== hovering || $[29] !== showClearBtn) {
138
+ t13 = showClearBtn && hovering ? /*#__PURE__*/ jsx("span", {
139
+ "data-tao-select-clear": "",
140
+ onClick: handleClear,
141
+ role: "button",
142
+ "aria-label": "Clear",
143
+ children: /*#__PURE__*/ jsx(CloseIcon, {})
144
+ }) : /*#__PURE__*/ jsx("span", {
145
+ "data-tao-select-icon": "",
146
+ children: /*#__PURE__*/ jsx(ChevronDownIcon, {})
147
+ });
148
+ $[27] = handleClear;
149
+ $[28] = hovering;
150
+ $[29] = showClearBtn;
151
+ $[30] = t13;
152
+ } else t13 = $[30];
153
+ let t14;
154
+ if ($[31] !== t12 || $[32] !== t13) {
155
+ t14 = /*#__PURE__*/ jsxs("span", {
156
+ "data-tao-select-icons": "",
157
+ children: [
158
+ t12,
159
+ t13
160
+ ]
161
+ });
162
+ $[31] = t12;
163
+ $[32] = t13;
164
+ $[33] = t14;
165
+ } else t14 = $[33];
166
+ let t15;
167
+ if ($[34] !== resolvedDisabled || $[35] !== resolvedSize || $[36] !== resolvedVariant || $[37] !== t11 || $[38] !== t14 || $[39] !== t5 || $[40] !== t9) {
168
+ t15 = /*#__PURE__*/ jsxs("button", {
169
+ type: "button",
170
+ "data-tao-control": "",
171
+ "data-tao-select": "",
172
+ "data-tao-size": resolvedSize,
173
+ "data-tao-variant": resolvedVariant,
174
+ "data-tao-disabled": t5,
175
+ disabled: resolvedDisabled,
176
+ onClick: t6,
177
+ onMouseEnter: t7,
178
+ onMouseLeave: t8,
179
+ children: [
180
+ t9,
181
+ t11,
182
+ t14
183
+ ]
184
+ });
185
+ $[34] = resolvedDisabled;
186
+ $[35] = resolvedSize;
187
+ $[36] = resolvedVariant;
188
+ $[37] = t11;
189
+ $[38] = t14;
190
+ $[39] = t5;
191
+ $[40] = t9;
192
+ $[41] = t15;
193
+ } else t15 = $[41];
194
+ let t16;
195
+ if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
196
+ t16 = ()=>handleOpenChange(false);
197
+ $[42] = t16;
198
+ } else t16 = $[42];
199
+ let t17;
200
+ if ($[43] !== filterOption || $[44] !== notFoundContent || $[45] !== onChange || $[46] !== open || $[47] !== options || $[48] !== placeholder || $[49] !== showSearch || $[50] !== value) {
201
+ t17 = /*#__PURE__*/ jsx(MobileSelectDrawer, {
202
+ open: open,
203
+ onClose: t16,
204
+ options: options,
205
+ value: value,
206
+ onChange: onChange,
207
+ placeholder: placeholder,
208
+ showSearch: showSearch,
209
+ filterOption: filterOption,
210
+ notFoundContent: notFoundContent
211
+ });
212
+ $[43] = filterOption;
213
+ $[44] = notFoundContent;
214
+ $[45] = onChange;
215
+ $[46] = open;
216
+ $[47] = options;
217
+ $[48] = placeholder;
218
+ $[49] = showSearch;
219
+ $[50] = value;
220
+ $[51] = t17;
221
+ } else t17 = $[51];
222
+ let t18;
223
+ if ($[52] !== t15 || $[53] !== t17) {
224
+ t18 = /*#__PURE__*/ jsxs(Fragment, {
225
+ children: [
226
+ t15,
227
+ t17
228
+ ]
229
+ });
230
+ $[52] = t15;
231
+ $[53] = t17;
232
+ $[54] = t18;
233
+ } else t18 = $[54];
234
+ return t18;
235
+ }
236
+ const t5 = resolvedDisabled || void 0;
237
+ let t6;
238
+ let t7;
239
+ if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
240
+ t6 = ()=>setHovering(true);
241
+ t7 = ()=>setHovering(false);
242
+ $[55] = t6;
243
+ $[56] = t7;
244
+ } else {
245
+ t6 = $[55];
246
+ t7 = $[56];
247
+ }
248
+ let t8;
249
+ if ($[57] !== prefix) {
250
+ t8 = null != prefix && /*#__PURE__*/ jsx("span", {
251
+ "data-tao-select-prefix": "",
252
+ children: prefix
253
+ });
254
+ $[57] = prefix;
255
+ $[58] = t8;
256
+ } else t8 = $[58];
257
+ let t9;
258
+ if ($[59] !== placeholder) {
259
+ t9 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_select_36a82244.Value, {
260
+ placeholder: placeholder
261
+ });
262
+ $[59] = placeholder;
263
+ $[60] = t9;
264
+ } else t9 = $[60];
265
+ let t10;
266
+ if ($[61] !== loading) {
267
+ t10 = loading && /*#__PURE__*/ jsx(LoadingIcon, {});
268
+ $[61] = loading;
269
+ $[62] = t10;
270
+ } else t10 = $[62];
271
+ let t11;
272
+ if ($[63] !== handleClear || $[64] !== hovering || $[65] !== showClearBtn) {
273
+ t11 = showClearBtn && hovering ? /*#__PURE__*/ jsx("span", {
274
+ "data-tao-select-clear": "",
275
+ onClick: handleClear,
276
+ role: "button",
277
+ "aria-label": "Clear",
278
+ children: /*#__PURE__*/ jsx(CloseIcon, {})
279
+ }) : /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_select_36a82244.Icon, {
280
+ "data-tao-select-icon": "",
281
+ children: /*#__PURE__*/ jsx(ChevronDownIcon, {})
282
+ });
283
+ $[63] = handleClear;
284
+ $[64] = hovering;
285
+ $[65] = showClearBtn;
286
+ $[66] = t11;
287
+ } else t11 = $[66];
288
+ let t12;
289
+ if ($[67] !== t10 || $[68] !== t11) {
290
+ t12 = /*#__PURE__*/ jsxs("span", {
291
+ "data-tao-select-icons": "",
292
+ children: [
293
+ t10,
294
+ t11
295
+ ]
296
+ });
297
+ $[67] = t10;
298
+ $[68] = t11;
299
+ $[69] = t12;
300
+ } else t12 = $[69];
301
+ let t13;
302
+ if ($[70] !== resolvedSize || $[71] !== resolvedVariant || $[72] !== t12 || $[73] !== t5 || $[74] !== t8 || $[75] !== t9) {
303
+ t13 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_select_36a82244.Trigger, {
304
+ "data-tao-control": "",
305
+ "data-tao-select": "",
306
+ "data-tao-size": resolvedSize,
307
+ "data-tao-variant": resolvedVariant,
308
+ "data-tao-disabled": t5,
309
+ onMouseEnter: t6,
310
+ onMouseLeave: t7,
311
+ children: [
312
+ t8,
313
+ t9,
314
+ t12
315
+ ]
316
+ });
317
+ $[70] = resolvedSize;
318
+ $[71] = resolvedVariant;
319
+ $[72] = t12;
320
+ $[73] = t5;
321
+ $[74] = t8;
322
+ $[75] = t9;
323
+ $[76] = t13;
324
+ } else t13 = $[76];
325
+ let t14;
326
+ if ($[77] !== search || $[78] !== showSearch) {
327
+ t14 = showSearch && /*#__PURE__*/ jsxs("div", {
328
+ "data-tao-select-search": "",
329
+ children: [
330
+ /*#__PURE__*/ jsx(SearchIcon, {}),
331
+ /*#__PURE__*/ jsx("input", {
332
+ "data-tao-select-search-input": "",
333
+ value: search,
334
+ onChange: (e_0)=>setSearch(e_0.target.value),
335
+ placeholder: "Search...",
336
+ autoFocus: true
337
+ })
338
+ ]
339
+ });
340
+ $[77] = search;
341
+ $[78] = showSearch;
342
+ $[79] = t14;
343
+ } else t14 = $[79];
344
+ let t15;
345
+ if ($[80] !== filteredOptions || $[81] !== notFoundContent) {
346
+ t15 = filteredOptions.length > 0 ? filteredOptions.map(_temp) : /*#__PURE__*/ jsx("div", {
347
+ "data-tao-select-empty": "",
348
+ children: notFoundContent
349
+ });
350
+ $[80] = filteredOptions;
351
+ $[81] = notFoundContent;
352
+ $[82] = t15;
353
+ } else t15 = $[82];
354
+ let t16;
355
+ if ($[83] !== t15) {
356
+ t16 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_select_36a82244.Viewport, {
357
+ "data-tao-select-viewport": "",
358
+ children: t15
359
+ });
360
+ $[83] = t15;
361
+ $[84] = t16;
362
+ } else t16 = $[84];
363
+ let t17;
364
+ if ($[85] !== t14 || $[86] !== t16) {
365
+ t17 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_select_36a82244.Portal, {
366
+ children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_select_36a82244.Content, {
367
+ "data-tao-select-content": "",
368
+ position: "popper",
369
+ sideOffset: 4,
370
+ children: [
371
+ t14,
372
+ t16
373
+ ]
374
+ })
375
+ });
376
+ $[85] = t14;
377
+ $[86] = t16;
378
+ $[87] = t17;
379
+ } else t17 = $[87];
380
+ let t18;
381
+ if ($[88] !== onChange || $[89] !== open || $[90] !== resolvedDisabled || $[91] !== t13 || $[92] !== t17 || $[93] !== value) {
382
+ t18 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_select_36a82244.Root, {
383
+ value: value,
384
+ onValueChange: onChange,
385
+ disabled: resolvedDisabled,
386
+ open: open,
387
+ onOpenChange: handleOpenChange,
388
+ children: [
389
+ t13,
390
+ t17
391
+ ]
392
+ });
393
+ $[88] = onChange;
394
+ $[89] = open;
395
+ $[90] = resolvedDisabled;
396
+ $[91] = t13;
397
+ $[92] = t17;
398
+ $[93] = value;
399
+ $[94] = t18;
400
+ } else t18 = $[94];
401
+ return t18;
402
+ }
403
+ function _temp(opt) {
404
+ return /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_select_36a82244.Item, {
405
+ value: opt.value,
406
+ disabled: opt.disabled,
407
+ "data-tao-select-item": "",
408
+ children: [
409
+ /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_select_36a82244.ItemText, {
410
+ children: opt.label
411
+ }),
412
+ /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_select_36a82244.ItemIndicator, {
413
+ "data-tao-select-check": "",
414
+ children: /*#__PURE__*/ jsx(CheckIcon, {})
415
+ })
416
+ ]
417
+ }, opt.value);
418
+ }
419
+ function ChevronDownIcon() {
420
+ const $ = c(1);
421
+ let t0;
422
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
423
+ t0 = /*#__PURE__*/ jsx("svg", {
424
+ width: "16",
425
+ height: "16",
426
+ viewBox: "0 0 24 24",
427
+ fill: "none",
428
+ stroke: "currentColor",
429
+ strokeWidth: "2",
430
+ strokeLinecap: "round",
431
+ strokeLinejoin: "round",
432
+ children: /*#__PURE__*/ jsx("path", {
433
+ d: "m6 9 6 6 6-6"
434
+ })
435
+ });
436
+ $[0] = t0;
437
+ } else t0 = $[0];
438
+ return t0;
439
+ }
440
+ function CheckIcon() {
441
+ const $ = c(1);
442
+ let t0;
443
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
444
+ t0 = /*#__PURE__*/ jsx("svg", {
445
+ width: "16",
446
+ height: "16",
447
+ viewBox: "0 0 24 24",
448
+ fill: "none",
449
+ stroke: "currentColor",
450
+ strokeWidth: "2.5",
451
+ strokeLinecap: "round",
452
+ strokeLinejoin: "round",
453
+ children: /*#__PURE__*/ jsx("polyline", {
454
+ points: "20 6 9 17 4 12"
455
+ })
456
+ });
457
+ $[0] = t0;
458
+ } else t0 = $[0];
459
+ return t0;
460
+ }
461
+ function CloseIcon() {
462
+ const $ = c(1);
463
+ let t0;
464
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
465
+ t0 = /*#__PURE__*/ jsx("svg", {
466
+ width: "14",
467
+ height: "14",
468
+ viewBox: "0 0 24 24",
469
+ fill: "none",
470
+ stroke: "currentColor",
471
+ strokeWidth: "2",
472
+ strokeLinecap: "round",
473
+ strokeLinejoin: "round",
474
+ children: /*#__PURE__*/ jsx("path", {
475
+ d: "M18 6 6 18M6 6l12 12"
476
+ })
477
+ });
478
+ $[0] = t0;
479
+ } else t0 = $[0];
480
+ return t0;
481
+ }
482
+ function SearchIcon() {
483
+ const $ = c(1);
484
+ let t0;
485
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
486
+ t0 = /*#__PURE__*/ jsxs("svg", {
487
+ width: "14",
488
+ height: "14",
489
+ viewBox: "0 0 24 24",
490
+ fill: "none",
491
+ stroke: "currentColor",
492
+ strokeWidth: "2",
493
+ strokeLinecap: "round",
494
+ strokeLinejoin: "round",
495
+ children: [
496
+ /*#__PURE__*/ jsx("circle", {
497
+ cx: "11",
498
+ cy: "11",
499
+ r: "8"
500
+ }),
501
+ /*#__PURE__*/ jsx("path", {
502
+ d: "m21 21-4.3-4.3"
503
+ })
504
+ ]
505
+ });
506
+ $[0] = t0;
507
+ } else t0 = $[0];
508
+ return t0;
509
+ }
510
+ function LoadingIcon() {
511
+ const $ = c(1);
512
+ let t0;
513
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
514
+ t0 = /*#__PURE__*/ jsx("svg", {
515
+ "data-tao-select-loading": "",
516
+ width: "14",
517
+ height: "14",
518
+ viewBox: "0 0 24 24",
519
+ fill: "none",
520
+ stroke: "currentColor",
521
+ strokeWidth: "2",
522
+ strokeLinecap: "round",
523
+ strokeLinejoin: "round",
524
+ children: /*#__PURE__*/ jsx("path", {
525
+ d: "M21 12a9 9 0 1 1-6.219-8.56"
526
+ })
527
+ });
528
+ $[0] = t0;
529
+ } else t0 = $[0];
530
+ return t0;
531
+ }
532
+ export { Select };
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,30 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { useEffect, useState } from "react";
3
+ const MOBILE_QUERY = '(max-width: 479px)';
4
+ function useIsMobile() {
5
+ const $ = c(2);
6
+ const [isMobile, setIsMobile] = useState(_temp);
7
+ let t0;
8
+ let t1;
9
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
10
+ t0 = ()=>{
11
+ const mql = window.matchMedia(MOBILE_QUERY);
12
+ const handler = (e)=>setIsMobile(e.matches);
13
+ mql.addEventListener("change", handler);
14
+ return ()=>mql.removeEventListener("change", handler);
15
+ };
16
+ t1 = [];
17
+ $[0] = t0;
18
+ $[1] = t1;
19
+ } else {
20
+ t0 = $[0];
21
+ t1 = $[1];
22
+ }
23
+ useEffect(t0, t1);
24
+ return isMobile;
25
+ }
26
+ function _temp() {
27
+ if ("u" < typeof window) return false;
28
+ return window.matchMedia(MOBILE_QUERY).matches;
29
+ }
30
+ export { useIsMobile };