@helpdice/ui 2.5.4 → 2.5.8

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/auto-complete/index.js +1273 -404
  2. package/dist/avatar/index.js +88 -49
  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 -16
  6. package/dist/button/button.small.d.ts +3 -16
  7. package/dist/button/index.js +143 -157
  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 -330
  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 -190
  22. package/dist/copy-to-clipboard/index.js +158 -210
  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 +5240 -4755
  35. package/dist/input/index.js +1183 -277
  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 +181 -124
  49. package/dist/placeholder/index.js +554 -538
  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 +1098 -163
  57. package/dist/select/select.d.ts +2 -0
  58. package/dist/slider/index.js +91 -47
  59. package/dist/snippet/index.js +39 -39
  60. package/dist/spacer/index.js +58 -19
  61. package/dist/spinner/index.js +69 -28
  62. package/dist/swipe/index.js +28 -13
  63. package/dist/table/index.js +4162 -3863
  64. package/dist/table/table-body.d.ts +4 -3
  65. package/dist/table/table-cell.d.ts +4 -2
  66. package/dist/table/table-types.d.ts +2 -0
  67. package/dist/table/table.d.ts +5 -1
  68. package/dist/tabs/index.js +61 -59
  69. package/dist/tag/index.js +16 -20
  70. package/dist/text/index.js +187 -184
  71. package/dist/text/text.d.ts +3 -0
  72. package/dist/textarea/index.js +916 -36
  73. package/dist/textarea/textarea.d.ts +3 -0
  74. package/dist/toggle/index.js +75 -33
  75. package/dist/tooltip/index.d.ts +1 -2
  76. package/dist/tooltip/index.js +59 -53
  77. package/dist/tooltip/tooltip-content.d.ts +1 -1
  78. package/dist/tooltip/tooltip-small.d.ts +2 -5
  79. package/dist/tooltip/tooltip.d.ts +2 -1
  80. package/dist/tree/index.js +176 -115
  81. package/dist/use-scale/index.js +50 -13
  82. package/dist/user/index.js +152 -100
  83. package/esm/avatar/avatar.js +8 -6
  84. package/esm/button/button.icon.d.ts +3 -16
  85. package/esm/button/button.icon.js +22 -22
  86. package/esm/button/button.js +5 -5
  87. package/esm/button/button.small.d.ts +3 -16
  88. package/esm/button/button.small.js +20 -23
  89. package/esm/circular-progress/CircularProgress.d.ts +17 -0
  90. package/esm/circular-progress/CircularProgress.js +110 -0
  91. package/esm/circular-progress/index.d.ts +3 -4
  92. package/esm/circular-progress/index.js +3 -4
  93. package/esm/circular-progress/useCircularProgress.d.ts +12 -0
  94. package/esm/circular-progress/useCircularProgress.js +35 -0
  95. package/esm/index.d.ts +2 -1
  96. package/esm/index.js +1 -1
  97. package/esm/input/input-field.js +11 -9
  98. package/esm/list/list-item.js +11 -11
  99. package/esm/notetip/note-tip.d.ts +2 -0
  100. package/esm/notetip/note-tip.js +8 -5
  101. package/esm/pagination/pagination-item.js +6 -6
  102. package/esm/select/select.d.ts +2 -0
  103. package/esm/select/select.js +15 -2
  104. package/esm/skeleton/index.js +9 -4
  105. package/esm/table/table-body.d.ts +4 -3
  106. package/esm/table/table-body.js +25 -15
  107. package/esm/table/table-cell.d.ts +4 -2
  108. package/esm/table/table-cell.js +19 -3
  109. package/esm/table/table-types.d.ts +2 -0
  110. package/esm/table/table.d.ts +5 -1
  111. package/esm/table/table.js +52 -25
  112. package/esm/text/text.d.ts +3 -0
  113. package/esm/text/text.js +9 -2
  114. package/esm/textarea/textarea.d.ts +3 -0
  115. package/esm/textarea/textarea.js +19 -2
  116. package/esm/tooltip/index.d.ts +1 -2
  117. package/esm/tooltip/tooltip-content.d.ts +1 -1
  118. package/esm/tooltip/tooltip-content.js +5 -5
  119. package/esm/tooltip/tooltip-small.d.ts +2 -5
  120. package/esm/tooltip/tooltip-small.js +0 -1
  121. package/esm/tooltip/tooltip.d.ts +2 -1
  122. package/esm/tooltip/tooltip.js +6 -5
  123. package/package.json +3 -3
  124. package/dist/circular-progress/CircularProgressbar.d.ts +0 -10
  125. package/dist/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
  126. package/dist/circular-progress/Path.d.ts +0 -9
  127. package/dist/circular-progress/buildStyles.d.ts +0 -12
  128. package/dist/circular-progress/constants.d.ts +0 -5
  129. package/dist/circular-progress/types.d.ts +0 -50
  130. package/esm/circular-progress/CircularProgressbar.d.ts +0 -10
  131. package/esm/circular-progress/CircularProgressbar.js +0 -118
  132. package/esm/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
  133. package/esm/circular-progress/CircularProgressbarWithChildren.js +0 -32
  134. package/esm/circular-progress/Path.d.ts +0 -9
  135. package/esm/circular-progress/Path.js +0 -52
  136. package/esm/circular-progress/buildStyles.d.ts +0 -12
  137. package/esm/circular-progress/buildStyles.js +0 -45
  138. package/esm/circular-progress/constants.d.ts +0 -5
  139. package/esm/circular-progress/constants.js +0 -5
  140. package/esm/circular-progress/types.d.ts +0 -50
  141. 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);
@@ -64,14 +65,13 @@ function _createForOfIteratorHelper(r, e) {
64
65
  }
65
66
  };
66
67
  }
67
- function _extends() {
68
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
69
- for (var e = 1; e < arguments.length; e++) {
70
- var t = arguments[e];
71
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
72
- }
73
- return n;
74
- }, _extends.apply(null, arguments);
68
+ function _defineProperty(e, r, t) {
69
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
70
+ value: t,
71
+ enumerable: true,
72
+ configurable: true,
73
+ writable: true
74
+ }) : e[r] = t, e;
75
75
  }
76
76
  function _iterableToArray(r) {
77
77
  if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
@@ -109,6 +109,27 @@ function _nonIterableRest() {
109
109
  function _nonIterableSpread() {
110
110
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
111
111
  }
112
+ function ownKeys(e, r) {
113
+ var t = Object.keys(e);
114
+ if (Object.getOwnPropertySymbols) {
115
+ var o = Object.getOwnPropertySymbols(e);
116
+ r && (o = o.filter(function (r) {
117
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
118
+ })), t.push.apply(t, o);
119
+ }
120
+ return t;
121
+ }
122
+ function _objectSpread2(e) {
123
+ for (var r = 1; r < arguments.length; r++) {
124
+ var t = null != arguments[r] ? arguments[r] : {};
125
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
126
+ _defineProperty(e, r, t[r]);
127
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
128
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
129
+ });
130
+ }
131
+ return e;
132
+ }
112
133
  function _objectWithoutProperties(e, t) {
113
134
  if (null == e) return {};
114
135
  var o,
@@ -135,6 +156,20 @@ function _slicedToArray(r, e) {
135
156
  function _toConsumableArray(r) {
136
157
  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
137
158
  }
159
+ function _toPrimitive(t, r) {
160
+ if ("object" != typeof t || !t) return t;
161
+ var e = t[Symbol.toPrimitive];
162
+ if (void 0 !== e) {
163
+ var i = e.call(t, r);
164
+ if ("object" != typeof i) return i;
165
+ throw new TypeError("@@toPrimitive must return a primitive value.");
166
+ }
167
+ return ("string" === r ? String : Number)(t);
168
+ }
169
+ function _toPropertyKey(t) {
170
+ var i = _toPrimitive(t, "string");
171
+ return "symbol" == typeof i ? i : i + "";
172
+ }
138
173
  function _unsupportedIterableToArray(r, a) {
139
174
  if (r) {
140
175
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
@@ -716,31 +751,33 @@ var isCSSNumberValue = function isCSSNumberValue(value) {
716
751
  };
717
752
 
718
753
  var SelectIconComponent = function SelectIconComponent() {
719
- return /*#__PURE__*/React.createElement("svg", {
754
+ return /*#__PURE__*/jsxRuntime.jsxs("svg", {
720
755
  viewBox: "0 0 24 24",
721
756
  strokeWidth: "1",
722
757
  strokeLinecap: "round",
723
758
  strokeLinejoin: "round",
724
759
  fill: "none",
725
760
  shapeRendering: "geometricPrecision",
726
- className: "jsx-2742933678"
727
- }, /*#__PURE__*/React.createElement("path", {
728
- d: "M6 9l6 6 6-6",
729
- className: "jsx-2742933678"
730
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
731
- id: "2742933678"
732
- }, "svg.jsx-2742933678{color:inherit;stroke:currentColor;-webkit-transition:all 200ms ease;transition:all 200ms ease;width:1.214em;height:1.214em;}"));
761
+ className: "jsx-2742933678",
762
+ children: [/*#__PURE__*/jsxRuntime.jsx("path", {
763
+ d: "M6 9l6 6 6-6",
764
+ className: "jsx-2742933678"
765
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
766
+ id: "2742933678",
767
+ children: "svg.jsx-2742933678{color:inherit;stroke:currentColor;-webkit-transition:all 200ms ease;transition:all 200ms ease;width:1.214em;height:1.214em;}"
768
+ })]
769
+ });
733
770
  };
734
771
  SelectIconComponent.displayName = 'SelectIcon';
735
772
  var SelectIcon = /*#__PURE__*/React.memo(SelectIconComponent);
736
773
 
737
774
  /* "use client" */
738
775
 
739
- var defaultContext$1 = {
776
+ var defaultContext$2 = {
740
777
  visible: false,
741
778
  disableAll: false
742
779
  };
743
- var SelectContext = /*#__PURE__*/React.createContext(defaultContext$1);
780
+ var SelectContext = /*#__PURE__*/React.createContext(defaultContext$2);
744
781
  var useSelectContext = function useSelectContext() {
745
782
  return React.useContext(SelectContext);
746
783
  };
@@ -762,19 +799,22 @@ var SelectDropdown = /*#__PURE__*/React.forwardRef(function (_ref, dropdownRef)
762
799
  React.useImperativeHandle(dropdownRef, function () {
763
800
  return internalDropdownRef.current;
764
801
  });
765
- return /*#__PURE__*/React.createElement(theme.Dropdown, {
802
+ return /*#__PURE__*/jsxRuntime.jsx(theme.Dropdown, {
766
803
  parent: ref,
767
804
  visible: visible,
768
805
  disableMatchWidth: disableMatchWidth,
769
- getPopupContainer: getPopupContainer
770
- }, /*#__PURE__*/React.createElement("div", {
771
- ref: internalDropdownRef,
772
- style: dropdownStyle,
773
- className: _JSXStyle.dynamic([["2782510679", [theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.palette.background]]]) + " " + (classes || "")
774
- }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
775
- id: "2782510679",
776
- dynamic: [theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.palette.background]
777
- }, ".select-dropdown.__jsx-style-dynamic-selector{border-radius:".concat(theme$1.layout.radius, ";box-shadow:").concat(theme$1.expressiveness.shadowLarge, ";background-color:").concat(theme$1.palette.background, ";max-height:17em;overflow-y:auto;overflow-anchor:none;padding:0.38em 0;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}"))));
806
+ getPopupContainer: getPopupContainer,
807
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
808
+ ref: internalDropdownRef,
809
+ style: dropdownStyle,
810
+ className: _JSXStyle.dynamic([["2782510679", [theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.palette.background]]]) + " " + (classes || ""),
811
+ children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
812
+ id: "2782510679",
813
+ dynamic: [theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.palette.background],
814
+ children: ".select-dropdown.__jsx-style-dynamic-selector{border-radius:".concat(theme$1.layout.radius, ";box-shadow:").concat(theme$1.expressiveness.shadowLarge, ";background-color:").concat(theme$1.palette.background, ";max-height:17em;overflow-y:auto;overflow-anchor:none;padding:0.38em 0;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}")
815
+ })]
816
+ })
817
+ });
778
818
  });
