@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
@@ -26,9 +26,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
 
29
- // ../../node_modules/@testing-library/dom/node_modules/ansi-styles/index.js
29
+ // ../../node_modules/pretty-format/node_modules/ansi-styles/index.js
30
30
  var require_ansi_styles = __commonJS({
31
- "../../node_modules/@testing-library/dom/node_modules/ansi-styles/index.js"(exports2, module2) {
31
+ "../../node_modules/pretty-format/node_modules/ansi-styles/index.js"(exports2, module2) {
32
32
  "use strict";
33
33
  var ANSI_BACKGROUND_OFFSET = 10;
34
34
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -164,9 +164,9 @@ var require_ansi_styles = __commonJS({
164
164
  }
165
165
  });
166
166
 
167
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/collections.js
167
+ // ../../node_modules/pretty-format/build/collections.js
168
168
  var require_collections = __commonJS({
169
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/collections.js"(exports2) {
169
+ "../../node_modules/pretty-format/build/collections.js"(exports2) {
170
170
  "use strict";
171
171
  Object.defineProperty(exports2, "__esModule", {
172
172
  value: true
@@ -282,9 +282,9 @@ var require_collections = __commonJS({
282
282
  }
283
283
  });
284
284
 
285
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js
285
+ // ../../node_modules/pretty-format/build/plugins/AsymmetricMatcher.js
286
286
  var require_AsymmetricMatcher = __commonJS({
287
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js"(exports2) {
287
+ "../../node_modules/pretty-format/build/plugins/AsymmetricMatcher.js"(exports2) {
288
288
  "use strict";
289
289
  Object.defineProperty(exports2, "__esModule", {
290
290
  value: true
@@ -369,9 +369,9 @@ var require_ansi_regex = __commonJS({
369
369
  }
370
370
  });
371
371
 
372
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ConvertAnsi.js
372
+ // ../../node_modules/pretty-format/build/plugins/ConvertAnsi.js
373
373
  var require_ConvertAnsi = __commonJS({
374
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ConvertAnsi.js"(exports2) {
374
+ "../../node_modules/pretty-format/build/plugins/ConvertAnsi.js"(exports2) {
375
375
  "use strict";
376
376
  Object.defineProperty(exports2, "__esModule", {
377
377
  value: true
@@ -440,9 +440,9 @@ var require_ConvertAnsi = __commonJS({
440
440
  }
441
441
  });
442
442
 
443
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js
443
+ // ../../node_modules/pretty-format/build/plugins/DOMCollection.js
444
444
  var require_DOMCollection = __commonJS({
445
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js"(exports2) {
445
+ "../../node_modules/pretty-format/build/plugins/DOMCollection.js"(exports2) {
446
446
  "use strict";
447
447
  Object.defineProperty(exports2, "__esModule", {
448
448
  value: true
@@ -490,9 +490,9 @@ var require_DOMCollection = __commonJS({
490
490
  }
491
491
  });
492
492
 
493
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/escapeHTML.js
493
+ // ../../node_modules/pretty-format/build/plugins/lib/escapeHTML.js
494
494
  var require_escapeHTML = __commonJS({
495
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/escapeHTML.js"(exports2) {
495
+ "../../node_modules/pretty-format/build/plugins/lib/escapeHTML.js"(exports2) {
496
496
  "use strict";
497
497
  Object.defineProperty(exports2, "__esModule", {
498
498
  value: true
@@ -504,9 +504,9 @@ var require_escapeHTML = __commonJS({
504
504
  }
505
505
  });
506
506
 
507
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/markup.js
507
+ // ../../node_modules/pretty-format/build/plugins/lib/markup.js
508
508
  var require_markup = __commonJS({
509
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/markup.js"(exports2) {
509
+ "../../node_modules/pretty-format/build/plugins/lib/markup.js"(exports2) {
510
510
  "use strict";
511
511
  Object.defineProperty(exports2, "__esModule", {
512
512
  value: true
@@ -559,9 +559,9 @@ var require_markup = __commonJS({
559
559
  }
560
560
  });
561
561
 
562
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMElement.js
562
+ // ../../node_modules/pretty-format/build/plugins/DOMElement.js
563
563
  var require_DOMElement = __commonJS({
564
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMElement.js"(exports2) {
564
+ "../../node_modules/pretty-format/build/plugins/DOMElement.js"(exports2) {
565
565
  "use strict";
566
566
  Object.defineProperty(exports2, "__esModule", {
567
567
  value: true
@@ -647,9 +647,9 @@ var require_DOMElement = __commonJS({
647
647
  }
648
648
  });
649
649
 
650
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/Immutable.js
650
+ // ../../node_modules/pretty-format/build/plugins/Immutable.js
651
651
  var require_Immutable = __commonJS({
652
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/Immutable.js"(exports2) {
652
+ "../../node_modules/pretty-format/build/plugins/Immutable.js"(exports2) {
653
653
  "use strict";
654
654
  Object.defineProperty(exports2, "__esModule", {
655
655
  value: true
@@ -804,9 +804,9 @@ var require_Immutable = __commonJS({
804
804
  }
805
805
  });
806
806
 
807
- // ../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.production.min.js
807
+ // ../../node_modules/react-is/cjs/react-is.production.min.js
808
808
  var require_react_is_production_min = __commonJS({
809
- "../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
809
+ "../../node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
810
810
  "use strict";
811
811
  var b = 60103;
812
812
  var c = 60106;
@@ -942,9 +942,9 @@ var require_react_is_production_min = __commonJS({
942
942
  }
943
943
  });
944
944
 
945
- // ../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.development.js
945
+ // ../../node_modules/react-is/cjs/react-is.development.js
946
946
  var require_react_is_development = __commonJS({
947
- "../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.development.js"(exports2) {
947
+ "../../node_modules/react-is/cjs/react-is.development.js"(exports2) {
948
948
  "use strict";
949
949
  if (process.env.NODE_ENV !== "production") {
950
950
  (function() {
@@ -1043,7 +1043,7 @@ var require_react_is_development = __commonJS({
1043
1043
  var ContextProvider = REACT_PROVIDER_TYPE;
1044
1044
  var Element = REACT_ELEMENT_TYPE;
1045
1045
  var ForwardRef = REACT_FORWARD_REF_TYPE;
1046
- var Fragment3 = REACT_FRAGMENT_TYPE;
1046
+ var Fragment2 = REACT_FRAGMENT_TYPE;
1047
1047
  var Lazy = REACT_LAZY_TYPE;
1048
1048
  var Memo = REACT_MEMO_TYPE;
1049
1049
  var Portal = REACT_PORTAL_TYPE;
@@ -1107,7 +1107,7 @@ var require_react_is_development = __commonJS({
1107
1107
  exports2.ContextProvider = ContextProvider;
1108
1108
  exports2.Element = Element;
1109
1109
  exports2.ForwardRef = ForwardRef;
1110
- exports2.Fragment = Fragment3;
1110
+ exports2.Fragment = Fragment2;
1111
1111
  exports2.Lazy = Lazy;
1112
1112
  exports2.Memo = Memo;
1113
1113
  exports2.Portal = Portal;
@@ -1134,9 +1134,9 @@ var require_react_is_development = __commonJS({
1134
1134
  }
1135
1135
  });
1136
1136
 
1137
- // ../../node_modules/@testing-library/dom/node_modules/react-is/index.js
1137
+ // ../../node_modules/react-is/index.js
1138
1138
  var require_react_is = __commonJS({
1139
- "../../node_modules/@testing-library/dom/node_modules/react-is/index.js"(exports2, module2) {
1139
+ "../../node_modules/react-is/index.js"(exports2, module2) {
1140
1140
  "use strict";
1141
1141
  if (process.env.NODE_ENV === "production") {
1142
1142
  module2.exports = require_react_is_production_min();
@@ -1146,9 +1146,9 @@ var require_react_is = __commonJS({
1146
1146
  }
1147
1147
  });
1148
1148
 
1149
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactElement.js
1149
+ // ../../node_modules/pretty-format/build/plugins/ReactElement.js
1150
1150
  var require_ReactElement = __commonJS({
1151
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactElement.js"(exports2) {
1151
+ "../../node_modules/pretty-format/build/plugins/ReactElement.js"(exports2) {
1152
1152
  "use strict";
1153
1153
  Object.defineProperty(exports2, "__esModule", {
1154
1154
  value: true
@@ -1276,9 +1276,9 @@ var require_ReactElement = __commonJS({
1276
1276
  }
1277
1277
  });
1278
1278
 
1279
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactTestComponent.js
1279
+ // ../../node_modules/pretty-format/build/plugins/ReactTestComponent.js
1280
1280
  var require_ReactTestComponent = __commonJS({
1281
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactTestComponent.js"(exports2) {
1281
+ "../../node_modules/pretty-format/build/plugins/ReactTestComponent.js"(exports2) {
1282
1282
  "use strict";
1283
1283
  Object.defineProperty(exports2, "__esModule", {
1284
1284
  value: true
@@ -1338,9 +1338,9 @@ var require_ReactTestComponent = __commonJS({
1338
1338
  }
1339
1339
  });
1340
1340
 
1341
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/index.js
1341
+ // ../../node_modules/pretty-format/build/index.js
1342
1342
  var require_build = __commonJS({
1343
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/index.js"(exports2) {
1343
+ "../../node_modules/pretty-format/build/index.js"(exports2) {
1344
1344
  "use strict";
1345
1345
  Object.defineProperty(exports2, "__esModule", {
1346
1346
  value: true
@@ -8771,9 +8771,7 @@ var require_lz_string = __commonJS({
8771
8771
  return keyStrBase64.charAt(a);
8772
8772
  });
8773
8773
  switch (res.length % 4) {
8774
- // To produce valid Base64
8775
8774
  default:
8776
- // When could this happen ?
8777
8775
  case 0:
8778
8776
  return res;
8779
8777
  case 1:
@@ -9215,7 +9213,7 @@ var ReactDOMClient = __toESM(require("react-dom/client"));
9215
9213
  // ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js
9216
9214
  var prettyFormat = __toESM(require_build());
9217
9215
 
9218
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
9216
+ // ../../node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
9219
9217
  var toStr = Object.prototype.toString;
9220
9218
  function isCallable(fn) {
9221
9219
  return typeof fn === "function" || toStr.call(fn) === "[object Function]";
@@ -9263,7 +9261,7 @@ function arrayFrom(arrayLike, mapFn) {
9263
9261
  return A;
9264
9262
  }
9265
9263
 
9266
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
9264
+ // ../../node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
9267
9265
  function _typeof(obj) {
9268
9266
  "@babel/helpers - typeof";
9269
9267
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
@@ -9367,7 +9365,7 @@ var SetLike = /* @__PURE__ */ function() {
9367
9365
  }();
9368
9366
  var SetLike_default = typeof Set === "undefined" ? Set : SetLike;
9369
9367
 
9370
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/getRole.mjs
9368
+ // ../../node_modules/dom-accessibility-api/dist/getRole.mjs
9371
9369
  function getLocalName(element) {
9372
9370
  var _element$localName;
9373
9371
  return (
@@ -9550,7 +9548,7 @@ function getExplicitRole(element) {
9550
9548
  return null;
9551
9549
  }
9552
9550
 
9553
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/util.mjs
9551
+ // ../../node_modules/dom-accessibility-api/dist/util.mjs
9554
9552
  function isElement(node) {
9555
9553
  return node !== null && node.nodeType === node.ELEMENT_NODE;
9556
9554
  }
@@ -9619,7 +9617,7 @@ function hasAnyConcreteRoles(node, roles2) {
9619
9617
  return false;
9620
9618
  }
9621
9619
 
9622
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
9620
+ // ../../node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
9623
9621
  function asFlatString(s) {
9624
9622
  return s.trim().replace(/\s\s+/g, " ");
9625
9623
  }
@@ -9988,7 +9986,7 @@ function computeTextAlternative(root) {
9988
9986
  }));
9989
9987
  }
9990
9988
 
9991
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
9989
+ // ../../node_modules/dom-accessibility-api/dist/accessible-description.mjs
9992
9990
  function _typeof2(obj) {
9993
9991
  "@babel/helpers - typeof";
9994
9992
  return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
@@ -10055,7 +10053,7 @@ function computeAccessibleDescription(root) {
10055
10053
  return description;
10056
10054
  }
10057
10055
 
10058
- // ../../node_modules/@testing-library/dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
10056
+ // ../../node_modules/dom-accessibility-api/dist/accessible-name.mjs
10059
10057
  function prohibitsNaming(node) {
10060
10058
  return hasAnyConcreteRoles(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", "superscript"]);
10061
10059
  }
@@ -12873,8 +12871,7 @@ if (typeof process === "undefined" || !((_a = process.env) == null ? void 0 : _a
12873
12871
  }
12874
12872
 
12875
12873
  // src/components/toast/toast.tsx
12876
- var import_react2 = require("react");
12877
- var import_react_dom2 = require("react-dom");
12874
+ var import_react = require("react");
12878
12875
 
12879
12876
  // src/utils/tailwind-variants.ts
12880
12877
  var import_tailwind_variants = require("tailwind-variants");
@@ -12915,88 +12912,6 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
12915
12912
  }
12916
12913
  };
12917
12914
 
12918
- // src/components/toast/useToast.ts
12919
- var import_react = require("react");
12920
-
12921
- // src/components/toast/toast-utils.ts
12922
- var getToastPosition = (placement, targetRect, width, height, offset) => {
12923
- let x = 0, y = 0;
12924
- switch (placement) {
12925
- case "top":
12926
- x = targetRect.left + targetRect.width / 2 - width / 2;
12927
- y = targetRect.top - height - offset;
12928
- break;
12929
- case "left":
12930
- x = targetRect.left - width - offset;
12931
- y = targetRect.top + targetRect.height / 2 - height / 2;
12932
- break;
12933
- case "right":
12934
- x = targetRect.right + offset;
12935
- y = targetRect.top + targetRect.height / 2 - height / 2;
12936
- break;
12937
- case "bottom":
12938
- x = targetRect.left + targetRect.width / 2 - width / 2;
12939
- y = targetRect.bottom + offset;
12940
- break;
12941
- case "top-start":
12942
- x = targetRect.left;
12943
- y = targetRect.top - height - offset;
12944
- break;
12945
- case "top-end":
12946
- x = targetRect.right - width;
12947
- y = targetRect.top - height - offset;
12948
- break;
12949
- case "bottom-start":
12950
- x = targetRect.left;
12951
- y = targetRect.bottom + offset;
12952
- break;
12953
- case "bottom-end":
12954
- x = targetRect.right - width;
12955
- y = targetRect.bottom + offset;
12956
- break;
12957
- case "left-start":
12958
- x = targetRect.left - width - offset;
12959
- y = targetRect.top;
12960
- break;
12961
- case "left-end":
12962
- x = targetRect.left - width - offset;
12963
- y = targetRect.bottom - height;
12964
- break;
12965
- case "right-start":
12966
- x = targetRect.right + offset;
12967
- y = targetRect.top;
12968
- break;
12969
- case "right-end":
12970
- x = targetRect.right + offset;
12971
- y = targetRect.bottom - height;
12972
- break;
12973
- }
12974
- return { toastX: x, toastY: y };
12975
- };
12976
-
12977
- // src/components/toast/useToast.ts
12978
- var useToast = ({ placement, offset, targetRect }) => {
12979
- const [toastPosition, setToastPosition] = (0, import_react.useState)({ x: 0, y: 0 });
12980
- const toastRef = (0, import_react.useRef)(null);
12981
- (0, import_react.useEffect)(() => {
12982
- if (targetRect && toastRef.current) {
12983
- const { width, height } = toastRef.current.getBoundingClientRect();
12984
- const scrollX = window.scrollX;
12985
- const scrollY = window.scrollY;
12986
- const adjustedTargetRect = {
12987
- ...targetRect,
12988
- left: targetRect.left + scrollX,
12989
- top: targetRect.top + scrollY,
12990
- right: targetRect.right + scrollX,
12991
- bottom: targetRect.bottom + scrollY
12992
- };
12993
- const { toastX, toastY } = getToastPosition(placement, adjustedTargetRect, width, height, offset);
12994
- setToastPosition({ x: toastX, y: toastY });
12995
- }
12996
- }, [placement, offset, targetRect]);
12997
- return { toastPosition, toastRef };
12998
- };
12999
-
13000
12915
  // src/components/icon/template.tsx
13001
12916
  var import_jsx_runtime = require("react/jsx-runtime");
13002
12917
  var template = {
@@ -16546,63 +16461,53 @@ var Icon_default = Icon;
16546
16461
 
16547
16462
  // src/components/toast/toast.tsx
16548
16463
  var import_jsx_runtime3 = require("react/jsx-runtime");
16549
- var Toast = (0, import_react2.forwardRef)((originalProps, ref) => {
16550
- const [props, variantProps] = mapPropsVariants(originalProps, tooltip.variantKeys);
16551
- const { placement = "bottom", offset = 5, classNames, ...tooltipProps } = props;
16552
- const slots = (0, import_react2.useMemo)(() => tooltip({ ...variantProps }), [variantProps]);
16553
- const [targetRect, setTargetRect] = (0, import_react2.useState)(null);
16554
- const { toastPosition, toastRef } = useToast({ placement, offset, targetRect });
16555
- const condition = true;
16556
- const getBaseProps = (0, import_react2.useCallback)(
16464
+ var Toast = (0, import_react.forwardRef)((originalProps, ref) => {
16465
+ const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
16466
+ const { placement, classNames, showIcon = true, showCloseButton = true, onClose, ...toastProps } = props;
16467
+ const slots = (0, import_react.useMemo)(() => toast({ ...variantProps }), [variantProps]);
16468
+ const toastRef = (0, import_react.useRef)(null);
16469
+ (0, import_react.useImperativeHandle)(
16470
+ ref,
16557
16471
  () => ({
16558
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
16472
+ getWidth: () => {
16473
+ if (toastRef.current) {
16474
+ return toastRef.current.offsetWidth;
16475
+ }
16476
+ }
16559
16477
  }),
16560
- [slots, classNames == null ? void 0 : classNames.base]
16478
+ []
16561
16479
  );
16562
- const getContentProps = (0, import_react2.useCallback)(
16480
+ const getBaseProps = (0, import_react.useCallback)(
16563
16481
  () => ({
16564
- className: slots.content({ class: classNames == null ? void 0 : classNames.content })
16482
+ className: slots.base({
16483
+ class: [classNames == null ? void 0 : classNames.base, (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom"]
16484
+ })
16565
16485
  }),
16566
- [slots, classNames == null ? void 0 : classNames.content]
16486
+ [slots, classNames == null ? void 0 : classNames.base]
16567
16487
  );
16568
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
16569
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ...getBaseProps(), onPointerLeave: () => setTargetRect(null), onPointerEnter: () => {
16570
- }, children: [
16571
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "info-circle", fill: true }),
16572
- props.content,
16573
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "close", className: "cursor-pointer" })
16574
- ] }),
16575
- condition && (0, import_react_dom2.createPortal)(
16576
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
16577
- "div",
16578
- {
16579
- ref: toastRef,
16580
- ...getContentProps(),
16581
- style: {
16582
- visibility: toastPosition.x !== 0 ? "visible" : "hidden",
16583
- transform: `translate3d(${toastPosition.x}px, ${toastPosition.y}px, 0)`
16584
- },
16585
- children: props.content
16586
- }
16587
- ),
16588
- document.body
16589
- )
16488
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref: toastRef, ...getBaseProps(), children: [
16489
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
16490
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex-1", children: props.content }),
16491
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "close", className: "cursor-pointer mt-[2px]", onClick: onClose })
16590
16492
  ] });
16591
16493
  });
16592
16494
  Toast.displayName = "Toast";
16593
16495
  var toast_default = Toast;
16594
- var tooltip = tv({
16496
+ var toast = tv({
16595
16497
  slots: {
16596
16498
  base: [
16597
- "z-0",
16499
+ "w-[300px]",
16598
16500
  "relative",
16599
16501
  "inline-flex",
16600
- "items-center",
16601
- "text-md",
16602
- "gap-[5px]",
16502
+ "items-start",
16603
16503
  "border",
16504
+ "rounded-md",
16505
+ "text-md",
16604
16506
  "p-[10px]",
16605
- "rounded-md"
16507
+ "gap-[5px]",
16508
+ "z-0",
16509
+ "transition-all",
16510
+ "duration-300"
16606
16511
  ],
16607
16512
  content: [
16608
16513
  "absolute",
@@ -16656,12 +16561,12 @@ var tooltip = tv({
16656
16561
  var import_jsx_runtime4 = require("react/jsx-runtime");
16657
16562
  describe("Toast", () => {
16658
16563
  it("should render correctly", () => {
16659
- const wrapper = render(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(toast_default, { content: "tooltip" }));
16564
+ const wrapper = render(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(toast_default, { content: "toast content" }));
16660
16565
  expect(() => wrapper.unmount()).not.toThrow();
16661
16566
  });
16662
16567
  it("ref should be forwarded", () => {
16663
16568
  const ref = React2.createRef();
16664
- render(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(toast_default, { ref, content: "tooltip" }));
16569
+ render(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(toast_default, { ref, content: "toast content" }));
16665
16570
  expect(ref.current).not.toBeNull();
16666
16571
  });
16667
16572
  });
@@ -1,12 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  toast_default
4
- } from "../../chunk-XTJL67KM.mjs";
5
- import "../../chunk-5T5F5WVS.mjs";
6
- import "../../chunk-SDNTEP5C.mjs";
4
+ } from "../../chunk-HH2LF2SU.mjs";
7
5
  import {
8
6
  render
9
- } from "../../chunk-NTTHTGDK.mjs";
7
+ } from "../../chunk-FNPWLOGV.mjs";
10
8
  import "../../chunk-ZYIIXWVY.mjs";
11
9
  import "../../chunk-AHORH5PH.mjs";
12
10
  import "../../chunk-QURXBWKK.mjs";
@@ -19,12 +17,12 @@ import * as React from "react";
19
17
  import { jsx } from "react/jsx-runtime";
20
18
  describe("Toast", () => {
21
19
  it("should render correctly", () => {
22
- const wrapper = render(/* @__PURE__ */ jsx(toast_default, { content: "tooltip" }));
20
+ const wrapper = render(/* @__PURE__ */ jsx(toast_default, { content: "toast content" }));
23
21
  expect(() => wrapper.unmount()).not.toThrow();
24
22
  });
25
23
  it("ref should be forwarded", () => {
26
24
  const ref = React.createRef();
27
- render(/* @__PURE__ */ jsx(toast_default, { ref, content: "tooltip" }));
25
+ render(/* @__PURE__ */ jsx(toast_default, { ref, content: "toast content" }));
28
26
  expect(ref.current).not.toBeNull();
29
27
  });
30
28
  });
@@ -0,0 +1,31 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { ToastPlacement } from './toast-utils.mjs';
4
+ import { IconName } from '../icon/Icon.mjs';
5
+ import '../icon/template.mjs';
6
+
7
+ interface ToastOptions {
8
+ id: number;
9
+ width?: number;
10
+ duration?: number;
11
+ type?: "default" | "info" | "success" | "warning" | "error";
12
+ color?: "primary" | "secondary" | "default" | "info" | "success" | "warning" | "danger";
13
+ placement?: ToastPlacement;
14
+ icon?: IconName;
15
+ showIcon?: boolean;
16
+ showCloseButton?: boolean;
17
+ }
18
+ interface ToastContextValue {
19
+ default: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
20
+ info: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
21
+ success: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
22
+ warning: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
23
+ error: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
24
+ }
25
+ declare const useToast: () => ToastContextValue;
26
+ declare const ToastProvider: ({ globalOptions, children, }: {
27
+ globalOptions?: Omit<ToastOptions, "id">;
28
+ children: ReactNode;
29
+ }) => react_jsx_runtime.JSX.Element;
30
+
31
+ export { ToastProvider, useToast };
@@ -0,0 +1,31 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { ToastPlacement } from './toast-utils.js';
4
+ import { IconName } from '../icon/Icon.js';
5
+ import '../icon/template.js';
6
+
7
+ interface ToastOptions {
8
+ id: number;
9
+ width?: number;
10
+ duration?: number;
11
+ type?: "default" | "info" | "success" | "warning" | "error";
12
+ color?: "primary" | "secondary" | "default" | "info" | "success" | "warning" | "danger";
13
+ placement?: ToastPlacement;
14
+ icon?: IconName;
15
+ showIcon?: boolean;
16
+ showCloseButton?: boolean;
17
+ }
18
+ interface ToastContextValue {
19
+ default: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
20
+ info: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
21
+ success: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
22
+ warning: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
23
+ error: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
24
+ }
25
+ declare const useToast: () => ToastContextValue;
26
+ declare const ToastProvider: ({ globalOptions, children, }: {
27
+ globalOptions?: Omit<ToastOptions, "id">;
28
+ children: ReactNode;
29
+ }) => react_jsx_runtime.JSX.Element;
30
+
31
+ export { ToastProvider, useToast };