@deepnoid/ui 0.0.80 → 0.0.84

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 (213) hide show
  1. package/dist/{chunk-KWOLWE6I.mjs → chunk-463XE4SI.mjs} +4 -4
  2. package/dist/chunk-5T5F5WVS.mjs +32 -0
  3. package/dist/{chunk-S4DTK5GI.mjs → chunk-ADDUBJ4I.mjs} +1 -1
  4. package/dist/{chunk-GJKNTX2T.mjs → chunk-AHORH5PH.mjs} +6 -4
  5. package/dist/{chunk-7LYJAJIS.mjs → chunk-EWKYBS7I.mjs} +13 -6
  6. package/dist/{chunk-H7BLXC5M.mjs → chunk-ILMIS63S.mjs} +14 -14
  7. package/dist/{chunk-H737LHAY.mjs → chunk-KA4L5SCT.mjs} +8 -8
  8. package/dist/{chunk-DLVQWKQG.mjs → chunk-LGELMZCN.mjs} +24 -19
  9. package/dist/chunk-LXPWTJ3F.mjs +58 -0
  10. package/dist/{chunk-FNPWLOGV.mjs → chunk-NTTHTGDK.mjs} +39 -37
  11. package/dist/{chunk-G3CX6IWH.mjs → chunk-PUFNT5LS.mjs} +18 -6
  12. package/dist/{chunk-WIKB37T7.mjs → chunk-QCOPD2HG.mjs} +1 -1
  13. package/dist/{chunk-TLYAFXE2.mjs → chunk-QURXBWKK.mjs} +1902 -746
  14. package/dist/{chunk-TDMXAHWR.mjs → chunk-RTH3FPAS.mjs} +32 -6
  15. package/dist/chunk-SDNTEP5C.mjs +61 -0
  16. package/dist/{chunk-FLJ4ZZXV.mjs → chunk-SQLRQTFC.mjs} +1 -1
  17. package/dist/chunk-W7ABNK3K.mjs +1 -0
  18. package/dist/chunk-XTJL67KM.mjs +127 -0
  19. package/dist/chunk-ZYIIXWVY.mjs +1 -0
  20. package/dist/components/accordion/accordion.test.js +39 -37
  21. package/dist/components/accordion/accordion.test.mjs +1 -1
  22. package/dist/components/accordion/accordionItem.js +1905 -749
  23. package/dist/components/accordion/accordionItem.mjs +4 -4
  24. package/dist/components/accordion/index.js +1905 -749
  25. package/dist/components/accordion/index.mjs +4 -4
  26. package/dist/components/button/button-group.test.js +39 -37
  27. package/dist/components/button/button-group.test.mjs +2 -2
  28. package/dist/components/button/button.test.js +52 -50
  29. package/dist/components/button/button.test.mjs +2 -2
  30. package/dist/components/card/card.test.js +39 -37
  31. package/dist/components/card/card.test.mjs +1 -1
  32. package/dist/components/checkbox/checkbox.test.js +39 -37
  33. package/dist/components/checkbox/checkbox.test.mjs +2 -2
  34. package/dist/components/{list/list.d.mts → dropdown/dropdown.d.ts} +9 -9
  35. package/dist/components/dropdown/dropdown.js +122 -0
  36. package/dist/components/dropdown/dropdown.mjs +10 -0
  37. package/dist/components/dropdown/dropdown.test.js +12997 -0
  38. package/dist/components/dropdown/dropdown.test.mjs +25 -0
  39. package/dist/components/dropdown/index.js +128 -0
  40. package/dist/components/dropdown/index.mjs +11 -0
  41. package/dist/components/icon/Icon.d.ts +499 -1
  42. package/dist/components/icon/Icon.js +1940 -778
  43. package/dist/components/icon/Icon.mjs +6 -4
  44. package/dist/components/icon/index.js +1910 -751
  45. package/dist/components/icon/index.mjs +7 -5
  46. package/dist/components/icon/template.d.ts +98 -61
  47. package/dist/components/icon/template.js +1902 -746
  48. package/dist/components/icon/template.mjs +1 -1
  49. package/dist/components/input/index.js +1912 -756
  50. package/dist/components/input/index.mjs +4 -4
  51. package/dist/components/input/input.js +1912 -756
  52. package/dist/components/input/input.mjs +4 -4
  53. package/dist/components/input/input.test.js +1983 -825
  54. package/dist/components/input/input.test.mjs +6 -6
  55. package/dist/components/list/index.mjs +3 -3
  56. package/dist/components/list/list.test.js +39 -37
  57. package/dist/components/list/list.test.mjs +1 -1
  58. package/dist/components/modal/index.js +1942 -779
  59. package/dist/components/modal/index.mjs +3 -3
  60. package/dist/components/modal/modal.js +1942 -779
  61. package/dist/components/modal/modal.mjs +3 -3
  62. package/dist/components/modal/modal.test.js +1981 -816
  63. package/dist/components/modal/modal.test.mjs +4 -4
  64. package/dist/components/pagination/pagination.test.js +39 -37
  65. package/dist/components/pagination/pagination.test.mjs +1 -1
  66. package/dist/components/progress/progress.test.d.ts +0 -2
  67. package/dist/components/progress/progress.test.js +39 -37
  68. package/dist/components/progress/progress.test.mjs +1 -1
  69. package/dist/components/radio/radio.test.js +39 -37
  70. package/dist/components/radio/radio.test.mjs +1 -1
  71. package/dist/components/select/index.js +1905 -749
  72. package/dist/components/select/index.mjs +5 -5
  73. package/dist/components/select/option.js +1905 -749
  74. package/dist/components/select/option.mjs +4 -4
  75. package/dist/components/select/select.js +1905 -749
  76. package/dist/components/select/select.mjs +5 -5
  77. package/dist/components/select/select.test.js +1951 -793
  78. package/dist/components/select/select.test.mjs +7 -7
  79. package/dist/components/slider/slider.test.d.ts +0 -2
  80. package/dist/components/slider/slider.test.js +39 -37
  81. package/dist/components/slider/slider.test.mjs +1 -1
  82. package/dist/components/switch/switch.test.d.ts +0 -2
  83. package/dist/components/switch/switch.test.js +39 -37
  84. package/dist/components/switch/switch.test.mjs +1 -1
  85. package/dist/components/table/index.js +1985 -786
  86. package/dist/components/table/index.mjs +6 -6
  87. package/dist/components/table/table-body.d.ts +5 -2
  88. package/dist/components/table/table-body.js +1953 -792
  89. package/dist/components/table/table-body.mjs +4 -4
  90. package/dist/components/table/table-head.d.ts +4 -2
  91. package/dist/components/table/table-head.js +18 -6
  92. package/dist/components/table/table-head.mjs +1 -1
  93. package/dist/components/table/table.d.ts +32 -59
  94. package/dist/components/table/table.js +1985 -786
  95. package/dist/components/table/table.mjs +6 -6
  96. package/dist/components/table/table.test.d.ts +0 -2
  97. package/dist/components/table/table.test.js +2020 -819
  98. package/dist/components/table/table.test.mjs +7 -7
  99. package/dist/components/tabs/tabs.test.d.ts +0 -2
  100. package/dist/components/tabs/tabs.test.js +39 -37
  101. package/dist/components/tabs/tabs.test.mjs +2 -2
  102. package/dist/components/textarea/textarea.test.d.ts +0 -2
  103. package/dist/components/textarea/textarea.test.js +52 -50
  104. package/dist/components/textarea/textarea.test.mjs +2 -2
  105. package/dist/components/toast/index.js +3810 -0
  106. package/dist/components/toast/index.mjs +16 -0
  107. package/dist/components/toast/toast-utils.js +84 -0
  108. package/dist/components/toast/toast-utils.mjs +8 -0
  109. package/dist/components/toast/toast.d.ts +204 -0
  110. package/dist/components/toast/toast.js +3804 -0
  111. package/dist/components/toast/toast.mjs +15 -0
  112. package/dist/components/toast/toast.test.d.ts +0 -0
  113. package/dist/components/toast/toast.test.js +16689 -0
  114. package/dist/components/toast/toast.test.mjs +30 -0
  115. package/dist/components/toast/useToast.d.ts +0 -0
  116. package/dist/components/toast/useToast.js +110 -0
  117. package/dist/components/toast/useToast.mjs +9 -0
  118. package/dist/components/tooltip/tooltip-utils.d.ts +0 -2
  119. package/dist/components/tooltip/tooltip.test.d.ts +0 -2
  120. package/dist/components/tooltip/tooltip.test.js +39 -37
  121. package/dist/components/tooltip/tooltip.test.mjs +1 -1
  122. package/dist/components/tooltip/useTooltip.d.ts +0 -2
  123. package/dist/index.d.ts +4 -1
  124. package/dist/index.js +2247 -793
  125. package/dist/index.mjs +42 -28
  126. package/package.json +4 -3
  127. package/dist/components/accordion/accordion.d.mts +0 -154
  128. package/dist/components/accordion/accordionItem.d.mts +0 -282
  129. package/dist/components/accordion/index.d.mts +0 -6
  130. package/dist/components/button/button-group.d.mts +0 -14
  131. package/dist/components/button/button-group.test.d.mts +0 -2
  132. package/dist/components/button/button.d.mts +0 -18
  133. package/dist/components/button/button.test.d.mts +0 -2
  134. package/dist/components/button/index.d.mts +0 -3
  135. package/dist/components/card/card.d.mts +0 -124
  136. package/dist/components/card/card.test.d.mts +0 -2
  137. package/dist/components/card/index.d.mts +0 -5
  138. package/dist/components/card/index.d.ts +0 -5
  139. package/dist/components/checkbox/checkbox.d.mts +0 -349
  140. package/dist/components/checkbox/checkbox.test.d.mts +0 -2
  141. package/dist/components/checkbox/index.d.mts +0 -5
  142. package/dist/components/checkbox/index.d.ts +0 -5
  143. package/dist/components/icon/Icon.d.mts +0 -15
  144. package/dist/components/icon/index.d.mts +0 -4
  145. package/dist/components/icon/index.d.ts +0 -4
  146. package/dist/components/icon/template.d.mts +0 -97
  147. package/dist/components/input/index.d.mts +0 -5
  148. package/dist/components/input/index.d.ts +0 -5
  149. package/dist/components/input/input.d.mts +0 -437
  150. package/dist/components/input/input.test.d.mts +0 -2
  151. package/dist/components/list/index.d.mts +0 -6
  152. package/dist/components/list/list.test.d.mts +0 -2
  153. package/dist/components/list/listItem.d.mts +0 -183
  154. package/dist/components/modal/index.d.mts +0 -8
  155. package/dist/components/modal/index.d.ts +0 -8
  156. package/dist/components/modal/modal.d.mts +0 -214
  157. package/dist/components/modal/modal.test.d.mts +0 -2
  158. package/dist/components/pagination/index.d.mts +0 -4
  159. package/dist/components/pagination/index.d.ts +0 -4
  160. package/dist/components/pagination/pagination.d.mts +0 -186
  161. package/dist/components/pagination/pagination.test.d.mts +0 -2
  162. package/dist/components/pagination/usePagination.d.mts +0 -16
  163. package/dist/components/progress/index.d.mts +0 -5
  164. package/dist/components/progress/index.d.ts +0 -5
  165. package/dist/components/progress/progress.d.mts +0 -281
  166. package/dist/components/progress/progress.test.d.mts +0 -2
  167. package/dist/components/radio/index.d.mts +0 -5
  168. package/dist/components/radio/index.d.ts +0 -5
  169. package/dist/components/radio/radio.d.mts +0 -278
  170. package/dist/components/radio/radio.test.d.mts +0 -2
  171. package/dist/components/select/index.d.mts +0 -5
  172. package/dist/components/select/index.d.ts +0 -5
  173. package/dist/components/select/option.d.mts +0 -18
  174. package/dist/components/select/select.d.mts +0 -449
  175. package/dist/components/select/select.test.d.mts +0 -2
  176. package/dist/components/select/useSelect.d.mts +0 -32
  177. package/dist/components/slider/index.d.mts +0 -5
  178. package/dist/components/slider/index.d.ts +0 -5
  179. package/dist/components/slider/slider.d.mts +0 -333
  180. package/dist/components/slider/slider.test.d.mts +0 -2
  181. package/dist/components/switch/index.d.mts +0 -5
  182. package/dist/components/switch/index.d.ts +0 -5
  183. package/dist/components/switch/switch.d.mts +0 -304
  184. package/dist/components/switch/switch.test.d.mts +0 -2
  185. package/dist/components/table/index.d.mts +0 -5
  186. package/dist/components/table/index.d.ts +0 -5
  187. package/dist/components/table/table-body.d.mts +0 -23
  188. package/dist/components/table/table-head.d.mts +0 -19
  189. package/dist/components/table/table.d.mts +0 -610
  190. package/dist/components/table/table.test.d.mts +0 -2
  191. package/dist/components/tabs/index.d.mts +0 -5
  192. package/dist/components/tabs/index.d.ts +0 -5
  193. package/dist/components/tabs/tabs.d.mts +0 -241
  194. package/dist/components/tabs/tabs.test.d.mts +0 -2
  195. package/dist/components/textarea/index.d.mts +0 -2
  196. package/dist/components/textarea/index.d.ts +0 -2
  197. package/dist/components/textarea/textarea.d.mts +0 -17
  198. package/dist/components/textarea/textarea.test.d.mts +0 -2
  199. package/dist/components/tooltip/index.d.mts +0 -6
  200. package/dist/components/tooltip/index.d.ts +0 -6
  201. package/dist/components/tooltip/tooltip-utils.d.mts +0 -2
  202. package/dist/components/tooltip/tooltip.d.mts +0 -143
  203. package/dist/components/tooltip/tooltip.test.d.mts +0 -2
  204. package/dist/components/tooltip/useTooltip.d.mts +0 -2
  205. package/dist/index.d.mts +0 -30
  206. package/dist/tooltip-utils-DCKA5gnI.d.mts +0 -30
  207. package/dist/tooltip-utils-DCKA5gnI.d.ts +0 -30
  208. package/dist/utils/clsx.d.mts +0 -3
  209. package/dist/utils/props.d.mts +0 -3
  210. package/dist/utils/tailwind-variants.d.mts +0 -26
  211. package/dist/utils/types.d.mts +0 -10
  212. /package/dist/{chunk-M5PMA3CT.mjs → chunk-RDEWIZV3.mjs} +0 -0
  213. /package/dist/components/{accordion/accordion.test.d.mts → dropdown/dropdown.test.d.ts} +0 -0
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import {
3
- option_default
4
- } from "./chunk-FLJ4ZZXV.mjs";
5
2
  import {
6
3
  useSelect
7
4
  } from "./chunk-S3QS5B7F.mjs";
