@helpdice/ui 1.6.8 → 1.7.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 (141) hide show
  1. package/dist/Placeholder/index.js +44 -23
  2. package/dist/auto-complete/auto-complete.d.ts +35 -3
  3. package/dist/auto-complete/index.js +45 -22
  4. package/dist/avatar/avatar.d.ts +2 -1
  5. package/dist/avatar/index.js +33 -13
  6. package/dist/badge/index.js +30 -11
  7. package/dist/breadcrumbs/index.js +31 -12
  8. package/dist/button/index.js +34 -14
  9. package/dist/button-dropdown/index.js +31 -12
  10. package/dist/button-group/index.js +30 -11
  11. package/dist/capacity/index.js +30 -11
  12. package/dist/card/index.js +31 -12
  13. package/dist/checkbox/index.js +31 -12
  14. package/dist/code/index.js +30 -11
  15. package/dist/code-block/index.d.ts +10 -0
  16. package/dist/col/index.js +21 -2
  17. package/dist/collapse/index.js +30 -11
  18. package/dist/css-baseline/index.js +24 -5
  19. package/dist/description/index.js +30 -11
  20. package/dist/display/index.js +30 -11
  21. package/dist/divider/index.js +30 -11
  22. package/dist/dot/index.js +30 -11
  23. package/dist/drawer/index.js +30 -11
  24. package/dist/fieldset/index.js +30 -11
  25. package/dist/grid/grid-container.d.ts +3 -3
  26. package/dist/grid/grid.d.ts +3 -3
  27. package/dist/grid/index.js +30 -11
  28. package/dist/image/index.js +31 -12
  29. package/dist/index.d.ts +4 -3
  30. package/dist/index.js +10994 -1501
  31. package/dist/input/index.js +36 -15
  32. package/dist/keyboard/index.js +30 -11
  33. package/dist/link/index.js +31 -12
  34. package/dist/list/index.d.ts +9 -0
  35. package/dist/list/index.js +1287 -0
  36. package/dist/list/list-item.d.ts +53 -0
  37. package/dist/list/list.d.ts +44 -0
  38. package/dist/loading/index.js +30 -11
  39. package/dist/menu/index.d.ts +2 -0
  40. package/dist/menu/index.js +10354 -0
  41. package/dist/menu/menu.d.ts +9 -0
  42. package/dist/modal/index.js +37 -16
  43. package/dist/note/index.js +30 -11
  44. package/dist/page/index.js +30 -11
  45. package/dist/pagination/index.js +30 -11
  46. package/dist/popover/index.js +30 -11
  47. package/dist/progress/index.js +30 -11
  48. package/dist/radio/index.js +30 -11
  49. package/dist/rating/index.js +31 -12
  50. package/dist/row/index.js +21 -2
  51. package/dist/search-bar/index.js +31 -12
  52. package/dist/select/index.js +33 -14
  53. package/dist/slider/index.js +30 -11
  54. package/dist/snippet/index.js +31 -12
  55. package/dist/spacer/index.js +30 -11
  56. package/dist/spinner/index.js +30 -11
  57. package/dist/table/index.d.ts +0 -1
  58. package/dist/table/index.js +1673 -2252
  59. package/dist/tabs/index.js +32 -13
  60. package/dist/tag/index.js +30 -11
  61. package/dist/text/child.d.ts +1 -1
  62. package/dist/text/index.js +44 -23
  63. package/dist/text/text.d.ts +2 -1
  64. package/dist/textarea/index.js +30 -11
  65. package/dist/toggle/index.js +30 -11
  66. package/dist/tooltip/index.js +30 -11
  67. package/dist/tree/index.js +21 -2
  68. package/dist/ui-provider/index.js +34 -14
  69. package/dist/use-scale/index.js +9 -9
  70. package/dist/user/index.js +34 -14
  71. package/dist/utils/collections.d.ts +1 -1
  72. package/esm/auto-complete/auto-complete.d.ts +35 -3
  73. package/esm/auto-complete/auto-complete.js +6 -6
  74. package/esm/avatar/avatar.d.ts +2 -1
  75. package/esm/avatar/avatar.js +3 -2
  76. package/esm/button/button-loading.js +1 -1
  77. package/esm/button/button.js +2 -1
  78. package/esm/button/styles.js +1 -1
  79. package/esm/button-dropdown/icon.js +1 -1
  80. package/esm/checkbox/checkbox.icon.js +1 -1
  81. package/esm/code-block/index.d.ts +10 -0
  82. package/esm/code-block/index.js +31 -27
  83. package/esm/css-baseline/css-baseline.js +3 -3
  84. package/esm/form/FormWrapper.js +4 -4
  85. package/esm/grid/grid-container.d.ts +3 -3
  86. package/esm/grid/grid.d.ts +3 -3
  87. package/esm/index.d.ts +4 -3
  88. package/esm/index.js +4 -4
  89. package/esm/input/input-block-label.js +1 -1
  90. package/esm/input/input-icon.js +1 -1
  91. package/esm/input/input.js +2 -1
  92. package/esm/input/password.js +2 -1
  93. package/esm/link/icon.js +1 -1
  94. package/esm/link/link.js +2 -2
  95. package/esm/list/index.d.ts +9 -0
  96. package/esm/list/index.js +8 -0
  97. package/esm/list/list-item.d.ts +53 -0
  98. package/esm/list/list-item.js +84 -0
  99. package/esm/list/list.d.ts +44 -0
  100. package/esm/list/list.js +29 -0
  101. package/esm/login-with/LoginSocialApple/index.js +17 -17
  102. package/esm/login-with/LoginSocialGithub/index.js +2 -2
  103. package/esm/login-with/LoginSocialInstagram/index.js +2 -2
  104. package/esm/login-with/LoginSocialLinkedin/index.js +2 -2
  105. package/esm/login-with/LoginSocialMicrosoft/index.js +2 -2
  106. package/esm/login-with/LoginSocialPinterest/index.js +9 -9
  107. package/esm/login-with/LoginSocialTiktok/index.js +2 -2
  108. package/esm/login-with/LoginSocialTwitter/index.js +11 -11
  109. package/esm/menu/index.d.ts +2 -0
  110. package/esm/menu/index.js +2 -0
  111. package/esm/menu/menu.d.ts +9 -0
  112. package/esm/menu/menu.js +92 -0
  113. package/esm/modal/modal-action.js +2 -1
  114. package/esm/modal/modal-actions.js +1 -1
  115. package/esm/rating/rating-icon.js +1 -1
  116. package/esm/select/select-icon.js +1 -1
  117. package/esm/select/select-input.js +1 -1
  118. package/esm/select/select-multiple-value.js +1 -1
  119. package/esm/snippet/snippet-icon.js +1 -1
  120. package/esm/table/index.d.ts +0 -1
  121. package/esm/table/index.js +0 -1
  122. package/esm/table/table-body.js +4 -23
  123. package/esm/tabs/tabs.js +2 -2
  124. package/esm/text/child.d.ts +1 -1
  125. package/esm/text/child.js +10 -10
  126. package/esm/text/text.d.ts +2 -1
  127. package/esm/text/text.js +4 -2
  128. package/esm/tooltip/__test__/index.test.js +30 -30
  129. package/esm/utils/collections.d.ts +1 -1
  130. package/esm/utils/collections.js +1 -1
  131. package/package.json +19 -12
  132. package/dist/cart/index.d.ts +0 -72
  133. package/dist/cart/useLocalStorage.d.ts +0 -1
  134. package/dist/table/data-table.d.ts +0 -44
  135. package/esm/cart/index.d.ts +0 -72
  136. package/esm/cart/index.js +0 -265
  137. package/esm/cart/useLocalStorage.d.ts +0 -1
  138. package/esm/cart/useLocalStorage.js +0 -29
  139. package/esm/table/data-table.d.ts +0 -44
  140. package/esm/table/data-table.js +0 -451
  141. /package/esm/utils/use-context-state/{create-geist-context.js → create-ui-context.js} +0 -0
