@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
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
iconRight?: React.ReactNode;
|
|
6
|
-
to: string;
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
scale?: number;
|
|
9
|
-
type?: any;
|
|
10
|
-
style?: CSSProperties;
|
|
11
|
-
target?: string;
|
|
12
|
-
color?: ButtonTypes;
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
};
|
|
15
|
-
declare const _default: React.NamedExoticComponent<SmallButtonProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
3
|
+
declare const _default: React.NamedExoticComponent<ButtonProps>;
|
|
16
4
|
export default _default;
|
package/dist/button/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);
|
|
@@ -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) {
|
|
@@ -889,11 +881,13 @@ var withScale = function withScale(Render) {
|
|
|
889
881
|
getScaleProps: generateGetScaleProps(props),
|
|
890
882
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
891
883
|
};
|
|
892
|
-
return /*#__PURE__*/
|
|
893
|
-
value: value
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
884
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
885
|
+
value: value,
|
|
886
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
887
|
+
ref: ref,
|
|
888
|
+
children: children
|
|
889
|
+
}))
|
|
890
|
+
});
|
|
897
891
|
});
|
|
898
892
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
899
893
|
return ScaleFC;
|
|
@@ -921,35 +915,40 @@ var ButtonDrip = function ButtonDrip(_ref) {
|
|
|
921
915
|
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
922
916
|
};
|
|
923
917
|
});
|
|
924
|
-
return /*#__PURE__*/
|
|
918
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
925
919
|
ref: dripRef,
|
|
926
|
-
className: "jsx-3424889537" + " " + "drip"
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
920
|
+
className: "jsx-3424889537" + " " + "drip",
|
|
921
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
922
|
+
width: "20",
|
|
923
|
+
height: "20",
|
|
924
|
+
viewBox: "0 0 20 20",
|
|
925
|
+
style: {
|
|
926
|
+
top: top,
|
|
927
|
+
left: left
|
|
928
|
+
},
|
|
929
|
+
className: "jsx-3424889537",
|
|
930
|
+
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
931
|
+
stroke: "none",
|
|
932
|
+
strokeWidth: "1",
|
|
933
|
+
fill: "none",
|
|
934
|
+
fillRule: "evenodd",
|
|
935
|
+
className: "jsx-3424889537",
|
|
936
|
+
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
937
|
+
fill: color,
|
|
938
|
+
className: "jsx-3424889537",
|
|
939
|
+
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
940
|
+
width: "100%",
|
|
941
|
+
height: "100%",
|
|
942
|
+
rx: "10",
|
|
943
|
+
className: "jsx-3424889537"
|
|
944
|
+
})
|
|
945
|
+
})
|
|
946
|
+
})
|
|
947
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
948
|
+
id: "3424889537",
|
|
949
|
+
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;}}"
|
|
950
|
+
})]
|
|
951
|
+
});
|
|
953
952
|
};
|
|
954
953
|
ButtonDrip.displayName = 'ButtonDrip';
|
|
955
954
|
|
|
@@ -981,35 +980,41 @@ var LoadingComponent = function LoadingComponent(_ref) {
|
|
|
981
980
|
var bgColor = React.useMemo(function () {
|
|
982
981
|
return getIconBgColor(type, theme$1.palette, color);
|
|
983
982
|
}, [type, theme$1.palette, color]);
|
|
984
|
-
return /*#__PURE__*/
|
|
985
|
-
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 || "")
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
983
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
984
|
+
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 || ""),
|
|
985
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
986
|
+
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",
|
|
987
|
+
children: [children && /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
988
|
+
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]]]),
|
|
989
|
+
children: children
|
|
990
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
991
|
+
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]]])
|
|
992
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
993
|
+
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]]])
|
|
994
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
995
|
+
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]]])
|
|
996
|
+
})]
|
|
997
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
998
|
+
id: "2201634259",
|
|
999
|
+
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],
|
|
1000
|
+
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;}}")
|
|
1001
|
+
})]
|
|
1002
|
+
}));
|
|
1000
1003
|
};
|
|
1001
1004
|
LoadingComponent.displayName = 'Loading';
|
|
1002
1005
|
var Loading = withScale(LoadingComponent);
|
|
1003
1006
|
|
|
1004
1007
|
var ButtonLoading = function ButtonLoading(_ref) {
|
|
1005
1008
|
var color = _ref.color;
|
|
1006
|
-
return /*#__PURE__*/
|
|
1007
|
-
className: "jsx-212623367" + " " + "btn-loading"
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1009
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1010
|
+
className: "jsx-212623367" + " " + "btn-loading",
|
|
1011
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Loading, {
|
|
1012
|
+
color: color
|
|
1013
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1014
|
+
id: "212623367",
|
|
1015
|
+
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);}"
|
|
1016
|
+
})]
|
|
1017
|
+
});
|
|
1013
1018
|
};
|
|
1014
1019
|
ButtonLoading.displayName = 'ButtonLoading';
|
|
1015
1020
|
|
|
@@ -1026,11 +1031,13 @@ var ButtonIcon = function ButtonIcon(_ref) {
|
|
|
1026
1031
|
right: isRight,
|
|
1027
1032
|
single: isSingle
|
|
1028
1033
|
}, className);
|
|
1029
|
-
return /*#__PURE__*/
|
|
1030
|
-
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || "")
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1035
|
+
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || ""),
|
|
1036
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1037
|
+
id: "2467502931",
|
|
1038
|
+
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;}"
|
|
1039
|
+
})]
|
|
1040
|
+
}));
|
|
1034
1041
|
};
|
|
1035
1042
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
1036
1043
|
|
|
@@ -1041,23 +1048,30 @@ var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, childre
|
|
|
1041
1048
|
var isRight = Boolean(iconRight);
|
|
1042
1049
|
var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
|
|
1043
1050
|
var classes = theme.useClasses('text', isRight ? 'right' : 'left');
|
|
1044
|
-
if (!hasIcon) return /*#__PURE__*/
|
|
1045
|
-
className: "text"
|
|
1046
|
-
|
|
1051
|
+
if (!hasIcon) return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1052
|
+
className: "text",
|
|
1053
|
+
children: children
|
|
1054
|
+
});
|
|
1047
1055
|
if (React.Children.count(children) === 0) {
|
|
1048
|
-
return /*#__PURE__*/
|
|
1056
|
+
return /*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
|
|
1049
1057
|
isRight: isRight,
|
|
1050
|
-
isSingle: true
|
|
1051
|
-
|
|
1058
|
+
isSingle: true,
|
|
1059
|
+
children: hasIcon
|
|
1060
|
+
});
|
|
1052
1061
|
}
|
|
1053
|
-
return /*#__PURE__*/
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1062
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1063
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
|
|
1064
|
+
isRight: isRight,
|
|
1065
|
+
children: hasIcon
|
|
1066
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1067
|
+
className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || ""),
|
|
1068
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1069
|
+
id: "3568181479",
|
|
1070
|
+
dynamic: [paddingForAutoMode, paddingForAutoMode],
|
|
1071
|
+
children: ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}")
|
|
1072
|
+
})]
|
|
1073
|
+
})]
|
|
1074
|
+
});
|
|
1061
1075
|
};
|
|
1062
1076
|
var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
|
|
1063
1077
|
if (!config.isButtonGroup) return props;
|
|
@@ -1461,87 +1475,61 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1461
1475
|
|
|
1462
1476
|
// If shadow provided is string then value other default
|
|
1463
1477
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1464
|
-
return /*#__PURE__*/
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1478
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1479
|
+
children: [to ? /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
1480
|
+
href: to
|
|
1481
|
+
}, props), {}, {
|
|
1482
|
+
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) || ""),
|
|
1483
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
1484
|
+
color: color
|
|
1485
|
+
}), childrenWithIcon]
|
|
1486
|
+
})) : /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread2(_objectSpread2({
|
|
1487
|
+
ref: buttonRef,
|
|
1488
|
+
type: type,
|
|
1489
|
+
disabled: disabled,
|
|
1490
|
+
onClick: clickHandler
|
|
1491
|
+
}, props), {}, {
|
|
1492
|
+
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) || ""),
|
|
1493
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
1494
|
+
color: color
|
|
1495
|
+
}), childrenWithIcon, dripShow && /*#__PURE__*/jsxRuntime.jsx(ButtonDrip, {
|
|
1496
|
+
x: dripX,
|
|
1497
|
+
y: dripY,
|
|
1498
|
+
color: dripColor,
|
|
1499
|
+
onCompleted: dripCompletedHandle
|
|
1500
|
+
})]
|
|
1501
|
+
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1502
|
+
id: "612376042",
|
|
1503
|
+
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'],
|
|
1504
|
+
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;}}")
|
|
1505
|
+
})]
|
|
1506
|
+
});
|
|
1488
1507
|
});
|
|
1489
1508
|
ButtonComponent.displayName = 'Button';
|
|
1490
1509
|
var Button = withScale(ButtonComponent);
|
|
1491
1510
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
var CompactButton = function CompactButton(_ref) {
|
|
1495
|
-
_ref.color;
|
|
1496
|
-
var children = _ref.children,
|
|
1497
|
-
iconRight = _ref.iconRight,
|
|
1498
|
-
icon = _ref.icon,
|
|
1499
|
-
_ref$scale = _ref.scale,
|
|
1500
|
-
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1501
|
-
type = _ref.type,
|
|
1502
|
-
style = _ref.style,
|
|
1503
|
-
onClick = _ref.onClick,
|
|
1504
|
-
to = _ref.to;
|
|
1511
|
+
var CompactButton = function CompactButton(props) {
|
|
1505
1512
|
// const theme = useTheme();
|
|
1506
|
-
return /*#__PURE__*/
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
px: 0.6,
|
|
1515
|
-
iconRight: iconRight
|
|
1516
|
-
}, children);
|
|
1513
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
1514
|
+
scale: 2 / 3,
|
|
1515
|
+
px: 0.6
|
|
1516
|
+
}, _objectSpread2({
|
|
1517
|
+
auto: true
|
|
1518
|
+
}, props)), {}, {
|
|
1519
|
+
children: props.children
|
|
1520
|
+
}));
|
|
1517
1521
|
};
|
|
1518
1522
|
var IconButton = /*#__PURE__*/React.memo(CompactButton);
|
|
1519
1523
|
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
var SmallButton = function SmallButton(_ref) {
|
|
1523
|
-
_ref.color;
|
|
1524
|
-
var children = _ref.children,
|
|
1525
|
-
iconRight = _ref.iconRight,
|
|
1526
|
-
icon = _ref.icon,
|
|
1527
|
-
_ref$scale = _ref.scale,
|
|
1528
|
-
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1529
|
-
type = _ref.type,
|
|
1530
|
-
style = _ref.style,
|
|
1531
|
-
onClick = _ref.onClick,
|
|
1532
|
-
to = _ref.to;
|
|
1524
|
+
var SmallButton = function SmallButton(props) {
|
|
1533
1525
|
// const theme = useTheme();
|
|
1534
|
-
return /*#__PURE__*/
|
|
1535
|
-
to: to,
|
|
1536
|
-
icon: icon,
|
|
1537
|
-
style: style,
|
|
1538
|
-
type: type,
|
|
1539
|
-
onClick: onClick,
|
|
1526
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
1540
1527
|
auto: true,
|
|
1541
|
-
scale:
|
|
1542
|
-
px: 0.6
|
|
1543
|
-
|
|
1544
|
-
|
|
1528
|
+
scale: 2 / 3,
|
|
1529
|
+
px: 0.6
|
|
1530
|
+
}, props), {}, {
|
|
1531
|
+
children: props.children
|
|
1532
|
+
}));
|
|
1545
1533
|
};
|
|
1546
1534
|
var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
|
|
1547
1535
|
|