@deepnoid/ui 0.1.19 → 0.1.21
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.
- package/.turbo/turbo-build.log +202 -183
- package/dist/assets/images/cogwheel.d.mts +2 -0
- package/dist/assets/images/cogwheel.d.ts +2 -0
- package/dist/assets/images/cogwheel.js +4 -0
- package/dist/assets/images/cogwheel.mjs +8 -0
- package/dist/assets/images/folder.d.mts +2 -0
- package/dist/assets/images/folder.d.ts +2 -0
- package/dist/assets/images/folder.js +4 -0
- package/dist/assets/images/folder.mjs +8 -0
- package/dist/chunk-2DLKV6TT.mjs +168 -0
- package/dist/{chunk-7TXQPX4O.mjs → chunk-2Y7IBUAZ.mjs} +19 -8
- package/dist/chunk-3BKCODIL.mjs +49 -0
- package/dist/{chunk-A7OXEUCC.mjs → chunk-3IU2RPSM.mjs} +75 -9
- package/dist/{chunk-3TJAGKKY.mjs → chunk-7CFOD7G4.mjs} +11 -9
- package/dist/chunk-7KUFDVGL.mjs +71 -0
- package/dist/chunk-7USF56CT.mjs +8 -0
- package/dist/{chunk-5ANQDLRS.mjs → chunk-DUPQBPI2.mjs} +4 -4
- package/dist/{chunk-K7Z6PVXE.mjs → chunk-EWZAHXN7.mjs} +7 -7
- package/dist/{chunk-BFM3LPBK.mjs → chunk-FBAR75U4.mjs} +4 -4
- package/dist/{chunk-RPDPB4JP.mjs → chunk-HQLSHEK6.mjs} +4 -4
- package/dist/{chunk-DADMVOYI.mjs → chunk-HWL7TPUN.mjs} +1 -1
- package/dist/chunk-IZM66FHP.mjs +8 -0
- package/dist/{chunk-QIDZXCYP.mjs → chunk-JHDYQCEE.mjs} +6 -6
- package/dist/chunk-MBLZYQCN.mjs +1 -0
- package/dist/{chunk-7A5M7DRD.mjs → chunk-MQI5SZWO.mjs} +7 -7
- package/dist/{chunk-3DPVPTHL.mjs → chunk-MV7RSV4D.mjs} +3 -3
- package/dist/chunk-MW7CSRIE.mjs +348 -0
- package/dist/chunk-OV7CZNXU.mjs +135 -0
- package/dist/{chunk-AG7AWQKH.mjs → chunk-Q6BZ76DI.mjs} +4 -4
- package/dist/{chunk-63WXGSTV.mjs → chunk-QHWFHOW2.mjs} +24 -14
- package/dist/{chunk-FONJYZKH.mjs → chunk-SDHQUYFI.mjs} +7 -7
- package/dist/{chunk-UHFJ7ZFM.mjs → chunk-UTC2D6GV.mjs} +6 -6
- package/dist/chunk-XGYQ6D3S.mjs +82 -0
- package/dist/{chunk-UYPVP36M.mjs → chunk-XQGD4ZIX.mjs} +1 -1
- package/dist/cogwheel-U2B3CWEL.png +0 -0
- package/dist/components/avatar/avatar.js +75 -9
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.js +75 -9
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/backdrop/backdrop.mjs +2 -2
- package/dist/components/backdrop/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +75 -9
- package/dist/components/breadcrumb/breadcrumb.mjs +9 -9
- package/dist/components/breadcrumb/index.js +75 -9
- package/dist/components/breadcrumb/index.mjs +9 -9
- package/dist/components/button/button.js +75 -9
- package/dist/components/button/button.mjs +5 -5
- package/dist/components/button/icon-button.js +75 -9
- package/dist/components/button/icon-button.mjs +5 -5
- package/dist/components/button/index.js +75 -9
- package/dist/components/button/index.mjs +9 -9
- package/dist/components/button/text-button.mjs +3 -3
- package/dist/components/checkbox/checkbox.mjs +3 -3
- package/dist/components/checkbox/index.mjs +3 -3
- package/dist/components/chip/chip.js +75 -9
- package/dist/components/chip/chip.mjs +4 -4
- package/dist/components/chip/index.js +75 -9
- package/dist/components/chip/index.mjs +4 -4
- package/dist/components/dateTimePicker/calendar.js +75 -9
- package/dist/components/dateTimePicker/calendar.mjs +4 -4
- package/dist/components/dateTimePicker/dateTimePicker.js +75 -9
- package/dist/components/dateTimePicker/dateTimePicker.mjs +9 -9
- package/dist/components/dateTimePicker/index.js +75 -9
- package/dist/components/dateTimePicker/index.mjs +9 -9
- package/dist/components/dateTimePicker/timePicker.js +75 -9
- package/dist/components/dateTimePicker/timePicker.mjs +7 -7
- package/dist/components/icon/Icon.d.mts +6 -2
- package/dist/components/icon/Icon.d.ts +6 -2
- package/dist/components/icon/Icon.js +75 -9
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +75 -9
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +2 -1
- package/dist/components/icon/template.d.ts +2 -1
- package/dist/components/icon/template.js +75 -9
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +89 -12
- package/dist/components/input/index.mjs +5 -5
- package/dist/components/input/input.js +89 -12
- package/dist/components/input/input.mjs +5 -5
- package/dist/components/list/index.js +75 -9
- package/dist/components/list/index.mjs +8 -8
- package/dist/components/list/list.mjs +2 -2
- package/dist/components/list/listItem.js +75 -9
- package/dist/components/list/listItem.mjs +5 -5
- package/dist/components/modal/index.d.mts +0 -3
- package/dist/components/modal/index.d.ts +0 -3
- package/dist/components/modal/index.js +205 -158
- package/dist/components/modal/index.mjs +11 -9
- package/dist/components/modal/modal.d.mts +43 -105
- package/dist/components/modal/modal.d.ts +43 -105
- package/dist/components/modal/modal.js +206 -164
- package/dist/components/modal/modal.mjs +12 -12
- package/dist/components/pagination/index.js +89 -12
- package/dist/components/pagination/index.mjs +6 -6
- package/dist/components/pagination/pagination.js +89 -12
- package/dist/components/pagination/pagination.mjs +6 -6
- package/dist/components/radio/index.mjs +3 -3
- package/dist/components/radio/radio.mjs +3 -3
- package/dist/components/ripple/index.mjs +3 -3
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.js +376 -295
- package/dist/components/select/index.mjs +5 -6
- package/dist/components/select/select.d.mts +190 -177
- package/dist/components/select/select.d.ts +190 -177
- package/dist/components/select/select.js +376 -295
- package/dist/components/select/select.mjs +5 -6
- package/dist/components/table/form-table.d.mts +52 -0
- package/dist/components/table/form-table.d.ts +52 -0
- package/dist/components/table/form-table.js +365 -0
- package/dist/components/table/form-table.mjs +9 -0
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.js +162 -30
- package/dist/components/table/index.mjs +15 -11
- package/dist/components/table/table-body.d.mts +3 -2
- package/dist/components/table/table-body.d.ts +3 -2
- package/dist/components/table/table-body.js +23 -13
- package/dist/components/table/table-body.mjs +4 -4
- package/dist/components/table/table-head.d.mts +2 -2
- package/dist/components/table/table-head.d.ts +2 -2
- package/dist/components/table/table-head.js +2 -2
- package/dist/components/table/table-head.mjs +4 -4
- package/dist/components/table/table.d.mts +2 -1
- package/dist/components/table/table.d.ts +2 -1
- package/dist/components/table/table.js +119 -30
- package/dist/components/table/table.mjs +10 -10
- package/dist/components/tabs/index.mjs +2 -2
- package/dist/components/tabs/tabs.mjs +2 -2
- package/dist/components/toast/index.js +239 -97
- package/dist/components/toast/index.mjs +6 -5
- package/dist/components/toast/toast.d.mts +40 -81
- package/dist/components/toast/toast.d.ts +40 -81
- package/dist/components/toast/toast.js +210 -56
- package/dist/components/toast/toast.mjs +5 -4
- package/dist/components/toast/use-toast.d.mts +6 -10
- package/dist/components/toast/use-toast.d.ts +6 -10
- package/dist/components/toast/use-toast.js +239 -97
- package/dist/components/toast/use-toast.mjs +6 -5
- package/dist/components/tooltip/index.mjs +2 -2
- package/dist/components/tooltip/tooltip.mjs +2 -2
- package/dist/components/tree/index.d.mts +2 -0
- package/dist/components/tree/index.d.ts +2 -0
- package/dist/components/tree/index.js +4371 -0
- package/dist/components/tree/index.mjs +15 -0
- package/dist/components/tree/tree.d.mts +20 -0
- package/dist/components/tree/tree.d.ts +20 -0
- package/dist/components/{select/option.js → tree/tree.js} +146 -74
- package/dist/components/tree/tree.mjs +14 -0
- package/dist/folder-RO3QTLGS.svg +9 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +681 -545
- package/dist/index.mjs +71 -62
- package/package.json +1 -1
- package/types/images.d.ts +14 -0
- package/dist/chunk-5OBP42D6.mjs +0 -117
- package/dist/chunk-HDNQOLUJ.mjs +0 -83
- package/dist/chunk-MJT6ZW4C.mjs +0 -255
- package/dist/chunk-P6NVCCBZ.mjs +0 -76
- package/dist/chunk-RXIFDECK.mjs +0 -213
- package/dist/chunk-S3QS5B7F.mjs +0 -61
- package/dist/components/select/option.d.mts +0 -17
- package/dist/components/select/option.d.ts +0 -17
- package/dist/components/select/option.mjs +0 -12
- package/dist/components/select/useSelect.d.mts +0 -31
- package/dist/components/select/useSelect.d.ts +0 -31
- package/dist/components/select/useSelect.js +0 -84
- package/dist/components/select/useSelect.mjs +0 -8
- package/dist/{chunk-D6QI3DJG.mjs → chunk-7H5XPHY6.mjs} +4 -4
- package/dist/{chunk-2UUH2MBF.mjs → chunk-DX3KXNP6.mjs} +0 -0
- package/dist/{chunk-Z2537DF6.mjs → chunk-IL5ENWCR.mjs} +3 -3
- package/dist/{chunk-WFMFC7R6.mjs → chunk-KCOHU7X7.mjs} +4 -4
- package/dist/{chunk-LL6F3WDX.mjs → chunk-P5QCU457.mjs} +3 -3
- package/dist/{chunk-2YMAKIZ6.mjs → chunk-SSMMWMQC.mjs} +3 -3
- package/dist/{chunk-HIVPDIEP.mjs → chunk-UFVQPPPW.mjs} +3 -3
- package/dist/{chunk-QIRL6HY6.mjs → chunk-YIIFWADW.mjs} +4 -4
package/dist/chunk-P6NVCCBZ.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
Icon_default
|
|
4
|
-
} from "./chunk-DADMVOYI.mjs";
|
|
5
|
-
import {
|
|
6
|
-
tv
|
|
7
|
-
} from "./chunk-4ZJFD3L3.mjs";
|
|
8
|
-
|
|
9
|
-
// src/components/select/option.tsx
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
var Option = (props) => {
|
|
12
|
-
const { base, option, icon } = optionStyle(props);
|
|
13
|
-
return /* @__PURE__ */ jsxs(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
title: props.option.value,
|
|
17
|
-
className: base(),
|
|
18
|
-
onClick: () => props.onClick(props.option),
|
|
19
|
-
ref: (node) => {
|
|
20
|
-
props.isSelected && (node == null ? void 0 : node.scrollIntoView());
|
|
21
|
-
},
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ jsx("div", { className: option(), children: props.children }),
|
|
24
|
-
props.isSelected && /* @__PURE__ */ jsx("div", { className: icon(), children: /* @__PURE__ */ jsx(Icon_default, { name: "check", size: props.size }) })
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
var option_default = Option;
|
|
30
|
-
var optionStyle = tv({
|
|
31
|
-
slots: {
|
|
32
|
-
base: ["w-full", "flex", "items-center", "justify-between", , "overflow-hidden"],
|
|
33
|
-
option: ["text-ellipsis overflow-hidden "],
|
|
34
|
-
icon: ""
|
|
35
|
-
},
|
|
36
|
-
variants: {
|
|
37
|
-
variant: {
|
|
38
|
-
solid: {},
|
|
39
|
-
normal: {},
|
|
40
|
-
line: {}
|
|
41
|
-
},
|
|
42
|
-
color: {
|
|
43
|
-
primary: {
|
|
44
|
-
base: ["border-primary-main", "hover:bg-primary-soft", "hover:text-primary-main"],
|
|
45
|
-
icon: "text-primary-main"
|
|
46
|
-
},
|
|
47
|
-
secondary: {
|
|
48
|
-
base: ["border-secondary-main", "hover:bg-secondary-soft", "hover:text-secondary-main"],
|
|
49
|
-
icon: "text-secondary-main"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
size: {
|
|
53
|
-
sm: {
|
|
54
|
-
base: "text-sm px-[6px] py-[4.5px]"
|
|
55
|
-
},
|
|
56
|
-
md: {
|
|
57
|
-
base: "text-md px-[8px] py-[6.5px]"
|
|
58
|
-
},
|
|
59
|
-
lg: {
|
|
60
|
-
base: "text-lg px-[10px] py-[8px]"
|
|
61
|
-
},
|
|
62
|
-
xl: {
|
|
63
|
-
base: "text-xl px-[10px] py-[8px]"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
defaultVariants: {
|
|
68
|
-
variant: "normal",
|
|
69
|
-
color: "primary",
|
|
70
|
-
size: "md"
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
option_default
|
|
76
|
-
};
|
package/dist/chunk-RXIFDECK.mjs
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
button_default
|
|
4
|
-
} from "./chunk-7A5M7DRD.mjs";
|
|
5
|
-
import {
|
|
6
|
-
Icon_default
|
|
7
|
-
} from "./chunk-DADMVOYI.mjs";
|
|
8
|
-
import {
|
|
9
|
-
tv
|
|
10
|
-
} from "./chunk-4ZJFD3L3.mjs";
|
|
11
|
-
import {
|
|
12
|
-
mapPropsVariants
|
|
13
|
-
} from "./chunk-E3G5QXSH.mjs";
|
|
14
|
-
|
|
15
|
-
// src/components/modal/modal.tsx
|
|
16
|
-
import { forwardRef, useCallback, useMemo, useEffect } from "react";
|
|
17
|
-
import { createPortal } from "react-dom";
|
|
18
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
var Modal = forwardRef((originalProps, ref) => {
|
|
20
|
-
const [props, variantProps] = mapPropsVariants(originalProps, modal.variantKeys);
|
|
21
|
-
const {
|
|
22
|
-
classNames,
|
|
23
|
-
isOpen,
|
|
24
|
-
icon,
|
|
25
|
-
title,
|
|
26
|
-
subTitle,
|
|
27
|
-
content,
|
|
28
|
-
confirmButtonText,
|
|
29
|
-
cancelButtonText,
|
|
30
|
-
showCloseButton,
|
|
31
|
-
isDismissable = true,
|
|
32
|
-
isKeyboardDismissDisabled = false,
|
|
33
|
-
onConfirm,
|
|
34
|
-
onCancel
|
|
35
|
-
} = props;
|
|
36
|
-
const slots = useMemo(() => modal({ ...variantProps }), [...Object.values(variantProps)]);
|
|
37
|
-
const getBackdropProps = useCallback(
|
|
38
|
-
() => ({
|
|
39
|
-
className: slots.backdrop({ class: classNames == null ? void 0 : classNames.backdrop }),
|
|
40
|
-
onClick: (e) => {
|
|
41
|
-
if (isDismissable && e.target === e.currentTarget && onCancel) {
|
|
42
|
-
onCancel();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}),
|
|
46
|
-
[slots, classNames == null ? void 0 : classNames.backdrop, isDismissable, onCancel]
|
|
47
|
-
);
|
|
48
|
-
const getModalWrapperProps = useCallback(
|
|
49
|
-
() => ({
|
|
50
|
-
className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }),
|
|
51
|
-
"data-icon-visibility": typeof icon !== "undefined"
|
|
52
|
-
}),
|
|
53
|
-
[slots, classNames == null ? void 0 : classNames.modalWrapper, icon]
|
|
54
|
-
);
|
|
55
|
-
const getIconProps = useCallback(
|
|
56
|
-
() => ({
|
|
57
|
-
className: slots.icon({ class: [classNames == null ? void 0 : classNames.icon] })
|
|
58
|
-
}),
|
|
59
|
-
[slots, classNames == null ? void 0 : classNames.icon]
|
|
60
|
-
);
|
|
61
|
-
const getCloseIconProps = useCallback(
|
|
62
|
-
() => ({
|
|
63
|
-
className: slots.closeIcon({ class: [classNames == null ? void 0 : classNames.closeIcon, showCloseButton ? "" : "hidden"] })
|
|
64
|
-
}),
|
|
65
|
-
[slots, classNames == null ? void 0 : classNames.closeIcon, showCloseButton]
|
|
66
|
-
);
|
|
67
|
-
const getBodyWrapperProps = useCallback(
|
|
68
|
-
() => ({
|
|
69
|
-
className: slots.bodyWrapper({ class: classNames == null ? void 0 : classNames.bodyWrapper })
|
|
70
|
-
}),
|
|
71
|
-
[slots, classNames == null ? void 0 : classNames.bodyWrapper]
|
|
72
|
-
);
|
|
73
|
-
const getTitleWrapperProps = useCallback(
|
|
74
|
-
() => ({
|
|
75
|
-
className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper })
|
|
76
|
-
}),
|
|
77
|
-
[slots, classNames == null ? void 0 : classNames.titleWrapper]
|
|
78
|
-
);
|
|
79
|
-
const getTitleProps = useCallback(
|
|
80
|
-
() => ({
|
|
81
|
-
className: slots.title({ class: classNames == null ? void 0 : classNames.title })
|
|
82
|
-
}),
|
|
83
|
-
[slots, classNames == null ? void 0 : classNames.title]
|
|
84
|
-
);
|
|
85
|
-
const getSubTitleProps = useCallback(
|
|
86
|
-
() => ({
|
|
87
|
-
className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle })
|
|
88
|
-
}),
|
|
89
|
-
[slots, classNames == null ? void 0 : classNames.subTitle]
|
|
90
|
-
);
|
|
91
|
-
const getBodyProps = useCallback(
|
|
92
|
-
() => ({
|
|
93
|
-
className: slots.body({ class: classNames == null ? void 0 : classNames.body })
|
|
94
|
-
}),
|
|
95
|
-
[slots, classNames == null ? void 0 : classNames.body]
|
|
96
|
-
);
|
|
97
|
-
const getContentProps = useCallback(
|
|
98
|
-
() => ({
|
|
99
|
-
className: slots.content({ class: classNames == null ? void 0 : classNames.content })
|
|
100
|
-
}),
|
|
101
|
-
[slots, classNames == null ? void 0 : classNames.content]
|
|
102
|
-
);
|
|
103
|
-
const getFooterWrapperProps = useCallback(
|
|
104
|
-
() => ({
|
|
105
|
-
className: slots.footerWrapper({ class: classNames == null ? void 0 : classNames.footerWrapper })
|
|
106
|
-
}),
|
|
107
|
-
[slots, classNames == null ? void 0 : classNames.footerWrapper]
|
|
108
|
-
);
|
|
109
|
-
useEffect(() => {
|
|
110
|
-
if (isOpen) {
|
|
111
|
-
document.body.classList.add("overflow-hidden");
|
|
112
|
-
} else {
|
|
113
|
-
document.body.classList.remove("overflow-hidden");
|
|
114
|
-
}
|
|
115
|
-
if (!isOpen || isKeyboardDismissDisabled) return;
|
|
116
|
-
const handleKeyDown = (e) => {
|
|
117
|
-
if (e.key === "Escape" && onCancel) {
|
|
118
|
-
onCancel();
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
122
|
-
return () => {
|
|
123
|
-
document.removeEventListener("keydown", handleKeyDown);
|
|
124
|
-
document.body.classList.remove("overflow-hidden");
|
|
125
|
-
};
|
|
126
|
-
}, [isOpen, isKeyboardDismissDisabled, onCancel]);
|
|
127
|
-
return /* @__PURE__ */ jsx(Fragment, { children: isOpen && createPortal(
|
|
128
|
-
/* @__PURE__ */ jsx("div", { ...getBackdropProps(), children: /* @__PURE__ */ jsxs("div", { ref, ...getModalWrapperProps(), children: [
|
|
129
|
-
typeof icon === "string" ? /* @__PURE__ */ jsx("div", { ...getIconProps(), children: /* @__PURE__ */ jsx(Icon_default, { name: icon, className: "h-[80px] w-[80px]" }) }) : /* @__PURE__ */ jsx("div", { ...getIconProps(), children: icon }),
|
|
130
|
-
/* @__PURE__ */ jsxs("div", { ...getBodyWrapperProps(), children: [
|
|
131
|
-
showCloseButton && /* @__PURE__ */ jsx(Icon_default, { name: "close", ...getCloseIconProps(), onClick: onCancel }),
|
|
132
|
-
/* @__PURE__ */ jsxs("div", { ...getBodyProps(), children: [
|
|
133
|
-
(title || subTitle) && /* @__PURE__ */ jsxs("div", { ...getTitleWrapperProps(), children: [
|
|
134
|
-
title && /* @__PURE__ */ jsx("div", { ...getTitleProps(), children: title }),
|
|
135
|
-
subTitle && /* @__PURE__ */ jsx("div", { ...getSubTitleProps(), children: subTitle })
|
|
136
|
-
] }),
|
|
137
|
-
content && typeof content === "string" ? /* @__PURE__ */ jsx("div", { ...getContentProps(), children: content }) : content,
|
|
138
|
-
(cancelButtonText || confirmButtonText) && /* @__PURE__ */ jsxs("div", { ...getFooterWrapperProps(), children: [
|
|
139
|
-
cancelButtonText && /* @__PURE__ */ jsx(button_default, { variant: "outline", color: originalProps.color, fullWidth: true, onClick: onCancel, children: cancelButtonText }),
|
|
140
|
-
confirmButtonText && /* @__PURE__ */ jsx(button_default, { size: "md", color: originalProps.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
|
|
141
|
-
] })
|
|
142
|
-
] })
|
|
143
|
-
] })
|
|
144
|
-
] }) }),
|
|
145
|
-
document.body
|
|
146
|
-
) });
|
|
147
|
-
});
|
|
148
|
-
Modal.displayName = "Modal";
|
|
149
|
-
var modal_default = Modal;
|
|
150
|
-
var modal = tv({
|
|
151
|
-
slots: {
|
|
152
|
-
backdrop: ["relative w-screen h-screen fixed inset-0 bg-black/60", "z-[900]"],
|
|
153
|
-
modalWrapper: ["group/modal", "absolute", "top-1/2", "-translate-y-1/2", "left-1/2", "-translate-x-1/2"],
|
|
154
|
-
icon: ["absolute", "top-[-40px]", "left-1/2", "-translate-x-1/2", "z-10"],
|
|
155
|
-
closeIcon: [
|
|
156
|
-
"absolute",
|
|
157
|
-
"top-[20px]",
|
|
158
|
-
"right-[20px]",
|
|
159
|
-
"cursor-pointer",
|
|
160
|
-
"z-10",
|
|
161
|
-
"group-data-[icon-visibility=true]/modal:top-[80px]"
|
|
162
|
-
],
|
|
163
|
-
titleWrapper: ["relative", "flex", "flex-col", "gap-[10px]"],
|
|
164
|
-
title: "text-h5 text-center text-foreground",
|
|
165
|
-
subTitle: "text-lg text-center text-neutral-dark",
|
|
166
|
-
bodyWrapper: [
|
|
167
|
-
"min-w-[400px]",
|
|
168
|
-
"flex flex-col justify-center",
|
|
169
|
-
"p-[20px]",
|
|
170
|
-
"bg-background",
|
|
171
|
-
"shadow-drop shadow-foreground/20 rounded-xxlg",
|
|
172
|
-
"overflow-hidden",
|
|
173
|
-
"group-data-[icon-visibility=true]/modal:mt-[0]",
|
|
174
|
-
"group-data-[icon-visibility=true]/modal:pt-[60px]"
|
|
175
|
-
],
|
|
176
|
-
body: ["flex", "flex-col", "gap-[20px]"],
|
|
177
|
-
content: ["text-md text-center", "break-words", "bg-neutral-soft", "rounded-[5px]", "p-[10px]"],
|
|
178
|
-
footerWrapper: ["flex gap-[20px]"]
|
|
179
|
-
},
|
|
180
|
-
variants: {
|
|
181
|
-
color: {
|
|
182
|
-
primary: {
|
|
183
|
-
icon: "text-primary-main"
|
|
184
|
-
},
|
|
185
|
-
secondary: {
|
|
186
|
-
icon: "text-secondary-main"
|
|
187
|
-
},
|
|
188
|
-
neutral: {
|
|
189
|
-
icon: "text-neutral-main"
|
|
190
|
-
},
|
|
191
|
-
success: {
|
|
192
|
-
icon: "text-success-main"
|
|
193
|
-
},
|
|
194
|
-
info: {
|
|
195
|
-
icon: "text-info-main"
|
|
196
|
-
},
|
|
197
|
-
warning: {
|
|
198
|
-
icon: "text-warning-main"
|
|
199
|
-
},
|
|
200
|
-
danger: {
|
|
201
|
-
icon: "text-danger-main"
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
defaultVariants: {
|
|
206
|
-
color: "primary"
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
export {
|
|
211
|
-
modal_default,
|
|
212
|
-
modal
|
|
213
|
-
};
|
package/dist/chunk-S3QS5B7F.mjs
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/components/select/useSelect.tsx
|
|
4
|
-
import { useState, useEffect, useRef } from "react";
|
|
5
|
-
var useSelect = ({ options, defaultOption, onChange }) => {
|
|
6
|
-
const [selectedOption, setSelectedOption] = useState(defaultOption);
|
|
7
|
-
const [targetRect, setTargetRect] = useState(null);
|
|
8
|
-
const [optionWrapperHeight, setOptionWrapperHeight] = useState(0);
|
|
9
|
-
const selectWrapperRef = useRef(null);
|
|
10
|
-
const optionWrapperRef = useRef(null);
|
|
11
|
-
const calculatePositionWithScroll = (targetRect2, optionWrapperHeight2) => {
|
|
12
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;
|
|
13
|
-
const scrollLeft = window.scrollX || document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
14
|
-
const spaceBelow = window.innerHeight - (targetRect2.y + targetRect2.height + 4);
|
|
15
|
-
const spaceAbove = targetRect2.y - 4;
|
|
16
|
-
const top = spaceBelow < optionWrapperHeight2 && spaceAbove > optionWrapperHeight2 ? targetRect2.y - optionWrapperHeight2 - 4 : targetRect2.y + targetRect2.height + 4;
|
|
17
|
-
return {
|
|
18
|
-
top: top + scrollTop,
|
|
19
|
-
left: targetRect2.x + scrollLeft
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
const handleToggleSelect = () => {
|
|
23
|
-
if (selectWrapperRef.current) {
|
|
24
|
-
const rect = selectWrapperRef.current.getBoundingClientRect();
|
|
25
|
-
setTargetRect((prevRect) => prevRect ? null : { x: rect.x, y: rect.y, width: rect.width, height: rect.height });
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const handleChangeOption = (option) => {
|
|
29
|
-
onChange == null ? void 0 : onChange(option);
|
|
30
|
-
setSelectedOption(option);
|
|
31
|
-
handleToggleSelect();
|
|
32
|
-
};
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
const onClickOutside = (e) => {
|
|
35
|
-
if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target)) {
|
|
36
|
-
setTargetRect(null);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
window.addEventListener("mousedown", onClickOutside);
|
|
40
|
-
return () => window.removeEventListener("mousedown", onClickOutside);
|
|
41
|
-
}, []);
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (optionWrapperRef.current) {
|
|
44
|
-
setOptionWrapperHeight(optionWrapperRef.current.getBoundingClientRect().height);
|
|
45
|
-
}
|
|
46
|
-
}, [targetRect]);
|
|
47
|
-
return {
|
|
48
|
-
selectedOption,
|
|
49
|
-
targetRect,
|
|
50
|
-
optionWrapperHeight,
|
|
51
|
-
selectWrapperRef,
|
|
52
|
-
optionWrapperRef,
|
|
53
|
-
handleToggleSelect,
|
|
54
|
-
handleChangeOption,
|
|
55
|
-
calculatePositionWithScroll
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
useSelect
|
|
61
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
import { SelectOption } from './select.mjs';
|
|
4
|
-
import { Size } from '../../utils/types.mjs';
|
|
5
|
-
import 'tailwind-variants';
|
|
6
|
-
|
|
7
|
-
interface OptionProps extends Omit<ComponentProps<"div">, "onClick"> {
|
|
8
|
-
variant?: "solid" | "normal" | "line";
|
|
9
|
-
color?: "primary" | "secondary";
|
|
10
|
-
size?: Size;
|
|
11
|
-
option: SelectOption;
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
onClick: (option: SelectOption) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const Option: (props: OptionProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { type OptionProps, Option as default };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
import { SelectOption } from './select.js';
|
|
4
|
-
import { Size } from '../../utils/types.js';
|
|
5
|
-
import 'tailwind-variants';
|
|
6
|
-
|
|
7
|
-
interface OptionProps extends Omit<ComponentProps<"div">, "onClick"> {
|
|
8
|
-
variant?: "solid" | "normal" | "line";
|
|
9
|
-
color?: "primary" | "secondary";
|
|
10
|
-
size?: Size;
|
|
11
|
-
option: SelectOption;
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
onClick: (option: SelectOption) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const Option: (props: OptionProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { type OptionProps, Option as default };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
option_default
|
|
4
|
-
} from "../../chunk-P6NVCCBZ.mjs";
|
|
5
|
-
import "../../chunk-ZYIIXWVY.mjs";
|
|
6
|
-
import "../../chunk-DADMVOYI.mjs";
|
|
7
|
-
import "../../chunk-A7OXEUCC.mjs";
|
|
8
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
9
|
-
import "../../chunk-AC6TWLRT.mjs";
|
|
10
|
-
export {
|
|
11
|
-
option_default as default
|
|
12
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { SelectOption } from './select.mjs';
|
|
3
|
-
import 'tailwind-variants';
|
|
4
|
-
import '../../utils/types.mjs';
|
|
5
|
-
|
|
6
|
-
interface SelectHookProps {
|
|
7
|
-
options: SelectOption[];
|
|
8
|
-
defaultOption?: SelectOption;
|
|
9
|
-
onChange?: (option: SelectOption) => void;
|
|
10
|
-
}
|
|
11
|
-
type TargetRect = {
|
|
12
|
-
x: number;
|
|
13
|
-
y: number;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
};
|
|
17
|
-
declare const useSelect: ({ options, defaultOption, onChange }: SelectHookProps) => {
|
|
18
|
-
selectedOption: SelectOption | undefined;
|
|
19
|
-
targetRect: TargetRect | null;
|
|
20
|
-
optionWrapperHeight: number;
|
|
21
|
-
selectWrapperRef: react.RefObject<HTMLDivElement | null>;
|
|
22
|
-
optionWrapperRef: react.RefObject<HTMLDivElement | null>;
|
|
23
|
-
handleToggleSelect: () => void;
|
|
24
|
-
handleChangeOption: (option: SelectOption) => void;
|
|
25
|
-
calculatePositionWithScroll: (targetRect: TargetRect, optionWrapperHeight: number) => {
|
|
26
|
-
top: number;
|
|
27
|
-
left: number;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { useSelect };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { SelectOption } from './select.js';
|
|
3
|
-
import 'tailwind-variants';
|
|
4
|
-
import '../../utils/types.js';
|
|
5
|
-
|
|
6
|
-
interface SelectHookProps {
|
|
7
|
-
options: SelectOption[];
|
|
8
|
-
defaultOption?: SelectOption;
|
|
9
|
-
onChange?: (option: SelectOption) => void;
|
|
10
|
-
}
|
|
11
|
-
type TargetRect = {
|
|
12
|
-
x: number;
|
|
13
|
-
y: number;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
};
|
|
17
|
-
declare const useSelect: ({ options, defaultOption, onChange }: SelectHookProps) => {
|
|
18
|
-
selectedOption: SelectOption | undefined;
|
|
19
|
-
targetRect: TargetRect | null;
|
|
20
|
-
optionWrapperHeight: number;
|
|
21
|
-
selectWrapperRef: react.RefObject<HTMLDivElement | null>;
|
|
22
|
-
optionWrapperRef: react.RefObject<HTMLDivElement | null>;
|
|
23
|
-
handleToggleSelect: () => void;
|
|
24
|
-
handleChangeOption: (option: SelectOption) => void;
|
|
25
|
-
calculatePositionWithScroll: (targetRect: TargetRect, optionWrapperHeight: number) => {
|
|
26
|
-
top: number;
|
|
27
|
-
left: number;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { useSelect };
|
|
@@ -1,84 +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/select/useSelect.tsx
|
|
22
|
-
var useSelect_exports = {};
|
|
23
|
-
__export(useSelect_exports, {
|
|
24
|
-
useSelect: () => useSelect
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(useSelect_exports);
|
|
27
|
-
var import_react = require("react");
|
|
28
|
-
var useSelect = ({ options, defaultOption, onChange }) => {
|
|
29
|
-
const [selectedOption, setSelectedOption] = (0, import_react.useState)(defaultOption);
|
|
30
|
-
const [targetRect, setTargetRect] = (0, import_react.useState)(null);
|
|
31
|
-
const [optionWrapperHeight, setOptionWrapperHeight] = (0, import_react.useState)(0);
|
|
32
|
-
const selectWrapperRef = (0, import_react.useRef)(null);
|
|
33
|
-
const optionWrapperRef = (0, import_react.useRef)(null);
|
|
34
|
-
const calculatePositionWithScroll = (targetRect2, optionWrapperHeight2) => {
|
|
35
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;
|
|
36
|
-
const scrollLeft = window.scrollX || document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
37
|
-
const spaceBelow = window.innerHeight - (targetRect2.y + targetRect2.height + 4);
|
|
38
|
-
const spaceAbove = targetRect2.y - 4;
|
|
39
|
-
const top = spaceBelow < optionWrapperHeight2 && spaceAbove > optionWrapperHeight2 ? targetRect2.y - optionWrapperHeight2 - 4 : targetRect2.y + targetRect2.height + 4;
|
|
40
|
-
return {
|
|
41
|
-
top: top + scrollTop,
|
|
42
|
-
left: targetRect2.x + scrollLeft
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
const handleToggleSelect = () => {
|
|
46
|
-
if (selectWrapperRef.current) {
|
|
47
|
-
const rect = selectWrapperRef.current.getBoundingClientRect();
|
|
48
|
-
setTargetRect((prevRect) => prevRect ? null : { x: rect.x, y: rect.y, width: rect.width, height: rect.height });
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
const handleChangeOption = (option) => {
|
|
52
|
-
onChange == null ? void 0 : onChange(option);
|
|
53
|
-
setSelectedOption(option);
|
|
54
|
-
handleToggleSelect();
|
|
55
|
-
};
|
|
56
|
-
(0, import_react.useEffect)(() => {
|
|
57
|
-
const onClickOutside = (e) => {
|
|
58
|
-
if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target)) {
|
|
59
|
-
setTargetRect(null);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
window.addEventListener("mousedown", onClickOutside);
|
|
63
|
-
return () => window.removeEventListener("mousedown", onClickOutside);
|
|
64
|
-
}, []);
|
|
65
|
-
(0, import_react.useEffect)(() => {
|
|
66
|
-
if (optionWrapperRef.current) {
|
|
67
|
-
setOptionWrapperHeight(optionWrapperRef.current.getBoundingClientRect().height);
|
|
68
|
-
}
|
|
69
|
-
}, [targetRect]);
|
|
70
|
-
return {
|
|
71
|
-
selectedOption,
|
|
72
|
-
targetRect,
|
|
73
|
-
optionWrapperHeight,
|
|
74
|
-
selectWrapperRef,
|
|
75
|
-
optionWrapperRef,
|
|
76
|
-
handleToggleSelect,
|
|
77
|
-
handleChangeOption,
|
|
78
|
-
calculatePositionWithScroll
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
-
0 && (module.exports = {
|
|
83
|
-
useSelect
|
|
84
|
-
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
mapPropsVariants
|
|
4
|
+
} from "./chunk-E3G5QXSH.mjs";
|
|
5
5
|
import {
|
|
6
6
|
clsx
|
|
7
7
|
} from "./chunk-27Y6K5NK.mjs";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
tv
|
|
10
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/checkbox/checkbox.tsx
|
|
13
13
|
import { forwardRef, useMemo } from "react";
|
|
File without changes
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getTailClassName,
|
|
7
7
|
getTailStyles
|
|
8
8
|
} from "./chunk-WSIADHVC.mjs";
|
|
9
|
-
import {
|
|
10
|
-
tv
|
|
11
|
-
} from "./chunk-4ZJFD3L3.mjs";
|
|
12
9
|
import {
|
|
13
10
|
mapPropsVariants
|
|
14
11
|
} from "./chunk-E3G5QXSH.mjs";
|
|
12
|
+
import {
|
|
13
|
+
tv
|
|
14
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
15
15
|
|
|
16
16
|
// src/components/tooltip/tooltip.tsx
|
|
17
17
|
import { forwardRef, useCallback, useMemo, useRef, useState, useEffect } from "react";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
mapPropsVariants
|
|
4
|
+
} from "./chunk-E3G5QXSH.mjs";
|
|
5
5
|
import {
|
|
6
6
|
clsx
|
|
7
7
|
} from "./chunk-27Y6K5NK.mjs";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
tv
|
|
10
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/button/text-button.tsx
|
|
13
13
|
import {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
tv
|
|
4
|
-
} from "./chunk-4ZJFD3L3.mjs";
|
|
5
2
|
import {
|
|
6
3
|
clsx
|
|
7
4
|
} from "./chunk-27Y6K5NK.mjs";
|
|
5
|
+
import {
|
|
6
|
+
tv
|
|
7
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/backdrop/backdrop.tsx
|
|
10
10
|
import { useEffect, useState } from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
tv
|
|
4
|
-
} from "./chunk-4ZJFD3L3.mjs";
|
|
5
2
|
import {
|
|
6
3
|
mapPropsVariants
|
|
7
4
|
} from "./chunk-E3G5QXSH.mjs";
|
|
5
|
+
import {
|
|
6
|
+
tv
|
|
7
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/tabs/tabs.tsx
|
|
10
10
|
import { forwardRef, useCallback, useMemo, useState } from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
tv
|
|
4
|
-
} from "./chunk-4ZJFD3L3.mjs";
|
|
5
2
|
import {
|
|
6
3
|
mapPropsVariants
|
|
7
4
|
} from "./chunk-E3G5QXSH.mjs";
|
|
5
|
+
import {
|
|
6
|
+
tv
|
|
7
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/list/list.tsx
|
|
10
10
|
import { Children, cloneElement, forwardRef, isValidElement, useMemo } from "react";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
mapPropsVariants
|
|
4
|
+
} from "./chunk-E3G5QXSH.mjs";
|
|
5
5
|
import {
|
|
6
6
|
clsx
|
|
7
7
|
} from "./chunk-27Y6K5NK.mjs";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
tv
|
|
10
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/radio/radio.tsx
|
|
13
13
|
import { forwardRef, useMemo } from "react";
|