@@ -615,11 +615,12 @@ function requireIndex () {
615
615
 
616
616
  // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
617
617
  // https://github.com/reactwg/react-18/discussions/110
618
- var useInsertionEffect = React__default["default"].useInsertionEffect || React__default["default"].useLayoutEffect;
618
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React$1.useLayoutEffect;
619
619
  var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
620
620
  function JSXStyle(props) {
621
621
  var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
622
- // If `registry` does not exist, we do nothing here.
622
+ var insertionEffectCalled = React$1.useRef(false);
623
+ // `registry` might not exist while server-side rendering
623
624
  if (!registry) {
624
625
  return null;
625
626
  }
@@ -628,6 +629,24 @@ function requireIndex () {
628
629
  return null;
629
630
  }
630
631
  useInsertionEffect(function() {
632
+ // ReactDOM removes all DOM during hydration in certain cases
633
+ if (!document.head) {
634
+ return;
635
+ }
636
+ registry.add(props);
637
+ insertionEffectCalled.current = true;
638
+ return function() {
639
+ insertionEffectCalled.current = false;
640
+ registry.remove(props);
641
+ };
642
+ }, [
643
+ props.id,
644
+ String(props.dynamic)
645
+ ]);
646
+ React$1.useLayoutEffect(function() {
647
+ if (!document.head || insertionEffectCalled.current) {
648
+ return;
649
+ }
631
650
  registry.add(props);
632
651
  return function() {
633
652
  registry.remove(props);
@@ -994,11 +994,12 @@ function requireIndex () {
994
994
 
995
995
  // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
996
996
  // https://github.com/reactwg/react-18/discussions/110
997
- var useInsertionEffect = React__default["default"].useInsertionEffect || React__default["default"].useLayoutEffect;
997
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React$1.useLayoutEffect;
998
998
  var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
999
999
  function JSXStyle(props) {
1000
1000
  var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
1001
- // If `registry` does not exist, we do nothing here.
1001
+ var insertionEffectCalled = React$1.useRef(false);
1002
+ // `registry` might not exist while server-side rendering
1002
1003
  if (!registry) {
1003
1004
  return null;
1004
1005
  }
@@ -1007,6 +1008,24 @@ function requireIndex () {
1007
1008
  return null;
1008
1009
  }
1009
1010
  useInsertionEffect(function() {
1011
+ // ReactDOM removes all DOM during hydration in certain cases
1012
+ if (!document.head) {
1013
+ return;
1014
+ }
1015
+ registry.add(props);
1016
+ insertionEffectCalled.current = true;
1017
+ return function() {
1018
+ insertionEffectCalled.current = false;
1019
+ registry.remove(props);
1020
+ };
1021
+ }, [
1022
+ props.id,
1023
+ String(props.dynamic)
1024
+ ]);
1025
+ React$1.useLayoutEffect(function() {
1026
+ if (!document.head || insertionEffectCalled.current) {
1027
+ return;
1028
+ }
1010
1029
  registry.add(props);
1011
1030
  return function() {
1012
1031
  registry.remove(props);
@@ -1250,7 +1269,7 @@ var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
1250
1269
  };
1251
1270
  var withScale = function withScale(Render) {
1252
1271
  var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1253
- var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33;
1272
+ var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
1254
1273
  var children = _ref.children,
1255
1274
  props = _objectWithoutProperties(_ref, _excluded$3);
1256
1275
  var _useTheme = useTheme(),
@@ -1310,14 +1329,14 @@ var withScale = function withScale(Render) {
1310
1329
  pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
1311
1330
  pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
1312
1331
  pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
1313
- px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
1314
- py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
1315
- mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
1316
- mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
1317
- mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
1318
- ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
1319
- mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
1320
- my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
1332
+ px: makeScaleHandler((_ref0 = (_ref1 = (_ref10 = (_ref11 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref11 !== void 0 ? _ref11 : paddingRight) !== null && _ref10 !== void 0 ? _ref10 : pl) !== null && _ref1 !== void 0 ? _ref1 : pr) !== null && _ref0 !== void 0 ? _ref0 : padding),
1333
+ py: makeScaleHandler((_ref12 = (_ref13 = (_ref14 = (_ref15 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref15 !== void 0 ? _ref15 : paddingBottom) !== null && _ref14 !== void 0 ? _ref14 : pt) !== null && _ref13 !== void 0 ? _ref13 : pb) !== null && _ref12 !== void 0 ? _ref12 : padding),
1334
+ mt: makeScaleHandler((_ref16 = (_ref17 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref17 !== void 0 ? _ref17 : my) !== null && _ref16 !== void 0 ? _ref16 : margin),
1335
+ mr: makeScaleHandler((_ref18 = (_ref19 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref19 !== void 0 ? _ref19 : mx) !== null && _ref18 !== void 0 ? _ref18 : margin),
1336
+ mb: makeScaleHandler((_ref20 = (_ref21 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref21 !== void 0 ? _ref21 : my) !== null && _ref20 !== void 0 ? _ref20 : margin),
1337
+ ml: makeScaleHandler((_ref22 = (_ref23 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref23 !== void 0 ? _ref23 : mx) !== null && _ref22 !== void 0 ? _ref22 : margin),
1338
+ mx: makeScaleHandler((_ref24 = (_ref25 = (_ref26 = (_ref27 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref27 !== void 0 ? _ref27 : marginRight) !== null && _ref26 !== void 0 ? _ref26 : ml) !== null && _ref25 !== void 0 ? _ref25 : mr) !== null && _ref24 !== void 0 ? _ref24 : margin),
1339
+ my: makeScaleHandler((_ref28 = (_ref29 = (_ref30 = (_ref31 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref31 !== void 0 ? _ref31 : marginBottom) !== null && _ref30 !== void 0 ? _ref30 : mt) !== null && _ref29 !== void 0 ? _ref29 : mb) !== null && _ref28 !== void 0 ? _ref28 : margin),
1321
1340
  width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
1322
1341
  height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
1323
1342
  font: makeScaleHandler(font)
@@ -1480,7 +1499,7 @@ var ButtonLoading = function ButtonLoading(_ref) {
1480
1499
  id: "212623367"
1481
1500
  }, ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"));
1482
1501
  };
1483
- ButtonLoading.displayName = 'GeistButtonLoading';
1502
+ ButtonLoading.displayName = 'ButtonLoading';
1484
1503
 
1485
1504
  var _excluded$1 = ["isRight", "isSingle", "children", "className"];
1486
1505
  var ButtonIcon = function ButtonIcon(_ref) {
@@ -1687,7 +1706,7 @@ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _col
1687
1706
  color: 'white'
1688
1707
  }
1689
1708
  };
1690
- var withoutLightType = _color.replace('-light', '');
1709
+ var withoutLightType = _color === null || _color === void 0 ? void 0 : _color.replace('-light', '');
1691
1710
  return colors[withoutLightType] || null;
1692
1711
  };
1693
1712
  var getButtonHoverColors = function getButtonHoverColors(palette, props) {
@@ -1780,7 +1799,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
1780
1799
  var buttonRef = React.useRef(null);
1781
1800
  React.useImperativeHandle(ref, function () {
1782
1801
  return buttonRef.current;
1783
- });
1802
+ }); // Changed with !
1803
+
1784
1804
  var _useState = React.useState(false),
1785
1805
  _useState2 = _slicedToArray(_useState, 2),
1786
1806
  dripShow = _useState2[0],
@@ -492,7 +492,7 @@ var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
492
492
  };
493
493
  var withScale = function withScale(Render) {
494
494
  var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
495
- var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33;
495
+ var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
496
496
  var children = _ref.children,
497
497
  props = _objectWithoutProperties(_ref, _excluded);
498
498
  var _useTheme = useTheme(),
@@ -552,14 +552,14 @@ var withScale = function withScale(Render) {
552
552
  pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
553
553
  pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
554
554
  pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
555
- px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
556
- py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
557
- mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
558
- mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
559
- mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
560
- ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
561
- mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
562
- my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
555
+ px: makeScaleHandler((_ref0 = (_ref1 = (_ref10 = (_ref11 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref11 !== void 0 ? _ref11 : paddingRight) !== null && _ref10 !== void 0 ? _ref10 : pl) !== null && _ref1 !== void 0 ? _ref1 : pr) !== null && _ref0 !== void 0 ? _ref0 : padding),
556
+ py: makeScaleHandler((_ref12 = (_ref13 = (_ref14 = (_ref15 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref15 !== void 0 ? _ref15 : paddingBottom) !== null && _ref14 !== void 0 ? _ref14 : pt) !== null && _ref13 !== void 0 ? _ref13 : pb) !== null && _ref12 !== void 0 ? _ref12 : padding),
557
+ mt: makeScaleHandler((_ref16 = (_ref17 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref17 !== void 0 ? _ref17 : my) !== null && _ref16 !== void 0 ? _ref16 : margin),
558
+ mr: makeScaleHandler((_ref18 = (_ref19 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref19 !== void 0 ? _ref19 : mx) !== null && _ref18 !== void 0 ? _ref18 : margin),
559
+ mb: makeScaleHandler((_ref20 = (_ref21 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref21 !== void 0 ? _ref21 : my) !== null && _ref20 !== void 0 ? _ref20 : margin),
560
+ ml: makeScaleHandler((_ref22 = (_ref23 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref23 !== void 0 ? _ref23 : mx) !== null && _ref22 !== void 0 ? _ref22 : margin),
561
+ mx: makeScaleHandler((_ref24 = (_ref25 = (_ref26 = (_ref27 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref27 !== void 0 ? _ref27 : marginRight) !== null && _ref26 !== void 0 ? _ref26 : ml) !== null && _ref25 !== void 0 ? _ref25 : mr) !== null && _ref24 !== void 0 ? _ref24 : margin),
562
+ my: makeScaleHandler((_ref28 = (_ref29 = (_ref30 = (_ref31 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref31 !== void 0 ? _ref31 : marginBottom) !== null && _ref30 !== void 0 ? _ref30 : mt) !== null && _ref29 !== void 0 ? _ref29 : mb) !== null && _ref28 !== void 0 ? _ref28 : margin),
563
563
  width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
564
564
  height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
565
565
  font: makeScaleHandler(font)
@@ -651,11 +651,12 @@ function requireIndex () {
651
651
 
652
652
  // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
653
653
  // https://github.com/reactwg/react-18/discussions/110
654
- var useInsertionEffect = React__default["default"].useInsertionEffect || React__default["default"].useLayoutEffect;
654
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React$1.useLayoutEffect;
655
655
  var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
656
656
  function JSXStyle(props) {
657
657
  var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
658
- // If `registry` does not exist, we do nothing here.
658
+ var insertionEffectCalled = React$1.useRef(false);
659
+ // `registry` might not exist while server-side rendering
659
660
  if (!registry) {
660
661
  return null;
661
662
  }
@@ -664,6 +665,24 @@ function requireIndex () {
664
665
  return null;
665
666
  }
666
667
  useInsertionEffect(function() {
668
+ // ReactDOM removes all DOM during hydration in certain cases
669
+ if (!document.head) {
670
+ return;
671
+ }
672
+ registry.add(props);
673
+ insertionEffectCalled.current = true;
674
+ return function() {
675
+ insertionEffectCalled.current = false;
676
+ registry.remove(props);
677
+ };
678
+ }, [
679
+ props.id,
680
+ String(props.dynamic)
681
+ ]);
682
+ React$1.useLayoutEffect(function() {
683
+ if (!document.head || insertionEffectCalled.current) {
684
+ return;
685
+ }
667
686
  registry.add(props);
668
687
  return function() {
669
688
  registry.remove(props);
@@ -1049,7 +1068,7 @@ var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
1049
1068
  };
1050
1069
  var withScale = function withScale(Render) {
1051
1070
  var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1052
- var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33;
1071
+ var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
1053
1072
  var children = _ref.children,
1054
1073
  props = _objectWithoutProperties(_ref, _excluded$4);
1055
1074
  var _useTheme = useTheme(),
@@ -1109,14 +1128,14 @@ var withScale = function withScale(Render) {
1109
1128
  pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
1110
1129
  pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
1111
1130
  pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
1112
- px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
1113
- py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
1114
- mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
1115
- mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
1116
- mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
1117
- ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
1118
- mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
1119
- my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
1131
+ px: makeScaleHandler((_ref0 = (_ref1 = (_ref10 = (_ref11 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref11 !== void 0 ? _ref11 : paddingRight) !== null && _ref10 !== void 0 ? _ref10 : pl) !== null && _ref1 !== void 0 ? _ref1 : pr) !== null && _ref0 !== void 0 ? _ref0 : padding),
1132
+ py: makeScaleHandler((_ref12 = (_ref13 = (_ref14 = (_ref15 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref15 !== void 0 ? _ref15 : paddingBottom) !== null && _ref14 !== void 0 ? _ref14 : pt) !== null && _ref13 !== void 0 ? _ref13 : pb) !== null && _ref12 !== void 0 ? _ref12 : padding),
1133
+ mt: makeScaleHandler((_ref16 = (_ref17 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref17 !== void 0 ? _ref17 : my) !== null && _ref16 !== void 0 ? _ref16 : margin),
1134
+ mr: makeScaleHandler((_ref18 = (_ref19 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref19 !== void 0 ? _ref19 : mx) !== null && _ref18 !== void 0 ? _ref18 : margin),
1135
+ mb: makeScaleHandler((_ref20 = (_ref21 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref21 !== void 0 ? _ref21 : my) !== null && _ref20 !== void 0 ? _ref20 : margin),
1136
+ ml: makeScaleHandler((_ref22 = (_ref23 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref23 !== void 0 ? _ref23 : mx) !== null && _ref22 !== void 0 ? _ref22 : margin),
1137
+ mx: makeScaleHandler((_ref24 = (_ref25 = (_ref26 = (_ref27 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref27 !== void 0 ? _ref27 : marginRight) !== null && _ref26 !== void 0 ? _ref26 : ml) !== null && _ref25 !== void 0 ? _ref25 : mr) !== null && _ref24 !== void 0 ? _ref24 : margin),
1138
+ my: makeScaleHandler((_ref28 = (_ref29 = (_ref30 = (_ref31 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref31 !== void 0 ? _ref31 : marginBottom) !== null && _ref30 !== void 0 ? _ref30 : mt) !== null && _ref29 !== void 0 ? _ref29 : mb) !== null && _ref28 !== void 0 ? _ref28 : margin),
1120
1139
  width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
1121
1140
  height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
1122
1141
  font: makeScaleHandler(font)
@@ -1167,7 +1186,7 @@ var useClasses = function useClasses() {
1167
1186
  return classes.trim();
1168
1187
  };
1169
1188
 
1170
- var _excluded$3 = ["src", "stacked", "text", "isSquare", "className"];
1189
+ var _excluded$3 = ["src", "stacked", "text", "isSquare", "className", "children"];
1171
1190
 
1172
1191
  // type NativeAttrs = Omit<
1173
1192
  // Partial<React.ImgHTMLAttributes<any> & React.HTMLAttributes<any>>,
@@ -1188,6 +1207,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
1188
1207
  isSquare = _ref$isSquare === void 0 ? false : _ref$isSquare,
1189
1208
  _ref$className = _ref.className,
1190
1209
  className = _ref$className === void 0 ? '' : _ref$className,
1210
+ children = _ref.children,
1191
1211
  props = _objectWithoutProperties(_ref, _excluded$3);
1192
1212
  var theme = useTheme();
1193
1213
  var _useScale = useScale(),
@@ -1206,7 +1226,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
1206
1226
  className: _JSXStyle.dynamic([["2295275975", [theme.palette.accents_2, radius, theme.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-img")
1207
1227
  })), showText && /*#__PURE__*/React.createElement("span", _extends({}, props, {
1208
1228
  className: _JSXStyle.dynamic([["2295275975", [theme.palette.accents_2, radius, theme.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-text")
1209
- }), safeText(text)), /*#__PURE__*/React.createElement(_JSXStyle, {
1229
+ }), text ? safeText(text) : children), /*#__PURE__*/React.createElement(_JSXStyle, {
1210
1230
  id: "2295275975",
1211
1231
  dynamic: [theme.palette.accents_2, radius, theme.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]
1212
1232
  }, ".avatar.__jsx-style-dynamic-selector{display:inline-block;position:relative;overflow:hidden;border:1px solid ".concat(theme.palette.accents_2, ";border-radius:").concat(radius, ";vertical-align:top;background-color:").concat(theme.palette.background, ";box-sizing:border-box;width:").concat(SCALES.width(1.75) || SCALES.height(1.75), ";height:").concat(SCALES.height(1.75) || SCALES.width(1.75), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(marginLeft, ";}.avatar-img.__jsx-style-dynamic-selector{display:inline-block;object-fit:cover;width:100%;height:100%;border-radius:").concat(radius, ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.avatar-text.__jsx-style-dynamic-selector{position:absolute;left:50%;top:50%;font-size:").concat(SCALES.font(1), ";text-align:center;-webkit-transform:translate(-50%,-50%) scale(0.65);-ms-transform:translate(-50%,-50%) scale(0.65);transform:translate(-50%,-50%) scale(0.65);white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")));
@@ -1299,7 +1319,7 @@ var LinkIconComponent = function LinkIconComponent() {
1299
1319
  id: "3409194595"
1300
1320
  }, ".icon.jsx-3409194595{margin:0 0 -1px 0.1875em;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;color:currentColor;}"));
1301
1321
  };
1302
- LinkIconComponent.displayName = 'GeistLinkIcon';
1322
+ LinkIconComponent.displayName = 'LinkIcon';
1303
1323
  var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
1304
1324
 
1305
1325
  var hexToRgb = function hexToRgb(color) {
@@ -9,7 +9,7 @@ export declare const setChildrenProps: (children: ReactNode | undefined, props:
9
9
  export declare const setChildrenIndex: (children: ReactNode | undefined, targetComponents?: Array<React.ElementType>) => ReactNode | undefined;
10
10
  export declare const getReactNode: (node?: React.ReactNode | (() => React.ReactNode)) => React.ReactNode;
11
11
  export declare const isChildElement: (parent: Element | null | undefined, child: Element | null | undefined) => boolean;
12
- export declare const isGeistElement: (el?: HTMLElement) => boolean;
12
+ export declare const isUiElement: (el?: HTMLElement) => boolean;
13
13
  export declare const isBrowser: () => boolean;
14
14
  export declare const isMac: () => boolean;
15
15
  export declare const isCSSNumberValue: (value?: string | number) => boolean;
@@ -27,7 +27,39 @@ interface Props {
27
27
  }
28
28
  type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof Props>;
29
29
  export type AutoCompleteProps = Props & NativeAttrs & ReactElement;
30
- declare const AutoCompleteComponent: React.ForwardRefExoticComponent<Props & NativeAttrs & React.ReactElement<any, string | React.JSXElementConstructor<any>> & {
30
+ declare const AutoComplete: React.ForwardRefExoticComponent<Omit<Props & NativeAttrs & React.ReactElement<any, string | React.JSXElementConstructor<any>> & {
31
31
  children?: React.ReactNode | undefined;
32
- } & React.RefAttributes<HTMLInputElement>>;
33
- export default AutoCompleteComponent;
32
+ } & React.RefAttributes<HTMLInputElement> & {
33
+ width?: string | number;
34
+ height?: string | number;
35
+ padding?: string | number;
36
+ margin?: string | number;
37
+ w?: string | number;
38
+ h?: string | number;
39
+ paddingLeft?: string | number;
40
+ paddingRight?: string | number;
41
+ paddingTop?: string | number;
42
+ paddingBottom?: string | number;
43
+ pl?: string | number;
44
+ pr?: string | number;
45
+ pt?: string | number;
46
+ pb?: string | number;
47
+ marginLeft?: string | number;
48
+ marginRight?: string | number;
49
+ marginTop?: string | number;
50
+ marginBottom?: string | number;
51
+ ml?: string | number;
52
+ mr?: string | number;
53
+ mt?: string | number;
54
+ mb?: string | number;
55
+ px?: string | number;
56
+ py?: string | number;
57
+ mx?: string | number;
58
+ my?: string | number;
59
+ font?: string | number;
60
+ unit?: string;
61
+ scale?: number;
62
+ children?: any;
63
+ className?: string;
64
+ } & React.InputHTMLAttributes<any>, "ref"> & React.RefAttributes<unknown>>;
65
+ export default AutoComplete;
@@ -15,7 +15,7 @@ import { AutoCompleteContext } from './auto-complete-context';
15
15
  import Loading from '../loading';
16
16
  import { pickChild } from '../utils/collections';
17
17
  import useCurrentState from '../utils/use-current-state';
18
- import useScale from '../use-scale';
18
+ import useScale, { withScale } from '../use-scale';
19
19
  import { ArrowRight } from '@helpdice/icons';
20
20
  var childrenToOptionsNode = function childrenToOptionsNode(options) {
21
21
  return options.map(function (item, index) {
@@ -66,7 +66,7 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
66
66
  disableFreeSolo = _ref$disableFreeSolo === void 0 ? false : _ref$disableFreeSolo,
67
67
  getPopupContainer = _ref.getPopupContainer,
68
68
  props = _objectWithoutProperties(_ref, _excluded);
69
- var resetTimer = useRef();
69
+ var resetTimer = useRef(0); // DEFAULT Value 0
70
70
  var _useScale = useScale(),
71
71
  SCALES = _useScale.SCALES,
72
72
  getScaleProps = _useScale.getScaleProps;
@@ -87,7 +87,8 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
87
87
  setVisible = _useState4[1];
88
88
  useImperativeHandle(userRef, function () {
89
89
  return inputRef.current;
90
- });
90
+ }); // Chnaged using !
91
+
91
92
  var _pickChild = pickChild(children, AutoCompleteSearching),
92
93
  _pickChild2 = _slicedToArray(_pickChild, 2),
93
94
  searchChild = _pickChild2[1];
@@ -201,6 +202,5 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
201
202
  }, ".auto-complete.__jsx-style-dynamic-selector{width:".concat(SCALES.width(1, 'max-content'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.auto-complete.__jsx-style-dynamic-selector .loading{width:-webkit-max-content;width:-moz-max-content;width:max-content;}"))));
202
203
  });
203
204
  AutoCompleteComponent.displayName = 'AutoComplete';
204
- // const AutoComplete = withScale(AutoCompleteComponent)
205
-
206
- export default AutoCompleteComponent;
205
+ var AutoComplete = withScale(AutoCompleteComponent);
206
+ export default AutoComplete;
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  interface Props {
3
3
  src?: string;
4
4
  stacked?: boolean;
5
5
  text?: string;
6
6
  isSquare?: boolean;
7
7
  className?: string;
8
+ children?: ReactNode;
8
9
  }
9
10
  export type AvatarProps = Props;
10
11
  declare const Avatar: React.ForwardRefExoticComponent<Props & {
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["src", "stacked", "text", "isSquare", "className"];
3
+ var _excluded = ["src", "stacked", "text", "isSquare", "className", "children"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  /* "use client" */
6
6
 
@@ -28,6 +28,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
28
28
  isSquare = _ref$isSquare === void 0 ? false : _ref$isSquare,
29
29
  _ref$className = _ref.className,
30
30
  className = _ref$className === void 0 ? '' : _ref$className,
31
+ children = _ref.children,
31
32
  props = _objectWithoutProperties(_ref, _excluded);
32
33
  var theme = useTheme();
33
34
  var _useScale = useScale(),
@@ -46,7 +47,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
46
47
  className: _JSXStyle.dynamic([["2295275975", [theme.palette.accents_2, radius, theme.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-img")
47
48
  })), showText && /*#__PURE__*/React.createElement("span", _extends({}, props, {
48
49
  className: _JSXStyle.dynamic([["2295275975", [theme.palette.accents_2, radius, theme.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-text")
49
- }), safeText(text)), /*#__PURE__*/React.createElement(_JSXStyle, {
50
+ }), text ? safeText(text) : children), /*#__PURE__*/React.createElement(_JSXStyle, {
50
51
  id: "2295275975",
51
52
  dynamic: [theme.palette.accents_2, radius, theme.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]
52
53
  }, ".avatar.__jsx-style-dynamic-selector{display:inline-block;position:relative;overflow:hidden;border:1px solid ".concat(theme.palette.accents_2, ";border-radius:").concat(radius, ";vertical-align:top;background-color:").concat(theme.palette.background, ";box-sizing:border-box;width:").concat(SCALES.width(1.75) || SCALES.height(1.75), ";height:").concat(SCALES.height(1.75) || SCALES.width(1.75), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(marginLeft, ";}.avatar-img.__jsx-style-dynamic-selector{display:inline-block;object-fit:cover;width:100%;height:100%;border-radius:").concat(radius, ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.avatar-text.__jsx-style-dynamic-selector{position:absolute;left:50%;top:50%;font-size:").concat(SCALES.font(1), ";text-align:center;-webkit-transform:translate(-50%,-50%) scale(0.65);-ms-transform:translate(-50%,-50%) scale(0.65);transform:translate(-50%,-50%) scale(0.65);white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")));
@@ -11,5 +11,5 @@ var ButtonLoading = function ButtonLoading(_ref) {
11
11
  id: "212623367"
12
12
  }, ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"));
13
13
  };
14
- ButtonLoading.displayName = 'GeistButtonLoading';
14
+ ButtonLoading.displayName = 'ButtonLoading';
15
15
  export default ButtonLoading;
@@ -21,7 +21,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
21
21
  var buttonRef = useRef(null);
22
22
  useImperativeHandle(ref, function () {
23
23
  return buttonRef.current;
24
- });
24
+ }); // Changed with !
25
+
25
26
  var _useState = useState(false),
26
27
  _useState2 = _slicedToArray(_useState, 2),
27
28
  dripShow = _useState2[0],
@@ -102,7 +102,7 @@ export var getButtonGhostHoverColors = function getButtonGhostHoverColors(palett
102
102
  color: 'white'
103
103
  }
104
104
  };
105
- var withoutLightType = _color.replace('-light', '');
105
+ var withoutLightType = _color === null || _color === void 0 ? void 0 : _color.replace('-light', '');
106
106
  return colors[withoutLightType] || null;
107
107
  };
108
108
  export var getButtonHoverColors = function getButtonHoverColors(palette, props) {
@@ -24,5 +24,5 @@ var ButtonDropdownIcon = function ButtonDropdownIcon(_ref) {
24
24
  id: "3359574434"
25
25
  }, "svg.jsx-3359574434{-webkit-transform:scale(0.6);-ms-transform:scale(0.6);transform:scale(0.6);}"));
26
26
  };
27
- ButtonDropdownIcon.displayName = 'GeistButtonDropdownIcon';
27
+ ButtonDropdownIcon.displayName = 'ButtonDropdownIcon';
28
28
  export default ButtonDropdownIcon;
@@ -41,6 +41,6 @@ var CheckboxIconComponent = function CheckboxIconComponent(_ref) {
41
41
  dynamic: [disabled ? 0.4 : 1, disabled ? 'not-allowed' : 'pointer']
42
42
  }, "svg.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(0.86 * var(--checkbox-size));height:calc(0.86 * var(--checkbox-size));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:".concat(disabled ? 0.4 : 1, ";cursor:").concat(disabled ? 'not-allowed' : 'pointer', ";}")));
43
43
  };
44
- CheckboxIconComponent.displayName = 'GeistCheckboxIcon';
44
+ CheckboxIconComponent.displayName = 'CheckboxIcon';
45
45
  var CheckboxIcon = /*#__PURE__*/React.memo(CheckboxIconComponent);
46
46
  export default CheckboxIcon;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ type CodeProps = {
3
+ code: string;
4
+ language: string;
5
+ style?: any;
6
+ wrapLines?: boolean;
7
+ showLineNumbers?: boolean;
8
+ };
9
+ declare const CodeBlock: React.FC<CodeProps>;
10
+ export default CodeBlock;
@@ -1,29 +1,33 @@
1
- // /* "use client" */
1
+ /* "use client" */
2
2
 
3
- // import * as React from "react";
3
+ import * as React from "react";
4
4
  // import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
5
- // import { dracula } from 'react-syntax-highlighter/dist/cjs/styles/prism';
6
-
7
- // type CodeProps = {
8
- // code: string;
9
- // language: string;
10
- // style?: any;
11
- // wrapLines?: boolean;
12
- // showLineNumbers?: boolean;
13
- // };
14
-
15
- // const CodeBlock: React.FC<CodeProps> = ({ code, language, wrapLines = true, showLineNumbers = true }) => {
16
- // return (
17
- // <SyntaxHighlighter
18
- // lineProps={{ style: { wordBreak: 'break-all', whiteSpace: 'pre-wrap' } }}
19
- // language={language}
20
- // style={dracula}
21
- // wrapLines={wrapLines}
22
- // wrapLongLines={wrapLines}
23
- // showLineNumbers={showLineNumbers}
24
- // showInlineLineNumbers={false}
25
- // >{code}</SyntaxHighlighter>
26
- // );
27
- // };
28
-
29
- // export default CodeBlock;
5
+ // import type { SyntaxHighlighterProps } from "react-syntax-highlighter";
6
+ import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism';
7
+ import { dracula } from "react-syntax-highlighter/dist/esm/styles/prism";
8
+ var SyntaxHighlighterAny = SyntaxHighlighter;
9
+ var CodeBlock = function CodeBlock(_ref) {
10
+ var code = _ref.code,
11
+ language = _ref.language,
12
+ _ref$wrapLines = _ref.wrapLines,
13
+ wrapLines = _ref$wrapLines === void 0 ? true : _ref$wrapLines,
14
+ _ref$showLineNumbers = _ref.showLineNumbers,
15
+ showLineNumbers = _ref$showLineNumbers === void 0 ? true : _ref$showLineNumbers,
16
+ _ref$style = _ref.style,
17
+ style = _ref$style === void 0 ? dracula : _ref$style;
18
+ return /*#__PURE__*/React.createElement(SyntaxHighlighterAny, {
19
+ language: language,
20
+ style: style,
21
+ wrapLines: wrapLines,
22
+ wrapLongLines: wrapLines,
23
+ showLineNumbers: showLineNumbers,
24
+ showInlineLineNumbers: false,
25
+ lineProps: {
26
+ style: {
27
+ wordBreak: "break-all",
28
+ whiteSpace: "pre-wrap"
29
+ }
30
+ }
31
+ }, code);
32
+ };
33
+ export default CodeBlock;
@@ -12,9 +12,9 @@ var CssBaseline = function CssBaseline(_ref) {
12
12
  var children = _ref.children;
13
13
  var theme = useTheme();
14
14
  return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(_JSXStyle, {
15
- id: "1328723699",
16
- dynamic: [theme.palette.background, theme.palette.foreground, theme.palette.background, theme.font.sans, theme.font.sans, theme.palette.link, theme.expressiveness.linkStyle, theme.expressiveness.linkHoverStyle, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gap, theme.palette.foreground, theme.palette.accents_4, theme.palette.code, theme.font.mono, theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.palette.accents_2, theme.layout.radius, theme.font.mono, theme.palette.foreground, theme.palette.accents_2, theme.palette.accents_1, theme.layout.gap, theme.layout.gap, theme.palette.accents_5, theme.palette.accents_1, theme.layout.radius, theme.palette.border, theme.palette.selection, theme.palette.foreground]
17
- }, "html,body{background-color:".concat(theme.palette.background, ";color:").concat(theme.palette.foreground, ";}html{font-size:16px;--helpdice-icons-background:").concat(theme.palette.background, ";}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.5;margin:0;padding:0;min-height:100%;position:relative;overflow-x:hidden;font-family:").concat(theme.font.sans, ";}#__next{overflow-x:hidden;}*,*:before,*:after{box-sizing:inherit;text-rendering:geometricPrecision;-webkit-tap-highlight-color:transparent;}p,small{font-weight:400;color:inherit;-webkit-letter-spacing:-0.005625em;-moz-letter-spacing:-0.005625em;-ms-letter-spacing:-0.005625em;letter-spacing:-0.005625em;font-family:").concat(theme.font.sans, ";}p{margin:1em 0;font-size:1em;line-height:1.625em;}small{margin:0;line-height:1.5;font-size:0.875em;}b{font-weight:600;}span{font-size:inherit;color:inherit;font-weight:inherit;}img{max-width:100%;}a{cursor:pointer;font-size:inherit;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-box-align:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.link, ";-webkit-text-decoration:").concat(theme.expressiveness.linkStyle, ";text-decoration:").concat(theme.expressiveness.linkStyle, ";}a:hover{-webkit-text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";}ul,ol{padding:0;list-style-type:none;margin:").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gap, ";color:").concat(theme.palette.foreground, ";}ol{list-style-type:decimal;}li{margin-bottom:0.625em;font-size:1em;line-height:1.625em;}ul li:before{content:'\u2013';display:inline-block;color:").concat(theme.palette.accents_4, ";position:absolute;margin-left:-0.9375em;}h1,h2,h3,h4,h5,h6{color:inherit;margin:0 0 0.7rem 0;}h1{font-size:3rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;line-height:1.5;font-weight:700;}h2{font-size:2.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h3{font-size:1.5rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h4{font-size:1.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h5{font-size:1rem;-webkit-letter-spacing:-0.01em;-moz-letter-spacing:-0.01em;-ms-letter-spacing:-0.01em;letter-spacing:-0.01em;font-weight:600;}h6{font-size:0.875rem;-webkit-letter-spacing:-0.005em;-moz-letter-spacing:-0.005em;-ms-letter-spacing:-0.005em;letter-spacing:-0.005em;font-weight:600;}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;margin:0;}button:focus,input:focus,select:focus,textarea:focus{outline:none;}code{color:").concat(theme.palette.code, ";font-family:").concat(theme.font.mono, ";font-size:0.9em;white-space:pre-wrap;}code:before,code:after{content:'\\`';}pre{padding:calc(").concat(theme.layout.gap, " * 0.9) ").concat(theme.layout.gap, ";margin:").concat(theme.layout.gap, " 0;border:1px solid ").concat(theme.palette.accents_2, ";border-radius:").concat(theme.layout.radius, ";font-family:").concat(theme.font.mono, ";white-space:pre;overflow:auto;line-height:1.5;text-align:left;font-size:14px;-webkit-overflow-scrolling:touch;}pre code{color:").concat(theme.palette.foreground, ";font-size:1em;line-height:1.25em;white-space:pre;}pre code:before,pre code:after{display:none;}pre p{margin:0;}pre::-webkit-scrollbar{display:none;width:0;height:0;background:transparent;}hr{border-color:").concat(theme.palette.accents_2, ";}details{background-color:").concat(theme.palette.accents_1, ";border:none;}details:focus,details:hover,details:active{outline:none;}summary{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;list-style:none;outline:none;}summary::marker,summary::before,summary::-webkit-details-marker{display:none;}summary::-moz-list-bullet{font-size:0;}summary:focus,summary:hover,summary:active{outline:none;list-style:none;}blockquote{padding:calc(0.667 * ").concat(theme.layout.gap, ") ").concat(theme.layout.gap, ";color:").concat(theme.palette.accents_5, ";background-color:").concat(theme.palette.accents_1, ";border-radius:").concat(theme.layout.radius, ";margin:1.5em 0;border:1px solid ").concat(theme.palette.border, ";}blockquote *:first-child{margin-top:0;}blockquote *:last-child{margin-bottom:0;}::selection{background-color:").concat(theme.palette.selection, ";color:").concat(theme.palette.foreground, ";}")));
15
+ id: "3647548829",
16
+ dynamic: [theme.palette.background, theme.palette.foreground, theme.palette.background, theme.font.sans, theme.font.sans, theme.palette.link, theme.expressiveness.linkStyle, theme.expressiveness.linkHoverStyle, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gap, theme.palette.foreground, theme.palette.code, theme.font.mono, theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.palette.accents_2, theme.layout.radius, theme.font.mono, theme.palette.foreground, theme.palette.accents_2, theme.palette.accents_1, theme.layout.gap, theme.layout.gap, theme.palette.accents_5, theme.palette.accents_1, theme.layout.radius, theme.palette.border, theme.palette.selection, theme.palette.foreground]
17
+ }, "html,body{background-color:".concat(theme.palette.background, ";color:").concat(theme.palette.foreground, ";}html{font-size:16px;--helpdice-icons-background:").concat(theme.palette.background, ";}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.5;margin:0;padding:0;min-height:100%;position:relative;overflow-x:hidden;font-family:").concat(theme.font.sans, ";}#__next{overflow-x:hidden;}*,*:before,*:after{box-sizing:inherit;text-rendering:geometricPrecision;-webkit-tap-highlight-color:transparent;}p,small{font-weight:400;color:inherit;-webkit-letter-spacing:-0.005625em;-moz-letter-spacing:-0.005625em;-ms-letter-spacing:-0.005625em;letter-spacing:-0.005625em;font-family:").concat(theme.font.sans, ";}p{margin:1em 0;font-size:1em;line-height:1.625em;}small{margin:0;line-height:1.5;font-size:0.875em;}b{font-weight:600;}span{font-size:inherit;color:inherit;font-weight:inherit;}img{max-width:100%;}a{cursor:pointer;font-size:inherit;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-box-align:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.link, ";-webkit-text-decoration:").concat(theme.expressiveness.linkStyle, ";text-decoration:").concat(theme.expressiveness.linkStyle, ";}a:hover{-webkit-text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";}ul,ol{padding:0;list-style-type:none;margin:").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gap, ";color:").concat(theme.palette.foreground, ";}ol{list-style-type:decimal;}li{margin-bottom:0.625em;font-size:1em;line-height:1.625em;}h1,h2,h3,h4,h5,h6{color:inherit;margin:0 0 0.7rem 0;}h1{font-size:3rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;line-height:1.5;font-weight:700;}h2{font-size:2.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h3{font-size:1.5rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h4{font-size:1.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h5{font-size:1rem;-webkit-letter-spacing:-0.01em;-moz-letter-spacing:-0.01em;-ms-letter-spacing:-0.01em;letter-spacing:-0.01em;font-weight:600;}h6{font-size:0.875rem;-webkit-letter-spacing:-0.005em;-moz-letter-spacing:-0.005em;-ms-letter-spacing:-0.005em;letter-spacing:-0.005em;font-weight:600;}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;margin:0;}button:focus,input:focus,select:focus,textarea:focus{outline:none;}code{color:").concat(theme.palette.code, ";font-family:").concat(theme.font.mono, ";font-size:0.9em;white-space:pre-wrap;}code:before,code:after{content:'\\`';}pre{padding:calc(").concat(theme.layout.gap, " * 0.9) ").concat(theme.layout.gap, ";margin:").concat(theme.layout.gap, " 0;border:1px solid ").concat(theme.palette.accents_2, ";border-radius:").concat(theme.layout.radius, ";font-family:").concat(theme.font.mono, ";white-space:pre;overflow:auto;line-height:1.5;text-align:left;font-size:14px;-webkit-overflow-scrolling:touch;}pre code{color:").concat(theme.palette.foreground, ";font-size:1em;line-height:1.25em;white-space:pre;}pre code:before,pre code:after{display:none;}pre p{margin:0;}pre::-webkit-scrollbar{display:none;width:0;height:0;background:transparent;}hr{border-color:").concat(theme.palette.accents_2, ";}details{background-color:").concat(theme.palette.accents_1, ";border:none;}details:focus,details:hover,details:active{outline:none;}summary{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;list-style:none;outline:none;}summary::marker,summary::before,summary::-webkit-details-marker{display:none;}summary::-moz-list-bullet{font-size:0;}summary:focus,summary:hover,summary:active{outline:none;list-style:none;}blockquote{padding:calc(0.667 * ").concat(theme.layout.gap, ") ").concat(theme.layout.gap, ";color:").concat(theme.palette.accents_5, ";background-color:").concat(theme.palette.accents_1, ";border-radius:").concat(theme.layout.radius, ";margin:1.5em 0;border:1px solid ").concat(theme.palette.border, ";}blockquote *:first-child{margin-top:0;}blockquote *:last-child{margin-bottom:0;}::selection{background-color:").concat(theme.palette.selection, ";color:").concat(theme.palette.foreground, ";}")));
18
18
  };
19
19
  var MemoCssBaseline = /*#__PURE__*/React.memo(CssBaseline);
20
20
  // MemoCssBaseline.flush = flush.StyleRegistry