@deepnoid/ui 0.0.87 → 0.0.89
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/dist/{chunk-4DLTBZUQ.mjs → chunk-3DRIHQOM.mjs} +7 -5
- package/dist/{chunk-4SWFYTMR.mjs → chunk-6YE26GOI.mjs} +10 -8
- package/dist/{chunk-QX6VJLEM.mjs → chunk-7HHFRKJU.mjs} +2 -2
- package/dist/{chunk-H2HUJ4N2.mjs → chunk-A3RWT3JJ.mjs} +9 -4
- package/dist/{chunk-BE2OG6M4.mjs → chunk-ANYPMQH4.mjs} +28 -21
- package/dist/{chunk-5HSZ5AYM.mjs → chunk-B4KZBOGT.mjs} +16 -16
- package/dist/{chunk-QIZOXBOY.mjs → chunk-DWROPKZW.mjs} +4 -4
- package/dist/{chunk-PHQY5T3E.mjs → chunk-HFVZFUC3.mjs} +7 -14
- package/dist/{chunk-IOV7MEPG.mjs → chunk-IOCRFIQF.mjs} +30 -0
- package/dist/{chunk-4VIEZ5FT.mjs → chunk-JN7EGKJL.mjs} +8 -7
- package/dist/{chunk-SFNR4F3J.mjs → chunk-L6BQA6GI.mjs} +2 -2
- package/dist/{chunk-PRUAIZTU.mjs → chunk-LCI6RPWE.mjs} +1 -1
- package/dist/{chunk-IZOMH2SL.mjs → chunk-MOINJECK.mjs} +16 -15
- package/dist/{chunk-QVGXHUYW.mjs → chunk-N2JULHST.mjs} +9 -9
- package/dist/chunk-OJ2OEI5B.mjs +202 -0
- package/dist/{chunk-2COCX2VX.mjs → chunk-PXUBPWKU.mjs} +2 -2
- package/dist/{chunk-PCIONGEJ.mjs → chunk-QWFOYO3D.mjs} +37 -19
- package/dist/{chunk-LY6LJRUX.mjs → chunk-RZZWHI6O.mjs} +1 -1
- package/dist/chunk-UR64ZUAU.mjs +671 -0
- package/dist/{chunk-PUFNT5LS.mjs → chunk-VG4644BG.mjs} +1 -1
- package/dist/components/accordion/accordion.d.mts +1 -1
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.test.mjs +3 -3
- package/dist/components/accordion/accordionItem.d.mts +1 -1
- package/dist/components/accordion/accordionItem.d.ts +1 -1
- package/dist/components/accordion/accordionItem.js +31 -1
- package/dist/components/accordion/accordionItem.mjs +3 -3
- package/dist/components/accordion/index.js +31 -1
- package/dist/components/accordion/index.mjs +3 -3
- package/dist/components/button/button-group.test.js +4103 -167
- package/dist/components/button/button-group.test.mjs +7 -3
- package/dist/components/button/button.d.mts +360 -12
- package/dist/components/button/button.d.ts +360 -12
- package/dist/components/button/button.js +4054 -110
- package/dist/components/button/button.mjs +5 -1
- package/dist/components/button/button.test.js +4059 -125
- package/dist/components/button/button.test.mjs +7 -3
- package/dist/components/button/index.d.mts +3 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.js +4046 -112
- package/dist/components/button/index.mjs +5 -1
- package/dist/components/card/card.d.mts +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/checkbox/checkbox.d.mts +69 -69
- package/dist/components/checkbox/checkbox.d.ts +69 -69
- package/dist/components/checkbox/checkbox.js +28 -21
- package/dist/components/checkbox/checkbox.mjs +1 -1
- package/dist/components/checkbox/checkbox.test.js +28 -21
- package/dist/components/checkbox/checkbox.test.mjs +3 -3
- package/dist/components/checkbox/index.js +28 -21
- package/dist/components/checkbox/index.mjs +1 -1
- package/dist/components/icon/Icon.d.mts +4 -0
- package/dist/components/icon/Icon.d.ts +4 -0
- package/dist/components/icon/Icon.js +30 -0
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +30 -0
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +1 -0
- package/dist/components/icon/template.d.ts +1 -0
- package/dist/components/icon/template.js +30 -0
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +36 -4
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.d.mts +7 -2
- package/dist/components/input/input.d.ts +7 -2
- package/dist/components/input/input.js +36 -4
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/input/input.test.js +36 -4
- package/dist/components/input/input.test.mjs +4 -4
- package/dist/components/list/list.d.mts +1 -1
- package/dist/components/list/list.d.ts +1 -1
- package/dist/components/list/listItem.d.mts +1 -1
- package/dist/components/list/listItem.d.ts +1 -1
- package/dist/components/modal/index.js +505 -127
- package/dist/components/modal/index.mjs +5 -4
- package/dist/components/modal/modal.js +505 -127
- package/dist/components/modal/modal.mjs +5 -4
- package/dist/components/modal/modal.test.js +497 -129
- package/dist/components/modal/modal.test.mjs +5 -4
- package/dist/components/pagination/index.js +16 -16
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/pagination/pagination.js +16 -16
- package/dist/components/pagination/pagination.mjs +1 -1
- package/dist/components/pagination/pagination.test.js +16 -16
- package/dist/components/pagination/pagination.test.mjs +1 -1
- package/dist/components/progress/index.js +9 -9
- package/dist/components/progress/index.mjs +1 -1
- package/dist/components/progress/progress.d.mts +33 -33
- package/dist/components/progress/progress.d.ts +33 -33
- package/dist/components/progress/progress.js +9 -9
- package/dist/components/progress/progress.mjs +1 -1
- package/dist/components/progress/progress.test.js +9 -9
- package/dist/components/progress/progress.test.mjs +1 -1
- package/dist/components/radio/index.js +37 -19
- package/dist/components/radio/index.mjs +1 -1
- package/dist/components/radio/radio.d.mts +33 -33
- package/dist/components/radio/radio.d.ts +33 -33
- package/dist/components/radio/radio.js +37 -19
- package/dist/components/radio/radio.mjs +1 -1
- package/dist/components/radio/radio.test.js +37 -19
- package/dist/components/radio/radio.test.mjs +1 -1
- package/dist/components/select/index.js +36 -5
- package/dist/components/select/index.mjs +4 -4
- package/dist/components/select/option.js +30 -0
- package/dist/components/select/option.mjs +3 -3
- package/dist/components/select/select.d.mts +2 -2
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.js +36 -5
- package/dist/components/select/select.mjs +4 -4
- package/dist/components/select/select.test.js +36 -5
- package/dist/components/select/select.test.mjs +7 -7
- package/dist/components/slider/index.js +9 -4
- package/dist/components/slider/index.mjs +1 -1
- package/dist/components/slider/slider.d.mts +26 -0
- package/dist/components/slider/slider.d.ts +26 -0
- package/dist/components/slider/slider.js +9 -4
- package/dist/components/slider/slider.mjs +1 -1
- package/dist/components/slider/slider.test.js +9 -4
- package/dist/components/slider/slider.test.mjs +1 -1
- package/dist/components/switch/index.js +16 -15
- package/dist/components/switch/index.mjs +1 -1
- package/dist/components/switch/switch.d.mts +48 -48
- package/dist/components/switch/switch.d.ts +48 -48
- package/dist/components/switch/switch.js +16 -15
- package/dist/components/switch/switch.mjs +1 -1
- package/dist/components/switch/switch.test.js +16 -15
- package/dist/components/switch/switch.test.mjs +1 -1
- package/dist/components/table/index.js +66 -27
- package/dist/components/table/index.mjs +6 -6
- package/dist/components/table/table-body.js +60 -23
- package/dist/components/table/table-body.mjs +4 -4
- package/dist/components/table/table-head.js +28 -21
- package/dist/components/table/table-head.mjs +2 -2
- package/dist/components/table/table.d.mts +21 -7
- package/dist/components/table/table.d.ts +21 -7
- package/dist/components/table/table.js +66 -27
- package/dist/components/table/table.mjs +6 -6
- package/dist/components/table/table.test.js +66 -27
- package/dist/components/table/table.test.mjs +6 -6
- package/dist/components/tabs/tabs.d.mts +1 -1
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.test.mjs +3 -3
- package/dist/components/textarea/index.d.mts +3 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.js +89 -30
- package/dist/components/textarea/index.mjs +2 -1
- package/dist/components/textarea/textarea.d.mts +510 -9
- package/dist/components/textarea/textarea.d.ts +510 -9
- package/dist/components/textarea/textarea.js +89 -30
- package/dist/components/textarea/textarea.mjs +2 -1
- package/dist/components/textarea/textarea.test.js +89 -30
- package/dist/components/textarea/textarea.test.mjs +3 -2
- package/dist/components/toast/index.js +32 -2
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.js +31 -1
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/toast.test.js +31 -1
- package/dist/components/toast/toast.test.mjs +3 -3
- package/dist/components/toast/use-toast.js +32 -2
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/components/tooltip/tooltip.test.js +4034 -118
- package/dist/components/tooltip/tooltip.test.mjs +6 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2773 -2334
- package/dist/index.mjs +33 -33
- package/package.json +1 -1
- package/dist/chunk-66WCZEEU.mjs +0 -320
- package/dist/chunk-WOX3SLJB.mjs +0 -162
|
@@ -13002,10 +13002,7 @@ var CheckBox = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
13002
13002
|
fill: "none",
|
|
13003
13003
|
points: "1 9 7 14 15 4",
|
|
13004
13004
|
stroke: "currentColor",
|
|
13005
|
-
strokeDasharray: 22,
|
|
13006
|
-
strokeDashoffset: isSelected ? 44 : 66,
|
|
13007
13005
|
strokeLinecap: "round",
|
|
13008
|
-
strokeLinejoin: "round",
|
|
13009
13006
|
strokeWidth: 3,
|
|
13010
13007
|
style: isSelected ? {
|
|
13011
13008
|
transition: "stroke-dashoffset 250ms linear 0.2s"
|
|
@@ -13023,7 +13020,7 @@ CheckBox.displayName = "CheckBox";
|
|
|
13023
13020
|
var checkbox_default = CheckBox;
|
|
13024
13021
|
var checkbox = tv({
|
|
13025
13022
|
slots: {
|
|
13026
|
-
base: "group relative inline-flex items-center cursor-pointer",
|
|
13023
|
+
base: ["group", "relative", "inline-flex", "items-center", "cursor-pointer"],
|
|
13027
13024
|
wrapper: [
|
|
13028
13025
|
"relative",
|
|
13029
13026
|
"inline-flex",
|
|
@@ -13050,33 +13047,33 @@ var checkbox = tv({
|
|
|
13050
13047
|
"group-hover:before:bg-neutral-soft",
|
|
13051
13048
|
"before:transition duration-200"
|
|
13052
13049
|
],
|
|
13053
|
-
icon: "z-10 opacity-0 group-has-[:checked]:opacity-100 text-white",
|
|
13054
|
-
label: "relative text-foreground select-none"
|
|
13050
|
+
icon: ["z-10", "opacity-0", "group-has-[:checked]:opacity-100", "text-white"],
|
|
13051
|
+
label: ["relative", "text-foreground", "select-none"]
|
|
13055
13052
|
},
|
|
13056
13053
|
variants: {
|
|
13057
13054
|
color: {
|
|
13058
13055
|
primary: {
|
|
13059
|
-
wrapper: "group-has-[:checked]:before:border-primary-main group-has-[:checked]:before:bg-primary-main"
|
|
13056
|
+
wrapper: ["group-has-[:checked]:before:border-primary-main", "group-has-[:checked]:before:bg-primary-main"]
|
|
13060
13057
|
},
|
|
13061
13058
|
secondary: {
|
|
13062
|
-
wrapper: "group-has-[:checked]:before:border-secondary-main group-has-[:checked]:before:bg-secondary-main"
|
|
13059
|
+
wrapper: ["group-has-[:checked]:before:border-secondary-main", "group-has-[:checked]:before:bg-secondary-main"]
|
|
13063
13060
|
}
|
|
13064
13061
|
},
|
|
13065
13062
|
size: {
|
|
13066
13063
|
sm: {
|
|
13067
|
-
wrapper: ["w-[15px] h-[15px] rounded-sm", "before:rounded-[
|
|
13068
|
-
label: "text-sm ml-[
|
|
13069
|
-
icon: "w-[10px] h-[10px]"
|
|
13064
|
+
wrapper: ["w-[15px]", "h-[15px]", "rounded-sm", "before:rounded-[3px]", "after:rounded-[3px]"],
|
|
13065
|
+
label: ["text-sm", "ml-[6px]"],
|
|
13066
|
+
icon: ["w-[10px]", "h-[10px]"]
|
|
13070
13067
|
},
|
|
13071
13068
|
md: {
|
|
13072
|
-
wrapper: ["w-[17px] h-[17px] rounded-md", "before:rounded-[
|
|
13073
|
-
label: "text-md ml-[
|
|
13074
|
-
icon: "w-[12px] h-[12px]"
|
|
13069
|
+
wrapper: ["w-[17px]", "h-[17px]", "rounded-md", "before:rounded-[3px]", "after:rounded-[3px]"],
|
|
13070
|
+
label: ["text-md", "ml-[8px]"],
|
|
13071
|
+
icon: ["w-[12px]", "h-[12px]"]
|
|
13075
13072
|
},
|
|
13076
13073
|
lg: {
|
|
13077
|
-
wrapper: ["w-[20px] h-[20px] rounded-lg", "before:rounded-[
|
|
13078
|
-
label: "text-lg ml-[10px]",
|
|
13079
|
-
icon: "w-[15px] h-[15px]"
|
|
13074
|
+
wrapper: ["w-[20px]", "h-[20px]", "rounded-lg", "before:rounded-[4px]", "after:rounded-[4px]"],
|
|
13075
|
+
label: ["text-lg", "ml-[10px]"],
|
|
13076
|
+
icon: ["w-[15px]", "h-[15px]"]
|
|
13080
13077
|
}
|
|
13081
13078
|
},
|
|
13082
13079
|
lineThrough: {
|
|
@@ -13097,14 +13094,24 @@ var checkbox = tv({
|
|
|
13097
13094
|
},
|
|
13098
13095
|
isInvalid: {
|
|
13099
13096
|
true: {
|
|
13100
|
-
wrapper:
|
|
13097
|
+
wrapper: [
|
|
13098
|
+
"before:border-danger-main",
|
|
13099
|
+
"group-has-[:checked]:before:bg-danger-main",
|
|
13100
|
+
"group-has-[:checked]:before:border-danger-main"
|
|
13101
|
+
],
|
|
13101
13102
|
label: "text-danger-main"
|
|
13102
13103
|
}
|
|
13103
13104
|
},
|
|
13104
13105
|
isDisabled: {
|
|
13105
13106
|
true: {
|
|
13106
13107
|
base: "opacity-disabled pointer-events-none text-neutral-light",
|
|
13107
|
-
wrapper:
|
|
13108
|
+
wrapper: [
|
|
13109
|
+
"after:bg-neutral-soft",
|
|
13110
|
+
"before:border-neutral-light",
|
|
13111
|
+
"before:bg-neutral-soft",
|
|
13112
|
+
"group-has-[:checked]:before:bg-neutral-soft",
|
|
13113
|
+
"group-has-[:checked]:before:border-neutral-light"
|
|
13114
|
+
],
|
|
13108
13115
|
label: "text-neutral-light",
|
|
13109
13116
|
icon: "text-neutral-light"
|
|
13110
13117
|
}
|
|
@@ -13125,8 +13132,8 @@ var checkbox = tv({
|
|
|
13125
13132
|
"after:!duration-200",
|
|
13126
13133
|
"motion-reduce:transition-none"
|
|
13127
13134
|
],
|
|
13128
|
-
icon: "transition-opacity motion-reduce:transition-none",
|
|
13129
|
-
label: "transition-colors-opacity before:transition-width motion-reduce:transition-none"
|
|
13135
|
+
icon: ["transition-opacity", "motion-reduce:transition-none"],
|
|
13136
|
+
label: ["transition-colors-opacity", "before:transition-width", "motion-reduce:transition-none"]
|
|
13130
13137
|
}
|
|
13131
13138
|
}
|
|
13132
13139
|
},
|
|
@@ -13472,6 +13479,36 @@ var template = {
|
|
|
13472
13479
|
}
|
|
13473
13480
|
);
|
|
13474
13481
|
},
|
|
13482
|
+
loading: ({ className, fill }) => {
|
|
13483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
13484
|
+
"svg",
|
|
13485
|
+
{
|
|
13486
|
+
width: "24",
|
|
13487
|
+
height: "24",
|
|
13488
|
+
viewBox: "0 0 24 24",
|
|
13489
|
+
fill: "none",
|
|
13490
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13491
|
+
className,
|
|
13492
|
+
children: [
|
|
13493
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
13494
|
+
"path",
|
|
13495
|
+
{
|
|
13496
|
+
d: "M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12ZM6.6 12C6.6 14.9823 9.01766 17.4 12 17.4C14.9823 17.4 17.4 14.9823 17.4 12C17.4 9.01766 14.9823 6.6 12 6.6C9.01766 6.6 6.6 9.01766 6.6 12Z",
|
|
13497
|
+
fill: "currentColor",
|
|
13498
|
+
fillOpacity: "0.1"
|
|
13499
|
+
}
|
|
13500
|
+
),
|
|
13501
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
13502
|
+
"path",
|
|
13503
|
+
{
|
|
13504
|
+
d: "M21 12C21 13.9006 20.3983 15.7524 19.2812 17.2901C18.164 18.8277 16.5887 19.9722 14.7812 20.5595C12.9736 21.1468 11.0264 21.1468 9.21885 20.5595C7.41126 19.9722 5.836 18.8277 4.71885 17.2901C3.60169 15.7524 3 13.9006 3 12C3 10.0994 3.60169 8.24756 4.71885 6.70993C5.836 5.1723 7.41126 4.02781 9.21885 3.44049C11.0264 2.85317 12.9736 2.85317 14.7812 3.44049L13.6687 6.8643C12.5841 6.5119 11.4159 6.5119 10.3313 6.86429C9.24675 7.21669 8.3016 7.90338 7.63131 8.82596C6.96102 9.74854 6.6 10.8596 6.6 12C6.6 13.1404 6.96102 14.2515 7.63131 15.174C8.3016 16.0966 9.24675 16.7833 10.3313 17.1357C11.4159 17.4881 12.5841 17.4881 13.6687 17.1357C14.7532 16.7833 15.6984 16.0966 16.3687 15.174C17.039 14.2515 17.4 13.1404 17.4 12H21Z",
|
|
13505
|
+
fill: "currentColor"
|
|
13506
|
+
}
|
|
13507
|
+
)
|
|
13508
|
+
]
|
|
13509
|
+
}
|
|
13510
|
+
);
|
|
13511
|
+
},
|
|
13475
13512
|
// ** User **
|
|
13476
13513
|
"user-circle": ({ className, fill }) => {
|
|
13477
13514
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -16757,7 +16794,7 @@ var TableBody = ({
|
|
|
16757
16794
|
const getTrProps = (0, import_react4.useCallback)(
|
|
16758
16795
|
(index) => ({
|
|
16759
16796
|
className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr })),
|
|
16760
|
-
"data-
|
|
16797
|
+
"data-odd": index % 2 !== 0,
|
|
16761
16798
|
"data-expanded": expandedRows.has(index)
|
|
16762
16799
|
}),
|
|
16763
16800
|
[classNames == null ? void 0 : classNames.tr, expandedRows, slots]
|
|
@@ -16824,7 +16861,7 @@ var TableBody = ({
|
|
|
16824
16861
|
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { ...getTdProps({ field: "expandIcon" }, row, keys), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
16825
16862
|
Icon_default,
|
|
16826
16863
|
{
|
|
16827
|
-
name: expandedRows.has(rowIndex) ? "
|
|
16864
|
+
name: expandedRows.has(rowIndex) ? "brace-down" : "brace-right",
|
|
16828
16865
|
className: `ml-2 transition-transform`,
|
|
16829
16866
|
size
|
|
16830
16867
|
}
|
|
@@ -17009,7 +17046,9 @@ var table = (0, import_tailwind_variants3.tv)({
|
|
|
17009
17046
|
true: {}
|
|
17010
17047
|
},
|
|
17011
17048
|
isSelectedRow: {
|
|
17012
|
-
true: {
|
|
17049
|
+
true: {
|
|
17050
|
+
tr: "cursor-pointer"
|
|
17051
|
+
}
|
|
17013
17052
|
},
|
|
17014
17053
|
hideHeader: {
|
|
17015
17054
|
true: {
|
|
@@ -17098,7 +17137,7 @@ var table = (0, import_tailwind_variants3.tv)({
|
|
|
17098
17137
|
variant: "stripe",
|
|
17099
17138
|
color: "primary",
|
|
17100
17139
|
class: {
|
|
17101
|
-
tr: "data-[
|
|
17140
|
+
tr: "data-[odd=true]:bg-primary-soft",
|
|
17102
17141
|
td: "group-hover:bg-primary-light"
|
|
17103
17142
|
}
|
|
17104
17143
|
},
|
|
@@ -17106,7 +17145,7 @@ var table = (0, import_tailwind_variants3.tv)({
|
|
|
17106
17145
|
variant: "stripe",
|
|
17107
17146
|
color: "secondary",
|
|
17108
17147
|
class: {
|
|
17109
|
-
tr: "data-[
|
|
17148
|
+
tr: "data-[odd=true]:bg-secondary-soft",
|
|
17110
17149
|
td: "group-hover:bg-secondary-light"
|
|
17111
17150
|
}
|
|
17112
17151
|
},
|
|
@@ -17114,7 +17153,7 @@ var table = (0, import_tailwind_variants3.tv)({
|
|
|
17114
17153
|
variant: "stripe",
|
|
17115
17154
|
color: "neutral",
|
|
17116
17155
|
class: {
|
|
17117
|
-
tr: "data-[
|
|
17156
|
+
tr: "data-[odd=true]:bg-trans-soft",
|
|
17118
17157
|
td: "group-hover:bg-neutral-light"
|
|
17119
17158
|
}
|
|
17120
17159
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
table_default
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-6YE26GOI.mjs";
|
|
5
|
+
import "../../chunk-DWROPKZW.mjs";
|
|
6
|
+
import "../../chunk-VG4644BG.mjs";
|
|
7
7
|
import "../../chunk-QZ3LVYJW.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-ANYPMQH4.mjs";
|
|
9
9
|
import "../../chunk-27Y6K5NK.mjs";
|
|
10
10
|
import {
|
|
11
11
|
render
|
|
12
12
|
} from "../../chunk-FNPWLOGV.mjs";
|
|
13
13
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-LCI6RPWE.mjs";
|
|
15
|
+
import "../../chunk-IOCRFIQF.mjs";
|
|
16
16
|
import "../../chunk-E3G5QXSH.mjs";
|
|
17
17
|
import "../../chunk-J725QONZ.mjs";
|
|
18
18
|
import "../../chunk-IZ6II3QA.mjs";
|
|
@@ -61,8 +61,8 @@ declare const tabs: tailwind_variants.TVReturnType<{
|
|
|
61
61
|
}, undefined, {
|
|
62
62
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
|
63
63
|
size?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
64
|
-
color?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
65
64
|
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
65
|
+
color?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
66
66
|
fullWidth?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
67
67
|
} | undefined;
|
|
68
68
|
} & tailwind_variants_dist_config.TWMConfig & {
|
|
@@ -61,8 +61,8 @@ declare const tabs: tailwind_variants.TVReturnType<{
|
|
|
61
61
|
}, undefined, {
|
|
62
62
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
|
63
63
|
size?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
64
|
-
color?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
65
64
|
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
65
|
+
color?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
66
66
|
fullWidth?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
67
67
|
} | undefined;
|
|
68
68
|
} & tailwind_variants_dist_config.TWMConfig & {
|
|
@@ -28,24 +28,79 @@ module.exports = __toCommonJS(textarea_exports);
|
|
|
28
28
|
// src/components/textarea/textarea.tsx
|
|
29
29
|
var import_react = require("react");
|
|
30
30
|
var import_tailwind_variants = require("tailwind-variants");
|
|
31
|
+
|
|
32
|
+
// src/utils/props.ts
|
|
33
|
+
var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
34
|
+
if (!variantKeys) {
|
|
35
|
+
return [props, {}];
|
|
36
|
+
}
|
|
37
|
+
const picked = variantKeys.reduce((acc, key) => {
|
|
38
|
+
if (key in props) {
|
|
39
|
+
return { ...acc, [key]: props[key] };
|
|
40
|
+
} else {
|
|
41
|
+
return acc;
|
|
42
|
+
}
|
|
43
|
+
}, {});
|
|
44
|
+
if (removeVariantProps) {
|
|
45
|
+
const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
|
|
46
|
+
return [omitted, picked];
|
|
47
|
+
} else {
|
|
48
|
+
return [props, picked];
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/components/textarea/textarea.tsx
|
|
31
53
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
-
var Textarea = (0, import_react.forwardRef)((
|
|
33
|
-
const
|
|
34
|
-
const {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
var Textarea = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
55
|
+
const [props, variantProps] = mapPropsVariants(originalProps, textareaStyle.variantKeys);
|
|
56
|
+
const { classNames, label, errorMessage, ...textareaProps } = props;
|
|
57
|
+
const slots = (0, import_react.useMemo)(() => textareaStyle({ ...variantProps }), [variantProps]);
|
|
58
|
+
const getBaseProps = (0, import_react.useCallback)(
|
|
59
|
+
() => ({
|
|
60
|
+
className: slots.base({ class: classNames == null ? void 0 : classNames.base })
|
|
61
|
+
}),
|
|
62
|
+
[slots, classNames]
|
|
63
|
+
);
|
|
64
|
+
const getLabelProps = (0, import_react.useCallback)(
|
|
65
|
+
() => ({
|
|
66
|
+
className: slots.label({ class: classNames == null ? void 0 : classNames.label })
|
|
67
|
+
}),
|
|
68
|
+
[slots, classNames]
|
|
69
|
+
);
|
|
70
|
+
const getInnerWrapperProps = (0, import_react.useCallback)(
|
|
71
|
+
() => ({
|
|
72
|
+
className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
|
|
73
|
+
}),
|
|
74
|
+
[slots, classNames]
|
|
75
|
+
);
|
|
76
|
+
const getTextareaWrapperProps = (0, import_react.useCallback)(
|
|
77
|
+
() => ({
|
|
78
|
+
className: slots.textareaWrapper({ class: classNames == null ? void 0 : classNames.textareaWrapper })
|
|
79
|
+
}),
|
|
80
|
+
[slots, classNames]
|
|
81
|
+
);
|
|
82
|
+
const getTextareaProps = (0, import_react.useCallback)(
|
|
83
|
+
() => ({
|
|
84
|
+
...textareaProps,
|
|
85
|
+
ref,
|
|
86
|
+
className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea }),
|
|
87
|
+
disabled: originalProps.isDisabled,
|
|
88
|
+
required: originalProps.isRequired,
|
|
89
|
+
size: 0
|
|
90
|
+
}),
|
|
91
|
+
[textareaProps, ref, slots, classNames == null ? void 0 : classNames.textarea, originalProps.isDisabled, originalProps.isRequired]
|
|
92
|
+
);
|
|
93
|
+
const getErrorMessageProps = (0, import_react.useCallback)(
|
|
94
|
+
() => ({
|
|
95
|
+
className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
|
|
96
|
+
}),
|
|
97
|
+
[slots, classNames]
|
|
98
|
+
);
|
|
99
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getBaseProps(), children: [
|
|
100
|
+
props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...getLabelProps(), children: props.label }),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getInnerWrapperProps(), children: [
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getTextareaWrapperProps(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { ...getTextareaProps() }) }),
|
|
103
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
|
|
49
104
|
] })
|
|
50
105
|
] });
|
|
51
106
|
});
|
|
@@ -53,15 +108,15 @@ Textarea.displayName = "Textarea";
|
|
|
53
108
|
var textarea_default = Textarea;
|
|
54
109
|
var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
55
110
|
slots: {
|
|
56
|
-
base: ["group", "flex", "flex-col", "gap-[10px]"],
|
|
111
|
+
base: ["group/textarea", "flex", "flex-col", "gap-[10px]", "select-none"],
|
|
57
112
|
label: ["flex", "items-center"],
|
|
58
113
|
innerWrapper: ["flex", "flex-col", "gap-[6px]"],
|
|
59
114
|
textareaWrapper: [
|
|
60
115
|
"flex",
|
|
61
116
|
"bg-transparent",
|
|
62
117
|
"border-neutral-main",
|
|
63
|
-
"
|
|
64
|
-
"group-has-[p]:
|
|
118
|
+
"group-has-[p]/textarea:border-danger-main",
|
|
119
|
+
"group-has-[p]/textarea:bg-danger-soft",
|
|
65
120
|
"transition duration-200"
|
|
66
121
|
],
|
|
67
122
|
textarea: [
|
|
@@ -71,7 +126,7 @@ var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
|
71
126
|
"focus-visible:outline-none",
|
|
72
127
|
"resize-none"
|
|
73
128
|
],
|
|
74
|
-
|
|
129
|
+
errorMessage: ["text-danger-main"]
|
|
75
130
|
},
|
|
76
131
|
variants: {
|
|
77
132
|
variant: {
|
|
@@ -89,21 +144,24 @@ var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
|
89
144
|
size: {
|
|
90
145
|
sm: {
|
|
91
146
|
base: "gap-[6px]",
|
|
92
|
-
textareaWrapper: "w-[240px] rounded-sm",
|
|
147
|
+
textareaWrapper: "w-[240px] rounded-sm p-[6px]",
|
|
93
148
|
textarea: "text-sm rounded-sm",
|
|
94
|
-
label: "text-sm"
|
|
149
|
+
label: "text-sm",
|
|
150
|
+
errorMessage: "text-sm"
|
|
95
151
|
},
|
|
96
152
|
md: {
|
|
97
153
|
base: "gap-[8px]",
|
|
98
|
-
textareaWrapper: "w-[240px] rounded-md",
|
|
154
|
+
textareaWrapper: "w-[240px] rounded-md p-[8px]",
|
|
99
155
|
textarea: "text-md rounded-md",
|
|
100
|
-
label: "text-md"
|
|
156
|
+
label: "text-md",
|
|
157
|
+
errorMessage: "text-md"
|
|
101
158
|
},
|
|
102
159
|
lg: {
|
|
103
160
|
base: "gap-[10px]",
|
|
104
|
-
textareaWrapper: "w-[240px] rounded-lg",
|
|
161
|
+
textareaWrapper: "w-[240px] rounded-lg p-[10px]",
|
|
105
162
|
textarea: "text-lg rounded-lg",
|
|
106
|
-
label: "text-lg"
|
|
163
|
+
label: "text-lg",
|
|
164
|
+
errorMessage: "text-lg"
|
|
107
165
|
}
|
|
108
166
|
},
|
|
109
167
|
radius: {
|
|
@@ -127,9 +185,10 @@ var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
|
127
185
|
isDisabled: {
|
|
128
186
|
true: {
|
|
129
187
|
base: ["opacity-disabled", "pointer-events-none"],
|
|
130
|
-
textareaWrapper: ["border-neutral-light", "pointer-events-none"],
|
|
131
|
-
textarea: ["
|
|
132
|
-
label: ["text-neutral-light", "pointer-events-none"]
|
|
188
|
+
textareaWrapper: ["bg-neutral-soft", "border-neutral-light", "pointer-events-none"],
|
|
189
|
+
textarea: ["text-neutral-light placeholder:text-neutral-light", "border-neutral-light"],
|
|
190
|
+
label: ["text-neutral-light", "pointer-events-none"],
|
|
191
|
+
errorMessage: "text-danger-light"
|
|
133
192
|
}
|
|
134
193
|
},
|
|
135
194
|
isRequired: {
|