@deepnoid/ui 0.0.84 → 0.0.86

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 (183) hide show
  1. package/dist/{chunk-NTTHTGDK.mjs → chunk-FNPWLOGV.mjs} +37 -39
  2. package/dist/chunk-FRIK4CS7.mjs +83 -0
  3. package/dist/{chunk-ILMIS63S.mjs → chunk-H7BLXC5M.mjs} +14 -14
  4. package/dist/{chunk-XTJL67KM.mjs → chunk-HH2LF2SU.mjs} +32 -46
  5. package/dist/{chunk-ADDUBJ4I.mjs → chunk-S4DTK5GI.mjs} +1 -1
  6. package/dist/chunk-ZOTHPHXA.mjs +41 -0
  7. package/dist/components/accordion/accordion.d.mts +154 -0
  8. package/dist/components/accordion/accordion.test.js +37 -39
  9. package/dist/components/accordion/accordion.test.mjs +1 -1
  10. package/dist/components/accordion/accordionItem.d.mts +282 -0
  11. package/dist/components/accordion/index.d.mts +6 -0
  12. package/dist/components/button/button-group.d.mts +14 -0
  13. package/dist/components/button/button-group.test.d.mts +2 -0
  14. package/dist/components/button/button-group.test.js +37 -39
  15. package/dist/components/button/button-group.test.mjs +2 -2
  16. package/dist/components/button/button.d.mts +18 -0
  17. package/dist/components/button/button.test.d.mts +2 -0
  18. package/dist/components/button/button.test.js +50 -52
  19. package/dist/components/button/button.test.mjs +2 -2
  20. package/dist/components/button/index.d.mts +3 -0
  21. package/dist/components/card/card.d.mts +124 -0
  22. package/dist/components/card/card.test.d.mts +2 -0
  23. package/dist/components/card/card.test.js +37 -39
  24. package/dist/components/card/card.test.mjs +1 -1
  25. package/dist/components/card/index.d.mts +5 -0
  26. package/dist/components/card/index.d.ts +5 -0
  27. package/dist/components/checkbox/checkbox.d.mts +349 -0
  28. package/dist/components/checkbox/checkbox.test.d.mts +2 -0
  29. package/dist/components/checkbox/checkbox.test.js +37 -39
  30. package/dist/components/checkbox/checkbox.test.mjs +2 -2
  31. package/dist/components/checkbox/index.d.mts +5 -0
  32. package/dist/components/checkbox/index.d.ts +5 -0
  33. package/dist/components/icon/Icon.d.mts +513 -0
  34. package/dist/components/icon/index.d.mts +4 -0
  35. package/dist/components/icon/index.d.ts +4 -0
  36. package/dist/components/icon/template.d.mts +134 -0
  37. package/dist/components/input/index.d.mts +5 -0
  38. package/dist/components/input/index.d.ts +5 -0
  39. package/dist/components/input/input.d.mts +437 -0
  40. package/dist/components/input/input.test.d.mts +2 -0
  41. package/dist/components/input/input.test.js +50 -52
  42. package/dist/components/input/input.test.mjs +2 -2
  43. package/dist/components/list/index.d.mts +6 -0
  44. package/dist/components/list/index.mjs +3 -3
  45. package/dist/components/{dropdown/dropdown.d.ts → list/list.d.mts} +9 -9
  46. package/dist/components/list/list.test.d.mts +2 -0
  47. package/dist/components/list/list.test.js +37 -39
  48. package/dist/components/list/list.test.mjs +1 -1
  49. package/dist/components/list/listItem.d.mts +183 -0
  50. package/dist/components/modal/index.d.mts +8 -0
  51. package/dist/components/modal/index.d.ts +8 -0
  52. package/dist/components/modal/modal.d.mts +214 -0
  53. package/dist/components/modal/modal.test.d.mts +2 -0
  54. package/dist/components/modal/modal.test.js +37 -39
  55. package/dist/components/modal/modal.test.mjs +1 -1
  56. package/dist/components/pagination/index.d.mts +4 -0
  57. package/dist/components/pagination/index.d.ts +4 -0
  58. package/dist/components/pagination/pagination.d.mts +186 -0
  59. package/dist/components/pagination/pagination.test.d.mts +2 -0
  60. package/dist/components/pagination/pagination.test.js +37 -39
  61. package/dist/components/pagination/pagination.test.mjs +1 -1
  62. package/dist/components/pagination/usePagination.d.mts +16 -0
  63. package/dist/components/progress/index.d.mts +5 -0
  64. package/dist/components/progress/index.d.ts +5 -0
  65. package/dist/components/progress/progress.d.mts +281 -0
  66. package/dist/components/progress/progress.test.d.mts +2 -0
  67. package/dist/components/progress/progress.test.d.ts +2 -0
  68. package/dist/components/progress/progress.test.js +37 -39
  69. package/dist/components/progress/progress.test.mjs +1 -1
  70. package/dist/components/radio/index.d.mts +5 -0
  71. package/dist/components/radio/index.d.ts +5 -0
  72. package/dist/components/radio/radio.d.mts +278 -0
  73. package/dist/components/radio/radio.test.d.mts +2 -0
  74. package/dist/components/radio/radio.test.js +37 -39
  75. package/dist/components/radio/radio.test.mjs +1 -1
  76. package/dist/components/select/index.d.mts +5 -0
  77. package/dist/components/select/index.d.ts +5 -0
  78. package/dist/components/select/index.mjs +2 -2
  79. package/dist/components/select/option.d.mts +18 -0
  80. package/dist/components/select/select.d.mts +449 -0
  81. package/dist/components/select/select.mjs +2 -2
  82. package/dist/components/select/select.test.d.mts +2 -0
  83. package/dist/components/select/select.test.js +37 -39
  84. package/dist/components/select/select.test.mjs +4 -4
  85. package/dist/components/select/useSelect.d.mts +32 -0
  86. package/dist/components/slider/index.d.mts +5 -0
  87. package/dist/components/slider/index.d.ts +5 -0
  88. package/dist/components/slider/slider.d.mts +333 -0
  89. package/dist/components/slider/slider.test.d.mts +2 -0
  90. package/dist/components/slider/slider.test.d.ts +2 -0
  91. package/dist/components/slider/slider.test.js +37 -39
  92. package/dist/components/slider/slider.test.mjs +1 -1
  93. package/dist/components/switch/index.d.mts +5 -0
  94. package/dist/components/switch/index.d.ts +5 -0
  95. package/dist/components/switch/switch.d.mts +304 -0
  96. package/dist/components/switch/switch.test.d.mts +2 -0
  97. package/dist/components/switch/switch.test.d.ts +2 -0
  98. package/dist/components/switch/switch.test.js +37 -39
  99. package/dist/components/switch/switch.test.mjs +1 -1
  100. package/dist/components/table/index.d.mts +5 -0
  101. package/dist/components/table/index.d.ts +5 -0
  102. package/dist/components/table/index.mjs +2 -2
  103. package/dist/components/table/table-body.d.mts +26 -0
  104. package/dist/components/table/table-head.d.mts +21 -0
  105. package/dist/components/table/table.d.mts +583 -0
  106. package/dist/components/table/table.mjs +2 -2
  107. package/dist/components/table/table.test.d.mts +2 -0
  108. package/dist/components/table/table.test.d.ts +2 -0
  109. package/dist/components/table/table.test.js +37 -39
  110. package/dist/components/table/table.test.mjs +3 -3
  111. package/dist/components/tabs/index.d.mts +5 -0
  112. package/dist/components/tabs/index.d.ts +5 -0
  113. package/dist/components/tabs/tabs.d.mts +241 -0
  114. package/dist/components/tabs/tabs.test.d.mts +2 -0
  115. package/dist/components/tabs/tabs.test.d.ts +2 -0
  116. package/dist/components/tabs/tabs.test.js +37 -39
  117. package/dist/components/tabs/tabs.test.mjs +2 -2
  118. package/dist/components/textarea/index.d.mts +2 -0
  119. package/dist/components/textarea/index.d.ts +2 -0
  120. package/dist/components/textarea/textarea.d.mts +17 -0
  121. package/dist/components/textarea/textarea.test.d.mts +2 -0
  122. package/dist/components/textarea/textarea.test.d.ts +2 -0
  123. package/dist/components/textarea/textarea.test.js +50 -52
  124. package/dist/components/textarea/textarea.test.mjs +2 -2
  125. package/dist/components/toast/index.d.mts +9 -0
  126. package/dist/components/toast/index.d.ts +9 -0
  127. package/dist/components/toast/index.js +147 -127
  128. package/dist/components/toast/index.mjs +10 -5
  129. package/dist/components/toast/toast-utils.d.mts +9 -0
  130. package/dist/components/toast/toast-utils.d.ts +9 -0
  131. package/dist/components/toast/toast-utils.js +25 -45
  132. package/dist/components/toast/toast-utils.mjs +1 -1
  133. package/dist/components/toast/toast.d.mts +207 -0
  134. package/dist/components/toast/toast.d.ts +13 -10
  135. package/dist/components/toast/toast.js +32 -125
  136. package/dist/components/toast/toast.mjs +1 -3
  137. package/dist/components/toast/toast.test.d.mts +2 -0
  138. package/dist/components/toast/toast.test.d.ts +2 -0
  139. package/dist/components/toast/toast.test.js +73 -168
  140. package/dist/components/toast/toast.test.mjs +4 -6
  141. package/dist/components/toast/use-toast.d.mts +31 -0
  142. package/dist/components/toast/use-toast.d.ts +31 -0
  143. package/dist/components/toast/use-toast.js +3826 -0
  144. package/dist/components/toast/use-toast.mjs +17 -0
  145. package/dist/components/tooltip/index.d.mts +6 -0
  146. package/dist/components/tooltip/index.d.ts +6 -0
  147. package/dist/components/tooltip/tooltip-utils.d.mts +2 -0
  148. package/dist/components/tooltip/tooltip-utils.d.ts +2 -0
  149. package/dist/components/tooltip/tooltip.d.mts +143 -0
  150. package/dist/components/tooltip/tooltip.test.d.mts +2 -0
  151. package/dist/components/tooltip/tooltip.test.d.ts +2 -0
  152. package/dist/components/tooltip/tooltip.test.js +37 -39
  153. package/dist/components/tooltip/tooltip.test.mjs +1 -1
  154. package/dist/components/tooltip/useTooltip.d.mts +2 -0
  155. package/dist/components/tooltip/useTooltip.d.ts +2 -0
  156. package/dist/index.d.mts +33 -0
  157. package/dist/index.d.ts +2 -2
  158. package/dist/index.js +249 -180
  159. package/dist/index.mjs +136 -36
  160. package/dist/tooltip-utils-DCKA5gnI.d.mts +30 -0
  161. package/dist/tooltip-utils-DCKA5gnI.d.ts +30 -0
  162. package/dist/utils/clsx.d.mts +3 -0
  163. package/dist/utils/props.d.mts +3 -0
  164. package/dist/utils/tailwind-variants.d.mts +26 -0
  165. package/dist/utils/types.d.mts +10 -0
  166. package/package.json +2 -2
  167. package/dist/chunk-5T5F5WVS.mjs +0 -32
  168. package/dist/chunk-LXPWTJ3F.mjs +0 -58
  169. package/dist/chunk-SDNTEP5C.mjs +0 -61
  170. package/dist/chunk-W7ABNK3K.mjs +0 -1
  171. package/dist/components/dropdown/dropdown.js +0 -122
  172. package/dist/components/dropdown/dropdown.mjs +0 -10
  173. package/dist/components/dropdown/dropdown.test.js +0 -12997
  174. package/dist/components/dropdown/dropdown.test.mjs +0 -25
  175. package/dist/components/dropdown/index.js +0 -128
  176. package/dist/components/dropdown/index.mjs +0 -11
  177. package/dist/components/toast/useToast.d.ts +0 -0
  178. package/dist/components/toast/useToast.js +0 -110
  179. package/dist/components/toast/useToast.mjs +0 -9
  180. package/dist/{chunk-RDEWIZV3.mjs → chunk-LUWGOKLG.mjs} +0 -0
  181. package/dist/{chunk-RTH3FPAS.mjs → chunk-PSXPOYLX.mjs} +3 -3
  182. package/dist/{chunk-463XE4SI.mjs → chunk-RVGOARET.mjs} +3 -3
  183. /package/dist/components/{dropdown/dropdown.test.d.ts → accordion/accordion.test.d.mts} +0 -0
