@helpdice/ui 2.5.8-beta.0 → 2.5.9

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 (126) hide show
  1. package/dist/auto-complete/index.js +549 -491
  2. package/dist/avatar/index.js +82 -45
  3. package/dist/badge/index.js +69 -27
  4. package/dist/breadcrumbs/index.js +107 -56
  5. package/dist/button/button.icon.d.ts +3 -15
  6. package/dist/button/button.small.d.ts +3 -15
  7. package/dist/button/index.js +143 -155
  8. package/dist/button-dropdown/index.js +96 -83
  9. package/dist/button-group/index.js +61 -21
  10. package/dist/capacity/index.js +61 -22
  11. package/dist/card/index.js +147 -123
  12. package/dist/carousal/index.js +349 -328
  13. package/dist/checkbox/index.js +72 -67
  14. package/dist/circular-progress/CircularProgress.d.ts +17 -0
  15. package/dist/circular-progress/index.d.ts +3 -4
  16. package/dist/circular-progress/index.js +713 -336
  17. package/dist/circular-progress/useCircularProgress.d.ts +12 -0
  18. package/dist/code/index.js +70 -26
  19. package/dist/col/index.js +61 -24
  20. package/dist/collapse/index.js +102 -52
  21. package/dist/container/index.js +187 -188
  22. package/dist/copy-to-clipboard/index.js +158 -208
  23. package/dist/description/index.js +64 -23
  24. package/dist/display/index.js +64 -23
  25. package/dist/divider/index.js +62 -22
  26. package/dist/dot/index.js +63 -23
  27. package/dist/drawer/index.js +74 -61
  28. package/dist/fieldset/index.js +127 -63
  29. package/dist/form/index.js +15 -40
  30. package/dist/grid/index.js +74 -29
  31. package/dist/html-renderer/index.js +3 -2
  32. package/dist/image/index.js +163 -104
  33. package/dist/index.d.ts +2 -1
  34. package/dist/index.js +4172 -3745
  35. package/dist/input/index.js +466 -419
  36. package/dist/keyboard/index.js +73 -29
  37. package/dist/linear-progress/index.js +27 -24
  38. package/dist/link/index.js +78 -36
  39. package/dist/list/index.js +118 -63
  40. package/dist/loadable/index.js +76 -27
  41. package/dist/loading/index.js +70 -29
  42. package/dist/menu/index.js +53 -47
  43. package/dist/modal/index.js +225 -178
  44. package/dist/note/index.js +64 -23
  45. package/dist/notetip/index.js +54 -45
  46. package/dist/notetip/note-tip.d.ts +2 -0
  47. package/dist/page/index.js +102 -51
  48. package/dist/pagination/index.js +180 -123
  49. package/dist/placeholder/index.js +545 -534
  50. package/dist/popover/index.js +94 -81
  51. package/dist/progress/index.js +66 -27
  52. package/dist/radio/index.js +94 -48
  53. package/dist/rating/index.js +78 -38
  54. package/dist/row/index.js +62 -25
  55. package/dist/search-bar/index.js +172 -162
  56. package/dist/select/index.js +364 -327
  57. package/dist/slider/index.js +91 -47
  58. package/dist/snippet/index.js +39 -39
  59. package/dist/spacer/index.js +58 -19
  60. package/dist/spinner/index.js +69 -28
  61. package/dist/swipe/index.js +28 -13
  62. package/dist/table/index.js +2216 -1973
  63. package/dist/table/table-body.d.ts +4 -2
  64. package/dist/table/table-cell.d.ts +4 -2
  65. package/dist/table/table-types.d.ts +2 -0
  66. package/dist/table/table.d.ts +4 -1
  67. package/dist/tabs/index.js +61 -59
  68. package/dist/tag/index.js +16 -20
  69. package/dist/text/index.js +178 -180
  70. package/dist/textarea/index.js +220 -214
  71. package/dist/toggle/index.js +75 -33
  72. package/dist/tooltip/index.d.ts +1 -2
  73. package/dist/tooltip/index.js +59 -52
  74. package/dist/tooltip/tooltip-content.d.ts +1 -1
  75. package/dist/tooltip/tooltip.d.ts +2 -1
  76. package/dist/tree/index.js +176 -115
  77. package/dist/use-scale/index.js +50 -13
  78. package/dist/user/index.js +146 -96
  79. package/esm/button/button.icon.d.ts +3 -15
  80. package/esm/button/button.icon.js +22 -22
  81. package/esm/button/button.js +4 -4
  82. package/esm/button/button.small.d.ts +3 -15
  83. package/esm/button/button.small.js +20 -21
  84. package/esm/circular-progress/CircularProgress.d.ts +17 -0
  85. package/esm/circular-progress/CircularProgress.js +110 -0
  86. package/esm/circular-progress/index.d.ts +3 -4
  87. package/esm/circular-progress/index.js +3 -4
  88. package/esm/circular-progress/useCircularProgress.d.ts +12 -0
  89. package/esm/circular-progress/useCircularProgress.js +35 -0
  90. package/esm/index.d.ts +2 -1
  91. package/esm/index.js +1 -1
  92. package/esm/list/list-item.js +11 -11
  93. package/esm/notetip/note-tip.d.ts +2 -0
  94. package/esm/notetip/note-tip.js +8 -5
  95. package/esm/skeleton/index.js +9 -4
  96. package/esm/table/table-body.d.ts +4 -2
  97. package/esm/table/table-body.js +9 -4
  98. package/esm/table/table-cell.d.ts +4 -2
  99. package/esm/table/table-cell.js +19 -3
  100. package/esm/table/table-types.d.ts +2 -0
  101. package/esm/table/table.d.ts +4 -1
  102. package/esm/table/table.js +13 -6
  103. package/esm/tooltip/index.d.ts +1 -2
  104. package/esm/tooltip/tooltip-content.d.ts +1 -1
  105. package/esm/tooltip/tooltip-content.js +5 -5
  106. package/esm/tooltip/tooltip.d.ts +2 -1
  107. package/esm/tooltip/tooltip.js +6 -5
  108. package/package.json +3 -3
  109. package/dist/circular-progress/CircularProgressbar.d.ts +0 -10
  110. package/dist/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
  111. package/dist/circular-progress/Path.d.ts +0 -9
  112. package/dist/circular-progress/buildStyles.d.ts +0 -12
  113. package/dist/circular-progress/constants.d.ts +0 -5
  114. package/dist/circular-progress/types.d.ts +0 -50
  115. package/esm/circular-progress/CircularProgressbar.d.ts +0 -10
  116. package/esm/circular-progress/CircularProgressbar.js +0 -118
  117. package/esm/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
  118. package/esm/circular-progress/CircularProgressbarWithChildren.js +0 -32
  119. package/esm/circular-progress/Path.d.ts +0 -9
  120. package/esm/circular-progress/Path.js +0 -52
  121. package/esm/circular-progress/buildStyles.d.ts +0 -12
  122. package/esm/circular-progress/buildStyles.js +0 -45
  123. package/esm/circular-progress/constants.d.ts +0 -5
  124. package/esm/circular-progress/constants.js +0 -5
  125. package/esm/circular-progress/types.d.ts +0 -50
  126. package/esm/circular-progress/types.js +0 -1
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
6
  var theme = require('@helpdice/theme');
