neatkit 0.14.0 → 0.15.0

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 (63) hide show
  1. package/dist/Boundary.cjs +1 -1
  2. package/dist/Boundary.js +1 -1
  3. package/dist/{Button-yBHFKYew.js → Button-DdxB1ps7.js} +1 -1
  4. package/dist/{Button-DYn8YDP3.cjs → Button-pinr6Woy.cjs} +1 -1
  5. package/dist/Button.cjs +1 -1
  6. package/dist/Button.js +1 -1
  7. package/dist/Checkbox.cjs +1 -1
  8. package/dist/Checkbox.js +1 -1
  9. package/dist/Icon-CgQ62bgw.cjs +1 -0
  10. package/dist/{Icon-hYw7-DvR.js → Icon-DK4tkZtF.js} +87 -87
  11. package/dist/Icon.cjs +1 -1
  12. package/dist/Icon.js +1 -1
  13. package/dist/Input.cjs +1 -1
  14. package/dist/Input.js +1 -1
  15. package/dist/Markdown.cjs +1 -1
  16. package/dist/Markdown.js +1 -1
  17. package/dist/Modal.cjs +1 -1
  18. package/dist/Modal.js +1 -1
  19. package/dist/Popover.cjs +1 -1
  20. package/dist/Popover.js +104 -101
  21. package/dist/Select.cjs +1 -1
  22. package/dist/Select.js +321 -310
  23. package/dist/Sidebar.cjs +1 -1
  24. package/dist/Sidebar.js +4 -4
  25. package/dist/{Table-vVaWCkk2.js → Table-Dvi-4XA7.js} +2 -2
  26. package/dist/{Table-XVrja-e5.cjs → Table-GlG5aITK.cjs} +1 -1
  27. package/dist/Table.cjs +1 -1
  28. package/dist/Table.js +1 -1
  29. package/dist/Tooltip-CDOwCTig.js +229 -0
  30. package/dist/Tooltip-DrAZSmEv.cjs +1 -0
  31. package/dist/Tooltip.cjs +1 -1
  32. package/dist/Tooltip.js +1 -1
  33. package/dist/components/Popover/Popover.d.ts +17 -0
  34. package/dist/components/Popover/index.d.ts +1 -1
  35. package/dist/components/Portal/hooks/useFloatingPosition.d.ts +3 -1
  36. package/dist/components/Portal/utils/floating-alignment.d.ts +18 -0
  37. package/dist/components/Portal/utils/floating-position.d.ts +3 -1
  38. package/dist/components/Select/Select.d.ts +1 -1
  39. package/dist/components/Select/components/CustomSelect.d.ts +9 -0
  40. package/dist/components/Select/components/SelectListbox.d.ts +3 -0
  41. package/dist/components/Select/hooks/useSelectPosition.d.ts +3 -1
  42. package/dist/components/Select/index.d.ts +1 -1
  43. package/dist/components/Select/utils/listbox-position.d.ts +3 -1
  44. package/dist/components/Tooltip/Tooltip.d.ts +10 -0
  45. package/dist/components/Tooltip/index.d.ts +1 -1
  46. package/dist/index.cjs +1 -1
  47. package/dist/index.js +1 -1
  48. package/dist/style.css +1 -1
  49. package/dist/tokens.d.ts +2 -8
  50. package/dist/{units-CpnLv2H4.cjs → units-BEMW4BNr.cjs} +1 -1
  51. package/dist/{units-Bx_CBIy8.js → units-D4Waz9EO.js} +1 -5
  52. package/dist/useAnchoredPosition-BEzN03Oi.cjs +1 -0
  53. package/dist/useAnchoredPosition-BIXEDNSo.js +119 -0
  54. package/dist/useFloatingPosition-8_GSpDjw.cjs +1 -0
  55. package/dist/useFloatingPosition-Cizey9UN.js +58 -0
  56. package/package.json +1 -1
  57. package/dist/Icon-bIPc7jK4.cjs +0 -1
  58. package/dist/Tooltip-CxcO3Vu-.cjs +0 -1
  59. package/dist/Tooltip-WwAWQ_Kq.js +0 -226
  60. package/dist/useAnchoredPosition-C0VS7hm6.js +0 -105
  61. package/dist/useAnchoredPosition-D7GRFzoX.cjs +0 -1
  62. package/dist/useFloatingPosition-DQgw-w_Z.cjs +0 -1
  63. package/dist/useFloatingPosition-MGoyautY.js +0 -57
@@ -1,6 +1,6 @@
1
- import { forwardRef as l, createElement as C } from "react";
1
+ import { forwardRef as l, createElement as m } from "react";
2
2
  import { jsx as o, jsxs as h } from "react/jsx-runtime";
