@helpdice/ui 1.6.0 → 1.6.2
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/auto-complete.d.ts +2 -1
- package/dist/auto-complete/index.js +11 -9
- package/dist/button/button.d.ts +2 -2
- package/dist/button/index.js +13 -13
- package/dist/button/styles.d.ts +2 -2
- package/dist/checkbox/checkbox.d.ts +1 -0
- package/dist/checkbox/index.js +8 -1
- package/dist/index.js +56 -46
- package/dist/input/index.js +8 -8
- package/dist/input/input-props.d.ts +2 -2
- package/dist/input/password.d.ts +2 -2
- package/dist/modal/index.js +13 -13
- package/dist/table/index.js +828 -827
- package/dist/ui-provider/index.js +14 -14
- package/esm/auto-complete/auto-complete.d.ts +2 -1
- package/esm/auto-complete/auto-complete.js +3 -1
- package/esm/button/button.d.ts +2 -2
- package/esm/button/button.js +6 -6
- package/esm/button/styles.d.ts +2 -2
- package/esm/button/styles.js +8 -8
- package/esm/checkbox/checkbox.d.ts +1 -0
- package/esm/checkbox/checkbox.js +8 -1
- package/esm/input/input-props.d.ts +2 -2
- package/esm/input/input.js +7 -7
- package/esm/input/password.d.ts +2 -2
- package/esm/input/password.js +1 -1
- package/esm/table/data-table.js +8 -8
- package/esm/table/table-head.js +15 -15
- package/esm/use-toasts/helpers.js +1 -1
- package/package.json +1 -2
package/dist/input/index.js
CHANGED
|
@@ -1280,7 +1280,7 @@ var withScale = function withScale(Render) {
|
|
|
1280
1280
|
return ScaleFC;
|
|
1281
1281
|
};
|
|
1282
1282
|
|
|
1283
|
-
var _excluded$2 = ["label", "labelRight", "
|
|
1283
|
+
var _excluded$2 = ["label", "labelRight", "color", "error", "type", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
|
|
1284
1284
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1285
1285
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1286
1286
|
target: el,
|
|
@@ -1290,11 +1290,11 @@ var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
|
1290
1290
|
var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1291
1291
|
var label = _ref.label,
|
|
1292
1292
|
labelRight = _ref.labelRight,
|
|
1293
|
-
_ref$
|
|
1294
|
-
|
|
1293
|
+
_ref$color = _ref.color,
|
|
1294
|
+
_color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
1295
1295
|
error = _ref.error,
|
|
1296
|
-
_ref$
|
|
1297
|
-
|
|
1296
|
+
_ref$type = _ref.type,
|
|
1297
|
+
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1298
1298
|
icon = _ref.icon,
|
|
1299
1299
|
iconRight = _ref.iconRight,
|
|
1300
1300
|
_ref$iconClickable = _ref.iconClickable,
|
|
@@ -1346,7 +1346,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1346
1346
|
return iconRight ? 'right-icon' : icon ? 'left-icon' : '';
|
|
1347
1347
|
}, [icon, iconRight]);
|
|
1348
1348
|
var _useMemo = React.useMemo(function () {
|
|
1349
|
-
return getColors(theme.palette,
|
|
1349
|
+
return getColors(theme.palette, _color);
|
|
1350
1350
|
}, [theme.palette, type]),
|
|
1351
1351
|
color = _useMemo.color,
|
|
1352
1352
|
borderColor = _useMemo.borderColor,
|
|
@@ -1407,7 +1407,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1407
1407
|
}, icon && /*#__PURE__*/React.createElement(InputIcon, _extends({
|
|
1408
1408
|
icon: icon
|
|
1409
1409
|
}, iconProps)), /*#__PURE__*/React.createElement("input", _extends({
|
|
1410
|
-
type:
|
|
1410
|
+
type: type,
|
|
1411
1411
|
ref: inputRef,
|
|
1412
1412
|
placeholder: placeholder,
|
|
1413
1413
|
disabled: disabled,
|
|
@@ -1611,7 +1611,7 @@ var InputPasswordComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
|
1611
1611
|
ref: inputRef,
|
|
1612
1612
|
iconClickable: true,
|
|
1613
1613
|
onIconClick: iconClickHandler,
|
|
1614
|
-
|
|
1614
|
+
type: visible ? 'text' : 'password'
|
|
1615
1615
|
});
|
|
1616
1616
|
}, [props, iconClickHandler, visible, inputRef]);
|
|
1617
1617
|
var icon = React.useMemo(function () {
|
package/dist/input/password.d.ts
CHANGED
package/dist/modal/index.js
CHANGED
|
@@ -1592,7 +1592,7 @@ var addColorAlpha = function addColorAlpha(color, alpha) {
|
|
|
1592
1592
|
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
|
|
1593
1593
|
};
|
|
1594
1594
|
|
|
1595
|
-
var getButtonGhostColors = function getButtonGhostColors(palette,
|
|
1595
|
+
var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
|
|
1596
1596
|
var colors = {
|
|
1597
1597
|
secondary: {
|
|
1598
1598
|
bg: palette.background,
|
|
@@ -1615,10 +1615,10 @@ var getButtonGhostColors = function getButtonGhostColors(palette, type) {
|
|
|
1615
1615
|
color: palette.error
|
|
1616
1616
|
}
|
|
1617
1617
|
};
|
|
1618
|
-
return colors[
|
|
1618
|
+
return colors[_color] || null;
|
|
1619
1619
|
};
|
|
1620
1620
|
var getButtonColors = function getButtonColors(palette, props) {
|
|
1621
|
-
var
|
|
1621
|
+
var color = props.color,
|
|
1622
1622
|
disabled = props.disabled,
|
|
1623
1623
|
ghost = props.ghost;
|
|
1624
1624
|
var colors = {
|
|
@@ -1666,12 +1666,12 @@ var getButtonColors = function getButtonColors(palette, props) {
|
|
|
1666
1666
|
* Color['success'] === Color['success-light']
|
|
1667
1667
|
* Color['warning'] === Color['warning-light']
|
|
1668
1668
|
*/
|
|
1669
|
-
var withoutLightType =
|
|
1669
|
+
var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
|
|
1670
1670
|
var defaultColor = colors["default"];
|
|
1671
1671
|
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
1672
1672
|
return colors[withoutLightType] || defaultColor;
|
|
1673
1673
|
};
|
|
1674
|
-
var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette,
|
|
1674
|
+
var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
|
|
1675
1675
|
var colors = {
|
|
1676
1676
|
secondary: {
|
|
1677
1677
|
bg: palette.foreground,
|
|
@@ -1694,11 +1694,11 @@ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type
|
|
|
1694
1694
|
color: 'white'
|
|
1695
1695
|
}
|
|
1696
1696
|
};
|
|
1697
|
-
var withoutLightType =
|
|
1697
|
+
var withoutLightType = _color.replace('-light', '');
|
|
1698
1698
|
return colors[withoutLightType] || null;
|
|
1699
1699
|
};
|
|
1700
1700
|
var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
1701
|
-
var
|
|
1701
|
+
var color = props.color,
|
|
1702
1702
|
disabled = props.disabled,
|
|
1703
1703
|
loading = props.loading,
|
|
1704
1704
|
shadow = props.shadow,
|
|
@@ -1753,7 +1753,7 @@ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
|
1753
1753
|
color: 'transparent'
|
|
1754
1754
|
});
|
|
1755
1755
|
if (shadow) return defaultColor;
|
|
1756
|
-
var hoverColor = (ghost ? getButtonGhostHoverColors(palette,
|
|
1756
|
+
var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
|
|
1757
1757
|
return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
|
|
1758
1758
|
color: hoverColor.color || hoverColor.border
|
|
1759
1759
|
});
|
|
@@ -1779,7 +1779,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1779
1779
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1780
1780
|
};
|
|
1781
1781
|
|
|
1782
|
-
var _excluded$6 = ["children", "disabled", "
|
|
1782
|
+
var _excluded$6 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1783
1783
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1784
1784
|
var theme = useTheme();
|
|
1785
1785
|
var _useScale = useScale(),
|
|
@@ -1806,7 +1806,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1806
1806
|
var children = filteredProps.children,
|
|
1807
1807
|
_filteredProps$disabl = filteredProps.disabled,
|
|
1808
1808
|
disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
|
|
1809
|
-
filteredProps.
|
|
1809
|
+
filteredProps.color;
|
|
1810
1810
|
var _filteredProps$loadin = filteredProps.loading,
|
|
1811
1811
|
loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
|
|
1812
1812
|
_filteredProps$shadow = filteredProps.shadow,
|
|
@@ -1821,8 +1821,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1821
1821
|
_filteredProps$auto = filteredProps.auto,
|
|
1822
1822
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
1823
1823
|
icon = filteredProps.icon,
|
|
1824
|
-
_filteredProps$
|
|
1825
|
-
|
|
1824
|
+
_filteredProps$type = filteredProps.type,
|
|
1825
|
+
type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
|
|
1826
1826
|
iconRight = filteredProps.iconRight,
|
|
1827
1827
|
_filteredProps$classN = filteredProps.className,
|
|
1828
1828
|
className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
|
|
@@ -1876,7 +1876,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1876
1876
|
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
1877
1877
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
1878
1878
|
ref: buttonRef,
|
|
1879
|
-
type:
|
|
1879
|
+
type: type,
|
|
1880
1880
|
disabled: disabled,
|
|
1881
1881
|
onClick: clickHandler
|
|
1882
1882
|
}, props, {
|