@loja-integrada/admin-components 0.9.3 → 0.9.4

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.
@@ -3,4 +3,5 @@ export declare const Checkbox: React.MemoExoticComponent<React.ForwardRefExoticC
3
3
  export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
4
  label?: string | React.ReactNode;
5
5
  indeterminate?: boolean;
6
+ boxAlign?: 'center' | 'baseline';
6
7
  }
@@ -1596,7 +1596,9 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
1596
1596
  checked = _ref.checked,
1597
1597
  disabled = _ref.disabled,
1598
1598
  indeterminate = _ref.indeterminate,
1599
- props = _objectWithoutPropertiesLoose(_ref, ["label", "id", "name", "onChange", "checked", "disabled", "indeterminate"]);
1599
+ _ref$boxAlign = _ref.boxAlign,
1600
+ boxAlign = _ref$boxAlign === void 0 ? 'center' : _ref$boxAlign,
1601
+ props = _objectWithoutPropertiesLoose(_ref, ["label", "id", "name", "onChange", "checked", "disabled", "indeterminate", "boxAlign"]);
1600
1602
 
1601
1603
  var inputRef = React__default.useRef(null);
1602
1604
  var inputId = id || name;
@@ -1609,6 +1611,7 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
1609
1611
  isIndeterminate = _React$useState2[0],
1610
1612
  setIsIndeterminate = _React$useState2[1];
1611
1613
 
1614
+ var isCenterBoxAlign = boxAlign === 'center';
1612
1615
  React__default.useEffect(function () {
1613
1616
  setIsChecked(!!checked);
1614
1617
  if (checked) setIsIndeterminate(false);
@@ -1627,11 +1630,11 @@ var CheckboxComponent = function CheckboxComponent(_ref, ref) {
1627
1630
  };
1628
1631
 
1629
1632
  var checkboxIconClasses = "transition duration-200 ease-in-out " + (isChecked || isIndeterminate ? 'scale-100' : 'scale-0');
1630
- var checkboxIconContainerClasses = "border border-card-stroke transition duration-200 ease-in-out " + (disabled ? 'bg-base-4' : isChecked || isIndeterminate ? 'bg-primary border-primary' : 'bg-base-1') + " rounded w-4 h-4 flex justify-center items-center m-px";
1633
+ var checkboxIconContainerClasses = "border border-card-stroke transition duration-200 ease-in-out\n " + (disabled ? 'bg-base-4' : isChecked || isIndeterminate ? 'bg-primary border-primary' : 'bg-base-1') + "\n " + (isCenterBoxAlign ? 'items-center' : '') + "\n rounded w-4 h-4 flex justify-center m-px\n ";
1631
1634
  var checkboxLabelClasses = "ml-1 input-label text-f6 tracking-4 leading-6 " + (disabled ? 'text-inverted-2' : '');
1632
1635
  return React__default.createElement("label", {
1633
1636
  htmlFor: inputId,
1634
- className: "inline-flex items-center cursor-pointer"
1637
+ className: "inline-flex items-" + boxAlign + " cursor-pointer"
1635
1638
  }, React__default.createElement("span", {
1636
1639
  className: "rounded z-50 flex items-center justify-center focus-within:ring-2 ring-focus"
1637
1640
  }, React__default.createElement("input", Object.assign({