@helpdice/ui 1.6.7 → 1.6.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/Placeholder/index.js +10 -10
- package/dist/auto-complete/auto-complete.d.ts +35 -3
- package/dist/auto-complete/index.js +8 -7
- package/dist/breadcrumbs/index.js +1 -1
- package/dist/button/button.compact.d.ts +2 -2
- package/dist/button/index.js +61 -61
- package/dist/button-dropdown/index.js +1 -1
- package/dist/card/index.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/code-block/index.d.ts +10 -0
- package/dist/image/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1375 -1346
- package/dist/input/index.js +2 -2
- package/dist/link/index.js +1 -1
- package/dist/modal/index.js +3 -3
- package/dist/rating/index.js +1 -1
- package/dist/select/index.js +3 -3
- package/dist/snippet/index.js +1 -1
- package/dist/table/index.js +17 -17
- package/dist/tabs/index.js +2 -2
- package/dist/text/child.d.ts +1 -1
- package/dist/text/index.js +10 -10
- package/dist/text/text.d.ts +1 -1
- package/dist/ui-provider/index.js +2 -2
- package/dist/user/index.js +1 -1
- package/dist/utils/collections.d.ts +1 -1
- package/esm/auto-complete/auto-complete.d.ts +35 -3
- package/esm/auto-complete/auto-complete.js +3 -4
- package/esm/button/button-loading.js +1 -1
- package/esm/button/button.compact.d.ts +2 -2
- package/esm/button/button.compact.js +1 -1
- package/esm/button/styles.js +1 -1
- package/esm/button-dropdown/icon.js +1 -1
- package/esm/checkbox/checkbox.icon.js +1 -1
- package/esm/code-block/index.d.ts +10 -0
- package/esm/code-block/index.js +27 -28
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -1
- package/esm/input/input-block-label.js +1 -1
- package/esm/input/input-icon.js +1 -1
- package/esm/link/icon.js +1 -1
- package/esm/modal/modal-actions.js +1 -1
- package/esm/rating/rating-icon.js +1 -1
- package/esm/select/select-icon.js +1 -1
- package/esm/select/select-input.js +1 -1
- package/esm/select/select-multiple-value.js +1 -1
- package/esm/snippet/snippet-icon.js +1 -1
- package/esm/tabs/tabs.js +2 -2
- package/esm/text/child.d.ts +1 -1
- package/esm/text/child.js +10 -10
- package/esm/text/text.d.ts +1 -1
- package/esm/tooltip/__test__/index.test.js +2 -2
- package/esm/utils/collections.d.ts +1 -1
- package/esm/utils/collections.js +1 -1
- package/package.json +7 -4
- /package/esm/utils/use-context-state/{create-geist-context.js → create-ui-context.js} +0 -0
|
@@ -1402,7 +1402,7 @@ var withScale = function withScale(Render) {
|
|
|
1402
1402
|
return ScaleFC;
|
|
1403
1403
|
};
|
|
1404
1404
|
|
|
1405
|
-
var _excluded$1 = ["children", "tag", "className", "
|
|
1405
|
+
var _excluded$1 = ["children", "tag", "className", "color"];
|
|
1406
1406
|
var getTypeColor = function getTypeColor(type, palette) {
|
|
1407
1407
|
var colors = {
|
|
1408
1408
|
"default": 'inherit',
|
|
@@ -1418,8 +1418,8 @@ var TextChild = function TextChild(_ref) {
|
|
|
1418
1418
|
tag = _ref.tag,
|
|
1419
1419
|
_ref$className = _ref.className,
|
|
1420
1420
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1421
|
-
_ref$
|
|
1422
|
-
|
|
1421
|
+
_ref$color = _ref.color,
|
|
1422
|
+
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
1423
1423
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
1424
1424
|
var Component = tag;
|
|
1425
1425
|
var theme = useTheme();
|
|
@@ -1431,9 +1431,9 @@ var TextChild = function TextChild(_ref) {
|
|
|
1431
1431
|
var my = getScaleProps(['margin', 'marginTop', 'marginBottom', 'my', 'mt', 'mb']);
|
|
1432
1432
|
var px = getScaleProps(['padding', 'paddingLeft', 'paddingRight', 'pl', 'pr', 'px']);
|
|
1433
1433
|
var py = getScaleProps(['padding', 'paddingTop', 'paddingBottom', 'pt', 'pb', 'py']);
|
|
1434
|
-
var
|
|
1435
|
-
return getTypeColor(
|
|
1436
|
-
}, [
|
|
1434
|
+
var _color = React.useMemo(function () {
|
|
1435
|
+
return getTypeColor(color, theme.palette);
|
|
1436
|
+
}, [color, theme.palette]);
|
|
1437
1437
|
var classNames = React.useMemo(function () {
|
|
1438
1438
|
var keys = [{
|
|
1439
1439
|
value: mx,
|
|
@@ -1458,11 +1458,11 @@ var TextChild = function TextChild(_ref) {
|
|
|
1458
1458
|
return "".concat(scaleClassNames, " ").concat(className).trim();
|
|
1459
1459
|
}, [mx, my, px, py, font, className]);
|
|
1460
1460
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
1461
|
-
className: _JSXStyle.dynamic([["
|
|
1461
|
+
className: _JSXStyle.dynamic([["4133320328", [tag, _color, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.font(1, 'inherit'), SCALES.ml(0, 'revert'), SCALES.mr(0, 'revert'), SCALES.mt(0, 'revert'), SCALES.mb(0, 'revert'), SCALES.pl(0, 'revert'), SCALES.pr(0, 'revert'), SCALES.pt(0, 'revert'), SCALES.pb(0, 'revert')]]]) + " " + (props && props.className != null && props.className || classNames || "")
|
|
1462
1462
|
}), children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1463
|
-
id: "
|
|
1464
|
-
dynamic: [tag,
|
|
1465
|
-
}, "".concat(tag, ".__jsx-style-dynamic-selector{color:").concat(
|
|
1463
|
+
id: "4133320328",
|
|
1464
|
+
dynamic: [tag, _color, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.font(1, 'inherit'), SCALES.ml(0, 'revert'), SCALES.mr(0, 'revert'), SCALES.mt(0, 'revert'), SCALES.mb(0, 'revert'), SCALES.pl(0, 'revert'), SCALES.pr(0, 'revert'), SCALES.pt(0, 'revert'), SCALES.pb(0, 'revert')]
|
|
1465
|
+
}, "".concat(tag, ".__jsx-style-dynamic-selector{color:").concat(_color, ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";}.font.__jsx-style-dynamic-selector{font-size:").concat(SCALES.font(1, 'inherit'), ";}.mx.__jsx-style-dynamic-selector{margin-left:").concat(SCALES.ml(0, 'revert'), ";margin-right:").concat(SCALES.mr(0, 'revert'), ";}.my.__jsx-style-dynamic-selector{margin-top:").concat(SCALES.mt(0, 'revert'), ";margin-bottom:").concat(SCALES.mb(0, 'revert'), ";}.px.__jsx-style-dynamic-selector{padding-left:").concat(SCALES.pl(0, 'revert'), ";padding-right:").concat(SCALES.pr(0, 'revert'), ";}.py.__jsx-style-dynamic-selector{padding-top:").concat(SCALES.pt(0, 'revert'), ";padding-bottom:").concat(SCALES.pb(0, 'revert'), ";}")));
|
|
1466
1466
|
};
|
|
1467
1467
|
TextChild.displayName = 'TextChild';
|
|
1468
1468
|
|
|
@@ -27,7 +27,39 @@ interface Props {
|
|
|
27
27
|
}
|
|
28
28
|
type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof Props>;
|
|
29
29
|
export type AutoCompleteProps = Props & NativeAttrs & ReactElement;
|
|
30
|
-
declare const
|
|
30
|
+
declare const AutoComplete: React.ForwardRefExoticComponent<Omit<Props & NativeAttrs & React.ReactElement<any, string | React.JSXElementConstructor<any>> & {
|
|
31
31
|
children?: React.ReactNode | undefined;
|
|
32
|
-
} & React.RefAttributes<HTMLInputElement
|
|
33
|
-
|
|
32
|
+
} & React.RefAttributes<HTMLInputElement> & {
|
|
33
|
+
width?: string | number;
|
|
34
|
+
height?: string | number;
|
|
35
|
+
padding?: string | number;
|
|
36
|
+
margin?: string | number;
|
|
37
|
+
w?: string | number;
|
|
38
|
+
h?: string | number;
|
|
39
|
+
paddingLeft?: string | number;
|
|
40
|
+
paddingRight?: string | number;
|
|
41
|
+
paddingTop?: string | number;
|
|
42
|
+
paddingBottom?: string | number;
|
|
43
|
+
pl?: string | number;
|
|
44
|
+
pr?: string | number;
|
|
45
|
+
pt?: string | number;
|
|
46
|
+
pb?: string | number;
|
|
47
|
+
marginLeft?: string | number;
|
|
48
|
+
marginRight?: string | number;
|
|
49
|
+
marginTop?: string | number;
|
|
50
|
+
marginBottom?: string | number;
|
|
51
|
+
ml?: string | number;
|
|
52
|
+
mr?: string | number;
|
|
53
|
+
mt?: string | number;
|
|
54
|
+
mb?: string | number;
|
|
55
|
+
px?: string | number;
|
|
56
|
+
py?: string | number;
|
|
57
|
+
mx?: string | number;
|
|
58
|
+
my?: string | number;
|
|
59
|
+
font?: string | number;
|
|
60
|
+
unit?: string;
|
|
61
|
+
scale?: number;
|
|
62
|
+
children?: any;
|
|
63
|
+
className?: string;
|
|
64
|
+
} & React.InputHTMLAttributes<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
65
|
+
export default AutoComplete;
|
|
@@ -998,7 +998,7 @@ var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
|
998
998
|
dynamic: [theme.palette.accents_6]
|
|
999
999
|
}, "label.__jsx-style-dynamic-selector{display:block;font-weight:normal;color:".concat(theme.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")));
|
|
1000
1000
|
};
|
|
1001
|
-
InputBlockLabelComponent.displayName = '
|
|
1001
|
+
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
1002
1002
|
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
1003
1003
|
|
|
1004
1004
|
var InputIconComponent = function InputIconComponent(_ref) {
|
|
@@ -1014,7 +1014,7 @@ var InputIconComponent = function InputIconComponent(_ref) {
|
|
|
1014
1014
|
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']
|
|
1015
1015
|
}, ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")));
|
|
1016
1016
|
};
|
|
1017
|
-
InputIconComponent.displayName = '
|
|
1017
|
+
InputIconComponent.displayName = 'InputIcon';
|
|
1018
1018
|
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
1019
1019
|
|
|
1020
1020
|
/* "use client" */
|
|
@@ -12226,11 +12226,12 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
|
|
|
12226
12226
|
}, ".auto-complete.__jsx-style-dynamic-selector{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), ";}.auto-complete.__jsx-style-dynamic-selector .loading{width:-webkit-max-content;width:-moz-max-content;width:max-content;}"))));
|
|
12227
12227
|
});
|
|
12228
12228
|
AutoCompleteComponent.displayName = 'AutoComplete';
|
|
12229
|
+
var AutoComplete = withScale(AutoCompleteComponent);
|
|
12229
12230
|
|
|
12230
12231
|
/* "use client" */
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12232
|
+
AutoComplete.Item = AutoCompleteItemComponent;
|
|
12233
|
+
AutoComplete.Option = AutoCompleteItemComponent;
|
|
12234
|
+
AutoComplete.Searching = AutoCompleteSearch;
|
|
12235
|
+
AutoComplete.Empty = AutoCompleteEmpty;
|
|
12235
12236
|
|
|
12236
|
-
exports.default =
|
|
12237
|
+
exports.default = AutoComplete;
|
|
@@ -1295,7 +1295,7 @@ var LinkIconComponent = function LinkIconComponent() {
|
|
|
1295
1295
|
id: "3409194595"
|
|
1296
1296
|
}, ".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;}"));
|
|
1297
1297
|
};
|
|
1298
|
-
LinkIconComponent.displayName = '
|
|
1298
|
+
LinkIconComponent.displayName = 'LinkIcon';
|
|
1299
1299
|
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
1300
1300
|
|
|
1301
1301
|
var _excluded$1 = ["href", "showColor", "underline", "children", "className", "block", "icon"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
2
|
type CompactButtonProps = {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
iconRight?: React.ReactNode;
|
|
@@ -11,5 +11,5 @@ type CompactButtonProps = {
|
|
|
11
11
|
target?: string;
|
|
12
12
|
onClick?: () => void;
|
|
13
13
|
};
|
|
14
|
-
declare const _default:
|
|
14
|
+
declare const _default: React.NamedExoticComponent<CompactButtonProps>;
|
|
15
15
|
export default _default;
|
package/dist/button/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var React
|
|
5
|
+
var React = require('react');
|
|
6
6
|
|
|
7
7
|
function _arrayLikeToArray(r, a) {
|
|
8
8
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -193,11 +193,11 @@ var hasRequiredIndex;
|
|
|
193
193
|
function requireIndex () {
|
|
194
194
|
if (hasRequiredIndex) return index;
|
|
195
195
|
hasRequiredIndex = 1;
|
|
196
|
-
var React = React
|
|
196
|
+
var React$1 = React;
|
|
197
197
|
|
|
198
198
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
199
199
|
|
|
200
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
200
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
|
|
201
201
|
|
|
202
202
|
/*
|
|
203
203
|
Based on Glamor's sheet
|
|
@@ -633,15 +633,15 @@ function requireIndex () {
|
|
|
633
633
|
throw new Error("StyleSheetRegistry: " + message + ".");
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
var StyleSheetContext = /*#__PURE__*/ React.createContext(null);
|
|
636
|
+
var StyleSheetContext = /*#__PURE__*/ React$1.createContext(null);
|
|
637
637
|
StyleSheetContext.displayName = "StyleSheetContext";
|
|
638
638
|
function createStyleRegistry() {
|
|
639
639
|
return new StyleSheetRegistry();
|
|
640
640
|
}
|
|
641
641
|
function StyleRegistry(param) {
|
|
642
642
|
var configuredRegistry = param.registry, children = param.children;
|
|
643
|
-
var rootRegistry = React.useContext(StyleSheetContext);
|
|
644
|
-
var ref = React.useState(function() {
|
|
643
|
+
var rootRegistry = React$1.useContext(StyleSheetContext);
|
|
644
|
+
var ref = React$1.useState(function() {
|
|
645
645
|
return rootRegistry || configuredRegistry || createStyleRegistry();
|
|
646
646
|
}), registry = ref[0];
|
|
647
647
|
return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
|
|
@@ -649,7 +649,7 @@ function requireIndex () {
|
|
|
649
649
|
}, children);
|
|
650
650
|
}
|
|
651
651
|
function useStyleRegistry() {
|
|
652
|
-
return React.useContext(StyleSheetContext);
|
|
652
|
+
return React$1.useContext(StyleSheetContext);
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
|
|
@@ -738,9 +738,9 @@ var defaultContext$1 = {
|
|
|
738
738
|
},
|
|
739
739
|
unit: '16px'
|
|
740
740
|
};
|
|
741
|
-
var ScaleContext = /*#__PURE__*/React
|
|
741
|
+
var ScaleContext = /*#__PURE__*/React.createContext(defaultContext$1);
|
|
742
742
|
var useScale = function useScale() {
|
|
743
|
-
return React
|
|
743
|
+
return React.useContext(ScaleContext);
|
|
744
744
|
};
|
|
745
745
|
|
|
746
746
|
var defaultFont = {
|
|
@@ -987,9 +987,9 @@ var Themes = {
|
|
|
987
987
|
/* "use client" */
|
|
988
988
|
|
|
989
989
|
var defaultTheme = Themes.getPresetStaticTheme();
|
|
990
|
-
var ThemeContext = /*#__PURE__*/React
|
|
990
|
+
var ThemeContext = /*#__PURE__*/React.createContext(defaultTheme);
|
|
991
991
|
var useTheme = function useTheme() {
|
|
992
|
-
return React
|
|
992
|
+
return React.useContext(ThemeContext);
|
|
993
993
|
};
|
|
994
994
|
|
|
995
995
|
/* "use client" */
|
|
@@ -1051,7 +1051,7 @@ var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
|
|
|
1051
1051
|
return scale > 1 ? 1 + diff : 1 - diff;
|
|
1052
1052
|
};
|
|
1053
1053
|
var withScale = function withScale(Render) {
|
|
1054
|
-
var ScaleFC = /*#__PURE__*/React
|
|
1054
|
+
var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1055
1055
|
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33;
|
|
1056
1056
|
var children = _ref.children,
|
|
1057
1057
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
@@ -1127,9 +1127,9 @@ var withScale = function withScale(Render) {
|
|
|
1127
1127
|
getScaleProps: generateGetScaleProps(props),
|
|
1128
1128
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
1129
1129
|
};
|
|
1130
|
-
return /*#__PURE__*/React
|
|
1130
|
+
return /*#__PURE__*/React.createElement(ScaleContext.Provider, {
|
|
1131
1131
|
value: value
|
|
1132
|
-
}, /*#__PURE__*/React
|
|
1132
|
+
}, /*#__PURE__*/React.createElement(Render, _extends({}, props, {
|
|
1133
1133
|
ref: ref
|
|
1134
1134
|
}), children));
|
|
1135
1135
|
});
|
|
@@ -1144,12 +1144,12 @@ var ButtonDrip = function ButtonDrip(_ref) {
|
|
|
1144
1144
|
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
1145
1145
|
color = _ref.color,
|
|
1146
1146
|
onCompleted = _ref.onCompleted;
|
|
1147
|
-
var dripRef = React
|
|
1147
|
+
var dripRef = React.useRef(null);
|
|
1148
1148
|
/* istanbul ignore next */
|
|
1149
1149
|
var top = Number.isNaN(+y) ? 0 : y - 10;
|
|
1150
1150
|
/* istanbul ignore next */
|
|
1151
1151
|
var left = Number.isNaN(+x) ? 0 : x - 10;
|
|
1152
|
-
React
|
|
1152
|
+
React.useEffect(function () {
|
|
1153
1153
|
/* istanbul ignore next */
|
|
1154
1154
|
if (!dripRef.current) return;
|
|
1155
1155
|
dripRef.current.addEventListener('animationend', onCompleted);
|
|
@@ -1159,10 +1159,10 @@ var ButtonDrip = function ButtonDrip(_ref) {
|
|
|
1159
1159
|
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
1160
1160
|
};
|
|
1161
1161
|
});
|
|
1162
|
-
return /*#__PURE__*/React
|
|
1162
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1163
1163
|
ref: dripRef,
|
|
1164
1164
|
className: "jsx-3424889537" + " " + "drip"
|
|
1165
|
-
}, /*#__PURE__*/React
|
|
1165
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
1166
1166
|
width: "20",
|
|
1167
1167
|
height: "20",
|
|
1168
1168
|
viewBox: "0 0 20 20",
|
|
@@ -1171,21 +1171,21 @@ var ButtonDrip = function ButtonDrip(_ref) {
|
|
|
1171
1171
|
left: left
|
|
1172
1172
|
},
|
|
1173
1173
|
className: "jsx-3424889537"
|
|
1174
|
-
}, /*#__PURE__*/React
|
|
1174
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
1175
1175
|
stroke: "none",
|
|
1176
1176
|
strokeWidth: "1",
|
|
1177
1177
|
fill: "none",
|
|
1178
1178
|
fillRule: "evenodd",
|
|
1179
1179
|
className: "jsx-3424889537"
|
|
1180
|
-
}, /*#__PURE__*/React
|
|
1180
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
1181
1181
|
fill: color,
|
|
1182
1182
|
className: "jsx-3424889537"
|
|
1183
|
-
}, /*#__PURE__*/React
|
|
1183
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
1184
1184
|
width: "100%",
|
|
1185
1185
|
height: "100%",
|
|
1186
1186
|
rx: "10",
|
|
1187
1187
|
className: "jsx-3424889537"
|
|
1188
|
-
})))), /*#__PURE__*/React
|
|
1188
|
+
})))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1189
1189
|
id: "3424889537"
|
|
1190
1190
|
}, ".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;}}"));
|
|
1191
1191
|
};
|
|
@@ -1249,22 +1249,22 @@ var LoadingComponent = function LoadingComponent(_ref) {
|
|
|
1249
1249
|
var _useScale = useScale(),
|
|
1250
1250
|
SCALES = _useScale.SCALES;
|
|
1251
1251
|
var classes = useClasses('loading-container', className);
|
|
1252
|
-
var bgColor = React
|
|
1252
|
+
var bgColor = React.useMemo(function () {
|
|
1253
1253
|
return getIconBgColor(type, theme.palette, color);
|
|
1254
1254
|
}, [type, theme.palette, color]);
|
|
1255
|
-
return /*#__PURE__*/React
|
|
1255
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
1256
1256
|
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.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
1257
|
-
}), /*#__PURE__*/React
|
|
1257
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
1258
1258
|
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.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading"
|
|
1259
|
-
}, children && /*#__PURE__*/React
|
|
1259
|
+
}, children && /*#__PURE__*/React.createElement("label", {
|
|
1260
1260
|
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.palette.accents_5, bgColor, spaceRatio]]])
|
|
1261
|
-
}, children), /*#__PURE__*/React
|
|
1261
|
+
}, children), /*#__PURE__*/React.createElement("i", {
|
|
1262
1262
|
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.palette.accents_5, bgColor, spaceRatio]]])
|
|
1263
|
-
}), /*#__PURE__*/React
|
|
1263
|
+
}), /*#__PURE__*/React.createElement("i", {
|
|
1264
1264
|
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.palette.accents_5, bgColor, spaceRatio]]])
|
|
1265
|
-
}), /*#__PURE__*/React
|
|
1265
|
+
}), /*#__PURE__*/React.createElement("i", {
|
|
1266
1266
|
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.palette.accents_5, bgColor, spaceRatio]]])
|
|
1267
|
-
})), /*#__PURE__*/React
|
|
1267
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1268
1268
|
id: "2201634259",
|
|
1269
1269
|
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.palette.accents_5, bgColor, spaceRatio]
|
|
1270
1270
|
}, ".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.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;}}")));
|
|
@@ -1274,15 +1274,15 @@ var Loading = withScale(LoadingComponent);
|
|
|
1274
1274
|
|
|
1275
1275
|
var ButtonLoading = function ButtonLoading(_ref) {
|
|
1276
1276
|
var color = _ref.color;
|
|
1277
|
-
return /*#__PURE__*/React
|
|
1277
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1278
1278
|
className: "jsx-212623367" + " " + "btn-loading"
|
|
1279
|
-
}, /*#__PURE__*/React
|
|
1279
|
+
}, /*#__PURE__*/React.createElement(Loading, {
|
|
1280
1280
|
color: color
|
|
1281
|
-
}), /*#__PURE__*/React
|
|
1281
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1282
1282
|
id: "212623367"
|
|
1283
1283
|
}, ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"));
|
|
1284
1284
|
};
|
|
1285
|
-
ButtonLoading.displayName = '
|
|
1285
|
+
ButtonLoading.displayName = 'ButtonLoading';
|
|
1286
1286
|
|
|
1287
1287
|
var _excluded$1 = ["isRight", "isSingle", "children", "className"];
|
|
1288
1288
|
var ButtonIcon = function ButtonIcon(_ref) {
|
|
@@ -1297,9 +1297,9 @@ var ButtonIcon = function ButtonIcon(_ref) {
|
|
|
1297
1297
|
right: isRight,
|
|
1298
1298
|
single: isSingle
|
|
1299
1299
|
}, className);
|
|
1300
|
-
return /*#__PURE__*/React
|
|
1300
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
1301
1301
|
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || "")
|
|
1302
|
-
}), children, /*#__PURE__*/React
|
|
1302
|
+
}), children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1303
1303
|
id: "2467502931"
|
|
1304
1304
|
}, ".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;}"));
|
|
1305
1305
|
};
|
|
@@ -1312,20 +1312,20 @@ var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, childre
|
|
|
1312
1312
|
var isRight = Boolean(iconRight);
|
|
1313
1313
|
var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
|
|
1314
1314
|
var classes = useClasses('text', isRight ? 'right' : 'left');
|
|
1315
|
-
if (!hasIcon) return /*#__PURE__*/React
|
|
1315
|
+
if (!hasIcon) return /*#__PURE__*/React.createElement("div", {
|
|
1316
1316
|
className: "text"
|
|
1317
1317
|
}, children);
|
|
1318
|
-
if (React
|
|
1319
|
-
return /*#__PURE__*/React
|
|
1318
|
+
if (React.Children.count(children) === 0) {
|
|
1319
|
+
return /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
1320
1320
|
isRight: isRight,
|
|
1321
1321
|
isSingle: true
|
|
1322
1322
|
}, hasIcon);
|
|
1323
1323
|
}
|
|
1324
|
-
return /*#__PURE__*/React
|
|
1324
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
1325
1325
|
isRight: isRight
|
|
1326
|
-
}, hasIcon), /*#__PURE__*/React
|
|
1326
|
+
}, hasIcon), /*#__PURE__*/React.createElement("div", {
|
|
1327
1327
|
className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
|
|
1328
|
-
}, children, /*#__PURE__*/React
|
|
1328
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1329
1329
|
id: "3568181479",
|
|
1330
1330
|
dynamic: [paddingForAutoMode, paddingForAutoMode]
|
|
1331
1331
|
}, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
|
|
@@ -1347,9 +1347,9 @@ var defaultContext = {
|
|
|
1347
1347
|
isButtonGroup: false,
|
|
1348
1348
|
disabled: false
|
|
1349
1349
|
};
|
|
1350
|
-
var ButtonGroupContext = /*#__PURE__*/React
|
|
1350
|
+
var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext);
|
|
1351
1351
|
var useButtonGroupContext = function useButtonGroupContext() {
|
|
1352
|
-
return React
|
|
1352
|
+
return React.useContext(ButtonGroupContext);
|
|
1353
1353
|
};
|
|
1354
1354
|
|
|
1355
1355
|
var hexToRgb = function hexToRgb(color) {
|
|
@@ -1489,7 +1489,7 @@ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _col
|
|
|
1489
1489
|
color: 'white'
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
|
-
var withoutLightType = _color.replace('-light', '');
|
|
1492
|
+
var withoutLightType = _color === null || _color === void 0 ? void 0 : _color.replace('-light', '');
|
|
1493
1493
|
return colors[withoutLightType] || null;
|
|
1494
1494
|
};
|
|
1495
1495
|
var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
@@ -1575,23 +1575,23 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1575
1575
|
};
|
|
1576
1576
|
|
|
1577
1577
|
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1578
|
-
var ButtonComponent = /*#__PURE__*/React
|
|
1578
|
+
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1579
1579
|
var theme = useTheme();
|
|
1580
1580
|
var _useScale = useScale(),
|
|
1581
1581
|
SCALES = _useScale.SCALES;
|
|
1582
|
-
var buttonRef = React
|
|
1583
|
-
React
|
|
1582
|
+
var buttonRef = React.useRef(null);
|
|
1583
|
+
React.useImperativeHandle(ref, function () {
|
|
1584
1584
|
return buttonRef.current;
|
|
1585
1585
|
});
|
|
1586
|
-
var _useState = React
|
|
1586
|
+
var _useState = React.useState(false),
|
|
1587
1587
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1588
1588
|
dripShow = _useState2[0],
|
|
1589
1589
|
setDripShow = _useState2[1];
|
|
1590
|
-
var _useState3 = React
|
|
1590
|
+
var _useState3 = React.useState(0),
|
|
1591
1591
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
1592
1592
|
dripX = _useState4[0],
|
|
1593
1593
|
setDripX = _useState4[1];
|
|
1594
|
-
var _useState5 = React
|
|
1594
|
+
var _useState5 = React.useState(0),
|
|
1595
1595
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
1596
1596
|
dripY = _useState6[0],
|
|
1597
1597
|
setDripY = _useState6[1];
|
|
@@ -1625,21 +1625,21 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
1625
1625
|
var props = _objectWithoutProperties(filteredProps, _excluded);
|
|
1626
1626
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1627
1627
|
|
|
1628
|
-
var _useMemo = React
|
|
1628
|
+
var _useMemo = React.useMemo(function () {
|
|
1629
1629
|
return getButtonColors(theme.palette, filteredProps);
|
|
1630
1630
|
}, [theme.palette, filteredProps]),
|
|
1631
1631
|
bg = _useMemo.bg,
|
|
1632
1632
|
border = _useMemo.border,
|
|
1633
1633
|
color = _useMemo.color;
|
|
1634
|
-
var hover = React
|
|
1634
|
+
var hover = React.useMemo(function () {
|
|
1635
1635
|
return getButtonHoverColors(theme.palette, filteredProps);
|
|
1636
1636
|
}, [theme.palette, filteredProps]);
|
|
1637
|
-
var _useMemo2 = React
|
|
1637
|
+
var _useMemo2 = React.useMemo(function () {
|
|
1638
1638
|
return getButtonCursor(disabled, loading);
|
|
1639
1639
|
}, [disabled, loading]),
|
|
1640
1640
|
cursor = _useMemo2.cursor,
|
|
1641
1641
|
events = _useMemo2.events;
|
|
1642
|
-
var dripColor = React
|
|
1642
|
+
var dripColor = React.useMemo(function () {
|
|
1643
1643
|
return getButtonDripColor(theme.palette, filteredProps);
|
|
1644
1644
|
}, [theme.palette, filteredProps]);
|
|
1645
1645
|
|
|
@@ -1661,7 +1661,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
onClick && onClick(event);
|
|
1663
1663
|
};
|
|
1664
|
-
var childrenWithIcon = React
|
|
1664
|
+
var childrenWithIcon = React.useMemo(function () {
|
|
1665
1665
|
return getButtonChildrenWithIcon(auto, children, {
|
|
1666
1666
|
icon: icon,
|
|
1667
1667
|
iconRight: iconRight
|
|
@@ -1669,21 +1669,21 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
1669
1669
|
}, [auto, children, icon, iconRight]);
|
|
1670
1670
|
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
1671
1671
|
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
1672
|
-
return /*#__PURE__*/React
|
|
1672
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
1673
1673
|
ref: buttonRef,
|
|
1674
1674
|
type: type,
|
|
1675
1675
|
disabled: disabled,
|
|
1676
1676
|
onClick: clickHandler
|
|
1677
1677
|
}, props, {
|
|
1678
1678
|
className: _JSXStyle.dynamic([["1558010596", [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : '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, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses('btn', className) || "")
|
|
1679
|
-
}), loading && /*#__PURE__*/React
|
|
1679
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1680
1680
|
color: color
|
|
1681
|
-
}), childrenWithIcon, dripShow && /*#__PURE__*/React
|
|
1681
|
+
}), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
|
|
1682
1682
|
x: dripX,
|
|
1683
1683
|
y: dripY,
|
|
1684
1684
|
color: dripColor,
|
|
1685
1685
|
onCompleted: dripCompletedHandle
|
|
1686
|
-
}), /*#__PURE__*/React
|
|
1686
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1687
1687
|
id: "1558010596",
|
|
1688
1688
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : '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, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']
|
|
1689
1689
|
}, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;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(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : '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(shadow ? theme.expressiveness.shadowMedium : 'none', ";-webkit-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);-ms-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);}.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;}")));
|
|
@@ -1767,7 +1767,7 @@ var CompactButton = function CompactButton(_ref) {
|
|
|
1767
1767
|
iconRight: iconRight
|
|
1768
1768
|
}, children);
|
|
1769
1769
|
};
|
|
1770
|
-
var button_compact = /*#__PURE__*/React
|
|
1770
|
+
var button_compact = /*#__PURE__*/React.memo(CompactButton);
|
|
1771
1771
|
|
|
1772
1772
|
/* "use client" */
|
|
1773
1773
|
|
|
@@ -1042,7 +1042,7 @@ var ButtonDropdownIcon = function ButtonDropdownIcon(_ref) {
|
|
|
1042
1042
|
id: "3359574434"
|
|
1043
1043
|
}, "svg.jsx-3359574434{-webkit-transform:scale(0.6);-ms-transform:scale(0.6);transform:scale(0.6);}"));
|
|
1044
1044
|
};
|
|
1045
|
-
ButtonDropdownIcon.displayName = '
|
|
1045
|
+
ButtonDropdownIcon.displayName = 'ButtonDropdownIcon';
|
|
1046
1046
|
|
|
1047
1047
|
/* "use client" */
|
|
1048
1048
|
|
package/dist/card/index.js
CHANGED
|
@@ -1410,7 +1410,7 @@ var LinkIconComponent = function LinkIconComponent() {
|
|
|
1410
1410
|
id: "3409194595"
|
|
1411
1411
|
}, ".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;}"));
|
|
1412
1412
|
};
|
|
1413
|
-
LinkIconComponent.displayName = '
|
|
1413
|
+
LinkIconComponent.displayName = 'LinkIcon';
|
|
1414
1414
|
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
1415
1415
|
|
|
1416
1416
|
var hexToRgb = function hexToRgb(color) {
|
package/dist/checkbox/index.js
CHANGED
|
@@ -1016,7 +1016,7 @@ var CheckboxIconComponent = function CheckboxIconComponent(_ref) {
|
|
|
1016
1016
|
dynamic: [disabled ? 0.4 : 1, disabled ? 'not-allowed' : 'pointer']
|
|
1017
1017
|
}, "svg.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(0.86 * var(--checkbox-size));height:calc(0.86 * var(--checkbox-size));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:".concat(disabled ? 0.4 : 1, ";cursor:").concat(disabled ? 'not-allowed' : 'pointer', ";}")));
|
|
1018
1018
|
};
|
|
1019
|
-
CheckboxIconComponent.displayName = '
|
|
1019
|
+
CheckboxIconComponent.displayName = 'CheckboxIcon';
|
|
1020
1020
|
var CheckboxIcon = /*#__PURE__*/React.memo(CheckboxIconComponent);
|
|
1021
1021
|
|
|
1022
1022
|
var warningStack = {};
|
package/dist/image/index.js
CHANGED
|
@@ -1295,7 +1295,7 @@ var LinkIconComponent = function LinkIconComponent() {
|
|
|
1295
1295
|
id: "3409194595"
|
|
1296
1296
|
}, ".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;}"));
|
|
1297
1297
|
};
|
|
1298
|
-
LinkIconComponent.displayName = '
|
|
1298
|
+
LinkIconComponent.displayName = 'LinkIcon';
|
|
1299
1299
|
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
1300
1300
|
|
|
1301
1301
|
var hexToRgb = function hexToRgb(color) {
|
package/dist/index.d.ts
CHANGED
|
@@ -126,6 +126,7 @@ export { useRect } from './utils/layouts';
|
|
|
126
126
|
export type { ReactiveDomReact } from './utils/layouts';
|
|
127
127
|
export { default as Highlight } from './shared/highlight';
|
|
128
128
|
export type { HighlightProps } from './shared/highlight';
|
|
129
|
+
export { default as CodeBlock } from './code-block';
|
|
129
130
|
export { default as Skeleton } from './skeleton';
|
|
130
131
|
export { CartProvider, useCart, createCartIdentifier } from './cart';
|
|
131
132
|
export type { CartProviderState } from './cart';
|