7
+ var jsxRuntime = require('react/jsx-runtime');
7
8
 
8
9
  function _arrayLikeToArray(r, a) {
9
10
  (null == a || a > r.length) && (a = r.length);
@@ -58,14 +59,34 @@ function _createForOfIteratorHelper(r, e) {
58
59
  }
59
60
  };
60
61
  }
61
- function _extends() {
62
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
63
- for (var e = 1; e < arguments.length; e++) {
64
- var t = arguments[e];
65
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
66
- }
67
- return n;
68
- }, _extends.apply(null, arguments);
62
+ function _defineProperty(e, r, t) {
63
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
64
+ value: t,
65
+ enumerable: true,
66
+ configurable: true,
67
+ writable: true
68
+ }) : e[r] = t, e;
69
+ }
70
+ function ownKeys(e, r) {
71
+ var t = Object.keys(e);
72
+ if (Object.getOwnPropertySymbols) {
73
+ var o = Object.getOwnPropertySymbols(e);
74
+ r && (o = o.filter(function (r) {
75
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
76
+ })), t.push.apply(t, o);
77
+ }
78
+ return t;
79
+ }
80
+ function _objectSpread2(e) {
81
+ for (var r = 1; r < arguments.length; r++) {
82
+ var t = null != arguments[r] ? arguments[r] : {};
83
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
84
+ _defineProperty(e, r, t[r]);
85
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
86
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
87
+ });
88
+ }
89
+ return e;
69
90
  }
70
91
  function _objectWithoutProperties(e, t) {
71
92
  if (null == e) return {};
@@ -87,6 +108,20 @@ function _objectWithoutPropertiesLoose(r, e) {
87
108
  }
88
109
  return t;
89
110
  }