779
819
  SelectDropdown.displayName = 'SelectDropdown';
780
820
 
@@ -784,7 +824,7 @@ var ScalePropKeys = ['width', 'height', 'padding', 'margin', 'w', 'h', 'paddingL
784
824
  var defaultDynamicLayoutPipe = function defaultDynamicLayoutPipe(scale1x) {
785
825
  return "".concat(scale1x);
786
826
  };
787
- var defaultContext = {
827
+ var defaultContext$1 = {
788
828
  getScaleProps: function getScaleProps() {
789
829
  return undefined;
790
830
  },
@@ -810,7 +850,7 @@ var defaultContext = {
810
850
  },
811
851
  unit: '16px'
812
852
  };
813
- var ScaleContext = /*#__PURE__*/React.createContext(defaultContext);
853
+ var ScaleContext = /*#__PURE__*/React.createContext(defaultContext$1);
814
854
  var useScale = function useScale() {
815
855
  return React.useContext(ScaleContext);
816
856
  };
@@ -861,7 +901,7 @@ var generateGetAllScaleProps = function generateGetAllScaleProps(props) {
861
901
  return getAllScaleProps;
862
902
  };
863
903
 
864
- var _excluded$5 = ["children"];
904
+ var _excluded$a = ["children"];
865
905
  var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
866
906
  if (scale === 1) return scale;
867
907
  var diff = Math.abs((scale - 1) / 2);
@@ -871,7 +911,7 @@ var withScale = function withScale(Render) {
871
911
  var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
872
912
  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;
873
913
  var children = _ref.children,
874
- props = _objectWithoutProperties(_ref, _excluded$5);
914
+ props = _objectWithoutProperties(_ref, _excluded$a);
875
915
  var _useTheme = theme.useTheme(),
876
916
  layout = _useTheme.layout;
877
917
  var paddingLeft = props.paddingLeft,
@@ -944,17 +984,19 @@ var withScale = function withScale(Render) {
944
984
  getScaleProps: generateGetScaleProps(props),
945
985
  getAllScaleProps: generateGetAllScaleProps(props)
946
986
  };
947
- return /*#__PURE__*/React.createElement(ScaleContext.Provider, {
948
- value: value
949
- }, /*#__PURE__*/React.createElement(Render, _extends({}, props, {
950
- ref: ref
951
- }), children));
987
+ return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
988
+ value: value,
989
+ children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
990
+ ref: ref,
991
+ children: children
992
+ }))
993
+ });
952
994
  });
953
995
  ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
954
996
  return ScaleFC;
955
997
  };
956
998
 
957
- var _excluded$4 = ["xs", "sm", "md", "lg", "xl", "justify", "direction", "alignItems", "alignContent", "children", "className"];
999
+ var _excluded$9 = ["xs", "sm", "md", "lg", "xl", "justify", "direction", "alignItems", "alignContent", "children", "className"];
958
1000
  var getItemLayout = function getItemLayout(val) {
959
1001
  var display = val === 0 ? 'display: none;' : 'display: inherit;';
960
1002
  if (typeof val === 'number') {
@@ -992,7 +1034,7 @@ var GridBasicItem = function GridBasicItem(_ref) {
992
1034
  children = _ref.children,
993
1035
  _ref$className = _ref.className,
994
1036
  className = _ref$className === void 0 ? '' : _ref$className,
995
- props = _objectWithoutProperties(_ref, _excluded$4);
1037
+ props = _objectWithoutProperties(_ref, _excluded$9);
996
1038
  var theme$1 = theme.useTheme();
997
1039
  var _useScale = useScale(),
998
1040
  SCALES = _useScale.SCALES;
@@ -1023,41 +1065,46 @@ var GridBasicItem = function GridBasicItem(_ref) {
1023
1065
  xl: getItemLayout(xl)
1024
1066
  };
1025
1067
  }, [xs, sm, md, lg, xl]);
1026
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
1027
- className: _JSXStyle.dynamic([["568430467", [SCALES.font(1, 'inherit'), SCALES.height(1, 'auto'), justify, direction, alignContent, alignItems, layout.xs.grow, layout.xs.width, layout.xs.basis, layout.xs.display, theme$1.breakpoints.sm.min, layout.sm.grow, layout.sm.width, layout.sm.basis, layout.sm.display, theme$1.breakpoints.md.min, layout.md.grow, layout.md.width, layout.md.basis, layout.md.display, theme$1.breakpoints.lg.min, layout.lg.grow, layout.lg.width, layout.lg.basis, layout.lg.display, theme$1.breakpoints.xl.min, layout.xl.grow, layout.xl.width, layout.xl.basis, layout.xl.display]]]) + " " + (props && props.className != null && props.className || theme.useClasses('item', classes, className) || "")
1028
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
1029
- id: "568430467",
1030
- dynamic: [SCALES.font(1, 'inherit'), SCALES.height(1, 'auto'), justify, direction, alignContent, alignItems, layout.xs.grow, layout.xs.width, layout.xs.basis, layout.xs.display, theme$1.breakpoints.sm.min, layout.sm.grow, layout.sm.width, layout.sm.basis, layout.sm.display, theme$1.breakpoints.md.min, layout.md.grow, layout.md.width, layout.md.basis, layout.md.display, theme$1.breakpoints.lg.min, layout.lg.grow, layout.lg.width, layout.lg.basis, layout.lg.display, theme$1.breakpoints.xl.min, layout.xl.grow, layout.xl.width, layout.xl.basis, layout.xl.display]
1031
- }, ".item.__jsx-style-dynamic-selector{font-size:".concat(SCALES.font(1, 'inherit'), ";height:").concat(SCALES.height(1, 'auto'), ";}.justify.__jsx-style-dynamic-selector{-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";}.direction.__jsx-style-dynamic-selector{-webkit-flex-direction:").concat(direction, ";-ms-flex-direction:").concat(direction, ";flex-direction:").concat(direction, ";}.alignContent.__jsx-style-dynamic-selector{-webkit-align-content:").concat(alignContent, ";-ms-flex-line-pack:").concat(alignContent, ";align-content:").concat(alignContent, ";}.alignItems.__jsx-style-dynamic-selector{-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";}.xs.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xs.grow, ";-webkit-flex-grow:").concat(layout.xs.grow, ";-ms-flex-positive:").concat(layout.xs.grow, ";flex-grow:").concat(layout.xs.grow, ";max-width:").concat(layout.xs.width, ";-webkit-flex-basis:").concat(layout.xs.basis, ";-ms-flex-preferred-size:").concat(layout.xs.basis, ";flex-basis:").concat(layout.xs.basis, ";").concat(layout.xs.display, ";}@media only screen and (min-width:").concat(theme$1.breakpoints.sm.min, "){.sm.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.sm.grow, ";-webkit-flex-grow:").concat(layout.sm.grow, ";-ms-flex-positive:").concat(layout.sm.grow, ";flex-grow:").concat(layout.sm.grow, ";max-width:").concat(layout.sm.width, ";-webkit-flex-basis:").concat(layout.sm.basis, ";-ms-flex-preferred-size:").concat(layout.sm.basis, ";flex-basis:").concat(layout.sm.basis, ";").concat(layout.sm.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.md.min, "){.md.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.md.grow, ";-webkit-flex-grow:").concat(layout.md.grow, ";-ms-flex-positive:").concat(layout.md.grow, ";flex-grow:").concat(layout.md.grow, ";max-width:").concat(layout.md.width, ";-webkit-flex-basis:").concat(layout.md.basis, ";-ms-flex-preferred-size:").concat(layout.md.basis, ";flex-basis:").concat(layout.md.basis, ";").concat(layout.md.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.lg.min, "){.lg.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.lg.grow, ";-webkit-flex-grow:").concat(layout.lg.grow, ";-ms-flex-positive:").concat(layout.lg.grow, ";flex-grow:").concat(layout.lg.grow, ";max-width:").concat(layout.lg.width, ";-webkit-flex-basis:").concat(layout.lg.basis, ";-ms-flex-preferred-size:").concat(layout.lg.basis, ";flex-basis:").concat(layout.lg.basis, ";").concat(layout.lg.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.xl.min, "){.xl.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xl.grow, ";-webkit-flex-grow:").concat(layout.xl.grow, ";-ms-flex-positive:").concat(layout.xl.grow, ";flex-grow:").concat(layout.xl.grow, ";max-width:").concat(layout.xl.width, ";-webkit-flex-basis:").concat(layout.xl.basis, ";-ms-flex-preferred-size:").concat(layout.xl.basis, ";flex-basis:").concat(layout.xl.basis, ";").concat(layout.xl.display, ";}}")));
1068
+ return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
1069
+ className: _JSXStyle.dynamic([["568430467", [SCALES.font(1, 'inherit'), SCALES.height(1, 'auto'), justify, direction, alignContent, alignItems, layout.xs.grow, layout.xs.width, layout.xs.basis, layout.xs.display, theme$1.breakpoints.sm.min, layout.sm.grow, layout.sm.width, layout.sm.basis, layout.sm.display, theme$1.breakpoints.md.min, layout.md.grow, layout.md.width, layout.md.basis, layout.md.display, theme$1.breakpoints.lg.min, layout.lg.grow, layout.lg.width, layout.lg.basis, layout.lg.display, theme$1.breakpoints.xl.min, layout.xl.grow, layout.xl.width, layout.xl.basis, layout.xl.display]]]) + " " + (props && props.className != null && props.className || theme.useClasses('item', classes, className) || ""),
1070
+ children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1071
+ id: "568430467",
1072
+ dynamic: [SCALES.font(1, 'inherit'), SCALES.height(1, 'auto'), justify, direction, alignContent, alignItems, layout.xs.grow, layout.xs.width, layout.xs.basis, layout.xs.display, theme$1.breakpoints.sm.min, layout.sm.grow, layout.sm.width, layout.sm.basis, layout.sm.display, theme$1.breakpoints.md.min, layout.md.grow, layout.md.width, layout.md.basis, layout.md.display, theme$1.breakpoints.lg.min, layout.lg.grow, layout.lg.width, layout.lg.basis, layout.lg.display, theme$1.breakpoints.xl.min, layout.xl.grow, layout.xl.width, layout.xl.basis, layout.xl.display],
1073
+ children: ".item.__jsx-style-dynamic-selector{font-size:".concat(SCALES.font(1, 'inherit'), ";height:").concat(SCALES.height(1, 'auto'), ";}.justify.__jsx-style-dynamic-selector{-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";}.direction.__jsx-style-dynamic-selector{-webkit-flex-direction:").concat(direction, ";-ms-flex-direction:").concat(direction, ";flex-direction:").concat(direction, ";}.alignContent.__jsx-style-dynamic-selector{-webkit-align-content:").concat(alignContent, ";-ms-flex-line-pack:").concat(alignContent, ";align-content:").concat(alignContent, ";}.alignItems.__jsx-style-dynamic-selector{-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";}.xs.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xs.grow, ";-webkit-flex-grow:").concat(layout.xs.grow, ";-ms-flex-positive:").concat(layout.xs.grow, ";flex-grow:").concat(layout.xs.grow, ";max-width:").concat(layout.xs.width, ";-webkit-flex-basis:").concat(layout.xs.basis, ";-ms-flex-preferred-size:").concat(layout.xs.basis, ";flex-basis:").concat(layout.xs.basis, ";").concat(layout.xs.display, ";}@media only screen and (min-width:").concat(theme$1.breakpoints.sm.min, "){.sm.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.sm.grow, ";-webkit-flex-grow:").concat(layout.sm.grow, ";-ms-flex-positive:").concat(layout.sm.grow, ";flex-grow:").concat(layout.sm.grow, ";max-width:").concat(layout.sm.width, ";-webkit-flex-basis:").concat(layout.sm.basis, ";-ms-flex-preferred-size:").concat(layout.sm.basis, ";flex-basis:").concat(layout.sm.basis, ";").concat(layout.sm.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.md.min, "){.md.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.md.grow, ";-webkit-flex-grow:").concat(layout.md.grow, ";-ms-flex-positive:").concat(layout.md.grow, ";flex-grow:").concat(layout.md.grow, ";max-width:").concat(layout.md.width, ";-webkit-flex-basis:").concat(layout.md.basis, ";-ms-flex-preferred-size:").concat(layout.md.basis, ";flex-basis:").concat(layout.md.basis, ";").concat(layout.md.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.lg.min, "){.lg.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.lg.grow, ";-webkit-flex-grow:").concat(layout.lg.grow, ";-ms-flex-positive:").concat(layout.lg.grow, ";flex-grow:").concat(layout.lg.grow, ";max-width:").concat(layout.lg.width, ";-webkit-flex-basis:").concat(layout.lg.basis, ";-ms-flex-preferred-size:").concat(layout.lg.basis, ";flex-basis:").concat(layout.lg.basis, ";").concat(layout.lg.display, ";}}@media only screen and (min-width:").concat(theme$1.breakpoints.xl.min, "){.xl.__jsx-style-dynamic-selector{-webkit-box-flex:").concat(layout.xl.grow, ";-webkit-flex-grow:").concat(layout.xl.grow, ";-ms-flex-positive:").concat(layout.xl.grow, ";flex-grow:").concat(layout.xl.grow, ";max-width:").concat(layout.xl.width, ";-webkit-flex-basis:").concat(layout.xl.basis, ";-ms-flex-preferred-size:").concat(layout.xl.basis, ";flex-basis:").concat(layout.xl.basis, ";").concat(layout.xl.display, ";}}")
1074
+ })]
1075
+ }));
1032
1076
  };
