@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.
Files changed (169) hide show
  1. package/dist/{chunk-4DLTBZUQ.mjs → chunk-3DRIHQOM.mjs} +7 -5
  2. package/dist/{chunk-4SWFYTMR.mjs → chunk-6YE26GOI.mjs} +10 -8
  3. package/dist/{chunk-QX6VJLEM.mjs → chunk-7HHFRKJU.mjs} +2 -2
  4. package/dist/{chunk-H2HUJ4N2.mjs → chunk-A3RWT3JJ.mjs} +9 -4
  5. package/dist/{chunk-BE2OG6M4.mjs → chunk-ANYPMQH4.mjs} +28 -21
  6. package/dist/{chunk-5HSZ5AYM.mjs → chunk-B4KZBOGT.mjs} +16 -16
  7. package/dist/{chunk-QIZOXBOY.mjs → chunk-DWROPKZW.mjs} +4 -4
  8. package/dist/{chunk-PHQY5T3E.mjs → chunk-HFVZFUC3.mjs} +7 -14
  9. package/dist/{chunk-IOV7MEPG.mjs → chunk-IOCRFIQF.mjs} +30 -0
  10. package/dist/{chunk-4VIEZ5FT.mjs → chunk-JN7EGKJL.mjs} +8 -7
  11. package/dist/{chunk-SFNR4F3J.mjs → chunk-L6BQA6GI.mjs} +2 -2
  12. package/dist/{chunk-PRUAIZTU.mjs → chunk-LCI6RPWE.mjs} +1 -1
  13. package/dist/{chunk-IZOMH2SL.mjs → chunk-MOINJECK.mjs} +16 -15
  14. package/dist/{chunk-QVGXHUYW.mjs → chunk-N2JULHST.mjs} +9 -9
  15. package/dist/chunk-OJ2OEI5B.mjs +202 -0
  16. package/dist/{chunk-2COCX2VX.mjs → chunk-PXUBPWKU.mjs} +2 -2
  17. package/dist/{chunk-PCIONGEJ.mjs → chunk-QWFOYO3D.mjs} +37 -19
  18. package/dist/{chunk-LY6LJRUX.mjs → chunk-RZZWHI6O.mjs} +1 -1
  19. package/dist/chunk-UR64ZUAU.mjs +671 -0
  20. package/dist/{chunk-PUFNT5LS.mjs → chunk-VG4644BG.mjs} +1 -1
  21. package/dist/components/accordion/accordion.d.mts +1 -1
  22. package/dist/components/accordion/accordion.d.ts +1 -1
  23. package/dist/components/accordion/accordion.test.mjs +3 -3
  24. package/dist/components/accordion/accordionItem.d.mts +1 -1
  25. package/dist/components/accordion/accordionItem.d.ts +1 -1
  26. package/dist/components/accordion/accordionItem.js +31 -1
  27. package/dist/components/accordion/accordionItem.mjs +3 -3
  28. package/dist/components/accordion/index.js +31 -1
  29. package/dist/components/accordion/index.mjs +3 -3
  30. package/dist/components/button/button-group.test.js +4103 -167
  31. package/dist/components/button/button-group.test.mjs +7 -3
  32. package/dist/components/button/button.d.mts +360 -12
  33. package/dist/components/button/button.d.ts +360 -12
  34. package/dist/components/button/button.js +4054 -110
  35. package/dist/components/button/button.mjs +5 -1
  36. package/dist/components/button/button.test.js +4059 -125
  37. package/dist/components/button/button.test.mjs +7 -3
  38. package/dist/components/button/index.d.mts +3 -0
  39. package/dist/components/button/index.d.ts +3 -0
  40. package/dist/components/button/index.js +4046 -112
  41. package/dist/components/button/index.mjs +5 -1
  42. package/dist/components/card/card.d.mts +1 -1
  43. package/dist/components/card/card.d.ts +1 -1
  44. package/dist/components/checkbox/checkbox.d.mts +69 -69
  45. package/dist/components/checkbox/checkbox.d.ts +69 -69
  46. package/dist/components/checkbox/checkbox.js +28 -21
  47. package/dist/components/checkbox/checkbox.mjs +1 -1
  48. package/dist/components/checkbox/checkbox.test.js +28 -21
  49. package/dist/components/checkbox/checkbox.test.mjs +3 -3
  50. package/dist/components/checkbox/index.js +28 -21
  51. package/dist/components/checkbox/index.mjs +1 -1
  52. package/dist/components/icon/Icon.d.mts +4 -0
  53. package/dist/components/icon/Icon.d.ts +4 -0
  54. package/dist/components/icon/Icon.js +30 -0
  55. package/dist/components/icon/Icon.mjs +2 -2
  56. package/dist/components/icon/index.js +30 -0
  57. package/dist/components/icon/index.mjs +2 -2
  58. package/dist/components/icon/template.d.mts +1 -0
  59. package/dist/components/icon/template.d.ts +1 -0
  60. package/dist/components/icon/template.js +30 -0
  61. package/dist/components/icon/template.mjs +1 -1
  62. package/dist/components/input/index.js +36 -4
  63. package/dist/components/input/index.mjs +3 -3
  64. package/dist/components/input/input.d.mts +7 -2
  65. package/dist/components/input/input.d.ts +7 -2
  66. package/dist/components/input/input.js +36 -4
  67. package/dist/components/input/input.mjs +3 -3
  68. package/dist/components/input/input.test.js +36 -4
  69. package/dist/components/input/input.test.mjs +4 -4
  70. package/dist/components/list/list.d.mts +1 -1
  71. package/dist/components/list/list.d.ts +1 -1
  72. package/dist/components/list/listItem.d.mts +1 -1
  73. package/dist/components/list/listItem.d.ts +1 -1
  74. package/dist/components/modal/index.js +505 -127
  75. package/dist/components/modal/index.mjs +5 -4
  76. package/dist/components/modal/modal.js +505 -127
  77. package/dist/components/modal/modal.mjs +5 -4
  78. package/dist/components/modal/modal.test.js +497 -129
  79. package/dist/components/modal/modal.test.mjs +5 -4
  80. package/dist/components/pagination/index.js +16 -16
  81. package/dist/components/pagination/index.mjs +1 -1
  82. package/dist/components/pagination/pagination.js +16 -16
  83. package/dist/components/pagination/pagination.mjs +1 -1
  84. package/dist/components/pagination/pagination.test.js +16 -16
  85. package/dist/components/pagination/pagination.test.mjs +1 -1
  86. package/dist/components/progress/index.js +9 -9
  87. package/dist/components/progress/index.mjs +1 -1
  88. package/dist/components/progress/progress.d.mts +33 -33
  89. package/dist/components/progress/progress.d.ts +33 -33
  90. package/dist/components/progress/progress.js +9 -9
  91. package/dist/components/progress/progress.mjs +1 -1
  92. package/dist/components/progress/progress.test.js +9 -9
  93. package/dist/components/progress/progress.test.mjs +1 -1
  94. package/dist/components/radio/index.js +37 -19
  95. package/dist/components/radio/index.mjs +1 -1
  96. package/dist/components/radio/radio.d.mts +33 -33
  97. package/dist/components/radio/radio.d.ts +33 -33
  98. package/dist/components/radio/radio.js +37 -19
  99. package/dist/components/radio/radio.mjs +1 -1
  100. package/dist/components/radio/radio.test.js +37 -19
  101. package/dist/components/radio/radio.test.mjs +1 -1
  102. package/dist/components/select/index.js +36 -5
  103. package/dist/components/select/index.mjs +4 -4
  104. package/dist/components/select/option.js +30 -0
  105. package/dist/components/select/option.mjs +3 -3
  106. package/dist/components/select/select.d.mts +2 -2
  107. package/dist/components/select/select.d.ts +2 -2
  108. package/dist/components/select/select.js +36 -5
  109. package/dist/components/select/select.mjs +4 -4
  110. package/dist/components/select/select.test.js +36 -5
  111. package/dist/components/select/select.test.mjs +7 -7
  112. package/dist/components/slider/index.js +9 -4
  113. package/dist/components/slider/index.mjs +1 -1
  114. package/dist/components/slider/slider.d.mts +26 -0
  115. package/dist/components/slider/slider.d.ts +26 -0
  116. package/dist/components/slider/slider.js +9 -4
  117. package/dist/components/slider/slider.mjs +1 -1
  118. package/dist/components/slider/slider.test.js +9 -4
  119. package/dist/components/slider/slider.test.mjs +1 -1
  120. package/dist/components/switch/index.js +16 -15
  121. package/dist/components/switch/index.mjs +1 -1
  122. package/dist/components/switch/switch.d.mts +48 -48
  123. package/dist/components/switch/switch.d.ts +48 -48
  124. package/dist/components/switch/switch.js +16 -15
  125. package/dist/components/switch/switch.mjs +1 -1
  126. package/dist/components/switch/switch.test.js +16 -15
  127. package/dist/components/switch/switch.test.mjs +1 -1
  128. package/dist/components/table/index.js +66 -27
  129. package/dist/components/table/index.mjs +6 -6
  130. package/dist/components/table/table-body.js +60 -23
  131. package/dist/components/table/table-body.mjs +4 -4
  132. package/dist/components/table/table-head.js +28 -21
  133. package/dist/components/table/table-head.mjs +2 -2
  134. package/dist/components/table/table.d.mts +21 -7
  135. package/dist/components/table/table.d.ts +21 -7
  136. package/dist/components/table/table.js +66 -27
  137. package/dist/components/table/table.mjs +6 -6
  138. package/dist/components/table/table.test.js +66 -27
  139. package/dist/components/table/table.test.mjs +6 -6
  140. package/dist/components/tabs/tabs.d.mts +1 -1
  141. package/dist/components/tabs/tabs.d.ts +1 -1
  142. package/dist/components/tabs/tabs.test.mjs +3 -3
  143. package/dist/components/textarea/index.d.mts +3 -0
  144. package/dist/components/textarea/index.d.ts +3 -0
  145. package/dist/components/textarea/index.js +89 -30
  146. package/dist/components/textarea/index.mjs +2 -1
  147. package/dist/components/textarea/textarea.d.mts +510 -9
  148. package/dist/components/textarea/textarea.d.ts +510 -9
  149. package/dist/components/textarea/textarea.js +89 -30
  150. package/dist/components/textarea/textarea.mjs +2 -1
  151. package/dist/components/textarea/textarea.test.js +89 -30
  152. package/dist/components/textarea/textarea.test.mjs +3 -2
  153. package/dist/components/toast/index.js +32 -2
  154. package/dist/components/toast/index.mjs +4 -4
  155. package/dist/components/toast/toast.js +31 -1
  156. package/dist/components/toast/toast.mjs +3 -3
  157. package/dist/components/toast/toast.test.js +31 -1
  158. package/dist/components/toast/toast.test.mjs +3 -3
  159. package/dist/components/toast/use-toast.js +32 -2
  160. package/dist/components/toast/use-toast.mjs +4 -4
  161. package/dist/components/tooltip/tooltip.test.js +4034 -118
  162. package/dist/components/tooltip/tooltip.test.mjs +6 -3
  163. package/dist/index.d.mts +1 -1
  164. package/dist/index.d.ts +1 -1
  165. package/dist/index.js +2773 -2334
  166. package/dist/index.mjs +33 -33
  167. package/package.json +1 -1
  168. package/dist/chunk-66WCZEEU.mjs +0 -320
  169. package/dist/chunk-WOX3SLJB.mjs +0 -162
