@helpdice/ui 1.6.1 → 1.6.3

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.
@@ -1280,7 +1280,7 @@ var withScale = function withScale(Render) {
1280
1280
  return ScaleFC;
1281
1281
  };
1282
1282
 
1283
- var _excluded$2 = ["label", "labelRight", "type", "error", "htmlType", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
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$type = _ref.type,
1294
- type = _ref$type === void 0 ? 'default' : _ref$type,
1293
+ _ref$color = _ref.color,
1294
+ _color = _ref$color === void 0 ? 'default' : _ref$color,
1295
1295
  error = _ref.error,
1296
- _ref$htmlType = _ref.htmlType,
1297
- htmlType = _ref$htmlType === void 0 ? 'text' : _ref$htmlType,
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, type);
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: htmlType,
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
- htmlType: visible ? 'text' : 'password'
1614
+ type: visible ? 'text' : 'password'
1615
1615
  });
1616
1616
  }, [props, iconClickHandler, visible, inputRef]);
1617
1617
  var icon = React.useMemo(function () {
@@ -4,8 +4,8 @@ export type InputTypes = NormalTypes;
4
4
  export interface Props {
5
5
  initialValue?: string;
6
6
  placeholder?: string;
7
- type?: InputTypes;
8
- htmlType?: string;
7
+ color?: InputTypes;
8
+ type?: string;
9
9
  readOnly?: boolean;
10
10
  disabled?: boolean;
11
11
  label?: string;
@@ -6,8 +6,8 @@ interface PasswordProps extends Props {
6
6
  readOnly: boolean;
7
7
  clearable: boolean;
8
8
  iconClickable: boolean;
9
- type: InputTypes;
10
- htmlType: string;
9
+ color: InputTypes;
10
+ type: string;
11
11
  autoComplete: string;
12
12
  className: string;
13
13
  placeholder: string;
@@ -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, type) {
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[type] || null;
1618
+ return colors[_color] || null;
1619
1619
  };
1620
1620
  var getButtonColors = function getButtonColors(palette, props) {
1621
- var type = props.type,
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 = type === null || type === void 0 ? void 0 : type.replace('-light', '');
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, type) {
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 = type.replace('-light', '');
1697
+ var withoutLightType = _color.replace('-light', '');
1698
1698
  return colors[withoutLightType] || null;
1699
1699
  };
1700
1700
  var getButtonHoverColors = function getButtonHoverColors(palette, props) {
1701
- var type = props.type,
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, type) : colors[type]) || colors["default"];
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", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
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.type;
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$htmlTy = filteredProps.htmlType,
1825
- htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
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: htmlType,
1879
+ type: type,
1880
1880
  disabled: disabled,
1881
1881
  onClick: clickHandler
1882
1882
  }, props, {
@@ -1363,7 +1363,7 @@ var withScale = function withScale(Render) {
1363
1363
  return ScaleFC;
1364
1364
  };
1365
1365
 
1366
- var _excluded$l = ["label", "labelRight", "type", "error", "htmlType", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
1366
+ var _excluded$l = ["label", "labelRight", "color", "error", "type", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
1367
1367
  var simulateChangeEvent = function simulateChangeEvent(el, event) {
1368
1368
  return _objectSpread2(_objectSpread2({}, event), {}, {
1369
1369
  target: el,
@@ -1373,11 +1373,11 @@ var simulateChangeEvent = function simulateChangeEvent(el, event) {
1373
1373
  var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1374
1374
  var label = _ref.label,
1375
1375
  labelRight = _ref.labelRight,
1376
- _ref$type = _ref.type,
1377
- type = _ref$type === void 0 ? 'default' : _ref$type,
1376
+ _ref$color = _ref.color,
1377
+ _color = _ref$color === void 0 ? 'default' : _ref$color,
1378
1378
  error = _ref.error,
1379
- _ref$htmlType = _ref.htmlType,
1380
- htmlType = _ref$htmlType === void 0 ? 'text' : _ref$htmlType,
1379
+ _ref$type = _ref.type,
1380
+ type = _ref$type === void 0 ? 'text' : _ref$type,
1381
1381
  icon = _ref.icon,
1382
1382
  iconRight = _ref.iconRight,
1383
1383
  _ref$iconClickable = _ref.iconClickable,
@@ -1429,7 +1429,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1429
1429
  return iconRight ? 'right-icon' : icon ? 'left-icon' : '';
1430
1430
  }, [icon, iconRight]);
1431
1431
  var _useMemo = React.useMemo(function () {
1432
- return getColors$2(theme.palette, type);
1432
+ return getColors$2(theme.palette, _color);
1433
1433
  }, [theme.palette, type]),
1434
1434
  color = _useMemo.color,
1435
1435
  borderColor = _useMemo.borderColor,
@@ -1490,7 +1490,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1490
1490
  }, icon && /*#__PURE__*/React.createElement(InputIcon, _extends({
1491
1491
  icon: icon
1492
1492
  }, iconProps)), /*#__PURE__*/React.createElement("input", _extends({
1493
- type: htmlType,
1493
+ type: type,
1494
1494
  ref: inputRef,
1495
1495
  placeholder: placeholder,
1496
1496
  disabled: disabled,
@@ -1694,7 +1694,7 @@ var InputPasswordComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref)
1694
1694
  ref: inputRef,
1695
1695
  iconClickable: true,
1696
1696
  onIconClick: iconClickHandler,
1697
- htmlType: visible ? 'text' : 'password'
1697
+ type: visible ? 'text' : 'password'
1698
1698
  });
1699
1699
  }, [props, iconClickHandler, visible, inputRef]);
1700
1700
  var icon = React.useMemo(function () {
@@ -2738,7 +2738,7 @@ var TableHead = function TableHead(props) {
2738
2738
  }) : null), accessor === 'date' && /*#__PURE__*/React.createElement(Input
2739
2739
  // id={`filter-date-${filterName}`}
2740
2740
  , {
2741
- htmlType: "date"
2741
+ type: "date"
2742
2742
  // name={filterName}
2743
2743
  ,
2744
2744
  value: filters[filterName],
@@ -2748,7 +2748,7 @@ var TableHead = function TableHead(props) {
2748
2748
  }), accessor === 'search' && /*#__PURE__*/React.createElement(Input
2749
2749
  // id={`filter-search-${filterName}`}
2750
2750
  , {
2751
- htmlType: "text",
2751
+ type: "text",
2752
2752
  autoComplete: "off"
2753
2753
  // ref={filterRefs.current[filterName]} // Dynamically set ref}
2754
2754
  // name={filterName}
@@ -30710,7 +30710,7 @@ var addColorAlpha = function addColorAlpha(color, alpha) {
30710
30710
  return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
30711
30711
  };
30712
30712
 
30713
- var getButtonGhostColors = function getButtonGhostColors(palette, type) {
30713
+ var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
30714
30714
  var colors = {
30715
30715
  secondary: {
30716
30716
  bg: palette.background,
@@ -30733,10 +30733,10 @@ var getButtonGhostColors = function getButtonGhostColors(palette, type) {
30733
30733
  color: palette.error
30734
30734
  }
30735
30735
  };
30736
- return colors[type] || null;
30736
+ return colors[_color] || null;
30737
30737
  };
30738
30738
  var getButtonColors = function getButtonColors(palette, props) {
30739
- var type = props.type,
30739
+ var color = props.color,
30740
30740
  disabled = props.disabled,
30741
30741
  ghost = props.ghost;
30742
30742
  var colors = {
@@ -30784,12 +30784,12 @@ var getButtonColors = function getButtonColors(palette, props) {
30784
30784
  * Color['success'] === Color['success-light']
30785
30785
  * Color['warning'] === Color['warning-light']
30786
30786
  */
30787
- var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
30787
+ var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
30788
30788
  var defaultColor = colors["default"];
30789
30789
  if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
30790
30790
  return colors[withoutLightType] || defaultColor;
30791
30791
  };
30792
- var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
30792
+ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
30793
30793
  var colors = {
30794
30794
  secondary: {
30795
30795
  bg: palette.foreground,
@@ -30812,11 +30812,11 @@ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type
30812
30812
  color: 'white'
30813
30813
  }
30814
30814
  };
30815
- var withoutLightType = type.replace('-light', '');
30815
+ var withoutLightType = _color.replace('-light', '');
30816
30816
  return colors[withoutLightType] || null;
30817
30817
  };
30818
30818
  var getButtonHoverColors = function getButtonHoverColors(palette, props) {
30819
- var type = props.type,
30819
+ var color = props.color,
30820
30820
  disabled = props.disabled,
30821
30821
  loading = props.loading,
30822
30822
  shadow = props.shadow,
@@ -30871,7 +30871,7 @@ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
30871
30871
  color: 'transparent'
30872
30872
  });
30873
30873
  if (shadow) return defaultColor;
30874
- var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
30874
+ var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
30875
30875
  return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
30876
30876
  color: hoverColor.color || hoverColor.border
30877
30877
  });
@@ -30897,7 +30897,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
30897
30897
  return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
30898
30898
  };
30899
30899
 
30900
- var _excluded$8 = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
30900
+ var _excluded$8 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
30901
30901
  var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
30902
30902
  var theme = useTheme();
30903
30903
  var _useScale = useScale(),
@@ -30924,7 +30924,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
30924
30924
  var children = filteredProps.children,
30925
30925
  _filteredProps$disabl = filteredProps.disabled,
30926
30926
  disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
30927
- filteredProps.type;
30927
+ filteredProps.color;
30928
30928
  var _filteredProps$loadin = filteredProps.loading,
30929
30929
  loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
30930
30930
  _filteredProps$shadow = filteredProps.shadow,
@@ -30939,8 +30939,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
30939
30939
  _filteredProps$auto = filteredProps.auto,
30940
30940
  auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
30941
30941
  icon = filteredProps.icon,
30942
- _filteredProps$htmlTy = filteredProps.htmlType,
30943
- htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
30942
+ _filteredProps$type = filteredProps.type,
30943
+ type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
30944
30944
  iconRight = filteredProps.iconRight,
30945
30945
  _filteredProps$classN = filteredProps.className,
30946
30946
  className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
@@ -30994,7 +30994,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
30994
30994
  paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
30995
30995
  return /*#__PURE__*/React.createElement("button", _extends({
30996
30996
  ref: buttonRef,
30997
- type: htmlType,
30997
+ type: type,
30998
30998
  disabled: disabled,
30999
30999
  onClick: clickHandler
31000
31000
  }, props, {
@@ -31751,7 +31751,7 @@ function DataTable(_ref) {
31751
31751
  // <Input
31752
31752
  // // id={`filter-date-${filterName}`}
31753
31753
  // // key={filterName}
31754
- // htmlType="date"
31754
+ // type="date"
31755
31755
  // name={filterName}
31756
31756
  // value={filterValues[filterName]}
31757
31757
  // onChange={(e) => handleFilterChange(filterName, e.target.value)}
@@ -31761,7 +31761,7 @@ function DataTable(_ref) {
31761
31761
  // <Input
31762
31762
  // // id={`filter-search-${filterName}`}
31763
31763
  // // key={filterName}
31764
- // htmlType="text"
31764
+ // type="text"
31765
31765
  // autoComplete="off"
31766
31766
  // // ref={filterRefs.current[filterName]} // Dynamically set ref}
31767
31767
  // name={filterName}
@@ -31824,7 +31824,7 @@ function DataTable(_ref) {
31824
31824
  fontSize: 'larger'
31825
31825
  }
31826
31826
  }, children && /*#__PURE__*/React.createElement(Button, {
31827
- htmlType: "button",
31827
+ type: "button",
31828
31828
  auto: true,
31829
31829
  scale: 2 / 3,
31830
31830
  px: 0.6,
@@ -31854,7 +31854,7 @@ function DataTable(_ref) {
31854
31854
  },
31855
31855
  iconRight: /*#__PURE__*/React.createElement(Edit, null),
31856
31856
  auto: true,
31857
- htmlType: "button",
31857
+ type: "button",
31858
31858
  scale: 2 / 3,
31859
31859
  px: 0.6
31860
31860
  })) : null, onSelectedDelete && selected.length > 1 ? /*#__PURE__*/React.createElement(Tooltip, {
@@ -31871,7 +31871,7 @@ function DataTable(_ref) {
31871
31871
  auto: true,
31872
31872
  scale: 2 / 3,
31873
31873
  px: 0.6,
31874
- htmlType: "button",
31874
+ type: "button",
31875
31875
  iconRight: /*#__PURE__*/React.createElement(Delete$1, null)
31876
31876
  })) : null, onRefresh ? /*#__PURE__*/React.createElement(Tooltip, {
31877
31877
  text: "Refresh",
@@ -31881,7 +31881,7 @@ function DataTable(_ref) {
31881
31881
  py: 0.4,
31882
31882
  type: "dark"
31883
31883
  }, /*#__PURE__*/React.createElement(Button, {
31884
- htmlType: "button",
31884
+ type: "button",
31885
31885
  onClick: function onClick() {
31886
31886
  return onRefresh();
31887
31887
  },
@@ -31897,7 +31897,7 @@ function DataTable(_ref) {
31897
31897
  py: 0.4,
31898
31898
  type: "dark"
31899
31899
  }, /*#__PURE__*/React.createElement(Button, {
31900
- htmlType: "button",
31900
+ type: "button",
31901
31901
  onClick: handleShowFilter,
31902
31902
  auto: true,
31903
31903
  scale: 2 / 3,
@@ -31915,7 +31915,7 @@ function DataTable(_ref) {
31915
31915
  placement: "bottomEnd",
31916
31916
  child: content
31917
31917
  }, /*#__PURE__*/React.createElement(Button, {
31918
- htmlType: "button",
31918
+ type: "button",
31919
31919
  onClick: function onClick() {},
31920
31920
  auto: true,
31921
31921
  scale: 2 / 3,
@@ -1585,7 +1585,7 @@ var addColorAlpha = function addColorAlpha(color, alpha) {
1585
1585
  return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
1586
1586
  };
1587
1587
 
1588
- var getButtonGhostColors = function getButtonGhostColors(palette, type) {
1588
+ var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
1589
1589
  var colors = {
1590
1590
  secondary: {
1591
1591
  bg: palette.background,
@@ -1608,10 +1608,10 @@ var getButtonGhostColors = function getButtonGhostColors(palette, type) {
1608
1608
  color: palette.error
1609
1609
  }
1610
1610
  };
1611
- return colors[type] || null;
1611
+ return colors[_color] || null;
1612
1612
  };
1613
1613
  var getButtonColors = function getButtonColors(palette, props) {
1614
- var type = props.type,
1614
+ var color = props.color,
1615
1615
  disabled = props.disabled,
1616
1616
  ghost = props.ghost;
1617
1617
  var colors = {
@@ -1659,12 +1659,12 @@ var getButtonColors = function getButtonColors(palette, props) {
1659
1659
  * Color['success'] === Color['success-light']
1660
1660
  * Color['warning'] === Color['warning-light']
1661
1661
  */
1662
- var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
1662
+ var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
1663
1663
  var defaultColor = colors["default"];
1664
1664
  if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
1665
1665
  return colors[withoutLightType] || defaultColor;
1666
1666
  };
1667
- var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
1667
+ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
1668
1668
  var colors = {
1669
1669
  secondary: {
1670
1670
  bg: palette.foreground,
@@ -1687,11 +1687,11 @@ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type
1687
1687
  color: 'white'
1688
1688
  }
1689
1689
  };
1690
- var withoutLightType = type.replace('-light', '');
1690
+ var withoutLightType = _color.replace('-light', '');
1691
1691
  return colors[withoutLightType] || null;
1692
1692
  };
1693
1693
  var getButtonHoverColors = function getButtonHoverColors(palette, props) {
1694
- var type = props.type,
1694
+ var color = props.color,
1695
1695
  disabled = props.disabled,
1696
1696
  loading = props.loading,
1697
1697
  shadow = props.shadow,
@@ -1746,7 +1746,7 @@ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
1746
1746
  color: 'transparent'
1747
1747
  });
1748
1748
  if (shadow) return defaultColor;
1749
- var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
1749
+ var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
1750
1750
  return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
1751
1751
  color: hoverColor.color || hoverColor.border
1752
1752
  });
@@ -1772,7 +1772,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
1772
1772
  return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
1773
1773
  };
1774
1774
 
1775
- var _excluded = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
1775
+ var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
1776
1776
  var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
1777
1777
  var theme = useTheme();
1778
1778
  var _useScale = useScale(),
@@ -1799,7 +1799,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
1799
1799
  var children = filteredProps.children,
1800
1800
  _filteredProps$disabl = filteredProps.disabled,
1801
1801
  disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
1802
- filteredProps.type;
1802
+ filteredProps.color;
1803
1803
  var _filteredProps$loadin = filteredProps.loading,
1804
1804
  loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
1805
1805
  _filteredProps$shadow = filteredProps.shadow,
@@ -1814,8 +1814,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
1814
1814
  _filteredProps$auto = filteredProps.auto,
1815
1815
  auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
1816
1816
  icon = filteredProps.icon,
1817
- _filteredProps$htmlTy = filteredProps.htmlType,
1818
- htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
1817
+ _filteredProps$type = filteredProps.type,
1818
+ type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
1819
1819
  iconRight = filteredProps.iconRight,
1820
1820
  _filteredProps$classN = filteredProps.className,
1821
1821
  className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
@@ -1869,7 +1869,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
1869
1869
  paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
1870
1870
  return /*#__PURE__*/React.createElement("button", _extends({
1871
1871
  ref: buttonRef,
1872
- type: htmlType,
1872
+ type: type,
1873
1873
  disabled: disabled,
1874
1874
  onClick: clickHandler
1875
1875
  }, props, {
@@ -1914,7 +1914,7 @@ var makeToastActions = function makeToastActions(actions, cancelHandle) {
1914
1914
  auto: true,
1915
1915
  scale: 1 / 3,
1916
1916
  font: "13px",
1917
- type: action.passive ? 'default' : 'secondary',
1917
+ color: action.passive ? 'default' : 'secondary',
1918
1918
  key: "action-".concat(index),
1919
1919
  onClick: function onClick(event) {
1920
1920
  return handler(event, action.handler);
@@ -9,7 +9,8 @@ export type AutoCompleteOption = {
9
9
  export type AutoCompleteOptions = Array<typeof AutoCompleteItem | AutoCompleteOption | React.ReactElement<AutoCompleteItemProps>>;
10
10
  interface Props {
11
11
  options?: Array<AutoCompleteOption>;
12
- type?: AutoCompleteTypes;
12
+ color?: AutoCompleteTypes;
13
+ type?: string;
13
14
  initialValue?: string;
14
15
  value?: string;
15
16
  onChange?: (value: string) => void;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
4
+ var _excluded = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "color", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
5
5
  import _JSXStyle from "../styled-jsx.es.js";
6
6
  /* "use client" */
7
7
 
@@ -52,6 +52,7 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
52
52
  searching = _ref.searching,
53
53
  children = _ref.children,
54
54
  type = _ref.type,
55
+ color = _ref.color,
55
56
  value = _ref.value,
56
57
  _ref$clearable = _ref.clearable,
57
58
  clearable = _ref$clearable === void 0 ? false : _ref$clearable,
@@ -176,6 +177,7 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
176
177
  fullWidth: true,
177
178
  ref: inputRef,
178
179
  type: type,
180
+ color: color,
179
181
  onChange: onInputChange,
180
182
  onFocus: function onFocus() {
181
183
  return toggleFocusHandler(true);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ButtonTypes } from '../utils/prop-types';
3
3
  interface Props {
4
- type?: ButtonTypes;
4
+ color?: ButtonTypes;
5
5
  ghost?: boolean;
6
6
  loading?: boolean;
7
7
  shadow?: boolean;
@@ -9,7 +9,7 @@ interface Props {
9
9
  auto?: boolean;
10
10
  effect?: boolean;
11
11
  disabled?: boolean;
12
- htmlType?: React.ButtonHTMLAttributes<any>['type'];
12
+ type?: React.ButtonHTMLAttributes<any>['type'];
13
13
  icon?: React.ReactNode;
14
14
  iconRight?: React.ReactNode;
15
15
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
- var _excluded = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
4
+ var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
5
5
  import _JSXStyle from "../styled-jsx.es.js";
6
6
  /* "use client" */
7
7
 
@@ -40,8 +40,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
40
40
  var children = filteredProps.children,
41
41
  _filteredProps$disabl = filteredProps.disabled,
42
42
  disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl,
43
- _filteredProps$type = filteredProps.type,
44
- type = _filteredProps$type === void 0 ? 'default' : _filteredProps$type,
43
+ _filteredProps$color = filteredProps.color,
44
+ _color = _filteredProps$color === void 0 ? 'default' : _filteredProps$color,
45
45
  _filteredProps$loadin = filteredProps.loading,
46
46
  loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
47
47
  _filteredProps$shadow = filteredProps.shadow,
@@ -56,8 +56,8 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
56
56
  _filteredProps$auto = filteredProps.auto,
57
57
  auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
58
58
  icon = filteredProps.icon,
59
- _filteredProps$htmlTy = filteredProps.htmlType,
60
- htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
59
+ _filteredProps$type = filteredProps.type,
60
+ type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
61
61
  iconRight = filteredProps.iconRight,
62
62
  _filteredProps$classN = filteredProps.className,
63
63
  className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN,
@@ -112,7 +112,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
112
112
  paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
113
113
  return /*#__PURE__*/React.createElement("button", _extends({
114
114
  ref: buttonRef,
115
- type: htmlType,
115
+ type: type,
116
116
  disabled: disabled,
117
117
  onClick: clickHandler
118
118
  }, props, {
@@ -6,9 +6,9 @@ export interface ButtonColorGroup {
6
6
  border: string;
7
7
  color: string;
8
8
  }
9
- export declare const getButtonGhostColors: (palette: HUIThemesPalette, type: ButtonTypes) => ButtonColorGroup | null;
9
+ export declare const getButtonGhostColors: (palette: HUIThemesPalette, _color: ButtonTypes) => ButtonColorGroup | null;
10
10
  export declare const getButtonColors: (palette: HUIThemesPalette, props: ButtonProps) => ButtonColorGroup;
11
- export declare const getButtonGhostHoverColors: (palette: HUIThemesPalette, type: ButtonTypes) => ButtonColorGroup | null;
11
+ export declare const getButtonGhostHoverColors: (palette: HUIThemesPalette, _color: ButtonTypes) => ButtonColorGroup | null;
12
12
  export declare const getButtonHoverColors: (palette: HUIThemesPalette, props: ButtonProps) => ButtonColorGroup;
13
13
  export interface ButtonCursorGroup {
14
14
  cursor: string;