1033
1077
  GridBasicItem.displayName = 'GridBasicItem';
1034
1078
 
1035
- var _excluded$3 = ["children", "className"];
1079
+ var _excluded$8 = ["children", "className"];
1036
1080
  var GridComponent = function GridComponent(_ref) {
1037
1081
  var children = _ref.children,
1038
1082
  _ref$className = _ref.className,
1039
1083
  className = _ref$className === void 0 ? '' : _ref$className,
1040
- props = _objectWithoutProperties(_ref, _excluded$3);
1084
+ props = _objectWithoutProperties(_ref, _excluded$8);
1041
1085
  var _useScale = useScale(),
1042
1086
  SCALES = _useScale.SCALES;
1043
1087
  var _styles$className = {
1044
- styles: /*#__PURE__*/React.createElement(_JSXStyle, {
1088
+ styles: /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1045
1089
  id: "1271839607",
1046
- dynamic: [SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0, 'var(--grid-gap-unit)'), SCALES.pr(0, 'var(--grid-gap-unit)'), SCALES.pb(0, 'var(--grid-gap-unit)'), SCALES.pl(0, 'var(--grid-gap-unit)')]
1047
- }, "div.__jsx-style-dynamic-selector{margin:".concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";box-sizing:border-box;padding:").concat(SCALES.pt(0, 'var(--grid-gap-unit)'), " ").concat(SCALES.pr(0, 'var(--grid-gap-unit)'), " ").concat(SCALES.pb(0, 'var(--grid-gap-unit)'), " ").concat(SCALES.pl(0, 'var(--grid-gap-unit)'), ";}")),
1090
+ dynamic: [SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0, 'var(--grid-gap-unit)'), SCALES.pr(0, 'var(--grid-gap-unit)'), SCALES.pb(0, 'var(--grid-gap-unit)'), SCALES.pl(0, 'var(--grid-gap-unit)')],
1091
+ children: "div.__jsx-style-dynamic-selector{margin:".concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";box-sizing:border-box;padding:").concat(SCALES.pt(0, 'var(--grid-gap-unit)'), " ").concat(SCALES.pr(0, 'var(--grid-gap-unit)'), " ").concat(SCALES.pb(0, 'var(--grid-gap-unit)'), " ").concat(SCALES.pl(0, 'var(--grid-gap-unit)'), ";}")
1092
+ }),
1048
1093
  className: _JSXStyle.dynamic([["1271839607", [SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0, 'var(--grid-gap-unit)'), SCALES.pr(0, 'var(--grid-gap-unit)'), SCALES.pb(0, 'var(--grid-gap-unit)'), SCALES.pl(0, 'var(--grid-gap-unit)')]]])
1049
1094
  },
1050
1095
  resolveClassName = _styles$className.className,
1051
1096
  styles = _styles$className.styles;
1052
1097
  var classes = theme.useClasses(resolveClassName, className);
1053
- return /*#__PURE__*/React.createElement(GridBasicItem, _extends({
1098
+ return /*#__PURE__*/jsxRuntime.jsxs(GridBasicItem, _objectSpread2(_objectSpread2({
1054
1099
  className: classes
1055
- }, props), children, styles);
1100
+ }, props), {}, {
1101
+ children: [children, styles]
1102
+ }));
1056
1103
  };
1057
1104
  GridComponent.displayName = 'Grid';
1058
1105
  var Grid = withScale(GridComponent);
1059
1106
 
1060
- var _excluded$2 = ["gap", "wrap", "children", "className"];
1107
+ var _excluded$7 = ["gap", "wrap", "children", "className"];
1061
1108
  var GridContainerComponent = function GridContainerComponent(_ref) {
1062
1109
  var _ref$gap = _ref.gap,
1063
1110
  gap = _ref$gap === void 0 ? 0 : _ref$gap,
@@ -1066,7 +1113,7 @@ var GridContainerComponent = function GridContainerComponent(_ref) {
1066
1113
  children = _ref.children,
1067
1114
  _ref$className = _ref.className,
1068
1115
  className = _ref$className === void 0 ? '' : _ref$className,
1069
- props = _objectWithoutProperties(_ref, _excluded$2);
1116
+ props = _objectWithoutProperties(_ref, _excluded$7);
1070
1117
  var _useScale = useScale(),
1071
1118
  unit = _useScale.unit,
1072
1119
  SCALES = _useScale.SCALES;
@@ -1074,18 +1121,21 @@ var GridContainerComponent = function GridContainerComponent(_ref) {
1074
1121
  return "calc(".concat(gap, " * ").concat(unit, " * 1/3)");
1075
1122
  }, [gap, unit]);
1076
1123
  var _styles$className = {
1077
- styles: /*#__PURE__*/React.createElement(_JSXStyle, {
1124
+ styles: /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1078
1125
  id: "3631618093",
1079
- dynamic: [gapUnit, wrap, SCALES.width(1, 'var(--grid-container-width)'), SCALES.mt(0, 'var(--grid-container-margin)'), SCALES.mr(0, 'var(--grid-container-margin)'), SCALES.mb(0, 'var(--grid-container-margin)'), SCALES.ml(0, 'var(--grid-container-margin)')]
1080
- }, "div.__jsx-style-dynamic-selector{--grid-gap-unit:".concat(gapUnit, ";--grid-container-margin:calc(-1 * var(--grid-gap-unit));--grid-container-width:calc(100% + var(--grid-gap-unit) * 2);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:").concat(wrap, ";-ms-flex-wrap:").concat(wrap, ";flex-wrap:").concat(wrap, ";box-sizing:border-box;width:").concat(SCALES.width(1, 'var(--grid-container-width)'), ";margin:").concat(SCALES.mt(0, 'var(--grid-container-margin)'), " ").concat(SCALES.mr(0, 'var(--grid-container-margin)'), " ").concat(SCALES.mb(0, 'var(--grid-container-margin)'), " ").concat(SCALES.ml(0, 'var(--grid-container-margin)'), ";}")),
1126
+ dynamic: [gapUnit, wrap, SCALES.width(1, 'var(--grid-container-width)'), SCALES.mt(0, 'var(--grid-container-margin)'), SCALES.mr(0, 'var(--grid-container-margin)'), SCALES.mb(0, 'var(--grid-container-margin)'), SCALES.ml(0, 'var(--grid-container-margin)')],
1127
+ children: "div.__jsx-style-dynamic-selector{--grid-gap-unit:".concat(gapUnit, ";--grid-container-margin:calc(-1 * var(--grid-gap-unit));--grid-container-width:calc(100% + var(--grid-gap-unit) * 2);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:").concat(wrap, ";-ms-flex-wrap:").concat(wrap, ";flex-wrap:").concat(wrap, ";box-sizing:border-box;width:").concat(SCALES.width(1, 'var(--grid-container-width)'), ";margin:").concat(SCALES.mt(0, 'var(--grid-container-margin)'), " ").concat(SCALES.mr(0, 'var(--grid-container-margin)'), " ").concat(SCALES.mb(0, 'var(--grid-container-margin)'), " ").concat(SCALES.ml(0, 'var(--grid-container-margin)'), ";}")
1128
+ }),
1081
1129
  className: _JSXStyle.dynamic([["3631618093", [gapUnit, wrap, SCALES.width(1, 'var(--grid-container-width)'), SCALES.mt(0, 'var(--grid-container-margin)'), SCALES.mr(0, 'var(--grid-container-margin)'), SCALES.mb(0, 'var(--grid-container-margin)'), SCALES.ml(0, 'var(--grid-container-margin)')]]])
1082
1130
  },
1083
1131
  resolveClassName = _styles$className.className,
1084
1132
  styles = _styles$className.styles;
1085
1133
  var classes = theme.useClasses(resolveClassName, className);
1086
- return /*#__PURE__*/React.createElement(GridBasicItem, _extends({
1134
+ return /*#__PURE__*/jsxRuntime.jsxs(GridBasicItem, _objectSpread2(_objectSpread2({
1087
1135
  className: classes
1088
- }, props), children, styles);
1136
+ }, props), {}, {
1137
+ children: [children, styles]
1138
+ }));
1089
1139
  };
1090
1140
  GridContainerComponent.displayName = 'GridContainer';
1091
1141
  var GridContainer = withScale(GridContainerComponent);
@@ -1101,28 +1151,31 @@ var SelectIconClear = function SelectIconClear(_ref) {
1101
1151
  event.nativeEvent.stopImmediatePropagation();
1102
1152
  onClick && onClick(event);
1103
1153
  };
1104
- return /*#__PURE__*/React.createElement("div", {
1154
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
1105
1155
  onClick: clickHandler,
1106
- className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]]) + " " + "clear-icon"
1107
- }, /*#__PURE__*/React.createElement("svg", {
1108
- viewBox: "0 0 24 24",
1109
- stroke: "currentColor",
1110
- strokeWidth: "1.5",
1111
- strokeLinecap: "round",
1112
- strokeLinejoin: "round",
1113
- fill: "none",
1114
- shapeRendering: "geometricPrecision",
1115
- className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]])
1116
- }, /*#__PURE__*/React.createElement("path", {
1117
- d: "M18 6L6 18",
1118
- className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]])
1119
- }), /*#__PURE__*/React.createElement("path", {
1120
- d: "M6 6l12 12",
1121
- className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]])
1122
- })), /*#__PURE__*/React.createElement(_JSXStyle, {
1123
- id: "1984024521",
1124
- dynamic: [theme$1.palette.accents_3, theme$1.palette.foreground]
1125
- }, ".clear-icon.__jsx-style-dynamic-selector{padding:0 0 0 0.5em;margin:0;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;height:100%;cursor:pointer;box-sizing:border-box;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;color:".concat(theme$1.palette.accents_3, ";visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:1em;height:1em;}")));
1156
+ className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]]) + " " + "clear-icon",
1157
+ children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
1158
+ viewBox: "0 0 24 24",
1159
+ stroke: "currentColor",
1160
+ strokeWidth: "1.5",
1161
+ strokeLinecap: "round",
1162
+ strokeLinejoin: "round",
1163
+ fill: "none",
1164
+ shapeRendering: "geometricPrecision",
1165
+ className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]]),
1166
+ children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1167
+ d: "M18 6L6 18",
1168
+ className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]])
1169
+ }), /*#__PURE__*/jsxRuntime.jsx("path", {
1170
+ d: "M6 6l12 12",
1171
+ className: _JSXStyle.dynamic([["1984024521", [theme$1.palette.accents_3, theme$1.palette.foreground]]])
1172
+ })]
1173
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1174
+ id: "1984024521",
1175
+ dynamic: [theme$1.palette.accents_3, theme$1.palette.foreground],
1176
+ children: ".clear-icon.__jsx-style-dynamic-selector{padding:0 0 0 0.5em;margin:0;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;height:100%;cursor:pointer;box-sizing:border-box;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;color:".concat(theme$1.palette.accents_3, ";visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:1em;height:1em;}")
1177
+ })]
1178
+ });
1126
1179
  };
