@sunggang/ui-lib 0.3.65 → 0.4.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 (94) hide show
  1. package/BaseCkeditor.cjs.js +66855 -0
  2. package/BaseCkeditor.esm.js +15 -18
  3. package/BigCalender.cjs.d.ts +1 -0
  4. package/BigCalender.cjs.default.js +1 -0
  5. package/BigCalender.cjs.js +20404 -0
  6. package/BigCalender.cjs.mjs +2 -0
  7. package/BigCalender.esm.d.ts +1 -0
  8. package/BigCalender.esm.js +20393 -0
  9. package/CkEditor.cjs.d.ts +1 -0
  10. package/CkEditor.cjs.default.js +1 -0
  11. package/CkEditor.cjs.js +31 -0
  12. package/CkEditor.cjs.mjs +2 -0
  13. package/CkEditor.esm.d.ts +1 -0
  14. package/CkEditor.esm.js +23 -0
  15. package/DataTable.cjs.d.ts +1 -0
  16. package/DataTable.cjs.default.js +1 -0
  17. package/DataTable.cjs.js +968 -0
  18. package/DataTable.cjs.mjs +2 -0
  19. package/DataTable.esm.d.ts +1 -0
  20. package/DataTable.esm.js +943 -0
  21. package/DropImage.cjs.d.ts +1 -0
  22. package/DropImage.cjs.default.js +1 -0
  23. package/DropImage.cjs.js +16845 -0
  24. package/DropImage.cjs.mjs +2 -0
  25. package/DropImage.esm.d.ts +1 -0
  26. package/DropImage.esm.js +16834 -0
  27. package/Form.cjs.d.ts +1 -0
  28. package/Form.cjs.default.js +1 -0
  29. package/Form.cjs.js +402 -0
  30. package/Form.cjs.mjs +2 -0
  31. package/Form.esm.d.ts +1 -0
  32. package/Form.esm.js +390 -0
  33. package/FormProvider.cjs.d.ts +1 -0
  34. package/FormProvider.cjs.default.js +1 -0
  35. package/FormProvider.cjs.js +81 -0
  36. package/FormProvider.cjs.mjs +2 -0
  37. package/FormProvider.esm.d.ts +1 -0
  38. package/FormProvider.esm.js +71 -0
  39. package/LiffProvider.cjs.d.ts +1 -0
  40. package/LiffProvider.cjs.default.js +1 -0
  41. package/LiffProvider.cjs.js +1120 -0
  42. package/LiffProvider.cjs.mjs +2 -0
  43. package/LiffProvider.esm.d.ts +1 -0
  44. package/LiffProvider.esm.js +1114 -0
  45. package/Modal.cjs.js +168 -0
  46. package/Modal.esm.js +164 -0
  47. package/Tabs.cjs.d.ts +1 -0
  48. package/Tabs.cjs.default.js +1 -0
  49. package/Tabs.cjs.js +62 -0
  50. package/Tabs.cjs.mjs +2 -0
  51. package/Tabs.esm.d.ts +1 -0
  52. package/Tabs.esm.js +58 -0
  53. package/_commonjsHelpers.cjs.js +30 -0
  54. package/_commonjsHelpers.esm.js +25 -0
  55. package/_tslib.cjs.js +232 -0
  56. package/_tslib.esm.js +224 -0
  57. package/baseSwitch.cjs.js +25830 -0
  58. package/baseSwitch.esm.js +25785 -0
  59. package/index.cjs.css +4832 -0
  60. package/index.cjs.d.ts +1 -0
  61. package/index.cjs.default.js +1 -0
  62. package/index.cjs.js +1962 -0
  63. package/index.cjs.mjs +2 -0
  64. package/index.cjs2.js +1064 -0
  65. package/index.cjs3.js +6424 -0
  66. package/index.esm.cjs.js +3406 -0
  67. package/index.esm.css +3624 -3632
  68. package/index.esm.esm.js +3375 -0
  69. package/index.esm.js +1902 -22
  70. package/index.esm2.js +131 -81165
  71. package/index.esm3.js +2 -25
  72. package/inheritsLoose.cjs.js +9 -0
  73. package/inheritsLoose.esm.js +7 -0
  74. package/input.cjs.js +244 -0
  75. package/input.esm.js +220 -0
  76. package/memoize-one.esm.cjs.js +204 -0
  77. package/memoize-one.esm.esm.js +189 -0
  78. package/package.json +57 -5
  79. package/setPrototypeOf.cjs.js +91 -0
  80. package/setPrototypeOf.esm.js +83 -0
  81. package/src/BigCalender.d.ts +2 -0
  82. package/src/CkEditor.d.ts +1 -0
  83. package/src/DataTable.d.ts +2 -0
  84. package/src/DropImage.d.ts +2 -0
  85. package/src/Form.d.ts +3 -0
  86. package/src/FormProvider.d.ts +1 -0
  87. package/src/LiffProvider.d.ts +1 -0
  88. package/src/Tabs.d.ts +1 -0
  89. package/src/index.d.ts +8 -21
  90. package/src/lib/Form/types.d.ts +1 -0
  91. package/styled-components.esm.cjs.js +1621 -0
  92. package/styled-components.esm.esm.js +1615 -0
  93. package/utils.cjs.js +13 -0
  94. package/utils.esm.js +11 -0
