@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
package/dist/keyboard/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);
|
|
@@ -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;
|
|
@@ -837,22 +874,29 @@ var KeyboardComponent = function KeyboardComponent(_ref) {
|
|
|
837
874
|
var theme$1 = theme.useTheme();
|
|
838
875
|
var _useScale = useScale(),
|
|
839
876
|
SCALES = _useScale.SCALES;
|
|
840
|
-
return /*#__PURE__*/
|
|
841
|
-
className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || className || "")
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
877
|
+
return /*#__PURE__*/jsxRuntime.jsxs("kbd", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
878
|
+
className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || className || ""),
|
|
879
|
+
children: [command && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
880
|
+
className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
|
|
881
|
+
children: "\u2318"
|
|
882
|
+
}), shift && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
883
|
+
className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
|
|
884
|
+
children: "\u21E7"
|
|
885
|
+
}), option && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
886
|
+
className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
|
|
887
|
+
children: "\u2325"
|
|
888
|
+
}), ctrl && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
889
|
+
className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
|
|
890
|
+
children: "\u2303"
|
|
891
|
+
}), children && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
892
|
+
className: _JSXStyle.dynamic([["921453049", [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]),
|
|
893
|
+
children: children
|
|
894
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
895
|
+
id: "921453049",
|
|
896
|
+
dynamic: [theme$1.palette.accents_5, theme$1.palette.accents_1, theme$1.font.sans, theme$1.layout.radius, theme$1.palette.accents_2, SCALES.font(0.875), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.34), SCALES.pb(0), SCALES.pl(0.34), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)],
|
|
897
|
+
children: "kbd.__jsx-style-dynamic-selector{line-height:2em;text-align:center;display:inline-block;color:".concat(theme$1.palette.accents_5, ";background-color:").concat(theme$1.palette.accents_1, ";font-family:").concat(theme$1.font.sans, ";border-radius:").concat(theme$1.layout.radius, ";border:1px solid ").concat(theme$1.palette.accents_2, ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";min-width:2em;min-height:2em;padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.34), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.34), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}span.__jsx-style-dynamic-selector{line-height:2em;font-size:1em;text-align:center;}span.__jsx-style-dynamic-selector+span.__jsx-style-dynamic-selector{margin-left:0.3em;}")
|
|
898
|
+
})]
|
|
899
|
+
}));
|
|
856
900
|
};
|
|
857
901
|
KeyboardComponent.displayName = 'Keyboard';
|
|
858
902
|
var Keyboard = withScale(KeyboardComponent);
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var require$$1 = require('react');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
|
|
7
8
|
function getDefaultExportFromCjs (x) {
|
|
8
9
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -15,11 +16,11 @@ var hasRequiredIndex;
|
|
|
15
16
|
function requireIndex () {
|
|
16
17
|
if (hasRequiredIndex) return index;
|
|
17
18
|
hasRequiredIndex = 1;
|
|
18
|
-
var React
|
|
19
|
+
var React = require$$1;
|
|
19
20
|
|
|
20
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
22
|
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React
|
|
23
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
24
|
|
|
24
25
|
/*
|
|
25
26
|
Based on Glamor's sheet
|
|
@@ -455,15 +456,15 @@ function requireIndex () {
|
|
|
455
456
|
throw new Error("StyleSheetRegistry: " + message + ".");
|
|
456
457
|
}
|
|
457
458
|
}
|
|
458
|
-
var StyleSheetContext = /*#__PURE__*/ React
|
|
459
|
+
var StyleSheetContext = /*#__PURE__*/ React.createContext(null);
|
|
459
460
|
StyleSheetContext.displayName = "StyleSheetContext";
|
|
460
461
|
function createStyleRegistry() {
|
|
461
462
|
return new StyleSheetRegistry();
|
|
462
463
|
}
|
|
463
464
|
function StyleRegistry(param) {
|
|
464
465
|
var configuredRegistry = param.registry, children = param.children;
|
|
465
|
-
var rootRegistry = React
|
|
466
|
-
var ref = React
|
|
466
|
+
var rootRegistry = React.useContext(StyleSheetContext);
|
|
467
|
+
var ref = React.useState(function() {
|
|
467
468
|
return rootRegistry || configuredRegistry || createStyleRegistry();
|
|
468
469
|
}), registry = ref[0];
|
|
469
470
|
return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
|
|
@@ -471,16 +472,16 @@ function requireIndex () {
|
|
|
471
472
|
}, children);
|
|
472
473
|
}
|
|
473
474
|
function useStyleRegistry() {
|
|
474
|
-
return React
|
|
475
|
+
return React.useContext(StyleSheetContext);
|
|
475
476
|
}
|
|
476
477
|
|
|
477
478
|
// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
|
|
478
479
|
// https://github.com/reactwg/react-18/discussions/110
|
|
479
|
-
var useInsertionEffect = React__default["default"].useInsertionEffect || React
|
|
480
|
+
var useInsertionEffect = React__default["default"].useInsertionEffect || React.useLayoutEffect;
|
|
480
481
|
var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
|
|
481
482
|
function JSXStyle(props) {
|
|
482
483
|
var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
|
|
483
|
-
var insertionEffectCalled = React
|
|
484
|
+
var insertionEffectCalled = React.useRef(false);
|
|
484
485
|
// `registry` might not exist while server-side rendering
|
|
485
486
|
if (!registry) {
|
|
486
487
|
return null;
|
|
@@ -504,7 +505,7 @@ function requireIndex () {
|
|
|
504
505
|
props.id,
|
|
505
506
|
String(props.dynamic)
|
|
506
507
|
]);
|
|
507
|
-
React
|
|
508
|
+
React.useLayoutEffect(function() {
|
|
508
509
|
if (!document.head || insertionEffectCalled.current) {
|
|
509
510
|
return;
|
|
510
511
|
}
|
|
@@ -557,20 +558,22 @@ var LinearProgress = function LinearProgress(_ref) {
|
|
|
557
558
|
speed = _ref$speed === void 0 ? 1.5 : _ref$speed;
|
|
558
559
|
if (!isActive) return null;
|
|
559
560
|
var isDeterminate = typeof progress === 'number' && progress >= 0 && progress <= 100;
|
|
560
|
-
return /*#__PURE__*/
|
|
561
|
-
className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "loader-wrapper"
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
561
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
562
|
+
className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "loader-wrapper",
|
|
563
|
+
children: [isDeterminate ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
564
|
+
style: {
|
|
565
|
+
width: "".concat(progress, "%"),
|
|
566
|
+
backgroundColor: color
|
|
567
|
+
},
|
|
568
|
+
className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "determinate-bar"
|
|
569
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
570
|
+
className: _JSXStyle.dynamic([["2900495535", [color, speed]]]) + " " + "indeterminate-loader"
|
|
571
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
572
|
+
id: "2900495535",
|
|
573
|
+
dynamic: [color, speed],
|
|
574
|
+
children: ".loader-wrapper.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;width:100%;height:4px;background:rgba(0,0,0,0.05);z-index:2000;overflow:hidden;}.determinate-bar.__jsx-style-dynamic-selector{height:100%;-webkit-transition:width 0.3s ease;transition:width 0.3s ease;}.indeterminate-loader.__jsx-style-dynamic-selector{width:100%;height:100%;background:linear-gradient( to right, transparent 0%, ".concat(color, " 50%, transparent 100% );background-size:200% 100%;-webkit-animation:slide-__jsx-style-dynamic-selector ").concat(speed, "s linear infinite;animation:slide-__jsx-style-dynamic-selector ").concat(speed, "s linear infinite;}@-webkit-keyframes slide-__jsx-style-dynamic-selector{from{background-position:-100% 0;}to{background-position:100% 0;}}@keyframes slide-__jsx-style-dynamic-selector{from{background-position:-100% 0;}to{background-position:100% 0;}}")
|
|
575
|
+
})]
|
|
576
|
+
});
|
|
574
577
|
};
|
|
575
578
|
|
|
576
579
|
exports.default = LinearProgress;
|
package/dist/link/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);
|
|
@@ -61,14 +62,13 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, _extends.apply(null, arguments);
|
|
65
|
+
function _defineProperty(e, r, t) {
|
|
66
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
67
|
+
value: t,
|
|
68
|
+
enumerable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
writable: true
|
|
71
|
+
}) : e[r] = t, e;
|
|
72
72
|
}
|
|
73
73
|
function _iterableToArrayLimit(r, l) {
|
|
74
74
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -97,6 +97,27 @@ function _iterableToArrayLimit(r, l) {
|
|
|
97
97
|
function _nonIterableRest() {
|
|
98
98
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
99
99
|
}
|
|
100
|
+
function ownKeys(e, r) {
|
|
101
|
+
var t = Object.keys(e);
|
|
102
|
+
if (Object.getOwnPropertySymbols) {
|
|
103
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
104
|
+
r && (o = o.filter(function (r) {
|
|
105
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
106
|
+
})), t.push.apply(t, o);
|
|
107
|
+
}
|
|
108
|
+
return t;
|
|
109
|
+
}
|
|
110
|
+
function _objectSpread2(e) {
|
|
111
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
112
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
113
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
114
|
+
_defineProperty(e, r, t[r]);
|
|
115
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
116
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return e;
|
|
120
|
+
}
|
|
100
121
|
function _objectWithoutProperties(e, t) {
|
|
101
122
|
if (null == e) return {};
|
|
102
123
|
var o,
|
|
@@ -120,6 +141,20 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
120
141
|
function _slicedToArray(r, e) {
|
|
121
142
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
122
143
|
}
|
|
144
|
+
function _toPrimitive(t, r) {
|
|
145
|
+
if ("object" != typeof t || !t) return t;
|
|
146
|
+
var e = t[Symbol.toPrimitive];
|
|
147
|
+
if (void 0 !== e) {
|
|
148
|
+
var i = e.call(t, r);
|
|
149
|
+
if ("object" != typeof i) return i;
|
|
150
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
151
|
+
}
|
|
152
|
+
return ("string" === r ? String : Number)(t);
|
|
153
|
+
}
|
|
154
|
+
function _toPropertyKey(t) {
|
|
155
|
+
var i = _toPrimitive(t, "string");
|
|
156
|
+
return "symbol" == typeof i ? i : i + "";
|
|
157
|
+
}
|
|
123
158
|
function _unsupportedIterableToArray(r, a) {
|
|
124
159
|
if (r) {
|
|
125
160
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
@@ -672,7 +707,7 @@ var styleExports = requireStyle();
|
|
|
672
707
|
var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
|
|
673
708
|
|
|
674
709
|
var LinkIconComponent = function LinkIconComponent() {
|
|
675
|
-
return /*#__PURE__*/
|
|
710
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
676
711
|
viewBox: "0 0 24 24",
|
|
677
712
|
width: "0.9375em",
|
|
678
713
|
height: "0.9375em",
|
|
@@ -682,19 +717,21 @@ var LinkIconComponent = function LinkIconComponent() {
|
|
|
682
717
|
strokeLinejoin: "round",
|
|
683
718
|
fill: "none",
|
|
684
719
|
shapeRendering: "geometricPrecision",
|
|
685
|
-
className: "jsx-3409194595" + " " + "icon"
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
720
|
+
className: "jsx-3409194595" + " " + "icon",
|
|
721
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
722
|
+
d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6",
|
|
723
|
+
className: "jsx-3409194595"
|
|
724
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
725
|
+
d: "M15 3h6v6",
|
|
726
|
+
className: "jsx-3409194595"
|
|
727
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
728
|
+
d: "M10 14L21 3",
|
|
729
|
+
className: "jsx-3409194595"
|
|
730
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
731
|
+
id: "3409194595",
|
|
732
|
+
children: ".icon.jsx-3409194595{margin:0 0 -1px 0.1875em;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;color:currentColor;}"
|
|
733
|
+
})]
|
|
734
|
+
});
|
|
698
735
|
};
|
|
699
736
|
LinkIconComponent.displayName = 'LinkIcon';
|
|
700
737
|
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
@@ -906,11 +943,13 @@ var withScale = function withScale(Render) {
|
|
|
906
943
|
getScaleProps: generateGetScaleProps(props),
|
|
907
944
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
908
945
|
};
|
|
909
|
-
return /*#__PURE__*/
|
|
910
|
-
value: value
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
946
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
947
|
+
value: value,
|
|
948
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
949
|
+
ref: ref,
|
|
950
|
+
children: children
|
|
951
|
+
}))
|
|
952
|
+
});
|
|
914
953
|
});
|
|
915
954
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
916
955
|
return ScaleFC;
|
|
@@ -942,17 +981,20 @@ var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
942
981
|
var classes = theme.useClasses('link', {
|
|
943
982
|
block: block
|
|
944
983
|
}, className);
|
|
945
|
-
return /*#__PURE__*/
|
|
984
|
+
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
946
985
|
href: href
|
|
947
|
-
}, props, {
|
|
986
|
+
}, props), {}, {
|
|
948
987
|
ref: ref,
|
|
949
|
-
className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
988
|
+
className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
989
|
+
children: [icon && icon, /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
990
|
+
className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + "link-extra",
|
|
991
|
+
children: [children, arrow && /*#__PURE__*/jsxRuntime.jsx(LinkIcon, {})]
|
|
992
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
993
|
+
id: "1962988967",
|
|
994
|
+
dynamic: [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor],
|
|
995
|
+
children: ".link.__jsx-style-dynamic-selector,.link-extra.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme$1.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")
|
|
996
|
+
})]
|
|
997
|
+
}));
|
|
956
998
|
});
|
|
957
999
|
LinkComponent.displayName = 'Link';
|
|
958
1000
|
var Link = withScale(LinkComponent);
|