@helpdice/ui 2.5.8-beta.0 → 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 +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 +4173 -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 +2217 -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
package/dist/user/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);
|
|
@@ -843,23 +878,19 @@ var withScale = function withScale(Render) {
|
|
|
843
878
|
getScaleProps: generateGetScaleProps(props),
|
|
844
879
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
845
880
|
};
|
|
846
|
-
return /*#__PURE__*/
|
|
847
|
-
value: value
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
881
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
882
|
+
value: value,
|
|
883
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
884
|
+
ref: ref,
|
|
885
|
+
children: children
|
|
886
|
+
}))
|
|
887
|
+
});
|
|
851
888
|
});
|
|
852
889
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
853
890
|
return ScaleFC;
|
|
854
891
|
};
|
|
855
892
|
|
|
856
893
|
var _excluded$3 = ["src", "errorSrc", "stacked", "text", "isSquare", "className", "children"];
|
|
857
|
-
|
|
858
|
-
// type NativeAttrs = Omit<
|
|
859
|
-
// Partial<React.ImgHTMLAttributes<any> & React.HTMLAttributes<any>>,
|
|
860
|
-
// keyof Props
|
|
861
|
-
// >
|
|
862
|
-
|
|
863
894
|
var safeText = function safeText(text) {
|
|
864
895
|
if (text.length <= 4) return text;
|
|
865
896
|
return text.slice(0, 3);
|
|
@@ -887,24 +918,27 @@ var AvatarComponent = function AvatarComponent(_ref) {
|
|
|
887
918
|
var radius = isSquare ? theme$1.layout.radius : '50%';
|
|
888
919
|
var marginLeft = stacked ? SCALES.ml(-0.625) : SCALES.ml(0);
|
|
889
920
|
var classes = theme.useClasses('avatar', className);
|
|
890
|
-
return /*#__PURE__*/
|
|
891
|
-
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (classes || "")
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
921
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
922
|
+
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (classes || ""),
|
|
923
|
+
children: [!text || !showText ? /*#__PURE__*/jsxRuntime.jsx("img", _objectSpread2(_objectSpread2({
|
|
924
|
+
alt: "avatar",
|
|
925
|
+
src: src !== null && src !== void 0 ? src : fallbackSrc,
|
|
926
|
+
draggable: false
|
|
927
|
+
}, props), {}, {
|
|
928
|
+
onError: function onError(e) {
|
|
929
|
+
e.currentTarget.onerror = null; // prevent loop
|
|
930
|
+
e.currentTarget.src = fallbackSrc;
|
|
931
|
+
},
|
|
932
|
+
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-img")
|
|
933
|
+
})) : null, showText && /*#__PURE__*/jsxRuntime.jsx("span", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
934
|
+
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-text"),
|
|
935
|
+
children: text ? safeText(text) : children
|
|
936
|
+
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
937
|
+
id: "2295275975",
|
|
938
|
+
dynamic: [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)],
|
|
939
|
+
children: ".avatar.__jsx-style-dynamic-selector{display:inline-block;position:relative;overflow:hidden;border:1px solid ".concat(theme$1.palette.accents_2, ";border-radius:").concat(radius, ";vertical-align:top;background-color:").concat(theme$1.palette.background, ";box-sizing:border-box;width:").concat(SCALES.width(1.75) || SCALES.height(1.75), ";height:").concat(SCALES.height(1.75) || SCALES.width(1.75), ";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(marginLeft, ";}.avatar-img.__jsx-style-dynamic-selector{display:inline-block;object-fit:cover;width:100%;height:100%;border-radius:").concat(radius, ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.avatar-text.__jsx-style-dynamic-selector{position:absolute;left:50%;top:50%;font-size:").concat(SCALES.font(1), ";text-align:center;-webkit-transform:translate(-50%,-50%) scale(0.65);-ms-transform:translate(-50%,-50%) scale(0.65);transform:translate(-50%,-50%) scale(0.65);white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")
|
|
940
|
+
})]
|
|
941
|
+
});
|
|
908
942
|
};
|
|
909
943
|
AvatarComponent.displayName = 'Avatar';
|
|
910
944
|
var Avatar = withScale(AvatarComponent);
|
|
@@ -917,14 +951,17 @@ var AvatarGroupComponent = function AvatarGroupComponent(_ref) {
|
|
|
917
951
|
var theme$1 = theme.useTheme();
|
|
918
952
|
var _useScale = useScale(),
|
|
919
953
|
SCALES = _useScale.SCALES;
|
|
920
|
-
return /*#__PURE__*/
|
|
921
|
-
className: _JSXStyle.dynamic([["1135268764", [SCALES.width(1, 'max-content'), 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), SCALES.ml(0.625), SCALES.font(0.875), theme$1.palette.accents_7]]]) + " " + (theme.useClasses('avatar-group', className) || "")
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
954
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
955
|
+
className: _JSXStyle.dynamic([["1135268764", [SCALES.width(1, 'max-content'), 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), SCALES.ml(0.625), SCALES.font(0.875), theme$1.palette.accents_7]]]) + " " + (theme.useClasses('avatar-group', className) || ""),
|
|
956
|
+
children: [children, count && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
957
|
+
className: _JSXStyle.dynamic([["1135268764", [SCALES.width(1, 'max-content'), 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), SCALES.ml(0.625), SCALES.font(0.875), theme$1.palette.accents_7]]]) + " " + "count",
|
|
958
|
+
children: ["+", count]
|
|
959
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
960
|
+
id: "1135268764",
|
|
961
|
+
dynamic: [SCALES.width(1, 'max-content'), 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), SCALES.ml(0.625), SCALES.font(0.875), theme$1.palette.accents_7],
|
|
962
|
+
children: ".avatar-group.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:".concat(SCALES.width(1, 'max-content'), ";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), ";}.avatar-group.__jsx-style-dynamic-selector .avatar{margin-left:-").concat(SCALES.ml(0.625), ";}.count.__jsx-style-dynamic-selector{font-size:").concat(SCALES.font(0.875), ";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;padding-left:5.5px;color:").concat(theme$1.palette.accents_7, ";}")
|
|
963
|
+
})]
|
|
964
|
+
});
|
|
928
965
|
};
|
|
929
966
|
AvatarGroupComponent.displayName = 'AvatarGroup';
|
|
930
967
|
var AvatarGroup = withScale(AvatarGroupComponent);
|
|
@@ -948,29 +985,34 @@ var UserComponent = function UserComponent(_ref) {
|
|
|
948
985
|
SCALES = _useScale.SCALES,
|
|
949
986
|
getScaleProps = _useScale.getScaleProps;
|
|
950
987
|
var scale = getScaleProps('scale');
|
|
951
|
-
return /*#__PURE__*/
|
|
952
|
-
className: _JSXStyle.dynamic([["3188576998", [SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.5), SCALES.pb(0), SCALES.pl(0.5), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapHalf, theme$1.palette.accents_8, theme$1.palette.accents_6]]]) + " " + (props && props.className != null && props.className || theme.useClasses('user', className) || "")
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
988
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
989
|
+
className: _JSXStyle.dynamic([["3188576998", [SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.5), SCALES.pb(0), SCALES.pl(0.5), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapHalf, theme$1.palette.accents_8, theme$1.palette.accents_6]]]) + " " + (props && props.className != null && props.className || theme.useClasses('user', className) || ""),
|
|
990
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Avatar, {
|
|
991
|
+
src: src,
|
|
992
|
+
scale: scale,
|
|
993
|
+
text: text,
|
|
994
|
+
alt: altText
|
|
995
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
996
|
+
className: _JSXStyle.dynamic([["3188576998", [SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.5), SCALES.pb(0), SCALES.pl(0.5), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapHalf, theme$1.palette.accents_8, theme$1.palette.accents_6]]]) + " " + "names",
|
|
997
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
998
|
+
className: _JSXStyle.dynamic([["3188576998", [SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.5), SCALES.pb(0), SCALES.pl(0.5), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapHalf, theme$1.palette.accents_8, theme$1.palette.accents_6]]]) + " " + "name",
|
|
999
|
+
children: name
|
|
1000
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1001
|
+
className: _JSXStyle.dynamic([["3188576998", [SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.5), SCALES.pb(0), SCALES.pl(0.5), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapHalf, theme$1.palette.accents_8, theme$1.palette.accents_6]]]) + " " + "social",
|
|
1002
|
+
children: children
|
|
1003
|
+
})]
|
|
1004
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1005
|
+
id: "3188576998",
|
|
1006
|
+
dynamic: [SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0.5), SCALES.pb(0), SCALES.pl(0.5), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapHalf, theme$1.palette.accents_8, theme$1.palette.accents_6],
|
|
1007
|
+
children: ".user.__jsx-style-dynamic-selector{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;max-width:100%;--user-font-size:".concat(SCALES.font(1), ";font-size:var(--user-font-size);width:").concat(SCALES.width(1, 'max-content'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.5), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.5), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.names.__jsx-style-dynamic-selector{font-size:inherit;margin-left:").concat(theme$1.layout.gapHalf, ";display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;white-space:nowrap;}.name.__jsx-style-dynamic-selector{font-size:calc(0.89 * var(--user-font-size));color:").concat(theme$1.palette.accents_8, ";line-height:1.1em;text-transform:capitalize;font-weight:500;max-width:15rem;text-overflow:ellipsis;overflow:hidden;}.social.__jsx-style-dynamic-selector{font-size:calc(0.75 * var(--user-font-size));color:").concat(theme$1.palette.accents_6, ";}.social.__jsx-style-dynamic-selector *:first-child{margin-top:0;}.social.__jsx-style-dynamic-selector *:last-child{margin-bottom:0;}")
|
|
1008
|
+
})]
|
|
1009
|
+
}));
|
|
968
1010
|
};
|
|
969
1011
|
UserComponent.displayName = 'User';
|
|
970
1012
|
var User = withScale(UserComponent);
|
|
971
1013
|
|
|
972
1014
|
var LinkIconComponent = function LinkIconComponent() {
|
|
973
|
-
return /*#__PURE__*/
|
|
1015
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
974
1016
|
viewBox: "0 0 24 24",
|
|
975
1017
|
width: "0.9375em",
|
|
976
1018
|
height: "0.9375em",
|
|
@@ -980,19 +1022,21 @@ var LinkIconComponent = function LinkIconComponent() {
|
|
|
980
1022
|
strokeLinejoin: "round",
|
|
981
1023
|
fill: "none",
|
|
982
1024
|
shapeRendering: "geometricPrecision",
|
|
983
|
-
className: "jsx-3409194595" + " " + "icon"
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1025
|
+
className: "jsx-3409194595" + " " + "icon",
|
|
1026
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1027
|
+
d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6",
|
|
1028
|
+
className: "jsx-3409194595"
|
|
1029
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1030
|
+
d: "M15 3h6v6",
|
|
1031
|
+
className: "jsx-3409194595"
|
|
1032
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1033
|
+
d: "M10 14L21 3",
|
|
1034
|
+
className: "jsx-3409194595"
|
|
1035
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1036
|
+
id: "3409194595",
|
|
1037
|
+
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;}"
|
|
1038
|
+
})]
|
|
1039
|
+
});
|
|
996
1040
|
};
|
|
997
1041
|
LinkIconComponent.displayName = 'LinkIcon';
|
|
998
1042
|
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
@@ -1058,17 +1102,20 @@ var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1058
1102
|
var classes = theme.useClasses('link', {
|
|
1059
1103
|
block: block
|
|
1060
1104
|
}, className);
|
|
1061
|
-
return /*#__PURE__*/
|
|
1105
|
+
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
1062
1106
|
href: href
|
|
1063
|
-
}, props, {
|
|
1107
|
+
}, props), {}, {
|
|
1064
1108
|
ref: ref,
|
|
1065
|
-
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 || "")
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1109
|
+
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 || ""),
|
|
1110
|
+
children: [icon && icon, /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1111
|
+
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",
|
|
1112
|
+
children: [children, arrow && /*#__PURE__*/jsxRuntime.jsx(LinkIcon, {})]
|
|
1113
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1114
|
+
id: "1962988967",
|
|
1115
|
+
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],
|
|
1116
|
+
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, ";}")
|
|
1117
|
+
})]
|
|
1118
|
+
}));
|
|
1072
1119
|
});
|
|
1073
1120
|
LinkComponent.displayName = 'Link';
|
|
1074
1121
|
var Link = withScale(LinkComponent);
|
|
@@ -1080,17 +1127,20 @@ var UserLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1080
1127
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1081
1128
|
children = _ref.children,
|
|
1082
1129
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1083
|
-
return /*#__PURE__*/
|
|
1084
|
-
className: "jsx-3263947648" + " " + (props && props.className != null && props.className || className || "")
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1130
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1131
|
+
className: "jsx-3263947648" + " " + (props && props.className != null && props.className || className || ""),
|
|
1132
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Link, {
|
|
1133
|
+
ref: ref,
|
|
1134
|
+
href: href,
|
|
1135
|
+
showColor: true,
|
|
1136
|
+
target: "_blank",
|
|
1137
|
+
rel: "noopener",
|
|
1138
|
+
children: children
|
|
1139
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1140
|
+
id: "3263947648",
|
|
1141
|
+
children: "div.jsx-3263947648 a:hover{opacity:0.7;}"
|
|
1142
|
+
})]
|
|
1143
|
+
}));
|
|
1094
1144
|
});
|
|
1095
1145
|
UserLink.displayName = 'UserLink';
|
|
1096
1146
|
|
|
@@ -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<CompactButtonProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
3
|
+
declare const _default: React.NamedExoticComponent<ButtonProps>;
|
|
16
4
|
export default _default;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import Button from './button';
|
|
3
4
|
// import { useTheme } from '@helpdice/theme';
|
|
5
|
+
// import { ButtonTypes } from 'components/button-group';
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
// type CompactButtonProps = {
|
|
8
|
+
// children?: React.ReactNode;
|
|
9
|
+
// iconRight?: React.ReactNode;
|
|
10
|
+
// to: string;
|
|
11
|
+
// icon?: React.ReactNode;
|
|
12
|
+
// scale?: number;
|
|
13
|
+
// type?: any;
|
|
14
|
+
// style?: CSSProperties;
|
|
15
|
+
// target?: string;
|
|
16
|
+
// color?: ButtonTypes;
|
|
17
|
+
// onClick?: () => void
|
|
18
|
+
// };
|
|
19
|
+
|
|
20
|
+
var CompactButton = function CompactButton(props) {
|
|
16
21
|
// const theme = useTheme();
|
|
17
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
auto: true,
|
|
24
|
-
scale: scale,
|
|
25
|
-
px: 0.6,
|
|
26
|
-
iconRight: iconRight
|
|
27
|
-
}, children);
|
|
22
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
23
|
+
scale: 2 / 3,
|
|
24
|
+
px: 0.6
|
|
25
|
+
}, _extends({
|
|
26
|
+
auto: true
|
|
27
|
+
}, props)), props.children);
|
|
28
28
|
};
|
|
29
29
|
export default /*#__PURE__*/memo(CompactButton);
|
package/esm/button/button.js
CHANGED
|
@@ -166,7 +166,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
166
166
|
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
167
167
|
href: to
|
|
168
168
|
}, props, {
|
|
169
|
-
className: _JSXStyle.dynamic([["
|
|
169
|
+
className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme.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 || useClasses('btn', 'btn-link', className) || "")
|
|
170
170
|
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
171
171
|
color: color
|
|
172
172
|
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
@@ -175,7 +175,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
175
175
|
disabled: disabled,
|
|
176
176
|
onClick: clickHandler
|
|
177
177
|
}, props, {
|
|
178
|
-
className: _JSXStyle.dynamic([["
|
|
178
|
+
className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme.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 || useClasses('btn', className) || "")
|
|
179
179
|
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
180
180
|
color: color
|
|
181
181
|
}), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
|
|
@@ -184,9 +184,9 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
184
184
|
color: dripColor,
|
|
185
185
|
onCompleted: dripCompletedHandle
|
|
186
186
|
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
187
|
-
id: "
|
|
187
|
+
id: "612376042",
|
|
188
188
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme.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']
|
|
189
|
-
}, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-
|
|
189
|
+
}, ".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.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;}}")));
|
|
190
190
|
});
|
|
191
191
|
ButtonComponent.displayName = 'Button';
|
|
192
192
|
var Button = withScale(ButtonComponent);
|
|
@@ -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;
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import Button from './button';
|
|
3
4
|
// import { useTheme } from '@helpdice/theme';
|
|
5
|
+
// import { ButtonTypes } from 'components/button-group';
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
// type SmallButtonProps = {
|
|
8
|
+
// children?: React.ReactNode;
|
|
9
|
+
// iconRight?: React.ReactNode;
|
|
10
|
+
// to: string;
|
|
11
|
+
// icon?: React.ReactNode;
|
|
12
|
+
// scale?: number;
|
|
13
|
+
// type?: any;
|
|
14
|
+
// style?: CSSProperties;
|
|
15
|
+
// target?: string;
|
|
16
|
+
// color?: ButtonTypes;
|
|
17
|
+
// onClick?: () => void
|
|
18
|
+
// };
|
|
19
|
+
|
|
20
|
+
var SmallButton = function SmallButton(props) {
|
|
16
21
|
// const theme = useTheme();
|
|
17
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
18
|
-
to: to,
|
|
19
|
-
icon: icon,
|
|
20
|
-
style: style,
|
|
21
|
-
type: type,
|
|
22
|
-
onClick: onClick,
|
|
22
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
23
23
|
auto: true,
|
|
24
|
-
scale:
|
|
25
|
-
px: 0.6
|
|
26
|
-
|
|
27
|
-
}, children);
|
|
24
|
+
scale: 2 / 3,
|
|
25
|
+
px: 0.6
|
|
26
|
+
}, props), props.children);
|
|
28
27
|
};
|
|
29
28
|
export default /*#__PURE__*/memo(SmallButton);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ProgressVariant } from "./useCircularProgress";
|
|
3
|
+
type Status = "default" | "success" | "warning" | "error";
|
|
4
|
+
interface CircularProgressProps {
|
|
5
|
+
size?: number;
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
value?: number;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
variant?: ProgressVariant;
|
|
11
|
+
status?: Status;
|
|
12
|
+
gradient?: boolean;
|
|
13
|
+
showPercentage?: boolean;
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const CircularProgress: React.ForwardRefExoticComponent<CircularProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export default CircularProgress;
|