5
+ import {
6
+ option_default
7
+ } from "./chunk-SQLRQTFC.mjs";
8
8
  import {
9
9
  Icon_default
10
- } from "./chunk-GJKNTX2T.mjs";
10
+ } from "./chunk-AHORH5PH.mjs";
11
11
  import {
12
12
  mapPropsVariants
13
13
  } from "./chunk-E3G5QXSH.mjs";
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import {
3
+ getToastPosition
4
+ } from "./chunk-SDNTEP5C.mjs";
5
+
6
+ // src/components/toast/useToast.ts
7
+ import { useState, useEffect, useRef } from "react";
8
+ var useToast = ({ placement, offset, targetRect }) => {
9
+ const [toastPosition, setToastPosition] = useState({ x: 0, y: 0 });
10
+ const toastRef = useRef(null);
11
+ useEffect(() => {
12
+ if (targetRect && toastRef.current) {
13
+ const { width, height } = toastRef.current.getBoundingClientRect();
14
+ const scrollX = window.scrollX;
15
+ const scrollY = window.scrollY;
16
+ const adjustedTargetRect = {
17
+ ...targetRect,
18
+ left: targetRect.left + scrollX,
19
+ top: targetRect.top + scrollY,
20
+ right: targetRect.right + scrollX,
21
+ bottom: targetRect.bottom + scrollY
22
+ };
23
+ const { toastX, toastY } = getToastPosition(placement, adjustedTargetRect, width, height, offset);
24
+ setToastPosition({ x: toastX, y: toastY });
25
+ }
26
+ }, [placement, offset, targetRect]);
27
+ return { toastPosition, toastRef };
28
+ };
29
+
30
+ export {
31
+ useToast
32
+ };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  getConfig
4
- } from "./chunk-FNPWLOGV.mjs";
4
+ } from "./chunk-NTTHTGDK.mjs";
5
5
  import {
6
6
  __export
7
7
  } from "./chunk-IZ6II3QA.mjs";
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  template
4
- } from "./chunk-TLYAFXE2.mjs";
4
+ } from "./chunk-QURXBWKK.mjs";
5
5
 