1127
1180
  var MemoSelectIconClear = /*#__PURE__*/React.memo(SelectIconClear);
1128
1181
 
@@ -1131,17 +1184,868 @@ var SelectMultipleValue = function SelectMultipleValue(_ref) {
1131
1184
  onClear = _ref.onClear,
1132
1185
  children = _ref.children;
1133
1186
  var theme$1 = theme.useTheme();
1134
- return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement("div", {
1135
- className: _JSXStyle.dynamic([["3357578496", [theme$1.layout.radius, theme$1.palette.accents_2, disabled ? theme$1.palette.accents_4 : theme$1.palette.accents_6]]]) + " " + "item"
1136
- }, children, !!onClear && /*#__PURE__*/React.createElement(MemoSelectIconClear, {
1137
- onClick: onClear
1138
- })), /*#__PURE__*/React.createElement(_JSXStyle, {
1139
- id: "3357578496",
1140
- dynamic: [theme$1.layout.radius, theme$1.palette.accents_2, disabled ? theme$1.palette.accents_4 : theme$1.palette.accents_6]
1141
- }, ".item.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;justify-items:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;padding:0 0.5em;font-size:var(--select-font-size);height:calc(var(--select-font-size) * 2);border-radius:".concat(theme$1.layout.radius, ";background-color:").concat(theme$1.palette.accents_2, ";color:").concat(disabled ? theme$1.palette.accents_4 : theme$1.palette.accents_6, ";}.item.__jsx-style-dynamic-selector>div:not(.clear-icon),.item.__jsx-style-dynamic-selector>div:not(.clear-icon):hover{border-radius:0;background-color:transparent;padding:0;margin:0;color:inherit;}")));
1187
+ return /*#__PURE__*/jsxRuntime.jsxs(Grid, {
1188
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
1189
+ className: _JSXStyle.dynamic([["3357578496", [theme$1.layout.radius, theme$1.palette.accents_2, disabled ? theme$1.palette.accents_4 : theme$1.palette.accents_6]]]) + " " + "item",
1190
+ children: [children, !!onClear && /*#__PURE__*/jsxRuntime.jsx(MemoSelectIconClear, {
1191
+ onClick: onClear
1192
+ })]
1193
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1194
+ id: "3357578496",
1195
+ dynamic: [theme$1.layout.radius, theme$1.palette.accents_2, disabled ? theme$1.palette.accents_4 : theme$1.palette.accents_6],
1196
+ children: ".item.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;justify-items:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;padding:0 0.5em;font-size:var(--select-font-size);height:calc(var(--select-font-size) * 2);border-radius:".concat(theme$1.layout.radius, ";background-color:").concat(theme$1.palette.accents_2, ";color:").concat(disabled ? theme$1.palette.accents_4 : theme$1.palette.accents_6, ";}.item.__jsx-style-dynamic-selector>div:not(.clear-icon),.item.__jsx-style-dynamic-selector>div:not(.clear-icon):hover{border-radius:0;background-color:transparent;padding:0;margin:0;color:inherit;}")
1197
+ })]
1198
+ });
1142
1199
  };
1143
1200
  SelectMultipleValue.displayName = 'SelectMultipleValue';
1144
1201
 
