@majoo-ui/react 1.62.0 → 1.62.1

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/index.esm.js CHANGED
@@ -3328,7 +3328,7 @@ function _objectWithoutPropertiesLoose(r, e) {
3328
3328
  return t;
3329
3329
  }
3330
3330
 
3331
- const _excluded$C = ["children"],
3331
+ const _excluded$D = ["children"],
3332
3332
  _excluded2$4 = ["children"];
3333
3333
  const GridComponent = styled('div', {
3334
3334
  display: 'grid',
@@ -3518,7 +3518,7 @@ const Grid = _ref => {
3518
3518
  let {
3519
3519
  children
3520
3520
  } = _ref,
3521
- props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
3521
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
3522
3522
  return /*#__PURE__*/React__default.createElement(GridComponent, _extends({}, props, {
3523
3523
  css: Object.assign({}, props.css, {
3524
3524
  gridAutoColumns: props.autoColumns,
@@ -3586,7 +3586,7 @@ GridItem.propTypes = {
3586
3586
  };
3587
3587
  GridItem.displayName = 'Grid Item';
3588
3588
 
3589
- const _excluded$B = ["children", "isCollapse", "css", "contentHeader"];
3589
+ const _excluded$C = ["children", "isCollapse", "css", "contentHeader"];
3590
3590
  const StyledDiv$2 = styled(Flex$1, {
3591
3591
  justifyContent: 'center',
3592
3592
  marginLeft: 'auto',
@@ -3629,7 +3629,7 @@ const PageContainer = _ref => {
3629
3629
  css,
3630
3630
  contentHeader
3631
3631
  } = _ref,
3632
- props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
3632
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
3633
3633
  return /*#__PURE__*/React__default.createElement(StyledDiv$2, _extends({
3634
3634
  id: "retina-container",
3635
3635
  css: Object.assign({
@@ -3639,7 +3639,7 @@ const PageContainer = _ref => {
3639
3639
  };
3640
3640
  PageContainer.displayName = 'PageContainer';
3641
3641
 
3642
- const _excluded$A = ["className", "children", "radius", "padding", "width", "height"];
3642
+ const _excluded$B = ["className", "children", "radius", "padding", "width", "height"];
3643
3643
  const PaperComponent = styled('div', {
3644
3644
  padding: '20px',
3645
3645
  height: 'auto',
@@ -3684,7 +3684,7 @@ const Paper = _ref => {
3684
3684
  width,
3685
3685
  height
3686
3686
  } = _ref,
3687
- props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
3687
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
3688
3688
  return /*#__PURE__*/React__default.createElement(PaperComponent, _extends({
3689
3689
  className: className,
3690
3690
  css: Object.assign({
@@ -4228,7 +4228,7 @@ const Link = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
4228
4228
  }));
4229
4229
  });
4230
4230
 
4231
- const _excluded$z = ["title", "description", "variant", "link", "linkText", "onClick", "onRemove", "children", "bannerBlock", "icon"];
4231
+ const _excluded$A = ["title", "description", "variant", "link", "linkText", "onClick", "onRemove", "children", "bannerBlock", "icon"];
4232
4232
  const Context$3 = /*#__PURE__*/React.createContext();
4233
4233
  const StyledBanner = styled(Flex$1, {
4234
4234
  maxWidth: '100%',
@@ -4455,7 +4455,7 @@ const Banner = _ref => {
4455
4455
  bannerBlock,
4456
4456
  icon
4457
4457
  } = _ref,
4458
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$z);
4458
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$A);
4459
4459
  return /*#__PURE__*/React.createElement(StyledBanner, _extends({
4460
4460
  variant: variant,
4461
4461
  hasAction: !!onClick,
@@ -5088,7 +5088,7 @@ Card.defaultProps = {
5088
5088
  Card.Label = StyledLabel$2;
5089
5089
  Card.Description = StyledDescription$3;
5090
5090
 
5091
- const _excluded$y = ["children"];
5091
+ const _excluded$z = ["children"];
5092
5092
  const BreadcrumbStyle = styled('nav', {
5093
5093
  wordWrap: 'break-word',
5094
5094
  '& li+li:before': {
@@ -5136,7 +5136,7 @@ const BreadcrumbBase = _ref => {
5136
5136
  let {
5137
5137
  children
5138
5138
  } = _ref,
5139
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$y);
5139
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$z);
5140
5140
  return /*#__PURE__*/React__default.createElement(BreadcrumbStyle, _extends({}, rest, {
5141
5141
  "aria-label": "breadcrumb"
5142
5142
  }), /*#__PURE__*/React__default.createElement(Ol, null, children));
@@ -5387,7 +5387,7 @@ Badge.defaultProps = {
5387
5387
  };
5388
5388
  Badge.displayName = 'Badge';
5389
5389
 
5390
- const _excluded$x = ["className", "img", "children", "onLoadingStatusChange", "delayMs", "onClick", "css"];
5390
+ const _excluded$y = ["className", "img", "children", "onLoadingStatusChange", "delayMs", "onClick", "css"];
5391
5391
  const StyledAvatar = styled(AvatarPrimitive.Root, {
5392
5392
  width: '32px',
5393
5393
  height: '32px',
@@ -5431,7 +5431,7 @@ function Avatar(_ref) {
5431
5431
  onClick,
5432
5432
  css
5433
5433
  } = _ref,
5434
- props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
5434
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
5435
5435
  return /*#__PURE__*/React__default.createElement(StyledAvatar, _extends({
5436
5436
  className: className,
5437
5437
  onClick: onClick,
@@ -5455,7 +5455,7 @@ Avatar.defaultProps = {
5455
5455
  delayMs: 0
5456
5456
  };
5457
5457
 
5458
- const _excluded$w = ["className", "src", "alt", "width", "height", "objectFit", "fallback", "fallbackTitle", "css", "cssFallback", "rounded"];
5458
+ const _excluded$x = ["className", "src", "alt", "width", "height", "objectFit", "fallback", "fallbackTitle", "css", "cssFallback", "rounded"];
5459
5459
  const ContainerFallback = styled(Flex$1, {
5460
5460
  boxSizing: 'border-box',
5461
5461
  border: '2px dashed #C0C4C4',
@@ -5504,7 +5504,7 @@ function Image(_ref) {
5504
5504
  cssFallback,
5505
5505
  rounded
5506
5506
  } = _ref,
5507
- props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
5507
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
5508
5508
  const {
5509
5509
  t
5510
5510
  } = useTranslation('translation');
@@ -5933,7 +5933,7 @@ for (var COLLECTION_NAME in DOMIterables) {
5933
5933
 
5934
5934
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
5935
5935
 
5936
- const _excluded$v = ["children", "label", "color", "css", "withClick", "side", "align", "delayDuration"];
5936
+ const _excluded$w = ["children", "label", "color", "css", "withClick", "side", "align", "delayDuration"];
5937
5937
  const {
5938
5938
  zIndices: zIndices$2
5939
5939
  } = foundations;
@@ -6049,7 +6049,7 @@ const Tooltip$1 = _ref => {
6049
6049
  align,
6050
6050
  delayDuration
6051
6051
  } = _ref,
6052
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$v);
6052
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$w);
6053
6053
  const [open, setOpen] = useState(false);
6054
6054
  return /*#__PURE__*/React__default.createElement(Provider, null, /*#__PURE__*/React__default.createElement(TooltipBase, _extends({}, rest, {
6055
6055
  open: withClick ? open : undefined,
@@ -6087,7 +6087,7 @@ Tooltip$1.defaultProps = {
6087
6087
  delayDuration: 200
6088
6088
  };
6089
6089
 
6090
- const _excluded$u = ["className", "value", "max", "getValueLabel", "color", "size", "rounded", "width"];
6090
+ const _excluded$v = ["className", "value", "max", "getValueLabel", "color", "size", "rounded", "width"];
6091
6091
  const StyledProgress$1 = styled$1(ProgressPrimitive.Root, {
6092
6092
  position: 'relative',
6093
6093
  overflow: 'hidden',
@@ -6205,7 +6205,7 @@ function Progress$1(_ref) {
6205
6205
  rounded,
6206
6206
  width
6207
6207
  } = _ref,
6208
- props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
6208
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
6209
6209
  return /*#__PURE__*/React__default.createElement(StyledProgress$1, _extends({
6210
6210
  className: className,
6211
6211
  value: value,
@@ -7193,7 +7193,7 @@ function useMediaQuery(query) {
7193
7193
  return matches;
7194
7194
  }
7195
7195
 
7196
- const _excluded$t = ["id", "title", "description", "position", "dismissAfter", "variant", "onClick", "onRemove", "isExternalOfAction", "onClickOfAction", "captionOfAction", "hrefOfAction"];
7196
+ const _excluded$u = ["id", "title", "description", "position", "dismissAfter", "variant", "onClick", "onRemove", "isExternalOfAction", "onClickOfAction", "captionOfAction", "hrefOfAction"];
7197
7197
  const TOAST_WIDTH = 576;
7198
7198
  const ANIMATION_DURATION = 400;
7199
7199
  const TOP_RIGHT_POSITION = 'top-right';
@@ -7362,7 +7362,7 @@ const Toast = _ref => {
7362
7362
  captionOfAction,
7363
7363
  hrefOfAction
7364
7364
  } = _ref,
7365
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$t);
7365
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$u);
7366
7366
  const [isOpen, setIsOpen] = React.useState(false);
7367
7367
  const isMobile = useMediaQuery(`(max-width: 767px`);
7368
7368
  const close = React.useCallback(() => {
@@ -7466,7 +7466,7 @@ Toast.defaultProps = {
7466
7466
  dismissAfter: 5000
7467
7467
  };
7468
7468
 
7469
- const _excluded$s = ["preventDuplicate"];
7469
+ const _excluded$t = ["preventDuplicate"];
7470
7470
  const ToastBox = styled(Flex$1, {
7471
7471
  position: 'fixed',
7472
7472
  variants: {
@@ -7519,7 +7519,7 @@ const ToastContainer = ({
7519
7519
  const {
7520
7520
  preventDuplicate
7521
7521
  } = item,
7522
- toast = _objectWithoutPropertiesLoose(item, _excluded$s);
7522
+ toast = _objectWithoutPropertiesLoose(item, _excluded$t);
7523
7523
  return /*#__PURE__*/React.createElement(Toast, _extends({
7524
7524
  key: preventDuplicate ? toast.id : `${toast.id}-${index}`,
7525
7525
  onRemove: () => removeToast(toast.id)
@@ -8679,7 +8679,7 @@ const catchError = e => {
8679
8679
  return message;
8680
8680
  };
8681
8681
 
8682
- const _excluded$r = ["id", "disabledOfflineIntercept"];
8682
+ const _excluded$s = ["id", "disabledOfflineIntercept"];
8683
8683
  let toastCount = 0;
8684
8684
  const ToastProvider = ({
8685
8685
  children,
@@ -8705,7 +8705,7 @@ const ToastProvider = ({
8705
8705
  id,
8706
8706
  disabledOfflineIntercept
8707
8707
  } = toast,
8708
- rest = _objectWithoutPropertiesLoose(toast, _excluded$r);
8708
+ rest = _objectWithoutPropertiesLoose(toast, _excluded$s);
8709
8709
 
8710
8710
  // eslint-disable-next-line no-plusplus
8711
8711
  const uniqueId = ++toastCount;
@@ -8765,7 +8765,7 @@ const ConditionalWrapper = ({
8765
8765
  children
8766
8766
  }) => condition ? wrapper(children) : children;
8767
8767
 
8768
- const _excluded$q = ["count", "maxCount", "css"];
8768
+ const _excluded$r = ["count", "maxCount", "css"];
8769
8769
  const formLabelClassStyle = {
8770
8770
  alignItems: 'start !important',
8771
8771
  '& > div': {
@@ -8868,7 +8868,7 @@ const FormGroup = _ref => {
8868
8868
  maxCount,
8869
8869
  css
8870
8870
  } = _ref,
8871
- props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
8871
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
8872
8872
  const withCounter = Boolean(count || maxCount);
8873
8873
  return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
8874
8874
  condition: withCounter,
@@ -8890,7 +8890,7 @@ const FormGroup = _ref => {
8890
8890
  };
8891
8891
  FormGroup.displayName = 'FormGroup';
8892
8892
 
8893
- const _excluded$p = ["children", "htmlFor", "variant", "variants", "tooltipLabel", "count", "maxCount", "labelCss"];
8893
+ const _excluded$q = ["children", "htmlFor", "variant", "variants", "tooltipLabel", "count", "maxCount", "labelCss"];
8894
8894
  const StyledLabel$1 = styled(LabelPrimitive.Root, Text$1, {
8895
8895
  display: 'inline-block',
8896
8896
  fontSize: '$label',
@@ -8922,7 +8922,7 @@ const FormLabel = _ref => {
8922
8922
  maxCount,
8923
8923
  labelCss
8924
8924
  } = _ref,
8925
- props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
8925
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
8926
8926
  return /*#__PURE__*/React__default.createElement(Flex$1, {
8927
8927
  justify: "between",
8928
8928
  className: "form-label"
@@ -8962,7 +8962,7 @@ FormLabel.defaultProps = {
8962
8962
  };
8963
8963
  FormLabel.displayName = 'FormLabel';
8964
8964
 
8965
- const _excluded$o = ["children", "error", "errorMessage"];
8965
+ const _excluded$p = ["children", "error", "errorMessage"];
8966
8966
  const StyledHelper = styled(Text$1, {
8967
8967
  display: 'inline-block',
8968
8968
  color: '$textSecondary',
@@ -8980,7 +8980,7 @@ const FormHelper = _ref => {
8980
8980
  error,
8981
8981
  errorMessage
8982
8982
  } = _ref,
8983
- props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
8983
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
8984
8984
  const errorByMessage = !!errorMessage;
8985
8985
  if (error === undefined && errorByMessage) {
8986
8986
  return /*#__PURE__*/React__default.createElement(StyledHelper, _extends({
@@ -9108,7 +9108,7 @@ const SvgMinusOutline = props => /*#__PURE__*/React.createElement("svg", _extend
9108
9108
  d: "M14.31 10.41H3.9v-2.6h10.41z"
9109
9109
  }));
9110
9110
 
9111
- const _excluded$n = ["id", "checked", "indeterminate", "disabled", "onCheckedChange", "label", "index", "value"];
9111
+ const _excluded$o = ["id", "checked", "indeterminate", "disabled", "onCheckedChange", "label", "index", "value"];
9112
9112
  const StyledIndicator$2 = styled(CheckboxPrimitive.Indicator, {
9113
9113
  alignItems: 'center',
9114
9114
  display: 'flex',
@@ -9166,7 +9166,7 @@ const Checkbox = _ref => {
9166
9166
  index,
9167
9167
  value
9168
9168
  } = _ref,
9169
- props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
9169
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
9170
9170
  const context = useContext(CheckboxContext);
9171
9171
  const [isChecked, setChecked] = useState(false);
9172
9172
  useEffect(() => {
@@ -9214,7 +9214,7 @@ InputCheckbox.propTypes = {
9214
9214
  };
9215
9215
  InputCheckbox.displayName = 'InputCheckbox';
9216
9216
 
9217
- const _excluded$m = ["children", "size"];
9217
+ const _excluded$n = ["children", "size"];
9218
9218
  const InputGroupStyle = styled('div', {
9219
9219
  display: 'flex',
9220
9220
  width: '100%',
@@ -9353,7 +9353,7 @@ const InputGroup = _ref => {
9353
9353
  children,
9354
9354
  size = 'lg'
9355
9355
  } = _ref,
9356
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$m);
9356
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$n);
9357
9357
  const isLetter = children.some(child => child && (child.type.name === 'InputPrefix' || child.type.name === 'InputSuffix' || child.type.name === 'InputLeftElement' || child.type.name === 'InputRightElement'));
9358
9358
  const isElement = children.some(child => child && (child.type.name === 'InputLeftElement' || child.type.name === 'InputRightElement'));
9359
9359
  const clone = children.map((child, index) => {
@@ -9556,7 +9556,7 @@ InputSuffix.propTypes = {
9556
9556
  children: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
9557
9557
  };
9558
9558
 
9559
- const _excluded$l = ["disabled", "readOnly"];
9559
+ const _excluded$m = ["disabled", "readOnly"];
9560
9560
  const disabledStyle = {
9561
9561
  backgroundColor: '$formDisable',
9562
9562
  color: '$textDisable',
@@ -9729,7 +9729,7 @@ const InputText = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
9729
9729
  disabled,
9730
9730
  readOnly
9731
9731
  } = _ref,
9732
- props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
9732
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
9733
9733
  return /*#__PURE__*/React__default.createElement(StyledInput$1, _extends({
9734
9734
  ref: ref,
9735
9735
  disabled: disabled,
@@ -9750,7 +9750,7 @@ InputText.propTypes = {
9750
9750
  };
9751
9751
  InputText.displayName = 'InputText';
9752
9752
 
9753
- const _excluded$k = ["disabled", "readOnly"];
9753
+ const _excluded$l = ["disabled", "readOnly"];
9754
9754
  const StyledTextArea = styled(StyledInput$1, {
9755
9755
  variants: {
9756
9756
  size: {
@@ -9771,7 +9771,7 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
9771
9771
  disabled,
9772
9772
  readOnly
9773
9773
  } = _ref,
9774
- props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
9774
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
9775
9775
  const textareaRef = useRef(null);
9776
9776
  useEffect(() => {
9777
9777
  if (textareaRef.current) {
@@ -9840,7 +9840,7 @@ InputRadioGroup.propTypes = {
9840
9840
  };
9841
9841
  InputRadioGroup.displayName = 'InputRadioGroup';
9842
9842
 
9843
- const _excluded$j = ["id", "disabled", "css", "inputType", "inputProps", "description", "readOnly"];
9843
+ const _excluded$k = ["id", "disabled", "css", "inputType", "inputProps", "description", "readOnly"];
9844
9844
  const INDICATOR_BASE_STYLES = {
9845
9845
  alignItems: 'center',
9846
9846
  display: 'flex',
@@ -10005,7 +10005,7 @@ const InputRadio = _ref => {
10005
10005
  description,
10006
10006
  readOnly
10007
10007
  } = _ref,
10008
- props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
10008
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
10009
10009
  function renderInputType(type, checkedValue, onValueChange) {
10010
10010
  switch (type) {
10011
10011
  case 'number':
@@ -12490,7 +12490,7 @@ var NumberFormat = /*@__PURE__*/function (superclass) {
12490
12490
  }(React__default.Component);
12491
12491
  NumberFormat.defaultProps = defaultProps;
12492
12492
 
12493
- const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name", "maxValueLength", "maxLength", "thousandSeparator"];
12493
+ const _excluded$j = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name", "maxValueLength", "maxLength", "thousandSeparator"];
12494
12494
  const StyledInput = styled(NumberFormat, {
12495
12495
  // Reset
12496
12496
  appearance: 'none',
@@ -12685,7 +12685,7 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
12685
12685
  maxLength,
12686
12686
  thousandSeparator
12687
12687
  } = _ref,
12688
- props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
12688
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
12689
12689
  return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
12690
12690
  condition: Boolean(control),
12691
12691
  wrapper: child => /*#__PURE__*/React__default.createElement(Controller, {
@@ -12731,7 +12731,7 @@ InputNumber.defaultProps = {
12731
12731
  InputNumber.name = 'InputText';
12732
12732
  InputNumber.displayName = 'InputNumber';
12733
12733
 
12734
- const _excluded$h = ["className", "children", "onClick", "size", "icon", "isRemovable", "disabled", "type", "onRemove", "readOnly"];
12734
+ const _excluded$i = ["className", "children", "onClick", "size", "icon", "isRemovable", "disabled", "type", "onRemove", "readOnly"];
12735
12735
  const TagWrapper$4 = styled('div', {
12736
12736
  boxSizing: 'border-box',
12737
12737
  listStyle: 'none',
@@ -12835,7 +12835,7 @@ const Tag = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
12835
12835
  onRemove,
12836
12836
  readOnly
12837
12837
  } = _ref,
12838
- props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
12838
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
12839
12839
  return /*#__PURE__*/React__default.createElement(TagWrapper$4, _extends({
12840
12840
  ref: ref,
12841
12841
  onClick: onClick,
@@ -12873,7 +12873,7 @@ Tag.defaultProps = {
12873
12873
  readOnly: false
12874
12874
  };
12875
12875
 
12876
- const _excluded$g = ["size", "isInvalid", "placeholder", "onChange", "onEnter", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText", "unremovableTags", "onRemoveItem"];
12876
+ const _excluded$h = ["size", "isInvalid", "placeholder", "onChange", "onEnter", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText", "unremovableTags", "onRemoveItem"];
12877
12877
  const Wrapper$2 = styled('div', {
12878
12878
  margin: 0,
12879
12879
  flexDirection: 'column',
@@ -12995,7 +12995,7 @@ function TagsInput(_ref) {
12995
12995
  unremovableTags,
12996
12996
  onRemoveItem
12997
12997
  } = _ref,
12998
- props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
12998
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
12999
12999
  const [tags, setTags] = React__default.useState(value);
13000
13000
  const [regexError, setRegexError] = React__default.useState(false);
13001
13001
  React__default.useEffect(() => {
@@ -13117,8 +13117,8 @@ TagsInput.defaultProps = {
13117
13117
  readOnly: false
13118
13118
  };
13119
13119
 
13120
- const _excluded$f = ["id", "defaultChecked", "dataOnLabel", "dataOffLabel", "disabled"];
13121
- const StyledThumb$1 = styled(SwitchPrimitive.Thumb, {
13120
+ const _excluded$g = ["id", "defaultChecked", "dataOnLabel", "dataOffLabel", "disabled"];
13121
+ const StyledThumb$2 = styled(SwitchPrimitive.Thumb, {
13122
13122
  display: 'block',
13123
13123
  width: '16px',
13124
13124
  height: '16px',
@@ -13132,7 +13132,7 @@ const StyledThumb$1 = styled(SwitchPrimitive.Thumb, {
13132
13132
  transform: 'translateX(36px)'
13133
13133
  }
13134
13134
  });
13135
- const StyledSwitch = styled(SwitchPrimitive.Root, {
13135
+ const StyledSwitch$1 = styled(SwitchPrimitive.Root, {
13136
13136
  all: 'unset',
13137
13137
  width: '56px',
13138
13138
  height: '24px',
@@ -13175,7 +13175,7 @@ const StyledSwitch = styled(SwitchPrimitive.Root, {
13175
13175
  '&::before': {
13176
13176
  color: '$textDisable'
13177
13177
  },
13178
- [`& ${StyledThumb$1}`]: {
13178
+ [`& ${StyledThumb$2}`]: {
13179
13179
  backgroundColor: '$iconDisable'
13180
13180
  }
13181
13181
  }
@@ -13188,14 +13188,14 @@ const InputSwitch = _ref => {
13188
13188
  dataOffLabel,
13189
13189
  disabled
13190
13190
  } = _ref,
13191
- props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
13192
- return /*#__PURE__*/React__default.createElement(StyledSwitch, _extends({
13191
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
13192
+ return /*#__PURE__*/React__default.createElement(StyledSwitch$1, _extends({
13193
13193
  defaultChecked: defaultChecked,
13194
13194
  dataOnLabel: dataOnLabel,
13195
13195
  dataOffLabel: dataOffLabel,
13196
13196
  disabled: disabled,
13197
13197
  id: id
13198
- }, props), /*#__PURE__*/React__default.createElement(StyledThumb$1, null));
13198
+ }, props), /*#__PURE__*/React__default.createElement(StyledThumb$2, null));
13199
13199
  };
13200
13200
  InputSwitch.propTypes = {
13201
13201
  id: PropTypes.string,
@@ -13208,6 +13208,135 @@ InputSwitch.propTypes = {
13208
13208
  };
13209
13209
  InputSwitch.displayName = 'InputSwitch';
13210
13210
 
13211
+ const _excluded$f = ["id", "defaultChecked", "dataOnLabel", "dataOffLabel", "disabled", "onImage", "offImage", "thumbAltOn", "thumbAltOff"];
13212
+ const StyledThumb$1 = styled(SwitchPrimitive.Thumb, {
13213
+ display: 'block',
13214
+ width: '16px',
13215
+ height: '16px',
13216
+ backgroundColor: 'white',
13217
+ boxShadow: '0px 1px 3px grey',
13218
+ borderRadius: '$round',
13219
+ transition: 'transform 100ms',
13220
+ transform: 'translateX(4px)',
13221
+ willChange: 'transform',
13222
+ cursor: 'pointer',
13223
+ position: 'relative',
13224
+ overflow: 'hidden',
13225
+ '&[data-state="checked"]': {
13226
+ transform: 'translateX(36px)'
13227
+ },
13228
+ 'img': {
13229
+ width: '100%',
13230
+ height: '100%',
13231
+ objectFit: 'contain',
13232
+ display: 'block'
13233
+ },
13234
+ '.on': {
13235
+ display: 'none'
13236
+ },
13237
+ '.off': {
13238
+ display: 'block'
13239
+ }
13240
+ });
13241
+ const StyledSwitch = styled(SwitchPrimitive.Root, {
13242
+ all: 'unset',
13243
+ width: '56px',
13244
+ height: '24px',
13245
+ backgroundColor: 'white',
13246
+ borderRadius: '9999px',
13247
+ border: '1px solid $gray150',
13248
+ position: 'relative',
13249
+ cursor: 'pointer',
13250
+ WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
13251
+ '&:focus': {
13252
+ outline: '1.5px solid $colors$borderFocus'
13253
+ },
13254
+ '&::before': {
13255
+ display: 'block',
13256
+ content: 'attr(dataOffLabel)',
13257
+ position: 'absolute',
13258
+ fontWeight: 600,
13259
+ fontSize: '$label',
13260
+ lineHeight: '$label',
13261
+ letterSpacing: '$label',
13262
+ color: '$textPrimary',
13263
+ right: '$spacing-03'
13264
+ },
13265
+ '&[data-state="checked"]': {
13266
+ '&::before': {
13267
+ display: 'block',
13268
+ content: 'attr(dataOnLabel)',
13269
+ position: 'absolute',
13270
+ fontWeight: 600,
13271
+ fontSize: '$label',
13272
+ lineHeight: '$label',
13273
+ letterSpacing: '$label',
13274
+ color: '$textPrimary',
13275
+ left: '$spacing-03'
13276
+ },
13277
+ [`& ${StyledThumb$1}`]: {
13278
+ '.on': {
13279
+ display: 'block'
13280
+ },
13281
+ '.off': {
13282
+ display: 'none'
13283
+ }
13284
+ }
13285
+ },
13286
+ '&:disabled': {
13287
+ backgroundColor: '$gray200',
13288
+ '&::before': {
13289
+ color: '$textDisable'
13290
+ },
13291
+ [`& ${StyledThumb$1}`]: {
13292
+ backgroundColor: '$iconDisable'
13293
+ }
13294
+ }
13295
+ });
13296
+ const InputSwitchWithImage = _ref => {
13297
+ let {
13298
+ id,
13299
+ defaultChecked,
13300
+ dataOnLabel,
13301
+ dataOffLabel,
13302
+ disabled,
13303
+ onImage,
13304
+ offImage,
13305
+ thumbAltOn,
13306
+ thumbAltOff
13307
+ } = _ref,
13308
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
13309
+ return /*#__PURE__*/React__default.createElement(StyledSwitch, _extends({
13310
+ defaultChecked: defaultChecked,
13311
+ dataOnLabel: dataOnLabel,
13312
+ dataOffLabel: dataOffLabel,
13313
+ disabled: disabled,
13314
+ id: id
13315
+ }, props), /*#__PURE__*/React__default.createElement(StyledThumb$1, null, onImage && /*#__PURE__*/React__default.createElement("img", {
13316
+ src: onImage,
13317
+ alt: thumbAltOn,
13318
+ className: "on"
13319
+ }), offImage && /*#__PURE__*/React__default.createElement("img", {
13320
+ src: offImage,
13321
+ alt: thumbAltOff,
13322
+ className: "off"
13323
+ })));
13324
+ };
13325
+ InputSwitchWithImage.propTypes = {
13326
+ id: PropTypes.string,
13327
+ disabled: PropTypes.bool,
13328
+ dataOnLabel: PropTypes.string,
13329
+ dataOffLabel: PropTypes.string,
13330
+ defaultChecked: PropTypes.bool,
13331
+ checked: PropTypes.bool,
13332
+ onCheckedChange: PropTypes.func,
13333
+ onImage: PropTypes.string,
13334
+ offImage: PropTypes.string,
13335
+ thumbAltOn: PropTypes.string,
13336
+ thumbAltOff: PropTypes.string
13337
+ };
13338
+ InputSwitchWithImage.displayName = 'InputSwitchWithImage';
13339
+
13211
13340
  const SvgCloseFilled = props => /*#__PURE__*/React.createElement("svg", _extends({
13212
13341
  width: props.size,
13213
13342
  height: props.size,
@@ -56691,4 +56820,4 @@ const useToggle = initialValue => {
56691
56820
  return useReducer(toggleReducer, initialValue);
56692
56821
  };
56693
56822
 
56694
- export { ADVANCE_PICKER, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvancedOption, AlertDialog, AlertDialogCancel, AlertDialogConfirm, AlertDialogContent, AlertDialogDescription, AlertDialogFunction, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, Avatar, BOTTOM_LEFT_POSITION, BOTTOM_RIGHT_POSITION, Badge, Banner, BannerClose, BannerDescription, BannerLink, BannerTitle, BarChartComponent as BarChart, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$4 as Button, ButtonDropdown, ButtonGroup$1 as ButtonGroup, ButtonGroupItem, ButtonPrimitive, Card, CardComponent, CardLineColor, Cell, CheckboxGroup, CheckboxTable, ColorPicker_default as ColorPicker, Colors$1 as Colors, ContentEditor, ContextMenu, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, CustomDatePicker, DATE_RANGE_PICKER, DEFAULT, DateColumn, DatePicker, DatePickerMulti, DecimalColumn, Device as DevicePreview, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EditableTable, Flex$1 as Flex, FormGroup, FormHelper, FormLabel, Grid, GridItem, Heading, IconButton, IconContainer, Image, ImageDevicePreview, Input$7 as Input, InputCheckbox, InputColorPicker, InputCombobox, InputCounter, InputCreatable, InputDatePicker, InputDateRange, InputGroup, InputLeftAddon, InputLeftElement, InputMapPicker, InputNumber, InputOTP, InputPrefix, InputRadio, InputRadioGroup, InputResourceList, InputRightAddon, InputRightElement, InputSearchbox, InputSelect, InputSelectCheck, InputSelectTag, InputSignature, InputSuffix, InputSwitch, TagsInput as InputTags, InputText, InputTextArea, InputTimePicker, LAST_30_DAYS, LAST_7_DAYS, LAST_MONTH, LAST_TWO_MONTHS, LAST_WEEK, LineChart, Link, LoadingBar, MONTHLY, MajooProvider, MapPicker, MemoizedEditableTable, MobileTable, ModalDialog, ModalDialogContent, ModalDialogFooter, ModalDialogTitle, ModalDialogTrigger, NEXT_MONTH, NEXT_WEEK, NativeTimePicker, NotificationBadge, OptionWrapper$2 as OptionWrapper, PREV_MONTH, PREV_WEEK, PageContainer, PageDialog, PageDialogContent, PageDialogFooter, PageDialogTitle, PageDialogTrigger, Pagination, Paper, PaperComponent, Paragraph, PieChartComponent as PieChart, Popover, PopoverClose, PopoverContent, PopoverTrigger, PriceColumn, Progress$1 as Progress, ProgressIndicator, RANGE_CONTROL, RANGE_MONTH, RANGE_PICKER, RANGE_WEEK, ResendOTP, RightSlot, rowExpanderColumn as RowExpanderColumn, rowExpanderMultipleColumn as RowExpanderMultipleColumn, rowMenuColumn as RowMenuColumn, rowSelectionColumn as RowSelectionColumn, rowSelectionWithCallbackColumn as RowSelectionWithCallbackColumn, SINGLE_PICKER, ScrollSync, ScrollSyncNode, SelectBox, SelectContainer, SelectItem, SelectOption, Separator$2 as Separator, Skeleton, Slider, StepWizard, StepWizardContext, StyledBox, StyledDropdown, StyledInput$1 as StyledInput, StyledSpan, StyledTitle$2 as StyledTitle, THIS_MONTH, THIS_WEEK, TODAY, TOP_LEFT_POSITION, TOP_RIGHT_POSITION, Table, TableBody$3 as TableBody, TableCell$3 as TableCell, TableColumn, TableContent$3 as TableContent, TableFoot$2 as TableFoot, TableFootCell$2 as TableFootCell, TableFootRow$2 as TableFootRow, TableHead$3 as TableHead, TableHeadCellContent, TableHeaderCellContainer, TableOfContent, TableOfContentPage, TableRow$3 as TableRow, Tabs$1 as Tabs, TabsContent$1 as TabsContent, TabsList$1 as TabsList, TabsTrigger$1 as TabsTrigger, Tag, TagList, TagStatus, Text$1 as Text, TextVariantsEnum, TimePicker, ToastContext, ToastProvider, Tooltip$1 as Tooltip, UPDATE_PICKER, Upload, WEEKLY, YESTERDAY, addOnCellStyle, advancePickerDate, advancePickerOptionsEn, advancePickerOptionsId, defaultEmptyDataProps, defaultFetchDataParams, pickerReducer, useListOption, useToggle };
56823
+ export { ADVANCE_PICKER, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvancedOption, AlertDialog, AlertDialogCancel, AlertDialogConfirm, AlertDialogContent, AlertDialogDescription, AlertDialogFunction, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, Avatar, BOTTOM_LEFT_POSITION, BOTTOM_RIGHT_POSITION, Badge, Banner, BannerClose, BannerDescription, BannerLink, BannerTitle, BarChartComponent as BarChart, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$4 as Button, ButtonDropdown, ButtonGroup$1 as ButtonGroup, ButtonGroupItem, ButtonPrimitive, Card, CardComponent, CardLineColor, Cell, CheckboxGroup, CheckboxTable, ColorPicker_default as ColorPicker, Colors$1 as Colors, ContentEditor, ContextMenu, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, CustomDatePicker, DATE_RANGE_PICKER, DEFAULT, DateColumn, DatePicker, DatePickerMulti, DecimalColumn, Device as DevicePreview, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EditableTable, Flex$1 as Flex, FormGroup, FormHelper, FormLabel, Grid, GridItem, Heading, IconButton, IconContainer, Image, ImageDevicePreview, Input$7 as Input, InputCheckbox, InputColorPicker, InputCombobox, InputCounter, InputCreatable, InputDatePicker, InputDateRange, InputGroup, InputLeftAddon, InputLeftElement, InputMapPicker, InputNumber, InputOTP, InputPrefix, InputRadio, InputRadioGroup, InputResourceList, InputRightAddon, InputRightElement, InputSearchbox, InputSelect, InputSelectCheck, InputSelectTag, InputSignature, InputSuffix, InputSwitch, InputSwitchWithImage, TagsInput as InputTags, InputText, InputTextArea, InputTimePicker, LAST_30_DAYS, LAST_7_DAYS, LAST_MONTH, LAST_TWO_MONTHS, LAST_WEEK, LineChart, Link, LoadingBar, MONTHLY, MajooProvider, MapPicker, MemoizedEditableTable, MobileTable, ModalDialog, ModalDialogContent, ModalDialogFooter, ModalDialogTitle, ModalDialogTrigger, NEXT_MONTH, NEXT_WEEK, NativeTimePicker, NotificationBadge, OptionWrapper$2 as OptionWrapper, PREV_MONTH, PREV_WEEK, PageContainer, PageDialog, PageDialogContent, PageDialogFooter, PageDialogTitle, PageDialogTrigger, Pagination, Paper, PaperComponent, Paragraph, PieChartComponent as PieChart, Popover, PopoverClose, PopoverContent, PopoverTrigger, PriceColumn, Progress$1 as Progress, ProgressIndicator, RANGE_CONTROL, RANGE_MONTH, RANGE_PICKER, RANGE_WEEK, ResendOTP, RightSlot, rowExpanderColumn as RowExpanderColumn, rowExpanderMultipleColumn as RowExpanderMultipleColumn, rowMenuColumn as RowMenuColumn, rowSelectionColumn as RowSelectionColumn, rowSelectionWithCallbackColumn as RowSelectionWithCallbackColumn, SINGLE_PICKER, ScrollSync, ScrollSyncNode, SelectBox, SelectContainer, SelectItem, SelectOption, Separator$2 as Separator, Skeleton, Slider, StepWizard, StepWizardContext, StyledBox, StyledDropdown, StyledInput$1 as StyledInput, StyledSpan, StyledTitle$2 as StyledTitle, THIS_MONTH, THIS_WEEK, TODAY, TOP_LEFT_POSITION, TOP_RIGHT_POSITION, Table, TableBody$3 as TableBody, TableCell$3 as TableCell, TableColumn, TableContent$3 as TableContent, TableFoot$2 as TableFoot, TableFootCell$2 as TableFootCell, TableFootRow$2 as TableFootRow, TableHead$3 as TableHead, TableHeadCellContent, TableHeaderCellContainer, TableOfContent, TableOfContentPage, TableRow$3 as TableRow, Tabs$1 as Tabs, TabsContent$1 as TabsContent, TabsList$1 as TabsList, TabsTrigger$1 as TabsTrigger, Tag, TagList, TagStatus, Text$1 as Text, TextVariantsEnum, TimePicker, ToastContext, ToastProvider, Tooltip$1 as Tooltip, UPDATE_PICKER, Upload, WEEKLY, YESTERDAY, addOnCellStyle, advancePickerDate, advancePickerOptionsEn, advancePickerOptionsId, defaultEmptyDataProps, defaultFetchDataParams, pickerReducer, useListOption, useToggle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.62.0",
3
+ "version": "1.62.1",
4
4
  "main": "./index.esm.js",
5
5
  "exports": {
6
6
  ".": {
@@ -12,6 +12,7 @@ export * from './InputElement';
12
12
  export * from './InputNumber';
13
13
  export { default as InputTags } from './InputTags/InputTags';
14
14
  export { default as InputSwitch } from './InputSwitch/InputSwitch';
15
+ export { default as InputSwitchWithImage } from './InputSwitch/InputSwitchWithImage';
15
16
  export { default as InputSearchbox } from './InputSearchbox/InputSearchbox';
16
17
  export { default as InputSelect } from './InputSelect/InputSelect';
17
18
  export * from './InputSelect';