@deepnoid/ui 0.1.108 → 0.1.110

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 (64) hide show
  1. package/.turbo/turbo-build.log +446 -466
  2. package/dist/chunk-CV6IVDL6.mjs +356 -0
  3. package/dist/{chunk-PYPWFOSL.mjs → chunk-YBVJFHH6.mjs} +1 -1
  4. package/dist/{chunk-2EECKYM4.mjs → chunk-YCLB7ZNK.mjs} +1 -1
  5. package/dist/{chunk-7VS6YXNB.mjs → chunk-ZWLRSZTC.mjs} +2 -2
  6. package/dist/components/charts/circularProgress.js +2 -2
  7. package/dist/components/charts/circularProgress.mjs +1 -1
  8. package/dist/components/charts/index.js +2 -2
  9. package/dist/components/charts/index.mjs +1 -1
  10. package/dist/components/picker/index.d.mts +4 -0
  11. package/dist/components/picker/index.d.ts +4 -0
  12. package/dist/components/{dateTimePicker/calendar.js → picker/index.js} +716 -173
  13. package/dist/components/{dateTimePicker/calendar.mjs → picker/index.mjs} +7 -6
  14. package/dist/components/picker/timePicker.d.mts +251 -0
  15. package/dist/components/picker/timePicker.d.ts +251 -0
  16. package/dist/components/{dateTimePicker/dateTimePicker.js → picker/timePicker.js} +617 -904
  17. package/dist/components/{dateTimePicker → picker}/timePicker.mjs +7 -6
  18. package/dist/components/select/index.js +1 -1
  19. package/dist/components/select/index.mjs +1 -1
  20. package/dist/components/select/select.js +1 -1
  21. package/dist/components/select/select.mjs +1 -1
  22. package/dist/components/table/index.mjs +3 -3
  23. package/dist/components/table/table-body.mjs +3 -3
  24. package/dist/components/table/table-head.mjs +3 -3
  25. package/dist/components/table/table.mjs +3 -3
  26. package/dist/components/toast/index.mjs +2 -2
  27. package/dist/components/toast/use-toast.mjs +2 -2
  28. package/dist/components/tooltip/index.js +1 -1
  29. package/dist/components/tooltip/index.mjs +1 -1
  30. package/dist/components/tooltip/tooltip.js +1 -1
  31. package/dist/components/tooltip/tooltip.mjs +1 -1
  32. package/dist/index.d.mts +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +384 -778
  35. package/dist/index.mjs +45 -49
  36. package/package.json +1 -1
  37. package/dist/chunk-FWJ2ZKH6.mjs +0 -87
  38. package/dist/chunk-P732YGHO.mjs +0 -18
  39. package/dist/chunk-X5XJWJSO.mjs +0 -122
  40. package/dist/chunk-Y4W76B42.mjs +0 -210
  41. package/dist/chunk-ZSQQFMEC.mjs +0 -366
  42. package/dist/components/dateTimePicker/calendar.d.mts +0 -68
  43. package/dist/components/dateTimePicker/calendar.d.ts +0 -68
  44. package/dist/components/dateTimePicker/dateTimePicker.d.mts +0 -288
  45. package/dist/components/dateTimePicker/dateTimePicker.d.ts +0 -288
  46. package/dist/components/dateTimePicker/dateTimePicker.mjs +0 -23
  47. package/dist/components/dateTimePicker/index.d.mts +0 -4
  48. package/dist/components/dateTimePicker/index.d.ts +0 -4
  49. package/dist/components/dateTimePicker/index.js +0 -6040
  50. package/dist/components/dateTimePicker/index.mjs +0 -22
  51. package/dist/components/dateTimePicker/timePicker.d.mts +0 -11
  52. package/dist/components/dateTimePicker/timePicker.d.ts +0 -11
  53. package/dist/components/dateTimePicker/timePicker.js +0 -5417
  54. package/dist/components/dateTimePicker/useDateTimePicker.d.mts +0 -34
  55. package/dist/components/dateTimePicker/useDateTimePicker.d.ts +0 -34
  56. package/dist/components/dateTimePicker/useDateTimePicker.js +0 -117
  57. package/dist/components/dateTimePicker/useDateTimePicker.mjs +0 -9
  58. package/dist/components/dateTimePicker/util.d.mts +0 -4
  59. package/dist/components/dateTimePicker/util.d.ts +0 -4
  60. package/dist/components/dateTimePicker/util.js +0 -42
  61. package/dist/components/dateTimePicker/util.mjs +0 -10
  62. package/dist/{chunk-75HLCORR.mjs → chunk-BG7VAVOX.mjs} +0 -0
  63. package/dist/{chunk-2OK3VF75.mjs → chunk-U3O7RIXM.mjs} +3 -3
  64. package/dist/{chunk-IQYWSATB.mjs → chunk-X67ELNP6.mjs} +3 -3