3
- const x = l(function(t, e) {
3
+ const C = l(function(t, e) {
4
4
  const { height: c, width: n, ...r } = t;
5
5
  return /* @__PURE__ */ o(
6
6
  "svg",
@@ -21,7 +21,7 @@ const x = l(function(t, e) {
21
21
  )
22
22
  }
23
23
  );
24
- }), m = l(function(t, e) {
24
+ }), x = l(function(t, e) {
25
25
  const { height: c, width: n, ...r } = t;
26
26
  return /* @__PURE__ */ o(
27
27
  "svg",
@@ -138,7 +138,7 @@ const x = l(function(t, e) {
138
138
  ]
139
139
  }
140
140
  );
141
- }), H = l(function(t, e) {
141
+ }), L = l(function(t, e) {
142
142
  const { height: c, width: n, ...r } = t;
143
143
  return /* @__PURE__ */ h(
144
144
  "svg",
@@ -162,7 +162,7 @@ const x = l(function(t, e) {
162
162
  ]
163
163
  }
164
164
  );
165
- }), L = l(function(t, e) {
165
+ }), H = l(function(t, e) {
166
166
  const { height: c, width: n, ...r } = t;
167
167
  return /* @__PURE__ */ o(
168
168
  "svg",
@@ -326,7 +326,7 @@ const x = l(function(t, e) {
326
326
  )
327
327
  }
328
328
  );
329
- }), y = l(function(t, e) {
329
+ }), z = l(function(t, e) {
330
330
  const { height: c, width: n, ...r } = t;
331
331
  return /* @__PURE__ */ o(
332
332
  "svg",
@@ -350,7 +350,7 @@ const x = l(function(t, e) {
350
350
  )
351
351
  }
352
352
  );
353
- }), z = l(function(t, e) {
353
+ }), q = l(function(t, e) {
354
354
  const { height: c, width: n, ...r } = t;
355
355
  return /* @__PURE__ */ o(
356
356
  "svg",
@@ -374,7 +374,7 @@ const x = l(function(t, e) {
374
374
  )
375
375
  }
376
376
  );
377
- }), q = l(function(t, e) {
377
+ }), y = l(function(t, e) {
378
378
  const { height: c, width: n, ...r } = t;
379
379
  return /* @__PURE__ */ o(
380
380
  "svg",
@@ -476,7 +476,7 @@ const x = l(function(t, e) {
476
476
  "path",
477
477
  {
478
478
  fill: "currentColor",
479
- d: "M10.03 7.197a4.4 4.4 0 0 0-1.605-.69l-.569-.123V4.007a.07.07 0 0 0 .05.026.02.02 0 0 1 .022.015v.01c.226.102.417.268.55.478.135.21.206.454.206.703h1.875c-.034-.985-.398-1.729-1.097-2.264a3.75 3.75 0 0 0-1.606-.696V.95h-1.71v1.28a3.4 3.4 0 0 0-1.925.786 2.736 2.736 0 0 0-.926 2.115q0 1.379.95 2.042.5.366 1.9.691v2.554c-.3-.073-.57-.236-.778-.466a1.75 1.75 0 0 1-.365-.936h-1.85c-.018.438.068.874.25 1.272.181.398.454.746.796 1.016a4.04 4.04 0 0 0 1.948.763v.983h1.71v-.96a3.84 3.84 0 0 0 2.02-.812 2.777 2.777 0 0 0 .973-2.16q0-1.254-.818-1.921m-3.884-1.23a3 3 0 0 1-.584-.216.81.81 0 0 1-.464-.763.97.97 0 0 1 .464-.864q.277-.16.584-.248zm2.02 4.402a1.2 1.2 0 0 1-.293.075v-2.19q.369.108.706.295a.84.84 0 0 1 .415.74q-.01.783-.836 1.08z"
479
+ d: "M6.686 13.273V.545h.815v12.728zm2.352-8.656a1.36 1.36 0 0 0-.587-1.014q-.512-.363-1.332-.363-.577 0-.99.174a1.47 1.47 0 0 0-.631.472q-.218.3-.224.681 0 .32.144.552.15.234.403.398.254.16.562.269t.621.183l.955.24q.576.134 1.108.362.537.229.96.577.427.348.676.84.249.493.249 1.153 0 .895-.458 1.576-.457.676-1.322 1.06-.86.377-2.083.377-1.188 0-2.063-.368-.87-.368-1.363-1.074-.486-.705-.527-1.72h1.815q.04.533.328.885.289.354.75.527.468.174 1.045.174.6 0 1.054-.179.457-.183.716-.507.258-.328.263-.766a.97.97 0 0 0-.233-.656 1.7 1.7 0 0 0-.642-.437 6 6 0 0 0-.954-.319l-1.159-.298q-1.257-.323-1.988-.98-.726-.66-.726-1.754 0-.9.487-1.576.492-.675 1.337-1.05.846-.377 1.914-.377 1.084 0 1.9.378.82.373 1.287 1.039.468.66.482 1.521z"
480
480
  }
481
481
  )
482
482
  }
@@ -518,7 +518,7 @@ const x = l(function(t, e) {
518
518
  "path",
519
519
  {
520
520
  fill: "currentColor",
521
- d: "M8.414 3.661q-.896 0-1.476.476-.58.468-.75 1.366h2.96v1.179h-3.07l-.015.234v.315l.015.221h2.608v1.192H6.203q.375 1.628 2.358 1.628 1.05 0 2.02-.382v1.715Q9.73 12 8.43 12q-1.8 0-2.96-.89-1.161-.892-1.463-2.466H3V7.452h.867a2.3 2.3 0 0 1-.03-.415l.015-.355H3V5.503h.977q.272-1.62 1.462-2.559Q6.629 2 8.414 2q1.38 0 2.586.55l-.72 1.553a7 7 0 0 0-.948-.321q-.44-.12-.918-.12"
521
+ d: "m9.467 5.353-.482 1.059H2.388l.393-1.059zm-.92 2.053L8.037 8.48H2.388l.393-1.074zm2.173-4.763-.696 1.482a5 5 0 0 0-.542-.368 3.4 3.4 0 0 0-.67-.298 2.6 2.6 0 0 0-.806-.12q-.741 0-1.308.393-.567.388-.89 1.183-.318.79-.318 2.004t.318 2.004q.324.79.89 1.173a2.3 2.3 0 0 0 1.308.383 2.7 2.7 0 0 0 .805-.115q.368-.114.661-.288.3-.174.512-.348l.706 1.482q-.531.462-1.228.695-.69.234-1.456.234-1.273 0-2.257-.621-.98-.627-1.537-1.795-.555-1.173-.556-2.804 0-1.635.556-2.809.558-1.173 1.537-1.8.984-.63 2.257-.631a4.2 4.2 0 0 1 2.714.964"
522
522
  }
523
523
  )
524
524
  }
@@ -587,7 +587,7 @@ const x = l(function(t, e) {
587
587
  ]
588
588
  }
589
589
  );
590
- }), Q = l(function(t, e) {
590
+ }), T = l(function(t, e) {
591
591
  const { height: c, width: n, ...r } = t;
592
592
  return /* @__PURE__ */ o(
593
593
  "svg",
@@ -611,7 +611,7 @@ const x = l(function(t, e) {
611
611
  )
612
612
  }
613
613
  );
614
- }), T = l(function(t, e) {
614
+ }), U = l(function(t, e) {
615
615
  const { height: c, width: n, ...r } = t;
616
616
  return /* @__PURE__ */ o(
617
617
  "svg",
@@ -632,7 +632,7 @@ const x = l(function(t, e) {
632
632
  )
633
633
  }
634
634
  );
635
- }), U = l(function(t, e) {
635
+ }), Y = l(function(t, e) {
636
636
  const { height: c, width: n, ...r } = t;
637
637
  return /* @__PURE__ */ o(
638
638
  "svg",
@@ -647,7 +647,7 @@ const x = l(function(t, e) {
647
647
  children: /* @__PURE__ */ o("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M12 5.5v4.867c0 .746 0 1.12-.14 1.405a1.3 1.3 0 0 1-.562.583c-.275.145-.635.145-1.355.145H4.557c-.72 0-1.08 0-1.355-.145a1.3 1.3 0 0 1-.562-.583c-.14-.285-.14-.659-.14-1.405V3.633c0-.746 0-1.12.14-1.405.123-.25.32-.455.562-.583.275-.145.635-.145 1.355-.145h3.586M12 5.5l-3.857-4M12 5.5H8.786a.655.655 0 0 1-.643-.667V1.5" })
648
648
  }
649
649
  );
650
- }), Y = l(function(t, e) {
650
+ }), K = l(function(t, e) {
651
651
  const { height: c, width: n, ...r } = t;
652
652
  return /* @__PURE__ */ o(
653
653
  "svg",
@@ -662,7 +662,7 @@ const x = l(function(t, e) {
662
662
  children: /* @__PURE__ */ o("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M2.49 2.25H5.19c.413 0 .508.004.588.021q.133.03.243.093c.064.036.128.088.421.358l.098.09c.244.224.45.42.7.56q.232.13.486.205l.17.044c.278.061.564.058.912.058h2.702c.447 0 .74 0 .966.017.217.017.307.045.356.068a.75.75 0 0 1 .342.308c.013.024.04.084.056.27.018.198.019.459.019.872v5c0 .413-.001.675-.019.872-.016.186-.043.246-.056.27a.75.75 0 0 1-.342.309c-.049.023-.139.051-.356.067-.225.017-.52.018-.966.018H2.489c-.447 0-.74 0-.966-.018-.217-.016-.307-.044-.356-.067a.75.75 0 0 1-.342-.309c-.013-.024-.04-.084-.056-.27a11 11 0 0 1-.019-.872V3.786c0-.413.001-.675.019-.872.016-.186.043-.246.056-.27a.75.75 0 0 1 .342-.309c.049-.023.139-.051.356-.067.225-.017.52-.018.966-.018" })
663
663
  }
664
664
  );
665
- }), K = l(function(t, e) {
665
+ }), N = l(function(t, e) {
666
666
  const { height: c, width: n, ...r } = t;
667
667
  return /* @__PURE__ */ o(
668
668
  "svg",
@@ -685,7 +685,7 @@ const x = l(function(t, e) {
685
685
  )
686
686
  }
687
687
  );
688
- }), N = l(function(t, e) {
688
+ }), O = l(function(t, e) {
689
689
  const { height: c, width: n, ...r } = t;
690
690
  return /* @__PURE__ */ o(
691
691
  "svg",
@@ -706,7 +706,7 @@ const x = l(function(t, e) {
706
706
  )
707
707
  }
708
708
  );
709
- }), O = l(function(t, e) {
709
+ }), Q = l(function(t, e) {
710
710
  const { height: c, width: n, ...r } = t;
711
711
  return /* @__PURE__ */ o(
712
712
  "svg",
@@ -817,7 +817,7 @@ const x = l(function(t, e) {
817
817
  )
818
818
  }
819
819
  );
820
- }), o0 = l(function(t, e) {
820
+ }), o1 = l(function(t, e) {
821
821
  const { height: c, width: n, ...r } = t;
822
822
  return /* @__PURE__ */ o(
823
823
  "svg",
@@ -838,7 +838,7 @@ const x = l(function(t, e) {
838
838
  )
839
839
  }
840
840
  );
841
- }), n0 = l(function(t, e) {
841
+ }), n1 = l(function(t, e) {
842
842
  const { height: c, width: n, ...r } = t;
843
843
  return /* @__PURE__ */ h(
844
844
  "svg",
@@ -865,7 +865,7 @@ const x = l(function(t, e) {
865
865
  ]
866
866
  }
867
867
  );
868
- }), r0 = l(function(t, e) {
868
+ }), r1 = l(function(t, e) {
869
869
  const { height: c, width: n, ...r } = t;
870
870
  return /* @__PURE__ */ h(
871
871
  "svg",
@@ -906,7 +906,7 @@ const x = l(function(t, e) {
906
906
  ]
907
907
  }
908
908
  );
909
- }), t0 = l(function(t, e) {
909
+ }), t1 = l(function(t, e) {
910
910
  const { height: c, width: n, ...r } = t;
911
911
  return /* @__PURE__ */ o(
912
912
  "svg",
@@ -929,7 +929,7 @@ const x = l(function(t, e) {
929
929
  )
930
930
  }
931
931
  );
932
- }), e0 = l(function(t, e) {
932
+ }), e1 = l(function(t, e) {
933
933
  const { height: c, width: n, ...r } = t;
934
934
  return /* @__PURE__ */ o(
935
935
  "svg",
@@ -952,7 +952,7 @@ const x = l(function(t, e) {
952
952
  )
953
953
  }
954
954
  );
955
- }), c0 = l(function(t, e) {
955
+ }), c1 = l(function(t, e) {
956
956
  const { height: c, width: n, ...r } = t;
957
957
  return /* @__PURE__ */ h(
958
958
  "svg",
@@ -988,7 +988,7 @@ const x = l(function(t, e) {
988
988
  ]
989
989
  }
990
990
  );
991
- }), l0 = l(function(t, e) {
991
+ }), l1 = l(function(t, e) {
992
992
  const { height: c, width: n, ...r } = t;
993
993
  return /* @__PURE__ */ o(
994
994
  "svg",
@@ -1009,7 +1009,7 @@ const x = l(function(t, e) {
1009
1009
  )
1010
1010
  }
1011
1011
  );
1012
- }), i0 = l(function(t, e) {
1012
+ }), i1 = l(function(t, e) {
1013
1013
  const { height: c, width: n, ...r } = t;
1014
1014
  return /* @__PURE__ */ o(
1015
1015
  "svg",
@@ -1032,7 +1032,7 @@ const x = l(function(t, e) {
1032
1032
  )
1033
1033
  }
1034
1034
  );
1035
- }), h0 = l(function(t, e) {
1035
+ }), h1 = l(function(t, e) {
1036
1036
  const { height: c, width: n, ...r } = t;
1037
1037
  return /* @__PURE__ */ o(
1038
1038
  "svg",
@@ -1053,7 +1053,7 @@ const x = l(function(t, e) {
1053
1053
  )
1054
1054
  }
1055
1055
  );
1056
- }), s0 = l(function(t, e) {
1056
+ }), s1 = l(function(t, e) {
1057
1057
  const { height: c, width: n, ...r } = t;
1058
1058
  return /* @__PURE__ */ o(
1059
1059
  "svg",
@@ -1076,7 +1076,7 @@ const x = l(function(t, e) {
1076
1076
  )
1077
1077
  }
1078
1078
  );
1079
- }), a0 = l(function(t, e) {
1079
+ }), a1 = l(function(t, e) {
1080
1080
  const { height: c, width: n, ...r } = t;
1081
1081
  return /* @__PURE__ */ o(
1082
1082
  "svg",
@@ -1092,12 +1092,12 @@ const x = l(function(t, e) {
1092
1092
  "path",
1093
1093
  {
1094
1094
  fill: "currentColor",
1095
- d: "M7.678 1.803a7.4 7.4 0 0 1 2.814.574L9.82 3.99q-1.133-.448-1.963-.448-.562 0-.865.315-.303.31-.303.89V6.1h2.705v1.535H6.69v1.003q0 1.192-1.09 1.738h5.18v1.822H3.22V10.46q.743-.308 1.017-.708.282-.4.281-1.1V7.634H3.234V6.1h1.284V4.732q0-1.408.823-2.165.83-.764 2.337-.764"
1095
+ d: "M10.644 12.25h-7.18v-1.546h7.18zM8.615 8.228H3.43V6.722h5.185zM6.26 5.016l.159 4.261q.03.66-.22 1.144-.243.477-.86.785l-1.312-.502a.5.5 0 0 0 .373-.254q.129-.218.174-.517.045-.303.035-.576l-.15-4.34q-.034-1.01.384-1.696.422-.69 1.148-1.039a3.6 3.6 0 0 1 1.606-.353q.756 0 1.352.229.602.228 1.01.636.412.408.6.945.195.537.125 1.158l-1.725-.144q.035-.453-.15-.74a1.04 1.04 0 0 0-.496-.428 1.6 1.6 0 0 0-.671-.14 1.44 1.44 0 0 0-.686.17 1.27 1.27 0 0 0-.508.516q-.188.348-.188.885"
1096
1096
  }
1097
1097
  )
1098
1098
  }
1099
1099
  );
1100
- }), v0 = l(function(t, e) {
1100
+ }), v1 = l(function(t, e) {
1101
1101
  const { height: c, width: n, ...r } = t;
1102
1102
  return /* @__PURE__ */ h(
1103
1103
  "svg",
@@ -1117,7 +1117,7 @@ const x = l(function(t, e) {
1117
1117
  ]
1118
1118
  }
1119
1119
  );
1120
- }), w0 = l(function(t, e) {
1120
+ }), w1 = l(function(t, e) {
1121
1121
  const { height: c, width: n, ...r } = t;
1122
1122
  return /* @__PURE__ */ o(
1123
1123
  "svg",
@@ -1135,7 +1135,7 @@ const x = l(function(t, e) {
1135
1135
  ] })
1136
1136
  }
1137
1137
  );
1138
- }), d0 = l(function(t, e) {
1138
+ }), d1 = l(function(t, e) {
1139
1139
  const { height: c, width: n, ...r } = t;
1140
1140
  return /* @__PURE__ */ o(
1141
1141
  "svg",
@@ -1158,7 +1158,7 @@ const x = l(function(t, e) {
1158
1158
  )
1159
1159
  }
1160
1160
  );
1161
- }), g0 = l(function(t, e) {
1161
+ }), g1 = l(function(t, e) {
1162
1162
  const { height: c, width: n, ...r } = t;
1163
1163
  return /* @__PURE__ */ h(
1164
1164
  "svg",
@@ -1176,7 +1176,7 @@ const x = l(function(t, e) {
1176
1176
  ]
1177
1177
  }
1178
1178
  );
1179
- }), u0 = l(function(t, e) {
1179
+ }), u1 = l(function(t, e) {
1180
1180
  const { height: c, width: n, ...r } = t;
1181
1181
  return /* @__PURE__ */ o(
1182
1182
  "svg",
@@ -1192,12 +1192,12 @@ const x = l(function(t, e) {
1192
1192
  "path",
1193
1193
  {
1194
1194
  fill: "currentColor",
1195
- d: "M8.11 8.571c1.995 0 3.39-1.46 3.39-3.558 0-2.099-1.395-3.513-3.39-3.513H4.281A.29.29 0 0 0 4 1.795v5.073H2.781a.29.29 0 0 0-.281.295v1.114c0 .163.126.294.281.294H4v.786H2.781a.29.29 0 0 0-.281.295v.982c0 .163.126.295.281.295H4v1.276c0 .163.126.295.281.295h1.373a.29.29 0 0 0 .281-.295V10.93h3.784a.29.29 0 0 0 .281-.295v-.982a.29.29 0 0 0-.281-.295H5.935v-.786zM5.935 3.188H7.78c1.095 0 1.755.715 1.755 1.825 0 1.125-.66 1.855-1.785 1.855H5.935z"
1195
+ d: "M7.941 8.167H2.607V6.65H7.9q.642 0 1.054-.204.418-.204.617-.567.204-.363.199-.85a1.73 1.73 0 0 0-.2-.855 1.4 1.4 0 0 0-.606-.602q-.402-.224-1.024-.224H5.942V12H4.103V1.818h3.838q1.183 0 2.004.428.82.422 1.242 1.148.428.72.428 1.62 0 .936-.433 1.647-.432.705-1.252 1.108-.82.398-1.989.398m.234.756v1.516H2.607V8.923z"
1196
1196
  }
1197
1197
  )
1198
1198
  }
1199
1199
  );
1200
- }), f0 = l(function(t, e) {
1200
+ }), f1 = l(function(t, e) {
1201
1201
  const { height: c, width: n, ...r } = t;
1202
1202
  return /* @__PURE__ */ o(
1203
1203
  "svg",
@@ -1218,7 +1218,7 @@ const x = l(function(t, e) {
1218
1218
  )
1219
1219
  }
1220
1220
  );
1221
- }), p0 = l(function(t, e) {
1221
+ }), p1 = l(function(t, e) {
1222
1222
  const { height: c, width: n, ...r } = t;
1223
1223
  return /* @__PURE__ */ h(
1224
1224
  "svg",
@@ -1242,7 +1242,7 @@ const x = l(function(t, e) {
1242
1242
  ]
1243
1243
  }
1244
1244
  );
1245
- }), C0 = l(function(t, e) {
1245
+ }), m1 = l(function(t, e) {
1246
1246
  const { height: c, width: n, ...r } = t;
1247
1247
  return /* @__PURE__ */ o(
1248
1248
  "svg",
@@ -1257,7 +1257,7 @@ const x = l(function(t, e) {
1257
1257
  children: /* @__PURE__ */ o("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M4.031 4.031h.006M6.195 1.5H4.5c-1.05 0-1.575 0-1.976.204-.353.18-.64.467-.82.82-.204.4-.204.926-.204 1.976v1.695c0 .458 0 .688.052.904.046.19.121.374.224.542.116.189.278.35.603.675l2.937 2.938c.743.742 1.114 1.114 1.542 1.253.377.122.782.122 1.159 0 .428-.14.8-.51 1.542-1.253l1.695-1.695c.742-.743 1.114-1.114 1.253-1.542a1.88 1.88 0 0 0 0-1.159c-.14-.428-.51-.8-1.253-1.542L8.316 2.38c-.324-.325-.486-.487-.675-.603a1.9 1.9 0 0 0-.542-.224C6.883 1.5 6.653 1.5 6.195 1.5M4.344 4.031a.312.312 0 1 1-.625 0 .312.312 0 0 1 .625 0" })
1258
1258
  }
1259
1259
  );
1260
- }), x0 = l(function(t, e) {
1260
+ }), C1 = l(function(t, e) {
1261
1261
  const { height: c, width: n, ...r } = t;
1262
1262
  return /* @__PURE__ */ o(
1263
1263
  "svg",
@@ -1280,7 +1280,7 @@ const x = l(function(t, e) {
1280
1280
  )
1281
1281
  }
1282
1282
  );
1283
- }), m0 = l(function(t, e) {
1283
+ }), x1 = l(function(t, e) {
1284
1284
  const { height: c, width: n, ...r } = t;
1285
1285
  return /* @__PURE__ */ o(
1286
1286
  "svg",
@@ -1301,7 +1301,7 @@ const x = l(function(t, e) {
1301
1301
  )
1302
1302
  }
1303
1303
  );
1304
- }), I0 = l(function(t, e) {
1304
+ }), I1 = l(function(t, e) {
1305
1305
  const { height: c, width: n, ...r } = t;
1306
1306
  return /* @__PURE__ */ h(
1307
1307
  "svg",
@@ -1336,7 +1336,7 @@ const x = l(function(t, e) {
1336
1336
  ]
1337
1337
  }
1338
1338
  );
1339
- }), M0 = l(function(t, e) {
1339
+ }), M1 = l(function(t, e) {
1340
1340
  const { height: c, width: n, ...r } = t;
1341
1341
  return /* @__PURE__ */ o(
1342
1342
  "svg",
@@ -1357,7 +1357,7 @@ const x = l(function(t, e) {
1357
1357
  )
1358
1358
  }
1359
1359
  );
1360
- }), k0 = l(function(t, e) {
1360
+ }), k1 = l(function(t, e) {
1361
1361
  const { height: c, width: n, ...r } = t;
1362
1362
  return /* @__PURE__ */ o(
1363
1363
  "svg",
@@ -1373,72 +1373,72 @@ const x = l(function(t, e) {
1373
1373
  "path",
1374
1374
  {
1375
1375
  fill: "currentColor",
1376
- d: "m2.5 1.75 2.644 4.594H3.853v1.312h2.203V8.97H3.853v1.312h2.203v1.969h1.888v-1.969h2.203V8.97H7.944V7.656h2.203V6.344h-1.29L11.5 1.75H9.298L7 5.743 4.702 1.75z"
1376
+ d: "M5.128 1.818 7.4 7.128l-1.288.865L3.2 1.818zm1.387 5.28 2.257-5.28h1.929L7.783 7.993zm1.327-.457V12h-1.83V6.64zm2.088.169v1.118H3.825V6.81zm0 1.968v1.119H3.825V8.778z"
1377
1377
  }
1378
1378
  )
1379
1379
  }
1380
1380
  );
1381
- }), H0 = {
1382
- projects: v0,
1381
+ }), L1 = {
1382
+ projects: v1,
1383
1383
  chat: Z,
1384
- articles: m,
1385
- mail: c0,
1386
- github: O,
1384
+ articles: x,
1385
+ mail: c1,
1386
+ github: Q,
1387
1387
  globe: $,
1388
1388
  google: J,
1389
- microsoft: l0,
1390
- bing: H,
1391
- apple: x,
1392
- twitter: x0,
1393
- facebook: T,
1394
- instagram: r0,
1395
- linkedin: e0,
1396
- reddit: d0,
1397
- exit: Q,
1389
+ microsoft: l1,
1390
+ bing: L,
1391
+ apple: C,
1392
+ twitter: C1,
1393
+ facebook: U,
1394
+ instagram: r1,
1395
+ linkedin: e1,
1396
+ reddit: d1,
1397
+ exit: T,
1398
1398
  camera: P,
1399
- "qr-code": w0,
1399
+ "qr-code": w1,
1400
1400
  download: j,
1401
1401
  dollar: G,
1402
1402
  euro: D,
1403
- save: f0,
1404
- pencil: h0,
1403
+ save: f1,
1404
+ pencil: h1,
1405
1405
  "arrow-left": I,
1406
1406
  "arrow-right": M,
1407
1407
  cross: b,
1408
1408
  checkmark: R,
1409
- plus: s0,
1410
- pound: a0,
1411
- minus: i0,
1412
- window: M0,
1409
+ plus: s1,
1410
+ pound: a1,
1411
+ minus: i1,
1412
+ window: M1,
1413
1413
  chain: B,
1414
- user: m0,
1414
+ user: x1,
1415
1415
  duplicate: E,
1416
1416
  eye: S,
1417
1417
  "eye-off": F,
1418
- signal: p0,
1418
+ signal: p1,
1419
1419
  audio: k,
1420
1420
  hardware: X,
1421
1421
  burger: V,
1422
- repository: g0,
1422
+ repository: g1,
1423
1423
  "chevron-down": A,
1424
- "chevron-up": q,
1425
- "chevron-left": y,
1426
- "chevron-right": z,
1427
- branch: L,
1424
+ "chevron-up": y,
1425
+ "chevron-left": z,
1426
+ "chevron-right": q,
1427
+ branch: H,
1428
1428
  commit: W,
1429
- folder: Y,
1430
- file: U,
1431
- image: o0,
1432
- tag: C0,
1433
- ruble: u0,
1434
- key: t0,
1435
- gear: K,
1436
- git: N,
1429
+ folder: K,
1430
+ file: Y,
1431
+ image: o1,
1432
+ tag: m1,
1433
+ ruble: u1,
1434
+ key: t1,
1435
+ gear: N,
1436
+ git: O,
1437
1437
  home: _,
1438
- info: n0,
1439
- warning: I0,
1440
- "yen-yuan": k0
1441
- }, P0 = l(function(t, e) {
1438
+ info: n1,
1439
+ warning: I1,
1440
+ "yen-yuan": k1
1441
+ }, P1 = l(function(t, e) {
1442
1442
  const {
1443
1443
  "aria-hidden": c,
1444
1444
  "aria-label": n,
@@ -1450,11 +1450,11 @@ const x = l(function(t, e) {
1450
1450
  style: f,
1451
1451
  type: v,
1452
1452
  ...p
1453
- } = t, w = H0[v];
1453
+ } = t, w = L1[v];
1454
1454
  if (!w)
1455
1455
  return console.warn(`Icon type "${v}" not found`), null;
1456
1456
  const d = n !== void 0 || r !== void 0;
1457
- return C(w, {
1457
+ return m(w, {
1458
1458
  ...p,
1459
1459
  "aria-hidden": c ?? (d ? void 0 : !0),
1460
1460
  "aria-label": n,
@@ -1470,5 +1470,5 @@ const x = l(function(t, e) {
1470
1470
  });
1471
1471
  });
1472
1472
  export {
1473
- P0 as I
1473
+ P1 as I
1474
1474
  };
package/dist/Icon.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Icon-bIPc7jK4.cjs");exports.default=e.Icon;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Icon-CgQ62bgw.cjs");exports.default=e.Icon;
package/dist/Icon.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Icon-hYw7-DvR.js";
1
+ import { I as f } from "./Icon-DK4tkZtF.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/Input.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),t=require("react"),x=require("./Button-DYn8YDP3.cjs"),$=require("./Spinner-BE0F4y2S.cjs"),S=require("./aria-DM-xYEHQ.cjs"),F=require("./reference-C2guRuR0.cjs");function v(e){return Array.isArray(e)?e.length>0:e!=null&&String(e).length>0}function G(e,s,n){s.current=e,F.assignElementReference(n,e)}function J(e){var n;const s=(n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"))==null?void 0:n.set;s?s.call(e,""):e.value=""}const K=t.forwardRef(function(s,n){const{"aria-busy":V,"aria-invalid":b,className:m,clearable:y=!1,defaultValue:g,disabled:C=!1,id:A,invalid:h=!1,loading:l=!1,onChange:d,readOnly:p=!1,style:N,type:r="text",value:o,...P}=s,q=t.useId(),I=t.useRef(null),[O,R]=t.useState(v(g)),[c,w]=t.useState(!1);t.useEffect(()=>{r!=="password"&&w(!1)},[r]);const B=t.useCallback(a=>G(a,I,n),[n]),f=A??`${q}-control`,u=C||l,T=h||S.hasInvalidState(b),E=o!==void 0?v(o):O,D=r==="password"&&c?"text":r,H=S.resolveAriaInvalid(h,b),_=y&&E&&!p&&!u,j=r==="password"&&!l,k=_||j;function M(a){o===void 0&&R(v(a.currentTarget.value)),d==null||d(a)}function U(){const a=I.current;a&&(J(a),a.dispatchEvent(new Event("input",{bubbles:!0})),a.focus())}function z(){w(a=>!a)}return i.jsxs("div",{className:["nk-input",m].filter(Boolean).join(" "),"data-clearable":y||void 0,"data-disabled":u||void 0,"data-invalid":T||void 0,"data-loading":l||void 0,"data-read-only":p||void 0,"data-has-trailing-action":k||void 0,style:N,children:[i.jsx("input",{...P,ref:B,"aria-busy":l?!0:V,"aria-invalid":H,className:"nk-input__control",defaultValue:g,disabled:u,id:f,onChange:M,readOnly:p,type:D,value:o}),k?i.jsxs("span",{className:"nk-input__trailing",children:[_?i.jsx(x.Button,{"aria-controls":f,"aria-label":"Clear input",className:"nk-input__action",icon:"cross",onClick:U,shape:"rectangle",type:"button",variant:"ghost"}):null,j?i.jsx(x.Button,{"aria-controls":f,"aria-label":c?"Hide password":"Show password","aria-pressed":c,className:"nk-input__action",disabled:u,icon:c?"eye-off":"eye",onClick:z,shape:"rectangle",type:"button",variant:"ghost"}):null]}):null,l?i.jsx($.Spinner,{"aria-hidden":"true","aria-label":void 0,className:"nk-input__spinner",role:void 0,size:14}):null]})});exports.default=K;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),t=require("react"),x=require("./Button-pinr6Woy.cjs"),$=require("./Spinner-BE0F4y2S.cjs"),S=require("./aria-DM-xYEHQ.cjs"),F=require("./reference-C2guRuR0.cjs");function v(e){return Array.isArray(e)?e.length>0:e!=null&&String(e).length>0}function G(e,s,n){s.current=e,F.assignElementReference(n,e)}function J(e){var n;const s=(n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"))==null?void 0:n.set;s?s.call(e,""):e.value=""}const K=t.forwardRef(function(s,n){const{"aria-busy":V,"aria-invalid":b,className:m,clearable:y=!1,defaultValue:g,disabled:C=!1,id:A,invalid:h=!1,loading:l=!1,onChange:d,readOnly:p=!1,style:N,type:r="text",value:o,...P}=s,q=t.useId(),I=t.useRef(null),[O,R]=t.useState(v(g)),[c,w]=t.useState(!1);t.useEffect(()=>{r!=="password"&&w(!1)},[r]);const B=t.useCallback(a=>G(a,I,n),[n]),f=A??`${q}-control`,u=C||l,T=h||S.hasInvalidState(b),E=o!==void 0?v(o):O,D=r==="password"&&c?"text":r,H=S.resolveAriaInvalid(h,b),_=y&&E&&!p&&!u,j=r==="password"&&!l,k=_||j;function M(a){o===void 0&&R(v(a.currentTarget.value)),d==null||d(a)}function U(){const a=I.current;a&&(J(a),a.dispatchEvent(new Event("input",{bubbles:!0})),a.focus())}function z(){w(a=>!a)}return i.jsxs("div",{className:["nk-input",m].filter(Boolean).join(" "),"data-clearable":y||void 0,"data-disabled":u||void 0,"data-invalid":T||void 0,"data-loading":l||void 0,"data-read-only":p||void 0,"data-has-trailing-action":k||void 0,style:N,children:[i.jsx("input",{...P,ref:B,"aria-busy":l?!0:V,"aria-invalid":H,className:"nk-input__control",defaultValue:g,disabled:u,id:f,onChange:M,readOnly:p,type:D,value:o}),k?i.jsxs("span",{className:"nk-input__trailing",children:[_?i.jsx(x.Button,{"aria-controls":f,"aria-label":"Clear input",className:"nk-input__action",icon:"cross",onClick:U,shape:"rectangle",type:"button",variant:"ghost"}):null,j?i.jsx(x.Button,{"aria-controls":f,"aria-label":c?"Hide password":"Show password","aria-pressed":c,className:"nk-input__action",disabled:u,icon:c?"eye-off":"eye",onClick:z,shape:"rectangle",type:"button",variant:"ghost"}):null]}):null,l?i.jsx($.Spinner,{"aria-hidden":"true","aria-label":void 0,className:"nk-input__spinner",role:void 0,size:14}):null]})});exports.default=K;
package/dist/Input.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as _, jsx as d } from "react/jsx-runtime";
3
3
  import { forwardRef as F, useId as G, useRef as J, useState as V, useEffect as K, useCallback as L } from "react";
4
- import { B as C } from "./Button-yBHFKYew.js";
4
+ import { B as C } from "./Button-DdxB1ps7.js";
5
5
  import { S as M } from "./Spinner-CmxlDlOk.js";
6
6
  import { h as Q, r as W } from "./aria-Bv-xVREf.js";
7
7
  import { a as X } from "./reference-CXMr27nM.js";
package/dist/Markdown.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),M=require("react"),G=require("react-markdown"),W=require("rehype-raw"),H=require("rehype-sanitize"),V=require("rehype-slug"),J=require("remark-gfm"),Y=require("./Alert-LJDkNUqH.cjs"),X=require("./Code-f0GWveGp.cjs"),Q=require("./Divider-C7XGlr26.cjs"),_=require("./Table-XVrja-e5.cjs"),k=require("./Text-DWYlIcPj.cjs"),Z={bash:"Shell",c:"C","c++":"C++",cpp:"C++",css:"CSS",go:"Go",golang:"Go",html:"HTML",js:"JavaScript",javascript:"JavaScript",jsx:"JavaScript",json:"JSON",markdown:"Markdown",md:"Markdown",py:"Python",python:"Python",rb:"Ruby",ruby:"Ruby",rs:"Rust",rust:"Rust",sh:"Shell",shell:"Shell",sql:"SQL",ts:"TypeScript",tsx:"TypeScript",typescript:"TypeScript",xml:"HTML",yaml:"YAML",yml:"YAML"};function ee(e){var a;const o=(a=e==null?void 0:e.split(/\s+/).find(f=>f.startsWith("language-")))==null?void 0:a.slice(9).toLowerCase();return o?Z[o]:void 0}const A="md-",B=["a","blockquote","br","code","del","em","h1","h2","h3","h4","h5","h6","hr","img","input","li","ol","p","picture","pre","section","source","strong","sup","table","tbody","td","th","thead","tr","ul"],ne={...H.defaultSchema,allowComments:!1,allowDoctypes:!1,ancestors:{...H.defaultSchema.ancestors,source:["picture"]},attributes:{"*":["dir","id","lang","title"],a:["ariaDescribedBy","ariaLabel","dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href","hrefLang"],code:[["className",/^language-[\w+-]+$/]],h2:[["className","sr-only"]],img:["alt","height","src","srcSet","width"],input:["checked",["disabled",!0],"readOnly",["type","checkbox"]],li:[["className","task-list-item"]],ol:["start",["className","contains-task-list"]],section:["dataFootnotes",["className","footnotes"]],source:["media","srcSet","type"],td:["align","colSpan","rowSpan"],th:["align","colSpan","rowSpan","scope"],ul:[["className","contains-task-list"]]},clobber:H.defaultSchema.clobber,clobberPrefix:A,strip:["script","style"],tagNames:[...B]};function re(e,o){const a=o.flags.replace(/[gy]/g,"");return new RegExp(o.source,a).test(e)}function te(e){if(!e)return null;try{const o=new URL(e);return o.protocol!=="http:"&&o.protocol!=="https:"||o.username||o.password?null:o}catch{return null}}function R(e,o,a){if(e.includes("\\")||/[\u0000-\u0020\u007f]/.test(e)||o===void 0)return;const f=/^[a-z][a-z\d+.-]*:/i.test(e),m=e.startsWith("//");if(o==="*")return!f&&!m||/^https?:/i.test(e)||m?e:void 0;const s=Array.isArray(o)?o:[o],t=te(a);try{let n=null;if(f?n=new URL(e):t&&(n=new URL(e,t)),!n||n.protocol!=="http:"&&n.protocol!=="https:"||n.username||n.password)return;const r=n.href;return s.some(c=>re(r,c))?r:void 0}catch{return}}function v(e,o,a){if(!e)return;const m=e.split(",").map(s=>{const t=s.trim().split(/\s+/),[n,r]=t,u=r===void 0||/^(?:\d+w|(?:\d+(?:\.\d+)?|\.\d+)x)$/.test(r);if(t.length>2||!u||n===void 0||n.length===0)return null;const c=R(n,o,a);return c?`${c}${r?` ${r}`:""}`:null});if(!m.some(s=>s===null))return m.join(", ")}function oe(){function e(o){o.children=o.children.filter(a=>a.type!=="element"||a.tagName!=="input"||a.position===void 0),o.children.forEach(a=>{a.type==="element"&&e(a)})}return o=>e(o)}function S(e,o){return Array.isArray(e)?e.map(a=>typeof a=="string"?`${o}${a}`:a):typeof e=="string"?e.split(/\s+/).map(a=>`${o}${a}`).join(" "):e}function se(e){const{clobberPrefix:o,prefix:a}=e;function f(m){if(m.type==="element"){const{properties:s}=m;s.id=S(s.id,a),s.name=S(s.name,a),s.ariaDescribedBy=S(s.ariaDescribedBy,a),s.ariaLabelledBy=S(s.ariaLabelledBy,a),typeof s.href=="string"&&s.href.startsWith("#")&&(s.href=`#${o}${a}${s.href.slice(1)}`)}"children"in m&&m.children.forEach(f)}return m=>f(m)}function C(e){return e==="center"||e==="left"||e==="right"?e:void 0}function E(e){return e.type==="text"?e.value:"children"in e?e.children.map(E).join(""):""}function T(e){return typeof e=="string"?e:void 0}function ie(e){if(!e)return null;const o=e.children.find(n=>n.type==="element"&&n.tagName==="code");if(!o||e.children.some(n=>n!==o&&(n.type!=="text"||n.value.trim().length>0)))return null;const f=o.properties.className;let m;Array.isArray(f)?m=f.join(" "):typeof f=="string"&&(m=f);const s=o.children.map(E).join("").replace(/\n$/,"");return{codeProps:{className:m,dir:T(o.properties.dir),id:T(o.properties.id),lang:T(o.properties.lang),title:T(o.properties.title)},content:s}}function ae(e,o,a,f,m){return{a:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsx("a",{...i,className:["nk-markdown__link",r].filter(Boolean).join(" "),onClick:m,children:n})},blockquote:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,...c}=t;return d.jsx("blockquote",{...c,className:"nk-markdown__blockquote",children:n})},code:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsx("code",{...i,className:["nk-markdown__inline-code",r].filter(Boolean).join(" "),children:n})},h1:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h1",className:["nk-markdown__heading",r].filter(Boolean).join(" "),size:"heading",weight:"semibold",children:n})},h2:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h2",className:["nk-markdown__heading",r!=null&&r.split(/\s+/).includes("sr-only")?"nk-markdown__visually-hidden":void 0].filter(Boolean).join(" "),size:"title",weight:"semibold",children:n})},h3:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h3",className:["nk-markdown__heading",r].filter(Boolean).join(" "),size:"subtitle",weight:"semibold",children:n})},h4:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h4",className:["nk-markdown__heading",r].filter(Boolean).join(" "),weight:"semibold",children:n})},h5:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h5",className:["nk-markdown__heading",r].filter(Boolean).join(" "),weight:"semibold",children:n})},h6:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h6",className:["nk-markdown__heading",r].filter(Boolean).join(" "),weight:"medium",children:n})},hr:function(t){const{dangerouslySetInnerHTML:n,node:r,...u}=t;return d.jsx(Q.Divider,{...u})},img:function(t){const{alt:n,className:r,dangerouslySetInnerHTML:u,node:c,src:i,srcSet:l,...b}=t,x=R(typeof i=="string"?i:"",e,o),L=v(l,e,o);return x?d.jsx("img",{...b,alt:n??"",className:["nk-markdown__image",r].filter(Boolean).join(" "),decoding:"async",loading:"lazy",src:x,srcSet:L}):n?d.jsx("span",{className:"nk-markdown__blocked-image",children:n}):null},input:function(t){const{checked:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsxs(d.Fragment,{children:[d.jsx("input",{...i,"aria-label":n?"Completed task":"Incomplete task",checked:n,className:["nk-markdown__task-control","nk-markdown__visually-hidden",r].filter(Boolean).join(" "),disabled:!0,readOnly:!0,type:"checkbox"}),d.jsx("span",{"aria-hidden":"true",className:"nk-markdown__task",children:n?"☒":"☐"})]})},li:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t,l=(r==null?void 0:r.split(/\s+/).includes("task-list-item"))??!1;return d.jsx("li",{...i,className:["nk-markdown__list-item",l?"nk-markdown__list-item--task":void 0].filter(Boolean).join(" "),children:n})},ol:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t,l=(r==null?void 0:r.split(/\s+/).includes("contains-task-list"))??!1;return d.jsx("ol",{...i,className:["nk-markdown__list","nk-markdown__list--ordered",l?"nk-markdown__list--tasks":void 0].filter(Boolean).join(" "),children:n})},p:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,className:["nk-markdown__paragraph",r].filter(Boolean).join(" "),children:n})},picture:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsx("picture",{...i,className:["nk-markdown__picture",r].filter(Boolean).join(" "),children:n})},pre:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,ref:c,...i}=t,l=ie(u);return l?d.jsx(X.Code,{code:l.content,codeProps:l.codeProps,language:ee(l.codeProps.className),maxHighlightLength:a,maxLineCount:f,preProps:i}):d.jsx("pre",{...i,children:n})},source:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,srcSet:c,...i}=t,l=v(c,e,o);return l?d.jsx("source",{...i,srcSet:l}):null},table:function(t){const{children:n,dangerouslySetInnerHTML:r,frame:u,node:c,...i}=t;return d.jsx(_.Table,{...i,children:n})},tbody:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,...c}=t;return d.jsx(_.Table.Body,{...c,children:n})},td:function(t){const{align:n,children:r,dangerouslySetInnerHTML:u,node:c,style:i,...l}=t;return d.jsx(_.Table.Cell,{...l,align:C((i==null?void 0:i.textAlign)??n),children:r})},th:function(t){const{align:n,children:r,dangerouslySetInnerHTML:u,node:c,style:i,...l}=t;return d.jsx(_.Table.HeaderCell,{...l,align:C((i==null?void 0:i.textAlign)??n),children:r})},thead:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,...c}=t;return d.jsx(_.Table.Head,{...c,children:n})},tr:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,onClick:c,...i}=t;return d.jsx(_.Table.Row,{...i,children:n})},ul:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t,l=(r==null?void 0:r.split(/\s+/).includes("contains-task-list"))??!1;return d.jsx("ul",{...i,className:["nk-markdown__list","nk-markdown__list--unordered",l?"nk-markdown__list--tasks":void 0].filter(Boolean).join(" "),children:n})}}}const le={clobberPrefix:""},ce=25e3,de="Markdown content exceeds the rendering limit.";function ue(e,o){if(!e.startsWith("#")||e.length===1)return null;let a=e.slice(1);try{a=decodeURIComponent(a)}catch{return null}return o.getElementById(a)}function me(e){const o=e.tabIndex<0&&!e.hasAttribute("tabindex");if(o&&e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}),!!o){if(e.ownerDocument.activeElement!==e){e.removeAttribute("tabindex");return}e.addEventListener("blur",()=>e.removeAttribute("tabindex"),{once:!0})}}function fe(e,o){const a=e,f=new a.HashChangeEvent("hashchange",{newURL:e.location.href,oldURL:o});e.dispatchEvent(f)}function he(e){return e===null?null:Number.isFinite(e)?Math.max(0,Math.floor(e)):0}const pe=M.forwardRef(function(o,a){const{allowedImageSources:f,anchorPrefix:m="",className:s,content:t,dangerouslySetInnerHTML:n,imageBaseUrl:r,maxCodeHighlightLength:u,maxCodeLineCount:c,maxContentLength:i=ce,rehypePlugins:l,remarkPlugins:b,scrollOffset:g=128,style:x,...L}=o,P=he(i),D=P!==null&&t.length>P,j=M.useCallback(h=>{var N;if(h.defaultPrevented||h.button!==0||h.metaKey||h.ctrlKey||h.shiftKey||h.altKey)return;const y=h.currentTarget.getAttribute("href");if(!y)return;const w=ue(y,h.currentTarget.ownerDocument);if(!w||typeof w.scrollIntoView!="function")return;const p=w.ownerDocument.defaultView;if(!p)return;h.preventDefault();const z=((N=p.matchMedia)==null?void 0:N.call(p,"(prefers-reduced-motion: reduce)").matches)??!1,F=g===null||z?"auto":"smooth",U=p.location.href,K=p.location.hash!==y;p.location.hash!==y&&p.history.pushState(p.history.state,"",y),me(w),w.scrollIntoView({behavior:F,block:"start"}),K&&fe(p,U)},[g]),O=M.useMemo(()=>ae(f,r,u,c,j),[f,j,r,u,c]),q=M.useMemo(()=>[J,...b??[]],[b]),$=M.useMemo(()=>[W,...l??[],oe,V,[se,{clobberPrefix:A,prefix:m}],[H,ne]],[m,l]),I={...x};if(g!==null){const h=Number.isFinite(g)?Math.max(0,g):0;I["--nk-markdown-scroll-offset"]=`${h}px`}return d.jsx("div",{...L,ref:a,className:["nk-markdown",s].filter(Boolean).join(" "),style:I,children:D?d.jsx(Y.Alert,{role:"alert",tone:"warning",children:de}):d.jsx(G,{allowedElements:B,components:O,rehypePlugins:$,remarkPlugins:q,remarkRehypeOptions:le,children:t})})});exports.default=pe;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),M=require("react"),G=require("react-markdown"),W=require("rehype-raw"),H=require("rehype-sanitize"),V=require("rehype-slug"),J=require("remark-gfm"),Y=require("./Alert-LJDkNUqH.cjs"),X=require("./Code-f0GWveGp.cjs"),Q=require("./Divider-C7XGlr26.cjs"),_=require("./Table-GlG5aITK.cjs"),k=require("./Text-DWYlIcPj.cjs"),Z={bash:"Shell",c:"C","c++":"C++",cpp:"C++",css:"CSS",go:"Go",golang:"Go",html:"HTML",js:"JavaScript",javascript:"JavaScript",jsx:"JavaScript",json:"JSON",markdown:"Markdown",md:"Markdown",py:"Python",python:"Python",rb:"Ruby",ruby:"Ruby",rs:"Rust",rust:"Rust",sh:"Shell",shell:"Shell",sql:"SQL",ts:"TypeScript",tsx:"TypeScript",typescript:"TypeScript",xml:"HTML",yaml:"YAML",yml:"YAML"};function ee(e){var a;const o=(a=e==null?void 0:e.split(/\s+/).find(f=>f.startsWith("language-")))==null?void 0:a.slice(9).toLowerCase();return o?Z[o]:void 0}const A="md-",B=["a","blockquote","br","code","del","em","h1","h2","h3","h4","h5","h6","hr","img","input","li","ol","p","picture","pre","section","source","strong","sup","table","tbody","td","th","thead","tr","ul"],ne={...H.defaultSchema,allowComments:!1,allowDoctypes:!1,ancestors:{...H.defaultSchema.ancestors,source:["picture"]},attributes:{"*":["dir","id","lang","title"],a:["ariaDescribedBy","ariaLabel","dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href","hrefLang"],code:[["className",/^language-[\w+-]+$/]],h2:[["className","sr-only"]],img:["alt","height","src","srcSet","width"],input:["checked",["disabled",!0],"readOnly",["type","checkbox"]],li:[["className","task-list-item"]],ol:["start",["className","contains-task-list"]],section:["dataFootnotes",["className","footnotes"]],source:["media","srcSet","type"],td:["align","colSpan","rowSpan"],th:["align","colSpan","rowSpan","scope"],ul:[["className","contains-task-list"]]},clobber:H.defaultSchema.clobber,clobberPrefix:A,strip:["script","style"],tagNames:[...B]};function re(e,o){const a=o.flags.replace(/[gy]/g,"");return new RegExp(o.source,a).test(e)}function te(e){if(!e)return null;try{const o=new URL(e);return o.protocol!=="http:"&&o.protocol!=="https:"||o.username||o.password?null:o}catch{return null}}function R(e,o,a){if(e.includes("\\")||/[\u0000-\u0020\u007f]/.test(e)||o===void 0)return;const f=/^[a-z][a-z\d+.-]*:/i.test(e),m=e.startsWith("//");if(o==="*")return!f&&!m||/^https?:/i.test(e)||m?e:void 0;const s=Array.isArray(o)?o:[o],t=te(a);try{let n=null;if(f?n=new URL(e):t&&(n=new URL(e,t)),!n||n.protocol!=="http:"&&n.protocol!=="https:"||n.username||n.password)return;const r=n.href;return s.some(c=>re(r,c))?r:void 0}catch{return}}function v(e,o,a){if(!e)return;const m=e.split(",").map(s=>{const t=s.trim().split(/\s+/),[n,r]=t,u=r===void 0||/^(?:\d+w|(?:\d+(?:\.\d+)?|\.\d+)x)$/.test(r);if(t.length>2||!u||n===void 0||n.length===0)return null;const c=R(n,o,a);return c?`${c}${r?` ${r}`:""}`:null});if(!m.some(s=>s===null))return m.join(", ")}function oe(){function e(o){o.children=o.children.filter(a=>a.type!=="element"||a.tagName!=="input"||a.position===void 0),o.children.forEach(a=>{a.type==="element"&&e(a)})}return o=>e(o)}function S(e,o){return Array.isArray(e)?e.map(a=>typeof a=="string"?`${o}${a}`:a):typeof e=="string"?e.split(/\s+/).map(a=>`${o}${a}`).join(" "):e}function se(e){const{clobberPrefix:o,prefix:a}=e;function f(m){if(m.type==="element"){const{properties:s}=m;s.id=S(s.id,a),s.name=S(s.name,a),s.ariaDescribedBy=S(s.ariaDescribedBy,a),s.ariaLabelledBy=S(s.ariaLabelledBy,a),typeof s.href=="string"&&s.href.startsWith("#")&&(s.href=`#${o}${a}${s.href.slice(1)}`)}"children"in m&&m.children.forEach(f)}return m=>f(m)}function C(e){return e==="center"||e==="left"||e==="right"?e:void 0}function E(e){return e.type==="text"?e.value:"children"in e?e.children.map(E).join(""):""}function T(e){return typeof e=="string"?e:void 0}function ie(e){if(!e)return null;const o=e.children.find(n=>n.type==="element"&&n.tagName==="code");if(!o||e.children.some(n=>n!==o&&(n.type!=="text"||n.value.trim().length>0)))return null;const f=o.properties.className;let m;Array.isArray(f)?m=f.join(" "):typeof f=="string"&&(m=f);const s=o.children.map(E).join("").replace(/\n$/,"");return{codeProps:{className:m,dir:T(o.properties.dir),id:T(o.properties.id),lang:T(o.properties.lang),title:T(o.properties.title)},content:s}}function ae(e,o,a,f,m){return{a:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsx("a",{...i,className:["nk-markdown__link",r].filter(Boolean).join(" "),onClick:m,children:n})},blockquote:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,...c}=t;return d.jsx("blockquote",{...c,className:"nk-markdown__blockquote",children:n})},code:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsx("code",{...i,className:["nk-markdown__inline-code",r].filter(Boolean).join(" "),children:n})},h1:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h1",className:["nk-markdown__heading",r].filter(Boolean).join(" "),size:"heading",weight:"semibold",children:n})},h2:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h2",className:["nk-markdown__heading",r!=null&&r.split(/\s+/).includes("sr-only")?"nk-markdown__visually-hidden":void 0].filter(Boolean).join(" "),size:"title",weight:"semibold",children:n})},h3:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h3",className:["nk-markdown__heading",r].filter(Boolean).join(" "),size:"subtitle",weight:"semibold",children:n})},h4:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h4",className:["nk-markdown__heading",r].filter(Boolean).join(" "),weight:"semibold",children:n})},h5:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h5",className:["nk-markdown__heading",r].filter(Boolean).join(" "),weight:"semibold",children:n})},h6:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,as:"h6",className:["nk-markdown__heading",r].filter(Boolean).join(" "),weight:"medium",children:n})},hr:function(t){const{dangerouslySetInnerHTML:n,node:r,...u}=t;return d.jsx(Q.Divider,{...u})},img:function(t){const{alt:n,className:r,dangerouslySetInnerHTML:u,node:c,src:i,srcSet:l,...b}=t,x=R(typeof i=="string"?i:"",e,o),L=v(l,e,o);return x?d.jsx("img",{...b,alt:n??"",className:["nk-markdown__image",r].filter(Boolean).join(" "),decoding:"async",loading:"lazy",src:x,srcSet:L}):n?d.jsx("span",{className:"nk-markdown__blocked-image",children:n}):null},input:function(t){const{checked:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsxs(d.Fragment,{children:[d.jsx("input",{...i,"aria-label":n?"Completed task":"Incomplete task",checked:n,className:["nk-markdown__task-control","nk-markdown__visually-hidden",r].filter(Boolean).join(" "),disabled:!0,readOnly:!0,type:"checkbox"}),d.jsx("span",{"aria-hidden":"true",className:"nk-markdown__task",children:n?"☒":"☐"})]})},li:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t,l=(r==null?void 0:r.split(/\s+/).includes("task-list-item"))??!1;return d.jsx("li",{...i,className:["nk-markdown__list-item",l?"nk-markdown__list-item--task":void 0].filter(Boolean).join(" "),children:n})},ol:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t,l=(r==null?void 0:r.split(/\s+/).includes("contains-task-list"))??!1;return d.jsx("ol",{...i,className:["nk-markdown__list","nk-markdown__list--ordered",l?"nk-markdown__list--tasks":void 0].filter(Boolean).join(" "),children:n})},p:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,ref:i,...l}=t;return d.jsx(k.Text,{...l,className:["nk-markdown__paragraph",r].filter(Boolean).join(" "),children:n})},picture:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t;return d.jsx("picture",{...i,className:["nk-markdown__picture",r].filter(Boolean).join(" "),children:n})},pre:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,ref:c,...i}=t,l=ie(u);return l?d.jsx(X.Code,{code:l.content,codeProps:l.codeProps,language:ee(l.codeProps.className),maxHighlightLength:a,maxLineCount:f,preProps:i}):d.jsx("pre",{...i,children:n})},source:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,srcSet:c,...i}=t,l=v(c,e,o);return l?d.jsx("source",{...i,srcSet:l}):null},table:function(t){const{children:n,dangerouslySetInnerHTML:r,frame:u,node:c,...i}=t;return d.jsx(_.Table,{...i,children:n})},tbody:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,...c}=t;return d.jsx(_.Table.Body,{...c,children:n})},td:function(t){const{align:n,children:r,dangerouslySetInnerHTML:u,node:c,style:i,...l}=t;return d.jsx(_.Table.Cell,{...l,align:C((i==null?void 0:i.textAlign)??n),children:r})},th:function(t){const{align:n,children:r,dangerouslySetInnerHTML:u,node:c,style:i,...l}=t;return d.jsx(_.Table.HeaderCell,{...l,align:C((i==null?void 0:i.textAlign)??n),children:r})},thead:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,...c}=t;return d.jsx(_.Table.Head,{...c,children:n})},tr:function(t){const{children:n,dangerouslySetInnerHTML:r,node:u,onClick:c,...i}=t;return d.jsx(_.Table.Row,{...i,children:n})},ul:function(t){const{children:n,className:r,dangerouslySetInnerHTML:u,node:c,...i}=t,l=(r==null?void 0:r.split(/\s+/).includes("contains-task-list"))??!1;return d.jsx("ul",{...i,className:["nk-markdown__list","nk-markdown__list--unordered",l?"nk-markdown__list--tasks":void 0].filter(Boolean).join(" "),children:n})}}}const le={clobberPrefix:""},ce=25e3,de="Markdown content exceeds the rendering limit.";function ue(e,o){if(!e.startsWith("#")||e.length===1)return null;let a=e.slice(1);try{a=decodeURIComponent(a)}catch{return null}return o.getElementById(a)}function me(e){const o=e.tabIndex<0&&!e.hasAttribute("tabindex");if(o&&e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}),!!o){if(e.ownerDocument.activeElement!==e){e.removeAttribute("tabindex");return}e.addEventListener("blur",()=>e.removeAttribute("tabindex"),{once:!0})}}function fe(e,o){const a=e,f=new a.HashChangeEvent("hashchange",{newURL:e.location.href,oldURL:o});e.dispatchEvent(f)}function he(e){return e===null?null:Number.isFinite(e)?Math.max(0,Math.floor(e)):0}const pe=M.forwardRef(function(o,a){const{allowedImageSources:f,anchorPrefix:m="",className:s,content:t,dangerouslySetInnerHTML:n,imageBaseUrl:r,maxCodeHighlightLength:u,maxCodeLineCount:c,maxContentLength:i=ce,rehypePlugins:l,remarkPlugins:b,scrollOffset:g=128,style:x,...L}=o,P=he(i),D=P!==null&&t.length>P,j=M.useCallback(h=>{var N;if(h.defaultPrevented||h.button!==0||h.metaKey||h.ctrlKey||h.shiftKey||h.altKey)return;const y=h.currentTarget.getAttribute("href");if(!y)return;const w=ue(y,h.currentTarget.ownerDocument);if(!w||typeof w.scrollIntoView!="function")return;const p=w.ownerDocument.defaultView;if(!p)return;h.preventDefault();const z=((N=p.matchMedia)==null?void 0:N.call(p,"(prefers-reduced-motion: reduce)").matches)??!1,F=g===null||z?"auto":"smooth",U=p.location.href,K=p.location.hash!==y;p.location.hash!==y&&p.history.pushState(p.history.state,"",y),me(w),w.scrollIntoView({behavior:F,block:"start"}),K&&fe(p,U)},[g]),O=M.useMemo(()=>ae(f,r,u,c,j),[f,j,r,u,c]),q=M.useMemo(()=>[J,...b??[]],[b]),$=M.useMemo(()=>[W,...l??[],oe,V,[se,{clobberPrefix:A,prefix:m}],[H,ne]],[m,l]),I={...x};if(g!==null){const h=Number.isFinite(g)?Math.max(0,g):0;I["--nk-markdown-scroll-offset"]=`${h}px`}return d.jsx("div",{...L,ref:a,className:["nk-markdown",s].filter(Boolean).join(" "),style:I,children:D?d.jsx(Y.Alert,{role:"alert",tone:"warning",children:de}):d.jsx(G,{allowedElements:B,components:O,rehypePlugins:$,remarkPlugins:q,remarkRehypeOptions:le,children:t})})});exports.default=pe;
package/dist/Markdown.js CHANGED
@@ -9,7 +9,7 @@ import ee from "remark-gfm";
9
9
  import { A as ne } from "./Alert-DQ5CCE0N.js";