1202
+ var _excluded$6 = ["children", "tag", "className", "color"];
1203
+ var getTypeColor = function getTypeColor(type, palette) {
1204
+ var colors = {
1205
+ "default": 'inherit',
1206
+ secondary: palette.secondary,
1207
+ success: palette.success,
1208
+ warning: palette.warning,
1209
+ error: palette.error
1210
+ };
1211
+ return colors[type] || colors["default"];
1212
+ };
1213
+ var TextChild = function TextChild(_ref) {
1214
+ var children = _ref.children,
1215
+ tag = _ref.tag,
1216
+ _ref$className = _ref.className,
1217
+ className = _ref$className === void 0 ? '' : _ref$className,
1218
+ _ref$color = _ref.color,
1219
+ color = _ref$color === void 0 ? 'default' : _ref$color,
1220
+ props = _objectWithoutProperties(_ref, _excluded$6);
1221
+ var Component = tag;
1222
+ var theme$1 = theme.useTheme();
1223
+ var _useScale = useScale(),
1224
+ SCALES = _useScale.SCALES,
1225
+ getScaleProps = _useScale.getScaleProps;
1226
+ var font = getScaleProps('font');
1227
+ var mx = getScaleProps(['margin', 'marginLeft', 'marginRight', 'mx', 'ml', 'mr']);
1228
+ var my = getScaleProps(['margin', 'marginTop', 'marginBottom', 'my', 'mt', 'mb']);
1229
+ var px = getScaleProps(['padding', 'paddingLeft', 'paddingRight', 'pl', 'pr', 'px']);
1230
+ var py = getScaleProps(['padding', 'paddingTop', 'paddingBottom', 'pt', 'pb', 'py']);
1231
+ var _color = React.useMemo(function () {
1232
+ return getTypeColor(color, theme$1.palette);
1233
+ }, [color, theme$1.palette]);
1234
+ var classNames = React.useMemo(function () {
1235
+ var keys = [{
1236
+ value: mx,
1237
+ className: 'mx'
1238
+ }, {
1239
+ value: my,
1240
+ className: 'my'
1241
+ }, {
1242
+ value: px,
1243
+ className: 'px'
1244
+ }, {
1245
+ value: py,
1246
+ className: 'py'
1247
+ }, {
1248
+ value: font,
1249
+ className: 'font'
1250
+ }];
1251
+ var scaleClassNames = keys.reduce(function (pre, next) {
1252
+ if (typeof next.value === 'undefined') return pre;
1253
+ return "".concat(pre, " ").concat(next.className);
1254
+ }, '');
1255
+ return "".concat(scaleClassNames, " ").concat(className).trim();
1256
+ }, [mx, my, px, py, font, className]);
1257
+ return /*#__PURE__*/jsxRuntime.jsxs(Component, _objectSpread2(_objectSpread2({}, props), {}, {
1258
+ className: _JSXStyle.dynamic([["2277774325", [tag, _color, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.font(1, 'inherit'), SCALES.ml(0, 'revert'), SCALES.mr(0, 'revert'), SCALES.mt(0, 'revert'), SCALES.mb(0, 'revert'), SCALES.pl(0, 'revert'), SCALES.pr(0, 'revert'), SCALES.pt(0, 'revert'), SCALES.pb(0, 'revert')]]]) + " " + (props && props.className != null && props.className || classNames || ""),
1259
+ children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1260
+ id: "2277774325",
1261
+ dynamic: [tag, _color, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.font(1, 'inherit'), SCALES.ml(0, 'revert'), SCALES.mr(0, 'revert'), SCALES.mt(0, 'revert'), SCALES.mb(0, 'revert'), SCALES.pl(0, 'revert'), SCALES.pr(0, 'revert'), SCALES.pt(0, 'revert'), SCALES.pb(0, 'revert')],
1262
+ children: "".concat(tag, ".__jsx-style-dynamic-selector{color:").concat(_color, ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";}.font.__jsx-style-dynamic-selector{font-size:").concat(SCALES.font(1, 'inherit'), ";}.mx.__jsx-style-dynamic-selector{margin-left:").concat(SCALES.ml(0, 'revert'), ";margin-right:").concat(SCALES.mr(0, 'revert'), ";}.my.__jsx-style-dynamic-selector{margin-top:").concat(SCALES.mt(0, 'revert'), ";margin-bottom:").concat(SCALES.mb(0, 'revert'), ";}.px.__jsx-style-dynamic-selector{padding-left:").concat(SCALES.pl(0, 'revert'), ";padding-right:").concat(SCALES.pr(0, 'revert'), ";}.py.__jsx-style-dynamic-selector{padding-top:").concat(SCALES.pt(0, 'revert'), ";padding-bottom:").concat(SCALES.pb(0, 'revert'), ";}.no-wrap.__jsx-style-dynamic-selector{white-space:nowrap;}")
1263
+ })]
1264
+ }));
1265
+ };
1266
+ TextChild.displayName = 'TextChild';
1267
+
1268
+ var ButtonDrip = function ButtonDrip(_ref) {
1269
+ var _ref$x = _ref.x,
1270
+ x = _ref$x === void 0 ? 0 : _ref$x,
1271
+ _ref$y = _ref.y,
1272
+ y = _ref$y === void 0 ? 0 : _ref$y,
1273
+ color = _ref.color,
1274
+ onCompleted = _ref.onCompleted;
1275
+ var dripRef = React.useRef(null);
1276
+ /* istanbul ignore next */
1277
+ var top = Number.isNaN(+y) ? 0 : y - 10;
1278
+ /* istanbul ignore next */
1279
+ var left = Number.isNaN(+x) ? 0 : x - 10;
1280
+ React.useEffect(function () {
1281
+ /* istanbul ignore next */
1282
+ if (!dripRef.current) return;
1283
+ dripRef.current.addEventListener('animationend', onCompleted);
1284
+ return function () {
1285
+ /* istanbul ignore next */
1286
+ if (!dripRef.current) return;
1287
+ dripRef.current.removeEventListener('animationend', onCompleted);
1288
+ };
1289
+ });
1290
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
1291
+ ref: dripRef,
1292
+ className: "jsx-3424889537" + " " + "drip",
1293
+ children: [/*#__PURE__*/jsxRuntime.jsx("svg", {
1294
+ width: "20",
1295
+ height: "20",
1296
+ viewBox: "0 0 20 20",
1297
+ style: {
1298
+ top: top,
1299
+ left: left
1300
+ },
1301
+ className: "jsx-3424889537",
1302
+ children: /*#__PURE__*/jsxRuntime.jsx("g", {
1303
+ stroke: "none",
1304
+ strokeWidth: "1",
1305
+ fill: "none",
1306
+ fillRule: "evenodd",
1307
+ className: "jsx-3424889537",
1308
+ children: /*#__PURE__*/jsxRuntime.jsx("g", {
1309
+ fill: color,
1310
+ className: "jsx-3424889537",
1311
+ children: /*#__PURE__*/jsxRuntime.jsx("rect", {
1312
+ width: "100%",
1313
+ height: "100%",
1314
+ rx: "10",
1315
+ className: "jsx-3424889537"
1316
+ })
1317
+ })
1318
+ })
1319
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1320
+ id: "3424889537",
1321
+ children: ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"
1322
+ })]
1323
+ });
1324
+ };
1325
+ ButtonDrip.displayName = 'ButtonDrip';
1326
+
1327
+ var _excluded$5 = ["children", "type", "color", "className", "spaceRatio"];
1328
+ var getIconBgColor = function getIconBgColor(type, palette, color) {
1329
+ var colors = {
1330
+ "default": palette.accents_6,
1331
+ secondary: palette.secondary,
1332
+ success: palette.success,
1333
+ warning: palette.warning,
1334
+ error: palette.error
1335
+ };
1336
+ return color ? color : colors[type];
1337
+ };
1338
+ var LoadingComponent = function LoadingComponent(_ref) {
1339
+ var children = _ref.children,
1340
+ _ref$type = _ref.type,
1341
+ type = _ref$type === void 0 ? 'default' : _ref$type,
1342
+ color = _ref.color,
1343
+ _ref$className = _ref.className,
1344
+ className = _ref$className === void 0 ? '' : _ref$className,
1345
+ _ref$spaceRatio = _ref.spaceRatio,
1346
+ spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
1347
+ props = _objectWithoutProperties(_ref, _excluded$5);
1348
+ var theme$1 = theme.useTheme();
1349
+ var _useScale = useScale(),
1350
+ SCALES = _useScale.SCALES;
1351
+ var classes = theme.useClasses('loading-container', className);
1352
+ var bgColor = React.useMemo(function () {
1353
+ return getIconBgColor(type, theme$1.palette, color);
1354
+ }, [type, theme$1.palette, color]);
1355
+ return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
1356
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || ""),
1357
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
1358
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading",
1359
+ children: [children && /*#__PURE__*/jsxRuntime.jsx("label", {
1360
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]]),
1361
+ children: children
1362
+ }), /*#__PURE__*/jsxRuntime.jsx("i", {
1363
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]])
1364
+ }), /*#__PURE__*/jsxRuntime.jsx("i", {
1365
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]])
1366
+ }), /*#__PURE__*/jsxRuntime.jsx("i", {
1367
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]])
1368
+ })]
1369
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1370
+ id: "2201634259",
1371
+ dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio],
1372
+ children: ".loading-container.__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;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;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), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme$1.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")
1373
+ })]
1374
+ }));
1375
+ };
1376
+ LoadingComponent.displayName = 'Loading';
1377
+ var Loading = withScale(LoadingComponent);
1378
+
1379
+ var ButtonLoading = function ButtonLoading(_ref) {
1380
+ var color = _ref.color;
1381
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
1382
+ className: "jsx-212623367" + " " + "btn-loading",
1383
+ children: [/*#__PURE__*/jsxRuntime.jsx(Loading, {
1384
+ color: color
1385
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1386
+ id: "212623367",
1387
+ children: ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"
1388
+ })]
1389
+ });
1390
+ };
1391
+ ButtonLoading.displayName = 'ButtonLoading';
1392
+
1393
+ var _excluded$4 = ["isRight", "isSingle", "children", "className"];
1394
+ var ButtonIcon = function ButtonIcon(_ref) {
1395
+ var _ref$isRight = _ref.isRight,
1396
+ isRight = _ref$isRight === void 0 ? false : _ref$isRight,
1397
+ isSingle = _ref.isSingle,
1398
+ children = _ref.children,
1399
+ _ref$className = _ref.className,
1400
+ className = _ref$className === void 0 ? '' : _ref$className,
1401
+ props = _objectWithoutProperties(_ref, _excluded$4);
1402
+ var classes = theme.useClasses('icon', {
1403
+ right: isRight,
1404
+ single: isSingle
1405
+ }, className);
1406
+ return /*#__PURE__*/jsxRuntime.jsxs("span", _objectSpread2(_objectSpread2({}, props), {}, {
1407
+ className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || ""),
1408
+ children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1409
+ id: "2467502931",
1410
+ children: ".icon.jsx-2467502931{position:absolute;left:var(--helpdice-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--helpdice-ui-button-color);z-index:1;}.right.jsx-2467502931{right:var(--helpdice-ui-button-icon-padding);left:auto;}.icon.jsx-2467502931 svg{background:transparent;height:calc(var(--helpdice-ui-button-height) / 2.35);width:calc(var(--helpdice-ui-button-height) / 2.35);}.single.jsx-2467502931{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"
1411
+ })]
1412
+ }));
1413
+ };
1414
+ ButtonIcon.displayName = 'ButtonIcon';
1415
+
1416
+ var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
1417
+ var icon = icons.icon,
1418
+ iconRight = icons.iconRight;
1419
+ var hasIcon = icon || iconRight;
1420
+ var isRight = Boolean(iconRight);
1421
+ var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
1422
+ var classes = theme.useClasses('text', isRight ? 'right' : 'left');
1423
+ if (!hasIcon) return /*#__PURE__*/jsxRuntime.jsx("div", {
1424
+ className: "text",
1425
+ children: children
1426
+ });
1427
+ if (React.Children.count(children) === 0) {
1428
+ return /*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
1429
+ isRight: isRight,
1430
+ isSingle: true,
1431
+ children: hasIcon
1432
+ });
1433
+ }
1434
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1435
+ children: [/*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
1436
+ isRight: isRight,
1437
+ children: hasIcon
1438
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1439
+ className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || ""),
1440
+ children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1441
+ id: "3568181479",
1442
+ dynamic: [paddingForAutoMode, paddingForAutoMode],
1443
+ children: ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}")
1444
+ })]
1445
+ })]
1446
+ });
1447
+ };
1448
+ var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
1449
+ if (!config.isButtonGroup) return props;
1450
+ return _objectSpread2(_objectSpread2({}, props), {}, {
1451
+ auto: true,
1452
+ shadow: false,
1453
+ ghost: config.ghost || props.ghost,
1454
+ type: config.type || props.type,
1455
+ disabled: config.disabled || props.disabled
1456
+ });
1457
+ };
1458
+
1459
+ /* "use client" */
1460
+
1461
+ var defaultContext = {
1462
+ isButtonGroup: false,
1463
+ disabled: false
1464
+ };
1465
+ var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext);
1466
+ var useButtonGroupContext = function useButtonGroupContext() {
1467
+ return React.useContext(ButtonGroupContext);
1468
+ };
1469
+
1470
+ var hexToRgb = function hexToRgb(color) {
1471
+ var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
1472
+ var full = color.replace(fullReg, function (_, r, g, b) {
1473
+ return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
1474
+ });
1475
+ var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
1476
+ if (!values) {
1477
+ throw new Error("Helpdice UI: Unsupported ".concat(color, " color."));
1478
+ }
1479
+ return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
1480
+ };
1481
+ var colorToRgbValues = function colorToRgbValues(color) {
1482
+ if (color.charAt(0) === '#') return hexToRgb(color);
1483
+ var safeColor = color.replace(/ /g, '');
1484
+ var colorType = color.substr(0, 4);
1485
+ var regArray = safeColor.match(/\((.+)\)/);
1486
+ if (!colorType.startsWith('rgb') || !regArray) {
1487
+ console.log(color);
1488
+ throw new Error("Helpdice UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
1489
+ }
1490
+ return regArray[1].split(',').map(function (str) {
1491
+ return Number.parseFloat(str);
1492
+ });
1493
+ };
1494
+ var addColorAlpha = function addColorAlpha(color, alpha) {
1495
+ if (!/^#|rgb|RGB/.test(color)) return color;
1496
+ var _colorToRgbValues = colorToRgbValues(color),
1497
+ _colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
1498
+ r = _colorToRgbValues2[0],
1499
+ g = _colorToRgbValues2[1],
1500
+ b = _colorToRgbValues2[2];
1501
+ var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
1502
+ return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
1503
+ };
1504
+
1505
+ var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
1506
+ var colors = {
1507
+ secondary: {
1508
+ bg: palette.background,
1509
+ border: palette.foreground,
1510
+ color: palette.foreground,
1511
+ ripple: ''
1512
+ },
1513
+ success: {
1514
+ bg: palette.background,
1515
+ border: palette.success,
1516
+ color: palette.success,
1517
+ ripple: ''
1518
+ },
1519
+ warning: {
1520
+ bg: palette.background,
1521
+ border: palette.warning,
1522
+ color: palette.warning,
1523
+ ripple: ''
1524
+ },
1525
+ error: {
1526
+ bg: palette.background,
1527
+ border: palette.error,
1528
+ color: palette.error,
1529
+ ripple: ''
1530
+ }
1531
+ };
1532
+ return colors[_color] || null;
1533
+ };
1534
+ var getButtonColors = function getButtonColors(palette, props) {
1535
+ var color = props.color,
1536
+ disabled = props.disabled,
1537
+ ghost = props.ghost;
1538
+ var colors = {
1539
+ "default": {
1540
+ bg: palette.background,
1541
+ border: palette.border,
1542
+ color: palette.accents_5,
1543
+ ripple: palette.accents_1
1544
+ },
1545
+ secondary: {
1546
+ bg: palette.foreground,
1547
+ border: palette.foreground,
1548
+ color: palette.background,
1549
+ ripple: palette.accents_1
1550
+ },
1551
+ success: {
1552
+ bg: palette.success,
1553
+ border: palette.success,
1554
+ color: '#fff',
1555
+ ripple: '#1f93ffff'
1556
+ },
1557
+ warning: {
1558
+ bg: palette.warning,
1559
+ border: palette.warning,
1560
+ color: '#fff',
1561
+ ripple: '#ffca29ff'
1562
+ },
1563
+ error: {
1564
+ bg: palette.error,
1565
+ border: palette.error,
1566
+ color: '#fff',
1567
+ ripple: '#ff5a55ff'
1568
+ },
1569
+ abort: {
1570
+ bg: 'transparent',
1571
+ border: 'transparent',
1572
+ color: palette.accents_5,
1573
+ ripple: palette.accents_1
1574
+ }
1575
+ };
1576
+ if (disabled) return {
1577
+ bg: palette.accents_1,
1578
+ border: palette.accents_2,
1579
+ color: '#ccc',
1580
+ ripple: ''
1581
+ };
1582
+
1583
+ /**
1584
+ * The '-light' type is the same color as the common type,
1585
+ * only hover's color is different.
1586
+ * e.g.
1587
+ * Color['success'] === Color['success-light']
1588
+ * Color['warning'] === Color['warning-light']
1589
+ */
1590
+ var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
1591
+ var defaultColor = colors["default"];
1592
+ if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
1593
+ return colors[withoutLightType] || defaultColor;
1594
+ };
1595
+ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
1596
+ var colors = {
1597
+ secondary: {
1598
+ bg: palette.foreground,
1599
+ border: palette.background,
1600
+ color: palette.background
1601
+ },
1602
+ success: {
1603
+ bg: palette.success,
1604
+ border: palette.background,
1605
+ color: 'white'
1606
+ },
1607
+ warning: {
1608
+ bg: palette.warning,
1609
+ border: palette.background,
1610
+ color: 'white'
1611
+ },
1612
+ error: {
1613
+ bg: palette.error,
1614
+ border: palette.background,
1615
+ color: 'white'
1616
+ }
1617
+ };
1618
+ var withoutLightType = _color === null || _color === void 0 ? void 0 : _color.replace('-light', '');
1619
+ return colors[withoutLightType] || null;
1620
+ };
1621
+ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
1622
+ var color = props.color,
1623
+ disabled = props.disabled,
1624
+ loading = props.loading,
1625
+ shadow = props.shadow,
1626
+ ghost = props.ghost;
1627
+ var defaultColor = getButtonColors(palette, props);
1628
+ var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
1629
+ var colors = {
1630
+ "default": {
1631
+ bg: palette.background,
1632
+ border: palette.foreground
1633
+ },
1634
+ secondary: {
1635
+ bg: palette.background,
1636
+ border: palette.foreground
1637
+ },
1638
+ success: {
1639
+ bg: palette.background,
1640
+ border: palette.success
1641
+ },
1642
+ warning: {
1643
+ bg: palette.background,
1644
+ border: palette.warning
1645
+ },
1646
+ error: {
1647
+ bg: palette.background,
1648
+ border: palette.error
1649
+ },
1650
+ abort: {
1651
+ bg: 'transparent',
1652
+ border: 'transparent',
1653
+ color: palette.accents_5
1654
+ },
1655
+ 'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1656
+ bg: alphaBackground
1657
+ }),
1658
+ 'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1659
+ bg: alphaBackground
1660
+ }),
1661
+ 'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1662
+ bg: alphaBackground
1663
+ }),
1664
+ 'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1665
+ bg: alphaBackground
1666
+ })
1667
+ };
1668
+ if (disabled) return {
1669
+ bg: palette.accents_1,
1670
+ border: palette.accents_2,
1671
+ color: '#ccc'
1672
+ };
1673
+ if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1674
+ color: 'transparent'
1675
+ });
1676
+ if (shadow) return defaultColor;
1677
+ var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
1678
+ return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
1679
+ color: hoverColor.color || hoverColor.border
1680
+ });
1681
+ };
1682
+ var getButtonCursor = function getButtonCursor(disabled, loading) {
1683
+ if (disabled) return {
1684
+ cursor: 'not-allowed',
1685
+ events: 'auto'
1686
+ };
1687
+ if (loading) return {
1688
+ cursor: 'default',
1689
+ events: 'none'
1690
+ };
1691
+ return {
1692
+ cursor: 'pointer',
1693
+ events: 'auto'
1694
+ };
1695
+ };
1696
+ var getButtonDripColor = function getButtonDripColor(palette, props) {
1697
+ var type = props.type;
1698
+ var isLightHover = type ? type.endsWith('light') : false;
1699
+ var hoverColors = getButtonHoverColors(palette, props);
1700
+ return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
1701
+ };
1702
+
1703
+ var _excluded$3 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
1704
+ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
1705
+ var theme$1 = theme.useTheme();
1706
+ // const navigate = useNavigate();
1707
+ var _useScale = useScale(),
1708
+ SCALES = _useScale.SCALES;
1709
+ var buttonRef = React.useRef(null);
1710
+ React.useImperativeHandle(ref, function () {
1711
+ return buttonRef.current;
1712
+ }); // Changed with !
1713
+
1714
+ var _useState = React.useState(false),
1715
+ _useState2 = _slicedToArray(_useState, 2),
1716
+ dripShow = _useState2[0],
1717
+ setDripShow = _useState2[1];
1718
+ var _useState3 = React.useState(0),
1719
+ _useState4 = _slicedToArray(_useState3, 2),
1720
+ dripX = _useState4[0],
1721
+ setDripX = _useState4[1];
1722
+ var _useState5 = React.useState(0),
1723
+ _useState6 = _slicedToArray(_useState5, 2),
1724
+ dripY = _useState6[0],
1725
+ setDripY = _useState6[1];
1726
+ var groupConfig = useButtonGroupContext();
1727
+ var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
1728
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1729
+ var children = filteredProps.children,
1730
+ _filteredProps$disabl = filteredProps.disabled,
1731
+ disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
1732
+ filteredProps.color;
1733
+ var _filteredProps$loadin = filteredProps.loading,
1734
+ loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
1735
+ _filteredProps$shadow = filteredProps.shadow,
1736
+ shadow = _filteredProps$shadow === void 0 ? false : _filteredProps$shadow,
1737
+ _filteredProps$ghost = filteredProps.ghost,
1738
+ ghost = _filteredProps$ghost === void 0 ? false : _filteredProps$ghost,
1739
+ _filteredProps$effect = filteredProps.effect,
1740
+ effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
1741
+ _filteredProps$round = filteredProps.round,
1742
+ round = _filteredProps$round === void 0 ? false : _filteredProps$round;
1743
+ filteredProps.relative;
1744
+ filteredProps.replace;
1745
+ filteredProps.a;
1746
+ var to = filteredProps.to,
1747
+ onClick = filteredProps.onClick,
1748
+ _filteredProps$auto = filteredProps.auto,
1749
+ auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
1750
+ icon = filteredProps.icon,
1751
+ _filteredProps$type = filteredProps.type,
1752
+ type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
1753
+ iconRight = filteredProps.iconRight,
1754
+ _filteredProps$classN = filteredProps.className,
1755
+ className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
1756
+ filteredProps.crossOrigin;
1757
+ var props = _objectWithoutProperties(filteredProps, _excluded$3);
1758
+ /* eslint-enable @typescript-eslint/no-unused-vars */
1759
+
1760
+ var _useMemo = React.useMemo(function () {
1761
+ return getButtonColors(theme$1.palette, filteredProps);
1762
+ }, [theme$1.palette, filteredProps]),
1763
+ bg = _useMemo.bg,
1764
+ border = _useMemo.border,
1765
+ color = _useMemo.color,
1766
+ rippleColor = _useMemo.ripple;
1767
+ var hover = React.useMemo(function () {
1768
+ return getButtonHoverColors(theme$1.palette, filteredProps);
1769
+ }, [theme$1.palette, filteredProps]);
1770
+ var _useMemo2 = React.useMemo(function () {
1771
+ return getButtonCursor(disabled, loading);
1772
+ }, [disabled, loading]),
1773
+ cursor = _useMemo2.cursor,
1774
+ events = _useMemo2.events;
1775
+ var dripColor = React.useMemo(function () {
1776
+ return getButtonDripColor(theme$1.palette, filteredProps);
1777
+ }, [theme$1.palette, filteredProps]);
1778
+
1779
+ /* istanbul ignore next */
1780
+ var dripCompletedHandle = function dripCompletedHandle() {
1781
+ setDripShow(false);
1782
+ setDripX(0);
1783
+ setDripY(0);
1784
+ };
1785
+ var createRipple = function createRipple(event) {
1786
+ var button = buttonRef.current;
1787
+ if (!button) return;
1788
+ var rect = button.getBoundingClientRect();
1789
+ var size = Math.max(rect.width, rect.height);
1790
+ var x = event.clientX - rect.left - size / 2;
1791
+ var y = event.clientY - rect.top - size / 2;
1792
+ var rippleCount = 1; // number of rings
1793
+ var rippleDelay = 500; // ms between each ripple
1794
+ var _loop = function _loop() {
1795
+ var ripple = document.createElement('span');
1796
+ Object.assign(ripple.style, {
1797
+ position: 'absolute',
1798
+ borderRadius: '50%',
1799
+ backgroundColor: rippleColor,
1800
+ width: "".concat(size, "px"),
1801
+ height: "".concat(size, "px"),
1802
+ left: "".concat(x, "px"),
1803
+ top: "".concat(y, "px"),
1804
+ pointerEvents: 'none',
1805
+ transform: 'scale(0)',
1806
+ opacity: '1',
1807
+ transition: "transform 600ms ease-out ".concat(i * rippleDelay, "ms, opacity 600ms ease-out ").concat(i * rippleDelay, "ms"),
1808
+ zIndex: 1
1809
+ });
1810
+ button.appendChild(ripple);
1811
+
1812
+ // Force reflow to start transition
1813
+ window.getComputedStyle(ripple).opacity;
1814
+ ripple.style.transform = 'scale(2.5)';
1815
+ ripple.style.opacity = '0';
1816
+ ripple.addEventListener('transitionend', function () {
1817
+ ripple.remove();
1818
+ });
1819
+ };
1820
+ for (var i = 0; i < rippleCount; i++) {
1821
+ _loop();
1822
+ }
1823
+ };
1824
+ var clickHandler = function clickHandler(event) {
1825
+ if (disabled || loading) return;
1826
+ var showDrip = !shadow && !ghost && effect;
1827
+ /* istanbul ignore next */
1828
+ if (showDrip && buttonRef.current) {
1829
+ var rect = buttonRef.current.getBoundingClientRect();
1830
+ setDripShow(true);
1831
+ setDripX(event.clientX - rect.left);
1832
+ setDripY(event.clientY - rect.top);
1833
+ }
1834
+ if (shadow) {
1835
+ createRipple(event);
1836
+ }
1837
+ onClick && onClick(event);
1838
+ };
1839
+ var childrenWithIcon = React.useMemo(function () {
1840
+ return getButtonChildrenWithIcon(auto, children, {
1841
+ icon: icon,
1842
+ iconRight: iconRight
1843
+ });
1844
+ }, [auto, children, icon, iconRight]);
1845
+ var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
1846
+ paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
1847
+
1848
+ // If shadow provided is string then value other default
1849
+ var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
1850
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1851
+ children: [to ? /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
1852
+ href: to
1853
+ }, props), {}, {
1854
+ className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || ""),
1855
+ children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
1856
+ color: color
1857
+ }), childrenWithIcon]
1858
+ })) : /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread2(_objectSpread2({
1859
+ ref: buttonRef,
1860
+ type: type,
1861
+ disabled: disabled,
1862
+ onClick: clickHandler
1863
+ }, props), {}, {
1864
+ className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', className) || ""),
1865
+ children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
1866
+ color: color
1867
+ }), childrenWithIcon, dripShow && /*#__PURE__*/jsxRuntime.jsx(ButtonDrip, {
1868
+ x: dripX,
1869
+ y: dripY,
1870
+ color: dripColor,
1871
+ onCompleted: dripCompletedHandle
1872
+ })]
1873
+ })), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1874
+ id: "612376042",
1875
+ dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px'],
1876
+ children: ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(round ? '50%' : theme$1.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(shadow ? 'transparent' : border, ";cursor:").concat(cursor !== null && cursor !== void 0 ? cursor : 'pointer', ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? btnShadow : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(btnShadow, ";}.btn-link.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}.ripple.__jsx-style-dynamic-selector{position:absolute;border-radius:50%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;background-color:rgba(0,0,0,0.3);pointer-events:none;z-index:1;}@-webkit-keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}@keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}")
1877
+ })]
1878
+ });
1879
+ });
1880
+ ButtonComponent.displayName = 'Button';
1881
+ var Button = withScale(ButtonComponent);
1882
+
1883
+ var CompactButton = function CompactButton(props) {
1884
+ // const theme = useTheme();
1885
+ return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
1886
+ scale: 2 / 3,
1887
+ px: 0.6
1888
+ }, _objectSpread2({
1889
+ auto: true
1890
+ }, props)), {}, {
1891
+ children: props.children
1892
+ }));
1893
+ };
1894
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
1895
+
1896
+ var SmallButton = function SmallButton(props) {
1897
+ // const theme = useTheme();
1898
+ return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
1899
+ auto: true,
1900
+ scale: 2 / 3,
1901
+ px: 0.6
1902
+ }, props), {}, {
1903
+ children: props.children
1904
+ }));
1905
+ };
1906
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
1907
+
1908
+ /* "use client" */
1909
+
1910
+ Button.Icon = IconButton;
1911
+ Button.Small = SmallButton$1;
1912
+
1913
+ var _excluded$2 = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className", "display", "alignItems", "justify"];
1914
+ var _getModifierChild = function getModifierChild(tags, children) {
1915
+ if (!tags.length) return children;
1916
+ var nextTag = tags.slice(1, tags.length);
1917
+ return /*#__PURE__*/jsxRuntime.jsx(TextChild, {
1918
+ tag: tags[0],
1919
+ children: _getModifierChild(nextTag, children)
1920
+ });
1921
+ };
1922
+ var TextComponent = function TextComponent(_ref) {
1923
+ var _ref$h = _ref.h1,
1924
+ h1 = _ref$h === void 0 ? false : _ref$h,
1925
+ _ref$h2 = _ref.h2,
1926
+ h2 = _ref$h2 === void 0 ? false : _ref$h2,
1927
+ _ref$h3 = _ref.h3,
1928
+ h3 = _ref$h3 === void 0 ? false : _ref$h3,
1929
+ _ref$h4 = _ref.h4,
1930
+ h4 = _ref$h4 === void 0 ? false : _ref$h4,
1931
+ _ref$h5 = _ref.h5,
1932
+ h5 = _ref$h5 === void 0 ? false : _ref$h5,
1933
+ _ref$h6 = _ref.h6,
1934
+ h6 = _ref$h6 === void 0 ? false : _ref$h6,
1935
+ _ref$p = _ref.p,
1936
+ p = _ref$p === void 0 ? false : _ref$p,
1937
+ _ref$b = _ref.b,
1938
+ b = _ref$b === void 0 ? false : _ref$b,
1939
+ _ref$small = _ref.small,
1940
+ small = _ref$small === void 0 ? false : _ref$small,
1941
+ _ref$i = _ref.i,
1942
+ i = _ref$i === void 0 ? false : _ref$i,
1943
+ _ref$span = _ref.span,
1944
+ span = _ref$span === void 0 ? false : _ref$span,
1945
+ _ref$del = _ref.del,
1946
+ del = _ref$del === void 0 ? false : _ref$del,
1947
+ _ref$em = _ref.em,
1948
+ em = _ref$em === void 0 ? false : _ref$em,
1949
+ _ref$blockquote = _ref.blockquote,
1950
+ blockquote = _ref$blockquote === void 0 ? false : _ref$blockquote,
1951
+ _ref$noWrap = _ref.noWrap,
1952
+ noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap,
1953
+ _ref$collapse = _ref.collapse,
1954
+ collapse = _ref$collapse === void 0 ? 0 : _ref$collapse,
1955
+ children = _ref.children,
1956
+ _ref$className = _ref.className,
1957
+ className = _ref$className === void 0 ? '' : _ref$className,
1958
+ _ref$display = _ref.display,
1959
+ display = _ref$display === void 0 ? 'block' : _ref$display,
1960
+ alignItems = _ref.alignItems,
1961
+ justify = _ref.justify,
1962
+ props = _objectWithoutProperties(_ref, _excluded$2);
1963
+ var elements = {
1964
+ h1: h1,
1965
+ h2: h2,
1966
+ h3: h3,
1967
+ h4: h4,
1968
+ h5: h5,
1969
+ h6: h6,
1970
+ p: p,
1971
+ blockquote: blockquote
1972
+ };
1973
+ var inlineElements = {
1974
+ span: span,
1975
+ small: small,
1976
+ b: b,
1977
+ em: em,
1978
+ i: i,
1979
+ del: del
1980
+ };
1981
+ var names = Object.keys(elements).filter(function (name) {
1982
+ return elements[name];
1983
+ });
1984
+ var inlineNames = Object.keys(inlineElements).filter(function (name) {
1985
+ return inlineElements[name];
1986
+ });
1987
+
1988
+ /**
1989
+ * Render element "p" only if no element is found.
1990
+ * If there is only one modifier, just rendered one modifier element
1991
+ * e.g.
1992
+ * <Text /> => <p />
1993
+ * <Text em /> => <em />
1994
+ * <Text p em /> => <p><em>children</em></p>
1995
+ *
1996
+ */
1997
+
1998
+ var _useState = React.useState(false),
1999
+ _useState2 = _slicedToArray(_useState, 2),
2000
+ expand = _useState2[0],
2001
+ setExpand = _useState2[1];
2002
+ var tag = React.useMemo(function () {
2003
+ if (names[0]) return names[0];
2004
+ if (inlineNames[0]) return inlineNames[0];
2005
+ return 'p';
2006
+ }, [names, inlineNames]);
2007
+ var renderableChildElements = inlineNames.filter(function (name) {
2008
+ return name !== tag;
2009
+ });
2010
+ var modifers = React.useMemo(function () {
2011
+ if (!renderableChildElements.length) return children;
2012
+ return _getModifierChild(renderableChildElements, children);
2013
+ }, [renderableChildElements, children]);
2014
+ return /*#__PURE__*/jsxRuntime.jsx(TextChild, _objectSpread2(_objectSpread2({
2015
+ style: {
2016
+ textAlign: props.align,
2017
+ display: display,
2018
+ alignItems: alignItems,
2019
+ justifyContent: justify
2020
+ },
2021
+ className: "".concat(className, " ").concat(noWrap ? 'no-wrap' : ''),
2022
+ tag: tag
2023
+ }, props), {}, {
2024
+ children: typeof children === 'string' && collapse > 50 ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2025
+ children: [expand ? modifers : (modifers === null || modifers === void 0 ? void 0 : modifers.toString().substring(0, collapse)) + '...', /*#__PURE__*/jsxRuntime.jsx(Button, {
2026
+ margin: 0,
2027
+ onClick: function onClick() {
2028
+ return setExpand(!expand);
2029
+ },
2030
+ style: {
2031
+ textTransform: 'lowercase'
2032
+ },
2033
+ effect: false,
2034
+ color: "abort",
2035
+ scale: 2 / 3,
2036
+ px: 0.2,
2037
+ py: 0,
2038
+ auto: true,
2039
+ children: /*#__PURE__*/jsxRuntime.jsx("b", {
2040
+ children: expand ? 'less' : 'more'
2041
+ })
2042
+ })]
2043
+ }) : modifers
2044
+ }));
2045
+ };
2046
+ TextComponent.displayName = 'Text';
2047
+ var Text = withScale(TextComponent);
2048
+
1145
2049
  var getColors = function getColors(palette, status) {
1146
2050
  var colors = {
1147
2051
  "default": {
@@ -1193,24 +2097,27 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function (_ref, inputRef) {
1193
2097
  (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.focus();
1194
2098
  }
1195
2099
  }, [visible]);
1196
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", {
1197
- ref: ref,
1198
- type: "search",
1199
- role: "combobox",
1200
- "aria-haspopup": "listbox",
1201
- readOnly: true,
1202
- unselectable: "on",
1203
- "aria-expanded": visible,
1204
- onBlur: onBlur,
1205
- onFocus: onFocus,
1206
- className: "jsx-2813108835"
1207
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
1208
- id: "2813108835"
1209
- }, "input.jsx-2813108835{position:fixed;top:-10000px;left:-10000px;opacity:0;z-index:-1;width:0;height:0;padding:0;font-size:0;border:none;}"));
2100
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2101
+ children: [/*#__PURE__*/jsxRuntime.jsx("input", {
2102
+ ref: ref,
2103
+ type: "search",
2104
+ role: "combobox",
2105
+ "aria-haspopup": "listbox",
2106
+ readOnly: true,
2107
+ unselectable: "on",
2108
+ "aria-expanded": visible,
2109
+ onBlur: onBlur,
2110
+ onFocus: onFocus,
2111
+ className: "jsx-2813108835"
2112
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
2113
+ id: "2813108835",
2114
+ children: "input.jsx-2813108835{position:fixed;top:-10000px;left:-10000px;opacity:0;z-index:-1;width:0;height:0;padding:0;font-size:0;border:none;}"
2115
+ })]
2116
+ });
1210
2117
  });
