@helpdice/ui 2.5.8-beta.0 → 2.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-complete/index.js +549 -491
- package/dist/avatar/index.js +82 -45
- package/dist/badge/index.js +69 -27
- package/dist/breadcrumbs/index.js +107 -56
- package/dist/button/button.icon.d.ts +3 -15
- package/dist/button/button.small.d.ts +3 -15
- package/dist/button/index.js +143 -155
- package/dist/button-dropdown/index.js +96 -83
- package/dist/button-group/index.js +61 -21
- package/dist/capacity/index.js +61 -22
- package/dist/card/index.js +147 -123
- package/dist/carousal/index.js +349 -328
- package/dist/checkbox/index.js +72 -67
- package/dist/circular-progress/CircularProgress.d.ts +17 -0
- package/dist/circular-progress/index.d.ts +3 -4
- package/dist/circular-progress/index.js +713 -336
- package/dist/circular-progress/useCircularProgress.d.ts +12 -0
- package/dist/code/index.js +70 -26
- package/dist/col/index.js +61 -24
- package/dist/collapse/index.js +102 -52
- package/dist/container/index.js +187 -188
- package/dist/copy-to-clipboard/index.js +158 -208
- package/dist/description/index.js +64 -23
- package/dist/display/index.js +64 -23
- package/dist/divider/index.js +62 -22
- package/dist/dot/index.js +63 -23
- package/dist/drawer/index.js +74 -61
- package/dist/fieldset/index.js +127 -63
- package/dist/form/index.js +15 -40
- package/dist/grid/index.js +74 -29
- package/dist/html-renderer/index.js +3 -2
- package/dist/image/index.js +163 -104
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4172 -3745
- package/dist/input/index.js +466 -419
- package/dist/keyboard/index.js +73 -29
- package/dist/linear-progress/index.js +27 -24
- package/dist/link/index.js +78 -36
- package/dist/list/index.js +118 -63
- package/dist/loadable/index.js +76 -27
- package/dist/loading/index.js +70 -29
- package/dist/menu/index.js +53 -47
- package/dist/modal/index.js +225 -178
- package/dist/note/index.js +64 -23
- package/dist/notetip/index.js +54 -45
- package/dist/notetip/note-tip.d.ts +2 -0
- package/dist/page/index.js +102 -51
- package/dist/pagination/index.js +180 -123
- package/dist/placeholder/index.js +545 -534
- package/dist/popover/index.js +94 -81
- package/dist/progress/index.js +66 -27
- package/dist/radio/index.js +94 -48
- package/dist/rating/index.js +78 -38
- package/dist/row/index.js +62 -25
- package/dist/search-bar/index.js +172 -162
- package/dist/select/index.js +364 -327
- package/dist/slider/index.js +91 -47
- package/dist/snippet/index.js +39 -39
- package/dist/spacer/index.js +58 -19
- package/dist/spinner/index.js +69 -28
- package/dist/swipe/index.js +28 -13
- package/dist/table/index.js +2216 -1973
- package/dist/table/table-body.d.ts +4 -2
- package/dist/table/table-cell.d.ts +4 -2
- package/dist/table/table-types.d.ts +2 -0
- package/dist/table/table.d.ts +4 -1
- package/dist/tabs/index.js +61 -59
- package/dist/tag/index.js +16 -20
- package/dist/text/index.js +178 -180
- package/dist/textarea/index.js +220 -214
- package/dist/toggle/index.js +75 -33
- package/dist/tooltip/index.d.ts +1 -2
- package/dist/tooltip/index.js +59 -52
- package/dist/tooltip/tooltip-content.d.ts +1 -1
- package/dist/tooltip/tooltip.d.ts +2 -1
- package/dist/tree/index.js +176 -115
- package/dist/use-scale/index.js +50 -13
- package/dist/user/index.js +146 -96
- package/esm/button/button.icon.d.ts +3 -15
- package/esm/button/button.icon.js +22 -22
- package/esm/button/button.js +4 -4
- package/esm/button/button.small.d.ts +3 -15
- package/esm/button/button.small.js +20 -21
- package/esm/circular-progress/CircularProgress.d.ts +17 -0
- package/esm/circular-progress/CircularProgress.js +110 -0
- package/esm/circular-progress/index.d.ts +3 -4
- package/esm/circular-progress/index.js +3 -4
- package/esm/circular-progress/useCircularProgress.d.ts +12 -0
- package/esm/circular-progress/useCircularProgress.js +35 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +1 -1
- package/esm/list/list-item.js +11 -11
- package/esm/notetip/note-tip.d.ts +2 -0
- package/esm/notetip/note-tip.js +8 -5
- package/esm/skeleton/index.js +9 -4
- package/esm/table/table-body.d.ts +4 -2
- package/esm/table/table-body.js +9 -4
- package/esm/table/table-cell.d.ts +4 -2
- package/esm/table/table-cell.js +19 -3
- package/esm/table/table-types.d.ts +2 -0
- package/esm/table/table.d.ts +4 -1
- package/esm/table/table.js +13 -6
- package/esm/tooltip/index.d.ts +1 -2
- package/esm/tooltip/tooltip-content.d.ts +1 -1
- package/esm/tooltip/tooltip-content.js +5 -5
- package/esm/tooltip/tooltip.d.ts +2 -1
- package/esm/tooltip/tooltip.js +6 -5
- package/package.json +3 -3
- package/dist/circular-progress/CircularProgressbar.d.ts +0 -10
- package/dist/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
- package/dist/circular-progress/Path.d.ts +0 -9
- package/dist/circular-progress/buildStyles.d.ts +0 -12
- package/dist/circular-progress/constants.d.ts +0 -5
- package/dist/circular-progress/types.d.ts +0 -50
- package/esm/circular-progress/CircularProgressbar.d.ts +0 -10
- package/esm/circular-progress/CircularProgressbar.js +0 -118
- package/esm/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
- package/esm/circular-progress/CircularProgressbarWithChildren.js +0 -32
- package/esm/circular-progress/Path.d.ts +0 -9
- package/esm/circular-progress/Path.js +0 -52
- package/esm/circular-progress/buildStyles.d.ts +0 -12
- package/esm/circular-progress/buildStyles.js +0 -45
- package/esm/circular-progress/constants.d.ts +0 -5
- package/esm/circular-progress/constants.js +0 -5
- package/esm/circular-progress/types.d.ts +0 -50
- 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);
|
|
@@ -69,15 +70,6 @@ function _defineProperty(e, r, t) {
|
|
|
69
70
|
writable: true
|
|
70
71
|
}) : e[r] = t, e;
|
|
71
72
|
}
|
|
72
|
-
function _extends() {
|
|
73
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
74
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
75
|
-
var t = arguments[e];
|
|
76
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
77
|
-
}
|
|
78
|
-
return n;
|
|
79
|
-
}, _extends.apply(null, arguments);
|
|
80
|
-
}
|
|
81
73
|
function _iterableToArrayLimit(r, l) {
|
|
82
74
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
83
75
|
if (null != t) {
|
|
@@ -783,7 +775,7 @@ var getColor = function getColor(palette, type) {
|
|
|
783
775
|
var ButtonDropdownIcon = function ButtonDropdownIcon(_ref) {
|
|
784
776
|
var color = _ref.color,
|
|
785
777
|
height = _ref.height;
|
|
786
|
-
return /*#__PURE__*/
|
|
778
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
787
779
|
stroke: color,
|
|
788
780
|
style: {
|
|
789
781
|
color: color
|
|
@@ -796,13 +788,15 @@ var ButtonDropdownIcon = function ButtonDropdownIcon(_ref) {
|
|
|
796
788
|
strokeLinejoin: "round",
|
|
797
789
|
fill: "none",
|
|
798
790
|
shapeRendering: "geometricPrecision",
|
|
799
|
-
className: "jsx-3359574434"
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
791
|
+
className: "jsx-3359574434",
|
|
792
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
793
|
+
d: "M6 9l6 6 6-6",
|
|
794
|
+
className: "jsx-3359574434"
|
|
795
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
796
|
+
id: "3359574434",
|
|
797
|
+
children: "svg.jsx-3359574434{-webkit-transform:scale(0.6);-ms-transform:scale(0.6);transform:scale(0.6);}"
|
|
798
|
+
})]
|
|
799
|
+
});
|
|
806
800
|
};
|
|
807
801
|
ButtonDropdownIcon.displayName = 'ButtonDropdownIcon';
|
|
808
802
|
|
|
@@ -1027,11 +1021,13 @@ var withScale = function withScale(Render) {
|
|
|
1027
1021
|
getScaleProps: generateGetScaleProps(props),
|
|
1028
1022
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
1029
1023
|
};
|
|
1030
|
-
return /*#__PURE__*/
|
|
1031
|
-
value: value
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1024
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
1025
|
+
value: value,
|
|
1026
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1027
|
+
ref: ref,
|
|
1028
|
+
children: children
|
|
1029
|
+
}))
|
|
1030
|
+
});
|
|
1035
1031
|
});
|
|
1036
1032
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
1037
1033
|
return ScaleFC;
|
|
@@ -1065,22 +1061,26 @@ var LoadingComponent = function LoadingComponent(_ref) {
|
|
|
1065
1061
|
var bgColor = React.useMemo(function () {
|
|
1066
1062
|
return getIconBgColor(type, theme$1.palette, color);
|
|
1067
1063
|
}, [type, theme$1.palette, color]);
|
|
1068
|
-
return /*#__PURE__*/
|
|
1069
|
-
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 || "")
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1064
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1065
|
+
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 || ""),
|
|
1066
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1067
|
+
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",
|
|
1068
|
+
children: [children && /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
1069
|
+
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]]]),
|
|
1070
|
+
children: children
|
|
1071
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
1072
|
+
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]]])
|
|
1073
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
1074
|
+
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]]])
|
|
1075
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
1076
|
+
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]]])
|
|
1077
|
+
})]
|
|
1078
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1079
|
+
id: "2201634259",
|
|
1080
|
+
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],
|
|
1081
|
+
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;}}")
|
|
1082
|
+
})]
|
|
1083
|
+
}));
|
|
1084
1084
|
};
|
|
1085
1085
|
LoadingComponent.displayName = 'Loading';
|
|
1086
1086
|
var Loading = withScale(LoadingComponent);
|
|
@@ -1114,22 +1114,27 @@ var ButtonDropdownItem = function ButtonDropdownItem(_ref) {
|
|
|
1114
1114
|
if (loading) return 'default';
|
|
1115
1115
|
return disabled ? 'not-allowed' : 'pointer';
|
|
1116
1116
|
}, [loading, disabled]);
|
|
1117
|
-
return /*#__PURE__*/
|
|
1117
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread2(_objectSpread2({
|
|
1118
1118
|
type: "button",
|
|
1119
1119
|
onClick: clickHandler
|
|
1120
|
-
}, props, {
|
|
1121
|
-
className: _JSXStyle.dynamic([["352843599", [cursor, colors.bgColor, colors.color, colors.hoverBorder, colors.hoverBgColor]]]) + " " + (props && props.className != null && props.className || className || "")
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1120
|
+
}, props), {}, {
|
|
1121
|
+
className: _JSXStyle.dynamic([["352843599", [cursor, colors.bgColor, colors.color, colors.hoverBorder, colors.hoverBgColor]]]) + " " + (props && props.className != null && props.className || className || ""),
|
|
1122
|
+
children: [loading ? /*#__PURE__*/jsxRuntime.jsx(Loading, {}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1123
|
+
children: [icon && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1124
|
+
style: {
|
|
1125
|
+
color: colors.color,
|
|
1126
|
+
// height: SCALES.height(2.5),
|
|
1127
|
+
width: SCALES.height(2.5)
|
|
1128
|
+
},
|
|
1129
|
+
className: _JSXStyle.dynamic([["352843599", [cursor, colors.bgColor, colors.color, colors.hoverBorder, colors.hoverBgColor]]]),
|
|
1130
|
+
children: icon
|
|
1131
|
+
}), children]
|
|
1132
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1133
|
+
id: "352843599",
|
|
1134
|
+
dynamic: [cursor, colors.bgColor, colors.color, colors.hoverBorder, colors.hoverBgColor],
|
|
1135
|
+
children: "button.__jsx-style-dynamic-selector{position:relative;-webkit-appearance:button;text-rendering:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:1;-ms-flex:1;flex:1;gap:2;-webkit-box-pack:left;-webkit-justify-content:left;-ms-flex-pack:left;justify-content:left;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;vertical-align:middle;text-align:center;cursor:".concat(cursor, ";box-sizing:border-box;margin:0;border:none;background-color:").concat(colors.bgColor, ";color:").concat(colors.color, ";width:100%;height:var(--helpdice-ui-dropdown-height);min-width:var(--helpdice-ui-dropdown-min-width);padding:var(--helpdice-ui-dropdown-padding);font-size:var(--helpdice-ui-dropdown-font-size);}button.__jsx-style-dynamic-selector:hover{border-color:").concat(colors.hoverBorder, ";background-color:").concat(colors.hoverBgColor, ";}")
|
|
1136
|
+
})]
|
|
1137
|
+
}));
|
|
1133
1138
|
};
|
|
1134
1139
|
ButtonDropdownItem.displayName = 'ButtonDropdownItem';
|
|
1135
1140
|
|
|
@@ -1187,37 +1192,45 @@ var ButtonDropdownComponent = function ButtonDropdownComponent(_ref) {
|
|
|
1187
1192
|
useClickAway(ref, function () {
|
|
1188
1193
|
return setVisible(false);
|
|
1189
1194
|
});
|
|
1190
|
-
return /*#__PURE__*/
|
|
1191
|
-
value: initialValue
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1195
|
+
return /*#__PURE__*/jsxRuntime.jsx(ButtonDropdownContext.Provider, {
|
|
1196
|
+
value: initialValue,
|
|
1197
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
|
|
1198
|
+
ref: ref,
|
|
1199
|
+
onClick: stopPropagation
|
|
1200
|
+
}, props), {}, {
|
|
1201
|
+
className: _JSXStyle.dynamic([["4074061604", [theme$1.palette.border, theme$1.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.layout.gapHalf, theme$1.palette.background, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius]]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn-dropdown', className) || ""),
|
|
1202
|
+
children: [mainItemChildren, /*#__PURE__*/jsxRuntime.jsxs("details", {
|
|
1203
|
+
open: visible,
|
|
1204
|
+
className: _JSXStyle.dynamic([["4074061604", [theme$1.palette.border, theme$1.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.layout.gapHalf, theme$1.palette.background, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius]]]),
|
|
1205
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("summary", {
|
|
1206
|
+
onClick: clickHandler,
|
|
1207
|
+
className: _JSXStyle.dynamic([["4074061604", [theme$1.palette.border, theme$1.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.layout.gapHalf, theme$1.palette.background, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius]]]),
|
|
1208
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1209
|
+
className: _JSXStyle.dynamic([["4074061604", [theme$1.palette.border, theme$1.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.layout.gapHalf, theme$1.palette.background, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius]]]) + " " + "dropdown-box",
|
|
1210
|
+
children: icon ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1211
|
+
style: {
|
|
1212
|
+
color: colors.color,
|
|
1213
|
+
height: SCALES.height(2.5),
|
|
1214
|
+
width: SCALES.height(2.5)
|
|
1215
|
+
},
|
|
1216
|
+
className: _JSXStyle.dynamic([["4074061604", [theme$1.palette.border, theme$1.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.layout.gapHalf, theme$1.palette.background, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius]]]) + " " + "dropdown-icon",
|
|
1217
|
+
children: icon
|
|
1218
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(ButtonDropdownIcon, {
|
|
1219
|
+
color: colors.color,
|
|
1220
|
+
height: SCALES.height(2.5)
|
|
1221
|
+
})
|
|
1222
|
+
})
|
|
1223
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1224
|
+
className: _JSXStyle.dynamic([["4074061604", [theme$1.palette.border, theme$1.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.layout.gapHalf, theme$1.palette.background, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius]]]) + " " + "content",
|
|
1225
|
+
children: itemChildrenWithoutMain
|
|
1226
|
+
})]
|
|
1227
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1228
|
+
id: "4074061604",
|
|
1229
|
+
dynamic: [theme$1.palette.border, theme$1.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme$1.layout.radius, theme$1.expressiveness.shadowLarge, theme$1.layout.gapHalf, theme$1.palette.background, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius, theme$1.layout.radius],
|
|
1230
|
+
children: ".btn-dropdown.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;box-sizing:border-box;border:1px solid ".concat(theme$1.palette.border, ";border-radius:").concat(theme$1.layout.radius, ";--helpdice-ui-dropdown-height:").concat(SCALES.height(2.5), ";--helpdice-ui-dropdown-min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";--helpdice-ui-dropdown-padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";--helpdice-ui-dropdown-font-size:").concat(SCALES.font(0.875), ";}.btn-dropdown.__jsx-style-dynamic-selector>button{border-top-left-radius:").concat(theme$1.layout.radius, ";border-bottom-left-radius:").concat(theme$1.layout.radius, ";}details.__jsx-style-dynamic-selector{border-top-right-radius:").concat(theme$1.layout.radius, ";border-bottom-right-radius:").concat(theme$1.layout.radius, ";overflow:hidden;}.dropdown-box.__jsx-style-dynamic-selector{height:").concat(SCALES.height(2.5), ";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;width:auto;}summary.__jsx-style-dynamic-selector{box-sizing:border-box;-webkit-tap-highlight-color:transparent;list-style:none;outline:none;color:").concat(colors.color, ";background-color:").concat(bgColor, ";height:").concat(SCALES.height(2.5), ";border-left:1px solid ").concat(colors.borderLeftColor, ";cursor:").concat(disabled || loading ? 'not-allowed' : 'pointer', ";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;width:auto;padding:0 1px;-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;}summary.__jsx-style-dynamic-selector:hover{border-color:").concat(colors.hoverBorder, ";background-color:").concat(colors.hoverBgColor, ";}.content.__jsx-style-dynamic-selector{position:absolute;display:grid;right:0;left:0;z-index:90;width:100%;border-radius:").concat(theme$1.layout.radius, ";box-shadow:").concat(theme$1.expressiveness.shadowLarge, ";-webkit-transform:translateY(").concat(theme$1.layout.gapHalf, ");-ms-transform:translateY(").concat(theme$1.layout.gapHalf, ");transform:translateY(").concat(theme$1.layout.gapHalf, ");background-color:").concat(theme$1.palette.background, ";}.content.__jsx-style-dynamic-selector>button:first-of-type{border-top-left-radius:").concat(theme$1.layout.radius, ";border-top-right-radius:").concat(theme$1.layout.radius, ";}.content.__jsx-style-dynamic-selector>button:last-of-type{border-bottom-left-radius:").concat(theme$1.layout.radius, ";border-bottom-right-radius:").concat(theme$1.layout.radius, ";}.dropdown-icon.__jsx-style-dynamic-selector{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;-webkit-transform:scale(0.6);-ms-transform:scale(0.6);transform:scale(0.6);}")
|
|
1231
|
+
})]
|
|
1232
|
+
}))
|
|
1233
|
+
});
|
|
1221
1234
|
};
|
|
1222
1235
|
ButtonDropdownComponent.displayName = 'ButtonDropdown';
|
|
1223
1236
|
var ButtonDropdown = withScale(ButtonDropdownComponent);
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var theme = require('@helpdice/theme');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
|
|
8
9
|
function _arrayLikeToArray(r, a) {
|
|
9
10
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -58,14 +59,34 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
function _defineProperty(e, r, t) {
|
|
63
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
64
|
+
value: t,
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
writable: true
|
|
68
|
+
}) : e[r] = t, e;
|
|
69
|
+
}
|
|
70
|
+
function ownKeys(e, r) {
|
|
71
|
+
var t = Object.keys(e);
|
|
72
|
+
if (Object.getOwnPropertySymbols) {
|
|
73
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
74
|
+
r && (o = o.filter(function (r) {
|
|
75
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
76
|
+
})), t.push.apply(t, o);
|
|
77
|
+
}
|
|
78
|
+
return t;
|
|
79
|
+
}
|
|
80
|
+
function _objectSpread2(e) {
|
|
81
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
82
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
83
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
84
|
+
_defineProperty(e, r, t[r]);
|
|
85
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
86
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return e;
|
|
69
90
|
}
|
|
70
91
|
function _objectWithoutProperties(e, t) {
|
|
71
92
|
if (null == e) return {};
|
|
@@ -87,6 +108,20 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
87
108
|
}
|
|
88
109
|
return t;
|
|
89
110
|
}
|
|
111
|
+
function _toPrimitive(t, r) {
|
|
112
|
+
if ("object" != typeof t || !t) return t;
|
|
113
|
+
var e = t[Symbol.toPrimitive];
|
|
114
|
+
if (void 0 !== e) {
|
|
115
|
+
var i = e.call(t, r);
|
|
116
|
+
if ("object" != typeof i) return i;
|
|
117
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
118
|
+
}
|
|
119
|
+
return ("string" === r ? String : Number)(t);
|
|
120
|
+
}
|
|
121
|
+
function _toPropertyKey(t) {
|
|
122
|
+
var i = _toPrimitive(t, "string");
|
|
123
|
+
return "symbol" == typeof i ? i : i + "";
|
|
124
|
+
}
|
|
90
125
|
function _unsupportedIterableToArray(r, a) {
|
|
91
126
|
if (r) {
|
|
92
127
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
@@ -818,11 +853,13 @@ var withScale = function withScale(Render) {
|
|
|
818
853
|
getScaleProps: generateGetScaleProps(props),
|
|
819
854
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
820
855
|
};
|
|
821
|
-
return /*#__PURE__*/
|
|
822
|
-
value: value
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
856
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
857
|
+
value: value,
|
|
858
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
859
|
+
ref: ref,
|
|
860
|
+
children: children
|
|
861
|
+
}))
|
|
862
|
+
});
|
|
826
863
|
});
|
|
827
864
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
828
865
|
return ScaleFC;
|
|
@@ -871,14 +908,17 @@ var ButtonGroupComponent = function ButtonGroupComponent(groupProps) {
|
|
|
871
908
|
vertical: vertical,
|
|
872
909
|
horizontal: !vertical
|
|
873
910
|
}, className);
|
|
874
|
-
return /*#__PURE__*/
|
|
875
|
-
value: initialValue
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
911
|
+
return /*#__PURE__*/jsxRuntime.jsx(ButtonGroupContext.Provider, {
|
|
912
|
+
value: initialValue,
|
|
913
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
914
|
+
className: _JSXStyle.dynamic([["3616385743", [theme$1.layout.radius, border, SCALES.width(1, 'auto'), SCALES.height(1, 'min-content'), SCALES.mt(0.313), SCALES.mr(0.313), SCALES.mb(0.313), SCALES.ml(0.313), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), border, border]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
915
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
916
|
+
id: "3616385743",
|
|
917
|
+
dynamic: [theme$1.layout.radius, border, SCALES.width(1, 'auto'), SCALES.height(1, 'min-content'), SCALES.mt(0.313), SCALES.mr(0.313), SCALES.mb(0.313), SCALES.ml(0.313), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), border, border],
|
|
918
|
+
children: ".btn-group.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;border-radius:".concat(theme$1.layout.radius, ";border:1px solid ").concat(border, ";background-color:transparent;overflow:hidden;width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'min-content'), ";margin:").concat(SCALES.mt(0.313), " ").concat(SCALES.mr(0.313), " ").concat(SCALES.mb(0.313), " ").concat(SCALES.ml(0.313), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.vertical.__jsx-style-dynamic-selector{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.btn-group.__jsx-style-dynamic-selector .btn{border:none;}.btn-group.__jsx-style-dynamic-selector .btn .text{top:0;}.horizontal.__jsx-style-dynamic-selector .btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;border-left:1px solid ").concat(border, ";}.horizontal.__jsx-style-dynamic-selector .btn:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;}.vertical.__jsx-style-dynamic-selector .btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-top:1px solid ").concat(border, ";}.vertical.__jsx-style-dynamic-selector .btn:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0;}")
|
|
919
|
+
})]
|
|
920
|
+
}))
|
|
921
|
+
});
|
|
882
922
|
};
|
|
883
923
|
ButtonGroupComponent.displayName = 'ButtonGroup';
|
|
884
924
|
var ButtonGroup = withScale(ButtonGroupComponent);
|
package/dist/capacity/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var theme = require('@helpdice/theme');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
|
|
8
9
|
function _arrayLikeToArray(r, a) {
|
|
9
10
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -58,14 +59,34 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
function _defineProperty(e, r, t) {
|
|
63
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
64
|
+
value: t,
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
writable: true
|
|
68
|
+
}) : e[r] = t, e;
|
|
69
|
+
}
|
|
70
|
+
function ownKeys(e, r) {
|
|
71
|
+
var t = Object.keys(e);
|
|
72
|
+
if (Object.getOwnPropertySymbols) {
|
|
73
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
74
|
+
r && (o = o.filter(function (r) {
|
|
75
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
76
|
+
})), t.push.apply(t, o);
|
|
77
|
+
}
|
|
78
|
+
return t;
|
|
79
|
+
}
|
|
80
|
+
function _objectSpread2(e) {
|
|
81
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
82
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
83
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
84
|
+
_defineProperty(e, r, t[r]);
|
|
85
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
86
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return e;
|
|
69
90
|
}
|
|
70
91
|
function _objectWithoutProperties(e, t) {
|
|
71
92
|
if (null == e) return {};
|
|
@@ -87,6 +108,20 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
87
108
|
}
|
|
88
109
|
return t;
|
|
89
110
|
}
|
|
111
|
+
function _toPrimitive(t, r) {
|
|
112
|
+
if ("object" != typeof t || !t) return t;
|
|
113
|
+
var e = t[Symbol.toPrimitive];
|
|
114
|
+
if (void 0 !== e) {
|
|
115
|
+
var i = e.call(t, r);
|
|
116
|
+
if ("object" != typeof i) return i;
|
|
117
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
118
|
+
}
|
|
119
|
+
return ("string" === r ? String : Number)(t);
|
|
120
|
+
}
|
|
121
|
+
function _toPropertyKey(t) {
|
|
122
|
+
var i = _toPrimitive(t, "string");
|
|
123
|
+
return "symbol" == typeof i ? i : i + "";
|
|
124
|
+
}
|
|
90
125
|
function _unsupportedIterableToArray(r, a) {
|
|
91
126
|
if (r) {
|
|
92
127
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
@@ -839,11 +874,13 @@ var withScale = function withScale(Render) {
|
|
|
839
874
|
getScaleProps: generateGetScaleProps(props),
|
|
840
875
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
841
876
|
};
|
|
842
|
-
return /*#__PURE__*/
|
|
843
|
-
value: value
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
877
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
878
|
+
value: value,
|
|
879
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
880
|
+
ref: ref,
|
|
881
|
+
children: children
|
|
882
|
+
}))
|
|
883
|
+
});
|
|
847
884
|
});
|
|
848
885
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
849
886
|
return ScaleFC;
|
|
@@ -873,16 +910,18 @@ var CapacityComponent = function CapacityComponent(_ref) {
|
|
|
873
910
|
if (userColor && userColor !== '') return userColor;
|
|
874
911
|
return getColor(percentValue, theme$1.palette);
|
|
875
912
|
}, [userColor, percentValue, theme$1.palette]);
|
|
876
|
-
return /*#__PURE__*/
|
|
913
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
|
|
877
914
|
title: "".concat(percentValue, "%")
|
|
878
|
-
}, props, {
|
|
879
|
-
className: _JSXStyle.dynamic([["2706946339", [SCALES.width(3.125), SCALES.height(0.625), theme$1.layout.radius, theme$1.palette.accents_2, SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), percentValue, color]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
915
|
+
}, props), {}, {
|
|
916
|
+
className: _JSXStyle.dynamic([["2706946339", [SCALES.width(3.125), SCALES.height(0.625), theme$1.layout.radius, theme$1.palette.accents_2, SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), percentValue, color]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
917
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
918
|
+
className: _JSXStyle.dynamic([["2706946339", [SCALES.width(3.125), SCALES.height(0.625), theme$1.layout.radius, theme$1.palette.accents_2, SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), percentValue, color]]])
|
|
919
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
920
|
+
id: "2706946339",
|
|
921
|
+
dynamic: [SCALES.width(3.125), SCALES.height(0.625), theme$1.layout.radius, theme$1.palette.accents_2, SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), percentValue, color],
|
|
922
|
+
children: ".capacity.__jsx-style-dynamic-selector{width:".concat(SCALES.width(3.125), ";height:").concat(SCALES.height(0.625), ";border-radius:").concat(theme$1.layout.radius, ";overflow:hidden;background-color:").concat(theme$1.palette.accents_2, ";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), ";}span.__jsx-style-dynamic-selector{width:").concat(percentValue, "%;background-color:").concat(color, ";height:100%;margin:0;padding:0;display:block;}")
|
|
923
|
+
})]
|
|
924
|
+
}));
|
|
886
925
|
};
|
|
887
926
|
CapacityComponent.displayName = 'Capacity';
|
|
888
927
|
var Capacity = withScale(CapacityComponent);
|