@helpdice/ui 2.3.2 → 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/auto-complete/index.js +9 -2
- package/dist/avatar/avatar.d.ts +1 -0
- package/dist/avatar/index.js +7 -1
- 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 +42 -31
- package/dist/input/index.js +9 -2
- package/dist/input/input-props.d.ts +1 -0
- package/dist/modal/index.js +9 -3
- package/dist/placeholder/index.js +49 -3
- package/dist/table/index.js +68 -6
- package/dist/text/index.js +49 -3
- package/dist/user/index.js +7 -1
- package/esm/avatar/avatar.d.ts +1 -0
- package/esm/avatar/avatar.js +7 -1
- 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/input/input-field.js +9 -2
- package/esm/input/input-props.d.ts +1 -0
- package/esm/table/table-cell.js +2 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1368,7 +1368,7 @@ var withScale = function withScale(Render) {
|
|
|
1368
1368
|
return ScaleFC;
|
|
1369
1369
|
};
|
|
1370
1370
|
|
|
1371
|
-
var _excluded$1o = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1371
|
+
var _excluded$1o = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1372
1372
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1373
1373
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1374
1374
|
target: el,
|
|
@@ -1404,6 +1404,7 @@ var InputComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
|
1404
1404
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1405
1405
|
onBlur = _ref.onBlur,
|
|
1406
1406
|
onFocus = _ref.onFocus,
|
|
1407
|
+
onEnter = _ref.onEnter,
|
|
1407
1408
|
_ref$autoComplete = _ref.autoComplete,
|
|
1408
1409
|
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
1409
1410
|
_ref$placeholder = _ref.placeholder,
|
|
@@ -1483,6 +1484,11 @@ var InputComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
|
1483
1484
|
setSelfValue(value);
|
|
1484
1485
|
}
|
|
1485
1486
|
});
|
|
1487
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
1488
|
+
if (e.key === "Enter") {
|
|
1489
|
+
onEnter && onEnter(e);
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1486
1492
|
var controlledValue = isControlledComponent ? {
|
|
1487
1493
|
value: selfValue
|
|
1488
1494
|
} : {
|
|
@@ -1510,7 +1516,8 @@ var InputComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
|
1510
1516
|
onFocus: focusHandler,
|
|
1511
1517
|
onBlur: blurHandler,
|
|
1512
1518
|
onChange: changeHandler,
|
|
1513
|
-
autoComplete: autoComplete
|
|
1519
|
+
autoComplete: autoComplete,
|
|
1520
|
+
onKeyDown: handleKeyDown
|
|
1514
1521
|
}, inputProps, {
|
|
1515
1522
|
className: _JSXStyle.dynamic([["2582554466", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || theme.useClasses({
|
|
1516
1523
|
disabled: disabled
|
|
@@ -4226,7 +4233,7 @@ AutoComplete.Option = AutoCompleteItemComponent;
|
|
|
4226
4233
|
AutoComplete.Searching = AutoCompleteSearch;
|
|
4227
4234
|
AutoComplete.Empty = AutoCompleteEmpty;
|
|
4228
4235
|
|
|
4229
|
-
var _excluded$1i = ["src", "stacked", "text", "isSquare", "className", "children"];
|
|
4236
|
+
var _excluded$1i = ["src", "errorSrc", "stacked", "text", "isSquare", "className", "children"];
|
|
4230
4237
|
|
|
4231
4238
|
// type NativeAttrs = Omit<
|
|
4232
4239
|
// Partial<React.ImgHTMLAttributes<any> & React.HTMLAttributes<any>>,
|
|
@@ -4239,6 +4246,7 @@ var safeText = function safeText(text) {
|
|
|
4239
4246
|
};
|
|
4240
4247
|
var AvatarComponent = function AvatarComponent(_ref) {
|
|
4241
4248
|
var src = _ref.src,
|
|
4249
|
+
errorSrc = _ref.errorSrc,
|
|
4242
4250
|
_ref$stacked = _ref.stacked,
|
|
4243
4251
|
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
4244
4252
|
_ref$text = _ref.text,
|
|
@@ -4263,6 +4271,11 @@ var AvatarComponent = function AvatarComponent(_ref) {
|
|
|
4263
4271
|
src: src,
|
|
4264
4272
|
draggable: false
|
|
4265
4273
|
}, props, {
|
|
4274
|
+
onError: function onError(e) {
|
|
4275
|
+
var target = e.currentTarget;
|
|
4276
|
+
target.onerror = null; // prevent loop
|
|
4277
|
+
target.src = errorSrc !== null && errorSrc !== void 0 ? errorSrc : "https://helpdice.com/avatar.webp";
|
|
4278
|
+
},
|
|
4266
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")
|
|
4267
4280
|
})), showText && /*#__PURE__*/React$1.createElement("span", _extends({}, props, {
|
|
4268
4281
|
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-text")
|
|
@@ -4931,7 +4944,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
4931
4944
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
4932
4945
|
};
|
|
4933
4946
|
|
|
4934
|
-
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"];
|
|
4935
4948
|
var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
4936
4949
|
var theme$1 = theme.useTheme();
|
|
4937
4950
|
var _useScale = useScale(),
|
|
@@ -4970,6 +4983,8 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
4970
4983
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
4971
4984
|
_filteredProps$round = filteredProps.round,
|
|
4972
4985
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
4986
|
+
_filteredProps$a = filteredProps.a,
|
|
4987
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
4973
4988
|
onClick = filteredProps.onClick,
|
|
4974
4989
|
_filteredProps$auto = filteredProps.auto,
|
|
4975
4990
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -5073,7 +5088,11 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
5073
5088
|
|
|
5074
5089
|
// If shadow provided is string then value other default
|
|
5075
5090
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
5076
|
-
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({
|
|
5077
5096
|
ref: buttonRef,
|
|
5078
5097
|
type: type,
|
|
5079
5098
|
disabled: disabled,
|
|
@@ -5087,7 +5106,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
5087
5106
|
y: dripY,
|
|
5088
5107
|
color: dripColor,
|
|
5089
5108
|
onCompleted: dripCompletedHandle
|
|
5090
|
-
}), /*#__PURE__*/React$1.createElement(_JSXStyle, {
|
|
5109
|
+
})), /*#__PURE__*/React$1.createElement(_JSXStyle, {
|
|
5091
5110
|
id: "905110486",
|
|
5092
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']
|
|
5093
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;}}")));
|
|
@@ -5097,36 +5116,25 @@ var Button = withScale(ButtonComponent);
|
|
|
5097
5116
|
|
|
5098
5117
|
var CompactButton = function CompactButton(_ref) {
|
|
5099
5118
|
_ref.color;
|
|
5100
|
-
var
|
|
5101
|
-
to = _ref$to === void 0 ? '/' : _ref$to,
|
|
5102
|
-
children = _ref.children,
|
|
5119
|
+
var children = _ref.children,
|
|
5103
5120
|
iconRight = _ref.iconRight,
|
|
5104
5121
|
icon = _ref.icon,
|
|
5105
5122
|
_ref$scale = _ref.scale,
|
|
5106
5123
|
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
5107
5124
|
type = _ref.type,
|
|
5108
5125
|
style = _ref.style,
|
|
5109
|
-
a = _ref.a,
|
|
5110
|
-
_ref$target = _ref.target,
|
|
5111
|
-
target = _ref$target === void 0 ? "_self" : _ref$target,
|
|
5112
5126
|
onClick = _ref.onClick;
|
|
5113
5127
|
var theme$1 = theme.useTheme();
|
|
5114
|
-
if (a) {
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
auto: true,
|
|
5125
|
-
scale: scale,
|
|
5126
|
-
px: 0.6,
|
|
5127
|
-
iconRight: iconRight
|
|
5128
|
-
}, children);
|
|
5129
|
-
}
|
|
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
|
+
// }
|
|
5130
5138
|
return /*#__PURE__*/React$1.createElement(Button, {
|
|
5131
5139
|
icon: icon,
|
|
5132
5140
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
@@ -5140,7 +5148,11 @@ var CompactButton = function CompactButton(_ref) {
|
|
|
5140
5148
|
iconRight: iconRight
|
|
5141
5149
|
}, children);
|
|
5142
5150
|
};
|
|
5143
|
-
var
|
|
5151
|
+
var CompactButton$1 = /*#__PURE__*/React$1.memo(CompactButton);
|
|
5152
|
+
|
|
5153
|
+
/* "use client" */
|
|
5154
|
+
|
|
5155
|
+
Button.Compact = CompactButton$1;
|
|
5144
5156
|
|
|
5145
5157
|
/* "use client" */
|
|
5146
5158
|
|
|
@@ -35689,7 +35701,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
35689
35701
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, columns.map(function (column, index) {
|
|
35690
35702
|
var _row$_id;
|
|
35691
35703
|
var currentRowValue = row[column.prop];
|
|
35692
|
-
var cellValue = currentRowValue || emptyText;
|
|
35704
|
+
var cellValue = _typeof(currentRowValue) === "object" ? currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.value : currentRowValue || emptyText;
|
|
35693
35705
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
35694
35706
|
return /*#__PURE__*/React$1.createElement("td", {
|
|
35695
35707
|
style: _objectSpread2({
|
|
@@ -42223,7 +42235,6 @@ exports.KeyMod = KeyMod;
|
|
|
42223
42235
|
exports.Keyboard = Keyboard;
|
|
42224
42236
|
exports.LinearProgress = LinearProgress;
|
|
42225
42237
|
exports.Link = Link;
|
|
42226
|
-
exports.LinkButton = button_compact;
|
|
42227
42238
|
exports.List = List;
|
|
42228
42239
|
exports.Loading = Loading;
|
|
42229
42240
|
exports.LoginWithApple = index$1;
|
package/dist/input/index.js
CHANGED
|
@@ -1024,7 +1024,7 @@ var withScale = function withScale(Render) {
|
|
|
1024
1024
|
return ScaleFC;
|
|
1025
1025
|
};
|
|
1026
1026
|
|
|
1027
|
-
var _excluded$3 = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1027
|
+
var _excluded$3 = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1028
1028
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1029
1029
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1030
1030
|
target: el,
|
|
@@ -1060,6 +1060,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1060
1060
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1061
1061
|
onBlur = _ref.onBlur,
|
|
1062
1062
|
onFocus = _ref.onFocus,
|
|
1063
|
+
onEnter = _ref.onEnter,
|
|
1063
1064
|
_ref$autoComplete = _ref.autoComplete,
|
|
1064
1065
|
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
1065
1066
|
_ref$placeholder = _ref.placeholder,
|
|
@@ -1139,6 +1140,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1139
1140
|
setSelfValue(value);
|
|
1140
1141
|
}
|
|
1141
1142
|
});
|
|
1143
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
1144
|
+
if (e.key === "Enter") {
|
|
1145
|
+
onEnter && onEnter(e);
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1142
1148
|
var controlledValue = isControlledComponent ? {
|
|
1143
1149
|
value: selfValue
|
|
1144
1150
|
} : {
|
|
@@ -1166,7 +1172,8 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1166
1172
|
onFocus: focusHandler,
|
|
1167
1173
|
onBlur: blurHandler,
|
|
1168
1174
|
onChange: changeHandler,
|
|
1169
|
-
autoComplete: autoComplete
|
|
1175
|
+
autoComplete: autoComplete,
|
|
1176
|
+
onKeyDown: handleKeyDown
|
|
1170
1177
|
}, inputProps, {
|
|
1171
1178
|
className: _JSXStyle.dynamic([["2582554466", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || theme.useClasses({
|
|
1172
1179
|
disabled: disabled
|
|
@@ -24,6 +24,7 @@ export interface Props {
|
|
|
24
24
|
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
25
25
|
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
26
26
|
onIconClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
27
|
+
onEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
27
28
|
autoComplete?: string;
|
|
28
29
|
crossOrigin?: any;
|
|
29
30
|
onPointerEnterCapture?: any;
|
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);
|
|
@@ -1073,7 +1082,7 @@ var withScale = function withScale(Render) {
|
|
|
1073
1082
|
return ScaleFC;
|
|
1074
1083
|
};
|
|
1075
1084
|
|
|
1076
|
-
var _excluded$i = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1085
|
+
var _excluded$i = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1077
1086
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1078
1087
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1079
1088
|
target: el,
|
|
@@ -1109,6 +1118,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1109
1118
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1110
1119
|
onBlur = _ref.onBlur,
|
|
1111
1120
|
onFocus = _ref.onFocus,
|
|
1121
|
+
onEnter = _ref.onEnter,
|
|
1112
1122
|
_ref$autoComplete = _ref.autoComplete,
|
|
1113
1123
|
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
1114
1124
|
_ref$placeholder = _ref.placeholder,
|
|
@@ -1188,6 +1198,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1188
1198
|
setSelfValue(value);
|
|
1189
1199
|
}
|
|
1190
1200
|
});
|
|
1201
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
1202
|
+
if (e.key === "Enter") {
|
|
1203
|
+
onEnter && onEnter(e);
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1191
1206
|
var controlledValue = isControlledComponent ? {
|
|
1192
1207
|
value: selfValue
|
|
1193
1208
|
} : {
|
|
@@ -1215,7 +1230,8 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1215
1230
|
onFocus: focusHandler,
|
|
1216
1231
|
onBlur: blurHandler,
|
|
1217
1232
|
onChange: changeHandler,
|
|
1218
|
-
autoComplete: autoComplete
|
|
1233
|
+
autoComplete: autoComplete,
|
|
1234
|
+
onKeyDown: handleKeyDown
|
|
1219
1235
|
}, inputProps, {
|
|
1220
1236
|
className: _JSXStyle.dynamic([["2582554466", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || theme.useClasses({
|
|
1221
1237
|
disabled: disabled
|
|
@@ -22340,7 +22356,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
22340
22356
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
22341
22357
|
};
|
|
22342
22358
|
|
|
22343
|
-
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"];
|
|
22344
22360
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
22345
22361
|
var theme$1 = theme.useTheme();
|
|
22346
22362
|
var _useScale = useScale(),
|
|
@@ -22379,6 +22395,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22379
22395
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
22380
22396
|
_filteredProps$round = filteredProps.round,
|
|
22381
22397
|
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
22398
|
+
_filteredProps$a = filteredProps.a,
|
|
22399
|
+
a = _filteredProps$a === void 0 ? false : _filteredProps$a,
|
|
22382
22400
|
onClick = filteredProps.onClick,
|
|
22383
22401
|
_filteredProps$auto = filteredProps.auto,
|
|
22384
22402
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -22482,7 +22500,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22482
22500
|
|
|
22483
22501
|
// If shadow provided is string then value other default
|
|
22484
22502
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
22485
|
-
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({
|
|
22486
22508
|
ref: buttonRef,
|
|
22487
22509
|
type: type,
|
|
22488
22510
|
disabled: disabled,
|
|
@@ -22496,7 +22518,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22496
22518
|
y: dripY,
|
|
22497
22519
|
color: dripColor,
|
|
22498
22520
|
onCompleted: dripCompletedHandle
|
|
22499
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22521
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22500
22522
|
id: "905110486",
|
|
22501
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']
|
|
22502
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;}}")));
|
|
@@ -22504,6 +22526,46 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22504
22526
|
ButtonComponent.displayName = 'Button';
|
|
22505
22527
|
var Button = withScale(ButtonComponent);
|
|
22506
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
|
+
|
|
22507
22569
|
var _excluded$5 = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
|
|
22508
22570
|
var _getModifierChild = function getModifierChild(tags, children) {
|
|
22509
22571
|
if (!tags.length) return children;
|
|
@@ -22723,7 +22785,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
22723
22785
|
return /*#__PURE__*/React.createElement(React.Fragment, null, columns.map(function (column, index) {
|
|
22724
22786
|
var _row$_id;
|
|
22725
22787
|
var currentRowValue = row[column.prop];
|
|
22726
|
-
var cellValue = currentRowValue || emptyText;
|
|
22788
|
+
var cellValue = _typeof(currentRowValue) === "object" ? currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.value : currentRowValue || emptyText;
|
|
22727
22789
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
22728
22790
|
return /*#__PURE__*/React.createElement("td", {
|
|
22729
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;
|