@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.
@@ -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;
@@ -1322,7 +1322,7 @@ var withScale = function withScale(Render) {
1322
1322
  return ScaleFC;
1323
1323
  };
1324
1324
 
1325
- var _excluded$5 = ["label", "labelRight", "type", "error", "htmlType", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
1325
+ var _excluded$5 = ["label", "labelRight", "color", "error", "type", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
1326
1326
  var simulateChangeEvent = function simulateChangeEvent(el, event) {
1327
1327
  return _objectSpread2(_objectSpread2({}, event), {}, {
1328
1328
  target: el,
@@ -1332,11 +1332,11 @@ var simulateChangeEvent = function simulateChangeEvent(el, event) {
1332
1332
  var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1333
1333
  var label = _ref.label,
1334
1334
  labelRight = _ref.labelRight,
1335
- _ref$type = _ref.type,
1336
- type = _ref$type === void 0 ? 'default' : _ref$type,
1335
+ _ref$color = _ref.color,
1336
+ _color = _ref$color === void 0 ? 'default' : _ref$color,
1337
1337
  error = _ref.error,
1338
- _ref$htmlType = _ref.htmlType,
1339
- htmlType = _ref$htmlType === void 0 ? 'text' : _ref$htmlType,
1338
+ _ref$type = _ref.type,
1339
+ type = _ref$type === void 0 ? 'text' : _ref$type,
1340
1340
  icon = _ref.icon,
1341
1341
  iconRight = _ref.iconRight,
1342
1342
  _ref$iconClickable = _ref.iconClickable,
@@ -1388,7 +1388,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1388
1388
  return iconRight ? 'right-icon' : icon ? 'left-icon' : '';
1389
1389
  }, [icon, iconRight]);
1390
1390
  var _useMemo = React.useMemo(function () {
1391
- return getColors(theme.palette, type);
1391
+ return getColors(theme.palette, _color);
1392
1392
  }, [theme.palette, type]),
1393
1393
  color = _useMemo.color,
1394
1394
  borderColor = _useMemo.borderColor,
@@ -1449,7 +1449,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1449
1449
  }, icon && /*#__PURE__*/React.createElement(InputIcon, _extends({
1450
1450
  icon: icon
1451
1451
  }, iconProps)), /*#__PURE__*/React.createElement("input", _extends({
1452
- type: htmlType,
1452
+ type: type,
1453
1453
  ref: inputRef,
1454
1454
  placeholder: placeholder,
1455
1455
  disabled: disabled,
@@ -1653,7 +1653,7 @@ var InputPasswordComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref)
1653
1653
  ref: inputRef,
1654
1654
  iconClickable: true,
1655
1655
  onIconClick: iconClickHandler,
1656
- htmlType: visible ? 'text' : 'password'
1656
+ type: visible ? 'text' : 'password'
1657
1657
  });
1658
1658
  }, [props, iconClickHandler, visible, inputRef]);
1659
1659
  var icon = React.useMemo(function () {
@@ -12041,7 +12041,7 @@ const HelpCircle = ({ color, strokeWidth, set }) => {
12041
12041
  HelpCircle.displayName = "HelpCircle";
12042
12042
  createIcon(HelpCircle);
12043
12043
 
12044
- var _excluded = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
12044
+ var _excluded = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "color", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
12045
12045
  var childrenToOptionsNode = function childrenToOptionsNode(options) {
12046
12046
  return options.map(function (item, index) {
12047
12047
  var key = "auto-complete-item-".concat(index);
@@ -12077,6 +12077,7 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
12077
12077
  searching = _ref.searching,
12078
12078
  children = _ref.children,
12079
12079
  type = _ref.type,
12080
+ color = _ref.color,
12080
12081
  value = _ref.value,
12081
12082
  _ref$clearable = _ref.clearable,
12082
12083
  clearable = _ref$clearable === void 0 ? false : _ref$clearable,
@@ -12201,6 +12202,7 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
12201
12202
  fullWidth: true,
12202
12203
  ref: inputRef,
12203
12204
  type: type,
12205
+ color: color,
12204
12206
  onChange: onInputChange,
12205
12207
  onFocus: function onFocus() {
12206
12208
  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>;
@@ -1387,7 +1387,7 @@ var addColorAlpha = function addColorAlpha(color, alpha) {
1387
1387
  return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
1388
1388
  };
1389
1389
 
1390
- var getButtonGhostColors = function getButtonGhostColors(palette, type) {
1390
+ var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
1391
1391
  var colors = {
1392
1392
  secondary: {
1393
1393
  bg: palette.background,
@@ -1410,10 +1410,10 @@ var getButtonGhostColors = function getButtonGhostColors(palette, type) {
1410
1410
  color: palette.error
1411
1411
  }
1412
1412
  };
1413
- return colors[type] || null;
1413
+ return colors[_color] || null;
1414
1414
  };
1415
1415
  var getButtonColors = function getButtonColors(palette, props) {
1416
- var type = props.type,
1416
+ var color = props.color,
1417
1417
  disabled = props.disabled,
1418
1418
  ghost = props.ghost;
1419
1419
  var colors = {
@@ -1461,12 +1461,12 @@ var getButtonColors = function getButtonColors(palette, props) {
1461
1461
  * Color['success'] === Color['success-light']
1462
1462
  * Color['warning'] === Color['warning-light']
1463
1463
  */
1464
- var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
1464
+ var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
1465
1465
  var defaultColor = colors["default"];
1466
1466
  if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
1467
1467
  return colors[withoutLightType] || defaultColor;
1468
1468
  };
1469
- var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
1469
+ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
1470
1470
  var colors = {
1471
1471
  secondary: {
1472
1472
  bg: palette.foreground,
@@ -1489,11 +1489,11 @@ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type
1489
1489
  color: 'white'
1490
1490
  }
1491
1491
  };
1492
- var withoutLightType = type.replace('-light', '');
1492
+ var withoutLightType = _color.replace('-light', '');
1493
1493
  return colors[withoutLightType] || null;
1494
1494
  };
1495
1495
  var getButtonHoverColors = function getButtonHoverColors(palette, props) {
1496
- var type = props.type,
1496
+ var color = props.color,
1497
1497
  disabled = props.disabled,
1498
1498
  loading = props.loading,
1499
1499
  shadow = props.shadow,
@@ -1548,7 +1548,7 @@ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
1548
1548
  color: 'transparent'
1549
1549
  });
1550
1550
  if (shadow) return defaultColor;
1551
- var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
1551
+ var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
1552
1552
  return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
1553
1553
  color: hoverColor.color || hoverColor.border
1554
1554
  });
@@ -1574,7 +1574,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
1574
1574
  return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
1575
1575
  };
1576
1576
 
1577
- var _excluded = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
1577
+ var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
1578
1578
  var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
1579
1579
  var theme = useTheme();
1580
1580
  var _useScale = useScale(),
@@ -1601,7 +1601,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
1601
1601
  var children = filteredProps.children,
1602
1602
  _filteredProps$disabl = filteredProps.disabled,
1603
1603
  disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
1604
- filteredProps.type;
1604
+ filteredProps.color;
1605
1605
  var _filteredProps$loadin = filteredProps.loading,
1606
1606
  loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
1607
1607
  _filteredProps$shadow = filteredProps.shadow,
@@ -1616,8 +1616,8 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
1616
1616
  _filteredProps$auto = filteredProps.auto,
1617
1617
  auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
1618
1618
  icon = filteredProps.icon,
1619
- _filteredProps$htmlTy = filteredProps.htmlType,
1620
- htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
1619
+ _filteredProps$type = filteredProps.type,
1620
+ type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
1621
1621
  iconRight = filteredProps.iconRight,
1622
1622
  _filteredProps$classN = filteredProps.className,
1623
1623
  className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
@@ -1671,7 +1671,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
1671
1671
  paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
1672
1672
  return /*#__PURE__*/React$1.createElement("button", _extends({
1673
1673
  ref: buttonRef,
1674
- type: htmlType,
1674
+ type: type,
1675
1675
  disabled: disabled,
1676
1676
  onClick: clickHandler
1677
1677
  }, 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;
@@ -17,6 +17,7 @@ interface Props {
17
17
  initialChecked?: boolean;
18
18
  onChange?: (e: CheckboxEvent) => void;
19
19
  className?: string;
20
+ block?: boolean;
20
21
  value?: string;
21
22
  }
22
23
  type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof Props>;
@@ -1275,7 +1275,7 @@ var useClasses = function useClasses() {
1275
1275
  return classes.trim();
1276
1276
  };
1277
1277
 
1278
- var _excluded$1 = ["checked", "initialChecked", "disabled", "onChange", "className", "children", "type", "value"];
1278
+ var _excluded$1 = ["checked", "initialChecked", "disabled", "onChange", "className", "children", "type", "value", "block"];
1279
1279
  var CheckboxComponent = function CheckboxComponent(_ref) {
1280
1280
  var checked = _ref.checked,
1281
1281
  _ref$initialChecked = _ref.initialChecked,
@@ -1290,6 +1290,8 @@ var CheckboxComponent = function CheckboxComponent(_ref) {
1290
1290
  type = _ref$type === void 0 ? 'default' : _ref$type,
1291
1291
  _ref$value = _ref.value,
1292
1292
  value = _ref$value === void 0 ? '' : _ref$value,
1293
+ _ref$block = _ref.block,
1294
+ block = _ref$block === void 0 ? false : _ref$block,
1293
1295
  props = _objectWithoutProperties(_ref, _excluded$1);
1294
1296
  var theme = useTheme();
1295
1297
  var _useScale = useScale(),
@@ -1341,6 +1343,11 @@ var CheckboxComponent = function CheckboxComponent(_ref) {
1341
1343
  setSelfChecked(checked);
1342
1344
  }, [checked]);
1343
1345
  return /*#__PURE__*/React.createElement("label", {
1346
+ style: block ? {
1347
+ backgroundColor: '#efefef',
1348
+ padding: '15px',
1349
+ height: '2.5rem'
1350
+ } : {},
1344
1351
  className: _JSXStyle.dynamic([["4126727675", [SCALES.font(0.875), isDisabled ? 'not-allowed' : 'pointer', isDisabled ? 0.75 : 1, SCALES.width(1, 'auto'), SCALES.height(1, 'var(--checkbox-size)'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), isDisabled ? 'not-allowed' : 'pointer']]]) + " " + (classes || "")
1345
1352
  }, /*#__PURE__*/React.createElement(CheckboxIcon, {
1346
1353
  fill: fill,
package/dist/index.js CHANGED
@@ -1814,7 +1814,7 @@ var withScale = function withScale(Render) {
1814
1814
  return ScaleFC;
1815
1815
  };
1816
1816
 
1817
- var _excluded$1o = ["label", "labelRight", "type", "error", "htmlType", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
1817
+ var _excluded$1o = ["label", "labelRight", "color", "error", "type", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
1818
1818
  var simulateChangeEvent = function simulateChangeEvent(el, event) {
1819
1819
  return _objectSpread2(_objectSpread2({}, event), {}, {
1820
1820
  target: el,
@@ -1824,11 +1824,11 @@ var simulateChangeEvent = function simulateChangeEvent(el, event) {
1824
1824
  var InputComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
1825
1825
  var label = _ref.label,
1826
1826
  labelRight = _ref.labelRight,
1827
- _ref$type = _ref.type,
1828
- type = _ref$type === void 0 ? 'default' : _ref$type,
1827
+ _ref$color = _ref.color,
1828
+ _color = _ref$color === void 0 ? 'default' : _ref$color,
1829
1829
  error = _ref.error,
1830
- _ref$htmlType = _ref.htmlType,
1831
- htmlType = _ref$htmlType === void 0 ? 'text' : _ref$htmlType,
1830
+ _ref$type = _ref.type,
1831
+ type = _ref$type === void 0 ? 'text' : _ref$type,
1832
1832
  icon = _ref.icon,
1833
1833
  iconRight = _ref.iconRight,
1834
1834
  _ref$iconClickable = _ref.iconClickable,
@@ -1880,7 +1880,7 @@ var InputComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
1880
1880
  return iconRight ? 'right-icon' : icon ? 'left-icon' : '';
1881
1881
  }, [icon, iconRight]);
1882
1882
  var _useMemo = React$1.useMemo(function () {
1883
- return getColors$8(theme.palette, type);
1883
+ return getColors$8(theme.palette, _color);
1884
1884
  }, [theme.palette, type]),
1885
1885
  color = _useMemo.color,
1886
1886
  borderColor = _useMemo.borderColor,
@@ -1941,7 +1941,7 @@ var InputComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
1941
1941
  }, icon && /*#__PURE__*/React$1.createElement(InputIcon, _extends({
1942
1942
  icon: icon
1943
1943
  }, iconProps)), /*#__PURE__*/React$1.createElement("input", _extends({
1944
- type: htmlType,
1944
+ type: type,
1945
1945
  ref: inputRef,
1946
1946
  placeholder: placeholder,
1947
1947
  disabled: disabled,
@@ -2151,7 +2151,7 @@ var InputPasswordComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref
2151
2151
  ref: inputRef,
2152
2152
  iconClickable: true,
2153
2153
  onIconClick: iconClickHandler,
2154
- htmlType: visible ? 'text' : 'password'
2154
+ type: visible ? 'text' : 'password'
2155
2155
  });
2156
2156
  }, [props, iconClickHandler, visible, inputRef]);
2157
2157
  var icon = React$1.useMemo(function () {
@@ -12566,7 +12566,7 @@ const HelpCircle = ({ color, strokeWidth, set }) => {
12566
12566
  HelpCircle.displayName = "HelpCircle";
12567
12567
  createIcon(HelpCircle);
12568
12568
 
12569
- var _excluded$1j = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
12569
+ var _excluded$1j = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "color", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
12570
12570
  var childrenToOptionsNode = function childrenToOptionsNode(options) {
12571
12571
  return options.map(function (item, index) {
12572
12572
  var key = "auto-complete-item-".concat(index);
@@ -12602,6 +12602,7 @@ var AutoCompleteComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, user
12602
12602
  searching = _ref.searching,
12603
12603
  children = _ref.children,
12604
12604
  type = _ref.type,
12605
+ color = _ref.color,
12605
12606
  value = _ref.value,
12606
12607
  _ref$clearable = _ref.clearable,
12607
12608
  clearable = _ref$clearable === void 0 ? false : _ref$clearable,
@@ -12726,6 +12727,7 @@ var AutoCompleteComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, user
12726
12727
  fullWidth: true,
12727
12728
  ref: inputRef,
12728
12729
  type: type,
12730
+ color: color,
12729
12731
  onChange: onInputChange,
12730
12732
  onFocus: function onFocus() {
12731
12733
  return toggleFocusHandler(true);
@@ -13259,7 +13261,7 @@ var useButtonGroupContext = function useButtonGroupContext() {
13259
13261
  return React$1.useContext(ButtonGroupContext);
13260
13262
  };
13261
13263
 
13262
- var getButtonGhostColors = function getButtonGhostColors(palette, type) {
13264
+ var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
13263
13265
  var colors = {
13264
13266
  secondary: {
13265
13267
  bg: palette.background,
@@ -13282,10 +13284,10 @@ var getButtonGhostColors = function getButtonGhostColors(palette, type) {
13282
13284
  color: palette.error
13283
13285
  }
13284
13286
  };
13285
- return colors[type] || null;
13287
+ return colors[_color] || null;
13286
13288
  };
13287
13289
  var getButtonColors = function getButtonColors(palette, props) {
13288
- var type = props.type,
13290
+ var color = props.color,
13289
13291
  disabled = props.disabled,
13290
13292
  ghost = props.ghost;
13291
13293
  var colors = {
@@ -13333,12 +13335,12 @@ var getButtonColors = function getButtonColors(palette, props) {
13333
13335
  * Color['success'] === Color['success-light']
13334
13336
  * Color['warning'] === Color['warning-light']
13335
13337
  */
13336
- var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
13338
+ var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
13337
13339
  var defaultColor = colors["default"];
13338
13340
  if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
13339
13341
  return colors[withoutLightType] || defaultColor;
13340
13342
  };
13341
- var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
13343
+ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
13342
13344
  var colors = {
13343
13345
  secondary: {
13344
13346
  bg: palette.foreground,
@@ -13361,11 +13363,11 @@ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type
13361
13363
  color: 'white'
13362
13364
  }
13363
13365
  };
13364
- var withoutLightType = type.replace('-light', '');
13366
+ var withoutLightType = _color.replace('-light', '');
13365
13367
  return colors[withoutLightType] || null;
13366
13368
  };
13367
13369
  var getButtonHoverColors = function getButtonHoverColors(palette, props) {
13368
- var type = props.type,
13370
+ var color = props.color,
13369
13371
  disabled = props.disabled,
13370
13372
  loading = props.loading,
13371
13373
  shadow = props.shadow,
@@ -13420,7 +13422,7 @@ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
13420
13422
  color: 'transparent'
13421
13423
  });
13422
13424
  if (shadow) return defaultColor;
13423
- var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
13425
+ var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
13424
13426
  return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
13425
13427
  color: hoverColor.color || hoverColor.border
13426
13428
  });
@@ -13446,7 +13448,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
13446
13448
  return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
13447
13449
  };
13448
13450
 
13449
- var _excluded$1d = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
13451
+ var _excluded$1d = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
13450
13452
  var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
13451
13453
  var theme = useTheme();
13452
13454
  var _useScale = useScale(),
@@ -13473,7 +13475,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
13473
13475
  var children = filteredProps.children,
13474
13476
  _filteredProps$disabl = filteredProps.disabled,
13475
13477
  disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
13476
- filteredProps.type;
13478
+ filteredProps.color;
13477
13479
  var _filteredProps$loadin = filteredProps.loading,
13478
13480
  loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
13479
13481
  _filteredProps$shadow = filteredProps.shadow,
@@ -13488,8 +13490,8 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
13488
13490
  _filteredProps$auto = filteredProps.auto,
13489
13491
  auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
13490
13492
  icon = filteredProps.icon,
13491
- _filteredProps$htmlTy = filteredProps.htmlType,
13492
- htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
13493
+ _filteredProps$type = filteredProps.type,
13494
+ type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
13493
13495
  iconRight = filteredProps.iconRight,
13494
13496
  _filteredProps$classN = filteredProps.className,
13495
13497
  className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
@@ -13543,7 +13545,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
13543
13545
  paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
13544
13546
  return /*#__PURE__*/React$1.createElement("button", _extends({
13545
13547
  ref: buttonRef,
13546
- type: htmlType,
13548
+ type: type,
13547
13549
  disabled: disabled,
13548
13550
  onClick: clickHandler
13549
13551
  }, props, {
@@ -14442,7 +14444,7 @@ var getColors$7 = function getColors(palette, status) {
14442
14444
  return colors[status];
14443
14445
  };
14444
14446
 
14445
- var _excluded$12 = ["checked", "initialChecked", "disabled", "onChange", "className", "children", "type", "value"];
14447
+ var _excluded$12 = ["checked", "initialChecked", "disabled", "onChange", "className", "children", "type", "value", "block"];
14446
14448
  var CheckboxComponent = function CheckboxComponent(_ref) {
14447
14449
  var checked = _ref.checked,
14448
14450
  _ref$initialChecked = _ref.initialChecked,
@@ -14457,6 +14459,8 @@ var CheckboxComponent = function CheckboxComponent(_ref) {
14457
14459
  type = _ref$type === void 0 ? 'default' : _ref$type,
14458
14460
  _ref$value = _ref.value,
14459
14461
  value = _ref$value === void 0 ? '' : _ref$value,
14462
+ _ref$block = _ref.block,
14463
+ block = _ref$block === void 0 ? false : _ref$block,
14460
14464
  props = _objectWithoutProperties(_ref, _excluded$12);
14461
14465
  var theme = useTheme();
14462
14466
  var _useScale = useScale(),
@@ -14508,6 +14512,11 @@ var CheckboxComponent = function CheckboxComponent(_ref) {
14508
14512
  setSelfChecked(checked);
14509
14513
  }, [checked]);
14510
14514
  return /*#__PURE__*/React$1.createElement("label", {
14515
+ style: block ? {
14516
+ backgroundColor: '#efefef',
14517
+ padding: '15px',
14518
+ height: '2.5rem'
14519
+ } : {},
14511
14520
  className: _JSXStyle.dynamic([["4126727675", [SCALES.font(0.875), isDisabled ? 'not-allowed' : 'pointer', isDisabled ? 0.75 : 1, SCALES.width(1, 'auto'), SCALES.height(1, 'var(--checkbox-size)'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), isDisabled ? 'not-allowed' : 'pointer']]]) + " " + (classes || "")
14512
14521
  }, /*#__PURE__*/React$1.createElement(CheckboxIcon, {
14513
14522
  fill: fill,
@@ -21843,7 +21852,7 @@ var makeToastActions = function makeToastActions(actions, cancelHandle) {
21843
21852
  auto: true,
21844
21853
  scale: 1 / 3,
21845
21854
  font: "13px",
21846
- type: action.passive ? 'default' : 'secondary',
21855
+ color: action.passive ? 'default' : 'secondary',
21847
21856
  key: "action-".concat(index),
21848
21857
  onClick: function onClick(event) {
21849
21858
  return handler(event, action.handler);
@@ -26300,6 +26309,8 @@ var SpinnerComponent = function SpinnerComponent(_ref) {
26300
26309
  SpinnerComponent.displayName = 'Spinner';
26301
26310
  var Spinner = withScale(SpinnerComponent);
26302
26311
 
26312
+ // import Button from '../button'
26313
+
26303
26314
  var makeColgroup = function makeColgroup(width, columns) {
26304
26315
  var unsetWidthCount = columns.filter(function (c) {
26305
26316
  return !c.width;
@@ -26342,17 +26353,22 @@ var TableHead = function TableHead(props) {
26342
26353
  _React$useState2 = _slicedToArray(_React$useState, 2),
26343
26354
  filters = _React$useState2[0],
26344
26355
  setFilters = _React$useState2[1];
26356
+
26357
+ // const applyFilters = () => {
26358
+ // if (onFilters) {
26359
+ // onFilters(filters);
26360
+ // }
26361
+ // }
26362
+
26345
26363
  var handleFilterChange = function handleFilterChange(name, value) {
26346
26364
  setFilters(function (prevFilters) {
26347
26365
  var updatedFilters = _objectSpread2(_objectSpread2({}, prevFilters), {}, _defineProperty$1({}, name, value));
26366
+ if (onFilters) {
26367
+ onFilters(filters);
26368
+ }
26348
26369
  return updatedFilters;
26349
26370
  });
26350
26371
  };
26351
- var applyFilters = function applyFilters() {
26352
- if (onFilters) {
26353
- onFilters(filters);
26354
- }
26355
- };
26356
26372
  var generateFilterInputs = function generateFilterInputs() {
26357
26373
  return columns.map(function (col) {
26358
26374
  var _String, _filters$filterName;
@@ -26390,7 +26406,7 @@ var TableHead = function TableHead(props) {
26390
26406
  }) : null), accessor === 'date' && /*#__PURE__*/React$1.createElement(Input
26391
26407
  // id={`filter-date-${filterName}`}
26392
26408
  , {
26393
- htmlType: "date"
26409
+ type: "date"
26394
26410
  // name={filterName}
26395
26411
  ,
26396
26412
  value: filters[filterName],
@@ -26400,7 +26416,7 @@ var TableHead = function TableHead(props) {
26400
26416
  }), accessor === 'search' && /*#__PURE__*/React$1.createElement(Input
26401
26417
  // id={`filter-search-${filterName}`}
26402
26418
  , {
26403
- htmlType: "text",
26419
+ type: "text",
26404
26420
  autoComplete: "off"
26405
26421
  // ref={filterRefs.current[filterName]} // Dynamically set ref}
26406
26422
  // name={filterName}
@@ -26451,13 +26467,7 @@ var TableHead = function TableHead(props) {
26451
26467
  }, column.text)));
26452
26468
  })), showFilters && /*#__PURE__*/React$1.createElement("tr", {
26453
26469
  className: _JSXStyle.dynamic([["2156261549", [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
26454
- }, generateFilterInputs(), /*#__PURE__*/React$1.createElement("th", {
26455
- className: _JSXStyle.dynamic([["2156261549", [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
26456
- }, /*#__PURE__*/React$1.createElement(Button, {
26457
- onClick: function onClick() {
26458
- return applyFilters();
26459
- }
26460
- }, "Apply")))), /*#__PURE__*/React$1.createElement(_JSXStyle, {
26470
+ }, generateFilterInputs())), /*#__PURE__*/React$1.createElement(_JSXStyle, {
26461
26471
  id: "2156261549",
26462
26472
  dynamic: [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]
26463
26473
  }, "thead.__jsx-style-dynamic-selector{border-collapse:separate;border-spacing:0;background-color:#fff;font-size:inherit;".concat(stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", ";}th.__jsx-style-dynamic-selector{padding:0 0.5em;font-size:calc(0.75 * var(--table-font-size));font-weight:normal;text-align:left;-webkit-letter-spacing:0;-moz-letter-spacing:0;-ms-letter-spacing:0;letter-spacing:0;vertical-align:middle;min-height:calc(2.5 * var(--table-font-size));color:").concat(theme.palette.accents_5, ";background:").concat(theme.palette.accents_1, ";border-bottom:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-radius:0;}th.__jsx-style-dynamic-selector:nth-child(1){border-bottom:1px solid ").concat(theme.palette.border, ";border-left:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-top-left-radius:").concat(theme.layout.radius, ";border-bottom-left-radius:").concat(theme.layout.radius, ";}th.__jsx-style-dynamic-selector:last-child{border-bottom:1px solid ").concat(theme.palette.border, ";border-right:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-top-right-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";}.thead-box.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-align:center;min-height:calc(2.5 * var(--table-font-size));text-transform:uppercase;}")));
@@ -44462,7 +44472,7 @@ function DataTable(_ref) {
44462
44472
  // <Input
44463
44473
  // // id={`filter-date-${filterName}`}
44464
44474
  // // key={filterName}
44465
- // htmlType="date"
44475
+ // type="date"
44466
44476
  // name={filterName}
44467
44477
  // value={filterValues[filterName]}
44468
44478
  // onChange={(e) => handleFilterChange(filterName, e.target.value)}
@@ -44472,7 +44482,7 @@ function DataTable(_ref) {
44472
44482
  // <Input
44473
44483
  // // id={`filter-search-${filterName}`}
44474
44484
  // // key={filterName}
44475
- // htmlType="text"
44485
+ // type="text"
44476
44486
  // autoComplete="off"
44477
44487
  // // ref={filterRefs.current[filterName]} // Dynamically set ref}
44478
44488
  // name={filterName}
@@ -44535,7 +44545,7 @@ function DataTable(_ref) {
44535
44545
  fontSize: 'larger'
44536
44546
  }
44537
44547
  }, children && /*#__PURE__*/React$1.createElement(Button, {
44538
- htmlType: "button",
44548
+ type: "button",
44539
44549
  auto: true,
44540
44550
  scale: 2 / 3,
44541
44551
  px: 0.6,
@@ -44565,7 +44575,7 @@ function DataTable(_ref) {
44565
44575
  },
44566
44576
  iconRight: /*#__PURE__*/React$1.createElement(Edit, null),
44567
44577
  auto: true,
44568
- htmlType: "button",
44578
+ type: "button",
44569
44579
  scale: 2 / 3,
44570
44580
  px: 0.6
44571
44581
  })) : null, onSelectedDelete && selected.length > 1 ? /*#__PURE__*/React$1.createElement(Tooltip, {
@@ -44582,7 +44592,7 @@ function DataTable(_ref) {
44582
44592
  auto: true,
44583
44593
  scale: 2 / 3,
44584
44594
  px: 0.6,
44585
- htmlType: "button",
44595
+ type: "button",
44586
44596
  iconRight: /*#__PURE__*/React$1.createElement(Delete$1, null)
44587
44597
  })) : null, onRefresh ? /*#__PURE__*/React$1.createElement(Tooltip, {
44588
44598
  text: "Refresh",
@@ -44592,7 +44602,7 @@ function DataTable(_ref) {
44592
44602
  py: 0.4,
44593
44603
  type: "dark"
44594
44604
  }, /*#__PURE__*/React$1.createElement(Button, {
44595
- htmlType: "button",
44605
+ type: "button",
44596
44606
  onClick: function onClick() {
44597
44607
  return onRefresh();
44598
44608
  },
@@ -44608,7 +44618,7 @@ function DataTable(_ref) {
44608
44618
  py: 0.4,
44609
44619
  type: "dark"
44610
44620
  }, /*#__PURE__*/React$1.createElement(Button, {
44611
- htmlType: "button",
44621
+ type: "button",
44612
44622
  onClick: handleShowFilter,
44613
44623
  auto: true,
44614
44624
  scale: 2 / 3,
@@ -44626,7 +44636,7 @@ function DataTable(_ref) {
44626
44636
  placement: "bottomEnd",
44627
44637
  child: content
44628
44638
  }, /*#__PURE__*/React$1.createElement(Button, {
44629
- htmlType: "button",
44639
+ type: "button",
44630
44640
  onClick: function onClick() {},
44631
44641
  auto: true,
44632
44642
  scale: 2 / 3,