111
+ function _toPrimitive(t, r) {
112
+ if ("object" != typeof t || !t) return t;
113
+ var e = t[Symbol.toPrimitive];
114
+ if (void 0 !== e) {
115
+ var i = e.call(t, r);
116
+ if ("object" != typeof i) return i;
117
+ throw new TypeError("@@toPrimitive must return a primitive value.");
118
+ }
119
+ return ("string" === r ? String : Number)(t);
120
+ }
121
+ function _toPropertyKey(t) {
122
+ var i = _toPrimitive(t, "string");
123
+ return "symbol" == typeof i ? i : i + "";
124
+ }
90
125
  function _unsupportedIterableToArray(r, a) {
91
126
  if (r) {
92
127
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
@@ -810,11 +845,13 @@ var withScale = function withScale(Render) {
810
845
  getScaleProps: generateGetScaleProps(props),
811
846
  getAllScaleProps: generateGetAllScaleProps(props)
812
847
  };
813
- return /*#__PURE__*/React.createElement(ScaleContext.Provider, {
814
- value: value
815
- }, /*#__PURE__*/React.createElement(Render, _extends({}, props, {
816
- ref: ref
817
- }), children));
848
+ return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
849
+ value: value,
850
+ children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
851
+ ref: ref,
852
+ children: children
853
+ }))
854
+ });
818
855
  });
819
856
  ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
820
857
  return ScaleFC;
@@ -837,22 +874,29 @@ var KeyboardComponent = function KeyboardComponent(_ref) {
837
874
  var theme$1 = theme.useTheme();
838
875
  var _useScale = useScale(),
839
876
  SCALES = _useScale.SCALES;
840
- return /*#__PURE__*/React.createElement("kbd", _extends({}, props, {
841
- className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || className || "")
842
- }), command && /*#__PURE__*/React.createElement("span", {
843
- className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
844
- }, "\u2318"), shift && /*#__PURE__*/React.createElement("span", {
845
- className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
846
- }, "\u21E7"), option && /*#__PURE__*/React.createElement("span", {
847
- className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
848
- }, "\u2325"), ctrl && /*#__PURE__*/React.createElement("span", {
849
- className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
850
- }, "\u2303"), children && /*#__PURE__*/React.createElement("span", {
851
- className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
852
- }, children), /*#__PURE__*/React.createElement(_JSXStyle, {
853
- id: "921453049",
854
- dynamic: [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]
855
- }, "kbd.__jsx-style-dynamic-selector{line-height:2em;text-align:center;display:inline-block;color:".concat(theme$1.palette.accents_5, ";background-color:").concat(theme$1.palette.accents_1, ";font-family:").concat(theme$1.font.sans, ";border-radius:").concat(theme$1.layout.radius, ";border:1px solid ").concat(theme$1.palette.accents_2, ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";min-width:2em;min-height:2em;padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.34), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.34), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}span.__jsx-style-dynamic-selector{line-height:2em;font-size:1em;text-align:center;}span.__jsx-style-dynamic-selector+span.__jsx-style-dynamic-selector{margin-left:0.3em;}")));
877
+ return /*#__PURE__*/jsxRuntime.jsxs("kbd", _objectSpread2(_objectSpread2({}, props), {}, {
878
+ className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || className || ""),
879
+ children: [command && /*#__PURE__*/jsxRuntime.jsx("span", {
880
+ className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
881
+ children: "\u2318"
882
+ }), shift && /*#__PURE__*/jsxRuntime.jsx("span", {
883
+ className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
884
+ children: "\u21E7"
885
+ }), option && /*#__PURE__*/jsxRuntime.jsx("span", {
886
+ className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
887
+ children: "\u2325"
888
+ }), ctrl && /*#__PURE__*/jsxRuntime.jsx("span", {
889
+ className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
890
+ children: "\u2303"
891
+ }), children && /*#__PURE__*/jsxRuntime.jsx("span", {
892
+ className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
893
+ children: children
894
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
895
+ id: "921453049",
896
+ dynamic: [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)],
897
+ children: "kbd.__jsx-style-dynamic-selector{line-height:2em;text-align:center;display:inline-block;color:".concat(theme$1.palette.accents_5, ";background-color:").concat(theme$1.palette.accents_1, ";font-family:").concat(theme$1.font.sans, ";border-radius:").concat(theme$1.layout.radius, ";border:1px solid ").concat(theme$1.palette.accents_2, ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";min-width:2em;min-height:2em;padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.34), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.34), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}span.__jsx-style-dynamic-selector{line-height:2em;font-size:1em;text-align:center;}span.__jsx-style-dynamic-selector+span.__jsx-style-dynamic-selector{margin-left:0.3em;}")
898
+ })]
899
+ }));
856
900
  };