6
6
  // src/components/icon/Icon.tsx
7
7
  import { jsx } from "react/jsx-runtime";
8
+ var iconTemplate = template;
8
9
  var Icon = ({ name, size = "md", fill = false, className, onClick, ...props }) => {
9
10
  const SVGIcon = template[name];
10
11
  const getInputIconSize = (size2) => {
@@ -12,12 +13,12 @@ var Icon = ({ name, size = "md", fill = false, className, onClick, ...props }) =
12
13
  case "sm":
13
14
  return "size-[15px]";
14
15
  case "md":
15
- return "size-[17px]";
16
+ return "size-[17px] stroke-[1.25px]";
16
17
  case "lg":
17
- return "size-[20px]";
18
+ return "size-[20px] stroke-[1.5px]";
18
19
  }
19
20
  };
20
- return /* @__PURE__ */ jsx("div", { onClick, children: /* @__PURE__ */ jsx(
21
+ return /* @__PURE__ */ jsx("div", { className: "w-fit h-fit", onClick, children: /* @__PURE__ */ jsx(
21
22
  SVGIcon,
22
23
  {
23
24
  fill,
@@ -29,5 +30,6 @@ var Icon = ({ name, size = "md", fill = false, className, onClick, ...props }) =
29
30
  var Icon_default = Icon;
30
31
 
31
32
  export {
33
+ iconTemplate,
32
34
  Icon_default
33
35
  };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-66WCZEEU.mjs";
5
5
  import {
6
6
  Icon_default
7
- } from "./chunk-GJKNTX2T.mjs";
7
+ } from "./chunk-AHORH5PH.mjs";
8
8
  import {
9
9
  mapPropsVariants
10
10
  } from "./chunk-E3G5QXSH.mjs";
@@ -150,15 +150,22 @@ var modal_default = Modal;
150
150
  var modal = tv({
151
151
  slots: {
152
152
  backdrop: ["relative w-screen h-screen fixed inset-0 bg-black/60", "z-[9999]"],
153
- modalWrapper: ["group", "absolute", "top-1/2", "-translate-y-1/2", "left-1/2", "-translate-x-1/2"],
154
- icon: ["absolute", "top-[20px]", "left-1/2", "-translate-x-1/2", "z-10"],
153
+ modalWrapper: ["group/modal", "absolute", "top-1/2", "-translate-y-1/2", "left-1/2", "-translate-x-1/2"],
154
+ icon: [
155
+ "absolute",
156
+ "top-[20px]",
157
+ "left-1/2",
158
+ "-translate-x-1/2",
159
+ "z-10",
160
+ "group-data-[modal-icon-visibility=true]/modal:top-[80px]"
161
+ ],
155
162
  closeIcon: [
156
163
  "absolute",
157
164
  "top-[20px]",
158
165
  "right-[20px]",
159
166
  "cursor-pointer",
160
167
  "z-10",
161
- "group-data-[icon-visibility=true]:top-[80px]"
168
+ "group-data-[modal-icon-visibility=true]/modal:top-[80px]"
162
169
  ],
163
170
  titleWrapper: ["relative", "flex", "flex-col", "gap-[10px]"],
164
171
  title: "text-h5 text-center text-foreground",
@@ -170,8 +177,8 @@ var modal = tv({
170
177
  "bg-background",
171
178
  "shadow-drop shadow-foreground/20 rounded-xxlg",
172
179
  "overflow-hidden",
173
- "group-data-[icon-visibility=true]:mt-[60px]",
174
- "group-data-[icon-visibility=true]:pt-[60px]"
180
+ "group-data-[modal-icon-visibility=true]/modal:mt-[60px]",
181
+ "group-data-[modal-icon-visibility=true]/modal:pt-[60px]"
175
182
  ],
176
183
  body: ["flex", "flex-col", "gap-[20px]"],
177
184
  content: ["text-md text-center", "break-words", "bg-neutral-soft", "rounded-[5px]", "p-[10px]"],
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  require_lib
4
- } from "./chunk-FNPWLOGV.mjs";
4
+ } from "./chunk-NTTHTGDK.mjs";
5
5
  import {
6
6
  __commonJS,
7
7
  __require,
@@ -1044,9 +1044,9 @@ var require_color_convert = __commonJS({
1044
1044
  }
1045
1045
  });
1046
1046
 
1047
- // ../../node_modules/@testing-library/jest-dom/node_modules/ansi-styles/index.js
1047
+ // ../../node_modules/ansi-styles/index.js
1048
1048
  var require_ansi_styles = __commonJS({
1049
- "../../node_modules/@testing-library/jest-dom/node_modules/ansi-styles/index.js"(exports, module) {
1049
+ "../../node_modules/ansi-styles/index.js"(exports, module) {
1050
1050
  "use strict";
1051
1051
  var wrapAnsi16 = (fn, offset) => (...args) => {
1052
1052
  const code = fn(...args);
@@ -1186,9 +1186,9 @@ var require_ansi_styles = __commonJS({
1186
1186
  }
1187
1187
  });
1188
1188
 
1189
- // ../../node_modules/@testing-library/jest-dom/node_modules/has-flag/index.js
1189
+ // ../../node_modules/has-flag/index.js
1190
1190
  var require_has_flag = __commonJS({
1191
- "../../node_modules/@testing-library/jest-dom/node_modules/has-flag/index.js"(exports, module) {
1191
+ "../../node_modules/has-flag/index.js"(exports, module) {
1192
1192
  "use strict";
1193
1193
  module.exports = (flag, argv = process.argv) => {
1194
1194
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -1199,9 +1199,9 @@ var require_has_flag = __commonJS({
1199
1199
  }
1200
1200
  });
1201
1201
 
1202
- // ../../node_modules/@testing-library/jest-dom/node_modules/supports-color/index.js
1202
+ // ../../node_modules/supports-color/index.js
1203
1203
  var require_supports_color = __commonJS({
1204
- "../../node_modules/@testing-library/jest-dom/node_modules/supports-color/index.js"(exports, module) {
1204
+ "../../node_modules/supports-color/index.js"(exports, module) {
1205
1205
  "use strict";
1206
1206
  var os = __require("os");
1207
1207
  var tty = __require("tty");
@@ -3761,7 +3761,7 @@ function $d708735ed1303b43$var$addParent(obj, parent) {
3761
3761
  var $d708735ed1303b43$export$2e2bcd8739ae039 = $d708735ed1303b43$export$98e6a39c04603d36;
3762
3762
  var $149c1bd638913645$export$98e6a39c04603d36 = (0, $d708735ed1303b43$export$2e2bcd8739ae039);
3763
3763
 
3764
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
3764
+ // ../../node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
3765
3765
  var toStr = Object.prototype.toString;
3766
3766
  function isCallable(fn) {
3767
3767
  return typeof fn === "function" || toStr.call(fn) === "[object Function]";
@@ -3809,7 +3809,7 @@ function arrayFrom(arrayLike, mapFn) {
3809
3809
  return A;
3810
3810
  }
3811
3811
 
3812
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
3812
+ // ../../node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
3813
3813
  function _typeof(o) {
3814
3814
  "@babel/helpers - typeof";
3815
3815
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -3913,7 +3913,7 @@ var SetLike = /* @__PURE__ */ function() {
3913
3913
  }();
3914
3914
  var SetLike_default = typeof Set === "undefined" ? Set : SetLike;
3915
3915
 
3916
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs
3916
+ // ../../node_modules/dom-accessibility-api/dist/getRole.mjs
3917
3917
  function getLocalName(element) {
3918
3918
  var _element$localName;
3919
3919
  return (
@@ -4098,7 +4098,7 @@ function getExplicitRole(element) {
4098
4098
  return null;
4099
4099
  }
4100
4100
 
4101
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs
4101
+ // ../../node_modules/dom-accessibility-api/dist/util.mjs
4102
4102
  var presentationRoles = ["presentation", "none"];
4103
4103
  function isElement(node) {
4104
4104
  return node !== null && node.nodeType === node.ELEMENT_NODE;
@@ -4168,7 +4168,7 @@ function hasAnyConcreteRoles(node, roles2) {
4168
4168
  return false;
4169
4169
  }
4170
4170
 
4171
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
4171
+ // ../../node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
4172
4172
  function asFlatString(s) {
4173
4173
  return s.trim().replace(/\s\s+/g, " ");
4174
4174
  }
@@ -4537,7 +4537,7 @@ function computeTextAlternative(root) {
4537
4537
  }));
4538
4538
  }
4539
4539
 
4540
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
4540
+ // ../../node_modules/dom-accessibility-api/dist/accessible-description.mjs
4541
4541
  function _typeof2(o) {
4542
4542
  "@babel/helpers - typeof";
4543
4543
  return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -4608,7 +4608,7 @@ function computeAccessibleDescription(root) {
4608
4608
  return description;
4609
4609
  }
4610
4610
 
4611
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
4611
+ // ../../node_modules/dom-accessibility-api/dist/accessible-name.mjs
4612
4612
  function prohibitsNaming(node) {
4613
4613
  return hasAnyConcreteRoles(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
4614
4614
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Icon_default
4
- } from "./chunk-GJKNTX2T.mjs";
4
+ } from "./chunk-AHORH5PH.mjs";
5
5
  import {
6
6
  mapPropsVariants
7
7
  } from "./chunk-E3G5QXSH.mjs";
@@ -131,18 +131,18 @@ Input.displayName = "Input";
131
131
  var input_default = Input;
132
132
  var inputStyle = tv({
133
133
  slots: {
134
- base: ["group", "flex", "flex-col"],
134
+ base: ["group/input", "flex", "flex-col"],
135
135
  label: ["flex", "items-center"],
136
136
  innerWrapper: ["flex", "flex-col"],
137
137
  inputWrapper: [
138
138
  "flex",
139
139
  "items-center",
140
- "group-has-[p]:border-danger-main",
141
- "group-has-[p]:bg-danger-soft",
140
+ "group-has-[p]/input:border-danger-main",
141
+ "group-has-[p]/input:bg-danger-soft",
142
142
  "transition duration-200"
143
143
  ],
144
144
  input: ["w-full", "h-full", "bg-transparent", "placeholder:text-neutral-main", "focus-visible:outline-none"],
145
- content: ["flex", "items-center", "group-has-[p]:text-danger-main", "select-none"],
145
+ content: ["flex", "items-center", "group-has-[p]/input:text-danger-main", "select-none"],
146
146
  errorMessage: ["text-danger-main"]
147
147
  },
148
148
  variants: {
@@ -183,19 +183,19 @@ var inputStyle = tv({
183
183
  size: {
184
184
  sm: {
185
185
  base: ["text-sm", "gap-[6px]"],
186
- innerWrapper: ["group-has-[p]:gap-[6px]"],
186
+ innerWrapper: ["group-has-[p]/input:gap-[6px]"],
187
187
  inputWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[6px]", "py-[4.5px]", "gap-[6px]"],
188
188
  errorMessage: ["text-sm"]
189
189
  },
190
190
  md: {
191
191
  base: ["text-md", "gap-[8px]"],
192
- innerWrapper: ["group-has-[p]:gap-[8px]"],
192
+ innerWrapper: ["group-has-[p]/input:gap-[8px]"],
193
193
  inputWrapper: ["w-[240px]", "h-[30px]", "rounded-md", "px-[8px]", "py-[6.5px]", "gap-[8px]"],
194
194
  errorMessage: ["text-md"]
195
195
  },
196
196
  lg: {
197
197
  base: ["text-lg", "gap-[10px]"],
198
- innerWrapper: ["group-has-[p]:gap-[10px]"],
198
+ innerWrapper: ["group-has-[p]/input:gap-[10px]"],
199
199
  inputWrapper: ["w-[240px]", "h-[36px]", "rounded-lg", "px-[10px]", "py-[8px]", "gap-[10px]"],
200
200
  errorMessage: ["text-lg"]
201
201
  }
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-27Y6K5NK.mjs";
8
8
  import {
9
9
  Icon_default
10
- } from "./chunk-GJKNTX2T.mjs";
10
+ } from "./chunk-AHORH5PH.mjs";
11
11
 
12
12
  // src/components/table/table-body.tsx
13
13
  import React, { useState, useCallback, useEffect } from "react";
@@ -20,12 +20,15 @@ var TableBody = ({
20
20
  slots,
21
21
  rows,
22
22
  columns,
23
- isSelected,
24
23
  isExpanded,
24
+ isSelected,
25
+ isSelectedRow,
26
+ selectedRows,
25
27
  emptyContent,
28
+ onSelectRow,
26
29
  onRowAction
27
30
  }) => {
28
- const colSpanCount = columns.length + (isExpanded ? 1 : 0) + (isSelected ? 1 : 0);
31
+ const COL_SPAN_COUNT = columns.length + (isExpanded ? 1 : 0) + (isSelected ? 1 : 0);
29
32
  const [expandedRows, setExpandedRows] = useState(/* @__PURE__ */ new Set());
30
33
  useEffect(() => {
31
34
  setExpandedRows(/* @__PURE__ */ new Set());
@@ -77,20 +80,22 @@ var TableBody = ({
77
80
  },
78
81
  [classNames == null ? void 0 : classNames.td, columns, slots]
79
82
  );
83
+ const onChangeExpandedRow = (index) => {
84
+ setExpandedRows((prevIndices) => {
85
+ const newIndices = new Set(prevIndices);
86
+ if (newIndices.has(index)) {
87
+ newIndices.delete(index);
88
+ } else {
89
+ newIndices.add(index);
90
+ }
91
+ return newIndices;
92
+ });
93
+ };
80
94
  const handleRowClick = (index) => (e) => {
81
- if (isSelected) {
82
- }
83
- if (isExpanded) {
84
- setExpandedRows((prevIndices) => {
85
- const newIndices = new Set(prevIndices);
86
- if (newIndices.has(index)) {
87
- newIndices.delete(index);
88
- } else {
89
- newIndices.add(index);
90
- }
91
- return newIndices;
92
- });
93
- }
95
+ e.stopPropagation();
96
+ e.preventDefault();
97
+ if (isExpanded) onChangeExpandedRow(index);
98
+ if (isSelected && isSelectedRow) onSelectRow(index);
94
99
  const row = rows[index];
95
100
  if (row !== void 0) {
96
101
  onRowAction == null ? void 0 : onRowAction(e, row);
@@ -100,7 +105,7 @@ var TableBody = ({
100
105
  const keys = Object.keys(row);
101
106
  return /* @__PURE__ */ jsxs(React.Fragment, { children: [
102
107
  /* @__PURE__ */ jsxs("tr", { ...getTrProps(rowIndex), onClick: handleRowClick(rowIndex), children: [
103
- isSelected && /* @__PURE__ */ jsx("td", { ...getTdProps({ field: "checkbox" }, row, keys), children: /* @__PURE__ */ jsx(checkbox_default, { color, size }) }),
108
+ isSelected && /* @__PURE__ */ jsx("td", { ...getTdProps({ field: "checkbox" }, row, keys), onClick: () => onSelectRow(rowIndex), children: /* @__PURE__ */ jsx(checkbox_default, { color, size, checked: selectedRows.has(rowIndex) }) }),
104
109
  isExpanded && /* @__PURE__ */ jsx("td", { ...getTdProps({ field: "expandIcon" }, row, keys), children: /* @__PURE__ */ jsx(
105
110
  Icon_default,
106
111
  {
@@ -111,9 +116,9 @@ var TableBody = ({
111
116
  ) }),
112
117
  columns.map((column, colIndex) => /* @__PURE__ */ createElement("td", { ...getTdProps(column, row, keys), key: colIndex }))
113
118
  ] }),
114
- isExpanded && expandedRows.has(rowIndex) && /* @__PURE__ */ jsx("tr", { ...getExpandedContentProps(), children: /* @__PURE__ */ jsx("td", { colSpan: colSpanCount, ...getTdProps({ field: "expandedRow" }, row, keys), children: row.renderExpandedRow && row.renderExpandedRow() }) })
119
+ isExpanded && expandedRows.has(rowIndex) && /* @__PURE__ */ jsx("tr", { ...getExpandedContentProps(), children: /* @__PURE__ */ jsx("td", { colSpan: COL_SPAN_COUNT, ...getTdProps({ field: "expandedRow" }, row, keys), children: row.renderExpandedRow && row.renderExpandedRow() }) })
115
120
  ] }, rowIndex);
116
- }) : /* @__PURE__ */ jsx("tr", { ...getTrProps(-1), children: /* @__PURE__ */ jsx("td", { colSpan: columns.length, children: emptyContent }) }) });
121
+ }) : /* @__PURE__ */ jsx("tr", { ...getTrProps(-1), children: /* @__PURE__ */ jsx("td", { colSpan: COL_SPAN_COUNT, children: emptyContent }) }) });
117
122
  };
118
123
  var table_body_default = TableBody;
119
124
 
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import {
3
+ mapPropsVariants
4
+ } from "./chunk-E3G5QXSH.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-J725QONZ.mjs";
8
+
9
+ // src/components/dropdown/dropdown.tsx
10
+ import React, { forwardRef, useCallback, useMemo } from "react";
11
+ import { jsx } from "react/jsx-runtime";
12
+ var Dropdown = forwardRef((originalProps, ref) => {
13
+ const [props, variantProps] = mapPropsVariants(originalProps, dropdown.variantKeys);
14
+ const { children, classNames } = props;
15
+ const slots = useMemo(() => dropdown({ ...variantProps }), [...Object.values(variantProps)]);
16
+ const getBaseProps = useCallback(() => {
17
+ return {
18
+ className: slots.base({ class: classNames == null ? void 0 : classNames.base })
19
+ };
20
+ }, [slots, classNames == null ? void 0 : classNames.base]);
21
+ return /* @__PURE__ */ jsx("div", { ref, ...getBaseProps(), children: React.Children.map(children, (child, index) => {
22
+ return React.cloneElement(child, {
23
+ ...variantProps,
24
+ ...child.props
25
+ });
26
+ }) });
27
+ });
28
+ Dropdown.displayName = "Dropdown";
29
+ var dropdown_default = Dropdown;
30
+ var dropdown = tv({
31
+ slots: {
32
+ base: ["flex", "flex-col"]
33
+ },
34
+ variants: {
35
+ variant: {
36
+ solid: {},
37
+ line: {}
38
+ },
39
+ size: {
40
+ sm: {},
41
+ md: {},
42
+ lg: {}
43
+ },
44
+ color: {
45
+ primary: {},
46
+ secondary: {}
47
+ }
48
+ },
49
+ defaultVariants: {
50
+ variant: "solid",
51
+ color: "primary",
52
+ size: "md"
53
+ }
54
+ });
55
+
56
+ export {
57
+ dropdown_default
58
+ };