package/dist/index.mjs CHANGED
@@ -3,58 +3,58 @@ import "./chunk-LUWGOKLG.mjs";
3
3
  import {
4
4
  ToastProvider,
5
5
  useToast
6
- } from "./chunk-QX6VJLEM.mjs";
6
+ } from "./chunk-7HHFRKJU.mjs";
7
7
  import "./chunk-ZOTHPHXA.mjs";
8
8
  import {
9
9
  toast_default
10
- } from "./chunk-2COCX2VX.mjs";
10
+ } from "./chunk-PXUBPWKU.mjs";
11
11
  import "./chunk-HIE2YRGA.mjs";
12
12
  import {
13
13
  tooltip_default
14
14
  } from "./chunk-P6AZMYVR.mjs";
15
15
  import "./chunk-DSBSLSJW.mjs";
16
16
  import "./chunk-ODMRJXLJ.mjs";
17
- import "./chunk-3MY6LO7N.mjs";
17
+ import "./chunk-2UUH2MBF.mjs";
18
18
  import {
19
- tabs_default
20
- } from "./chunk-KRI5IALM.mjs";
19
+ table_default
20
+ } from "./chunk-6YE26GOI.mjs";
21
+ import "./chunk-DWROPKZW.mjs";
22
+ import "./chunk-VG4644BG.mjs";
21
23
  import "./chunk-RRAZM5D3.mjs";