857
901
  KeyboardComponent.displayName = 'Keyboard';
858
902
  var Keyboard = withScale(KeyboardComponent);
@@ -2,7 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var React = require('react');
5
+ var require$$1 = require('react');
6
+ var jsxRuntime = require('react/jsx-runtime');
6
7
 
7
8
  function getDefaultExportFromCjs (x) {
8
9
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -15,11 +16,11 @@ var hasRequiredIndex;
15
16
  function requireIndex () {
16
17
  if (hasRequiredIndex) return index;
17
18
  hasRequiredIndex = 1;
18
- var React$1 = React;
19
+ var React = require$$1;
19
20
 
20
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
22
 
22
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
23
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
24
 
24
25
  /*
25
26
  Based on Glamor's sheet
@@ -455,15 +456,15 @@ function requireIndex () {
455
456
  throw new Error("StyleSheetRegistry: " + message + ".");
456
457
  }
457
458
  }
458
- var StyleSheetContext = /*#__PURE__*/ React$1.createContext(null);
459
+ var StyleSheetContext = /*#__PURE__*/ React.createContext(null);
459
460
  StyleSheetContext.displayName = "StyleSheetContext";
460
461
  function createStyleRegistry() {
461
462
  return new StyleSheetRegistry();
462
463
  }
463
464
  function StyleRegistry(param) {
464
465
  var configuredRegistry = param.registry, children = param.children;
465
- var rootRegistry = React$1.useContext(StyleSheetContext);
466
- var ref = React$1.useState(function() {
466
+ var rootRegistry = React.useContext(StyleSheetContext);
467
+ var ref = React.useState(function() {
467
468
  return rootRegistry || configuredRegistry || createStyleRegistry();
468
469
  }), registry = ref[0];
469
470
  return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
@@ -471,16 +472,16 @@ function requireIndex () {
471
472
  }, children);
472
473
  }
473
474
  function useStyleRegistry() {
474
- return React$1.useContext(StyleSheetContext);
475
+ return React.useContext(StyleSheetContext);
475
476
  }
476
477
 
477
478
  // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
478
479
  // https://github.com/reactwg/react-18/discussions/110
479
- var useInsertionEffect = React__default["default"].useInsertionEffect || React$1.useLayoutEffect;
480
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React.useLayoutEffect;
480
481
  var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
481
482
  function JSXStyle(props) {
482
483
  var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
483
- var insertionEffectCalled = React$1.useRef(false);
484
+ var insertionEffectCalled = React.useRef(false);
484
485
  // `registry` might not exist while server-side rendering
485
486
  if (!registry) {
486
487
  return null;
@@ -504,7 +505,7 @@ function requireIndex () {
504
505
  props.id,
505
506
  String(props.dynamic)
506
507
  ]);
507
- React$1.useLayoutEffect(function() {
508
+ React.useLayoutEffect(function() {
508
509
  if (!document.head || insertionEffectCalled.current) {
509
510
  return;
510
511
  }
@@ -557,20 +558,22 @@ var LinearProgress = function LinearProgress(_ref) {
557
558
  speed = _ref$speed === void 0 ? 1.5 : _ref$speed;
558
559
  if (!isActive) return null;
559
560
  var isDeterminate = typeof progress === 'number' && progress >= 0 && progress <= 100;
560
- return /*#__PURE__*/React.createElement("div", {
561
- className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "loader-wrapper"
562
- }, isDeterminate ? /*#__PURE__*/React.createElement("div", {
563
- style: {
564
- width: "".concat(progress, "%"),
565
- backgroundColor: color
566
- },
567
- className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "determinate-bar"
568
- }) : /*#__PURE__*/React.createElement("div", {
569
- className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "indeterminate-loader"
570
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
571
- id: "2900495535",
572
- dynamic: [color, speed]
573
- }, ".loader-wrapper.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;width:100%;height:4px;background:rgba(0,0,0,0.05);z-index:2000;overflow:hidden;}.determinate-bar.__jsx-style-dynamic-selector{height:100%;-webkit-transition:width 0.3s ease;transition:width 0.3s ease;}.indeterminate-loader.__jsx-style-dynamic-selector{width:100%;height:100%;background:linear-gradient( to right, transparent 0%, ".concat(color, " 50%, transparent 100% );background-size:200% 100%;-webkit-animation:slide-__jsx-style-dynamic-selector ").concat(speed, "s linear infinite;animation:slide-__jsx-style-dynamic-selector ").concat(speed, "s linear infinite;}@-webkit-keyframes slide-__jsx-style-dynamic-selector{from{background-position:-100% 0;}to{background-position:100% 0;}}@keyframes slide-__jsx-style-dynamic-selector{from{background-position:-100% 0;}to{background-position:100% 0;}}")));
561
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
562
+ className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "loader-wrapper",
563
+ children: [isDeterminate ? /*#__PURE__*/jsxRuntime.jsx("div", {
564
+ style: {
565
+ width: "".concat(progress, "%"),
566
+ backgroundColor: color
567
+ },
568
+ className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "determinate-bar"
569
+ }) : /*#__PURE__*/jsxRuntime.jsx("div", {
570
+ className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "indeterminate-loader"
571
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
572
+ id: "2900495535",
573
+ dynamic: [color, speed],
574
+ children: ".loader-wrapper.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;width:100%;height:4px;background:rgba(0,0,0,0.05);z-index:2000;overflow:hidden;}.determinate-bar.__jsx-style-dynamic-selector{height:100%;-webkit-transition:width 0.3s ease;transition:width 0.3s ease;}.indeterminate-loader.__jsx-style-dynamic-selector{width:100%;height:100%;background:linear-gradient( to right, transparent 0%, ".concat(color, " 50%, transparent 100% );background-size:200% 100%;-webkit-animation:slide-__jsx-style-dynamic-selector ").concat(speed, "s linear infinite;animation:slide-__jsx-style-dynamic-selector ").concat(speed, "s linear infinite;}@-webkit-keyframes slide-__jsx-style-dynamic-selector{from{background-position:-100% 0;}to{background-position:100% 0;}}@keyframes slide-__jsx-style-dynamic-selector{from{background-position:-100% 0;}to{background-position:100% 0;}}")
575
+ })]
576
+ });
574
577
  };
575
578
 
576
579
  exports.default = LinearProgress;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
6
  var theme = require('@helpdice/theme');
7
+ var jsxRuntime = require('react/jsx-runtime');
7
8
 
8
9
  function _arrayLikeToArray(r, a) {
9
10
  (null == a || a > r.length) && (a = r.length);
@@ -61,14 +62,13 @@ function _createForOfIteratorHelper(r, e) {
61
62
  }
62
63
  };
63
64
  }
64
- function _extends() {
65
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
66
- for (var e = 1; e < arguments.length; e++) {
67
- var t = arguments[e];
68
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
69
- }
70
- return n;
71
- }, _extends.apply(null, arguments);
65
+ function _defineProperty(e, r, t) {
66
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
67
+ value: t,
68
+ enumerable: true,
69
+ configurable: true,
70
+ writable: true
71
+ }) : e[r] = t, e;
72
72
  }
73
73
  function _iterableToArrayLimit(r, l) {
74
74
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
@@ -97,6 +97,27 @@ function _iterableToArrayLimit(r, l) {
97
97
  function _nonIterableRest() {
98
98
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
99
99
  }
100
+ function ownKeys(e, r) {
101
+ var t = Object.keys(e);
102
+ if (Object.getOwnPropertySymbols) {
103
+ var o = Object.getOwnPropertySymbols(e);
104
+ r && (o = o.filter(function (r) {
105
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
106
+ })), t.push.apply(t, o);
107
+ }
108
+ return t;
109
+ }
110
+ function _objectSpread2(e) {
111
+ for (var r = 1; r < arguments.length; r++) {
112
+ var t = null != arguments[r] ? arguments[r] : {};
113
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
114
+ _defineProperty(e, r, t[r]);
115
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
116
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
117
+ });
118
+ }
119
+ return e;
120
+ }
100
121
  function _objectWithoutProperties(e, t) {
101
122
  if (null == e) return {};
102
123
  var o,
@@ -120,6 +141,20 @@ function _objectWithoutPropertiesLoose(r, e) {
120
141
  function _slicedToArray(r, e) {
121
142
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
122
143
  }
144
+ function _toPrimitive(t, r) {
145
+ if ("object" != typeof t || !t) return t;
146
+ var e = t[Symbol.toPrimitive];
147
+ if (void 0 !== e) {
148
+ var i = e.call(t, r);
149
+ if ("object" != typeof i) return i;
150
+ throw new TypeError("@@toPrimitive must return a primitive value.");
151
+ }
152
+ return ("string" === r ? String : Number)(t);
153
+ }
154
+ function _toPropertyKey(t) {
155
+ var i = _toPrimitive(t, "string");
156
+ return "symbol" == typeof i ? i : i + "";
157
+ }
123
158
  function _unsupportedIterableToArray(r, a) {
124
159
  if (r) {
125
160
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
@@ -672,7 +707,7 @@ var styleExports = requireStyle();
672
707
  var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
673
708
 
674
709
  var LinkIconComponent = function LinkIconComponent() {
675
- return /*#__PURE__*/React.createElement("svg", {
710
+ return /*#__PURE__*/jsxRuntime.jsxs("svg", {
676
711
  viewBox: "0 0 24 24",
677
712
  width: "0.9375em",
678
713
  height: "0.9375em",
@@ -682,19 +717,21 @@ var LinkIconComponent = function LinkIconComponent() {
682
717
  strokeLinejoin: "round",
683
718
  fill: "none",
684
719
  shapeRendering: "geometricPrecision",
685
- className: "jsx-3409194595" + " " + "icon"
686
- }, /*#__PURE__*/React.createElement("path", {
687
- d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6",
688
- className: "jsx-3409194595"
689
- }), /*#__PURE__*/React.createElement("path", {
690
- d: "M15 3h6v6",
691
- className: "jsx-3409194595"
692
- }), /*#__PURE__*/React.createElement("path", {
693
- d: "M10 14L21 3",
694
- className: "jsx-3409194595"
695
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
696
- id: "3409194595"
697
- }, ".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;}"));
720
+ className: "jsx-3409194595" + " " + "icon",
721
+ children: [/*#__PURE__*/jsxRuntime.jsx("path", {
722
+ d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6",
723
+ className: "jsx-3409194595"
724
+ }), /*#__PURE__*/jsxRuntime.jsx("path", {
725
+ d: "M15 3h6v6",
726
+ className: "jsx-3409194595"
727
+ }), /*#__PURE__*/jsxRuntime.jsx("path", {
728
+ d: "M10 14L21 3",
729
+ className: "jsx-3409194595"
730
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
731
+ id: "3409194595",
732
+ children: ".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;}"
733
+ })]
734
+ });
698
735
  };
699
736
  LinkIconComponent.displayName = 'LinkIcon';
700
737
  var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
@@ -906,11 +943,13 @@ var withScale = function withScale(Render) {
906
943
  getScaleProps: generateGetScaleProps(props),
907
944
  getAllScaleProps: generateGetAllScaleProps(props)
908
945
  };
909
- return /*#__PURE__*/React.createElement(ScaleContext.Provider, {
910
- value: value
911
- }, /*#__PURE__*/React.createElement(Render, _extends({}, props, {
912
- ref: ref
913
- }), children));
946
+ return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
947
+ value: value,
948
+ children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
949
+ ref: ref,
950
+ children: children
951
+ }))
952
+ });
914
953
  });
915
954
  ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
916
955
  return ScaleFC;
@@ -942,17 +981,20 @@ var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
942
981
  var classes = theme.useClasses('link', {
943
982
  block: block
944
983
  }, className);
945
- return /*#__PURE__*/React.createElement("a", _extends({
984
+ return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
946
985
  href: href
947
- }, props, {
986
+ }, props), {}, {
948
987
  ref: ref,
949
- className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || "")
950
- }), icon && icon, /*#__PURE__*/React.createElement("span", {
951
- className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + "link-extra"
952
- }, children, arrow && /*#__PURE__*/React.createElement(LinkIcon, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
953
- id: "1962988967",
954
- dynamic: [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]
955
- }, ".link.__jsx-style-dynamic-selector,.link-extra.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme$1.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")));
988
+ className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || ""),
989
+ children: [icon && icon, /*#__PURE__*/jsxRuntime.jsxs("span", {
990
+ className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + "link-extra",
991
+ children: [children, arrow && /*#__PURE__*/jsxRuntime.jsx(LinkIcon, {})]
992
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
993
+ id: "1962988967",
994
+ dynamic: [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor],
995
+ children: ".link.__jsx-style-dynamic-selector,.link-extra.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme$1.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")
996
+ })]
997
+ }));
956
998
  });
957
999
  LinkComponent.displayName = 'Link';
958
1000
  var Link = withScale(LinkComponent);