1211
2118
  SelectInput.displayName = 'SelectInput';
1212
2119
 
1213
- var _excluded$1 = ["children", "label", "type", "disabled", "initialValue", "value", "icon", "onChange", "pure", "multiple", "fullWidth", "clearable", "placeholder", "className", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "getPopupContainer", "onDropdownVisibleChange"];
2120
+ var _excluded$1 = ["children", "label", "type", "disabled", "initialValue", "value", "icon", "onChange", "pure", "multiple", "fullWidth", "clearable", "placeholder", "className", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "helperText", "error", "getPopupContainer", "onDropdownVisibleChange"];
1214
2121
  var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
1215
2122
  var children = _ref.children,
1216
2123
  label = _ref.label,
@@ -1238,6 +2145,8 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
1238
2145
  dropdownStyle = _ref.dropdownStyle,
1239
2146
  _ref$disableMatchWidt = _ref.disableMatchWidth,
1240
2147
  disableMatchWidth = _ref$disableMatchWidt === void 0 ? false : _ref$disableMatchWidt,
2148
+ helperText = _ref.helperText,
2149
+ error = _ref.error,
1241
2150
  getPopupContainer = _ref.getPopupContainer,
1242
2151
  _ref$onDropdownVisibl = _ref.onDropdownVisibleChange,