22
24
  import {
23
25
  textarea_default
24
- } from "./chunk-WOX3SLJB.mjs";
26
+ } from "./chunk-OJ2OEI5B.mjs";
25
27
  import "./chunk-MV2WCFK7.mjs";
26
28
  import {
27
29
  slider_default
28
- } from "./chunk-H2HUJ4N2.mjs";
30
+ } from "./chunk-A3RWT3JJ.mjs";
29
31
  import "./chunk-LVFI2NOH.mjs";
30
32
  import {
31
33
  switch_default
32
- } from "./chunk-IZOMH2SL.mjs";
33
- import "./chunk-2UUH2MBF.mjs";
34
+ } from "./chunk-MOINJECK.mjs";
35
+ import "./chunk-3MY6LO7N.mjs";
34
36
  import {
35
- table_default
36
- } from "./chunk-4SWFYTMR.mjs";
37
- import "./chunk-PUFNT5LS.mjs";
38
- import "./chunk-QIZOXBOY.mjs";
37
+ tabs_default
38
+ } from "./chunk-KRI5IALM.mjs";
39
39
  import "./chunk-TPFN22HR.mjs";
40
40
  import {
41
41
  radio_default
42
- } from "./chunk-PCIONGEJ.mjs";
42
+ } from "./chunk-QWFOYO3D.mjs";
43
43
  import "./chunk-QCEKPS7U.mjs";
