@deepnoid/ui 0.1.205 → 0.1.207

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 (63) hide show
  1. package/.turbo/turbo-build.log +495 -485
  2. package/dist/chunk-3FOLYC6R.mjs +285 -0
  3. package/dist/chunk-3IBJXQTJ.mjs +42 -0
  4. package/dist/chunk-I4YRN4UE.mjs +79 -0
  5. package/dist/{chunk-636SQLHK.mjs → chunk-JPNMYMDN.mjs} +7 -7
  6. package/dist/chunk-QBWQHWNV.mjs +81 -0
  7. package/dist/{chunk-PRNE3U26.mjs → chunk-RNMD44IQ.mjs} +3 -2
  8. package/dist/components/breadcrumb/breadcrumb.mjs +2 -2
  9. package/dist/components/breadcrumb/index.mjs +2 -2
  10. package/dist/components/button/index.mjs +3 -3
  11. package/dist/components/charts/index.mjs +6 -6
  12. package/dist/components/fileUpload/fileUpload.mjs +1 -1
  13. package/dist/components/fileUpload/index.mjs +1 -1
  14. package/dist/components/modal/index.mjs +1 -1
  15. package/dist/components/modal/modal.mjs +1 -1
  16. package/dist/components/picker/datePicker.mjs +3 -3
  17. package/dist/components/picker/index.d.mts +1 -1
  18. package/dist/components/picker/index.d.ts +1 -1
  19. package/dist/components/picker/index.js +266 -679
  20. package/dist/components/picker/index.mjs +8 -8
  21. package/dist/components/picker/timePicker/Panel.d.mts +11 -0
  22. package/dist/components/picker/timePicker/Panel.d.ts +11 -0
  23. package/dist/components/picker/timePicker/Panel.js +740 -0
  24. package/dist/components/picker/timePicker/Panel.mjs +26 -0
  25. package/dist/components/picker/timePicker/WheelColumn.d.mts +10 -0
  26. package/dist/components/picker/timePicker/WheelColumn.d.ts +10 -0
  27. package/dist/components/picker/timePicker/WheelColumn.js +98 -0
  28. package/dist/components/picker/timePicker/WheelColumn.mjs +8 -0
  29. package/dist/components/picker/{timePicker.d.ts → timePicker/index.d.mts} +41 -52
  30. package/dist/components/picker/{timePicker.d.mts → timePicker/index.d.ts} +41 -52
  31. package/dist/components/picker/{timePicker.js → timePicker/index.js} +702 -1003
  32. package/dist/components/picker/timePicker/index.mjs +29 -0
  33. package/dist/components/picker/utils.d.mts +11 -1
  34. package/dist/components/picker/utils.d.ts +11 -1
  35. package/dist/components/picker/utils.js +28 -2
  36. package/dist/components/picker/utils.mjs +7 -3
  37. package/dist/components/radio/index.js +3 -2
  38. package/dist/components/radio/index.mjs +1 -1
  39. package/dist/components/radio/radio.d.mts +1 -0
  40. package/dist/components/radio/radio.d.ts +1 -0
  41. package/dist/components/radio/radio.js +3 -2
  42. package/dist/components/radio/radio.mjs +1 -1
  43. package/dist/components/select/index.mjs +1 -1
  44. package/dist/components/select/select.mjs +1 -1
  45. package/dist/components/table/index.mjs +3 -3
  46. package/dist/components/table/table-body.mjs +3 -3
  47. package/dist/components/table/table-head.mjs +3 -3
  48. package/dist/components/table/table.mjs +3 -3
  49. package/dist/components/timePicker/calendar.mjs +1 -1
  50. package/dist/components/timePicker/useDateTimePicker.mjs +1 -1
  51. package/dist/components/toast/index.mjs +2 -2
  52. package/dist/components/toast/use-toast.mjs +2 -2
  53. package/dist/index.d.mts +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.js +482 -399
  56. package/dist/index.mjs +55 -53
  57. package/package.json +1 -1
  58. package/dist/chunk-COGGK5Q6.mjs +0 -365
  59. package/dist/chunk-FWFEKWWD.mjs +0 -18
  60. package/dist/components/picker/timePicker.mjs +0 -26
  61. package/dist/{chunk-OUPCXZCP.mjs → chunk-EMQML6YB.mjs} +3 -3
  62. package/dist/{chunk-L3A3IEKZ.mjs → chunk-SSGCTWWW.mjs} +3 -3
  63. package/dist/{chunk-334UN473.mjs → chunk-W3V4SZV5.mjs} +3 -3