1243
2152
  onDropdownVisibleChange = _ref$onDropdownVisibl === void 0 ? function () {} : _ref$onDropdownVisibl,
@@ -1346,12 +2255,13 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
1346
2255
  if (! /*#__PURE__*/React.isValidElement(_child)) return null;
1347
2256
  var el = /*#__PURE__*/React.cloneElement(_child); // { preventAllEvents: true }
1348
2257
  if (!multiple) return el;
1349
- return /*#__PURE__*/React.createElement(SelectMultipleValue, {
2258
+ return /*#__PURE__*/jsxRuntime.jsx(SelectMultipleValue, {
1350
2259
  disabled: disabled,
1351
2260
  onClear: clearable ? function () {
1352
2261
  return updateValue(_child.props.value);
1353
- } : null
1354
- }, el);
2262
+ } : null,
2263
+ children: el
2264
+ });
1355
2265
  });
1356
2266
  }, [value, children, multiple]);
1357
2267
  var onInputBlur = function onInputBlur() {
@@ -1362,54 +2272,76 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
1362
2272
  active: selectFocus || visible,
1363
2273
  multiple: multiple
1364
2274
  }, className);
1365
- return /*#__PURE__*/React.createElement("div", {
1366
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
1367
- }, label && /*#__PURE__*/React.createElement("label", {
1368
- style: {
1369
- display: 'block',
1370
- marginBottom: '0.4rem',
1371
- fontSize: '14px',
1372
- fontWeight: 'light'
1373
- },
1374
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
1375
- }, label), /*#__PURE__*/React.createElement(SelectContext.Provider, {
1376
- value: initialValue
1377
- }, /*#__PURE__*/React.createElement("div", _extends({
1378
- ref: ref,
1379
- onClick: clickHandler,
1380
- onMouseDown: mouseDownHandler
1381
- }, props, {
1382
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + (props && props.className != null && props.className || classes || "")
1383
- }), /*#__PURE__*/React.createElement(SelectInput, {
1384
- ref: inputRef,
1385
- visible: visible,
1386
- onBlur: onInputBlur,
1387
- onFocus: function onFocus() {
1388
- return setSelectFocus(true);
1389
- }
1390
- }), isEmpty && /*#__PURE__*/React.createElement("span", {
1391
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value placeholder"
1392
- }, /*#__PURE__*/React.createElement(theme.Ellipsis, {
1393
- height: "var(--select-height)"
1394
- }, placeholder)), value && !multiple && /*#__PURE__*/React.createElement("span", {
1395
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value"
1396
- }, selectedChild), value && multiple && /*#__PURE__*/React.createElement(Grid.Container, {
1397
- gap: 0.5
1398
- }, selectedChild), /*#__PURE__*/React.createElement(SelectDropdown, {
1399
- ref: dropdownRef,
1400
- visible: visible,
1401
- className: dropdownClassName,
1402
- dropdownStyle: dropdownStyle,
1403
- disableMatchWidth: disableMatchWidth,
1404
- getPopupContainer: getPopupContainer
1405
- }, children), !pure && /*#__PURE__*/React.createElement("div", {
1406
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "icon"
1407
- }, /*#__PURE__*/React.createElement(Icon, {
1408
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
1409
- })))), /*#__PURE__*/React.createElement(_JSXStyle, {
1410
- id: "1795507141",
1411
- dynamic: [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]
1412
- }, ".select.__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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;position:relative;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";max-width:90vw;overflow:hidden;-webkit-transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;border:1px solid ").concat(border, ";border-radius:").concat(theme$1.layout.radius, ";background-color:").concat(disabled ? theme$1.palette.accents_1 : theme$1.palette.background, ";--select-font-size:").concat(SCALES.font(0.875), ";--select-height:").concat(SCALES.height(2.25), ";min-width:11.5em;width:").concat(SCALES.width(1, fullWidth ? '100%' : 'initial'), ";height:var(--select-height);padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.667), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.multiple.__jsx-style-dynamic-selector{height:auto;min-height:var(--select-height);padding:").concat(SCALES.pt(0.334), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0.334), " ").concat(SCALES.pl(0.667), ";}.select.active.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover{border-color:").concat(disabled ? theme$1.palette.border : borderActive, ";}.select.active.icon.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover .icon.__jsx-style-dynamic-selector{color:").concat(disabled ? theme$1.palette.accents_5 : borderActive, ";}.value.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;padding:0;margin-right:1.25em;font-size:var(--select-font-size);color:").concat(disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, ";width:calc(100% - 1.25em);}.value.__jsx-style-dynamic-selector>div,.value.__jsx-style-dynamic-selector>div:hover{border-radius:0;background-color:transparent;padding:0;margin:0;color:inherit;}.placeholder.__jsx-style-dynamic-selector{color:").concat(placeholderColor, ";}.icon.__jsx-style-dynamic-selector{position:absolute;right:").concat(theme$1.layout.gapQuarter, ";font-size:var(--select-font-size);top:50%;bottom:0;-webkit-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);-ms-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);pointer-events:none;-webkit-transition:-webkit-transform 200ms ease;-webkit-transition:transform 200ms ease;transition:transform 200ms ease;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(iconBorder, ";}")));
2275
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
2276
+ className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]),
2277
+ children: [label && /*#__PURE__*/jsxRuntime.jsx("label", {
2278
+ style: {
2279
+ display: 'block',
2280
+ marginBottom: '0.4rem',
2281
+ fontSize: '14px',
2282
+ fontWeight: 'light'
2283
+ },
2284
+ className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]),
2285
+ children: label
2286
+ }), /*#__PURE__*/jsxRuntime.jsx(SelectContext.Provider, {
2287
+ value: initialValue,
2288
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
2289
+ ref: ref,
2290
+ onClick: clickHandler,
2291
+ onMouseDown: mouseDownHandler
2292
+ }, props), {}, {
2293
+ className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + (props && props.className != null && props.className || classes || ""),
2294
+ children: [/*#__PURE__*/jsxRuntime.jsx(SelectInput, {
2295
+ ref: inputRef,
2296
+ visible: visible,
2297
+ onBlur: onInputBlur,
2298
+ onFocus: function onFocus() {
2299
+ return setSelectFocus(true);
2300
+ }
2301
+ }), isEmpty && /*#__PURE__*/jsxRuntime.jsx("span", {
2302
+ className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value placeholder",
2303
+ children: /*#__PURE__*/jsxRuntime.jsx(theme.Ellipsis, {
2304
+ height: "var(--select-height)",
2305
+ children: placeholder
2306
+ })
2307
+ }), value && !multiple && /*#__PURE__*/jsxRuntime.jsx("span", {
2308
+ className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value",
2309
+ children: selectedChild
2310
+ }), value && multiple && /*#__PURE__*/jsxRuntime.jsx(Grid.Container, {
2311
+ gap: 0.5,
2312
+ children: selectedChild
2313
+ }), /*#__PURE__*/jsxRuntime.jsx(SelectDropdown, {
2314
+ ref: dropdownRef,
2315
+ visible: visible,
2316
+ className: dropdownClassName,
2317
+ dropdownStyle: dropdownStyle,
2318
+ disableMatchWidth: disableMatchWidth,
2319
+ getPopupContainer: getPopupContainer,
2320
+ children: children
2321
+ }), !pure && /*#__PURE__*/jsxRuntime.jsx("div", {
2322
+ className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "icon",
2323
+ children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
2324
+ className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
2325
+ })
2326
+ })]
2327
+ }))
2328
+ }), helperText && /*#__PURE__*/jsxRuntime.jsxs(Text, {
2329
+ font: 0.8,
2330
+ style: {
2331
+ marginTop: 0.4,
2332
+ marginRight: 0,
2333
+ marginLeft: 0,
2334
+ marginBottom: '0.4rem',
2335
+ textAlign: 'left'
2336
+ },
2337
+ color: error ? "error" : 'default',
2338
+ children: ["\xA0", helperText]
2339
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
2340
+ id: "1795507141",
2341
+ dynamic: [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder],
2342
+ children: ".select.__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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;position:relative;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";max-width:90vw;overflow:hidden;-webkit-transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;border:1px solid ").concat(border, ";border-radius:").concat(theme$1.layout.radius, ";background-color:").concat(disabled ? theme$1.palette.accents_1 : theme$1.palette.background, ";--select-font-size:").concat(SCALES.font(0.875), ";--select-height:").concat(SCALES.height(2.25), ";min-width:11.5em;width:").concat(SCALES.width(1, fullWidth ? '100%' : 'initial'), ";height:var(--select-height);padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.667), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.multiple.__jsx-style-dynamic-selector{height:auto;min-height:var(--select-height);padding:").concat(SCALES.pt(0.334), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0.334), " ").concat(SCALES.pl(0.667), ";}.select.active.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover{border-color:").concat(disabled ? theme$1.palette.border : borderActive, ";}.select.active.icon.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover .icon.__jsx-style-dynamic-selector{color:").concat(disabled ? theme$1.palette.accents_5 : borderActive, ";}.value.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;padding:0;margin-right:1.25em;font-size:var(--select-font-size);color:").concat(disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, ";width:calc(100% - 1.25em);}.value.__jsx-style-dynamic-selector>div,.value.__jsx-style-dynamic-selector>div:hover{border-radius:0;background-color:transparent;padding:0;margin:0;color:inherit;}.placeholder.__jsx-style-dynamic-selector{color:").concat(placeholderColor, ";}.icon.__jsx-style-dynamic-selector{position:absolute;right:").concat(theme$1.layout.gapQuarter, ";font-size:var(--select-font-size);top:50%;bottom:0;-webkit-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);-ms-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);pointer-events:none;-webkit-transition:-webkit-transform 200ms ease;-webkit-transition:transform 200ms ease;transition:transform 200ms ease;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(iconBorder, ";}")
2343
+ })]
2344
+ });
1413
2345
  });