44
44
  import {
45
45
  select_default
46
- } from "./chunk-4VIEZ5FT.mjs";
47
- import "./chunk-LY6LJRUX.mjs";
46
+ } from "./chunk-JN7EGKJL.mjs";
47
+ import "./chunk-RZZWHI6O.mjs";
48
48
  import "./chunk-S3QS5B7F.mjs";
49
49
  import "./chunk-7B7LRG5J.mjs";
50
50
  import {
51
51
  pagination_default
52
- } from "./chunk-5HSZ5AYM.mjs";
52
+ } from "./chunk-B4KZBOGT.mjs";
53
53
  import "./chunk-F3HENRVM.mjs";
54
54
  import "./chunk-7VOQKIIK.mjs";
55
55
  import {
56
56
  progress_default
57
- } from "./chunk-QVGXHUYW.mjs";
57
+ } from "./chunk-N2JULHST.mjs";
58
58
  import "./chunk-7MVEAQ7Z.mjs";
59
59
  import {
60
60
  list_default
@@ -65,40 +65,40 @@ import {
65
65
  import "./chunk-DJOG6Z35.mjs";
66
66
  import {
67
67
  modal_default
68
- } from "./chunk-PHQY5T3E.mjs";
69
- import "./chunk-HAOK24MK.mjs";
68
+ } from "./chunk-HFVZFUC3.mjs";
69
+ import "./chunk-NMSDSEBD.mjs";
70
70
  import "./chunk-QZ3LVYJW.mjs";
71
71
  import {
72
72
  checkbox_default
73
- } from "./chunk-BE2OG6M4.mjs";
73
+ } from "./chunk-ANYPMQH4.mjs";
74
74
  import "./chunk-2GCSFWHD.mjs";
75
75
  import {
76
76
  input_default
77
- } from "./chunk-4DLTBZUQ.mjs";
78
- import "./chunk-NMSDSEBD.mjs";
77
+ } from "./chunk-3DRIHQOM.mjs";
79
78
  import "./chunk-VUYUQGLF.mjs";
80
- import {
81
- button_group_default
82
- } from "./chunk-NGQ3MK2J.mjs";
83
- import {
84
- button_default
85
- } from "./chunk-66WCZEEU.mjs";
79
+ import "./chunk-HAOK24MK.mjs";
86
80
  import {
87
81
  card_default
88
82
  } from "./chunk-2ALY3PH5.mjs";
89
- import "./chunk-27Y6K5NK.mjs";
90
83
  import {
91
84
  accordion_default
92
85
  } from "./chunk-SWR7E3NU.mjs";
93
86
  import {
94
87
  accordionItem_default
95
- } from "./chunk-SFNR4F3J.mjs";
88
+ } from "./chunk-L6BQA6GI.mjs";
89
+ import "./chunk-27Y6K5NK.mjs";
90
+ import {
91
+ button_group_default
92
+ } from "./chunk-NGQ3MK2J.mjs";
93
+ import {
94
+ button_default
95
+ } from "./chunk-UR64ZUAU.mjs";
96
96
  import "./chunk-ZYIIXWVY.mjs";
