@helpdice/ui 2.1.5 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-complete/index.js +12 -10
- package/dist/button/button.d.ts +1 -1
- package/dist/button/index.js +73 -16
- package/dist/button/styles.d.ts +1 -0
- package/dist/carousal/index.js +73 -16
- package/dist/copy-to-clipboard/clipboard.d.ts +2 -0
- package/dist/copy-to-clipboard/copy.d.ts +2 -0
- package/dist/copy-to-clipboard/index.d.ts +2 -0
- package/dist/copy-to-clipboard/index.js +1717 -0
- package/dist/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/dist/html-renderer/index.js +35 -12
- package/dist/index.d.ts +3 -2
- package/dist/index.js +539 -220
- package/dist/input/index.js +12 -10
- package/dist/input/input-props.d.ts +1 -0
- package/dist/modal/index.js +73 -16
- package/dist/notetip/index.js +690 -0
- package/dist/notetip/{index.d.ts → note-tip.d.ts} +2 -2
- package/dist/table/index.js +990 -930
- package/esm/button/button.d.ts +1 -1
- package/esm/button/button.js +51 -5
- package/esm/button/styles.d.ts +1 -0
- package/esm/button/styles.js +22 -11
- package/esm/copy-to-clipboard/clipboard.d.ts +2 -0
- package/esm/copy-to-clipboard/copy.d.ts +2 -0
- package/esm/copy-to-clipboard/copy.js +105 -0
- package/esm/copy-to-clipboard/index.d.ts +2 -0
- package/esm/copy-to-clipboard/index.js +2 -0
- package/esm/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/esm/copy-to-clipboard/toggle-selection.js +31 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.js +3 -2
- package/esm/input/input-field.js +12 -10
- package/esm/input/input-props.d.ts +1 -0
- package/esm/notetip/index.js +2 -97
- package/esm/notetip/{index.d.ts → note-tip.d.ts} +2 -2
- package/esm/notetip/note-tip.js +97 -0
- package/esm/table/table-body.js +2 -2
- package/esm/table/table-cell.js +1 -1
- package/esm/table/table-head.js +4 -2
- package/esm/table/table.js +0 -1
- package/package.json +14 -7
|
@@ -1026,7 +1026,7 @@ var withScale = function withScale(Render) {
|
|
|
1026
1026
|
return ScaleFC;
|
|
1027
1027
|
};
|
|
1028
1028
|
|
|
1029
|
-
var _excluded$4 = ["label", "labelRight", "color", "error", "type", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1029
|
+
var _excluded$4 = ["label", "labelRight", "color", "error", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1030
1030
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1031
1031
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1032
1032
|
target: el,
|
|
@@ -1042,6 +1042,8 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1042
1042
|
_ref$type = _ref.type,
|
|
1043
1043
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1044
1044
|
icon = _ref.icon,
|
|
1045
|
+
_ref$variant = _ref.variant,
|
|
1046
|
+
variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
|
|
1045
1047
|
iconRight = _ref.iconRight,
|
|
1046
1048
|
_ref$iconClickable = _ref.iconClickable,
|
|
1047
1049
|
iconClickable = _ref$iconClickable === void 0 ? false : _ref$iconClickable,
|
|
@@ -1146,11 +1148,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1146
1148
|
var inputProps = _objectSpread2(_objectSpread2({}, props), controlledValue);
|
|
1147
1149
|
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
1148
1150
|
return /*#__PURE__*/React.createElement("div", {
|
|
1149
|
-
className: _JSXStyle.dynamic([["
|
|
1151
|
+
className: _JSXStyle.dynamic([["3970712841", [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]]]) + " " + "with-label"
|
|
1150
1152
|
}, children && /*#__PURE__*/React.createElement(InputBlockLabel, null, children), /*#__PURE__*/React.createElement("div", {
|
|
1151
|
-
className: _JSXStyle.dynamic([["
|
|
1153
|
+
className: _JSXStyle.dynamic([["3970712841", [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]]]) + " " + (theme.useClasses('input-container', className) || "")
|
|
1152
1154
|
}, label && /*#__PURE__*/React.createElement(MemoInputLabel, null, label), /*#__PURE__*/React.createElement("div", {
|
|
1153
|
-
className: _JSXStyle.dynamic([["
|
|
1155
|
+
className: _JSXStyle.dynamic([["3970712841", [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]]]) + " " + (theme.useClasses('input-wrapper', {
|
|
1154
1156
|
hover: hover,
|
|
1155
1157
|
disabled: disabled
|
|
1156
1158
|
}, labelClasses) || "")
|
|
@@ -1167,7 +1169,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1167
1169
|
onChange: changeHandler,
|
|
1168
1170
|
autoComplete: autoComplete
|
|
1169
1171
|
}, inputProps, {
|
|
1170
|
-
className: _JSXStyle.dynamic([["
|
|
1172
|
+
className: _JSXStyle.dynamic([["3970712841", [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({
|
|
1171
1173
|
disabled: disabled
|
|
1172
1174
|
}, iconClasses) || "")
|
|
1173
1175
|
})), clearable && /*#__PURE__*/React.createElement(MemoInputIconClear, {
|
|
@@ -1179,7 +1181,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1179
1181
|
}, iconProps))), labelRight && /*#__PURE__*/React.createElement(MemoInputLabel, {
|
|
1180
1182
|
isRight: true
|
|
1181
1183
|
}, labelRight), /*#__PURE__*/React.createElement("br", {
|
|
1182
|
-
className: _JSXStyle.dynamic([["
|
|
1184
|
+
className: _JSXStyle.dynamic([["3970712841", [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]]])
|
|
1183
1185
|
})), error && /*#__PURE__*/React.createElement("p", {
|
|
1184
1186
|
style: {
|
|
1185
1187
|
marginTop: 0.4,
|
|
@@ -1188,11 +1190,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1188
1190
|
marginBottom: '0.4rem',
|
|
1189
1191
|
textAlign: 'left'
|
|
1190
1192
|
},
|
|
1191
|
-
className: _JSXStyle.dynamic([["
|
|
1193
|
+
className: _JSXStyle.dynamic([["3970712841", [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]]]) + " " + "input-error"
|
|
1192
1194
|
}, error), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1193
|
-
id: "
|
|
1194
|
-
dynamic: [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), theme$1.layout.radius, 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]
|
|
1195
|
-
}, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-error.__jsx-style-dynamic-selector{color:#aa4a44;}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(theme$1.layout.radius, ";border:1px solid ").concat(borderColor, ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme$1.palette.accents_1, ";border-color:").concat(theme$1.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(color, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme$1.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")));
|
|
1195
|
+
id: "3970712841",
|
|
1196
|
+
dynamic: [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]
|
|
1197
|
+
}, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-error.__jsx-style-dynamic-selector{color:#aa4a44;}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme$1.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme$1.palette.accents_1, ";border-color:").concat(theme$1.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(color, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme$1.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")));
|
|
1196
1198
|
});
|
|
1197
1199
|
InputComponent.displayName = 'Input';
|
|
1198
1200
|
var Input = withScale(InputComponent);
|
package/dist/button/button.d.ts
CHANGED
package/dist/button/index.js
CHANGED
|
@@ -1121,22 +1121,26 @@ var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
|
|
|
1121
1121
|
secondary: {
|
|
1122
1122
|
bg: palette.background,
|
|
1123
1123
|
border: palette.foreground,
|
|
1124
|
-
color: palette.foreground
|
|
1124
|
+
color: palette.foreground,
|
|
1125
|
+
ripple: ''
|
|
1125
1126
|
},
|
|
1126
1127
|
success: {
|
|
1127
1128
|
bg: palette.background,
|
|
1128
1129
|
border: palette.success,
|
|
1129
|
-
color: palette.success
|
|
1130
|
+
color: palette.success,
|
|
1131
|
+
ripple: ''
|
|
1130
1132
|
},
|
|
1131
1133
|
warning: {
|
|
1132
1134
|
bg: palette.background,
|
|
1133
1135
|
border: palette.warning,
|
|
1134
|
-
color: palette.warning
|
|
1136
|
+
color: palette.warning,
|
|
1137
|
+
ripple: ''
|
|
1135
1138
|
},
|
|
1136
1139
|
error: {
|
|
1137
1140
|
bg: palette.background,
|
|
1138
1141
|
border: palette.error,
|
|
1139
|
-
color: palette.error
|
|
1142
|
+
color: palette.error,
|
|
1143
|
+
ripple: ''
|
|
1140
1144
|
}
|
|
1141
1145
|
};
|
|
1142
1146
|
return colors[_color] || null;
|
|
@@ -1149,38 +1153,45 @@ var getButtonColors = function getButtonColors(palette, props) {
|
|
|
1149
1153
|
"default": {
|
|
1150
1154
|
bg: palette.background,
|
|
1151
1155
|
border: palette.border,
|
|
1152
|
-
color: palette.accents_5
|
|
1156
|
+
color: palette.accents_5,
|
|
1157
|
+
ripple: palette.accents_1
|
|
1153
1158
|
},
|
|
1154
1159
|
secondary: {
|
|
1155
1160
|
bg: palette.foreground,
|
|
1156
1161
|
border: palette.foreground,
|
|
1157
|
-
color: palette.background
|
|
1162
|
+
color: palette.background,
|
|
1163
|
+
ripple: palette.accents_1
|
|
1158
1164
|
},
|
|
1159
1165
|
success: {
|
|
1160
1166
|
bg: palette.success,
|
|
1161
1167
|
border: palette.success,
|
|
1162
|
-
color: '#fff'
|
|
1168
|
+
color: '#fff',
|
|
1169
|
+
ripple: '#1f93ffff'
|
|
1163
1170
|
},
|
|
1164
1171
|
warning: {
|
|
1165
1172
|
bg: palette.warning,
|
|
1166
1173
|
border: palette.warning,
|
|
1167
|
-
color: '#fff'
|
|
1174
|
+
color: '#fff',
|
|
1175
|
+
ripple: '#ffca29ff'
|
|
1168
1176
|
},
|
|
1169
1177
|
error: {
|
|
1170
1178
|
bg: palette.error,
|
|
1171
1179
|
border: palette.error,
|
|
1172
|
-
color: '#fff'
|
|
1180
|
+
color: '#fff',
|
|
1181
|
+
ripple: '#ff5a55ff'
|
|
1173
1182
|
},
|
|
1174
1183
|
abort: {
|
|
1175
1184
|
bg: 'transparent',
|
|
1176
1185
|
border: 'transparent',
|
|
1177
|
-
color: palette.accents_5
|
|
1186
|
+
color: palette.accents_5,
|
|
1187
|
+
ripple: palette.accents_1
|
|
1178
1188
|
}
|
|
1179
1189
|
};
|
|
1180
1190
|
if (disabled) return {
|
|
1181
1191
|
bg: palette.accents_1,
|
|
1182
1192
|
border: palette.accents_2,
|
|
1183
|
-
color: '#ccc'
|
|
1193
|
+
color: '#ccc',
|
|
1194
|
+
ripple: ''
|
|
1184
1195
|
};
|
|
1185
1196
|
|
|
1186
1197
|
/**
|
|
@@ -1360,7 +1371,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1360
1371
|
}, [theme$1.palette, filteredProps]),
|
|
1361
1372
|
bg = _useMemo.bg,
|
|
1362
1373
|
border = _useMemo.border,
|
|
1363
|
-
color = _useMemo.color
|
|
1374
|
+
color = _useMemo.color,
|
|
1375
|
+
rippleColor = _useMemo.ripple;
|
|
1364
1376
|
var hover = React.useMemo(function () {
|
|
1365
1377
|
return getButtonHoverColors(theme$1.palette, filteredProps);
|
|
1366
1378
|
}, [theme$1.palette, filteredProps]);
|
|
@@ -1379,6 +1391,45 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1379
1391
|
setDripX(0);
|
|
1380
1392
|
setDripY(0);
|
|
1381
1393
|
};
|
|
1394
|
+
var createRipple = function createRipple(event) {
|
|
1395
|
+
var button = buttonRef.current;
|
|
1396
|
+
if (!button) return;
|
|
1397
|
+
var rect = button.getBoundingClientRect();
|
|
1398
|
+
var size = Math.max(rect.width, rect.height);
|
|
1399
|
+
var x = event.clientX - rect.left - size / 2;
|
|
1400
|
+
var y = event.clientY - rect.top - size / 2;
|
|
1401
|
+
var rippleCount = 1; // number of rings
|
|
1402
|
+
var rippleDelay = 500; // ms between each ripple
|
|
1403
|
+
var _loop = function _loop() {
|
|
1404
|
+
var ripple = document.createElement('span');
|
|
1405
|
+
Object.assign(ripple.style, {
|
|
1406
|
+
position: 'absolute',
|
|
1407
|
+
borderRadius: '50%',
|
|
1408
|
+
backgroundColor: rippleColor,
|
|
1409
|
+
width: "".concat(size, "px"),
|
|
1410
|
+
height: "".concat(size, "px"),
|
|
1411
|
+
left: "".concat(x, "px"),
|
|
1412
|
+
top: "".concat(y, "px"),
|
|
1413
|
+
pointerEvents: 'none',
|
|
1414
|
+
transform: 'scale(0)',
|
|
1415
|
+
opacity: '1',
|
|
1416
|
+
transition: "transform 600ms ease-out ".concat(i * rippleDelay, "ms, opacity 600ms ease-out ").concat(i * rippleDelay, "ms"),
|
|
1417
|
+
zIndex: 1
|
|
1418
|
+
});
|
|
1419
|
+
button.appendChild(ripple);
|
|
1420
|
+
|
|
1421
|
+
// Force reflow to start transition
|
|
1422
|
+
window.getComputedStyle(ripple).opacity;
|
|
1423
|
+
ripple.style.transform = 'scale(2.5)';
|
|
1424
|
+
ripple.style.opacity = '0';
|
|
1425
|
+
ripple.addEventListener('transitionend', function () {
|
|
1426
|
+
ripple.remove();
|
|
1427
|
+
});
|
|
1428
|
+
};
|
|
1429
|
+
for (var i = 0; i < rippleCount; i++) {
|
|
1430
|
+
_loop();
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1382
1433
|
var clickHandler = function clickHandler(event) {
|
|
1383
1434
|
if (disabled || loading) return;
|
|
1384
1435
|
var showDrip = !shadow && !ghost && effect;
|
|
@@ -1389,6 +1440,9 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1389
1440
|
setDripX(event.clientX - rect.left);
|
|
1390
1441
|
setDripY(event.clientY - rect.top);
|
|
1391
1442
|
}
|
|
1443
|
+
if (shadow) {
|
|
1444
|
+
createRipple(event);
|
|
1445
|
+
}
|
|
1392
1446
|
onClick && onClick(event);
|
|
1393
1447
|
};
|
|
1394
1448
|
var childrenWithIcon = React.useMemo(function () {
|
|
@@ -1399,13 +1453,16 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1399
1453
|
}, [auto, children, icon, iconRight]);
|
|
1400
1454
|
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
1401
1455
|
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
1456
|
+
|
|
1457
|
+
// If shadow provided is string then value other default
|
|
1458
|
+
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1402
1459
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
1403
1460
|
ref: buttonRef,
|
|
1404
1461
|
type: type,
|
|
1405
1462
|
disabled: disabled,
|
|
1406
1463
|
onClick: clickHandler
|
|
1407
1464
|
}, props, {
|
|
1408
|
-
className: _JSXStyle.dynamic([["
|
|
1465
|
+
className: _JSXStyle.dynamic([["960361315", [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) || "")
|
|
1409
1466
|
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
1410
1467
|
color: color
|
|
1411
1468
|
}), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
|
|
@@ -1414,9 +1471,9 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1414
1471
|
color: dripColor,
|
|
1415
1472
|
onCompleted: dripCompletedHandle
|
|
1416
1473
|
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1417
|
-
id: "
|
|
1418
|
-
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ?
|
|
1419
|
-
}, ".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(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ?
|
|
1474
|
+
id: "960361315",
|
|
1475
|
+
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
|
+
}, ".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;}}")));
|
|
1420
1477
|
});
|
|
1421
1478
|
ButtonComponent.displayName = 'Button';
|
|
1422
1479
|
var Button = withScale(ButtonComponent);
|
package/dist/button/styles.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface ButtonColorGroup {
|
|
|
5
5
|
bg: string;
|
|
6
6
|
border: string;
|
|
7
7
|
color: string;
|
|
8
|
+
ripple?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare const getButtonGhostColors: (palette: HUIThemesPalette, _color: ButtonTypes) => ButtonColorGroup | null;
|
|
10
11
|
export declare const getButtonColors: (palette: HUIThemesPalette, props: ButtonProps) => ButtonColorGroup;
|
package/dist/carousal/index.js
CHANGED
|
@@ -2532,22 +2532,26 @@ var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
|
|
|
2532
2532
|
secondary: {
|
|
2533
2533
|
bg: palette.background,
|
|
2534
2534
|
border: palette.foreground,
|
|
2535
|
-
color: palette.foreground
|
|
2535
|
+
color: palette.foreground,
|
|
2536
|
+
ripple: ''
|
|
2536
2537
|
},
|
|
2537
2538
|
success: {
|
|
2538
2539
|
bg: palette.background,
|
|
2539
2540
|
border: palette.success,
|
|
2540
|
-
color: palette.success
|
|
2541
|
+
color: palette.success,
|
|
2542
|
+
ripple: ''
|
|
2541
2543
|
},
|
|
2542
2544
|
warning: {
|
|
2543
2545
|
bg: palette.background,
|
|
2544
2546
|
border: palette.warning,
|
|
2545
|
-
color: palette.warning
|
|
2547
|
+
color: palette.warning,
|
|
2548
|
+
ripple: ''
|
|
2546
2549
|
},
|
|
2547
2550
|
error: {
|
|
2548
2551
|
bg: palette.background,
|
|
2549
2552
|
border: palette.error,
|
|
2550
|
-
color: palette.error
|
|
2553
|
+
color: palette.error,
|
|
2554
|
+
ripple: ''
|
|
2551
2555
|
}
|
|
2552
2556
|
};
|
|
2553
2557
|
return colors[_color] || null;
|
|
@@ -2560,38 +2564,45 @@ var getButtonColors = function getButtonColors(palette, props) {
|
|
|
2560
2564
|
"default": {
|
|
2561
2565
|
bg: palette.background,
|
|
2562
2566
|
border: palette.border,
|
|
2563
|
-
color: palette.accents_5
|
|
2567
|
+
color: palette.accents_5,
|
|
2568
|
+
ripple: palette.accents_1
|
|
2564
2569
|
},
|
|
2565
2570
|
secondary: {
|
|
2566
2571
|
bg: palette.foreground,
|
|
2567
2572
|
border: palette.foreground,
|
|
2568
|
-
color: palette.background
|
|
2573
|
+
color: palette.background,
|
|
2574
|
+
ripple: palette.accents_1
|
|
2569
2575
|
},
|
|
2570
2576
|
success: {
|
|
2571
2577
|
bg: palette.success,
|
|
2572
2578
|
border: palette.success,
|
|
2573
|
-
color: '#fff'
|
|
2579
|
+
color: '#fff',
|
|
2580
|
+
ripple: '#1f93ffff'
|
|
2574
2581
|
},
|
|
2575
2582
|
warning: {
|
|
2576
2583
|
bg: palette.warning,
|
|
2577
2584
|
border: palette.warning,
|
|
2578
|
-
color: '#fff'
|
|
2585
|
+
color: '#fff',
|
|
2586
|
+
ripple: '#ffca29ff'
|
|
2579
2587
|
},
|
|
2580
2588
|
error: {
|
|
2581
2589
|
bg: palette.error,
|
|
2582
2590
|
border: palette.error,
|
|
2583
|
-
color: '#fff'
|
|
2591
|
+
color: '#fff',
|
|
2592
|
+
ripple: '#ff5a55ff'
|
|
2584
2593
|
},
|
|
2585
2594
|
abort: {
|
|
2586
2595
|
bg: 'transparent',
|
|
2587
2596
|
border: 'transparent',
|
|
2588
|
-
color: palette.accents_5
|
|
2597
|
+
color: palette.accents_5,
|
|
2598
|
+
ripple: palette.accents_1
|
|
2589
2599
|
}
|
|
2590
2600
|
};
|
|
2591
2601
|
if (disabled) return {
|
|
2592
2602
|
bg: palette.accents_1,
|
|
2593
2603
|
border: palette.accents_2,
|
|
2594
|
-
color: '#ccc'
|
|
2604
|
+
color: '#ccc',
|
|
2605
|
+
ripple: ''
|
|
2595
2606
|
};
|
|
2596
2607
|
|
|
2597
2608
|
/**
|
|
@@ -2771,7 +2782,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2771
2782
|
}, [theme$1.palette, filteredProps]),
|
|
2772
2783
|
bg = _useMemo.bg,
|
|
2773
2784
|
border = _useMemo.border,
|
|
2774
|
-
color = _useMemo.color
|
|
2785
|
+
color = _useMemo.color,
|
|
2786
|
+
rippleColor = _useMemo.ripple;
|
|
2775
2787
|
var hover = React.useMemo(function () {
|
|
2776
2788
|
return getButtonHoverColors(theme$1.palette, filteredProps);
|
|
2777
2789
|
}, [theme$1.palette, filteredProps]);
|
|
@@ -2790,6 +2802,45 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2790
2802
|
setDripX(0);
|
|
2791
2803
|
setDripY(0);
|
|
2792
2804
|
};
|
|
2805
|
+
var createRipple = function createRipple(event) {
|
|
2806
|
+
var button = buttonRef.current;
|
|
2807
|
+
if (!button) return;
|
|
2808
|
+
var rect = button.getBoundingClientRect();
|
|
2809
|
+
var size = Math.max(rect.width, rect.height);
|
|
2810
|
+
var x = event.clientX - rect.left - size / 2;
|
|
2811
|
+
var y = event.clientY - rect.top - size / 2;
|
|
2812
|
+
var rippleCount = 1; // number of rings
|
|
2813
|
+
var rippleDelay = 500; // ms between each ripple
|
|
2814
|
+
var _loop = function _loop() {
|
|
2815
|
+
var ripple = document.createElement('span');
|
|
2816
|
+
Object.assign(ripple.style, {
|
|
2817
|
+
position: 'absolute',
|
|
2818
|
+
borderRadius: '50%',
|
|
2819
|
+
backgroundColor: rippleColor,
|
|
2820
|
+
width: "".concat(size, "px"),
|
|
2821
|
+
height: "".concat(size, "px"),
|
|
2822
|
+
left: "".concat(x, "px"),
|
|
2823
|
+
top: "".concat(y, "px"),
|
|
2824
|
+
pointerEvents: 'none',
|
|
2825
|
+
transform: 'scale(0)',
|
|
2826
|
+
opacity: '1',
|
|
2827
|
+
transition: "transform 600ms ease-out ".concat(i * rippleDelay, "ms, opacity 600ms ease-out ").concat(i * rippleDelay, "ms"),
|
|
2828
|
+
zIndex: 1
|
|
2829
|
+
});
|
|
2830
|
+
button.appendChild(ripple);
|
|
2831
|
+
|
|
2832
|
+
// Force reflow to start transition
|
|
2833
|
+
window.getComputedStyle(ripple).opacity;
|
|
2834
|
+
ripple.style.transform = 'scale(2.5)';
|
|
2835
|
+
ripple.style.opacity = '0';
|
|
2836
|
+
ripple.addEventListener('transitionend', function () {
|
|
2837
|
+
ripple.remove();
|
|
2838
|
+
});
|
|
2839
|
+
};
|
|
2840
|
+
for (var i = 0; i < rippleCount; i++) {
|
|
2841
|
+
_loop();
|
|
2842
|
+
}
|
|
2843
|
+
};
|
|
2793
2844
|
var clickHandler = function clickHandler(event) {
|
|
2794
2845
|
if (disabled || loading) return;
|
|
2795
2846
|
var showDrip = !shadow && !ghost && effect;
|
|
@@ -2800,6 +2851,9 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2800
2851
|
setDripX(event.clientX - rect.left);
|
|
2801
2852
|
setDripY(event.clientY - rect.top);
|
|
2802
2853
|
}
|
|
2854
|
+
if (shadow) {
|
|
2855
|
+
createRipple(event);
|
|
2856
|
+
}
|
|
2803
2857
|
onClick && onClick(event);
|
|
2804
2858
|
};
|
|
2805
2859
|
var childrenWithIcon = React.useMemo(function () {
|
|
@@ -2810,13 +2864,16 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2810
2864
|
}, [auto, children, icon, iconRight]);
|
|
2811
2865
|
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
2812
2866
|
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
2867
|
+
|
|
2868
|
+
// If shadow provided is string then value other default
|
|
2869
|
+
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
2813
2870
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
2814
2871
|
ref: buttonRef,
|
|
2815
2872
|
type: type,
|
|
2816
2873
|
disabled: disabled,
|
|
2817
2874
|
onClick: clickHandler
|
|
2818
2875
|
}, props, {
|
|
2819
|
-
className: _JSXStyle.dynamic([["
|
|
2876
|
+
className: _JSXStyle.dynamic([["960361315", [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) || "")
|
|
2820
2877
|
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
2821
2878
|
color: color
|
|
2822
2879
|
}), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
|
|
@@ -2825,9 +2882,9 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2825
2882
|
color: dripColor,
|
|
2826
2883
|
onCompleted: dripCompletedHandle
|
|
2827
2884
|
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
2828
|
-
id: "
|
|
2829
|
-
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ?
|
|
2830
|
-
}, ".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(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ?
|
|
2885
|
+
id: "960361315",
|
|
2886
|
+
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']
|
|
2887
|
+
}, ".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;}}")));
|
|
2831
2888
|
});
|
|
2832
2889
|
ButtonComponent.displayName = 'Button';
|
|
2833
2890
|
var Button = withScale(ButtonComponent);
|