@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.
- package/dist/auto-complete/index.js +1273 -404
- package/dist/avatar/index.js +88 -49
- package/dist/badge/index.js +69 -27
- package/dist/breadcrumbs/index.js +107 -56
- package/dist/button/button.icon.d.ts +3 -16
- package/dist/button/button.small.d.ts +3 -16
- package/dist/button/index.js +143 -157
- 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 -330
- 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 -190
- package/dist/copy-to-clipboard/index.js +158 -210
- 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 +5240 -4755
- package/dist/input/index.js +1183 -277
- 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 +181 -124
- package/dist/placeholder/index.js +554 -538
- 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 +1098 -163
- package/dist/select/select.d.ts +2 -0
- 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 +4162 -3863
- package/dist/table/table-body.d.ts +4 -3
- package/dist/table/table-cell.d.ts +4 -2
- package/dist/table/table-types.d.ts +2 -0
- package/dist/table/table.d.ts +5 -1
- package/dist/tabs/index.js +61 -59
- package/dist/tag/index.js +16 -20
- package/dist/text/index.js +187 -184
- package/dist/text/text.d.ts +3 -0
- package/dist/textarea/index.js +916 -36
- package/dist/textarea/textarea.d.ts +3 -0
- package/dist/toggle/index.js +75 -33
- package/dist/tooltip/index.d.ts +1 -2
- package/dist/tooltip/index.js +59 -53
- package/dist/tooltip/tooltip-content.d.ts +1 -1
- package/dist/tooltip/tooltip-small.d.ts +2 -5
- 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 +152 -100
- package/esm/avatar/avatar.js +8 -6
- package/esm/button/button.icon.d.ts +3 -16
- package/esm/button/button.icon.js +22 -22
- package/esm/button/button.js +5 -5
- package/esm/button/button.small.d.ts +3 -16
- package/esm/button/button.small.js +20 -23
- 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/input/input-field.js +11 -9
- 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/pagination/pagination-item.js +6 -6
- package/esm/select/select.d.ts +2 -0
- package/esm/select/select.js +15 -2
- package/esm/skeleton/index.js +9 -4
- package/esm/table/table-body.d.ts +4 -3
- package/esm/table/table-body.js +25 -15
- 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 +5 -1
- package/esm/table/table.js +52 -25
- package/esm/text/text.d.ts +3 -0
- package/esm/text/text.js +9 -2
- package/esm/textarea/textarea.d.ts +3 -0
- package/esm/textarea/textarea.js +19 -2
- 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-small.d.ts +2 -5
- package/esm/tooltip/tooltip-small.js +0 -1
- 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
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var icons = require('@helpdice/icons');
|
|
7
7
|
var theme = require('@helpdice/theme');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
9
|
|
|
9
10
|
function _arrayLikeToArray(r, a) {
|
|
10
11
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -70,15 +71,6 @@ function _defineProperty(e, r, t) {
|
|
|
70
71
|
writable: true
|
|
71
72
|
}) : e[r] = t, e;
|
|
72
73
|
}
|
|
73
|
-
function _extends() {
|
|
74
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
75
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
76
|
-
var t = arguments[e];
|
|
77
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
78
|
-
}
|
|
79
|
-
return n;
|
|
80
|
-
}, _extends.apply(null, arguments);
|
|
81
|
-
}
|
|
82
74
|
function _iterableToArrayLimit(r, l) {
|
|
83
75
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
84
76
|
if (null != t) {
|
|
@@ -1024,11 +1016,13 @@ var withScale = function withScale(Render) {
|
|
|
1024
1016
|
getScaleProps: generateGetScaleProps(props),
|
|
1025
1017
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
1026
1018
|
};
|
|
1027
|
-
return /*#__PURE__*/
|
|
1028
|
-
value: value
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1019
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
1020
|
+
value: value,
|
|
1021
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1022
|
+
ref: ref,
|
|
1023
|
+
children: children
|
|
1024
|
+
}))
|
|
1025
|
+
});
|
|
1032
1026
|
});
|
|
1033
1027
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
1034
1028
|
return ScaleFC;
|
|
@@ -1056,35 +1050,40 @@ var ButtonDrip = function ButtonDrip(_ref) {
|
|
|
1056
1050
|
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
1057
1051
|
};
|
|
1058
1052
|
});
|
|
1059
|
-
return /*#__PURE__*/
|
|
1053
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1060
1054
|
ref: dripRef,
|
|
1061
|
-
className: "jsx-3424889537" + " " + "drip"
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1055
|
+
className: "jsx-3424889537" + " " + "drip",
|
|
1056
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
1057
|
+
width: "20",
|
|
1058
|
+
height: "20",
|
|
1059
|
+
viewBox: "0 0 20 20",
|
|
1060
|
+
style: {
|
|
1061
|
+
top: top,
|
|
1062
|
+
left: left
|
|
1063
|
+
},
|
|
1064
|
+
className: "jsx-3424889537",
|
|
1065
|
+
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
1066
|
+
stroke: "none",
|
|
1067
|
+
strokeWidth: "1",
|
|
1068
|
+
fill: "none",
|
|
1069
|
+
fillRule: "evenodd",
|
|
1070
|
+
className: "jsx-3424889537",
|
|
1071
|
+
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
1072
|
+
fill: color,
|
|
1073
|
+
className: "jsx-3424889537",
|
|
1074
|
+
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1075
|
+
width: "100%",
|
|
1076
|
+
height: "100%",
|
|
1077
|
+
rx: "10",
|
|
1078
|
+
className: "jsx-3424889537"
|
|
1079
|
+
})
|
|
1080
|
+
})
|
|
1081
|
+
})
|
|
1082
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1083
|
+
id: "3424889537",
|
|
1084
|
+
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;}}"
|
|
1085
|
+
})]
|
|
1086
|
+
});
|
|
1088
1087
|
};
|
|
1089
1088
|
ButtonDrip.displayName = 'ButtonDrip';
|
|
1090
1089
|
|
|
@@ -1116,35 +1115,41 @@ var LoadingComponent = function LoadingComponent(_ref) {
|
|
|
1116
1115
|
var bgColor = React.useMemo(function () {
|
|
1117
1116
|
return getIconBgColor(type, theme$1.palette, color);
|
|
1118
1117
|
}, [type, theme$1.palette, color]);
|
|
1119
|
-
return /*#__PURE__*/
|
|
1120
|
-
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 || "")
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1118
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1119
|
+
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 || ""),
|
|
1120
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1121
|
+
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",
|
|
1122
|
+
children: [children && /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
1123
|
+
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]]]),
|
|
1124
|
+
children: children
|
|
1125
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
1126
|
+
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]]])
|
|
1127
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
1128
|
+
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]]])
|
|
1129
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
1130
|
+
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]]])
|
|
1131
|
+
})]
|
|
1132
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1133
|
+
id: "2201634259",
|
|
1134
|
+
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],
|
|
1135
|
+
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;}}")
|
|
1136
|
+
})]
|
|
1137
|
+
}));
|
|
1135
1138
|
};
|
|
1136
1139
|
LoadingComponent.displayName = 'Loading';
|
|
1137
1140
|
var Loading = withScale(LoadingComponent);
|
|
1138
1141
|
|
|
1139
1142
|
var ButtonLoading = function ButtonLoading(_ref) {
|
|
1140
1143
|
var color = _ref.color;
|
|
1141
|
-
return /*#__PURE__*/
|
|
1142
|
-
className: "jsx-212623367" + " " + "btn-loading"
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1144
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1145
|
+
className: "jsx-212623367" + " " + "btn-loading",
|
|
1146
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Loading, {
|
|
1147
|
+
color: color
|
|
1148
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1149
|
+
id: "212623367",
|
|
1150
|
+
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);}"
|
|
1151
|
+
})]
|
|
1152
|
+
});
|
|
1148
1153
|
};
|
|
1149
1154
|
ButtonLoading.displayName = 'ButtonLoading';
|
|
1150
1155
|
|
|
@@ -1161,11 +1166,13 @@ var ButtonIcon = function ButtonIcon(_ref) {
|
|
|
1161
1166
|
right: isRight,
|
|
1162
1167
|
single: isSingle
|
|
1163
1168
|
}, className);
|
|
1164
|
-
return /*#__PURE__*/
|
|
1165
|
-
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || "")
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1170
|
+
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || ""),
|
|
1171
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1172
|
+
id: "2467502931",
|
|
1173
|
+
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;}"
|
|
1174
|
+
})]
|
|
1175
|
+
}));
|
|
1169
1176
|
};
|
|
1170
1177
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
1171
1178
|
|
|
@@ -1176,23 +1183,30 @@ var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, childre
|
|
|
1176
1183
|
var isRight = Boolean(iconRight);
|
|
1177
1184
|
var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
|
|
1178
1185
|
var classes = theme.useClasses('text', isRight ? 'right' : 'left');
|
|
1179
|
-
if (!hasIcon) return /*#__PURE__*/
|
|
1180
|
-
className: "text"
|
|
1181
|
-
|
|
1186
|
+
if (!hasIcon) return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1187
|
+
className: "text",
|
|
1188
|
+
children: children
|
|
1189
|
+
});
|
|
1182
1190
|
if (React.Children.count(children) === 0) {
|
|
1183
|
-
return /*#__PURE__*/
|
|
1191
|
+
return /*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
|
|
1184
1192
|
isRight: isRight,
|
|
1185
|
-
isSingle: true
|
|
1186
|
-
|
|
1193
|
+
isSingle: true,
|
|
1194
|
+
children: hasIcon
|
|
1195
|
+
});
|
|
1187
1196
|
}
|
|
1188
|
-
return /*#__PURE__*/
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1197
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1198
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
|
|
1199
|
+
isRight: isRight,
|
|
1200
|
+
children: hasIcon
|
|
1201
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1202
|
+
className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || ""),
|
|
1203
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1204
|
+
id: "3568181479",
|
|
1205
|
+
dynamic: [paddingForAutoMode, paddingForAutoMode],
|
|
1206
|
+
children: ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}")
|
|
1207
|
+
})]
|
|
1208
|
+
})]
|
|
1209
|
+
});
|
|
1196
1210
|
};
|
|
1197
1211
|
var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
|
|
1198
1212
|
if (!config.isButtonGroup) return props;
|
|
@@ -1596,89 +1610,61 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1596
1610
|
|
|
1597
1611
|
// If shadow provided is string then value other default
|
|
1598
1612
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1599
|
-
return /*#__PURE__*/
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1613
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1614
|
+
children: [to ? /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
1615
|
+
href: to
|
|
1616
|
+
}, props), {}, {
|
|
1617
|
+
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) || ""),
|
|
1618
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
1619
|
+
color: color
|
|
1620
|
+
}), childrenWithIcon]
|
|
1621
|
+
})) : /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread2(_objectSpread2({
|
|
1622
|
+
ref: buttonRef,
|
|
1623
|
+
type: type,
|
|
1624
|
+
disabled: disabled,
|
|
1625
|
+
onClick: clickHandler
|
|
1626
|
+
}, props), {}, {
|
|
1627
|
+
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) || ""),
|
|
1628
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
1629
|
+
color: color
|
|
1630
|
+
}), childrenWithIcon, dripShow && /*#__PURE__*/jsxRuntime.jsx(ButtonDrip, {
|
|
1631
|
+
x: dripX,
|
|
1632
|
+
y: dripY,
|
|
1633
|
+
color: dripColor,
|
|
1634
|
+
onCompleted: dripCompletedHandle
|
|
1635
|
+
})]
|
|
1636
|
+
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1637
|
+
id: "612376042",
|
|
1638
|
+
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'],
|
|
1639
|
+
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;}}")
|
|
1640
|
+
})]
|
|
1641
|
+
});
|
|
1623
1642
|
});
|
|
1624
1643
|
ButtonComponent.displayName = 'Button';
|
|
1625
1644
|
var Button = withScale(ButtonComponent);
|
|
1626
1645
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
var CompactButton = function CompactButton(_ref) {
|
|
1630
|
-
_ref.color;
|
|
1631
|
-
var children = _ref.children,
|
|
1632
|
-
iconRight = _ref.iconRight,
|
|
1633
|
-
icon = _ref.icon,
|
|
1634
|
-
_ref$scale = _ref.scale,
|
|
1635
|
-
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1636
|
-
type = _ref.type,
|
|
1637
|
-
style = _ref.style,
|
|
1638
|
-
onClick = _ref.onClick,
|
|
1639
|
-
to = _ref.to;
|
|
1646
|
+
var CompactButton = function CompactButton(props) {
|
|
1640
1647
|
// const theme = useTheme();
|
|
1641
|
-
return /*#__PURE__*/
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
px: 0.6,
|
|
1650
|
-
iconRight: iconRight
|
|
1651
|
-
}, children);
|
|
1648
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
1649
|
+
scale: 2 / 3,
|
|
1650
|
+
px: 0.6
|
|
1651
|
+
}, _objectSpread2({
|
|
1652
|
+
auto: true
|
|
1653
|
+
}, props)), {}, {
|
|
1654
|
+
children: props.children
|
|
1655
|
+
}));
|
|
1652
1656
|
};
|
|
1653
1657
|
var IconButton = /*#__PURE__*/React.memo(CompactButton);
|
|
1654
1658
|
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
var SmallButton = function SmallButton(_ref) {
|
|
1658
|
-
_ref.color;
|
|
1659
|
-
var children = _ref.children,
|
|
1660
|
-
iconRight = _ref.iconRight,
|
|
1661
|
-
icon = _ref.icon,
|
|
1662
|
-
_ref$scale = _ref.scale,
|
|
1663
|
-
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1664
|
-
type = _ref.type,
|
|
1665
|
-
style = _ref.style,
|
|
1666
|
-
onClick = _ref.onClick,
|
|
1667
|
-
to = _ref.to,
|
|
1668
|
-
a = _ref.a;
|
|
1659
|
+
var SmallButton = function SmallButton(props) {
|
|
1669
1660
|
// const theme = useTheme();
|
|
1670
|
-
return /*#__PURE__*/
|
|
1671
|
-
to: to,
|
|
1672
|
-
a: a,
|
|
1673
|
-
icon: icon,
|
|
1674
|
-
style: style,
|
|
1675
|
-
type: type,
|
|
1676
|
-
onClick: onClick,
|
|
1661
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
1677
1662
|
auto: true,
|
|
1678
|
-
scale:
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1663
|
+
scale: 2 / 3,
|
|
1664
|
+
px: 0.6
|
|
1665
|
+
}, props), {}, {
|
|
1666
|
+
children: props.children
|
|
1667
|
+
}));
|
|
1682
1668
|
};
|
|
1683
1669
|
var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
|
|
1684
1670
|
|
|
@@ -1687,47 +1673,6 @@ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
|
|
|
1687
1673
|
Button.Icon = IconButton;
|
|
1688
1674
|
Button.Small = SmallButton$1;
|
|
1689
1675
|
|
|
1690
|
-
// export function Clipboard(props: ClipboardProps) {
|
|
1691
|
-
// const { setToast } = useToasts();
|
|
1692
|
-
// const { showIcon, text, onCopy, options: options, children, } = props;
|
|
1693
|
-
// const elem: ReactNode = React.Children.only(children) as ReactNode;
|
|
1694
|
-
// const onClick = (event: MouseEventHandler<HTMLButtonElement | MouseEvent>) => {
|
|
1695
|
-
// const result = copy(text, options);
|
|
1696
|
-
|
|
1697
|
-
// if (result) {
|
|
1698
|
-
// setToast({
|
|
1699
|
-
// text: 'Text Copied'
|
|
1700
|
-
// });
|
|
1701
|
-
// }
|
|
1702
|
-
|
|
1703
|
-
// if (onCopy) {
|
|
1704
|
-
// onCopy(text, result);
|
|
1705
|
-
// }
|
|
1706
|
-
|
|
1707
|
-
// // Bypass onClick if it was present
|
|
1708
|
-
// if (elem && elem.props && typeof elem.props.onClick === 'function') {
|
|
1709
|
-
// elem.props.onClick(event);
|
|
1710
|
-
// }
|
|
1711
|
-
// };
|
|
1712
|
-
|
|
1713
|
-
// if (showIcon) {
|
|
1714
|
-
// return React.cloneElement(
|
|
1715
|
-
// <div>
|
|
1716
|
-
// {elem}
|
|
1717
|
-
// <Button auto scale={0.1} px={0.6} onClick={onClick} icon={<Copy />} />
|
|
1718
|
-
// </div>,
|
|
1719
|
-
// { ...props }
|
|
1720
|
-
// );
|
|
1721
|
-
// }
|
|
1722
|
-
|
|
1723
|
-
// return React.cloneElement(
|
|
1724
|
-
// <div onClick={onClick}>
|
|
1725
|
-
// {elem}
|
|
1726
|
-
// </div>,
|
|
1727
|
-
// { ...props }
|
|
1728
|
-
// );
|
|
1729
|
-
// }
|
|
1730
|
-
|
|
1731
1676
|
function Clipboard(props) {
|
|
1732
1677
|
var _useToasts = theme.useToasts(),
|
|
1733
1678
|
setToast = _useToasts.setToast;
|
|
@@ -1756,21 +1701,24 @@ function Clipboard(props) {
|
|
|
1756
1701
|
|
|
1757
1702
|
// If showIcon is true, render the child + a copy icon button
|
|
1758
1703
|
if (showIcon) {
|
|
1759
|
-
return /*#__PURE__*/
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1704
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1705
|
+
children: [elem, /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1706
|
+
auto: true,
|
|
1707
|
+
scale: 0.1,
|
|
1708
|
+
px: 0.6,
|
|
1709
|
+
onClick: function onClick() {
|
|
1710
|
+
return _onClick;
|
|
1711
|
+
},
|
|
1712
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(icons.Copy, {})
|
|
1713
|
+
})]
|
|
1714
|
+
});
|
|
1768
1715
|
}
|
|
1769
1716
|
|
|
1770
1717
|
// Otherwise, make the entire div clickable for copy
|
|
1771
|
-
return /*#__PURE__*/React.cloneElement(/*#__PURE__*/
|
|
1772
|
-
onClick: _onClick
|
|
1773
|
-
|
|
1718
|
+
return /*#__PURE__*/React.cloneElement(/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1719
|
+
onClick: _onClick,
|
|
1720
|
+
children: elem
|
|
1721
|
+
}), _objectSpread2({}, props));
|
|
1774
1722
|
}
|
|
1775
1723
|
|
|
1776
1724
|
exports.default = Clipboard;
|
|
@@ -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);
|
|
@@ -810,11 +845,13 @@ var withScale = function withScale(Render) {
|
|
|
810
845
|
getScaleProps: generateGetScaleProps(props),
|
|
811
846
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
812
847
|
};
|
|
813
|
-
return /*#__PURE__*/
|
|
814
|
-
value: value
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
848
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
849
|
+
value: value,
|
|
850
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
851
|
+
ref: ref,
|
|
852
|
+
children: children
|
|
853
|
+
}))
|
|
854
|
+
});
|
|
818
855
|
});
|
|
819
856
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
820
857
|
return ScaleFC;
|
|
@@ -833,16 +870,20 @@ var DescriptionComponent = function DescriptionComponent(_ref) {
|
|
|
833
870
|
var _useScale = useScale(),
|
|
834
871
|
SCALES = _useScale.SCALES;
|
|
835
872
|
var classes = theme.useClasses('description', className);
|
|
836
|
-
return /*#__PURE__*/
|
|
837
|
-
className: _JSXStyle.dynamic([["2323318745", [SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), 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, theme$1.palette.foreground]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
873
|
+
return /*#__PURE__*/jsxRuntime.jsxs("dl", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
874
|
+
className: _JSXStyle.dynamic([["2323318745", [SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), 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, theme$1.palette.foreground]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
875
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("dt", {
|
|
876
|
+
className: _JSXStyle.dynamic([["2323318745", [SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), 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, theme$1.palette.foreground]]]),
|
|
877
|
+
children: title
|
|
878
|
+
}), /*#__PURE__*/jsxRuntime.jsx("dd", {
|
|
879
|
+
className: _JSXStyle.dynamic([["2323318745", [SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), 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, theme$1.palette.foreground]]]),
|
|
880
|
+
children: content
|
|
881
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
882
|
+
id: "2323318745",
|
|
883
|
+
dynamic: [SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), 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, theme$1.palette.foreground],
|
|
884
|
+
children: ".description.__jsx-style-dynamic-selector{font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}dt.__jsx-style-dynamic-selector{font-size:0.75em;line-height:1em;margin-bottom:0.5em;text-transform:uppercase;white-space:nowrap;color:").concat(theme$1.palette.accents_5, ";font-weight:500;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}dd.__jsx-style-dynamic-selector{font-size:0.875em;margin:0;line-height:1.1em;color:").concat(theme$1.palette.foreground, ";font-weight:500;}dd.__jsx-style-dynamic-selector p,dt.__jsx-style-dynamic-selector p{margin:0;}")
|
|
885
|
+
})]
|
|
886
|
+
}));
|
|
846
887
|
};
|
|
847
888
|
DescriptionComponent.displayName = 'Description';
|
|
848
889
|
var Description = withScale(DescriptionComponent);
|