@@ -0,0 +1,740 @@
1
+ "use client";
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ };
12
+ var __export = (target, all) => {
13
+ for (var name in all)
14
+ __defProp(target, name, { get: all[name], enumerable: true });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+
34
+ // ../../node_modules/tailwindcss/lib/util/createPlugin.js
35
+ var require_createPlugin = __commonJS({
36
+ "../../node_modules/tailwindcss/lib/util/createPlugin.js"(exports2) {
37
+ "use strict";
38
+ Object.defineProperty(exports2, "__esModule", {
39
+ value: true
40
+ });
41
+ Object.defineProperty(exports2, "default", {
42
+ enumerable: true,
43
+ get: function() {
44
+ return _default;
45
+ }
46
+ });
47
+ function createPlugin(plugin2, config) {
48
+ return {
49
+ handler: plugin2,
50
+ config
51
+ };
52
+ }
53
+ createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
54
+ const optionsFunction = function(options) {
55
+ return {
56
+ __options: options,
57
+ handler: pluginFunction(options),
58
+ config: configFunction(options)
59
+ };
60
+ };
61
+ optionsFunction.__isOptionsFunction = true;
62
+ optionsFunction.__pluginFunction = pluginFunction;
63
+ optionsFunction.__configFunction = configFunction;
64
+ return optionsFunction;
65
+ };
66
+ var _default = createPlugin;
67
+ }
68
+ });
69
+
70
+ // ../../node_modules/tailwindcss/lib/public/create-plugin.js
71
+ var require_create_plugin = __commonJS({
72
+ "../../node_modules/tailwindcss/lib/public/create-plugin.js"(exports2) {
73
+ "use strict";
74
+ Object.defineProperty(exports2, "__esModule", {
75
+ value: true
76
+ });
77
+ Object.defineProperty(exports2, "default", {
78
+ enumerable: true,
79
+ get: function() {
80
+ return _default;
81
+ }
82
+ });
83
+ var _createPlugin = /* @__PURE__ */ _interop_require_default(require_createPlugin());
84
+ function _interop_require_default(obj) {
85
+ return obj && obj.__esModule ? obj : {
86
+ default: obj
87
+ };
88
+ }
89
+ var _default = _createPlugin.default;
90
+ }
91
+ });
92
+
93
+ // ../../node_modules/tailwindcss/plugin.js
94
+ var require_plugin = __commonJS({
95
+ "../../node_modules/tailwindcss/plugin.js"(exports2, module2) {
96
+ "use strict";
97
+ var createPlugin = require_create_plugin();
98
+ module2.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
99
+ }
100
+ });
101
+
102
+ // src/components/picker/timePicker/Panel.tsx
103
+ var Panel_exports = {};
104
+ __export(Panel_exports, {
105
+ TimePickerPanel: () => TimePickerPanel,
106
+ default: () => Panel_default
107
+ });
108
+ module.exports = __toCommonJS(Panel_exports);
109
+ var import_react3 = require("react");
110
+
111
+ // src/components/picker/timePicker/WheelColumn.tsx
112
+ var import_react = require("react");
113
+ var import_jsx_runtime = require("react/jsx-runtime");
114
+ var ITEM_HEIGHT = 30;
115
+ var ACTIVE_HEIGHT = 34;
116
+ function WheelColumn({ list, value, onChange }) {
117
+ const ref = (0, import_react.useRef)(null);
118
+ const internalChangeRef = (0, import_react.useRef)(false);
119
+ const [currentIndex, setCurrentIndex] = (0, import_react.useState)(0);
120
+ const scrollToIndex = (index, behavior = "smooth") => {
121
+ if (!ref.current) return;
122
+ const diff = ACTIVE_HEIGHT - ITEM_HEIGHT;
123
+ let centerOffset = index > 0 && behavior === "auto" ? diff : 0;
124
+ if (behavior === "auto" && currentIndex !== 0) centerOffset -= 4;
125
+ const top = index * ITEM_HEIGHT + centerOffset;
126
+ ref.current.scrollTo({ top, behavior });
127
+ };
128
+ const finalizeScroll = (index) => {
129
+ internalChangeRef.current = true;
130
+ const v = list[index];
131
+ setCurrentIndex(index);
132
+ scrollToIndex(index, "smooth");
133
+ if (v) onChange(v);
134
+ };
135
+ const handleClick = (index) => finalizeScroll(index);
136
+ (0, import_react.useEffect)(() => {
137
+ if (!ref.current || !value) return;
138
+ const idx = list.indexOf(value);
139
+ if (idx < 0) return;
140
+ if (internalChangeRef.current) {
141
+ internalChangeRef.current = false;
142
+ return;
143
+ }
144
+ setCurrentIndex(idx);
145
+ scrollToIndex(idx, "auto");
146
+ }, [value]);
147
+ (0, import_react.useEffect)(() => {
148
+ const el = ref.current;
149
+ if (!el) return;
150
+ const handleWheel = (e) => {
151
+ e.preventDefault();
152
+ let newIndex = currentIndex;
153
+ if (e.deltaY > 0) {
154
+ newIndex = Math.min(currentIndex + 1, list.length - 1);
155
+ } else if (e.deltaY < 0) {
156
+ newIndex = Math.max(currentIndex - 1, 0);
157
+ }
158
+ finalizeScroll(newIndex);
159
+ };
160
+ el.addEventListener("wheel", handleWheel, { passive: false });
161
+ return () => el.removeEventListener("wheel", handleWheel);
162
+ }, [currentIndex, list, onChange]);
163
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative h-[94px] w-[40px]", children: [
164
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pointer-events-none absolute left-1/2 top-[30px] h-[34px] w-[40px] -translate-x-1/2 rounded-[10px] shadow-[inset_0_0_0_1.5px_var(--dn-primary-light)]" }),
165
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: "scrollbar-none relative h-full select-none overflow-y-scroll py-[0]", children: [
166
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { height: ITEM_HEIGHT } }),
167
+ list.map((v, i) => {
168
+ const isActive = i === currentIndex;
169
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
170
+ "div",
171
+ {
172
+ onClick: () => handleClick(i),
173
+ className: `flex items-center justify-center text-sm font-bold transition-all ${isActive ? "text-body-foreground" : "text-neutral-light"}`,
174
+ style: { height: isActive ? ACTIVE_HEIGHT : ITEM_HEIGHT },
175
+ children: v
176
+ },
177
+ i
178
+ );
179
+ }),
180
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { height: list.length >= 3 ? ITEM_HEIGHT + 4 : ITEM_HEIGHT } })
181
+ ] })
182
+ ] });
183
+ }
184
+
185
+ // src/utils/tailwind-variants.ts
186
+ var import_tailwind_variants = require("tailwind-variants");
187
+
188
+ // ../tailwind-config/src/plugin.ts
189
+ var import_plugin = __toESM(require_plugin());
190
+
191
+ // ../tailwind-config/src/typography/font.ts
192
+ var fontSize = {
193
+ h1: [
194
+ "40px",
195
+ {
196
+ fontWeight: "700"
197
+ }
198
+ ],
199
+ h2: [
200
+ "34px",
201
+ {
202
+ fontWeight: "700"
203
+ }
204
+ ],
205
+ h3: [
206
+ "28px",
207
+ {
208
+ fontWeight: "700"
209
+ }
210
+ ],
211
+ h4: [
212
+ "24px",
213
+ {
214
+ fontWeight: "700"
215
+ }
216
+ ],
217
+ h5: [
218
+ "20px",
219
+ {
220
+ fontWeight: "600"
221
+ }
222
+ ],
223
+ sm: [
224
+ "12px",
225
+ {
226
+ lineHeight: "18px",
227
+ fontWeight: "400"
228
+ }
229
+ ],
230
+ md: [
231
+ "14px",
232
+ {
233
+ lineHeight: "21px",
234
+ fontWeight: "400"
235
+ }
236
+ ],
237
+ lg: [
238
+ "16px",
239
+ {
240
+ lineHeight: "24px",
241
+ fontWeight: "400"
242
+ }
243
+ ],
244
+ xl: [
245
+ "18px",
246
+ {
247
+ lineHeight: "27px",
248
+ fontWeight: "400"
249
+ }
250
+ ],
251
+ "2xl": [
252
+ "24px",
253
+ {
254
+ lineHeight: "36px",
255
+ fontWeight: "400"
256
+ }
257
+ ]
258
+ };
259
+
260
+ // ../tailwind-config/src/animation/bar.ts
261
+ var barAnimation = {
262
+ "indeterminate-bar": "indeterminate-bar 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite normal none running"
263
+ };
264
+ var barKeyframe = {
265
+ "indeterminate-bar": {
266
+ "0%": {
267
+ transform: "translateX(-50%) scaleX(0.2)"
268
+ },
269
+ "100%": {
270
+ transform: "translateX(100%) scaleX(1)"
271
+ }
272
+ }
273
+ };
274
+
275
+ // ../tailwind-config/src/animation/slide.ts
276
+ var sliceAnimation = {
277
+ slideInFromTop: "slideInFromTop 0.5s ease-out",
278
+ slideInFromBottom: "slideInFromBottom 0.5s ease-out",
279
+ slideInFromLeft: "slideInFromLeft 0.5s ease-out",
280
+ slideInFromRight: "slideInFromRight 0.5s ease-out",
281
+ slideOutToTop: "slideOutToTop 0.5s ease-in",
282
+ slideOutToBottom: "slideOutToBottom 0.5s ease-in",
283
+ slideOutToLeft: "slideOutToLeft 0.5s ease-in",
284
+ slideOutToRight: "slideOutToRight 0.5s ease-in"
285
+ };
286
+ var sliceKeyframe = {
287
+ slideInFromTop: {
288
+ "0%": {
289
+ transform: "translateY(-10px)",
290
+ opacity: "0"
291
+ },
292
+ "100%": {
293
+ transform: "translateY(0)",
294
+ opacity: "1"
295
+ }
296
+ },
297
+ slideInFromBottom: {
298
+ "0%": {
299
+ transform: "translateY(10px)",
300
+ opacity: "0"
301
+ },
302
+ "100%": {
303
+ transform: "translateY(0)",
304
+ opacity: "1"
305
+ }
306
+ },
307
+ slideInFromLeft: {
308
+ "0%": {
309
+ transform: "translateX(-10px)",
310
+ opacity: "0"
311
+ },
312
+ "100%": {
313
+ transform: "translateX(0)",
314
+ opacity: "1"
315
+ }
316
+ },
317
+ slideInFromRight: {
318
+ "0%": {
319
+ transform: "translateX(10px)",
320
+ opacity: "0"
321
+ },
322
+ "100%": {
323
+ transform: "translateX(0)",
324
+ opacity: "1"
325
+ }
326
+ },
327
+ slideOutToTop: {
328
+ "0%": {
329
+ transform: "translateY(0)",
330
+ opacity: "1"
331
+ },
332
+ "100%": {
333
+ transform: "translateY(-10px)",
334
+ opacity: "0"
335
+ }
336
+ },
337
+ slideOutToBottom: {
338
+ "0%": {
339
+ transform: "translateY(0)",
340
+ opacity: "1"
341
+ },
342
+ "100%": {
343
+ transform: "translateY(10px)",
344
+ opacity: "0"
345
+ }
346
+ },
347
+ slideOutToLeft: {
348
+ "0%": {
349
+ transform: "translateX(0)",
350
+ opacity: "1"
351
+ },
352
+ "100%": {
353
+ transform: "translateX(-10px)",
354
+ opacity: "0"
355
+ }
356
+ },
357
+ slideOutToRight: {
358
+ "0%": {
359
+ transform: "translateX(0)",
360
+ opacity: "1"
361
+ },
362
+ "100%": {
363
+ transform: "translateX(10px)",
364
+ opacity: "0"
365
+ }
366
+ }
367
+ };
368
+
369
+ // ../tailwind-config/src/animation/index.ts
370
+ var animation = { ...sliceAnimation, ...barAnimation };
371
+ var keyframes = { ...sliceKeyframe, ...barKeyframe };
372
+
373
+ // ../tailwind-config/src/shadow/index.ts
374
+ var boxShadow = {
375
+ "border-1": "inner 0 0 0 1px inset",
376
+ "border-2": "inner 0 0 0 2px inset",
377
+ "border-3": "inner 0 0 0 3px inset",
378
+ "border-4": "inner 0 0 0 4px inset",
379
+ "border-5": "inner 0 0 0 5px inset",
380
+ "border-6": "inner 0 0 0 6px inset",
381
+ "border-7": "inner 0 0 0 7px inset",
382
+ "border-8": "inner 0 0 0 8px inset",
383
+ "border-9": "inner 0 0 0 9px inset",
384
+ "border-10": "inner 0 0 0 10px inset",
385
+ inner: "inset 0 4px 8px 0 rgba(36, 39, 44, 0.2)",
386
+ "inner-sm": "inset 0 4px 8px 0 rgba(0, 0, 0, 0.2)",
387
+ "inner-md": "inset 0 6px 12px 0 rgba(0, 0, 0, 0.2)",
388
+ "inner-lg": "inset 0 8px 16px 0 rgba(0, 0, 0, 0.2)",
389
+ "inner-xl": "inset 0 10px 20px 0 rgba(0, 0, 0, 0.2)",
390
+ drop: "0 20px 40px 0 rgba(36, 39, 44, 0.2)",
391
+ "drop-sm": "0 4px 12px 0 rgba(0, 0, 0, 0.1)",
392
+ "drop-md": "0 6px 18px 0 rgba(0, 0, 0, 0.1)",
393
+ "drop-lg": "0 8px 24px 0 rgba(0, 0, 0, 0.1)",
394
+ "drop-xl": "0 10px 30px 0 rgba(0, 0, 0, 0.1)"
395
+ };
396
+
397
+ // ../tailwind-config/src/border/radius.ts
398
+ var borderRadius = {
399
+ sm: "4px",
400
+ md: "6px",
401
+ lg: "8px",
402
+ xl: "10px",
403
+ none: "0",
404
+ full: "9999px"
405
+ };
406
+
407
+ // ../tailwind-config/src/space/gap.ts
408
+ var gap = {
409
+ sm: "4px",
410
+ md: "6px",
411
+ lg: "8px",
412
+ xl: "10px"
413
+ };
414
+
415
+ // src/utils/tailwind-variants.ts
416
+ function typedKeys(obj) {
417
+ return Object.keys(obj);
418
+ }
419
+ var COMMON_SIZE = ["sm", "md", "lg", "xl"];
420
+ var tv = (0, import_tailwind_variants.createTV)({
421
+ twMergeConfig: {
422
+ classGroups: {
423
+ fontSize: [{ text: [...typedKeys(fontSize)] }],
424
+ borderRadius: [{ rounded: [...typedKeys(borderRadius)] }],
425
+ boxShadow: [{ shadow: [...typedKeys(boxShadow)] }],
426
+ padding: [{ p: [...COMMON_SIZE] }],
427
+ gap: [{ gap: [...typedKeys(gap)] }]
428
+ }
429
+ }
430
+ });
431
+
432
+ // src/utils/props.ts
433
+ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
434
+ if (!variantKeys) {
435
+ return [props, {}];
436
+ }
437
+ const picked = variantKeys.reduce((acc, key) => {
438
+ if (key in props) {
439
+ return { ...acc, [key]: props[key] };
440
+ } else {
441
+ return acc;
442
+ }
443
+ }, {});
444
+ if (removeVariantProps) {
445
+ const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
446
+ return [omitted, picked];
447
+ } else {
448
+ return [props, picked];
449
+ }
450
+ };
451
+
452
+ // src/components/button/text-button.tsx
453
+ var import_react2 = require("react");
454
+
455
+ // src/utils/clsx.ts
456
+ function clsx(...args) {
457
+ var i = 0, tmp, x, str = "";
458
+ while (i < args.length) {
459
+ if (tmp = args[i++]) {
460
+ if (x = toVal(tmp)) {
461
+ str && (str += " ");
462
+ str += x;
463
+ }
464
+ }
465
+ }
466
+ return str;
467
+ }
468
+ function toVal(mix) {
469
+ var k, y, str = "";
470
+ if (typeof mix === "string" || typeof mix === "number") {
471
+ str += mix;
472
+ } else if (typeof mix === "object") {
473
+ if (Array.isArray(mix)) {
474
+ var len = mix.length;
475
+ for (k = 0; k < len; k++) {
476
+ if (mix[k]) {
477
+ if (y = toVal(mix[k])) {
478
+ str && (str += " ");
479
+ str += y;
480
+ }
481
+ }
482
+ }
483
+ } else {
484
+ for (y in mix) {
485
+ if (mix[y]) {
486
+ str && (str += " ");
487
+ str += y;
488
+ }
489
+ }
490
+ }
491
+ }
492
+ return str;
493
+ }
494
+
495
+ // src/components/button/text-button.tsx
496
+ var import_jsx_runtime2 = require("react/jsx-runtime");
497
+ var TextButton = (0, import_react2.forwardRef)((originalProps, ref) => {
498
+ const [props, variantProps] = mapPropsVariants(originalProps, textButtonStyle.variantKeys);
499
+ const { children, startContent, endContent, classNames, variant, disabled, size, ...buttonProps } = {
500
+ ...props,
501
+ ...variantProps
502
+ };
503
+ const slots = (0, import_react2.useMemo)(() => textButtonStyle({ ...variantProps }), [variantProps]);
504
+ const getContentProps = (0, import_react2.useCallback)(() => {
505
+ const className = slots.content({ class: classNames == null ? void 0 : classNames.content });
506
+ return { className, size };
507
+ }, [slots, classNames, size]);
508
+ const renderContent = (content) => {
509
+ const contentProps = getContentProps();
510
+ if ((0, import_react2.isValidElement)(content)) {
511
+ const _content = content;
512
+ const contentProps2 = getContentProps();
513
+ const mergedProps = {
514
+ ...contentProps2,
515
+ ...typeof _content.props.className === "string" && {
516
+ className: clsx(contentProps2.className, _content.props.className)
517
+ }
518
+ };
519
+ return (0, import_react2.cloneElement)(_content, mergedProps);
520
+ }
521
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...contentProps, children: content });
522
+ };
523
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
524
+ "button",
525
+ {
526
+ ...buttonProps,
527
+ ref,
528
+ disabled,
529
+ className: clsx(
530
+ slots.base({ class: classNames == null ? void 0 : classNames.base }),
531
+ variant === "underline" && slots.underline({ class: classNames == null ? void 0 : classNames.underline })
532
+ ),
533
+ children: [
534
+ startContent && renderContent(startContent),
535
+ children,
536
+ endContent && renderContent(endContent)
537
+ ]
538
+ }
539
+ );
540
+ });
541
+ TextButton.displayName = "TextButton";
542
+ var text_button_default = TextButton;
543
+ var textButtonStyle = tv({
544
+ slots: {
545
+ base: ["flex", "items-center", "justify-center", "whitespace-nowrap", "overflow-hidden"],
546
+ content: [],
547
+ underline: ["underline", "decoration-skip-ink", "underline-offset-auto"]
548
+ },
549
+ variants: {
550
+ variant: {
551
+ "non-under": [],
552
+ underline: []
553
+ },
554
+ color: {
555
+ primary: [],
556
+ secondary: [],
557
+ neutral: [],
558
+ info: [],
559
+ success: [],
560
+ warning: [],
561
+ danger: []
562
+ },
563
+ size: {
564
+ sm: {
565
+ base: ["text-sm"],
566
+ underline: ["decoration-[1px]"]
567
+ },
568
+ md: {
569
+ base: ["text-md"],
570
+ underline: ["decoration-[1.25px]"]
571
+ },
572
+ lg: {
573
+ base: ["text-lg"],
574
+ underline: ["decoration-[1.5px]"]
575
+ },
576
+ xl: {
577
+ base: ["text-xl"],
578
+ underline: ["decoration-[1.75px]"]
579
+ }
580
+ },
581
+ disabled: {
582
+ true: {
583
+ base: ["!text-neutral-light", "pointer-events-none"]
584
+ }
585
+ },
586
+ isInGroup: {
587
+ true: {
588
+ base: [
589
+ "[&:not(:first-child):not(:last-child)]:rounded-none",
590
+ "first:rounded-r-none",
591
+ "last:rounded-l-none",
592
+ "[&:not(:first-child)]:border-l-0"
593
+ ]
594
+ }
595
+ }
596
+ },
597
+ compoundVariants: [
598
+ {
599
+ color: "primary",
600
+ class: {
601
+ base: ["text-primary-main", "hover:text-primary-dark", "active:text-primary-strong"]
602
+ }
603
+ },
604
+ {
605
+ color: "secondary",
606
+ class: {
607
+ base: ["text-secondary-main", "hover:text-secondary-dark", "active:text-secondary-strong"]
608
+ }
609
+ },
610
+ {
611
+ color: "neutral",
612
+ class: {
613
+ base: ["text-neutral-main", "hover:text-neutral-dark", "active:text-neutral-strong"]
614
+ }
615
+ },
616
+ {
617
+ color: "info",
618
+ class: {
619
+ base: ["text-info-main", "hover:text-info-dark", "active:text-info-strong"]
620
+ }
621
+ },
622
+ {
623
+ color: "success",
624
+ class: {
625
+ base: ["text-success-main", "hover:text-success-dark", "active:text-success-strong"]
626
+ }
627
+ },
628
+ {
629
+ color: "warning",
630
+ class: {
631
+ base: ["text-warning-main", "hover:text-warning-dark", "active:text-warning-strong"]
632
+ }
633
+ },
634
+ {
635
+ color: "danger",
636
+ class: {
637
+ base: ["text-danger-main", "hover:text-danger-dark", "active:text-danger-strong"]
638
+ }
639
+ }
640
+ ],
641
+ defaultVariants: {
642
+ size: "md",
643
+ color: "primary",
644
+ variant: "non-under",
645
+ disabled: false,
646
+ isInGroup: false
647
+ }
648
+ });
649
+
650
+ // src/components/picker/utils.ts
651
+ var convert24To12 = (time24) => {
652
+ const [HH, MM] = time24.split(":");
653
+ let h = Number(HH);
654
+ const minute = MM || "";
655
+ const meridiem = h >= 12 ? "PM" : "AM";
656
+ let hour12 = h % 12;
657
+ if (hour12 === 0) hour12 = 12;
658
+ const hour = String(hour12).padStart(2, "0");
659
+ return { hour, minute, meridiem };
660
+ };
661
+ var getCurrent12Hour = () => {
662
+ const now = /* @__PURE__ */ new Date();
663
+ let hour = now.getHours();
664
+ const minute = String(now.getMinutes()).padStart(2, "0");
665
+ const meridiem = hour >= 12 ? "PM" : "AM";
666
+ hour = hour % 12 || 12;
667
+ return {
668
+ hour: String(hour).padStart(2, "0"),
669
+ minute,
670
+ meridiem
671
+ };
672
+ };
673
+
674
+ // src/components/picker/timePicker/Panel.tsx
675
+ var import_jsx_runtime3 = require("react/jsx-runtime");
676
+ var hours = [...Array(12)].map((_, i) => String(i + 1).padStart(2, "0"));
677
+ var minutes = [...Array(60)].map((_, i) => String(i).padStart(2, "0"));
678
+ var meridiemList = ["AM", "PM"];
679
+ var TimePickerPanel = (0, import_react3.forwardRef)(
680
+ ({ value, onChange, nowTitle, confirmTitle }, ref) => {
681
+ const [time, setTime] = (0, import_react3.useState)({ hour: "", minute: "", meridiem: "" });
682
+ const handleNow = () => {
683
+ setTime(getCurrent12Hour());
684
+ };
685
+ const handleConfirm = (time2) => {
686
+ const { hour, minute, meridiem } = time2;
687
+ let h = Number(hour);
688
+ if (meridiem === "AM") {
689
+ if (h === 12) h = 0;
690
+ } else {
691
+ if (h !== 12) h += 12;
692
+ }
693
+ const HH = String(h).padStart(2, "0");
694
+ const MM = minute.padStart(2, "0");
695
+ const SS = "00";
696
+ onChange(`${HH}:${MM}:${SS}`);
697
+ };
698
+ (0, import_react3.useEffect)(() => {
699
+ setTime(value ? convert24To12(value) : getCurrent12Hour());
700
+ }, [value]);
701
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
702
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: "flex gap-[10px]", children: [
703
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-center gap-[5px]", children: [
704
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(WheelColumn, { list: hours, value: time.hour, onChange: (v) => setTime({ ...time, hour: v }) }),
705
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-[5px] text-sm font-bold", children: ":" }),
706
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(WheelColumn, { list: minutes, value: time.minute, onChange: (v) => setTime({ ...time, minute: v }) })
707
+ ] }),
708
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(WheelColumn, { list: meridiemList, value: time.meridiem, onChange: (v) => setTime({ ...time, meridiem: v }) })
709
+ ] }),
710
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex justify-between px-1 text-sm", children: [
711
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
712
+ text_button_default,
713
+ {
714
+ variant: "underline",
715
+ color: "neutral",
716
+ size: "sm",
717
+ classNames: { base: "font-bold" },
718
+ onClick: handleNow,
719
+ children: nowTitle
720
+ }
721
+ ),
722
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
723
+ text_button_default,
724
+ {
725
+ variant: "underline",
726
+ size: "sm",
727
+ classNames: { base: "font-bold" },
728
+ onClick: () => handleConfirm(time),
729
+ children: confirmTitle
730
+ }
731
+ )
732
+ ] })
733
+ ] });
734
+ }
735
+ );
736
+ var Panel_default = TimePickerPanel;
737
+ // Annotate the CommonJS export names for ESM import in node:
738
+ 0 && (module.exports = {
739
+ TimePickerPanel
740
+ });