97
97
  import {
98
98
  Icon_default,
99
99
  iconTemplate
100
- } from "./chunk-PRUAIZTU.mjs";
101
- import "./chunk-IOV7MEPG.mjs";
100
+ } from "./chunk-LCI6RPWE.mjs";
101
+ import "./chunk-IOCRFIQF.mjs";
102
102
  import "./chunk-E3G5QXSH.mjs";
103
103
  import {
104
104
  tv
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/ui",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.js",
@@ -1,320 +0,0 @@
1
- "use client";
2
- import {
3
- tv
4
- } from "./chunk-J725QONZ.mjs";
5
-
6
- // src/components/button/button.tsx
7
- import { forwardRef } from "react";
8
- import { jsxs } from "react/jsx-runtime";
9
- var Button = forwardRef(
10
- ({ children, color, size, variant, radius, fullWidth, isInGroup, isDisabled, startContent, endContent, ...props }, ref) => {
11
- return /* @__PURE__ */ jsxs(
12
- "button",
13
- {
14
- ref,
15
- ...props,
16
- disabled: isDisabled,
17
- className: `${button({
18
- variant,
19
- color,
20
- size,
21
- radius,
22
- isDisabled,
23
- fullWidth,
24
- isInGroup,
25
- class: props.className
26
- })} `,
27
- children: [
28
- startContent && startContent,
29
- children,
30
- endContent && endContent
31
- ]
32
- }
33
- );
34
- }
35
- );
36
- Button.displayName = "Button";
37
- var button_default = Button;
38
- var button = tv({
39
- base: "flex items-center justify-center border whitespace-nowrap transition duration-200",
40
- variants: {
41
- variant: {
42
- solid: "",
43
- line: "",
44
- tonal: "",
45
- trans: "bg-transparent border-transparent",
46
- ghost: ""
47
- },
48
- color: {
49
- primary: "",
50
- secondary: "",
51
- neutral: "",
52
- info: "",
53
- success: "",
54
- warning: "",
55
- danger: ""
56
- },
57
- size: {
58
- sm: "h-[24px] px-[8px] py-[4.5px] text-sm font-[500] rounded-sm gap-sm",
59
- md: "h-[30px] px-[16px] py-[6.5px] text-md font-[500] rounded-md gap-md",
60
- lg: "h-[36px] px-[24px] py-[8px] text-lg font-[500] rounded-lg gap-lg"
61
- },
62
- radius: {
63
- default: "",
64
- full: "rounded-full",
65
- none: "rounded-none"
66
- },
67
- fullWidth: {
68
- true: "w-full"
69
- },
70
- isDisabled: {
71
- true: "disabled:bg-neutral-soft disabled:border-neutral-soft disabled:text-neutral-light disabled:pointer-events-none"
72
- },
73
- isInGroup: {
74
- true: "[&:not(:first-child):not(:last-child)]:rounded-none first:rounded-r-none last:rounded-l-none"
75
- }
76
- },
77
- defaultVariants: {
78
- size: "md",
79
- variant: "solid",
80
- color: "primary",
81
- fullWidth: false,
82
- isDisabled: false,
83
- isInGroup: false
84
- },
85
- compoundVariants: [
86
- // solid & color
87
- {
88
- variant: "solid",
89
- color: "primary",
90
- class: "bg-primary-main hover:bg-primary-dark border-primary-main hover:border-primary-dark text-white"
91
- },
92
- {
93
- variant: "solid",
94
- color: "secondary",
95
- class: "bg-secondary-main hover:bg-secondary-dark border-secondary-main hover:border-secondary-dark text-white"
96
- },
97
- {
98
- variant: "solid",
99
- color: "neutral",
100
- class: "bg-neutral-main hover:bg-neutral-dark border-neutral-main hover:border-neutral-dark text-white"
101
- },
102
- {
103
- variant: "solid",
104
- color: "info",
105
- class: "bg-info-main hover:bg-info-dark border-info-main hover:border-info-dark text-white"
106
- },
107
- {
108
- variant: "solid",
109
- color: "success",
110
- class: "bg-success-main hover:bg-success-dark border-success-main hover:border-success-dark text-white"
111
- },
112
- {
113
- variant: "solid",
114
- color: "warning",
115
- class: "bg-warning-main hover:bg-warning-dark border-warning-main hover:border-warning-dark text-white"
116
- },
117
- {
118
- variant: "solid",
119
- color: "danger",
120
- class: "bg-danger-main hover:bg-danger-dark border-danger-main hover:border-danger-dark text-white"
121
- },
122
- // line & color
123
- {
124
- variant: "line",
125
- color: "primary",
126
- class: "bg-transparent hover:bg-neutral-soft text-primary-main border-primary-main"
127
- },
128
- {
129
- variant: "line",
130
- color: "secondary",
131
- class: "bg-transparent hover:bg-neutral-soft text-secondary-main border-secondary-main"
132
- },
133
- {
134
- variant: "line",
135
- color: "neutral",
136
- class: "bg-transparent hover:bg-neutral-soft text-neutral-main border-neutral-main"
137
- },
138
- {
139
- variant: "line",
140
- color: "info",
141
- class: "bg-transparent hover:bg-neutral-soft text-info-main border-info-main"
142
- },
143
- {
144
- variant: "line",
145
- color: "success",
146
- class: "bg-transparent hover:bg-neutral-soft text-success-main border-success-main"
147
- },
148
- {
149
- variant: "line",
150
- color: "warning",
151
- class: "bg-transparent hover:bg-neutral-soft text-warning-main border-warning-main"
152
- },
153
- {
154
- variant: "line",
155
- color: "danger",
156
- class: "bg-transparent hover:bg-neutral-soft text-danger-main border-danger-main"
157
- },
158
- // tonal & color
159
- {
160
- variant: "tonal",
161
- color: "primary",
162
- class: "bg-primary-soft hover:bg-primary-light border-primary-soft hover:border-primary-light text-primary-main"
163
- },
164
- {
165
- variant: "tonal",
166
- color: "secondary",
167
- class: "bg-secondary-soft hover:bg-secondary-light border-secondary-soft hover:border-secondary-light text-secondary-main"
168
- },
169
- {
170
- variant: "tonal",
171
- color: "neutral",
172
- class: "bg-neutral-soft hover:bg-neutral-light border-neutral-soft hover:border-neutral-light text-neutral-main"
173
- },
174
- {
175
- variant: "tonal",
176
- color: "info",
177
- class: "bg-info-soft hover:bg-info-light border-info-soft hover:border-info-light text-info-main"
178
- },
179
- {
180
- variant: "tonal",
181
- color: "success",
182
- class: "bg-success-soft hover:bg-success-light border-success-soft hover:border-success-light text-success-main"
183
- },
184
- {
185
- variant: "tonal",
186
- color: "warning",
187
- class: "bg-warning-soft hover:bg-warning-light border-warning-soft hover:border-warning-light text-warning-main"
188
- },
189
- {
190
- variant: "tonal",
191
- color: "danger",
192
- class: "bg-danger-soft hover:bg-danger-light border-danger-soft hover:border-danger-light text-danger-main"
193
- },
194
- // trans & color
195
- {
196
- variant: "trans",
197
- color: "primary",
198
- class: "hover:bg-primary-soft border-transparent hover:border-primary-soft text-primary-main hover:text-primary-main"
199
- },
200
- {
201
- variant: "trans",
202
- color: "secondary",
203
- class: "hover:bg-secondary-soft border-transparent hover:border-secondary-soft text-secondary-main hover:text-secondary-main"
204
- },
205
- {
206
- variant: "trans",
207
- color: "neutral",
208
- class: "hover:bg-neutral-soft border-transparent hover:border-neutral-soft text-neutral-main hover:text-neutral-main"
209
- },
210
- {
211
- variant: "trans",
212
- color: "info",
213
- class: "hover:bg-info-soft border-transparent hover:border-info-soft text-info-main hover:text-info-main"
214
- },
215
- {
216
- variant: "trans",
217
- color: "success",
218
- class: "hover:bg-success-soft border-transparent hover:border-success-soft text-success-main hover:text-success-main"
219
- },
220
- {
221
- variant: "trans",
222
- color: "warning",
223
- class: "hover:bg-warning-soft border-transparent hover:border-warning-soft text-warning-main hover:text-warning-main"
224
- },
225
- {
226
- variant: "trans",
227
- color: "danger",
228
- class: "hover:bg-danger-soft border-transparent hover:border-danger-soft text-danger-main hover:text-danger-main"
229
- },
230
- // ghost & color
231
- {
232
- variant: "ghost",
233
- color: "primary",
234
- class: "hover:bg-primary-main text-primary-main hover:text-white border-primary-main"
235
- },
236
- {
237
- variant: "ghost",
238
- color: "secondary",
239
- class: "hover:bg-secondary-main text-secondary-main hover:text-white border-secondary-main"
240
- },
241
- {
242
- variant: "ghost",
243
- color: "neutral",
244
- class: "hover:bg-neutral-main text-neutral-main hover:text-white border-neutral-main"
245
- },
246
- {
247
- variant: "ghost",
248
- color: "info",
249
- class: "hover:bg-info-main text-info-main hover:text-white border-info-main"
250
- },
251
- {
252
- variant: "ghost",
253
- color: "success",
254
- class: "hover:bg-success-main text-success-main hover:text-white border-success-main"
255
- },
256
- {
257
- variant: "ghost",
258
- color: "warning",
259
- class: "hover:bg-warning-main text-warning-main hover:text-white border-warning-main"
260
- },
261
- {
262
- variant: "ghost",
263
- color: "danger",
264
- class: "hover:bg-danger-main text-danger-main hover:text-white border-danger-main"
265
- },
266
- // variant && color && isInGroup
267
- {
268
- variant: ["line", "ghost"],
269
- color: "primary",
270
- isInGroup: true,
271
- class: ["shadow-none", "border", "[&:not(:last-child)]:border-r-0", "border-primary-main"]
272
- },
273
- {
274
- variant: ["line", "ghost"],
275
- color: "secondary",
276
- isInGroup: true,
277
- class: ["shadow-none", "border", "[&:not(:last-child)]:border-r-0", "border-secondary-main"]
278
- },
279
- {
280
- variant: ["line", "ghost"],
281
- color: "neutral",
282
- isInGroup: true,
283
- class: ["shadow-none", "border", "[&:not(:last-child)]:border-r-0", "border-neutral-main"]
284
- },
285
- {
286
- variant: ["line", "ghost"],
287
- color: "info",
288
- isInGroup: true,
289
- class: ["shadow-none", "border", "[&:not(:last-child)]:border-r-0", "border-info-main"]
290
- },
291
- {
292
- variant: ["line", "ghost"],
293
- color: "success",
294
- isInGroup: true,
295
- class: ["shadow-none", "border", "[&:not(:last-child)]:border-r-0", "border-success-main"]
296
- },
297
- {
298
- variant: ["line", "ghost"],
299
- color: "warning",
300
- isInGroup: true,
301
- class: ["shadow-none", "border", "[&:not(:last-child)]:border-r-0", "border-warning-main"]
302
- },
303
- {
304
- variant: ["line", "ghost"],
305
- color: "danger",
306
- isInGroup: true,
307
- class: ["shadow-none", "border", "[&:not(:last-child)]:border-r-0", "border-danger-main"]
308
- },
309
- // variant && isDisabled
310
- {
311
- variant: ["line", "ghost"],
312
- isDisabled: true,
313
- class: ["disabled:border-neutral-light"]
314
- }
315
- ]
316
- });
317
-
318
- export {
319
- button_default
320
- };
@@ -1,162 +0,0 @@
1
- "use client";
2
-
3
- // src/components/textarea/textarea.tsx
4
- import { forwardRef } from "react";
5
- import { tv } from "tailwind-variants";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- var Textarea = forwardRef((props, ref) => {
8
- const { base, label, textareaWrapper, textarea, innerWrapper, errorMessageText } = textareaStyle(props);
9
- const { errorMessage, isRequired, isDisabled, ...textareaProps } = props;
10
- return /* @__PURE__ */ jsxs("div", { className: base(), children: [
11
- props.label && /* @__PURE__ */ jsx("label", { className: label(), children: props.label }),
12
- /* @__PURE__ */ jsxs("div", { className: innerWrapper(), children: [
13
- /* @__PURE__ */ jsx("div", { className: textareaWrapper(), children: /* @__PURE__ */ jsx(
14
- "textarea",
15
- {
16
- ref,
17
- className: textarea(),
18
- disabled: props.isDisabled,
19
- required: props.isRequired,
20
- ...textareaProps
21
- }
22
- ) }),
23
- props.errorMessage && /* @__PURE__ */ jsx("p", { className: errorMessageText(), children: props.errorMessage })
24
- ] })
25
- ] });
26
- });
27
- Textarea.displayName = "Textarea";
28
- var textarea_default = Textarea;
29
- var textareaStyle = tv({
30
- slots: {
31
- base: ["group", "flex", "flex-col", "gap-[10px]"],
32
- label: ["flex", "items-center"],
33
- innerWrapper: ["flex", "flex-col", "gap-[6px]"],
34
- textareaWrapper: [
35
- "flex",
36
- "bg-transparent",
37
- "border-neutral-main",
38
- "p-[10px]",
39
- "group-has-[p]:border-danger-main",
40
- "transition duration-200"
41
- ],
42
- textarea: [
43
- "w-full",
44
- "bg-transparent",
45
- "placeholder:text-neutral-main",
46
- "focus-visible:outline-none",
47
- "resize-none"
48
- ],
49
- errorMessageText: ["text-s", "text-danger-main"]
50
- },
51
- variants: {
52
- variant: {
53
- solid: {
54
- textareaWrapper: ["bg-trans-soft", "hover:bg-trans-light", "has-[:focus]:bg-trans-light"]
55
- },
56
- line: {
57
- textareaWrapper: ["border", "hover:bg-trans-soft", "has-[:focus]:bg-trans-soft"]
58
- }
59
- },
60
- color: {
61
- primary: {},
62
- secondary: {}
63
- },
64
- size: {
65
- sm: {
66
- base: "gap-[6px]",
67
- textareaWrapper: "w-[240px] rounded-sm",
68
- textarea: "text-sm rounded-sm",
69
- label: "text-sm"
70
- },
71
- md: {
72
- base: "gap-[8px]",
73
- textareaWrapper: "w-[240px] rounded-md",
74
- textarea: "text-md rounded-md",
75
- label: "text-md"
76
- },
77
- lg: {
78
- base: "gap-[10px]",
79
- textareaWrapper: "w-[240px] rounded-lg",
80
- textarea: "text-lg rounded-lg",
81
- label: "text-lg"
82
- }
83
- },
84
- radius: {
85
- default: {},
86
- none: {
87
- textareaWrapper: "rounded-none",
88
- textarea: "rounded-none"
89
- },
90
- full: {
91
- textareaWrapper: "rounded-full",
92
- textarea: "rounded-full"
93
- }
94
- },
95
- fullWidth: {
96
- true: {
97
- base: "w-full",
98
- textareaWrapper: "w-full",
99
- textarea: "w-full"
100
- }
101
- },
102
- isDisabled: {
103
- true: {
104
- base: ["opacity-disabled", "pointer-events-none"],
105
- textareaWrapper: ["border-neutral-light", "pointer-events-none"],
106
- textarea: ["bg-neutral-soft", "text-neutral-light placeholder:text-neutral-light", "border-neutral-light"],
107
- label: ["text-neutral-light", "pointer-events-none"]
108
- }
109
- },
110
- isRequired: {
111
- true: {
112
- label: ["after:content-['*']", "after:text-danger-main", "after:ml-0.5"]
113
- }
114
- }
115
- },
116
- defaultVariants: {
117
- variant: "solid",
118
- color: "primary",
119
- size: "md",
120
- fullWidth: false,
121
- isDisabled: false,
122
- isRequired: false
123
- },
124
- compoundVariants: [
125
- // variants & color
126
- {
127
- variant: "line",
128
- color: "primary",
129
- class: {
130
- textareaWrapper: "has-[:focus]:border-primary-main"
131
- }
132
- },
133
- {
134
- variant: "line",
135
- color: "secondary",
136
- class: {
137
- textareaWrapper: "has-[:focus]:border-secondary-main",
138
- textarea: "focus:bg-secondary-main"
139
- }
140
- },
141
- // Variants & isDisabled
142
- {
143
- variant: "line",
144
- isDisabled: true,
145
- class: {
146
- textareaWrapper: "bg-neutral-soft"
147
- }
148
- },
149
- // isRequired & isDisabled
150
- {
151
- isRequired: true,
152
- isDisabled: true,
153
- class: {
154
- label: "after:text-danger-light"
155
- }
156
- }
157
- ]
158
- });
159
-
160
- export {
161
- textarea_default
162
- };