10
10
  import { C as re } from "./Code-pROJjsiG.js";
11
11
  import { D as te } from "./Divider-DZgpYpr-.js";
12
- import { T as _ } from "./Table-vVaWCkk2.js";
12
+ import { T as _ } from "./Table-Dvi-4XA7.js";
13
13
  import { T as k } from "./Text-rN6iDo0V.js";
14
14
  const oe = {
15
15
  bash: "Shell",
package/dist/Modal.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("react"),g=require("./effects-D98vUn6N.cjs"),$=require("./reference-C2guRuR0.cjs"),G=require("./Button-DYn8YDP3.cjs"),r=require("./usePresence-Dm0mls5p.cjs"),H=require("./useFocusTrap-CrMcAu8s.cjs"),J=require("./useScrollLock-Dy8MZaSn.cjs"),K=require("./Surface-BttJYSDt.cjs"),Q=require("./Text-DWYlIcPj.cjs");function U(c,n,l){n.current=c,$.assignElementReference(l,c)}function V(c){const{"aria-label":n,"aria-labelledby":l,children:a,className:v,closeButtonLabel:f="Close modal",exitable:i=!0,forwardedReference:u,initialFocusReference:d,lockScroll:m=!0,onClose:e,open:o,ownerDocument:R,presenceState:k,restoreFocus:q=!0,role:F="dialog",style:I,title:b,trapFocus:S=!0,...P}=c,j=s.useRef(null),_=s.useRef(null),w=s.useContext(r.FocusScopeContext),B=`${s.useId()}-title`,[y,E]=s.useState(null),p=g.useBoundary("Modal").boundaryElement,x=r.useOverlayLayer(!0,p),M=s.useMemo(()=>[j],[]),h=!!(b!=null&&b.trim()),N=d??(h?_:void 0),O=l??(n===void 0&&h?B:void 0),T=s.useCallback(L=>{U(L,j,u),E(L)},[u]);g.useIsomorphicLayoutEffect(()=>{y&&(y.inert=!o)},[y,o]);const C=s.useCallback(()=>{e==null||e("escape")},[e]),z=s.useCallback(()=>{e==null||e("outside")},[e]);r.useDismissableLayer({boundary:p,active:o,boundaries:M,dismissOnEscape:i,dismissOnPointerDownOutside:i,layerId:x.id,onEscapeDismiss:C,onPointerDownOutsideDismiss:z,ownerDocument:R});const A=H.useFocusTrap({boundary:p,active:o&&S,container:y,initialFocusReference:N,layerId:x.id,restoreFocus:q});J.useScrollLock(m,R,p);const D=i?t.jsx(G.Button,{"aria-label":f,className:"nk-modal__close",icon:"cross",onClick:()=>e==null?void 0:e("close-button"),shape:"rectangle",type:"button",variant:"ghost"}):null;return t.jsx(r.FocusScopeContext.Provider,{value:o&&S?A:w,children:t.jsx("div",{className:"nk-modal__overlay","data-state":k,role:"presentation",style:{zIndex:x.zIndex},children:t.jsx("div",{className:"nk-modal__viewport",children:t.jsxs(K.Surface,{...P,ref:T,"aria-hidden":o?void 0:!0,"aria-label":o?n:void 0,"aria-labelledby":o?O:void 0,"aria-modal":o?"true":void 0,className:["nk-modal",v].filter(Boolean).join(" "),"data-state":k,role:o?F:void 0,style:I,tabIndex:-1,children:[h?t.jsxs("div",{className:"nk-modal__header",children:[t.jsx(Q.Text,{as:"h2",className:"nk-modal__title",id:B,ref:_,size:"subtitle",tabIndex:-1,weight:"semibold",children:b}),D]}):D,a]})})})})}const W=s.forwardRef(function(n,l){const{open:a}=n,v=g.useBoundary("Modal"),f=s.useRef(n);a&&(f.current=n);const i=a?n:f.current,u=r.usePresence(a),d=v.boundaryElement,m=(d==null?void 0:d.ownerDocument)??(typeof document>"u"?null:document);return!u.present||!m?null:t.jsx(r.Portal,{children:t.jsx(V,{...i,forwardedReference:l,open:a,ownerDocument:m,presenceState:u.state==="closing"?"closing":"open"})})});exports.default=W;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("react"),g=require("./effects-D98vUn6N.cjs"),$=require("./reference-C2guRuR0.cjs"),G=require("./Button-pinr6Woy.cjs"),r=require("./usePresence-Dm0mls5p.cjs"),H=require("./useFocusTrap-CrMcAu8s.cjs"),J=require("./useScrollLock-Dy8MZaSn.cjs"),K=require("./Surface-BttJYSDt.cjs"),Q=require("./Text-DWYlIcPj.cjs");function U(c,n,l){n.current=c,$.assignElementReference(l,c)}function V(c){const{"aria-label":n,"aria-labelledby":l,children:a,className:v,closeButtonLabel:f="Close modal",exitable:i=!0,forwardedReference:u,initialFocusReference:d,lockScroll:m=!0,onClose:e,open:o,ownerDocument:R,presenceState:k,restoreFocus:q=!0,role:F="dialog",style:I,title:b,trapFocus:S=!0,...P}=c,j=s.useRef(null),_=s.useRef(null),w=s.useContext(r.FocusScopeContext),B=`${s.useId()}-title`,[y,E]=s.useState(null),p=g.useBoundary("Modal").boundaryElement,x=r.useOverlayLayer(!0,p),M=s.useMemo(()=>[j],[]),h=!!(b!=null&&b.trim()),N=d??(h?_:void 0),O=l??(n===void 0&&h?B:void 0),T=s.useCallback(L=>{U(L,j,u),E(L)},[u]);g.useIsomorphicLayoutEffect(()=>{y&&(y.inert=!o)},[y,o]);const C=s.useCallback(()=>{e==null||e("escape")},[e]),z=s.useCallback(()=>{e==null||e("outside")},[e]);r.useDismissableLayer({boundary:p,active:o,boundaries:M,dismissOnEscape:i,dismissOnPointerDownOutside:i,layerId:x.id,onEscapeDismiss:C,onPointerDownOutsideDismiss:z,ownerDocument:R});const A=H.useFocusTrap({boundary:p,active:o&&S,container:y,initialFocusReference:N,layerId:x.id,restoreFocus:q});J.useScrollLock(m,R,p);const D=i?t.jsx(G.Button,{"aria-label":f,className:"nk-modal__close",icon:"cross",onClick:()=>e==null?void 0:e("close-button"),shape:"rectangle",type:"button",variant:"ghost"}):null;return t.jsx(r.FocusScopeContext.Provider,{value:o&&S?A:w,children:t.jsx("div",{className:"nk-modal__overlay","data-state":k,role:"presentation",style:{zIndex:x.zIndex},children:t.jsx("div",{className:"nk-modal__viewport",children:t.jsxs(K.Surface,{...P,ref:T,"aria-hidden":o?void 0:!0,"aria-label":o?n:void 0,"aria-labelledby":o?O:void 0,"aria-modal":o?"true":void 0,className:["nk-modal",v].filter(Boolean).join(" "),"data-state":k,role:o?F:void 0,style:I,tabIndex:-1,children:[h?t.jsxs("div",{className:"nk-modal__header",children:[t.jsx(Q.Text,{as:"h2",className:"nk-modal__title",id:B,ref:_,size:"subtitle",tabIndex:-1,weight:"semibold",children:b}),D]}):D,a]})})})})}const W=s.forwardRef(function(n,l){const{open:a}=n,v=g.useBoundary("Modal"),f=s.useRef(n);a&&(f.current=n);const i=a?n:f.current,u=r.usePresence(a),d=v.boundaryElement,m=(d==null?void 0:d.ownerDocument)??(typeof document>"u"?null:document);return!u.present||!m?null:t.jsx(r.Portal,{children:t.jsx(V,{...i,forwardedReference:l,open:a,ownerDocument:m,presenceState:u.state==="closing"?"closing":"open"})})});exports.default=W;
package/dist/Modal.js CHANGED
@@ -3,7 +3,7 @@ import { jsx as s, jsxs as _ } from "react/jsx-runtime";
3
3
  import { forwardRef as H, useRef as g, useContext as J, useId as K, useState as Q, useMemo as U, useCallback as h } from "react";
4
4
  import { u as E, a as V } from "./effects-DGbA6Q2O.js";
5
5
  import { a as W } from "./reference-CXMr27nM.js";
6
- import { B as X } from "./Button-yBHFKYew.js";
6
+ import { B as X } from "./Button-DdxB1ps7.js";
7
7
  import { b as Y, P as Z, F as w, c as ee, d as oe } from "./usePresence-BTRY1_l-.js";
8
8
  import { u as ae } from "./useFocusTrap-BxPazAL6.js";
9
9
  import { u as se } from "./useScrollLock-Drd7OZRC.js";