package/index.cjs.js ADDED
@@ -0,0 +1,1962 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var input = require('./input.cjs.js');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var React = require('react');
8
+ var SwitchPrimitives = require('@radix-ui/react-switch');
9
+ var utils = require('./utils.cjs.js');
10
+ var index_esm = require('./index.esm.cjs.js');
11
+ var baseSwitch = require('./baseSwitch.cjs.js');
12
+ var format = require('date-fns/format');
13
+ var lucideReact = require('lucide-react');
14
+ var react = require('@iconify/react');
15
+ var reactDayPicker = require('react-day-picker');
16
+ var zhTW = require('date-fns/locale/zh-TW');
17
+ var PopoverPrimitive = require('@radix-ui/react-popover');
18
+ var reactDateRange = require('react-date-range');
19
+ var locales = require('react-date-range/dist/locale/index.js');
20
+ var addDays = require('date-fns/addDays');
21
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
22
+ var reactIcons = require('@radix-ui/react-icons');
23
+ var inputOtp = require('input-otp');
24
+ require('@radix-ui/react-slot');
25
+ require('class-variance-authority');
26
+ require('clsx');
27
+ require('tailwind-merge');
28
+ require('next/dynamic');
29
+ require('./setPrototypeOf.cjs.js');
30
+ require('./memoize-one.esm.cjs.js');
31
+ require('@emotion/react');
32
+ require('react-dom');
33
+ require('@mui/material');
34
+ require('./styled-components.esm.cjs.js');
35
+ require('./_tslib.cjs.js');
36
+ require('./_commonjsHelpers.cjs.js');
37
+ require('./Modal.cjs.js');
38
+ require('@radix-ui/react-select');
39
+
40
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
41
+
42
+ function _interopNamespace(e) {
43
+ if (e && e.__esModule) return e;
44
+ var n = Object.create(null);
45
+ if (e) {
46
+ Object.keys(e).forEach(function (k) {
47
+ if (k !== 'default') {
48
+ var d = Object.getOwnPropertyDescriptor(e, k);
49
+ Object.defineProperty(n, k, d.get ? d : {
50
+ enumerable: true,
51
+ get: function () { return e[k]; }
52
+ });
53
+ }
54
+ });
55
+ }
56
+ n["default"] = e;
57
+ return Object.freeze(n);
58
+ }
59
+
60
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
61
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
62
+ var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
63
+ var format__default = /*#__PURE__*/_interopDefaultLegacy(format);
64
+ var zhTW__default = /*#__PURE__*/_interopDefaultLegacy(zhTW);
65
+ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
66
+ var locales__namespace = /*#__PURE__*/_interopNamespace(locales);
67
+ var addDays__default = /*#__PURE__*/_interopDefaultLegacy(addDays);
68
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
69
+
70
+ function _define_property$6(obj, key, value) {
71
+ if (key in obj) {
72
+ Object.defineProperty(obj, key, {
73
+ value: value,
74
+ enumerable: true,
75
+ configurable: true,
76
+ writable: true
77
+ });
78
+ } else {
79
+ obj[key] = value;
80
+ }
81
+ return obj;
82
+ }
83
+ function _object_spread$6(target) {
84
+ for(var i = 1; i < arguments.length; i++){
85
+ var source = arguments[i] != null ? arguments[i] : {};
86
+ var ownKeys = Object.keys(source);
87
+ if (typeof Object.getOwnPropertySymbols === "function") {
88
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
89
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
90
+ }));
91
+ }
92
+ ownKeys.forEach(function(key) {
93
+ _define_property$6(target, key, source[key]);
94
+ });
95
+ }
96
+ return target;
97
+ }
98
+ function ownKeys$5(object, enumerableOnly) {
99
+ var keys = Object.keys(object);
100
+ if (Object.getOwnPropertySymbols) {
101
+ var symbols = Object.getOwnPropertySymbols(object);
102
+ if (enumerableOnly) {
103
+ symbols = symbols.filter(function(sym) {
104
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
105
+ });
106
+ }
107
+ keys.push.apply(keys, symbols);
108
+ }
109
+ return keys;
110
+ }
111
+ function _object_spread_props$5(target, source) {
112
+ source = source != null ? source : {};
113
+ if (Object.getOwnPropertyDescriptors) {
114
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
115
+ } else {
116
+ ownKeys$5(Object(source)).forEach(function(key) {
117
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
118
+ });
119
+ }
120
+ return target;
121
+ }
122
+ function _object_without_properties$4(source, excluded) {
123
+ if (source == null) return {};
124
+ var target = _object_without_properties_loose$4(source, excluded);
125
+ var key, i;
126
+ if (Object.getOwnPropertySymbols) {
127
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
128
+ for(i = 0; i < sourceSymbolKeys.length; i++){
129
+ key = sourceSymbolKeys[i];
130
+ if (excluded.indexOf(key) >= 0) continue;
131
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
132
+ target[key] = source[key];
133
+ }
134
+ }
135
+ return target;
136
+ }
137
+ function _object_without_properties_loose$4(source, excluded) {
138
+ if (source == null) return {};
139
+ var target = {};
140
+ var sourceKeys = Object.keys(source);
141
+ var key, i;
142
+ for(i = 0; i < sourceKeys.length; i++){
143
+ key = sourceKeys[i];
144
+ if (excluded.indexOf(key) >= 0) continue;
145
+ target[key] = source[key];
146
+ }
147
+ return target;
148
+ }
149
+ var Switch = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
150
+ var _param_size = _param.size, size = _param_size === void 0 ? "large" : _param_size, color = _param.color, props = _object_without_properties$4(_param, [
151
+ "size",
152
+ "color"
153
+ ]);
154
+ var control = index_esm.useForm().control;
155
+ var name = props.name, className = props.className;
156
+ var bgColor = color === "blue" ? "data-[state=checked]:bg-blue-500" : color === "red" ? "data-[state=checked]:bg-red-500" : color === "green" ? "data-[state=checked]:bg-green-500" : color === "yellow" ? "data-[state=checked]:bg-yellow-500" : "data-[state=checked]:bg-blue-500";
157
+ var sizeClass = {
158
+ small: {
159
+ root: "h-4 w-7",
160
+ thumb: "h-3 w-3 data-[state=checked]:translate-x-3"
161
+ },
162
+ medium: {
163
+ root: "h-5 w-9",
164
+ thumb: "h-4 w-4 data-[state=checked]:translate-x-4"
165
+ },
166
+ large: {
167
+ root: "h-6 w-11",
168
+ thumb: "h-5 w-5 data-[state=checked]:translate-x-5"
169
+ }
170
+ };
171
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
172
+ className: [
173
+ "h-24 w-full",
174
+ className
175
+ ].join(" "),
176
+ children: /*#__PURE__*/ jsxRuntime.jsx(index_esm.Controller, {
177
+ name: name || "",
178
+ control: control,
179
+ render: function(param) {
180
+ param.field;
181
+ return /*#__PURE__*/ jsxRuntime.jsx(SwitchPrimitives__namespace.Root, _object_spread_props$5(_object_spread$6({
182
+ className: utils.cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", bgColor, sizeClass[size].root, "data-[state=unchecked]:bg-input")
183
+ }, props), {
184
+ ref: ref,
185
+ children: /*#__PURE__*/ jsxRuntime.jsx(SwitchPrimitives__namespace.Thumb, {
186
+ className: utils.cn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0", sizeClass[size].thumb)
187
+ })
188
+ }));
189
+ }
190
+ })
191
+ });
192
+ });
193
+
194
+ function _define_property$5(obj, key, value) {
195
+ if (key in obj) {
196
+ Object.defineProperty(obj, key, {
197
+ value: value,
198
+ enumerable: true,
199
+ configurable: true,
200
+ writable: true
201
+ });
202
+ } else {
203
+ obj[key] = value;
204
+ }
205
+ return obj;
206
+ }
207
+ function _extends$1() {
208
+ _extends$1 = Object.assign || function(target) {
209
+ for(var i = 1; i < arguments.length; i++){
210
+ var source = arguments[i];
211
+ for(var key in source){
212
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
213
+ target[key] = source[key];
214
+ }
215
+ }
216
+ }
217
+ return target;
218
+ };
219
+ return _extends$1.apply(this, arguments);
220
+ }
221
+ function _object_destructuring_empty$1(o) {
222
+ if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
223
+ return o;
224
+ }
225
+ function _object_spread$5(target) {
226
+ for(var i = 1; i < arguments.length; i++){
227
+ var source = arguments[i] != null ? arguments[i] : {};
228
+ var ownKeys = Object.keys(source);
229
+ if (typeof Object.getOwnPropertySymbols === "function") {
230
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
231
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
232
+ }));
233
+ }
234
+ ownKeys.forEach(function(key) {
235
+ _define_property$5(target, key, source[key]);
236
+ });
237
+ }
238
+ return target;
239
+ }
240
+ function ownKeys$4(object, enumerableOnly) {
241
+ var keys = Object.keys(object);
242
+ if (Object.getOwnPropertySymbols) {
243
+ var symbols = Object.getOwnPropertySymbols(object);
244
+ if (enumerableOnly) {
245
+ symbols = symbols.filter(function(sym) {
246
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
247
+ });
248
+ }
249
+ keys.push.apply(keys, symbols);
250
+ }
251
+ return keys;
252
+ }
253
+ function _object_spread_props$4(target, source) {
254
+ source = source != null ? source : {};
255
+ if (Object.getOwnPropertyDescriptors) {
256
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
257
+ } else {
258
+ ownKeys$4(Object(source)).forEach(function(key) {
259
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
260
+ });
261
+ }
262
+ return target;
263
+ }
264
+ function _object_without_properties$3(source, excluded) {
265
+ if (source == null) return {};
266
+ var target = _object_without_properties_loose$3(source, excluded);
267
+ var key, i;
268
+ if (Object.getOwnPropertySymbols) {
269
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
270
+ for(i = 0; i < sourceSymbolKeys.length; i++){
271
+ key = sourceSymbolKeys[i];
272
+ if (excluded.indexOf(key) >= 0) continue;
273
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
274
+ target[key] = source[key];
275
+ }
276
+ }
277
+ return target;
278
+ }
279
+ function _object_without_properties_loose$3(source, excluded) {
280
+ if (source == null) return {};
281
+ var target = {};
282
+ var sourceKeys = Object.keys(source);
283
+ var key, i;
284
+ for(i = 0; i < sourceKeys.length; i++){
285
+ key = sourceKeys[i];
286
+ if (excluded.indexOf(key) >= 0) continue;
287
+ target[key] = source[key];
288
+ }
289
+ return target;
290
+ }
291
+ function Calendar(_param) {
292
+ var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties$3(_param, [
293
+ "className",
294
+ "classNames",
295
+ "showOutsideDays"
296
+ ]);
297
+ return /*#__PURE__*/ jsxRuntime.jsx(reactDayPicker.DayPicker, _object_spread_props$4(_object_spread$5({
298
+ showOutsideDays: showOutsideDays,
299
+ className: utils.cn("p-3", className),
300
+ classNames: _object_spread$5({
301
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
302
+ month: "space-y-4",
303
+ caption: "flex justify-center pt-1 relative items-center",
304
+ caption_label: "text-sm font-medium",
305
+ nav: "space-x-1 flex items-center",
306
+ nav_button: utils.cn(input.buttonVariants({
307
+ variant: "outline"
308
+ }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
309
+ nav_button_previous: "absolute left-1",
310
+ nav_button_next: "absolute right-1",
311
+ table: "w-full border-collapse space-y-1",
312
+ head_row: "flex",
313
+ head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
314
+ row: "flex w-full mt-2",
315
+ cell: utils.cn("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md", props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"),
316
+ day: utils.cn(input.buttonVariants({
317
+ variant: "ghost"
318
+ }), "h-8 w-8 p-0 font-normal aria-selected:opacity-100"),
319
+ day_range_start: "day-range-start",
320
+ day_range_end: "day-range-end",
321
+ day_selected: "bg-[#000] text-[#fff] hover:bg-[#000] hover:text-[#fff] focus:bg-[#000] focus:text-[#fff]",
322
+ day_today: "bg-accent text-accent-foreground",
323
+ day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
324
+ day_disabled: "text-muted-foreground opacity-50",
325
+ day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
326
+ day_hidden: "invisible"
327
+ }, classNames),
328
+ components: {
329
+ IconLeft: function(_param) {
330
+ _extends$1({}, _object_destructuring_empty$1(_param));
331
+ return /*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
332
+ icon: "heroicons-solid:arrow-left",
333
+ width: "1rem",
334
+ height: "1rem"
335
+ });
336
+ },
337
+ IconRight: function(_param) {
338
+ _extends$1({}, _object_destructuring_empty$1(_param));
339
+ return /*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
340
+ icon: "heroicons-solid:arrow-right",
341
+ width: "1rem",
342
+ height: "1rem"
343
+ });
344
+ }
345
+ }
346
+ }, props), {
347
+ locale: zhTW__default["default"]
348
+ }));
349
+ }
350
+ Calendar.displayName = "Calendar";
351
+
352
+ function _define_property$4(obj, key, value) {
353
+ if (key in obj) {
354
+ Object.defineProperty(obj, key, {
355
+ value: value,
356
+ enumerable: true,
357
+ configurable: true,
358
+ writable: true
359
+ });
360
+ } else {
361
+ obj[key] = value;
362
+ }
363
+ return obj;
364
+ }
365
+ function _object_spread$4(target) {
366
+ for(var i = 1; i < arguments.length; i++){
367
+ var source = arguments[i] != null ? arguments[i] : {};
368
+ var ownKeys = Object.keys(source);
369
+ if (typeof Object.getOwnPropertySymbols === "function") {
370
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
371
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
372
+ }));
373
+ }
374
+ ownKeys.forEach(function(key) {
375
+ _define_property$4(target, key, source[key]);
376
+ });
377
+ }
378
+ return target;
379
+ }
380
+ function _object_without_properties$2(source, excluded) {
381
+ if (source == null) return {};
382
+ var target = _object_without_properties_loose$2(source, excluded);
383
+ var key, i;
384
+ if (Object.getOwnPropertySymbols) {
385
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
386
+ for(i = 0; i < sourceSymbolKeys.length; i++){
387
+ key = sourceSymbolKeys[i];
388
+ if (excluded.indexOf(key) >= 0) continue;
389
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
390
+ target[key] = source[key];
391
+ }
392
+ }
393
+ return target;
394
+ }
395
+ function _object_without_properties_loose$2(source, excluded) {
396
+ if (source == null) return {};
397
+ var target = {};
398
+ var sourceKeys = Object.keys(source);
399
+ var key, i;
400
+ for(i = 0; i < sourceKeys.length; i++){
401
+ key = sourceKeys[i];
402
+ if (excluded.indexOf(key) >= 0) continue;
403
+ target[key] = source[key];
404
+ }
405
+ return target;
406
+ }
407
+ var Popover = PopoverPrimitive__namespace.Root;
408
+ var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
409
+ var PopoverContent = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
410
+ var className = _param.className, _param_align = _param.align, align = _param_align === void 0 ? "center" : _param_align, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties$2(_param, [
411
+ "className",
412
+ "align",
413
+ "sideOffset"
414
+ ]);
415
+ return /*#__PURE__*/ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, {
416
+ children: /*#__PURE__*/ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, _object_spread$4({
417
+ ref: ref,
418
+ align: align,
419
+ sideOffset: sideOffset,
420
+ className: utils.cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
421
+ }, props))
422
+ });
423
+ });
424
+ PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
425
+
426
+ function DateRangePicker(param) {
427
+ var className = param.className, inputClassName = param.inputClassName, disable = param.disable, _param_isShowCleanBtn = param.isShowCleanBtn, isShowCleanBtn = _param_isShowCleanBtn === void 0 ? true : _param_isShowCleanBtn, onChange = param.onChange, dates = param.dates, setDates = param.setDates;
428
+ var handleDateChange = function(newDate) {
429
+ if (newDate) {
430
+ setDates(newDate);
431
+ if (onChange) onChange(newDate);
432
+ }
433
+ };
434
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
435
+ className: "flex gap-2 items-center",
436
+ children: [
437
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
438
+ className: utils.cn("grid gap-2", className, disable ? "pointer-events-none opacity-55" : "pointer-events-auto opacity-100"),
439
+ children: /*#__PURE__*/ jsxRuntime.jsxs(Popover, {
440
+ children: [
441
+ /*#__PURE__*/ jsxRuntime.jsx(PopoverTrigger, {
442
+ asChild: true,
443
+ children: /*#__PURE__*/ jsxRuntime.jsxs(input.Button, {
444
+ id: "date",
445
+ variant: "outline",
446
+ className: utils.cn("w-[300px] justify-start text-left font-normal", !dates && "text-muted-foreground", inputClassName),
447
+ children: [
448
+ /*#__PURE__*/ jsxRuntime.jsx(lucideReact.Calendar, {
449
+ className: "mr-2 h-4 w-4"
450
+ }),
451
+ (dates === null || dates === void 0 ? void 0 : dates.from) ? dates.to ? /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
452
+ children: [
453
+ format__default["default"](dates.from, "yyyy-MM-dd"),
454
+ " -",
455
+ " ",
456
+ format__default["default"](dates.to, "yyyy-MM-dd")
457
+ ]
458
+ }) : format__default["default"](dates.from, "yyyy-MM-dd") : /*#__PURE__*/ jsxRuntime.jsx("span", {
459
+ children: "請選擇日期"
460
+ })
461
+ ]
462
+ })
463
+ }),
464
+ /*#__PURE__*/ jsxRuntime.jsx(PopoverContent, {
465
+ className: "w-auto p-0",
466
+ align: "start",
467
+ children: /*#__PURE__*/ jsxRuntime.jsx(Calendar, {
468
+ initialFocus: true,
469
+ mode: "range",
470
+ defaultMonth: dates === null || dates === void 0 ? void 0 : dates.from,
471
+ selected: dates,
472
+ onSelect: handleDateChange,
473
+ numberOfMonths: 2
474
+ })
475
+ })
476
+ ]
477
+ })
478
+ }),
479
+ isShowCleanBtn && /*#__PURE__*/ jsxRuntime.jsx(input.Button, {
480
+ variant: "ghost",
481
+ className: utils.cn("justify-start text-left font-normal"),
482
+ onClick: function() {
483
+ return setDates(undefined);
484
+ },
485
+ children: "清除日期"
486
+ })
487
+ ]
488
+ });
489
+ }
490
+
491
+ function _array_like_to_array$2(arr, len) {
492
+ if (len == null || len > arr.length) len = arr.length;
493
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
494
+ return arr2;
495
+ }
496
+ function _array_with_holes$2(arr) {
497
+ if (Array.isArray(arr)) return arr;
498
+ }
499
+ function _iterable_to_array_limit$2(arr, i) {
500
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
501
+ if (_i == null) return;
502
+ var _arr = [];
503
+ var _n = true;
504
+ var _d = false;
505
+ var _s, _e;
506
+ try {
507
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
508
+ _arr.push(_s.value);
509
+ if (i && _arr.length === i) break;
510
+ }
511
+ } catch (err) {
512
+ _d = true;
513
+ _e = err;
514
+ } finally{
515
+ try {
516
+ if (!_n && _i["return"] != null) _i["return"]();
517
+ } finally{
518
+ if (_d) throw _e;
519
+ }
520
+ }
521
+ return _arr;
522
+ }
523
+ function _non_iterable_rest$2() {
524
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
525
+ }
526
+ function _sliced_to_array$2(arr, i) {
527
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
528
+ }
529
+ function _unsupported_iterable_to_array$2(o, minLen) {
530
+ if (!o) return;
531
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
532
+ var n = Object.prototype.toString.call(o).slice(8, -1);
533
+ if (n === "Object" && o.constructor) n = o.constructor.name;
534
+ if (n === "Map" || n === "Set") return Array.from(n);
535
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
536
+ }
537
+ var SingleDatePicker = function(param) {
538
+ var disable = param.disable, onChange = param.onChange;
539
+ var _useState = _sliced_to_array$2(React.useState(), 2), date = _useState[0], setDate = _useState[1];
540
+ var handleDate = function(newDate) {
541
+ if (newDate) {
542
+ setDate(newDate);
543
+ if (onChange) onChange(newDate);
544
+ }
545
+ };
546
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
547
+ className: utils.cn(disable ? "pointer-events-none opacity-55" : "pointer-events-auto opacity-100"),
548
+ children: /*#__PURE__*/ jsxRuntime.jsxs(Popover, {
549
+ children: [
550
+ /*#__PURE__*/ jsxRuntime.jsx(PopoverTrigger, {
551
+ asChild: true,
552
+ children: /*#__PURE__*/ jsxRuntime.jsxs(input.Button, {
553
+ variant: "outline",
554
+ className: utils.cn("w-[280px] justify-start text-left font-normal", !date && "text-muted-foreground"),
555
+ children: [
556
+ /*#__PURE__*/ jsxRuntime.jsx(lucideReact.Calendar, {
557
+ className: "mr-2 h-4 w-4"
558
+ }),
559
+ date ? format__default["default"](date, "yyyy-MM-dd") : /*#__PURE__*/ jsxRuntime.jsx("span", {
560
+ children: "請選擇日期"
561
+ })
562
+ ]
563
+ })
564
+ }),
565
+ /*#__PURE__*/ jsxRuntime.jsx(PopoverContent, {
566
+ className: "w-auto p-0",
567
+ children: /*#__PURE__*/ jsxRuntime.jsx(Calendar, {
568
+ mode: "single",
569
+ selected: date,
570
+ onSelect: handleDate,
571
+ initialFocus: true
572
+ })
573
+ })
574
+ ]
575
+ })
576
+ });
577
+ };
578
+
579
+ function _array_like_to_array$1(arr, len) {
580
+ if (len == null || len > arr.length) len = arr.length;
581
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
582
+ return arr2;
583
+ }
584
+ function _array_with_holes$1(arr) {
585
+ if (Array.isArray(arr)) return arr;
586
+ }
587
+ function _iterable_to_array_limit$1(arr, i) {
588
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
589
+ if (_i == null) return;
590
+ var _arr = [];
591
+ var _n = true;
592
+ var _d = false;
593
+ var _s, _e;
594
+ try {
595
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
596
+ _arr.push(_s.value);
597
+ if (i && _arr.length === i) break;
598
+ }
599
+ } catch (err) {
600
+ _d = true;
601
+ _e = err;
602
+ } finally{
603
+ try {
604
+ if (!_n && _i["return"] != null) _i["return"]();
605
+ } finally{
606
+ if (_d) throw _e;
607
+ }
608
+ }
609
+ return _arr;
610
+ }
611
+ function _non_iterable_rest$1() {
612
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
613
+ }
614
+ function _sliced_to_array$1(arr, i) {
615
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
616
+ }
617
+ function _unsupported_iterable_to_array$1(o, minLen) {
618
+ if (!o) return;
619
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
620
+ var n = Object.prototype.toString.call(o).slice(8, -1);
621
+ if (n === "Object" && o.constructor) n = o.constructor.name;
622
+ if (n === "Map" || n === "Set") return Array.from(n);
623
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
624
+ }
625
+ var ReactDateRange = function(param) {
626
+ var className = param.className, item = param.item, onChange = param.onChange, dates = param.dates, date = param.date;
627
+ var _useState = _sliced_to_array$1(React.useState("zhTW"), 1), locale = _useState[0];
628
+ var _useState1 = _sliced_to_array$1(React.useState(""), 2), calendarData = _useState1[0], setCalendarData = _useState1[1];
629
+ var _useState2 = _sliced_to_array$1(React.useState({
630
+ startDate: new Date(),
631
+ endDate: addDays__default["default"](new Date(), 7),
632
+ key: "selection"
633
+ }), 2), range = _useState2[0], setRange = _useState2[1];
634
+ var _useState3 = _sliced_to_array$1(React.useState(false), 2), open = _useState3[0], setOpen = _useState3[1];
635
+ var refOne = React.useRef(null);
636
+ var hideOnEscape = function(e) {
637
+ if (e.key === "Escape") {
638
+ setOpen(false);
639
+ }
640
+ };
641
+ var hideOnClickOutside = function(e) {
642
+ if (refOne.current && !refOne.current.contains(e.target)) {
643
+ setOpen(false);
644
+ }
645
+ };
646
+ React.useEffect(function() {
647
+ setCalendarData(date);
648
+ }, [
649
+ date
650
+ ]);
651
+ React.useEffect(function() {
652
+ if (!dates) return;
653
+ setRange(dates);
654
+ }, [
655
+ dates
656
+ ]);
657
+ React.useEffect(function() {
658
+ document.addEventListener("keydown", hideOnEscape, true);
659
+ document.addEventListener("click", hideOnClickOutside, true);
660
+ return function() {
661
+ document.removeEventListener("keydown", hideOnEscape, true);
662
+ document.removeEventListener("click", hideOnClickOutside, true);
663
+ };
664
+ }, []);
665
+ var formatDates = function() {
666
+ if (!range) return;
667
+ var startDate = range.startDate, endDate = range.endDate;
668
+ return "".concat(format__default["default"](startDate, "yyyy-MM-dd"), " ~ ").concat(format__default["default"](endDate, "yyyy-MM-dd"));
669
+ };
670
+ var formatDate = calendarData ? format__default["default"](calendarData, (item === null || item === void 0 ? void 0 : item.dateDisplayFormat) || "yyyy-MM-dd") : "";
671
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
672
+ className: [
673
+ className,
674
+ "relative"
675
+ ].join(" "),
676
+ children: [
677
+ (item === null || item === void 0 ? void 0 : item.label) && /*#__PURE__*/ jsxRuntime.jsx("div", {
678
+ className: "text-gray-700 font-medium mb-2 h-6",
679
+ children: item === null || item === void 0 ? void 0 : item.label
680
+ }),
681
+ /*#__PURE__*/ jsxRuntime.jsx("input", {
682
+ className: "border-solid border rounded p-2 h-10 w-full timePicker border-gray-300",
683
+ name: item === null || item === void 0 ? void 0 : item.name,
684
+ onClick: function() {
685
+ return setOpen(function(openState) {
686
+ return !openState;
687
+ });
688
+ },
689
+ placeholder: item === null || item === void 0 ? void 0 : item.placeholder,
690
+ value: (item === null || item === void 0 ? void 0 : item.type) === "date" ? formatDate : formatDates(),
691
+ autoComplete: "off"
692
+ }),
693
+ open && /*#__PURE__*/ jsxRuntime.jsxs("div", {
694
+ className: "absolute top-[72px] left-0 z-50 shadow-md",
695
+ ref: refOne,
696
+ children: [
697
+ open && (item === null || item === void 0 ? void 0 : item.type) === "date" && /*#__PURE__*/ jsxRuntime.jsx(reactDateRange.Calendar, {
698
+ data: calendarData,
699
+ locale: locales__namespace[locale],
700
+ dateDisplayFormat: item === null || item === void 0 ? void 0 : item.dateDisplayFormat,
701
+ onChange: function(value) {
702
+ setCalendarData(value);
703
+ if (onChange) onChange(value);
704
+ setOpen(false);
705
+ }
706
+ }),
707
+ open && (item === null || item === void 0 ? void 0 : item.type) === "dateRange" && /*#__PURE__*/ jsxRuntime.jsx(reactDateRange.DateRange, {
708
+ editableDateInputs: true,
709
+ onChange: function(value) {
710
+ setRange(value.selection);
711
+ if (onChange) onChange(value.selection);
712
+ },
713
+ ranges: [
714
+ range
715
+ ],
716
+ locale: locales__namespace[locale],
717
+ dateDisplayFormat: "yyyy.MM.dd"
718
+ })
719
+ ]
720
+ })
721
+ ]
722
+ });
723
+ };
724
+
725
+ function _define_property$3(obj, key, value) {
726
+ if (key in obj) {
727
+ Object.defineProperty(obj, key, {
728
+ value: value,
729
+ enumerable: true,
730
+ configurable: true,
731
+ writable: true
732
+ });
733
+ } else {
734
+ obj[key] = value;
735
+ }
736
+ return obj;
737
+ }
738
+ function _object_spread$3(target) {
739
+ for(var i = 1; i < arguments.length; i++){
740
+ var source = arguments[i] != null ? arguments[i] : {};
741
+ var ownKeys = Object.keys(source);
742
+ if (typeof Object.getOwnPropertySymbols === "function") {
743
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
744
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
745
+ }));
746
+ }
747
+ ownKeys.forEach(function(key) {
748
+ _define_property$3(target, key, source[key]);
749
+ });
750
+ }
751
+ return target;
752
+ }
753
+ function ownKeys$3(object, enumerableOnly) {
754
+ var keys = Object.keys(object);
755
+ if (Object.getOwnPropertySymbols) {
756
+ var symbols = Object.getOwnPropertySymbols(object);
757
+ if (enumerableOnly) {
758
+ symbols = symbols.filter(function(sym) {
759
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
760
+ });
761
+ }
762
+ keys.push.apply(keys, symbols);
763
+ }
764
+ return keys;
765
+ }
766
+ function _object_spread_props$3(target, source) {
767
+ source = source != null ? source : {};
768
+ if (Object.getOwnPropertyDescriptors) {
769
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
770
+ } else {
771
+ ownKeys$3(Object(source)).forEach(function(key) {
772
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
773
+ });
774
+ }
775
+ return target;
776
+ }
777
+ function _object_without_properties$1(source, excluded) {
778
+ if (source == null) return {};
779
+ var target = _object_without_properties_loose$1(source, excluded);
780
+ var key, i;
781
+ if (Object.getOwnPropertySymbols) {
782
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
783
+ for(i = 0; i < sourceSymbolKeys.length; i++){
784
+ key = sourceSymbolKeys[i];
785
+ if (excluded.indexOf(key) >= 0) continue;
786
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
787
+ target[key] = source[key];
788
+ }
789
+ }
790
+ return target;
791
+ }
792
+ function _object_without_properties_loose$1(source, excluded) {
793
+ if (source == null) return {};
794
+ var target = {};
795
+ var sourceKeys = Object.keys(source);
796
+ var key, i;
797
+ for(i = 0; i < sourceKeys.length; i++){
798
+ key = sourceKeys[i];
799
+ if (excluded.indexOf(key) >= 0) continue;
800
+ target[key] = source[key];
801
+ }
802
+ return target;
803
+ }
804
+ var Checkbox = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
805
+ var className = _param.className, props = _object_without_properties$1(_param, [
806
+ "className"
807
+ ]);
808
+ return /*#__PURE__*/ jsxRuntime.jsx(CheckboxPrimitive__namespace.Root, _object_spread_props$3(_object_spread$3({
809
+ ref: ref,
810
+ className: utils.cn("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className)
811
+ }, props), {
812
+ children: /*#__PURE__*/ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, {
813
+ className: utils.cn("flex items-center justify-center text-current"),
814
+ children: /*#__PURE__*/ jsxRuntime.jsx(reactIcons.CheckIcon, {
815
+ className: "h-4 w-4"
816
+ })
817
+ })
818
+ }));
819
+ });
820
+ Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
821
+
822
+ function _define_property$2(obj, key, value) {
823
+ if (key in obj) {
824
+ Object.defineProperty(obj, key, {
825
+ value: value,
826
+ enumerable: true,
827
+ configurable: true,
828
+ writable: true
829
+ });
830
+ } else {
831
+ obj[key] = value;
832
+ }
833
+ return obj;
834
+ }
835
+ function _extends() {
836
+ _extends = Object.assign || function(target) {
837
+ for(var i = 1; i < arguments.length; i++){
838
+ var source = arguments[i];
839
+ for(var key in source){
840
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
841
+ target[key] = source[key];
842
+ }
843
+ }
844
+ }
845
+ return target;
846
+ };
847
+ return _extends.apply(this, arguments);
848
+ }
849
+ function _object_destructuring_empty(o) {
850
+ if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
851
+ return o;
852
+ }
853
+ function _object_spread$2(target) {
854
+ for(var i = 1; i < arguments.length; i++){
855
+ var source = arguments[i] != null ? arguments[i] : {};
856
+ var ownKeys = Object.keys(source);
857
+ if (typeof Object.getOwnPropertySymbols === "function") {
858
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
859
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
860
+ }));
861
+ }
862
+ ownKeys.forEach(function(key) {
863
+ _define_property$2(target, key, source[key]);
864
+ });
865
+ }
866
+ return target;
867
+ }
868
+ function ownKeys$2(object, enumerableOnly) {
869
+ var keys = Object.keys(object);
870
+ if (Object.getOwnPropertySymbols) {
871
+ var symbols = Object.getOwnPropertySymbols(object);
872
+ if (enumerableOnly) {
873
+ symbols = symbols.filter(function(sym) {
874
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
875
+ });
876
+ }
877
+ keys.push.apply(keys, symbols);
878
+ }
879
+ return keys;
880
+ }
881
+ function _object_spread_props$2(target, source) {
882
+ source = source != null ? source : {};
883
+ if (Object.getOwnPropertyDescriptors) {
884
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
885
+ } else {
886
+ ownKeys$2(Object(source)).forEach(function(key) {
887
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
888
+ });
889
+ }
890
+ return target;
891
+ }
892
+ function _object_without_properties(source, excluded) {
893
+ if (source == null) return {};
894
+ var target = _object_without_properties_loose(source, excluded);
895
+ var key, i;
896
+ if (Object.getOwnPropertySymbols) {
897
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
898
+ for(i = 0; i < sourceSymbolKeys.length; i++){
899
+ key = sourceSymbolKeys[i];
900
+ if (excluded.indexOf(key) >= 0) continue;
901
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
902
+ target[key] = source[key];
903
+ }
904
+ }
905
+ return target;
906
+ }
907
+ function _object_without_properties_loose(source, excluded) {
908
+ if (source == null) return {};
909
+ var target = {};
910
+ var sourceKeys = Object.keys(source);
911
+ var key, i;
912
+ for(i = 0; i < sourceKeys.length; i++){
913
+ key = sourceKeys[i];
914
+ if (excluded.indexOf(key) >= 0) continue;
915
+ target[key] = source[key];
916
+ }
917
+ return target;
918
+ }
919
+ var InputOTP = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
920
+ var className = _param.className, containerClassName = _param.containerClassName, props = _object_without_properties(_param, [
921
+ "className",
922
+ "containerClassName"
923
+ ]);
924
+ return /*#__PURE__*/ jsxRuntime.jsx(inputOtp.OTPInput, _object_spread$2({
925
+ ref: ref,
926
+ containerClassName: utils.cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName),
927
+ className: utils.cn("disabled:cursor-not-allowed", className)
928
+ }, props));
929
+ });
930
+ var InputOTPGroup = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
931
+ var className = _param.className, props = _object_without_properties(_param, [
932
+ "className"
933
+ ]);
934
+ return /*#__PURE__*/ jsxRuntime.jsx("div", _object_spread$2({
935
+ ref: ref,
936
+ className: utils.cn("flex items-center", className)
937
+ }, props));
938
+ });
939
+ var InputOTPSlot = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
940
+ var index = _param.index, className = _param.className, ringClassName = _param.ringClassName, props = _object_without_properties(_param, [
941
+ "index",
942
+ "className",
943
+ "ringClassName"
944
+ ]);
945
+ var inputOTPContext = React__namespace.useContext(inputOtp.OTPInputContext);
946
+ var _inputOTPContext_slots_index = inputOTPContext.slots[index], char = _inputOTPContext_slots_index.char, hasFakeCaret = _inputOTPContext_slots_index.hasFakeCaret, isActive = _inputOTPContext_slots_index.isActive;
947
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", _object_spread_props$2(_object_spread$2({
948
+ ref: ref,
949
+ className: utils.cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-1 ".concat(ringClassName), className)
950
+ }, props), {
951
+ children: [
952
+ char,
953
+ hasFakeCaret && /*#__PURE__*/ jsxRuntime.jsx("div", {
954
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
955
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
956
+ className: "h-4 w-px animate-caret-blink bg-foreground duration-1000"
957
+ })
958
+ })
959
+ ]
960
+ }));
961
+ });
962
+ var InputOTPSeparator = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
963
+ var props = _extends({}, _object_destructuring_empty(_param));
964
+ return /*#__PURE__*/ jsxRuntime.jsx("div", _object_spread_props$2(_object_spread$2({
965
+ ref: ref,
966
+ role: "separator"
967
+ }, props), {
968
+ children: /*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
969
+ icon: "octicon:dash-16"
970
+ })
971
+ }));
972
+ });
973
+
974
+ function Spin(props) {
975
+ var show = props.show, _props_overlayBackground = props.overlayBackground, overlayBackground = _props_overlayBackground === void 0 ? "bg-[#00000055]" : _props_overlayBackground;
976
+ return show ? /*#__PURE__*/ jsxRuntime.jsx("div", {
977
+ className: [
978
+ "fixed flex justify-center items-center w-full h-full left-0 top-0 z-[9999] overflow-hidden",
979
+ overlayBackground
980
+ ].join(" "),
981
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
982
+ className: "top-2/4 left-2/4",
983
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
984
+ className: "w-10 h-10 rounded-full border-4 border-solid border-[#ffffff33] border-t-[#dbdbdb] animate-spin"
985
+ })
986
+ })
987
+ }) : null;
988
+ }
989
+
990
+ var COLORS = [
991
+ "blue",
992
+ "orange",
993
+ "yellow",
994
+ "red",
995
+ "purple",
996
+ "amber",
997
+ "lime",
998
+ "green",
999
+ "emerald",
1000
+ "teal",
1001
+ "cyan",
1002
+ "sky",
1003
+ "violet",
1004
+ "indigo",
1005
+ "purple",
1006
+ "fuchsia",
1007
+ "pink",
1008
+ "rose"
1009
+ ];
1010
+ var DEFAULT_THEME = "blue";
1011
+ var THEME_DATA = {
1012
+ bg: {
1013
+ blue: "bg-blue-500",
1014
+ orange: "bg-orange-500",
1015
+ yellow: "bg-yellow-500",
1016
+ red: "bg-red-500",
1017
+ purple: "bg-purple-500",
1018
+ amber: "bg-amber-500",
1019
+ lime: "bg-lime-500",
1020
+ green: "bg-green-500",
1021
+ emerald: "bg-emerald-500",
1022
+ teal: "bg-teal-500",
1023
+ cyan: "bg-cyan-500",
1024
+ sky: "bg-sky-500",
1025
+ indigo: "bg-indigo-500",
1026
+ violet: "bg-violet-500",
1027
+ fuchsia: "bg-fuchsia-500",
1028
+ pink: "bg-pink-500",
1029
+ rose: "bg-rose-500"
1030
+ },
1031
+ bgHover: {
1032
+ blue: "hover:bg-blue-100",
1033
+ orange: "hover:bg-orange-100",
1034
+ yellow: "hover:bg-yellow-100",
1035
+ red: "hover:bg-red-100",
1036
+ purple: "hover:bg-purple-100",
1037
+ amber: "hover:bg-amber-100",
1038
+ lime: "hover:bg-lime-100",
1039
+ green: "hover:bg-green-100",
1040
+ emerald: "hover:bg-emerald-100",
1041
+ teal: "hover:bg-teal-100",
1042
+ cyan: "hover:bg-cyan-100",
1043
+ sky: "hover:bg-sky-100",
1044
+ indigo: "hover:bg-indigo-100",
1045
+ violet: "hover:bg-violet-100",
1046
+ fuchsia: "hover:bg-fuchsia-100",
1047
+ pink: "hover:bg-pink-100",
1048
+ rose: "hover:bg-rose-100"
1049
+ },
1050
+ ring: {
1051
+ blue: "focus:ring-blue-500/20",
1052
+ orange: "focus:ring-orange-500/20",
1053
+ yellow: "focus:ring-yellow-500/20",
1054
+ red: "focus:ring-red-500/20",
1055
+ purple: "focus:ring-purple-500/20",
1056
+ amber: "focus:ring-amber-500/20",
1057
+ lime: "focus:ring-lime-500/20",
1058
+ green: "focus:ring-green-500/20",
1059
+ emerald: "focus:ring-emerald-500/20",
1060
+ teal: "focus:ring-teal-500/20",
1061
+ cyan: "focus:ring-cyan-500/20",
1062
+ sky: "focus:ring-sky-500/20",
1063
+ indigo: "focus:ring-indigo-500/20",
1064
+ violet: "focus:ring-violet-500/20",
1065
+ fuchsia: "focus:ring-fuchsia-500/20",
1066
+ pink: "focus:ring-pink-500/20",
1067
+ rose: "focus:ring-rose-500/20"
1068
+ },
1069
+ borderFocus: {
1070
+ blue: "focus:border-blue-500",
1071
+ orange: "focus:border-orange-500",
1072
+ yellow: "focus:border-yellow-500",
1073
+ red: "focus:border-red-500",
1074
+ purple: "focus:border-purple-500",
1075
+ amber: "focus:border-amber-500",
1076
+ lime: "focus:border-lime-500",
1077
+ green: "focus:border-green-500",
1078
+ emerald: "focus:border-emerald-500",
1079
+ teal: "focus:border-teal-500",
1080
+ cyan: "focus:border-cyan-500",
1081
+ sky: "focus:border-sky-500",
1082
+ indigo: "focus:border-indigo-500",
1083
+ violet: "focus:border-violet-500",
1084
+ fuchsia: "focus:border-fuchsia-500",
1085
+ pink: "focus:border-pink-500",
1086
+ rose: "focus:border-rose-500"
1087
+ },
1088
+ text: {
1089
+ blue: "text-blue-500",
1090
+ orange: "text-orange-500",
1091
+ yellow: "text-yellow-500",
1092
+ red: "text-red-500",
1093
+ purple: "text-purple-500",
1094
+ amber: "text-amber-500",
1095
+ lime: "text-lime-500",
1096
+ green: "text-green-500",
1097
+ emerald: "text-emerald-500",
1098
+ teal: "text-teal-500",
1099
+ cyan: "text-cyan-500",
1100
+ sky: "text-sky-500",
1101
+ indigo: "text-indigo-500",
1102
+ violet: "text-violet-500",
1103
+ fuchsia: "text-fuchsia-500",
1104
+ pink: "text-pink-500",
1105
+ rose: "text-rose-500"
1106
+ },
1107
+ textHover: {
1108
+ blue: "hover:text-blue-500",
1109
+ orange: "hover:text-orange-500",
1110
+ yellow: "hover:text-yellow-500",
1111
+ red: "hover:text-red-500",
1112
+ purple: "hover:text-purple-500",
1113
+ amber: "hover:text-amber-500",
1114
+ lime: "hover:text-lime-500",
1115
+ green: "hover:text-green-500",
1116
+ emerald: "hover:text-emerald-500",
1117
+ teal: "hover:text-teal-500",
1118
+ cyan: "hover:text-cyan-500",
1119
+ sky: "hover:text-sky-500",
1120
+ indigo: "hover:text-indigo-500",
1121
+ violet: "hover:text-violet-500",
1122
+ fuchsia: "hover:text-fuchsia-500",
1123
+ pink: "hover:text-pink-500",
1124
+ rose: "hover:text-rose-500"
1125
+ }
1126
+ };
1127
+
1128
+ function useOnClickOutside(ref, handler) {
1129
+ React.useEffect(function() {
1130
+ var listener = function(event) {
1131
+ if (!ref.current || ref.current.contains(event.target)) {
1132
+ return;
1133
+ }
1134
+ handler(event);
1135
+ };
1136
+ document.addEventListener("mousedown", listener);
1137
+ document.addEventListener("touchstart", listener);
1138
+ return function() {
1139
+ document.removeEventListener("mousedown", listener);
1140
+ document.removeEventListener("touchstart", listener);
1141
+ };
1142
+ }, [
1143
+ ref,
1144
+ handler
1145
+ ]);
1146
+ }
1147
+
1148
+ var CloseIcon = function(param) {
1149
+ var _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
1150
+ return /*#__PURE__*/ jsxRuntime.jsx("svg", {
1151
+ className: className,
1152
+ fill: "currentColor",
1153
+ viewBox: "0 0 20 20",
1154
+ xmlns: "http://www.w3.org/2000/svg",
1155
+ children: /*#__PURE__*/ jsxRuntime.jsx("path", {
1156
+ fillRule: "evenodd",
1157
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
1158
+ clipRule: "evenodd"
1159
+ })
1160
+ });
1161
+ };
1162
+ var ChevronIcon = function(param) {
1163
+ var _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
1164
+ return /*#__PURE__*/ jsxRuntime.jsx("svg", {
1165
+ className: className,
1166
+ fill: "currentColor",
1167
+ viewBox: "0 0 20 20",
1168
+ xmlns: "http://www.w3.org/2000/svg",
1169
+ children: /*#__PURE__*/ jsxRuntime.jsx("path", {
1170
+ fillRule: "evenodd",
1171
+ d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
1172
+ clipRule: "evenodd"
1173
+ })
1174
+ });
1175
+ };
1176
+ var SearchIcon = function(param) {
1177
+ var _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
1178
+ return /*#__PURE__*/ jsxRuntime.jsx("svg", {
1179
+ className: className,
1180
+ fill: "none",
1181
+ stroke: "currentColor",
1182
+ viewBox: "0 0 24 24",
1183
+ xmlns: "http://www.w3.org/2000/svg",
1184
+ children: /*#__PURE__*/ jsxRuntime.jsx("path", {
1185
+ strokeLinecap: "round",
1186
+ strokeLinejoin: "round",
1187
+ strokeWidth: 2,
1188
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
1189
+ })
1190
+ });
1191
+ };
1192
+
1193
+ var SelectContext = /*#__PURE__*/ React.createContext({
1194
+ value: null,
1195
+ handleValueChange: function(selected) {
1196
+ console.log("selected:", selected);
1197
+ },
1198
+ formatGroupLabel: null,
1199
+ formatOptionLabel: null,
1200
+ classNames: undefined
1201
+ });
1202
+ var useSelectContext = function() {
1203
+ return React.useContext(SelectContext);
1204
+ };
1205
+ var SelectProvider = function(param) {
1206
+ var value = param.value, handleValueChange = param.handleValueChange, otherData = param.otherData, children = param.children;
1207
+ var store = React.useMemo(function() {
1208
+ return {
1209
+ value: value,
1210
+ handleValueChange: handleValueChange,
1211
+ formatGroupLabel: otherData && typeof otherData.formatGroupLabel === "function" ? otherData.formatGroupLabel : null,
1212
+ formatOptionLabel: otherData && typeof otherData.formatOptionLabel === "function" ? otherData.formatOptionLabel : null,
1213
+ classNames: (otherData === null || otherData === void 0 ? void 0 : otherData.classNames) || undefined
1214
+ };
1215
+ }, [
1216
+ handleValueChange,
1217
+ otherData,
1218
+ value
1219
+ ]);
1220
+ return /*#__PURE__*/ jsxRuntime.jsx(SelectContext.Provider, {
1221
+ value: store,
1222
+ children: children
1223
+ });
1224
+ };
1225
+
1226
+ var DisabledItem = function(param) {
1227
+ var children = param.children;
1228
+ var classNames = React.useContext(SelectContext).classNames;
1229
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
1230
+ className: classNames && classNames.listDisabledItem ? classNames.listDisabledItem : "px-2 py-2 cursor-not-allowed truncate text-gray-400 select-none",
1231
+ children: children
1232
+ });
1233
+ };
1234
+
1235
+ function _define_property$1(obj, key, value) {
1236
+ if (key in obj) {
1237
+ Object.defineProperty(obj, key, {
1238
+ value: value,
1239
+ enumerable: true,
1240
+ configurable: true,
1241
+ writable: true
1242
+ });
1243
+ } else {
1244
+ obj[key] = value;
1245
+ }
1246
+ return obj;
1247
+ }
1248
+ function _object_spread$1(target) {
1249
+ for(var i = 1; i < arguments.length; i++){
1250
+ var source = arguments[i] != null ? arguments[i] : {};
1251
+ var ownKeys = Object.keys(source);
1252
+ if (typeof Object.getOwnPropertySymbols === "function") {
1253
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1254
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1255
+ }));
1256
+ }
1257
+ ownKeys.forEach(function(key) {
1258
+ _define_property$1(target, key, source[key]);
1259
+ });
1260
+ }
1261
+ return target;
1262
+ }
1263
+ function ownKeys$1(object, enumerableOnly) {
1264
+ var keys = Object.keys(object);
1265
+ if (Object.getOwnPropertySymbols) {
1266
+ var symbols = Object.getOwnPropertySymbols(object);
1267
+ if (enumerableOnly) {
1268
+ symbols = symbols.filter(function(sym) {
1269
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1270
+ });
1271
+ }
1272
+ keys.push.apply(keys, symbols);
1273
+ }
1274
+ return keys;
1275
+ }
1276
+ function _object_spread_props$1(target, source) {
1277
+ source = source != null ? source : {};
1278
+ if (Object.getOwnPropertyDescriptors) {
1279
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1280
+ } else {
1281
+ ownKeys$1(Object(source)).forEach(function(key) {
1282
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1283
+ });
1284
+ }
1285
+ return target;
1286
+ }
1287
+ var Item = function(param) {
1288
+ var item = param.item, primaryColor = param.primaryColor;
1289
+ var _useSelectContext = useSelectContext(), classNames = _useSelectContext.classNames, value = _useSelectContext.value, handleValueChange = _useSelectContext.handleValueChange, formatOptionLabel = _useSelectContext.formatOptionLabel;
1290
+ var isSelected = React.useMemo(function() {
1291
+ return value !== null && !Array.isArray(value) && value.value === item.value;
1292
+ }, [
1293
+ item.value,
1294
+ value
1295
+ ]);
1296
+ var textHoverColor = React.useMemo(function() {
1297
+ if (COLORS.includes(primaryColor)) {
1298
+ return THEME_DATA.textHover[primaryColor];
1299
+ }
1300
+ return THEME_DATA.textHover[DEFAULT_THEME];
1301
+ }, [
1302
+ primaryColor
1303
+ ]);
1304
+ var bgColor = React.useMemo(function() {
1305
+ if (COLORS.includes(primaryColor)) {
1306
+ return THEME_DATA.bg[primaryColor];
1307
+ }
1308
+ return THEME_DATA.bg[DEFAULT_THEME];
1309
+ }, [
1310
+ primaryColor
1311
+ ]);
1312
+ var bgHoverColor = React.useMemo(function() {
1313
+ if (COLORS.includes(primaryColor)) {
1314
+ return THEME_DATA.bgHover[primaryColor];
1315
+ }
1316
+ return THEME_DATA.bgHover[DEFAULT_THEME];
1317
+ }, [
1318
+ primaryColor
1319
+ ]);
1320
+ var getItemClass = React.useCallback(function() {
1321
+ var baseClass = "block transition duration-200 px-2 py-2 cursor-pointer select-none truncate rounded";
1322
+ var selectedClass = isSelected ? "text-white ".concat(bgColor) : "text-gray-500 ".concat(bgHoverColor, " ").concat(textHoverColor);
1323
+ return classNames && classNames.listItem ? classNames.listItem({
1324
+ isSelected: isSelected
1325
+ }) : "".concat(baseClass, " ").concat(selectedClass);
1326
+ }, [
1327
+ bgColor,
1328
+ bgHoverColor,
1329
+ classNames,
1330
+ isSelected,
1331
+ textHoverColor
1332
+ ]);
1333
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
1334
+ children: formatOptionLabel ? /*#__PURE__*/ jsxRuntime.jsx("div", {
1335
+ onClick: function() {
1336
+ return handleValueChange(item);
1337
+ },
1338
+ children: formatOptionLabel(_object_spread_props$1(_object_spread$1({}, item), {
1339
+ isSelected: isSelected
1340
+ }))
1341
+ }) : /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
1342
+ children: item.disabled ? /*#__PURE__*/ jsxRuntime.jsx(DisabledItem, {
1343
+ children: item.label
1344
+ }) : /*#__PURE__*/ jsxRuntime.jsx("li", {
1345
+ tabIndex: 0,
1346
+ onKeyDown: function(e) {
1347
+ if (e.key === " " || e.key === "Enter") {
1348
+ handleValueChange(item);
1349
+ }
1350
+ },
1351
+ "aria-selected": isSelected,
1352
+ role: "option",
1353
+ onClick: function() {
1354
+ return handleValueChange(item);
1355
+ },
1356
+ className: getItemClass(),
1357
+ children: item.label
1358
+ })
1359
+ })
1360
+ });
1361
+ };
1362
+
1363
+ var GroupItem = function(param) {
1364
+ var item = param.item, primaryColor = param.primaryColor;
1365
+ var _useSelectContext = useSelectContext(), classNames = _useSelectContext.classNames, formatGroupLabel = _useSelectContext.formatGroupLabel;
1366
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
1367
+ children: item.options.length > 0 && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1368
+ children: [
1369
+ formatGroupLabel ? /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
1370
+ children: formatGroupLabel(item)
1371
+ }) : /*#__PURE__*/ jsxRuntime.jsx("div", {
1372
+ className: (classNames === null || classNames === void 0 ? void 0 : classNames.listGroupLabel) ? classNames.listGroupLabel : "pr-2 py-2 cursor-default select-none truncate font-bold text-gray-700",
1373
+ children: item.label
1374
+ }),
1375
+ item.options.map(function(item, index) {
1376
+ return /*#__PURE__*/ jsxRuntime.jsx(Item, {
1377
+ primaryColor: primaryColor,
1378
+ item: item
1379
+ }, index);
1380
+ })
1381
+ ]
1382
+ })
1383
+ });
1384
+ };
1385
+
1386
+ var Options = function(param) {
1387
+ var list = param.list, noOptionsMessage = param.noOptionsMessage, text = param.text, isMultiple = param.isMultiple, value = param.value, _param_primaryColor = param.primaryColor, primaryColor = _param_primaryColor === void 0 ? DEFAULT_THEME : _param_primaryColor;
1388
+ var classNames = React.useContext(SelectContext).classNames;
1389
+ var filterByText = React.useCallback(function() {
1390
+ var filterItem = function(item) {
1391
+ return item.label.toLowerCase().indexOf(text.toLowerCase()) > -1;
1392
+ };
1393
+ var result = list.map(function(item) {
1394
+ if ("options" in item) {
1395
+ return {
1396
+ label: item.label,
1397
+ options: item.options.filter(filterItem)
1398
+ };
1399
+ }
1400
+ return item;
1401
+ });
1402
+ result = result.filter(function(item) {
1403
+ if ("options" in item) {
1404
+ return item.options.length > 0;
1405
+ }
1406
+ return filterItem(item);
1407
+ });
1408
+ return result;
1409
+ }, [
1410
+ text,
1411
+ list
1412
+ ]);
1413
+ var removeValues = React.useCallback(function(array) {
1414
+ if (!isMultiple) {
1415
+ return array;
1416
+ }
1417
+ if (Array.isArray(value)) {
1418
+ var valueId = value.map(function(item) {
1419
+ return item.value;
1420
+ });
1421
+ var filterItem = function(item) {
1422
+ return !valueId.includes(item.value);
1423
+ };
1424
+ var newArray = array.map(function(item) {
1425
+ if ("options" in item) {
1426
+ return {
1427
+ label: item.label,
1428
+ options: item.options.filter(filterItem)
1429
+ };
1430
+ }
1431
+ return item;
1432
+ });
1433
+ newArray = newArray.filter(function(item) {
1434
+ if ("options" in item) {
1435
+ return item.options.length > 0;
1436
+ } else {
1437
+ return filterItem(item);
1438
+ }
1439
+ });
1440
+ return newArray;
1441
+ }
1442
+ return array;
1443
+ }, [
1444
+ isMultiple,
1445
+ value
1446
+ ]);
1447
+ var filterResult = React.useMemo(function() {
1448
+ return removeValues(filterByText());
1449
+ }, [
1450
+ filterByText,
1451
+ removeValues
1452
+ ]);
1453
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
1454
+ role: "options",
1455
+ className: classNames && classNames.list ? classNames.list : "max-h-72 overflow-y-auto",
1456
+ children: [
1457
+ filterResult.map(function(item, index) {
1458
+ return /*#__PURE__*/ jsxRuntime.jsx(React__default["default"].Fragment, {
1459
+ children: "options" in item ? /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1460
+ children: [
1461
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
1462
+ className: "px-2.5",
1463
+ children: /*#__PURE__*/ jsxRuntime.jsx(GroupItem, {
1464
+ primaryColor: primaryColor || DEFAULT_THEME,
1465
+ item: item
1466
+ })
1467
+ }),
1468
+ index + 1 < filterResult.length && /*#__PURE__*/ jsxRuntime.jsx("hr", {
1469
+ className: "my-1"
1470
+ })
1471
+ ]
1472
+ }) : /*#__PURE__*/ jsxRuntime.jsx("div", {
1473
+ className: "px-2.5",
1474
+ children: /*#__PURE__*/ jsxRuntime.jsx(Item, {
1475
+ primaryColor: primaryColor || DEFAULT_THEME,
1476
+ item: item
1477
+ })
1478
+ })
1479
+ }, index);
1480
+ }),
1481
+ filterResult.length === 0 && /*#__PURE__*/ jsxRuntime.jsx(DisabledItem, {
1482
+ children: noOptionsMessage
1483
+ })
1484
+ ]
1485
+ });
1486
+ };
1487
+
1488
+ var SearchInput = /*#__PURE__*/ React.forwardRef(function SearchInput(param, ref) {
1489
+ var _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "" : _param_placeholder, _param_value = param.value, value = _param_value === void 0 ? "" : _param_value, onChange = param.onChange, _param_name = param.name, name = _param_name === void 0 ? "" : _param_name;
1490
+ var classNames = React.useContext(SelectContext).classNames;
1491
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
1492
+ className: classNames && classNames.searchContainer ? classNames.searchContainer : "relative py-1 px-2.5",
1493
+ children: [
1494
+ /*#__PURE__*/ jsxRuntime.jsx(SearchIcon, {
1495
+ className: classNames && classNames.searchIcon ? classNames.searchIcon : "absolute w-5 h-5 mt-2.5 pb-0.5 ml-2 text-gray-500"
1496
+ }),
1497
+ /*#__PURE__*/ jsxRuntime.jsx("input", {
1498
+ ref: ref,
1499
+ className: classNames && classNames.searchBox ? classNames.searchBox : "w-full py-2 pl-8 text-sm text-gray-500 bg-gray-100 border border-gray-200 rounded focus:border-gray-200 focus:ring-0 focus:outline-none",
1500
+ type: "text",
1501
+ placeholder: placeholder,
1502
+ value: value,
1503
+ onChange: onChange,
1504
+ name: name
1505
+ })
1506
+ ]
1507
+ });
1508
+ });
1509
+
1510
+ var Spinner = function(param) {
1511
+ var _param_primaryColor = param.primaryColor, primaryColor = _param_primaryColor === void 0 ? DEFAULT_THEME : _param_primaryColor;
1512
+ var spinnerColor = React.useMemo(function() {
1513
+ if (COLORS.includes(primaryColor)) {
1514
+ return THEME_DATA.text[primaryColor];
1515
+ }
1516
+ return THEME_DATA.text[DEFAULT_THEME];
1517
+ }, [
1518
+ primaryColor
1519
+ ]);
1520
+ return /*#__PURE__*/ jsxRuntime.jsxs("svg", {
1521
+ className: "animate-spin mr-0.5 h-5 w-5 ".concat(spinnerColor),
1522
+ xmlns: "http://www.w3.org/2000/svg",
1523
+ fill: "none",
1524
+ viewBox: "0 0 24 24",
1525
+ children: [
1526
+ /*#__PURE__*/ jsxRuntime.jsx("circle", {
1527
+ className: "opacity-25",
1528
+ cx: "12",
1529
+ cy: "12",
1530
+ r: "10",
1531
+ stroke: "currentColor",
1532
+ strokeWidth: "4"
1533
+ }),
1534
+ /*#__PURE__*/ jsxRuntime.jsx("path", {
1535
+ className: "opacity-75",
1536
+ fill: "currentColor",
1537
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
1538
+ })
1539
+ ]
1540
+ });
1541
+ };
1542
+
1543
+ function _array_like_to_array(arr, len) {
1544
+ if (len == null || len > arr.length) len = arr.length;
1545
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1546
+ return arr2;
1547
+ }
1548
+ function _array_with_holes(arr) {
1549
+ if (Array.isArray(arr)) return arr;
1550
+ }
1551
+ function _array_without_holes(arr) {
1552
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
1553
+ }
1554
+ function _define_property(obj, key, value) {
1555
+ if (key in obj) {
1556
+ Object.defineProperty(obj, key, {
1557
+ value: value,
1558
+ enumerable: true,
1559
+ configurable: true,
1560
+ writable: true
1561
+ });
1562
+ } else {
1563
+ obj[key] = value;
1564
+ }
1565
+ return obj;
1566
+ }
1567
+ function _iterable_to_array(iter) {
1568
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1569
+ }
1570
+ function _iterable_to_array_limit(arr, i) {
1571
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1572
+ if (_i == null) return;
1573
+ var _arr = [];
1574
+ var _n = true;
1575
+ var _d = false;
1576
+ var _s, _e;
1577
+ try {
1578
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1579
+ _arr.push(_s.value);
1580
+ if (i && _arr.length === i) break;
1581
+ }
1582
+ } catch (err) {
1583
+ _d = true;
1584
+ _e = err;
1585
+ } finally{
1586
+ try {
1587
+ if (!_n && _i["return"] != null) _i["return"]();
1588
+ } finally{
1589
+ if (_d) throw _e;
1590
+ }
1591
+ }
1592
+ return _arr;
1593
+ }
1594
+ function _non_iterable_rest() {
1595
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1596
+ }
1597
+ function _non_iterable_spread() {
1598
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1599
+ }
1600
+ function _object_spread(target) {
1601
+ for(var i = 1; i < arguments.length; i++){
1602
+ var source = arguments[i] != null ? arguments[i] : {};
1603
+ var ownKeys = Object.keys(source);
1604
+ if (typeof Object.getOwnPropertySymbols === "function") {
1605
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1606
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1607
+ }));
1608
+ }
1609
+ ownKeys.forEach(function(key) {
1610
+ _define_property(target, key, source[key]);
1611
+ });
1612
+ }
1613
+ return target;
1614
+ }
1615
+ function ownKeys(object, enumerableOnly) {
1616
+ var keys = Object.keys(object);
1617
+ if (Object.getOwnPropertySymbols) {
1618
+ var symbols = Object.getOwnPropertySymbols(object);
1619
+ if (enumerableOnly) {
1620
+ symbols = symbols.filter(function(sym) {
1621
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1622
+ });
1623
+ }
1624
+ keys.push.apply(keys, symbols);
1625
+ }
1626
+ return keys;
1627
+ }
1628
+ function _object_spread_props(target, source) {
1629
+ source = source != null ? source : {};
1630
+ if (Object.getOwnPropertyDescriptors) {
1631
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1632
+ } else {
1633
+ ownKeys(Object(source)).forEach(function(key) {
1634
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1635
+ });
1636
+ }
1637
+ return target;
1638
+ }
1639
+ function _sliced_to_array(arr, i) {
1640
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1641
+ }
1642
+ function _to_consumable_array(arr) {
1643
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1644
+ }
1645
+ function _unsupported_iterable_to_array(o, minLen) {
1646
+ if (!o) return;
1647
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
1648
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1649
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1650
+ if (n === "Map" || n === "Set") return Array.from(n);
1651
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1652
+ }
1653
+ var DropDown = function(param) {
1654
+ var _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_value = param.value, value = _param_value === void 0 ? null : _param_value, onChange = param.onChange, onSearchInputChange = param.onSearchInputChange, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "Select..." : _param_placeholder, _param_searchInputPlaceholder = param.searchInputPlaceholder, searchInputPlaceholder = _param_searchInputPlaceholder === void 0 ? "Search..." : _param_searchInputPlaceholder, _param_isMultiple = param.isMultiple, isMultiple = _param_isMultiple === void 0 ? false : _param_isMultiple, _param_isClearable = param.isClearable, isClearable = _param_isClearable === void 0 ? false : _param_isClearable, _param_isSearchable = param.isSearchable, isSearchable = _param_isSearchable === void 0 ? false : _param_isSearchable, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading, _param_menuIsOpen = param.menuIsOpen, menuIsOpen = _param_menuIsOpen === void 0 ? false : _param_menuIsOpen, _param_noOptionsMessage = param.noOptionsMessage, noOptionsMessage = _param_noOptionsMessage === void 0 ? "No options found" : _param_noOptionsMessage, _param_primaryColor = param.primaryColor, primaryColor = _param_primaryColor === void 0 ? DEFAULT_THEME : _param_primaryColor, _param_formatGroupLabel = param.formatGroupLabel, formatGroupLabel = _param_formatGroupLabel === void 0 ? null : _param_formatGroupLabel, _param_formatOptionLabel = param.formatOptionLabel, formatOptionLabel = _param_formatOptionLabel === void 0 ? null : _param_formatOptionLabel, classNames = param.classNames;
1655
+ var _useState = _sliced_to_array(React.useState(menuIsOpen), 2), open = _useState[0], setOpen = _useState[1];
1656
+ var _useState1 = _sliced_to_array(React.useState(options), 2), list = _useState1[0], setList = _useState1[1];
1657
+ var _useState2 = _sliced_to_array(React.useState(""), 2), inputValue = _useState2[0], setInputValue = _useState2[1];
1658
+ var ref = React.useRef(null);
1659
+ var searchBoxRef = React.useRef(null);
1660
+ React.useEffect(function() {
1661
+ var formatItem = function(item) {
1662
+ if ("disabled" in item) return item;
1663
+ return _object_spread_props(_object_spread({}, item), {
1664
+ disabled: false
1665
+ });
1666
+ };
1667
+ setList(options.map(function(item) {
1668
+ if ("options" in item) {
1669
+ return {
1670
+ label: item.label,
1671
+ options: item.options.map(formatItem)
1672
+ };
1673
+ } else {
1674
+ return formatItem(item);
1675
+ }
1676
+ }));
1677
+ }, [
1678
+ options
1679
+ ]);
1680
+ React.useEffect(function() {
1681
+ if (isSearchable) {
1682
+ if (open) {
1683
+ var _searchBoxRef_current;
1684
+ (_searchBoxRef_current = searchBoxRef.current) === null || _searchBoxRef_current === void 0 ? void 0 : _searchBoxRef_current.select();
1685
+ } else {
1686
+ setInputValue("");
1687
+ }
1688
+ }
1689
+ }, [
1690
+ open,
1691
+ isSearchable
1692
+ ]);
1693
+ var toggle = React.useCallback(function() {
1694
+ if (!isDisabled) {
1695
+ setOpen(!open);
1696
+ }
1697
+ }, [
1698
+ isDisabled,
1699
+ open
1700
+ ]);
1701
+ var closeDropDown = React.useCallback(function() {
1702
+ if (open) setOpen(false);
1703
+ }, [
1704
+ open
1705
+ ]);
1706
+ useOnClickOutside(ref, function() {
1707
+ closeDropDown();
1708
+ });
1709
+ var onPressEnterOrSpace = React.useCallback(function(e) {
1710
+ e.preventDefault();
1711
+ if ((e.code === "Enter" || e.code === "Space") && !isDisabled) {
1712
+ toggle();
1713
+ }
1714
+ }, [
1715
+ isDisabled,
1716
+ toggle
1717
+ ]);
1718
+ var handleValueChange = React.useCallback(function(selected) {
1719
+ var update = function update() {
1720
+ if (!isMultiple && !Array.isArray(value)) {
1721
+ closeDropDown();
1722
+ onChange(selected);
1723
+ }
1724
+ if (isMultiple && (Array.isArray(value) || value === null)) {
1725
+ onChange(value === null ? [
1726
+ selected
1727
+ ] : _to_consumable_array(value).concat([
1728
+ selected
1729
+ ]));
1730
+ }
1731
+ };
1732
+ if (selected !== value) {
1733
+ update();
1734
+ }
1735
+ }, [
1736
+ closeDropDown,
1737
+ isMultiple,
1738
+ onChange,
1739
+ value
1740
+ ]);
1741
+ var clearValue = React.useCallback(function(e) {
1742
+ e.stopPropagation();
1743
+ onChange(null);
1744
+ }, [
1745
+ onChange
1746
+ ]);
1747
+ var removeItem = React.useCallback(function(e, item) {
1748
+ if (isMultiple && Array.isArray(value) && value.length) {
1749
+ e.stopPropagation();
1750
+ var result = value.filter(function(current) {
1751
+ return item.value !== current.value;
1752
+ });
1753
+ onChange(result.length ? result : null);
1754
+ }
1755
+ }, [
1756
+ isMultiple,
1757
+ onChange,
1758
+ value
1759
+ ]);
1760
+ var getSelectClass = React.useCallback(function() {
1761
+ var ringColor = THEME_DATA.ring[DEFAULT_THEME];
1762
+ if (COLORS.includes(primaryColor)) {
1763
+ ringColor = THEME_DATA.ring[primaryColor];
1764
+ }
1765
+ var borderFocus = THEME_DATA.borderFocus[DEFAULT_THEME];
1766
+ if (COLORS.includes(primaryColor)) {
1767
+ borderFocus = THEME_DATA.borderFocus[primaryColor];
1768
+ }
1769
+ var baseClass = "flex text-sm text-gray-500 border border-gray-300 rounded shadow-sm transition-all duration-300 focus:outline-none";
1770
+ var defaultClass = "".concat(baseClass, " ").concat(isDisabled ? "bg-gray-200" : "bg-white hover:border-gray-400 ".concat(borderFocus, " focus:ring ").concat(ringColor));
1771
+ return classNames && classNames.menuButton ? classNames.menuButton({
1772
+ isDisabled: isDisabled
1773
+ }) : defaultClass;
1774
+ }, [
1775
+ classNames,
1776
+ isDisabled,
1777
+ primaryColor
1778
+ ]);
1779
+ var getTagItemClass = React.useCallback(function(item) {
1780
+ var baseClasse = "bg-gray-200 border rounded-sm flex space-x-1";
1781
+ var disabledClass = isDisabled ? "border-gray-500 px-1" : "pl-1";
1782
+ return (classNames === null || classNames === void 0 ? void 0 : classNames.tagItem) ? classNames.tagItem({
1783
+ item: item,
1784
+ isDisabled: isDisabled
1785
+ }) : "".concat(baseClasse, " ").concat(disabledClass);
1786
+ }, [
1787
+ classNames,
1788
+ isDisabled
1789
+ ]);
1790
+ return /*#__PURE__*/ jsxRuntime.jsx(SelectProvider, {
1791
+ otherData: {
1792
+ formatGroupLabel: formatGroupLabel,
1793
+ formatOptionLabel: formatOptionLabel,
1794
+ classNames: classNames
1795
+ },
1796
+ value: value,
1797
+ handleValueChange: handleValueChange,
1798
+ children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
1799
+ className: "relative w-full",
1800
+ ref: ref,
1801
+ children: [
1802
+ /*#__PURE__*/ jsxRuntime.jsxs("div", {
1803
+ "aria-expanded": open,
1804
+ onKeyDown: onPressEnterOrSpace,
1805
+ onClick: toggle,
1806
+ className: getSelectClass(),
1807
+ children: [
1808
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
1809
+ className: "grow pl-2.5 py-2 pr-2 flex flex-wrap gap-1",
1810
+ children: !isMultiple ? /*#__PURE__*/ jsxRuntime.jsx("p", {
1811
+ className: "truncate cursor-default select-none",
1812
+ children: value && !Array.isArray(value) ? value.label : placeholder
1813
+ }) : /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1814
+ children: [
1815
+ value === null && placeholder,
1816
+ Array.isArray(value) && value.map(function(item, index) {
1817
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
1818
+ className: getTagItemClass(item),
1819
+ children: [
1820
+ /*#__PURE__*/ jsxRuntime.jsx("p", {
1821
+ className: (classNames === null || classNames === void 0 ? void 0 : classNames.tagItemText) ? classNames.tagItemText : "text-gray-600 truncate cursor-default select-none",
1822
+ children: item.label
1823
+ }),
1824
+ !isDisabled && /*#__PURE__*/ jsxRuntime.jsx("div", {
1825
+ role: "button",
1826
+ tabIndex: 0,
1827
+ onClick: function(e) {
1828
+ return removeItem(e, item);
1829
+ },
1830
+ className: (classNames === null || classNames === void 0 ? void 0 : classNames.tagItemIconContainer) ? classNames.tagItemIconContainer : "flex items-center px-1 cursor-pointer rounded-r-sm hover:bg-red-200 hover:text-red-600",
1831
+ children: /*#__PURE__*/ jsxRuntime.jsx(CloseIcon, {
1832
+ className: (classNames === null || classNames === void 0 ? void 0 : classNames.tagItemIcon) ? classNames.tagItemIcon : "w-3 h-3 mt-0.5"
1833
+ })
1834
+ })
1835
+ ]
1836
+ }, index);
1837
+ })
1838
+ ]
1839
+ })
1840
+ }),
1841
+ /*#__PURE__*/ jsxRuntime.jsxs("div", {
1842
+ className: "flex flex-none items-center py-1.5",
1843
+ children: [
1844
+ loading && /*#__PURE__*/ jsxRuntime.jsx("div", {
1845
+ className: "px-1.5",
1846
+ children: /*#__PURE__*/ jsxRuntime.jsx(Spinner, {
1847
+ primaryColor: primaryColor
1848
+ })
1849
+ }),
1850
+ isClearable && !isDisabled && value !== null && /*#__PURE__*/ jsxRuntime.jsx("div", {
1851
+ className: "px-1.5 cursor-pointer",
1852
+ onClick: clearValue,
1853
+ children: /*#__PURE__*/ jsxRuntime.jsx(CloseIcon, {
1854
+ className: (classNames === null || classNames === void 0 ? void 0 : classNames.closeIcon) ? classNames.closeIcon : "w-5 h-5 p-0.5"
1855
+ })
1856
+ }),
1857
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
1858
+ className: "h-full",
1859
+ children: /*#__PURE__*/ jsxRuntime.jsx("span", {
1860
+ className: "w-px h-full inline-block text-white bg-gray-300 text-opacity-0"
1861
+ })
1862
+ }),
1863
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
1864
+ className: "px-1.5",
1865
+ children: /*#__PURE__*/ jsxRuntime.jsx(ChevronIcon, {
1866
+ className: "transition duration-300 w-6 h-6 p-0.5".concat(open ? " transform rotate-90 text-gray-500" : " text-gray-300")
1867
+ })
1868
+ })
1869
+ ]
1870
+ })
1871
+ ]
1872
+ }),
1873
+ open && !isDisabled && /*#__PURE__*/ jsxRuntime.jsxs("div", {
1874
+ className: (classNames === null || classNames === void 0 ? void 0 : classNames.menu) ? classNames.menu : "absolute z-10 w-full bg-white shadow-lg border rounded py-1 mt-1.5 text-sm text-gray-700",
1875
+ children: [
1876
+ isSearchable && /*#__PURE__*/ jsxRuntime.jsx(SearchInput, {
1877
+ ref: searchBoxRef,
1878
+ value: inputValue,
1879
+ placeholder: searchInputPlaceholder,
1880
+ onChange: function(e) {
1881
+ if (onSearchInputChange && typeof onSearchInputChange === "function") onSearchInputChange(e);
1882
+ setInputValue(e.target.value);
1883
+ }
1884
+ }),
1885
+ /*#__PURE__*/ jsxRuntime.jsx(Options, {
1886
+ list: list,
1887
+ noOptionsMessage: noOptionsMessage,
1888
+ text: inputValue,
1889
+ isMultiple: isMultiple,
1890
+ value: value,
1891
+ primaryColor: primaryColor || DEFAULT_THEME
1892
+ })
1893
+ ]
1894
+ })
1895
+ ]
1896
+ })
1897
+ });
1898
+ };
1899
+
1900
+ var InputOTPs = function(param) {
1901
+ var noticeText = param.noticeText, _param_length = param.length, length = _param_length === void 0 ? 6 : _param_length, _param_textClassName = param.textClassName, textClassName = _param_textClassName === void 0 ? "text-sm" : _param_textClassName, _param_ringClassName = param.ringClassName, ringClassName = _param_ringClassName === void 0 ? "" : _param_ringClassName, value = param.value, setValue = param.setValue;
1902
+ var inputs = Array.from({
1903
+ length: length
1904
+ }, function(_, index) {
1905
+ return index + 1;
1906
+ });
1907
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
1908
+ children: [
1909
+ /*#__PURE__*/ jsxRuntime.jsx(InputOTP, {
1910
+ maxLength: length,
1911
+ value: value,
1912
+ onChange: function(value) {
1913
+ return setValue(value);
1914
+ },
1915
+ children: /*#__PURE__*/ jsxRuntime.jsx(InputOTPGroup, {
1916
+ children: inputs.map(function(num, index) {
1917
+ return /*#__PURE__*/ jsxRuntime.jsx(InputOTPSlot, {
1918
+ index: index,
1919
+ ringClassName: ringClassName
1920
+ });
1921
+ })
1922
+ })
1923
+ }),
1924
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
1925
+ className: [
1926
+ textClassName,
1927
+ "mt-2"
1928
+ ].join(" "),
1929
+ children: value === "" ? /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
1930
+ children: noticeText
1931
+ }) : null
1932
+ })
1933
+ ]
1934
+ });
1935
+ };
1936
+
1937
+ exports.Button = input.Button;
1938
+ exports.Input = input.Input;
1939
+ exports.buttonVariants = input.buttonVariants;
1940
+ exports.BaseSwitch = baseSwitch.BaseSwitch;
1941
+ exports.Select = baseSwitch.Select;
1942
+ exports.SelectContent = baseSwitch.SelectContent;
1943
+ exports.SelectGroup = baseSwitch.SelectGroup;
1944
+ exports.SelectItem = baseSwitch.SelectItem;
1945
+ exports.SelectLabel = baseSwitch.SelectLabel;
1946
+ exports.SelectScrollDownButton = baseSwitch.SelectScrollDownButton;
1947
+ exports.SelectScrollUpButton = baseSwitch.SelectScrollUpButton;
1948
+ exports.SelectSeparator = baseSwitch.SelectSeparator;
1949
+ exports.SelectTrigger = baseSwitch.SelectTrigger;
1950
+ exports.SelectValue = baseSwitch.SelectValue;
1951
+ exports.Checkbox = Checkbox;
1952
+ exports.DateRangePicker = DateRangePicker;
1953
+ exports.DropDown = DropDown;
1954
+ exports.InputOTP = InputOTP;
1955
+ exports.InputOTPGroup = InputOTPGroup;
1956
+ exports.InputOTPSeparator = InputOTPSeparator;
1957
+ exports.InputOTPSlot = InputOTPSlot;
1958
+ exports.InputOTPs = InputOTPs;
1959
+ exports.ReactDateRange = ReactDateRange;
1960
+ exports.SingleDatePicker = SingleDatePicker;
1961
+ exports.Spin = Spin;
1962
+ exports.Switch = Switch;