@@ -4,9 +4,9 @@ import {
4
4
  __toESM
5
5
  } from "./chunk-IZ6II3QA.mjs";
6
6
 
7
- // ../../node_modules/@testing-library/dom/node_modules/ansi-styles/index.js
7
+ // ../../node_modules/pretty-format/node_modules/ansi-styles/index.js
8
8
  var require_ansi_styles = __commonJS({
9
- "../../node_modules/@testing-library/dom/node_modules/ansi-styles/index.js"(exports, module2) {
9
+ "../../node_modules/pretty-format/node_modules/ansi-styles/index.js"(exports, module2) {
10
10
  "use strict";
11
11
  var ANSI_BACKGROUND_OFFSET = 10;
12
12
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -142,9 +142,9 @@ var require_ansi_styles = __commonJS({
142
142
  }
143
143
  });
144
144
 
145
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/collections.js
145
+ // ../../node_modules/pretty-format/build/collections.js
146
146
  var require_collections = __commonJS({
147
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/collections.js"(exports) {
147
+ "../../node_modules/pretty-format/build/collections.js"(exports) {
148
148
  "use strict";
149
149
  Object.defineProperty(exports, "__esModule", {
150
150
  value: true
@@ -260,9 +260,9 @@ var require_collections = __commonJS({
260
260
  }
261
261
  });
262
262
 
263
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js
263
+ // ../../node_modules/pretty-format/build/plugins/AsymmetricMatcher.js
264
264
  var require_AsymmetricMatcher = __commonJS({
265
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js"(exports) {
265
+ "../../node_modules/pretty-format/build/plugins/AsymmetricMatcher.js"(exports) {
266
266
  "use strict";
267
267
  Object.defineProperty(exports, "__esModule", {
268
268
  value: true
@@ -347,9 +347,9 @@ var require_ansi_regex = __commonJS({
347
347
  }
348
348
  });
349
349
 
350
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ConvertAnsi.js
350
+ // ../../node_modules/pretty-format/build/plugins/ConvertAnsi.js
351
351
  var require_ConvertAnsi = __commonJS({
352
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ConvertAnsi.js"(exports) {
352
+ "../../node_modules/pretty-format/build/plugins/ConvertAnsi.js"(exports) {
353
353
  "use strict";
354
354
  Object.defineProperty(exports, "__esModule", {
355
355
  value: true
@@ -418,9 +418,9 @@ var require_ConvertAnsi = __commonJS({
418
418
  }
419
419
  });
420
420
 
421
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js
421
+ // ../../node_modules/pretty-format/build/plugins/DOMCollection.js
422
422
  var require_DOMCollection = __commonJS({
423
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js"(exports) {
423
+ "../../node_modules/pretty-format/build/plugins/DOMCollection.js"(exports) {
424
424
  "use strict";
425
425
  Object.defineProperty(exports, "__esModule", {
426
426
  value: true
@@ -468,9 +468,9 @@ var require_DOMCollection = __commonJS({
468
468
  }
469
469
  });
470
470
 
471
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/escapeHTML.js
471
+ // ../../node_modules/pretty-format/build/plugins/lib/escapeHTML.js
472
472
  var require_escapeHTML = __commonJS({
473
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/escapeHTML.js"(exports) {
473
+ "../../node_modules/pretty-format/build/plugins/lib/escapeHTML.js"(exports) {
474
474
  "use strict";
475
475
  Object.defineProperty(exports, "__esModule", {
476
476
  value: true
@@ -482,9 +482,9 @@ var require_escapeHTML = __commonJS({
482
482
  }
483
483
  });
484
484
 
485
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/markup.js
485
+ // ../../node_modules/pretty-format/build/plugins/lib/markup.js
486
486
  var require_markup = __commonJS({
487
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/markup.js"(exports) {
487
+ "../../node_modules/pretty-format/build/plugins/lib/markup.js"(exports) {
488
488
  "use strict";
489
489
  Object.defineProperty(exports, "__esModule", {
490
490
  value: true
@@ -537,9 +537,9 @@ var require_markup = __commonJS({
537
537
  }
538
538
  });
539
539
 
540
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMElement.js
540
+ // ../../node_modules/pretty-format/build/plugins/DOMElement.js
541
541
  var require_DOMElement = __commonJS({
542
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMElement.js"(exports) {
542
+ "../../node_modules/pretty-format/build/plugins/DOMElement.js"(exports) {
543
543
  "use strict";
544
544
  Object.defineProperty(exports, "__esModule", {
545
545
  value: true
@@ -625,9 +625,9 @@ var require_DOMElement = __commonJS({
625
625
  }
626
626
  });
627
627
 
628
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/Immutable.js
628
+ // ../../node_modules/pretty-format/build/plugins/Immutable.js
629
629
  var require_Immutable = __commonJS({
630
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/Immutable.js"(exports) {
630
+ "../../node_modules/pretty-format/build/plugins/Immutable.js"(exports) {
631
631
  "use strict";
632
632
  Object.defineProperty(exports, "__esModule", {
633
633
  value: true
@@ -782,9 +782,9 @@ var require_Immutable = __commonJS({
782
782
  }
783
783
  });
784
784
 
785
- // ../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.production.min.js
785
+ // ../../node_modules/react-is/cjs/react-is.production.min.js
786
786
  var require_react_is_production_min = __commonJS({
787
- "../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
787
+ "../../node_modules/react-is/cjs/react-is.production.min.js"(exports) {
788
788
  "use strict";
789
789
  var b = 60103;
790
790
  var c = 60106;
@@ -920,9 +920,9 @@ var require_react_is_production_min = __commonJS({
920
920
  }
921
921
  });
922
922
 
923
- // ../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.development.js
923
+ // ../../node_modules/react-is/cjs/react-is.development.js
924
924
  var require_react_is_development = __commonJS({
925
- "../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.development.js"(exports) {
925
+ "../../node_modules/react-is/cjs/react-is.development.js"(exports) {
926
926
  "use strict";
927
927
  if (process.env.NODE_ENV !== "production") {
928
928
  (function() {
@@ -1112,9 +1112,9 @@ var require_react_is_development = __commonJS({
1112
1112
  }
1113
1113
  });
1114
1114
 
1115
- // ../../node_modules/@testing-library/dom/node_modules/react-is/index.js
1115
+ // ../../node_modules/react-is/index.js
1116
1116
  var require_react_is = __commonJS({
1117
- "../../node_modules/@testing-library/dom/node_modules/react-is/index.js"(exports, module2) {
1117
+ "../../node_modules/react-is/index.js"(exports, module2) {
1118
1118
  "use strict";
1119
1119
  if (process.env.NODE_ENV === "production") {
1120
1120
  module2.exports = require_react_is_production_min();
@@ -1124,9 +1124,9 @@ var require_react_is = __commonJS({
1124
1124
  }
1125
1125
  });
1126
1126
 
1127
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactElement.js
1127
+ // ../../node_modules/pretty-format/build/plugins/ReactElement.js
1128
1128
  var require_ReactElement = __commonJS({
1129
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactElement.js"(exports) {
1129
+ "../../node_modules/pretty-format/build/plugins/ReactElement.js"(exports) {
1130
1130
  "use strict";
1131
1131
  Object.defineProperty(exports, "__esModule", {
1132
1132
  value: true
@@ -1254,9 +1254,9 @@ var require_ReactElement = __commonJS({
1254
1254
  }
1255
1255
  });
1256
1256
 
1257
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactTestComponent.js
1257
+ // ../../node_modules/pretty-format/build/plugins/ReactTestComponent.js
1258
1258
  var require_ReactTestComponent = __commonJS({
1259
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactTestComponent.js"(exports) {
1259
+ "../../node_modules/pretty-format/build/plugins/ReactTestComponent.js"(exports) {
1260
1260
  "use strict";
1261
1261
  Object.defineProperty(exports, "__esModule", {
1262
1262
  value: true
@@ -1316,9 +1316,9 @@ var require_ReactTestComponent = __commonJS({
1316
1316
  }
1317
1317
  });
1318
1318
 
1319
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/index.js
1319
+ // ../../node_modules/pretty-format/build/index.js
1320
1320
  var require_build = __commonJS({
1321
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/index.js"(exports) {
1321
+ "../../node_modules/pretty-format/build/index.js"(exports) {
1322
1322
  "use strict";
1323
1323
  Object.defineProperty(exports, "__esModule", {
1324
1324
  value: true
@@ -8749,9 +8749,7 @@ var require_lz_string = __commonJS({
8749
8749
  return keyStrBase64.charAt(a);
8750
8750
  });
8751
8751
  switch (res.length % 4) {
8752
- // To produce valid Base64
8753
8752
  default:
8754
- // When could this happen ?
8755
8753
  case 0:
8756
8754
  return res;
8757
8755
  case 1:
@@ -9184,7 +9182,7 @@ var require_lz_string = __commonJS({
9184
9182
  // ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js
9185
9183
  var prettyFormat = __toESM(require_build());
9186
9184
 
9187
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
9185
+ // ../../node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
9188
9186
  var toStr = Object.prototype.toString;
9189
9187
  function isCallable(fn) {
9190
9188
  return typeof fn === "function" || toStr.call(fn) === "[object Function]";
@@ -9232,7 +9230,7 @@ function arrayFrom(arrayLike, mapFn) {
9232
9230
  return A;
9233
9231
  }
9234
9232
 
9235
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
9233
+ // ../../node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
9236
9234
  function _typeof(obj) {
9237
9235
  "@babel/helpers - typeof";
9238
9236
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
@@ -9336,7 +9334,7 @@ var SetLike = /* @__PURE__ */ function() {
9336
9334
  }();
9337
9335
  var SetLike_default = typeof Set === "undefined" ? Set : SetLike;
9338
9336
 
9339
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/getRole.mjs
9337
+ // ../../node_modules/dom-accessibility-api/dist/getRole.mjs
9340
9338
  function getLocalName(element) {
9341
9339
  var _element$localName;
9342
9340
  return (
@@ -9519,7 +9517,7 @@ function getExplicitRole(element) {
9519
9517
  return null;
9520
9518
  }
9521
9519
 
9522
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/util.mjs
9520
+ // ../../node_modules/dom-accessibility-api/dist/util.mjs
9523
9521
  function isElement(node) {
9524
9522
  return node !== null && node.nodeType === node.ELEMENT_NODE;
9525
9523
  }
@@ -9588,7 +9586,7 @@ function hasAnyConcreteRoles(node, roles2) {
9588
9586
  return false;
9589
9587
  }
9590
9588
 
9591
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
9589
+ // ../../node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
9592
9590
  function asFlatString(s) {
9593
9591
  return s.trim().replace(/\s\s+/g, " ");
9594
9592
  }
@@ -9957,7 +9955,7 @@ function computeTextAlternative(root) {
9957
9955
  }));
9958
9956
  }
9959
9957
 
9960
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
9958
+ // ../../node_modules/dom-accessibility-api/dist/accessible-description.mjs
9961
9959
  function _typeof2(obj) {
9962
9960
  "@babel/helpers - typeof";
9963
9961
  return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
@@ -10024,7 +10022,7 @@ function computeAccessibleDescription(root) {
10024
10022
  return description;
10025
10023
  }
10026
10024
 
10027
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
10025
+ // ../../node_modules/dom-accessibility-api/dist/accessible-name.mjs
10028
10026
  function prohibitsNaming(node) {
10029
10027
  return hasAnyConcreteRoles(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", "superscript"]);
10030
10028
  }
@@ -0,0 +1,83 @@
1
+ "use client";
2
+ import {
3
+ getToastPosition
4
+ } from "./chunk-ZOTHPHXA.mjs";
5
+ import {
6
+ toast_default
7
+ } from "./chunk-HH2LF2SU.mjs";
8
+
9
+ // src/components/toast/use-toast.tsx
10
+ import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var ToastContext = createContext(null);
13
+ var useToast = () => {
14
+ const context = useContext(ToastContext);
15
+ if (!context) {
16
+ throw new Error("useToast must be used within a ToastProvider");
17
+ }
18
+ return context;
19
+ };
20
+ var ToastProvider = ({
21
+ globalOptions,
22
+ children
23
+ }) => {
24
+ const [toasts, setToasts] = useState([]);
25
+ const [containerStyle, setContainerStyle] = useState({});
26
+ const toastRef = useRef();
27
+ const addToast = useCallback((content, options) => {
28
+ const id = Date.now();
29
+ const newToast = {
30
+ id,
31
+ content,
32
+ ...options
33
+ };
34
+ setToasts((prevToasts) => [...prevToasts, newToast]);
35
+ setTimeout(() => {
36
+ setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));
37
+ }, options.duration || 3e3);
38
+ }, []);
39
+ const removeToast = useCallback((id) => {
40
+ setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));
41
+ }, []);
42
+ const value = {
43
+ default: (content, options) => addToast(content, { type: "default", icon: "info-circle", color: "default", ...globalOptions, ...options }),
44
+ info: (content, options) => addToast(content, { type: "info", icon: "info-circle", color: "info", ...globalOptions, ...options }),
45
+ success: (content, options) => addToast(content, { type: "success", icon: "check-circle", color: "success", ...globalOptions, ...options }),
46
+ warning: (content, options) => addToast(content, {
47
+ type: "warning",
48
+ icon: "exclamation-triangle",
49
+ color: "warning",
50
+ ...globalOptions,
51
+ ...options
52
+ }),
53
+ error: (content, options) => addToast(content, { type: "error", icon: "exclamation-circle", color: "danger", ...globalOptions, ...options })
54
+ };
55
+ useEffect(() => {
56
+ var _a;
57
+ const width = typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : (globalOptions == null ? void 0 : globalOptions.width) || 300;
58
+ const offset = 20;
59
+ const calculatePosition = () => {
60
+ const placement = (globalOptions == null ? void 0 : globalOptions.placement) || "bottom-right";
61
+ const { top, left, bottom, right } = getToastPosition(placement, width, offset);
62
+ setContainerStyle({
63
+ position: "fixed",
64
+ top: top !== void 0 ? `${top}px` : void 0,
65
+ left: left !== void 0 ? `${left}px` : void 0,
66
+ bottom: bottom !== void 0 ? `${bottom}px` : void 0,
67
+ right: right !== void 0 ? `${right}px` : void 0
68
+ });
69
+ };
70
+ calculatePosition();
71
+ window.addEventListener("resize", calculatePosition);
72
+ return () => window.removeEventListener("resize", calculatePosition);
73
+ }, [globalOptions == null ? void 0 : globalOptions.placement, globalOptions == null ? void 0 : globalOptions.width]);
74
+ return /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
75
+ children,
76
+ /* @__PURE__ */ jsx("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast) => /* @__PURE__ */ jsx(toast_default, { ref: toastRef, onClose: () => removeToast(toast.id), ...toast }, toast.id)) })
77
+ ] });
78
+ };
79
+
80
+ export {
81
+ useToast,
82
+ ToastProvider
83
+ };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  require_lib
4
- } from "./chunk-NTTHTGDK.mjs";
4
+ } from "./chunk-FNPWLOGV.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/ansi-styles/index.js
1047
+ // ../../node_modules/@testing-library/jest-dom/node_modules/ansi-styles/index.js
1048
1048
  var require_ansi_styles = __commonJS({
1049
- "../../node_modules/ansi-styles/index.js"(exports, module) {
1049
+ "../../node_modules/@testing-library/jest-dom/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/has-flag/index.js
1189
+ // ../../node_modules/@testing-library/jest-dom/node_modules/has-flag/index.js
1190
1190
  var require_has_flag = __commonJS({
1191
- "../../node_modules/has-flag/index.js"(exports, module) {
1191
+ "../../node_modules/@testing-library/jest-dom/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/supports-color/index.js
1202
+ // ../../node_modules/@testing-library/jest-dom/node_modules/supports-color/index.js
1203
1203
  var require_supports_color = __commonJS({
1204
- "../../node_modules/supports-color/index.js"(exports, module) {
1204
+ "../../node_modules/@testing-library/jest-dom/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/dom-accessibility-api/dist/polyfills/array.from.mjs
3764
+ // ../../node_modules/@testing-library/jest-dom/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/dom-accessibility-api/dist/polyfills/SetLike.mjs
3812
+ // ../../node_modules/@testing-library/jest-dom/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/dom-accessibility-api/dist/getRole.mjs
3916
+ // ../../node_modules/@testing-library/jest-dom/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/dom-accessibility-api/dist/util.mjs
4101
+ // ../../node_modules/@testing-library/jest-dom/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/dom-accessibility-api/dist/accessible-name-and-description.mjs
4171
+ // ../../node_modules/@testing-library/jest-dom/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/dom-accessibility-api/dist/accessible-description.mjs
4540
+ // ../../node_modules/@testing-library/jest-dom/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/dom-accessibility-api/dist/accessible-name.mjs
4611
+ // ../../node_modules/@testing-library/jest-dom/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,4 @@
1
1
  "use client";
2
- import {
3
- useToast
4
- } from "./chunk-5T5F5WVS.mjs";
5
2
  import {
6
3
  Icon_default
7
4
  } from "./chunk-AHORH5PH.mjs";
@@ -13,66 +10,55 @@ import {
13
10
  } from "./chunk-J725QONZ.mjs";
14
11
 
15
12
  // src/components/toast/toast.tsx
16
- import { forwardRef, useCallback, useMemo, useState } from "react";
17
- import { createPortal } from "react-dom";
18
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
+ import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef } from "react";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
19
15
  var Toast = forwardRef((originalProps, ref) => {
20
- const [props, variantProps] = mapPropsVariants(originalProps, tooltip.variantKeys);
21
- const { placement = "bottom", offset = 5, classNames, ...tooltipProps } = props;
22
- const slots = useMemo(() => tooltip({ ...variantProps }), [variantProps]);
23
- const [targetRect, setTargetRect] = useState(null);
24
- const { toastPosition, toastRef } = useToast({ placement, offset, targetRect });
25
- const condition = true;
26
- const getBaseProps = useCallback(
16
+ const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
17
+ const { placement, classNames, showIcon = true, showCloseButton = true, onClose, ...toastProps } = props;
18
+ const slots = useMemo(() => toast({ ...variantProps }), [variantProps]);
19
+ const toastRef = useRef(null);
20
+ useImperativeHandle(
21
+ ref,
27
22
  () => ({
28
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
23
+ getWidth: () => {
24
+ if (toastRef.current) {
25
+ return toastRef.current.offsetWidth;
26
+ }
27
+ }
29
28
  }),
30
- [slots, classNames == null ? void 0 : classNames.base]
29
+ []
31
30
  );
32
- const getContentProps = useCallback(
31
+ const getBaseProps = useCallback(
33
32
  () => ({
34
- className: slots.content({ class: classNames == null ? void 0 : classNames.content })
33
+ className: slots.base({
34
+ class: [classNames == null ? void 0 : classNames.base, (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom"]
35
+ })
35
36
  }),
36
- [slots, classNames == null ? void 0 : classNames.content]
37
+ [slots, classNames == null ? void 0 : classNames.base]
37
38
  );
38
- return /* @__PURE__ */ jsxs(Fragment, { children: [
39
- /* @__PURE__ */ jsxs("div", { ...getBaseProps(), onPointerLeave: () => setTargetRect(null), onPointerEnter: () => {
40
- }, children: [
41
- /* @__PURE__ */ jsx(Icon_default, { name: "info-circle", fill: true }),
42
- props.content,
43
- /* @__PURE__ */ jsx(Icon_default, { name: "close", className: "cursor-pointer" })
44
- ] }),
45
- condition && createPortal(
46
- /* @__PURE__ */ jsx(
47
- "div",
48
- {
49
- ref: toastRef,
50
- ...getContentProps(),
51
- style: {
52
- visibility: toastPosition.x !== 0 ? "visible" : "hidden",
53
- transform: `translate3d(${toastPosition.x}px, ${toastPosition.y}px, 0)`
54
- },
55
- children: props.content
56
- }
57
- ),
58
- document.body
59
- )
39
+ return /* @__PURE__ */ jsxs("div", { ref: toastRef, ...getBaseProps(), children: [
40
+ showIcon && /* @__PURE__ */ jsx(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
41
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: props.content }),
42
+ showCloseButton && /* @__PURE__ */ jsx(Icon_default, { name: "close", className: "cursor-pointer mt-[2px]", onClick: onClose })
60
43
  ] });
61
44
  });
62
45
  Toast.displayName = "Toast";
63
46
  var toast_default = Toast;
64
- var tooltip = tv({
47
+ var toast = tv({
65
48
  slots: {
66
49
  base: [
67
- "z-0",
50
+ "w-[300px]",
68
51
  "relative",
69
52
  "inline-flex",
70
- "items-center",
71
- "text-md",
72
- "gap-[5px]",
53
+ "items-start",
73
54
  "border",
55
+ "rounded-md",
56
+ "text-md",
74
57
  "p-[10px]",
75
- "rounded-md"
58
+ "gap-[5px]",
59
+ "z-0",
60
+ "transition-all",
61
+ "duration-300"
76
62
  ],
77
63
  content: [
78
64
  "absolute",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  getConfig
4
- } from "./chunk-NTTHTGDK.mjs";
4
+ } from "./chunk-FNPWLOGV.mjs";
5
5
  import {
6
6
  __export
7
7
  } from "./chunk-IZ6II3QA.mjs";
@@ -0,0 +1,41 @@
1
+ "use client";
2
+
3
+ // src/components/toast/toast-utils.ts
4
+ var getToastPosition = (placement, width, offset) => {
5
+ let top = void 0;
6
+ let left = void 0;
7
+ let bottom = void 0;
8
+ let right = void 0;
9
+ const viewportWidth = window.innerWidth;
10
+ switch (placement) {
11
+ case "top-left":
12
+ top = offset;
13
+ left = offset;
14
+ break;
15
+ case "top-right":
16
+ top = offset;
17
+ right = offset;
18
+ break;
19
+ case "top-center":
20
+ top = offset;
21
+ left = (viewportWidth - width) / 2;
22
+ break;
23
+ case "bottom-left":
24
+ bottom = offset;
25
+ left = offset;
26
+ break;
27
+ case "bottom-right":
28
+ bottom = offset;
29
+ right = offset;
30
+ break;
31
+ case "bottom-center":
32
+ bottom = offset;
33
+ left = (viewportWidth - width) / 2;
34
+ break;
35
+ }
36
+ return { top, left, bottom, right };
37
+ };
38
+
39
+ export {
40
+ getToastPosition
41
+ };