@helpdice/ui 2.3.3 → 2.3.5
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/avatar/avatar.d.ts +1 -0
- package/dist/avatar/index.js +3 -2
- package/dist/button/button.d.ts +1 -0
- package/dist/button/index.d.ts +6 -2
- package/dist/button/index.js +23 -27
- package/dist/carousal/index.js +49 -3
- package/dist/container/index.js +49 -3
- package/dist/copy-to-clipboard/index.js +49 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +29 -30
- package/dist/modal/index.js +9 -3
- package/dist/placeholder/index.js +49 -3
- package/dist/table/index.js +59 -4
- package/dist/text/index.js +49 -3
- package/dist/user/index.js +3 -2
- package/esm/avatar/avatar.d.ts +1 -0
- package/esm/avatar/avatar.js +3 -2
- package/esm/button/button.compact.js +10 -21
- package/esm/button/button.d.ts +1 -0
- package/esm/button/button.js +9 -3
- package/esm/button/index.d.ts +6 -2
- package/esm/button/index.js +2 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/table/table-cell.js +2 -1
- package/package.json +2 -2
package/dist/avatar/avatar.d.ts
CHANGED
package/dist/avatar/index.js
CHANGED
|
@@ -820,7 +820,7 @@ var withScale = function withScale(Render) {
|
|
|
820
820
|
return ScaleFC;
|
|
821
821
|
};
|
|
822
822
|
|
|
823
|
-
var _excluded = ["src", "stacked", "text", "isSquare", "className", "children"];
|
|
823
|
+
var _excluded = ["src", "errorSrc", "stacked", "text", "isSquare", "className", "children"];
|
|
824
824
|
|
|
825
825
|
// type NativeAttrs = Omit<
|
|
826
826
|
// Partial<React.ImgHTMLAttributes<any> & React.HTMLAttributes<any>>,
|
|
@@ -833,6 +833,7 @@ var safeText = function safeText(text) {
|
|
|
833
833
|
};
|
|
834
834
|
var AvatarComponent = function AvatarComponent(_ref) {
|
|
835
835
|
var src = _ref.src,
|
|
836
|
+
errorSrc = _ref.errorSrc,
|
|
836
837
|
_ref$stacked = _ref.stacked,
|
|
837
838
|
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
838
839
|
_ref$text = _ref.text,
|
|
@@ -860,7 +861,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
|
|
|
860
861
|
onError: function onError(e) {
|
|
861
862
|
var target = e.currentTarget;
|
|
862
863
|
target.onerror = null; // prevent loop
|
|
863
|
-
target.src = "https://helpdice.com/avatar.webp";
|
|
864
|
+
target.src = errorSrc !== null && errorSrc !== void 0 ? errorSrc : "https://helpdice.com/avatar.webp";
|
|
864
865
|
},
|
|
865
866
|
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")
|
|
866
867
|
})), showText && /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
package/dist/button/button.d.ts
CHANGED
package/dist/button/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import Button from './button';
|
|
2
|
-
|
|
2
|
+
import CompactButton from './button.compact';
|
|
3
3
|
export type { ButtonProps } from './button';
|
|
4
4
|
export type { ButtonTypes } from '../utils/prop-types';
|
|
5
|
-
export
|
|
5
|
+
export type ButtonComponentType = typeof Button & {
|
|
6
|
+
Compact: typeof CompactButton;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: ButtonComponentType;
|
|
9
|
+
export default _default;
|
package/dist/button/index.js
CHANGED
|
@@ -1314,7 +1314,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1314
1314
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1315
1315
|
};
|
|
1316
1316
|
|
|
1317
|
-
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1317
|
+
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1318
1318
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1319
1319
|
var theme$1 = theme.useTheme();
|
|
1320
1320
|
var _useScale = useScale(),
|
|
@@ -1353,6 +1353,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1353
1353
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1354
1354
|
_filteredProps$round = filteredProps.round,
|
|
1355
1355
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
1356
|
+
_filteredProps$a = filteredProps.a,
|
|
1357
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
1356
1358
|
onClick = filteredProps.onClick,
|
|
1357
1359
|
_filteredProps$auto = filteredProps.auto,
|
|
1358
1360
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1456,7 +1458,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1456
1458
|
|
|
1457
1459
|
// If shadow provided is string then value other default
|
|
1458
1460
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1459
|
-
return /*#__PURE__*/React.createElement("
|
|
1461
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
1462
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
1463
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1464
|
+
color: color
|
|
1465
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
1460
1466
|
ref: buttonRef,
|
|
1461
1467
|
type: type,
|
|
1462
1468
|
disabled: disabled,
|
|
@@ -1470,7 +1476,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1470
1476
|
y: dripY,
|
|
1471
1477
|
color: dripColor,
|
|
1472
1478
|
onCompleted: dripCompletedHandle
|
|
1473
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1479
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1474
1480
|
id: "905110486",
|
|
1475
1481
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
1476
1482
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -1480,36 +1486,25 @@ var Button = withScale(ButtonComponent);
|
|
|
1480
1486
|
|
|
1481
1487
|
var CompactButton = function CompactButton(_ref) {
|
|
1482
1488
|
_ref.color;
|
|
1483
|
-
var
|
|
1484
|
-
to = _ref$to === void 0 ? '/' : _ref$to,
|
|
1485
|
-
children = _ref.children,
|
|
1489
|
+
var children = _ref.children,
|
|
1486
1490
|
iconRight = _ref.iconRight,
|
|
1487
1491
|
icon = _ref.icon,
|
|
1488
1492
|
_ref$scale = _ref.scale,
|
|
1489
1493
|
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1490
1494
|
type = _ref.type,
|
|
1491
1495
|
style = _ref.style,
|
|
1492
|
-
a = _ref.a,
|
|
1493
|
-
_ref$target = _ref.target,
|
|
1494
|
-
target = _ref$target === void 0 ? "_self" : _ref$target,
|
|
1495
1496
|
onClick = _ref.onClick;
|
|
1496
1497
|
var theme$1 = theme.useTheme();
|
|
1497
|
-
if (a) {
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
auto: true,
|
|
1508
|
-
scale: scale,
|
|
1509
|
-
px: 0.6,
|
|
1510
|
-
iconRight: iconRight
|
|
1511
|
-
}, children);
|
|
1512
|
-
}
|
|
1498
|
+
// if (a) {
|
|
1499
|
+
// return (
|
|
1500
|
+
// <Button icon={icon} style={{
|
|
1501
|
+
// ...style,
|
|
1502
|
+
// backgroundColor: theme.palette.background
|
|
1503
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
1504
|
+
// {children}
|
|
1505
|
+
// </Button>
|
|
1506
|
+
// );
|
|
1507
|
+
// }
|
|
1513
1508
|
return /*#__PURE__*/React.createElement(Button, {
|
|
1514
1509
|
icon: icon,
|
|
1515
1510
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
@@ -1523,9 +1518,10 @@ var CompactButton = function CompactButton(_ref) {
|
|
|
1523
1518
|
iconRight: iconRight
|
|
1524
1519
|
}, children);
|
|
1525
1520
|
};
|
|
1526
|
-
var
|
|
1521
|
+
var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
|
|
1527
1522
|
|
|
1528
1523
|
/* "use client" */
|
|
1529
1524
|
|
|
1530
|
-
|
|
1525
|
+
Button.Compact = CompactButton$1;
|
|
1526
|
+
|
|
1531
1527
|
exports.default = Button;
|
package/dist/carousal/index.js
CHANGED
|
@@ -2727,7 +2727,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
2727
2727
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
2728
2728
|
};
|
|
2729
2729
|
|
|
2730
|
-
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
2730
|
+
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
2731
2731
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
2732
2732
|
var theme$1 = theme.useTheme();
|
|
2733
2733
|
var _useScale = useScale(),
|
|
@@ -2766,6 +2766,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2766
2766
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
2767
2767
|
_filteredProps$round = filteredProps.round,
|
|
2768
2768
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
2769
|
+
_filteredProps$a = filteredProps.a,
|
|
2770
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
2769
2771
|
onClick = filteredProps.onClick,
|
|
2770
2772
|
_filteredProps$auto = filteredProps.auto,
|
|
2771
2773
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -2869,7 +2871,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2869
2871
|
|
|
2870
2872
|
// If shadow provided is string then value other default
|
|
2871
2873
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
2872
|
-
return /*#__PURE__*/React.createElement("
|
|
2874
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
2875
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
2876
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
2877
|
+
color: color
|
|
2878
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
2873
2879
|
ref: buttonRef,
|
|
2874
2880
|
type: type,
|
|
2875
2881
|
disabled: disabled,
|
|
@@ -2883,7 +2889,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2883
2889
|
y: dripY,
|
|
2884
2890
|
color: dripColor,
|
|
2885
2891
|
onCompleted: dripCompletedHandle
|
|
2886
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
2892
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
2887
2893
|
id: "905110486",
|
|
2888
2894
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
2889
2895
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -2891,6 +2897,46 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2891
2897
|
ButtonComponent.displayName = 'Button';
|
|
2892
2898
|
var Button = withScale(ButtonComponent);
|
|
2893
2899
|
|
|
2900
|
+
var CompactButton = function CompactButton(_ref) {
|
|
2901
|
+
_ref.color;
|
|
2902
|
+
var children = _ref.children,
|
|
2903
|
+
iconRight = _ref.iconRight,
|
|
2904
|
+
icon = _ref.icon,
|
|
2905
|
+
_ref$scale = _ref.scale,
|
|
2906
|
+
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
2907
|
+
type = _ref.type,
|
|
2908
|
+
style = _ref.style,
|
|
2909
|
+
onClick = _ref.onClick;
|
|
2910
|
+
var theme$1 = theme.useTheme();
|
|
2911
|
+
// if (a) {
|
|
2912
|
+
// return (
|
|
2913
|
+
// <Button icon={icon} style={{
|
|
2914
|
+
// ...style,
|
|
2915
|
+
// backgroundColor: theme.palette.background
|
|
2916
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
2917
|
+
// {children}
|
|
2918
|
+
// </Button>
|
|
2919
|
+
// );
|
|
2920
|
+
// }
|
|
2921
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
2922
|
+
icon: icon,
|
|
2923
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
2924
|
+
backgroundColor: theme$1.palette.background
|
|
2925
|
+
}),
|
|
2926
|
+
type: type,
|
|
2927
|
+
onClick: onClick,
|
|
2928
|
+
auto: true,
|
|
2929
|
+
scale: scale,
|
|
2930
|
+
px: 0.6,
|
|
2931
|
+
iconRight: iconRight
|
|
2932
|
+
}, children);
|
|
2933
|
+
};
|
|
2934
|
+
var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
|
|
2935
|
+
|
|
2936
|
+
/* "use client" */
|
|
2937
|
+
|
|
2938
|
+
Button.Compact = CompactButton$1;
|
|
2939
|
+
|
|
2894
2940
|
var isKeyboardEvent$1 = function isKeyboardEvent(e) {
|
|
2895
2941
|
return e.hasOwnProperty('key');
|
|
2896
2942
|
};
|
package/dist/container/index.js
CHANGED
|
@@ -1407,7 +1407,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1407
1407
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1408
1408
|
};
|
|
1409
1409
|
|
|
1410
|
-
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1410
|
+
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1411
1411
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1412
1412
|
var theme$1 = theme.useTheme();
|
|
1413
1413
|
var _useScale = useScale(),
|
|
@@ -1446,6 +1446,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1446
1446
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1447
1447
|
_filteredProps$round = filteredProps.round,
|
|
1448
1448
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
1449
|
+
_filteredProps$a = filteredProps.a,
|
|
1450
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
1449
1451
|
onClick = filteredProps.onClick,
|
|
1450
1452
|
_filteredProps$auto = filteredProps.auto,
|
|
1451
1453
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1549,7 +1551,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1549
1551
|
|
|
1550
1552
|
// If shadow provided is string then value other default
|
|
1551
1553
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1552
|
-
return /*#__PURE__*/React.createElement("
|
|
1554
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
1555
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
1556
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1557
|
+
color: color
|
|
1558
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
1553
1559
|
ref: buttonRef,
|
|
1554
1560
|
type: type,
|
|
1555
1561
|
disabled: disabled,
|
|
@@ -1563,7 +1569,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1563
1569
|
y: dripY,
|
|
1564
1570
|
color: dripColor,
|
|
1565
1571
|
onCompleted: dripCompletedHandle
|
|
1566
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1572
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1567
1573
|
id: "905110486",
|
|
1568
1574
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
1569
1575
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -1571,6 +1577,46 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1571
1577
|
ButtonComponent.displayName = 'Button';
|
|
1572
1578
|
var Button = withScale(ButtonComponent);
|
|
1573
1579
|
|
|
1580
|
+
var CompactButton = function CompactButton(_ref) {
|
|
1581
|
+
_ref.color;
|
|
1582
|
+
var children = _ref.children,
|
|
1583
|
+
iconRight = _ref.iconRight,
|
|
1584
|
+
icon = _ref.icon,
|
|
1585
|
+
_ref$scale = _ref.scale,
|
|
1586
|
+
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1587
|
+
type = _ref.type,
|
|
1588
|
+
style = _ref.style,
|
|
1589
|
+
onClick = _ref.onClick;
|
|
1590
|
+
var theme$1 = theme.useTheme();
|
|
1591
|
+
// if (a) {
|
|
1592
|
+
// return (
|
|
1593
|
+
// <Button icon={icon} style={{
|
|
1594
|
+
// ...style,
|
|
1595
|
+
// backgroundColor: theme.palette.background
|
|
1596
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
1597
|
+
// {children}
|
|
1598
|
+
// </Button>
|
|
1599
|
+
// );
|
|
1600
|
+
// }
|
|
1601
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
1602
|
+
icon: icon,
|
|
1603
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1604
|
+
backgroundColor: theme$1.palette.background
|
|
1605
|
+
}),
|
|
1606
|
+
type: type,
|
|
1607
|
+
onClick: onClick,
|
|
1608
|
+
auto: true,
|
|
1609
|
+
scale: scale,
|
|
1610
|
+
px: 0.6,
|
|
1611
|
+
iconRight: iconRight
|
|
1612
|
+
}, children);
|
|
1613
|
+
};
|
|
1614
|
+
var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
|
|
1615
|
+
|
|
1616
|
+
/* "use client" */
|
|
1617
|
+
|
|
1618
|
+
Button.Compact = CompactButton$1;
|
|
1619
|
+
|
|
1574
1620
|
var _excluded = ["gap", "children", "direction", "justify", "alignItems", "alignContent", "collapse", "className"];
|
|
1575
1621
|
var wrap = tuple('nowrap', 'wrap', 'wrap-reverse');
|
|
1576
1622
|
var Container = function Container(_ref) {
|
|
@@ -1449,7 +1449,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1449
1449
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1450
1450
|
};
|
|
1451
1451
|
|
|
1452
|
-
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1452
|
+
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1453
1453
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1454
1454
|
var theme$1 = theme.useTheme();
|
|
1455
1455
|
var _useScale = useScale(),
|
|
@@ -1488,6 +1488,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1488
1488
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1489
1489
|
_filteredProps$round = filteredProps.round,
|
|
1490
1490
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
1491
|
+
_filteredProps$a = filteredProps.a,
|
|
1492
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
1491
1493
|
onClick = filteredProps.onClick,
|
|
1492
1494
|
_filteredProps$auto = filteredProps.auto,
|
|
1493
1495
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1591,7 +1593,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1591
1593
|
|
|
1592
1594
|
// If shadow provided is string then value other default
|
|
1593
1595
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1594
|
-
return /*#__PURE__*/React.createElement("
|
|
1596
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
1597
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
1598
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1599
|
+
color: color
|
|
1600
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
1595
1601
|
ref: buttonRef,
|
|
1596
1602
|
type: type,
|
|
1597
1603
|
disabled: disabled,
|
|
@@ -1605,7 +1611,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1605
1611
|
y: dripY,
|
|
1606
1612
|
color: dripColor,
|
|
1607
1613
|
onCompleted: dripCompletedHandle
|
|
1608
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1614
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1609
1615
|
id: "905110486",
|
|
1610
1616
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
1611
1617
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -1613,6 +1619,46 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1613
1619
|
ButtonComponent.displayName = 'Button';
|
|
1614
1620
|
var Button = withScale(ButtonComponent);
|
|
1615
1621
|
|
|
1622
|
+
var CompactButton = function CompactButton(_ref) {
|
|
1623
|
+
_ref.color;
|
|
1624
|
+
var children = _ref.children,
|
|
1625
|
+
iconRight = _ref.iconRight,
|
|
1626
|
+
icon = _ref.icon,
|
|
1627
|
+
_ref$scale = _ref.scale,
|
|
1628
|
+
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1629
|
+
type = _ref.type,
|
|
1630
|
+
style = _ref.style,
|
|
1631
|
+
onClick = _ref.onClick;
|
|
1632
|
+
var theme$1 = theme.useTheme();
|
|
1633
|
+
// if (a) {
|
|
1634
|
+
// return (
|
|
1635
|
+
// <Button icon={icon} style={{
|
|
1636
|
+
// ...style,
|
|
1637
|
+
// backgroundColor: theme.palette.background
|
|
1638
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
1639
|
+
// {children}
|
|
1640
|
+
// </Button>
|
|
1641
|
+
// );
|
|
1642
|
+
// }
|
|
1643
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
1644
|
+
icon: icon,
|
|
1645
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1646
|
+
backgroundColor: theme$1.palette.background
|
|
1647
|
+
}),
|
|
1648
|
+
type: type,
|
|
1649
|
+
onClick: onClick,
|
|
1650
|
+
auto: true,
|
|
1651
|
+
scale: scale,
|
|
1652
|
+
px: 0.6,
|
|
1653
|
+
iconRight: iconRight
|
|
1654
|
+
}, children);
|
|
1655
|
+
};
|
|
1656
|
+
var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
|
|
1657
|
+
|
|
1658
|
+
/* "use client" */
|
|
1659
|
+
|
|
1660
|
+
Button.Compact = CompactButton$1;
|
|
1661
|
+
|
|
1616
1662
|
// export function Clipboard(props: ClipboardProps) {
|
|
1617
1663
|
// const { setToast } = useToasts();
|
|
1618
1664
|
// const { showIcon, text, onCopy, options: options, children, } = props;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { default as Badge } from './badge';
|
|
|
6
6
|
export type { BadgeProps, BadgeAnchorProps } from './badge';
|
|
7
7
|
export { default as Breadcrumbs } from './breadcrumbs';
|
|
8
8
|
export type { BreadcrumbsProps, BreadcrumbsItemProps, BreadcrumbsSeparatorProps, } from './breadcrumbs';
|
|
9
|
-
export { default as Button
|
|
9
|
+
export { default as Button } from './button';
|
|
10
10
|
export type { ButtonProps } from './button';
|
|
11
11
|
export { default as ButtonDropdown } from './button-dropdown';
|
|
12
12
|
export type { ButtonDropdownProps, ButtonDropdownItemProps } from './button-dropdown';
|
package/dist/index.js
CHANGED
|
@@ -4233,7 +4233,7 @@ AutoComplete.Option = AutoCompleteItemComponent;
|
|
|
4233
4233
|
AutoComplete.Searching = AutoCompleteSearch;
|
|
4234
4234
|
AutoComplete.Empty = AutoCompleteEmpty;
|
|
4235
4235
|
|
|
4236
|
-
var _excluded$1i = ["src", "stacked", "text", "isSquare", "className", "children"];
|
|
4236
|
+
var _excluded$1i = ["src", "errorSrc", "stacked", "text", "isSquare", "className", "children"];
|
|
4237
4237
|
|
|
4238
4238
|
// type NativeAttrs = Omit<
|
|
4239
4239
|
// Partial<React.ImgHTMLAttributes<any> & React.HTMLAttributes<any>>,
|
|
@@ -4246,6 +4246,7 @@ var safeText = function safeText(text) {
|
|
|
4246
4246
|
};
|
|
4247
4247
|
var AvatarComponent = function AvatarComponent(_ref) {
|
|
4248
4248
|
var src = _ref.src,
|
|
4249
|
+
errorSrc = _ref.errorSrc,
|
|
4249
4250
|
_ref$stacked = _ref.stacked,
|
|
4250
4251
|
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
4251
4252
|
_ref$text = _ref.text,
|
|
@@ -4273,7 +4274,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
|
|
|
4273
4274
|
onError: function onError(e) {
|
|
4274
4275
|
var target = e.currentTarget;
|
|
4275
4276
|
target.onerror = null; // prevent loop
|
|
4276
|
-
target.src = "https://helpdice.com/avatar.webp";
|
|
4277
|
+
target.src = errorSrc !== null && errorSrc !== void 0 ? errorSrc : "https://helpdice.com/avatar.webp";
|
|
4277
4278
|
},
|
|
4278
4279
|
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")
|
|
4279
4280
|
})), showText && /*#__PURE__*/React$1.createElement("span", _extends({}, props, {
|
|
@@ -4943,7 +4944,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
4943
4944
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
4944
4945
|
};
|
|
4945
4946
|
|
|
4946
|
-
var _excluded$1d = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
4947
|
+
var _excluded$1d = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
4947
4948
|
var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
4948
4949
|
var theme$1 = theme.useTheme();
|
|
4949
4950
|
var _useScale = useScale(),
|
|
@@ -4982,6 +4983,8 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
4982
4983
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
4983
4984
|
_filteredProps$round = filteredProps.round,
|
|
4984
4985
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
4986
|
+
_filteredProps$a = filteredProps.a,
|
|
4987
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
4985
4988
|
onClick = filteredProps.onClick,
|
|
4986
4989
|
_filteredProps$auto = filteredProps.auto,
|
|
4987
4990
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -5085,7 +5088,11 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
5085
5088
|
|
|
5086
5089
|
// If shadow provided is string then value other default
|
|
5087
5090
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
5088
|
-
return /*#__PURE__*/React$1.createElement("
|
|
5091
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, a ? /*#__PURE__*/React$1.createElement("a", _extends({}, props, {
|
|
5092
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
5093
|
+
}), loading && /*#__PURE__*/React$1.createElement(ButtonLoading, {
|
|
5094
|
+
color: color
|
|
5095
|
+
}), childrenWithIcon) : /*#__PURE__*/React$1.createElement("button", _extends({
|
|
5089
5096
|
ref: buttonRef,
|
|
5090
5097
|
type: type,
|
|
5091
5098
|
disabled: disabled,
|
|
@@ -5099,7 +5106,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
5099
5106
|
y: dripY,
|
|
5100
5107
|
color: dripColor,
|
|
5101
5108
|
onCompleted: dripCompletedHandle
|
|
5102
|
-
}), /*#__PURE__*/React$1.createElement(_JSXStyle, {
|
|
5109
|
+
})), /*#__PURE__*/React$1.createElement(_JSXStyle, {
|
|
5103
5110
|
id: "905110486",
|
|
5104
5111
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
5105
5112
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -5109,36 +5116,25 @@ var Button = withScale(ButtonComponent);
|
|
|
5109
5116
|
|
|
5110
5117
|
var CompactButton = function CompactButton(_ref) {
|
|
5111
5118
|
_ref.color;
|
|
5112
|
-
var
|
|
5113
|
-
to = _ref$to === void 0 ? '/' : _ref$to,
|
|
5114
|
-
children = _ref.children,
|
|
5119
|
+
var children = _ref.children,
|
|
5115
5120
|
iconRight = _ref.iconRight,
|
|
5116
5121
|
icon = _ref.icon,
|
|
5117
5122
|
_ref$scale = _ref.scale,
|
|
5118
5123
|
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
5119
5124
|
type = _ref.type,
|
|
5120
5125
|
style = _ref.style,
|
|
5121
|
-
a = _ref.a,
|
|
5122
|
-
_ref$target = _ref.target,
|
|
5123
|
-
target = _ref$target === void 0 ? "_self" : _ref$target,
|
|
5124
5126
|
onClick = _ref.onClick;
|
|
5125
5127
|
var theme$1 = theme.useTheme();
|
|
5126
|
-
if (a) {
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
auto: true,
|
|
5137
|
-
scale: scale,
|
|
5138
|
-
px: 0.6,
|
|
5139
|
-
iconRight: iconRight
|
|
5140
|
-
}, children);
|
|
5141
|
-
}
|
|
5128
|
+
// if (a) {
|
|
5129
|
+
// return (
|
|
5130
|
+
// <Button icon={icon} style={{
|
|
5131
|
+
// ...style,
|
|
5132
|
+
// backgroundColor: theme.palette.background
|
|
5133
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
5134
|
+
// {children}
|
|
5135
|
+
// </Button>
|
|
5136
|
+
// );
|
|
5137
|
+
// }
|
|
5142
5138
|
return /*#__PURE__*/React$1.createElement(Button, {
|
|
5143
5139
|
icon: icon,
|
|
5144
5140
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
@@ -5152,7 +5148,11 @@ var CompactButton = function CompactButton(_ref) {
|
|
|
5152
5148
|
iconRight: iconRight
|
|
5153
5149
|
}, children);
|
|
5154
5150
|
};
|
|
5155
|
-
var
|
|
5151
|
+
var CompactButton$1 = /*#__PURE__*/React$1.memo(CompactButton);
|
|
5152
|
+
|
|
5153
|
+
/* "use client" */
|
|
5154
|
+
|
|
5155
|
+
Button.Compact = CompactButton$1;
|
|
5156
5156
|
|
|
5157
5157
|
/* "use client" */
|
|
5158
5158
|
|
|
@@ -35701,7 +35701,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
35701
35701
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, columns.map(function (column, index) {
|
|
35702
35702
|
var _row$_id;
|
|
35703
35703
|
var currentRowValue = row[column.prop];
|
|
35704
|
-
var cellValue = currentRowValue || emptyText;
|
|
35704
|
+
var cellValue = _typeof(currentRowValue) === "object" ? currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.value : currentRowValue || emptyText;
|
|
35705
35705
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
35706
35706
|
return /*#__PURE__*/React$1.createElement("td", {
|
|
35707
35707
|
style: _objectSpread2({
|
|
@@ -42235,7 +42235,6 @@ exports.KeyMod = KeyMod;
|
|
|
42235
42235
|
exports.Keyboard = Keyboard;
|
|
42236
42236
|
exports.LinearProgress = LinearProgress;
|
|
42237
42237
|
exports.Link = Link;
|
|
42238
|
-
exports.LinkButton = button_compact;
|
|
42239
42238
|
exports.List = List;
|
|
42240
42239
|
exports.Loading = Loading;
|
|
42241
42240
|
exports.LoginWithApple = index$1;
|
package/dist/modal/index.js
CHANGED
|
@@ -1460,7 +1460,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1460
1460
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1461
1461
|
};
|
|
1462
1462
|
|
|
1463
|
-
var _excluded$5 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1463
|
+
var _excluded$5 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1464
1464
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1465
1465
|
var theme$1 = theme.useTheme();
|
|
1466
1466
|
var _useScale = useScale(),
|
|
@@ -1499,6 +1499,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1499
1499
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1500
1500
|
_filteredProps$round = filteredProps.round,
|
|
1501
1501
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
1502
|
+
_filteredProps$a = filteredProps.a,
|
|
1503
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
1502
1504
|
onClick = filteredProps.onClick,
|
|
1503
1505
|
_filteredProps$auto = filteredProps.auto,
|
|
1504
1506
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1602,7 +1604,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1602
1604
|
|
|
1603
1605
|
// If shadow provided is string then value other default
|
|
1604
1606
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1605
|
-
return /*#__PURE__*/React.createElement("
|
|
1607
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
1608
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
1609
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1610
|
+
color: color
|
|
1611
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
1606
1612
|
ref: buttonRef,
|
|
1607
1613
|
type: type,
|
|
1608
1614
|
disabled: disabled,
|
|
@@ -1616,7 +1622,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1616
1622
|
y: dripY,
|
|
1617
1623
|
color: dripColor,
|
|
1618
1624
|
onCompleted: dripCompletedHandle
|
|
1619
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1625
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1620
1626
|
id: "905110486",
|
|
1621
1627
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
1622
1628
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -1683,7 +1683,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1683
1683
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1684
1684
|
};
|
|
1685
1685
|
|
|
1686
|
-
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1686
|
+
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1687
1687
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1688
1688
|
var theme$1 = theme.useTheme();
|
|
1689
1689
|
var _useScale = useScale(),
|
|
@@ -1722,6 +1722,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1722
1722
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1723
1723
|
_filteredProps$round = filteredProps.round,
|
|
1724
1724
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
1725
|
+
_filteredProps$a = filteredProps.a,
|
|
1726
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
1725
1727
|
onClick = filteredProps.onClick,
|
|
1726
1728
|
_filteredProps$auto = filteredProps.auto,
|
|
1727
1729
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1825,7 +1827,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1825
1827
|
|
|
1826
1828
|
// If shadow provided is string then value other default
|
|
1827
1829
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1828
|
-
return /*#__PURE__*/React.createElement("
|
|
1830
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
1831
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
1832
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1833
|
+
color: color
|
|
1834
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
1829
1835
|
ref: buttonRef,
|
|
1830
1836
|
type: type,
|
|
1831
1837
|
disabled: disabled,
|
|
@@ -1839,7 +1845,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1839
1845
|
y: dripY,
|
|
1840
1846
|
color: dripColor,
|
|
1841
1847
|
onCompleted: dripCompletedHandle
|
|
1842
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1848
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1843
1849
|
id: "905110486",
|
|
1844
1850
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
1845
1851
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -1847,6 +1853,46 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1847
1853
|
ButtonComponent.displayName = 'Button';
|
|
1848
1854
|
var Button = withScale(ButtonComponent);
|
|
1849
1855
|
|
|
1856
|
+
var CompactButton = function CompactButton(_ref) {
|
|
1857
|
+
_ref.color;
|
|
1858
|
+
var children = _ref.children,
|
|
1859
|
+
iconRight = _ref.iconRight,
|
|
1860
|
+
icon = _ref.icon,
|
|
1861
|
+
_ref$scale = _ref.scale,
|
|
1862
|
+
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1863
|
+
type = _ref.type,
|
|
1864
|
+
style = _ref.style,
|
|
1865
|
+
onClick = _ref.onClick;
|
|
1866
|
+
var theme$1 = theme.useTheme();
|
|
1867
|
+
// if (a) {
|
|
1868
|
+
// return (
|
|
1869
|
+
// <Button icon={icon} style={{
|
|
1870
|
+
// ...style,
|
|
1871
|
+
// backgroundColor: theme.palette.background
|
|
1872
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
1873
|
+
// {children}
|
|
1874
|
+
// </Button>
|
|
1875
|
+
// );
|
|
1876
|
+
// }
|
|
1877
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
1878
|
+
icon: icon,
|
|
1879
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1880
|
+
backgroundColor: theme$1.palette.background
|
|
1881
|
+
}),
|
|
1882
|
+
type: type,
|
|
1883
|
+
onClick: onClick,
|
|
1884
|
+
auto: true,
|
|
1885
|
+
scale: scale,
|
|
1886
|
+
px: 0.6,
|
|
1887
|
+
iconRight: iconRight
|
|
1888
|
+
}, children);
|
|
1889
|
+
};
|
|
1890
|
+
var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
|
|
1891
|
+
|
|
1892
|
+
/* "use client" */
|
|
1893
|
+
|
|
1894
|
+
Button.Compact = CompactButton$1;
|
|
1895
|
+
|
|
1850
1896
|
var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
|
|
1851
1897
|
var _getModifierChild = function getModifierChild(tags, children) {
|
|
1852
1898
|
if (!tags.length) return children;
|
package/dist/table/index.js
CHANGED
|
@@ -183,6 +183,15 @@ function _toPropertyKey(t) {
|
|
|
183
183
|
var i = _toPrimitive(t, "string");
|
|
184
184
|
return "symbol" == typeof i ? i : i + "";
|
|
185
185
|
}
|
|
186
|
+
function _typeof(o) {
|
|
187
|
+
"@babel/helpers - typeof";
|
|
188
|
+
|
|
189
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
190
|
+
return typeof o;
|
|
191
|
+
} : function (o) {
|
|
192
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
193
|
+
}, _typeof(o);
|
|
194
|
+
}
|
|
186
195
|
function _unsupportedIterableToArray(r, a) {
|
|
187
196
|
if (r) {
|
|
188
197
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
@@ -22347,7 +22356,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
22347
22356
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
22348
22357
|
};
|
|
22349
22358
|
|
|
22350
|
-
var _excluded$6 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
22359
|
+
var _excluded$6 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
22351
22360
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
22352
22361
|
var theme$1 = theme.useTheme();
|
|
22353
22362
|
var _useScale = useScale(),
|
|
@@ -22386,6 +22395,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22386
22395
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
22387
22396
|
_filteredProps$round = filteredProps.round,
|
|
22388
22397
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
22398
|
+
_filteredProps$a = filteredProps.a,
|
|
22399
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
22389
22400
|
onClick = filteredProps.onClick,
|
|
22390
22401
|
_filteredProps$auto = filteredProps.auto,
|
|
22391
22402
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -22489,7 +22500,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22489
22500
|
|
|
22490
22501
|
// If shadow provided is string then value other default
|
|
22491
22502
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
22492
|
-
return /*#__PURE__*/React.createElement("
|
|
22503
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
22504
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
22505
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
22506
|
+
color: color
|
|
22507
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
22493
22508
|
ref: buttonRef,
|
|
22494
22509
|
type: type,
|
|
22495
22510
|
disabled: disabled,
|
|
@@ -22503,7 +22518,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22503
22518
|
y: dripY,
|
|
22504
22519
|
color: dripColor,
|
|
22505
22520
|
onCompleted: dripCompletedHandle
|
|
22506
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22521
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22507
22522
|
id: "905110486",
|
|
22508
22523
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
22509
22524
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -22511,6 +22526,46 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22511
22526
|
ButtonComponent.displayName = 'Button';
|
|
22512
22527
|
var Button = withScale(ButtonComponent);
|
|
22513
22528
|
|
|
22529
|
+
var CompactButton = function CompactButton(_ref) {
|
|
22530
|
+
_ref.color;
|
|
22531
|
+
var children = _ref.children,
|
|
22532
|
+
iconRight = _ref.iconRight,
|
|
22533
|
+
icon = _ref.icon,
|
|
22534
|
+
_ref$scale = _ref.scale,
|
|
22535
|
+
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
22536
|
+
type = _ref.type,
|
|
22537
|
+
style = _ref.style,
|
|
22538
|
+
onClick = _ref.onClick;
|
|
22539
|
+
var theme$1 = theme.useTheme();
|
|
22540
|
+
// if (a) {
|
|
22541
|
+
// return (
|
|
22542
|
+
// <Button icon={icon} style={{
|
|
22543
|
+
// ...style,
|
|
22544
|
+
// backgroundColor: theme.palette.background
|
|
22545
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
22546
|
+
// {children}
|
|
22547
|
+
// </Button>
|
|
22548
|
+
// );
|
|
22549
|
+
// }
|
|
22550
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
22551
|
+
icon: icon,
|
|
22552
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
22553
|
+
backgroundColor: theme$1.palette.background
|
|
22554
|
+
}),
|
|
22555
|
+
type: type,
|
|
22556
|
+
onClick: onClick,
|
|
22557
|
+
auto: true,
|
|
22558
|
+
scale: scale,
|
|
22559
|
+
px: 0.6,
|
|
22560
|
+
iconRight: iconRight
|
|
22561
|
+
}, children);
|
|
22562
|
+
};
|
|
22563
|
+
var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
|
|
22564
|
+
|
|
22565
|
+
/* "use client" */
|
|
22566
|
+
|
|
22567
|
+
Button.Compact = CompactButton$1;
|
|
22568
|
+
|
|
22514
22569
|
var _excluded$5 = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
|
|
22515
22570
|
var _getModifierChild = function getModifierChild(tags, children) {
|
|
22516
22571
|
if (!tags.length) return children;
|
|
@@ -22730,7 +22785,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
22730
22785
|
return /*#__PURE__*/React.createElement(React.Fragment, null, columns.map(function (column, index) {
|
|
22731
22786
|
var _row$_id;
|
|
22732
22787
|
var currentRowValue = row[column.prop];
|
|
22733
|
-
var cellValue = currentRowValue || emptyText;
|
|
22788
|
+
var cellValue = _typeof(currentRowValue) === "object" ? currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.value : currentRowValue || emptyText;
|
|
22734
22789
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
22735
22790
|
return /*#__PURE__*/React.createElement("td", {
|
|
22736
22791
|
style: _objectSpread2({
|
package/dist/text/index.js
CHANGED
|
@@ -1378,7 +1378,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1378
1378
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1379
1379
|
};
|
|
1380
1380
|
|
|
1381
|
-
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1381
|
+
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1382
1382
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1383
1383
|
var theme$1 = theme.useTheme();
|
|
1384
1384
|
var _useScale = useScale(),
|
|
@@ -1417,6 +1417,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1417
1417
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1418
1418
|
_filteredProps$round = filteredProps.round,
|
|
1419
1419
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
1420
|
+
_filteredProps$a = filteredProps.a,
|
|
1421
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
1420
1422
|
onClick = filteredProps.onClick,
|
|
1421
1423
|
_filteredProps$auto = filteredProps.auto,
|
|
1422
1424
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1520,7 +1522,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1520
1522
|
|
|
1521
1523
|
// If shadow provided is string then value other default
|
|
1522
1524
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1523
|
-
return /*#__PURE__*/React.createElement("
|
|
1525
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
1526
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
1527
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1528
|
+
color: color
|
|
1529
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
1524
1530
|
ref: buttonRef,
|
|
1525
1531
|
type: type,
|
|
1526
1532
|
disabled: disabled,
|
|
@@ -1534,7 +1540,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1534
1540
|
y: dripY,
|
|
1535
1541
|
color: dripColor,
|
|
1536
1542
|
onCompleted: dripCompletedHandle
|
|
1537
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1543
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1538
1544
|
id: "905110486",
|
|
1539
1545
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
1540
1546
|
}, ".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$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, ";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.__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;}}")));
|
|
@@ -1542,6 +1548,46 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1542
1548
|
ButtonComponent.displayName = 'Button';
|
|
1543
1549
|
var Button = withScale(ButtonComponent);
|
|
1544
1550
|
|
|
1551
|
+
var CompactButton = function CompactButton(_ref) {
|
|
1552
|
+
_ref.color;
|
|
1553
|
+
var children = _ref.children,
|
|
1554
|
+
iconRight = _ref.iconRight,
|
|
1555
|
+
icon = _ref.icon,
|
|
1556
|
+
_ref$scale = _ref.scale,
|
|
1557
|
+
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
1558
|
+
type = _ref.type,
|
|
1559
|
+
style = _ref.style,
|
|
1560
|
+
onClick = _ref.onClick;
|
|
1561
|
+
var theme$1 = theme.useTheme();
|
|
1562
|
+
// if (a) {
|
|
1563
|
+
// return (
|
|
1564
|
+
// <Button icon={icon} style={{
|
|
1565
|
+
// ...style,
|
|
1566
|
+
// backgroundColor: theme.palette.background
|
|
1567
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
1568
|
+
// {children}
|
|
1569
|
+
// </Button>
|
|
1570
|
+
// );
|
|
1571
|
+
// }
|
|
1572
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
1573
|
+
icon: icon,
|
|
1574
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1575
|
+
backgroundColor: theme$1.palette.background
|
|
1576
|
+
}),
|
|
1577
|
+
type: type,
|
|
1578
|
+
onClick: onClick,
|
|
1579
|
+
auto: true,
|
|
1580
|
+
scale: scale,
|
|
1581
|
+
px: 0.6,
|
|
1582
|
+
iconRight: iconRight
|
|
1583
|
+
}, children);
|
|
1584
|
+
};
|
|
1585
|
+
var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
|
|
1586
|
+
|
|
1587
|
+
/* "use client" */
|
|
1588
|
+
|
|
1589
|
+
Button.Compact = CompactButton$1;
|
|
1590
|
+
|
|
1545
1591
|
var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
|
|
1546
1592
|
var _getModifierChild = function getModifierChild(tags, children) {
|
|
1547
1593
|
if (!tags.length) return children;
|
package/dist/user/index.js
CHANGED
|
@@ -853,7 +853,7 @@ var withScale = function withScale(Render) {
|
|
|
853
853
|
return ScaleFC;
|
|
854
854
|
};
|
|
855
855
|
|
|
856
|
-
var _excluded$3 = ["src", "stacked", "text", "isSquare", "className", "children"];
|
|
856
|
+
var _excluded$3 = ["src", "errorSrc", "stacked", "text", "isSquare", "className", "children"];
|
|
857
857
|
|
|
858
858
|
// type NativeAttrs = Omit<
|
|
859
859
|
// Partial<React.ImgHTMLAttributes<any> & React.HTMLAttributes<any>>,
|
|
@@ -866,6 +866,7 @@ var safeText = function safeText(text) {
|
|
|
866
866
|
};
|
|
867
867
|
var AvatarComponent = function AvatarComponent(_ref) {
|
|
868
868
|
var src = _ref.src,
|
|
869
|
+
errorSrc = _ref.errorSrc,
|
|
869
870
|
_ref$stacked = _ref.stacked,
|
|
870
871
|
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
871
872
|
_ref$text = _ref.text,
|
|
@@ -893,7 +894,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
|
|
|
893
894
|
onError: function onError(e) {
|
|
894
895
|
var target = e.currentTarget;
|
|
895
896
|
target.onerror = null; // prevent loop
|
|
896
|
-
target.src = "https://helpdice.com/avatar.webp";
|
|
897
|
+
target.src = errorSrc !== null && errorSrc !== void 0 ? errorSrc : "https://helpdice.com/avatar.webp";
|
|
897
898
|
},
|
|
898
899
|
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")
|
|
899
900
|
})), showText && /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
package/esm/avatar/avatar.d.ts
CHANGED
package/esm/avatar/avatar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["src", "stacked", "text", "isSquare", "className", "children"];
|
|
3
|
+
var _excluded = ["src", "errorSrc", "stacked", "text", "isSquare", "className", "children"];
|
|
4
4
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
5
5
|
/* "use client" */
|
|
6
6
|
|
|
@@ -19,6 +19,7 @@ var safeText = function safeText(text) {
|
|
|
19
19
|
};
|
|
20
20
|
var AvatarComponent = function AvatarComponent(_ref) {
|
|
21
21
|
var src = _ref.src,
|
|
22
|
+
errorSrc = _ref.errorSrc,
|
|
22
23
|
_ref$stacked = _ref.stacked,
|
|
23
24
|
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
24
25
|
_ref$text = _ref.text,
|
|
@@ -46,7 +47,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
|
|
|
46
47
|
onError: function onError(e) {
|
|
47
48
|
var target = e.currentTarget;
|
|
48
49
|
target.onerror = null; // prevent loop
|
|
49
|
-
target.src = "https://helpdice.com/avatar.webp";
|
|
50
|
+
target.src = errorSrc !== null && errorSrc !== void 0 ? errorSrc : "https://helpdice.com/avatar.webp";
|
|
50
51
|
},
|
|
51
52
|
className: _JSXStyle.dynamic([["2295275975", [theme.palette.accents_2, radius, theme.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")
|
|
52
53
|
})), showText && /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
@@ -4,8 +4,6 @@ import Button from './button';
|
|
|
4
4
|
import { useTheme } from '@helpdice/theme';
|
|
5
5
|
var CompactButton = function CompactButton(_ref) {
|
|
6
6
|
var _color = _ref.color,
|
|
7
|
-
_ref$to = _ref.to,
|
|
8
|
-
to = _ref$to === void 0 ? '/' : _ref$to,
|
|
9
7
|
children = _ref.children,
|
|
10
8
|
iconRight = _ref.iconRight,
|
|
11
9
|
icon = _ref.icon,
|
|
@@ -13,27 +11,18 @@ var CompactButton = function CompactButton(_ref) {
|
|
|
13
11
|
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
14
12
|
type = _ref.type,
|
|
15
13
|
style = _ref.style,
|
|
16
|
-
a = _ref.a,
|
|
17
|
-
_ref$target = _ref.target,
|
|
18
|
-
target = _ref$target === void 0 ? "_self" : _ref$target,
|
|
19
14
|
onClick = _ref.onClick;
|
|
20
15
|
var theme = useTheme();
|
|
21
|
-
if (a) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
auto: true,
|
|
32
|
-
scale: scale,
|
|
33
|
-
px: 0.6,
|
|
34
|
-
iconRight: iconRight
|
|
35
|
-
}, children);
|
|
36
|
-
}
|
|
16
|
+
// if (a) {
|
|
17
|
+
// return (
|
|
18
|
+
// <Button icon={icon} style={{
|
|
19
|
+
// ...style,
|
|
20
|
+
// backgroundColor: theme.palette.background
|
|
21
|
+
// }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
|
|
22
|
+
// {children}
|
|
23
|
+
// </Button>
|
|
24
|
+
// );
|
|
25
|
+
// }
|
|
37
26
|
return /*#__PURE__*/React.createElement(Button, {
|
|
38
27
|
icon: icon,
|
|
39
28
|
style: _extends({}, style, {
|
package/esm/button/button.d.ts
CHANGED
package/esm/button/button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
4
|
+
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "a", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
5
5
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
6
6
|
/* "use client" */
|
|
7
7
|
|
|
@@ -52,6 +52,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
52
52
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
53
53
|
_filteredProps$round = filteredProps.round,
|
|
54
54
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
55
|
+
_filteredProps$a = filteredProps.a,
|
|
56
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
55
57
|
onClick = filteredProps.onClick,
|
|
56
58
|
_filteredProps$auto = filteredProps.auto,
|
|
57
59
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -156,7 +158,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
156
158
|
|
|
157
159
|
// If shadow provided is string then value other default
|
|
158
160
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme.shadows.level.z2 : 'none';
|
|
159
|
-
return /*#__PURE__*/React.createElement("
|
|
161
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, a ? /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
162
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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) || "")
|
|
163
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
164
|
+
color: color
|
|
165
|
+
}), childrenWithIcon) : /*#__PURE__*/React.createElement("button", _extends({
|
|
160
166
|
ref: buttonRef,
|
|
161
167
|
type: type,
|
|
162
168
|
disabled: disabled,
|
|
@@ -170,7 +176,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
170
176
|
y: dripY,
|
|
171
177
|
color: dripColor,
|
|
172
178
|
onCompleted: dripCompletedHandle
|
|
173
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
179
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
174
180
|
id: "905110486",
|
|
175
181
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, 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']
|
|
176
182
|
}, ".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(shadow ? 'transparent' : border, ";cursor:").concat(cursor, ";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.__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;}}")));
|
package/esm/button/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import Button from './button';
|
|
2
|
-
|
|
2
|
+
import CompactButton from './button.compact';
|
|
3
3
|
export type { ButtonProps } from './button';
|
|
4
4
|
export type { ButtonTypes } from '../utils/prop-types';
|
|
5
|
-
export
|
|
5
|
+
export type ButtonComponentType = typeof Button & {
|
|
6
|
+
Compact: typeof CompactButton;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: ButtonComponentType;
|
|
9
|
+
export default _default;
|
package/esm/button/index.js
CHANGED
package/esm/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { default as Badge } from './badge';
|
|
|
6
6
|
export type { BadgeProps, BadgeAnchorProps } from './badge';
|
|
7
7
|
export { default as Breadcrumbs } from './breadcrumbs';
|
|
8
8
|
export type { BreadcrumbsProps, BreadcrumbsItemProps, BreadcrumbsSeparatorProps, } from './breadcrumbs';
|
|
9
|
-
export { default as Button
|
|
9
|
+
export { default as Button } from './button';
|
|
10
10
|
export type { ButtonProps } from './button';
|
|
11
11
|
export { default as ButtonDropdown } from './button-dropdown';
|
|
12
12
|
export type { ButtonDropdownProps, ButtonDropdownItemProps } from './button-dropdown';
|
package/esm/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { default as AutoComplete } from './auto-complete';
|
|
|
5
5
|
export { default as Avatar } from './avatar';
|
|
6
6
|
export { default as Badge } from './badge';
|
|
7
7
|
export { default as Breadcrumbs } from './breadcrumbs';
|
|
8
|
-
export { default as Button
|
|
8
|
+
export { default as Button } from './button';
|
|
9
9
|
export { default as ButtonDropdown } from './button-dropdown';
|
|
10
10
|
export { default as ButtonGroup } from './button-group';
|
|
11
11
|
export { default as Capacity } from './capacity';
|
package/esm/table/table-cell.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
var TableCell = function TableCell(_ref) {
|
|
4
5
|
var columns = _ref.columns,
|
|
@@ -10,7 +11,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
10
11
|
return /*#__PURE__*/React.createElement(React.Fragment, null, columns.map(function (column, index) {
|
|
11
12
|
var _row$_id;
|
|
12
13
|
var currentRowValue = row[column.prop];
|
|
13
|
-
var cellValue = currentRowValue || emptyText;
|
|
14
|
+
var cellValue = _typeof(currentRowValue) === "object" ? currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.value : currentRowValue || emptyText;
|
|
14
15
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
15
16
|
return /*#__PURE__*/React.createElement("td", {
|
|
16
17
|
style: _extends({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helpdice/ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "esm/index.d.ts",
|
|
6
6
|
"unpkg": "dist/index.min.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@helpdice/icons": "^1.2.5",
|
|
66
66
|
"@helpdice/sdk": "^0.4.3",
|
|
67
67
|
"@helpdice/utils": "^0.1.4",
|
|
68
|
-
"@helpdice/pro": "2.0
|
|
68
|
+
"@helpdice/pro": "2.1.0",
|
|
69
69
|
"@mapbox/rehype-prism": "^0.9.0",
|
|
70
70
|
"@mdx-js/loader": "^3.1.0",
|
|
71
71
|
"@mdx-js/react": "^3.1.0",
|