1414
2346
  SelectComponent.displayName = 'Select';
1415
2347
  var Select = withScale(SelectComponent);
@@ -1489,16 +2421,19 @@ var SelectOptionComponent = function SelectOptionComponent(_ref) {
1489
2421
  if (isDisabled || isLabel) return;
1490
2422
  updateValue && updateValue(identValue);
1491
2423
  };
1492
- return /*#__PURE__*/React.createElement("div", _extends({
2424
+ return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
1493
2425
  onClick: clickHandler
1494
- }, props, {
1495
- className: _JSXStyle.dynamic([["199367556", [bgColor, color, isDisabled ? 'not-allowed' : 'pointer', SCALES.font(0.75), SCALES.width(1, '100%'), SCALES.height(2.25), SCALES.pt(0), SCALES.pr(0.667), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBgColor, theme$1.palette.accents_7, theme$1.palette.border, SCALES.width(1, '100%'), SCALES.height(1, 0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0.5), SCALES.mr(0), SCALES.mb(0.5), SCALES.ml(0), theme$1.palette.accents_7, theme$1.palette.border, SCALES.font(0.875), SCALES.width(1, '100%')]]]) + " " + (props && props.className != null && props.className || classes || "")
1496
- }), /*#__PURE__*/React.createElement(theme.Ellipsis, {
1497
- height: SCALES.height(2.25)
1498
- }, children), /*#__PURE__*/React.createElement(_JSXStyle, {
1499
- id: "199367556",
1500
- dynamic: [bgColor, color, isDisabled ? 'not-allowed' : 'pointer', SCALES.font(0.75), SCALES.width(1, '100%'), SCALES.height(2.25), SCALES.pt(0), SCALES.pr(0.667), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBgColor, theme$1.palette.accents_7, theme$1.palette.border, SCALES.width(1, '100%'), SCALES.height(1, 0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0.5), SCALES.mr(0), SCALES.mb(0.5), SCALES.ml(0), theme$1.palette.accents_7, theme$1.palette.border, SCALES.font(0.875), SCALES.width(1, '100%')]
1501
- }, ".option.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:100%;box-sizing:border-box;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-weight:normal;background-color:".concat(bgColor, ";color:").concat(color, ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:0;cursor:").concat(isDisabled ? 'not-allowed' : 'pointer', ";-webkit-transition:background 0.2s ease 0s,border-color 0.2s ease 0s;transition:background 0.2s ease 0s,border-color 0.2s ease 0s;--select-font-size:").concat(SCALES.font(0.75), ";font-size:var(--select-font-size);width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(2.25), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.667), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.667), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.option.__jsx-style-dynamic-selector:hover{background-color:").concat(hoverBgColor, ";color:").concat(theme$1.palette.accents_7, ";}.divider.__jsx-style-dynamic-selector{line-height:0;overflow:hidden;border-top:1px solid ").concat(theme$1.palette.border, ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, 0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0.5), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0.5), " ").concat(SCALES.ml(0), ";}.label.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.accents_7, ";border-bottom:1px solid ").concat(theme$1.palette.border, ";text-transform:capitalize;cursor:default;font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, '100%'), ";font-weight:500;}")));
2426
+ }, props), {}, {
2427
+ className: _JSXStyle.dynamic([["199367556", [bgColor, color, isDisabled ? 'not-allowed' : 'pointer', SCALES.font(0.75), SCALES.width(1, '100%'), SCALES.height(2.25), SCALES.pt(0), SCALES.pr(0.667), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBgColor, theme$1.palette.accents_7, theme$1.palette.border, SCALES.width(1, '100%'), SCALES.height(1, 0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0.5), SCALES.mr(0), SCALES.mb(0.5), SCALES.ml(0), theme$1.palette.accents_7, theme$1.palette.border, SCALES.font(0.875), SCALES.width(1, '100%')]]]) + " " + (props && props.className != null && props.className || classes || ""),
2428
+ children: [/*#__PURE__*/jsxRuntime.jsx(theme.Ellipsis, {
2429
+ height: SCALES.height(2.25),
2430
+ children: children
2431
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
2432
+ id: "199367556",
2433
+ dynamic: [bgColor, color, isDisabled ? 'not-allowed' : 'pointer', SCALES.font(0.75), SCALES.width(1, '100%'), SCALES.height(2.25), SCALES.pt(0), SCALES.pr(0.667), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBgColor, theme$1.palette.accents_7, theme$1.palette.border, SCALES.width(1, '100%'), SCALES.height(1, 0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0.5), SCALES.mr(0), SCALES.mb(0.5), SCALES.ml(0), theme$1.palette.accents_7, theme$1.palette.border, SCALES.font(0.875), SCALES.width(1, '100%')],
2434
+ children: ".option.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:100%;box-sizing:border-box;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-weight:normal;background-color:".concat(bgColor, ";color:").concat(color, ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:0;cursor:").concat(isDisabled ? 'not-allowed' : 'pointer', ";-webkit-transition:background 0.2s ease 0s,border-color 0.2s ease 0s;transition:background 0.2s ease 0s,border-color 0.2s ease 0s;--select-font-size:").concat(SCALES.font(0.75), ";font-size:var(--select-font-size);width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(2.25), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.667), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.667), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.option.__jsx-style-dynamic-selector:hover{background-color:").concat(hoverBgColor, ";color:").concat(theme$1.palette.accents_7, ";}.divider.__jsx-style-dynamic-selector{line-height:0;overflow:hidden;border-top:1px solid ").concat(theme$1.palette.border, ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, 0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0.5), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0.5), " ").concat(SCALES.ml(0), ";}.label.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.accents_7, ";border-bottom:1px solid ").concat(theme$1.palette.border, ";text-transform:capitalize;cursor:default;font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, '100%'), ";font-weight:500;}")
2435
+ })]
2436
+ }));
1502
2437
  };
1503
2438
  SelectOptionComponent.displayName = 'SelectOption';
1504
2439
  var SelectOption = withScale(SelectOptionComponent);