@@ -1,34 +0,0 @@
1
- import * as react from 'react';
2
-
3
- interface DatePickerHookProps {
4
- initialDate?: Date;
5
- initialTime?: string;
6
- onChange?: (date: Date) => void;
7
- }
8
- type TargetRect = {
9
- x: number;
10
- y: number;
11
- width: number;
12
- height: number;
13
- };
14
- declare const useDatePicker: ({ initialDate, initialTime }: DatePickerHookProps) => {
15
- selectedDate: string | undefined;
16
- selectedTime: string | undefined;
17
- targetRect: TargetRect | null;
18
- popupHeight: number;
19
- isFocusInput: boolean;
20
- dateInputRef: react.RefObject<HTMLInputElement | null>;
21
- datePickerWrapperRef: react.RefObject<HTMLDivElement | null>;
22
- datePickerRef: react.RefObject<HTMLDivElement | null>;
23
- handleToggleDatePicker: () => void;
24
- handleChangeDate: (date: string) => void;
25
- handleChangeTime: (time: string) => void;
26
- handleFocusInput: () => void;
27
- handleBlueInput: () => void;
28
- calculatePositionWithScroll: (targetRect: TargetRect) => {
29
- top: number;
30
- left: number;
31
- } | undefined;
32
- };
33
-
34
- export { useDatePicker };
@@ -1,34 +0,0 @@
1
- import * as react from 'react';
2
-
3
- interface DatePickerHookProps {
4
- initialDate?: Date;
5
- initialTime?: string;
6
- onChange?: (date: Date) => void;
7
- }
8
- type TargetRect = {
9
- x: number;
10
- y: number;
11
- width: number;
12
- height: number;
13
- };
14
- declare const useDatePicker: ({ initialDate, initialTime }: DatePickerHookProps) => {
15
- selectedDate: string | undefined;
16
- selectedTime: string | undefined;
17
- targetRect: TargetRect | null;
18
- popupHeight: number;
19
- isFocusInput: boolean;
20
- dateInputRef: react.RefObject<HTMLInputElement | null>;
21
- datePickerWrapperRef: react.RefObject<HTMLDivElement | null>;
22
- datePickerRef: react.RefObject<HTMLDivElement | null>;
23
- handleToggleDatePicker: () => void;
24
- handleChangeDate: (date: string) => void;
25
- handleChangeTime: (time: string) => void;
26
- handleFocusInput: () => void;
27
- handleBlueInput: () => void;
28
- calculatePositionWithScroll: (targetRect: TargetRect) => {
29
- top: number;
30
- left: number;
31
- } | undefined;
32
- };
33
-
34
- export { useDatePicker };
@@ -1,117 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/components/dateTimePicker/useDateTimePicker.tsx
22
- var useDateTimePicker_exports = {};
23
- __export(useDateTimePicker_exports, {
24
- useDatePicker: () => useDatePicker
25
- });
26
- module.exports = __toCommonJS(useDateTimePicker_exports);
27
- var import_react = require("react");
28
-
29
- // src/components/dateTimePicker/util.ts
30
- var formatDateToString = (date) => {
31
- const year = date.getFullYear();
32
- const month = String(date.getMonth() + 1).padStart(2, "0");
33
- const day = String(date.getDate()).padStart(2, "0");
34
- return `${year}-${month}-${day}`;
35
- };
36
-
37
- // src/components/dateTimePicker/useDateTimePicker.tsx
38
- var useDatePicker = ({ initialDate, initialTime }) => {
39
- const [selectedDate, setSelectedDate] = (0, import_react.useState)(
40
- initialDate ? formatDateToString(initialDate) : ""
41
- );
42
- const [selectedTime, setSelectedTime] = (0, import_react.useState)(initialTime ? initialTime : "");
43
- const [targetRect, setTargetRect] = (0, import_react.useState)(null);
44
- const [popupWidth, setPopupWidth] = (0, import_react.useState)(0);
45
- const [popupHeight, setPopupHeight] = (0, import_react.useState)(0);
46
- const [isFocusInput, setIsFocusInput] = (0, import_react.useState)(false);
47
- const dateInputRef = (0, import_react.useRef)(null);
48
- const datePickerWrapperRef = (0, import_react.useRef)(null);
49
- const datePickerRef = (0, import_react.useRef)(null);
50
- const DATE_PICKER_GAP = 4;
51
- const calculatePositionWithScroll = (targetRect2) => {
52
- if (targetRect2 && popupWidth && popupHeight) {
53
- const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;
54
- const scrollLeft = window.scrollX || document.documentElement.scrollLeft || document.body.scrollLeft;
55
- const spaceBelow = window.innerHeight - (targetRect2.y + targetRect2.height + DATE_PICKER_GAP);
56
- const spaceAbove = targetRect2.y - DATE_PICKER_GAP;
57
- const top = spaceBelow < popupHeight && spaceAbove > popupHeight ? targetRect2.y - popupHeight - DATE_PICKER_GAP : targetRect2.y + targetRect2.height + DATE_PICKER_GAP;
58
- return {
59
- top: top + scrollTop,
60
- left: targetRect2.x + targetRect2.width - popupWidth + scrollLeft
61
- };
62
- }
63
- };
64
- const handleToggleDatePicker = () => {
65
- if (datePickerRef.current) {
66
- const rect = datePickerRef.current.getBoundingClientRect();
67
- setTargetRect((prevRect) => prevRect ? null : { x: rect.x, y: rect.y, width: rect.width, height: rect.height });
68
- }
69
- };
70
- const handleChangeDate = (date) => {
71
- setSelectedDate(date);
72
- };
73
- const handleChangeTime = (time) => {
74
- setSelectedTime(time);
75
- };
76
- const handleFocusInput = () => {
77
- setIsFocusInput(true);
78
- };
79
- const handleBlueInput = () => {
80
- setIsFocusInput(false);
81
- };
82
- (0, import_react.useEffect)(() => {
83
- const onClickOutside = (e) => {
84
- if (datePickerRef.current && !datePickerRef.current.contains(e.target) && datePickerWrapperRef.current && !datePickerWrapperRef.current.contains(e.target)) {
85
- setTargetRect(null);
86
- }
87
- };
88
- window.addEventListener("mousedown", onClickOutside);
89
- return () => window.removeEventListener("mousedown", onClickOutside);
90
- }, []);
91
- (0, import_react.useEffect)(() => {
92
- if (datePickerWrapperRef.current) {
93
- setPopupHeight(datePickerWrapperRef.current.getBoundingClientRect().height);
94
- setPopupWidth(datePickerWrapperRef.current.getBoundingClientRect().width);
95
- }
96
- }, [targetRect]);
97
- return {
98
- selectedDate,
99
- selectedTime,
100
- targetRect,
101
- popupHeight,
102
- isFocusInput,
103
- dateInputRef,
104
- datePickerWrapperRef,
105
- datePickerRef,
106
- handleToggleDatePicker,
107
- handleChangeDate,
108
- handleChangeTime,
109
- handleFocusInput,
110
- handleBlueInput,
111
- calculatePositionWithScroll
112
- };
113
- };
114
- // Annotate the CommonJS export names for ESM import in node:
115
- 0 && (module.exports = {
116
- useDatePicker
117
- });
@@ -1,9 +0,0 @@
1
- "use client";
2
- import {
3
- useDatePicker
4
- } from "../../chunk-FWJ2ZKH6.mjs";
5
- import "../../chunk-P732YGHO.mjs";
6
- import "../../chunk-AC6TWLRT.mjs";
7
- export {
8
- useDatePicker
9
- };
@@ -1,4 +0,0 @@
1
- declare const formatDateToString: (date: Date) => string;
2
- declare const formatStringToDate: (date: string) => Date;
3
-
4
- export { formatDateToString, formatStringToDate };
@@ -1,4 +0,0 @@
1
- declare const formatDateToString: (date: Date) => string;
2
- declare const formatStringToDate: (date: string) => Date;
3
-
4
- export { formatDateToString, formatStringToDate };
@@ -1,42 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/components/dateTimePicker/util.ts
22
- var util_exports = {};
23
- __export(util_exports, {
24
- formatDateToString: () => formatDateToString,
25
- formatStringToDate: () => formatStringToDate
26
- });
27
- module.exports = __toCommonJS(util_exports);
28
- var formatDateToString = (date) => {
29
- const year = date.getFullYear();
30
- const month = String(date.getMonth() + 1).padStart(2, "0");
31
- const day = String(date.getDate()).padStart(2, "0");
32
- return `${year}-${month}-${day}`;
33
- };
34
- var formatStringToDate = (date) => {
35
- const formattedDate = new Date(date);
36
- return formattedDate;
37
- };
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- formatDateToString,
41
- formatStringToDate
42
- });
@@ -1,10 +0,0 @@
1
- "use client";
2
- import {
3
- formatDateToString,
4
- formatStringToDate
5
- } from "../../chunk-P732YGHO.mjs";
6
- import "../../chunk-AC6TWLRT.mjs";
7
- export {
8
- formatDateToString,
9
- formatStringToDate
10
- };
File without changes
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- scrollArea_default
4
- } from "./chunk-M37VBNB3.mjs";
5
2
  import {
6
3
  skeleton_default
7
4
  } from "./chunk-6PN3DGOE.mjs";
5
+ import {
6
+ scrollArea_default
7
+ } from "./chunk-M37VBNB3.mjs";
8
8
  import {
9
9
  pagination_default
10
10
  } from "./chunk-GDKDD2MW.mjs";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- getToastPosition
4
- } from "./chunk-ZOTHPHXA.mjs";
5
2
  import {
6
3
  toast_default
7
4
  } from "./chunk-J5K7RN5X.mjs";
5
+ import {
6
+ getToastPosition
7
+ } from "./chunk-ZOTHPHXA.mjs";
8
8
 
9
9
  // src/components/toast/use-toast.tsx
10
10
  import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";