@majoo-ui/react 1.49.3 → 1.50.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
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import React__default, { useState, createContext, useContext, useEffect, useRef, createElement as createElement$2, cloneElement, useCallback, useReducer } from 'react';
2
+ import React__default, { useState, createContext, useContext, useEffect, useRef, createElement as createElement$2, forwardRef, cloneElement, useCallback, useReducer } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { createStitches, styled as styled$1 } from '@stitches/react';
5
5
  import { foundations } from '@majoo-ui/core';
6
- import { CloseOutline, UserFilled, CircleQuestionOutline, SearchOutline, CloseFilled, CircleInfoOutline, CaretDownOutline, CirclePlusOutline, ChevronDownOutline, ChevronLeftOutline, ChevronRightOutline, ChevronUpOutline, TimeOutline, CalendarOutline, ArrowLeftOutline, ArrowRightOutline, EllipsisHorizontalOutline, EyeOutline, UploadOutline, ImageOutline, ChevronLgLeftOutline, ChevronUpDownOutline, CheckFilled, RemoveOutline, PlusOutline, MinusOutline, LocationOutline } from '@majoo-ui/icons';
6
+ import { CloseOutline, UserFilled, CircleQuestionOutline, SearchOutline, CloseFilled, CircleInfoOutline, CaretDownOutline, CirclePlusOutline, MinusOutline, PlusOutline, ChevronDownOutline, ChevronLeftOutline, ChevronRightOutline, ChevronUpOutline, TimeOutline, CalendarOutline, ArrowLeftOutline, ArrowRightOutline, EllipsisHorizontalOutline, EyeOutline, UploadOutline, ImageOutline, ChevronLgLeftOutline, ChevronUpDownOutline, CheckFilled, RemoveOutline, LocationOutline } from '@majoo-ui/icons';
7
7
  import { Transition } from 'react-transition-group';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
9
  import { Portal } from '@majoo-ui/helpers';
@@ -3564,7 +3564,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
3564
3564
  onClick: e => {
3565
3565
  e.preventDefault();
3566
3566
  e.stopPropagation();
3567
- value == null ? void 0 : value.onRemove();
3567
+ value === null || value === void 0 ? void 0 : value.onRemove();
3568
3568
  },
3569
3569
  __self: undefined,
3570
3570
  __source: {
@@ -3641,7 +3641,7 @@ const SingleTagBanner = props => {
3641
3641
  onClick: e => {
3642
3642
  e.preventDefault();
3643
3643
  e.stopPropagation();
3644
- props == null ? void 0 : props.onRemove();
3644
+ props === null || props === void 0 ? void 0 : props.onRemove();
3645
3645
  },
3646
3646
  closeCenter: !props.title && !props.link,
3647
3647
  __self: undefined,
@@ -3998,7 +3998,7 @@ const ButtonPrimitive = styled('button', {
3998
3998
  }
3999
3999
  }
4000
4000
  });
4001
- const Button$2 = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
4001
+ const Button$3 = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
4002
4002
  var {
4003
4003
  children,
4004
4004
  type,
@@ -5634,7 +5634,7 @@ const Checkbox = _ref => {
5634
5634
  const [isChecked, setChecked] = useState(false);
5635
5635
  useEffect(() => {
5636
5636
  const checkValue = context && context.checkedItems.includes(value) || checked || indeterminate;
5637
- setChecked(checkValue != null ? checkValue : false);
5637
+ setChecked(checkValue !== null && checkValue !== void 0 ? checkValue : false);
5638
5638
  }, [checked, indeterminate, context]);
5639
5639
  return /*#__PURE__*/React__default.createElement(StyledCheckbox, _extends({
5640
5640
  id: id,
@@ -6232,7 +6232,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
6232
6232
  var _jsxFileName$E = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputRadio\\InputRadioGroup.js";
6233
6233
  const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
6234
6234
  function InputRadioGroup(props) {
6235
- return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6235
+ return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6236
6236
  value: props,
6237
6237
  __self: this,
6238
6238
  __source: {
@@ -6247,7 +6247,7 @@ function InputRadioGroup(props) {
6247
6247
  lineNumber: 14,
6248
6248
  columnNumber: 9
6249
6249
  }
6250
- }), React__default.Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6250
+ }), React__default.Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6251
6251
  style: Object.assign({}, child.props.style, {
6252
6252
  opacity: 1
6253
6253
  })
@@ -6438,7 +6438,7 @@ const InputRadio = _ref => {
6438
6438
  value,
6439
6439
  outlined
6440
6440
  }) => {
6441
- const checked = value != null ? value : defaultValue;
6441
+ const checked = value !== null && value !== void 0 ? value : defaultValue;
6442
6442
  return /*#__PURE__*/React__default.createElement(Container$7, {
6443
6443
  align: "center",
6444
6444
  gap: 4,
@@ -7340,7 +7340,7 @@ Tag.defaultProps = {
7340
7340
  readOnly: false
7341
7341
  };
7342
7342
 
7343
- const _excluded$f = ["size", "isInvalid", "placeholder", "onChange", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText"];
7343
+ const _excluded$f = ["size", "isInvalid", "placeholder", "onChange", "onEnter", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText"];
7344
7344
  var _jsxFileName$A = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputTags\\InputTags.js";
7345
7345
  const Wrapper$2 = styled('div', {
7346
7346
  margin: 0,
@@ -7414,7 +7414,7 @@ const InputTagsComponent = styled('div', {
7414
7414
  }
7415
7415
  }
7416
7416
  });
7417
- const Input$7 = styled('input', {
7417
+ const Input$8 = styled('input', {
7418
7418
  display: 'flex',
7419
7419
  position: 'relative',
7420
7420
  flex: 'auto',
@@ -7451,6 +7451,7 @@ function TagsInput(_ref) {
7451
7451
  isInvalid,
7452
7452
  placeholder,
7453
7453
  onChange,
7454
+ onEnter,
7454
7455
  onInputChange,
7455
7456
  value,
7456
7457
  disabled,
@@ -7474,19 +7475,31 @@ function TagsInput(_ref) {
7474
7475
  const addTags = event => {
7475
7476
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
7476
7477
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
7478
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7479
+ key: 'duplicate',
7480
+ value: event.target.value
7481
+ });
7477
7482
  return;
7478
7483
  }
7479
7484
 
7480
- if (pattern && pattern != null && pattern.regex) {
7485
+ if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
7481
7486
  const regex = new RegExp(pattern.regex);
7482
7487
 
7483
7488
  if (!regex.test(event.target.value)) {
7489
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7490
+ key: 'error',
7491
+ value: event.target.value
7492
+ });
7484
7493
  setRegexError(true);
7485
7494
  return;
7486
7495
  }
7487
7496
  }
7488
7497
 
7489
7498
  setRegexError(false);
7499
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7500
+ key: 'success',
7501
+ value: event.target.value
7502
+ });
7490
7503
  setTags([...tags, event.target.value]);
7491
7504
  event.target.value = '';
7492
7505
  }
@@ -7512,7 +7525,7 @@ function TagsInput(_ref) {
7512
7525
  __self: this,
7513
7526
  __source: {
7514
7527
  fileName: _jsxFileName$A,
7515
- lineNumber: 164,
7528
+ lineNumber: 168,
7516
7529
  columnNumber: 5
7517
7530
  }
7518
7531
  }, /*#__PURE__*/React__default.createElement(InputTagsComponent, _extends({
@@ -7525,10 +7538,10 @@ function TagsInput(_ref) {
7525
7538
  __self: this,
7526
7539
  __source: {
7527
7540
  fileName: _jsxFileName$A,
7528
- lineNumber: 165,
7541
+ lineNumber: 169,
7529
7542
  columnNumber: 7
7530
7543
  }
7531
- }), /*#__PURE__*/React__default.createElement(Input$7, {
7544
+ }), /*#__PURE__*/React__default.createElement(Input$8, {
7532
7545
  type: "text",
7533
7546
  onKeyUp: event => addTags(event) // onKeyDown={event => removeTags(tags.length - 1, event.key)}
7534
7547
  ,
@@ -7540,15 +7553,15 @@ function TagsInput(_ref) {
7540
7553
  __self: this,
7541
7554
  __source: {
7542
7555
  fileName: _jsxFileName$A,
7543
- lineNumber: 173,
7556
+ lineNumber: 177,
7544
7557
  columnNumber: 9
7545
7558
  }
7546
- })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
7559
+ })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
7547
7560
  color: "red",
7548
7561
  __self: this,
7549
7562
  __source: {
7550
7563
  fileName: _jsxFileName$A,
7551
- lineNumber: 187,
7564
+ lineNumber: 191,
7552
7565
  columnNumber: 11
7553
7566
  }
7554
7567
  }, pattern.errorMessage) : /*#__PURE__*/React__default.createElement(FormHelper, {
@@ -7556,7 +7569,7 @@ function TagsInput(_ref) {
7556
7569
  __self: this,
7557
7570
  __source: {
7558
7571
  fileName: _jsxFileName$A,
7559
- lineNumber: 189,
7572
+ lineNumber: 193,
7560
7573
  columnNumber: 11
7561
7574
  }
7562
7575
  }, "Invalid Input")), helperText && /*#__PURE__*/React__default.createElement(Paragraph, {
@@ -7570,14 +7583,14 @@ function TagsInput(_ref) {
7570
7583
  __self: this,
7571
7584
  __source: {
7572
7585
  fileName: _jsxFileName$A,
7573
- lineNumber: 193,
7586
+ lineNumber: 197,
7574
7587
  columnNumber: 9
7575
7588
  }
7576
7589
  }, helperText), /*#__PURE__*/React__default.createElement(TagWrapper$2, {
7577
7590
  __self: this,
7578
7591
  __source: {
7579
7592
  fileName: _jsxFileName$A,
7580
- lineNumber: 197,
7593
+ lineNumber: 201,
7581
7594
  columnNumber: 7
7582
7595
  }
7583
7596
  }, tags.map((tag, index) => /*#__PURE__*/React__default.createElement(Tag, {
@@ -7590,7 +7603,7 @@ function TagsInput(_ref) {
7590
7603
  __self: this,
7591
7604
  __source: {
7592
7605
  fileName: _jsxFileName$A,
7593
- lineNumber: 199,
7606
+ lineNumber: 203,
7594
7607
  columnNumber: 11
7595
7608
  }
7596
7609
  }, tag))));
@@ -7600,6 +7613,7 @@ TagsInput.propTypes = {
7600
7613
  size: PropTypes.string,
7601
7614
  value: PropTypes.arrayOf(PropTypes.string),
7602
7615
  onChange: PropTypes.arrayOf(PropTypes.string),
7616
+ onEnter: PropTypes.func,
7603
7617
  onInputChange: PropTypes.func,
7604
7618
  max: PropTypes.number,
7605
7619
  maxChar: PropTypes.number,
@@ -8166,7 +8180,7 @@ const SelectBox = styled(Flex$1, {
8166
8180
  }
8167
8181
  }
8168
8182
  });
8169
- const Button$1 = styled('button', {
8183
+ const Button$2 = styled('button', {
8170
8184
  display: 'flex',
8171
8185
  width: '100%',
8172
8186
  height: '100%',
@@ -8198,7 +8212,7 @@ const Button$1 = styled('button', {
8198
8212
  }
8199
8213
  }
8200
8214
  });
8201
- const Input$6 = styled('input', {
8215
+ const Input$7 = styled('input', {
8202
8216
  marginLeft: '$spacing-05',
8203
8217
  display: 'flex',
8204
8218
  width: '100%',
@@ -8330,7 +8344,7 @@ const SelectInputSearch = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
8330
8344
  width: '$spacing-05',
8331
8345
  padding: 0
8332
8346
  } : undefined
8333
- }, void 0), jsx(Input$6, Object.assign({}, inputProps, props, {
8347
+ }, void 0), jsx(Input$7, Object.assign({}, inputProps, props, {
8334
8348
  placeholder: placeholder,
8335
8349
  readOnly: readOnly,
8336
8350
  isReadOnly: readOnly,
@@ -8535,7 +8549,7 @@ function InputSelect(_a) {
8535
8549
  disabled: disabled || readOnly
8536
8550
  }).onClick : undefined
8537
8551
  }, void 0)
8538
- }), void 0) : jsx(Button$1, Object.assign({}, getToggleButtonProps({
8552
+ }), void 0) : jsx(Button$2, Object.assign({}, getToggleButtonProps({
8539
8553
  disabled: disabled || readOnly
8540
8554
  }), {
8541
8555
  disabled: disabled,
@@ -9105,7 +9119,7 @@ const InputWrapper$1 = styled('div', {
9105
9119
  }
9106
9120
  }
9107
9121
  });
9108
- const Input$5 = styled('input', {
9122
+ const Input$6 = styled('input', {
9109
9123
  width: '100%',
9110
9124
  textAlign: 'left',
9111
9125
  background: 'unset',
@@ -9114,9 +9128,16 @@ const Input$5 = styled('input', {
9114
9128
  cursor: 'text',
9115
9129
  '&:disabled': {
9116
9130
  cursor: 'not-allowed'
9131
+ },
9132
+ variants: {
9133
+ hiddden: {
9134
+ true: {
9135
+ display: 'none'
9136
+ }
9137
+ }
9117
9138
  }
9118
9139
  });
9119
- const Button = styled('button', {
9140
+ const Button$1 = styled('button', {
9120
9141
  background: 'none',
9121
9142
  outline: 'none',
9122
9143
  border: 'none',
@@ -9126,6 +9147,13 @@ const Button = styled('button', {
9126
9147
  textAlign: 'left',
9127
9148
  '&:disabled': {
9128
9149
  cursor: 'not-allowed'
9150
+ },
9151
+ variants: {
9152
+ hiddden: {
9153
+ true: {
9154
+ display: 'none'
9155
+ }
9156
+ }
9129
9157
  }
9130
9158
  });
9131
9159
  const IconWrapper = styled('div', {
@@ -9218,7 +9246,7 @@ const StyledDiv$1 = styled('div', {
9218
9246
  color: '$textDisable',
9219
9247
  display: 'inline-flex'
9220
9248
  });
9221
- function InputSelectCheck(_ref) {
9249
+ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9222
9250
  let {
9223
9251
  placeholder,
9224
9252
  option,
@@ -9240,12 +9268,15 @@ function InputSelectCheck(_ref) {
9240
9268
  } = _ref,
9241
9269
  props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
9242
9270
 
9243
- const [initItem, setInitItem] = React.useState(option); //init filter selectedItems on useMultipleSelection
9271
+ const [initItem, setInitItem] = React__default.useState(option); //init filter selectedItems on useMultipleSelection
9244
9272
 
9245
- const [item, setItem] = React.useState(option);
9246
- const [selectedValue, setSelectedValue] = React.useState(value);
9247
- const [inputValue, setInputValue] = React.useState('');
9248
- const sortItem = React.useCallback(() => {
9273
+ const [item, setItem] = React__default.useState([]);
9274
+ const [selectedValue, setSelectedValue] = React__default.useState([]);
9275
+ const [inputValue, setInputValue] = React__default.useState('');
9276
+ useEffect(() => {
9277
+ setItem(option);
9278
+ }, [option]);
9279
+ const sortItem = React__default.useCallback(() => {
9249
9280
  if (sortBy === 'id') {
9250
9281
  option.sort(function (a, b) {
9251
9282
  const idA = a.id.toUpperCase(); // ignore upper and lowercase
@@ -9302,27 +9333,24 @@ function InputSelectCheck(_ref) {
9302
9333
  return [...res, ...filterOption]; // add the missing elements
9303
9334
  }
9304
9335
  }, []) : option;
9305
- React.useEffect(() => {
9336
+ React__default.useEffect(() => {
9306
9337
  if (selectedValue.length > 0 && disabledOptions.length === 0) {
9307
9338
  setInitItem(sortValue);
9308
9339
  setItem(sortValue);
9309
9340
  }
9310
9341
  }, []);
9311
- React.useEffect(() => {
9342
+ React__default.useEffect(() => {
9312
9343
  sortItem();
9313
9344
  }, [sortBy]);
9314
- React.useEffect(() => {
9345
+ React__default.useEffect(() => {
9315
9346
  if (disabledOptions.length > 0) {
9316
9347
  setInitItem(generateOptions(sortDisabled));
9317
9348
  setItem(generateOptions(sortDisabled)); // setItem(generateOptions(option));
9318
9349
  }
9319
9350
  }, [disabledOptions]);
9320
- React.useEffect(() => {
9351
+ React__default.useEffect(() => {
9321
9352
  setSelectedValue(value);
9322
9353
  }, [value]);
9323
- React.useEffect(() => {
9324
- onChange && onChange(selectedValue);
9325
- }, [selectedValue]);
9326
9354
  const {
9327
9355
  getSelectedItemProps,
9328
9356
  getDropdownProps,
@@ -9373,6 +9401,7 @@ function InputSelectCheck(_ref) {
9373
9401
  let filterItems = selectedValue.filter(item => item !== selected.id);
9374
9402
  removeSelectedItem(selected);
9375
9403
  setSelectedValue(filterItems);
9404
+ onChange === null || onChange === void 0 ? void 0 : onChange(filterItems);
9376
9405
  }
9377
9406
  };
9378
9407
 
@@ -9384,7 +9413,6 @@ function InputSelectCheck(_ref) {
9384
9413
  getItemProps,
9385
9414
  selectItem,
9386
9415
  openMenu,
9387
- closeMenu,
9388
9416
  highlightedIndex,
9389
9417
  isOpen
9390
9418
  } = useCombobox({
@@ -9417,6 +9445,7 @@ function InputSelectCheck(_ref) {
9417
9445
  openMenu();
9418
9446
  addSelectedItem(selectedItem);
9419
9447
  setSelectedValue([...selectedValue, selectedItem.id]);
9448
+ onChange === null || onChange === void 0 ? void 0 : onChange([...selectedValue, selectedItem.id]);
9420
9449
  selectItem(null);
9421
9450
  }
9422
9451
  }
@@ -9427,100 +9456,110 @@ function InputSelectCheck(_ref) {
9427
9456
  }
9428
9457
  }
9429
9458
  });
9430
- return /*#__PURE__*/React.createElement(Wrapper$1, _extends({
9459
+ return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
9431
9460
  css: css
9432
9461
  }, props, {
9433
- __self: this,
9462
+ __self: undefined,
9434
9463
  __source: {
9435
9464
  fileName: _jsxFileName$u,
9436
- lineNumber: 402,
9437
- columnNumber: 5
9465
+ lineNumber: 421,
9466
+ columnNumber: 7
9438
9467
  }
9439
- }), /*#__PURE__*/React.createElement(Select, {
9468
+ }), /*#__PURE__*/React__default.createElement(Select, {
9440
9469
  size: size,
9441
9470
  disabled: disabled || readOnly,
9442
9471
  isInvalid: isInvalid,
9443
- __self: this,
9472
+ __self: undefined,
9444
9473
  __source: {
9445
9474
  fileName: _jsxFileName$u,
9446
- lineNumber: 403,
9447
- columnNumber: 7
9475
+ lineNumber: 422,
9476
+ columnNumber: 9
9448
9477
  }
9449
- }, /*#__PURE__*/React.createElement(InputWrapper$1, _extends({}, getComboboxProps(getDropdownProps({
9478
+ }, /*#__PURE__*/React__default.createElement(InputWrapper$1, _extends({}, getComboboxProps(getDropdownProps({
9450
9479
  preventKeyAction: isOpen,
9451
9480
  disabled: disabled || readOnly
9452
- })), {
9481
+ }, {
9482
+ suppressRefError: true
9483
+ }), {
9484
+ suppressRefError: true
9485
+ }), {
9453
9486
  disabled: disabled || readOnly,
9454
- __self: this,
9487
+ __self: undefined,
9455
9488
  __source: {
9456
9489
  fileName: _jsxFileName$u,
9457
- lineNumber: 404,
9458
- columnNumber: 9
9490
+ lineNumber: 423,
9491
+ columnNumber: 11
9459
9492
  }
9460
- }), search ? /*#__PURE__*/React.createElement(Input$5, _extends({}, getInputProps({
9461
- disabled: disabled || readOnly
9493
+ }), /*#__PURE__*/React__default.createElement(Input$6, _extends({}, getInputProps({
9494
+ disabled: disabled || readOnly,
9495
+ refKey: 'ref',
9496
+ ref
9497
+ }, {
9498
+ suppressRefError: true
9462
9499
  }), {
9463
9500
  placeholder: placeholder,
9464
9501
  disabled: disabled || readOnly,
9465
- __self: this,
9502
+ hiddden: !search,
9503
+ __self: undefined,
9466
9504
  __source: {
9467
9505
  fileName: _jsxFileName$u,
9468
- lineNumber: 409,
9506
+ lineNumber: 433,
9469
9507
  columnNumber: 13
9470
9508
  }
9471
- })) : /*#__PURE__*/React.createElement(Button, _extends({}, getToggleButtonProps({
9509
+ })), /*#__PURE__*/React__default.createElement(Button$1, _extends({}, getToggleButtonProps({
9472
9510
  disabled: disabled || readOnly
9473
9511
  }), {
9474
9512
  disabled: disabled || readOnly,
9475
9513
  size: size,
9476
9514
  type: "button",
9477
- __self: this,
9515
+ hiddden: search,
9516
+ __self: undefined,
9478
9517
  __source: {
9479
9518
  fileName: _jsxFileName$u,
9480
- lineNumber: 415,
9519
+ lineNumber: 439,
9481
9520
  columnNumber: 13
9482
9521
  }
9483
- }), placeholder)), /*#__PURE__*/React.createElement(IconWrapper, _extends({}, getToggleButtonProps({
9522
+ }), placeholder)), /*#__PURE__*/React__default.createElement(IconWrapper, _extends({}, getToggleButtonProps({
9484
9523
  disabled: disabled || readOnly
9485
9524
  }), {
9486
9525
  disabled: disabled,
9487
9526
  readOnly: readOnly,
9488
- __self: this,
9527
+ __self: undefined,
9489
9528
  __source: {
9490
9529
  fileName: _jsxFileName$u,
9491
- lineNumber: 425,
9492
- columnNumber: 9
9530
+ lineNumber: 449,
9531
+ columnNumber: 11
9493
9532
  }
9494
- }), /*#__PURE__*/React.createElement(IconCaretDown, {
9533
+ }), /*#__PURE__*/React__default.createElement(IconCaretDown, {
9495
9534
  color: disabled || readOnly ? colors$4.iconDisable : colors$4.iconPrimary,
9496
- __self: this,
9535
+ __self: undefined,
9497
9536
  __source: {
9498
9537
  fileName: _jsxFileName$u,
9499
- lineNumber: 430,
9500
- columnNumber: 11
9538
+ lineNumber: 454,
9539
+ columnNumber: 13
9501
9540
  }
9502
- }))), helperText && /*#__PURE__*/React.createElement(Paragraph, {
9541
+ }))), helperText && /*#__PURE__*/React__default.createElement(Paragraph, {
9503
9542
  shortContentRegular: true,
9504
9543
  css: {
9505
9544
  paddingTop: 8,
9506
9545
  fontSize: 12,
9507
9546
  color: '$textSecondary'
9508
9547
  },
9509
- __self: this,
9548
+ __self: undefined,
9510
9549
  __source: {
9511
9550
  fileName: _jsxFileName$u,
9512
- lineNumber: 434,
9513
- columnNumber: 9
9551
+ lineNumber: 458,
9552
+ columnNumber: 11
9514
9553
  }
9515
- }, helperText), showSelectedTag && selectedItems.length !== 0 && /*#__PURE__*/React.createElement(TagWrapper$1, {
9554
+ }, helperText), showSelectedTag && selectedItems.length !== 0 && /*#__PURE__*/React__default.createElement(TagWrapper$1, {
9516
9555
  disabled: disabled,
9517
- __self: this,
9556
+ __self: undefined,
9518
9557
  __source: {
9519
9558
  fileName: _jsxFileName$u,
9520
- lineNumber: 439,
9521
- columnNumber: 9
9559
+ lineNumber: 463,
9560
+ columnNumber: 11
9522
9561
  }
9523
- }, selectedItems.map((selectedItem, index) => /*#__PURE__*/React.createElement(Tag, _extends({
9562
+ }, selectedItems.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
9524
9563
  isRemovable: readOnly || disabled ? false : true,
9525
9564
  disabled: disabled,
9526
9565
  size: "lg",
@@ -9538,32 +9577,34 @@ function InputSelectCheck(_ref) {
9538
9577
  removeItem(selectedItem);
9539
9578
  }
9540
9579
  },
9541
- __self: this,
9580
+ __self: undefined,
9542
9581
  __source: {
9543
9582
  fileName: _jsxFileName$u,
9544
- lineNumber: 441,
9545
- columnNumber: 13
9583
+ lineNumber: 465,
9584
+ columnNumber: 15
9546
9585
  }
9547
- }), selectedItem.name))), /*#__PURE__*/React.createElement(OptionWrapper$1, {
9586
+ }), selectedItem.name))), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
9548
9587
  placement: placement,
9549
9588
  css: {
9550
9589
  display: isOpen && disabled === false ? 'block' : 'none',
9551
9590
  top: size === 'lg' ? '45px' : '35px'
9552
9591
  },
9553
- __self: this,
9592
+ __self: undefined,
9554
9593
  __source: {
9555
9594
  fileName: _jsxFileName$u,
9556
- lineNumber: 462,
9557
- columnNumber: 7
9595
+ lineNumber: 486,
9596
+ columnNumber: 9
9558
9597
  }
9559
- }, item.length !== 0 ? /*#__PURE__*/React.createElement(Option, _extends({}, getMenuProps(), {
9560
- __self: this,
9598
+ }, item.length !== 0 ? /*#__PURE__*/React__default.createElement(Option, _extends({}, getMenuProps({}, {
9599
+ suppressRefError: true
9600
+ }), {
9601
+ __self: undefined,
9561
9602
  __source: {
9562
9603
  fileName: _jsxFileName$u,
9563
- lineNumber: 467,
9564
- columnNumber: 11
9604
+ lineNumber: 491,
9605
+ columnNumber: 13
9565
9606
  }
9566
- }), isOpen && item.map((item, index) => /*#__PURE__*/React.createElement(ItemWrapper$1, _extends({
9607
+ }), isOpen && item.map((item, index) => /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
9567
9608
  key: item.id
9568
9609
  }, getItemProps({
9569
9610
  item,
@@ -9575,93 +9616,95 @@ function InputSelectCheck(_ref) {
9575
9616
  cursor: item.isDisabled ? 'not-allowed' : 'pointer',
9576
9617
  color: item.isDisabled ? '$textDisable' : 'textPrimary'
9577
9618
  },
9578
- __self: this,
9619
+ __self: undefined,
9579
9620
  __source: {
9580
9621
  fileName: _jsxFileName$u,
9581
- lineNumber: 470,
9582
- columnNumber: 17
9622
+ lineNumber: 494,
9623
+ columnNumber: 19
9583
9624
  }
9584
- }), /*#__PURE__*/React.createElement(IconWrapper, {
9625
+ }), /*#__PURE__*/React__default.createElement(IconWrapper, {
9585
9626
  css: {
9586
9627
  width: '16px',
9587
9628
  height: '16px',
9588
9629
  border: '1px solid $bgBorder',
9589
9630
  cursor: item.isDisabled ? 'not-allowed' : 'pointer'
9590
9631
  },
9591
- __self: this,
9632
+ __self: undefined,
9592
9633
  __source: {
9593
9634
  fileName: _jsxFileName$u,
9594
- lineNumber: 483,
9595
- columnNumber: 19
9635
+ lineNumber: 507,
9636
+ columnNumber: 21
9596
9637
  }
9597
- }, item.isDisabled ? /*#__PURE__*/React.createElement(CheckOutline, {
9638
+ }, item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
9598
9639
  color: colors$4.iconDisable,
9599
- __self: this,
9640
+ __self: undefined,
9600
9641
  __source: {
9601
9642
  fileName: _jsxFileName$u,
9602
- lineNumber: 492,
9603
- columnNumber: 23
9643
+ lineNumber: 516,
9644
+ columnNumber: 25
9604
9645
  }
9605
- }) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React.createElement(CheckOutline, {
9646
+ }) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default.createElement(CheckOutline, {
9606
9647
  color: colors$4.iconGreen,
9607
- __self: this,
9648
+ __self: undefined,
9608
9649
  __source: {
9609
9650
  fileName: _jsxFileName$u,
9610
- lineNumber: 496,
9611
- columnNumber: 25
9651
+ lineNumber: 520,
9652
+ columnNumber: 27
9612
9653
  }
9613
- })), /*#__PURE__*/React.createElement(Item$2, {
9654
+ })), /*#__PURE__*/React__default.createElement(Item$2, {
9614
9655
  css: {
9615
9656
  backgroundColor: 'unset'
9616
9657
  },
9617
- __self: this,
9658
+ __self: undefined,
9618
9659
  __source: {
9619
9660
  fileName: _jsxFileName$u,
9620
- lineNumber: 500,
9621
- columnNumber: 19
9661
+ lineNumber: 524,
9662
+ columnNumber: 21
9622
9663
  }
9623
- }, item.name)))) : /*#__PURE__*/React.createElement(Option, _extends({
9664
+ }, item.name)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
9624
9665
  css: {
9625
9666
  height: 'auto'
9626
9667
  }
9627
- }, getMenuProps(), {
9628
- __self: this,
9668
+ }, getMenuProps({}, {
9669
+ suppressRefError: true
9670
+ }), {
9671
+ __self: undefined,
9629
9672
  __source: {
9630
9673
  fileName: _jsxFileName$u,
9631
- lineNumber: 505,
9632
- columnNumber: 11
9674
+ lineNumber: 529,
9675
+ columnNumber: 13
9633
9676
  }
9634
- }), /*#__PURE__*/React.createElement(StyledDiv$1, {
9635
- __self: this,
9677
+ }), /*#__PURE__*/React__default.createElement(StyledDiv$1, {
9678
+ __self: undefined,
9636
9679
  __source: {
9637
9680
  fileName: _jsxFileName$u,
9638
- lineNumber: 506,
9639
- columnNumber: 13
9681
+ lineNumber: 530,
9682
+ columnNumber: 15
9640
9683
  }
9641
- }, /*#__PURE__*/React.createElement("div", {
9684
+ }, /*#__PURE__*/React__default.createElement("div", {
9642
9685
  style: {
9643
9686
  marginRight: '6px'
9644
9687
  },
9645
- __self: this,
9688
+ __self: undefined,
9646
9689
  __source: {
9647
9690
  fileName: _jsxFileName$u,
9648
- lineNumber: 507,
9649
- columnNumber: 15
9691
+ lineNumber: 531,
9692
+ columnNumber: 17
9650
9693
  }
9651
- }, /*#__PURE__*/React.createElement(CircleInfoOutline, {
9694
+ }, /*#__PURE__*/React__default.createElement(CircleInfoOutline, {
9652
9695
  size: "16px",
9653
9696
  color: colors$4.iconDisable,
9654
9697
  style: {
9655
9698
  verticalAlign: 'text-bottom'
9656
9699
  },
9657
- __self: this,
9700
+ __self: undefined,
9658
9701
  __source: {
9659
9702
  fileName: _jsxFileName$u,
9660
- lineNumber: 508,
9661
- columnNumber: 17
9703
+ lineNumber: 532,
9704
+ columnNumber: 19
9662
9705
  }
9663
9706
  })), textEmptyItem))));
9664
- }
9707
+ });
9665
9708
  InputSelectCheck.propTypes = {
9666
9709
  placeholder: PropTypes.string,
9667
9710
  option: PropTypes.array.isRequired,
@@ -9695,18 +9738,19 @@ InputSelectCheck.defaultProps = {
9695
9738
  };
9696
9739
 
9697
9740
  var _jsxFileName$t = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectTag\\InputSelectTag.js";
9698
- function InputSelectTag(props) {
9741
+ const InputSelectTag = /*#__PURE__*/React.forwardRef((props, ref) => {
9699
9742
  return /*#__PURE__*/React.createElement(InputSelectCheck, _extends({
9743
+ ref: ref,
9700
9744
  showSelectedTag: true
9701
9745
  }, props, {
9702
- __self: this,
9746
+ __self: undefined,
9703
9747
  __source: {
9704
9748
  fileName: _jsxFileName$t,
9705
9749
  lineNumber: 6,
9706
9750
  columnNumber: 10
9707
9751
  }
9708
9752
  }));
9709
- }
9753
+ });
9710
9754
  InputSelectTag.propTypes = {
9711
9755
  placeholder: PropTypes.string,
9712
9756
  option: PropTypes.array.isRequired,
@@ -9812,7 +9856,7 @@ const InputWrapper = styled('div', {
9812
9856
  }
9813
9857
  }
9814
9858
  });
9815
- const Input$4 = styled('input', {
9859
+ const Input$5 = styled('input', {
9816
9860
  display: 'flex',
9817
9861
  position: 'relative',
9818
9862
  flex: 'auto',
@@ -9924,7 +9968,7 @@ function InputCreatable({
9924
9968
  lineNumber: 168,
9925
9969
  columnNumber: 7
9926
9970
  }
9927
- }, /*#__PURE__*/React__default.createElement(Input$4, {
9971
+ }, /*#__PURE__*/React__default.createElement(Input$5, {
9928
9972
  type: "text",
9929
9973
  placeholder: placeholder,
9930
9974
  disabled: disabled,
@@ -10299,6 +10343,220 @@ ResendOTP.defaultProps = {
10299
10343
  timeInterval: 1000
10300
10344
  };
10301
10345
 
10346
+ // a string of all valid unicode whitespaces
10347
+ var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
10348
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
10349
+
10350
+ var uncurryThis$e = functionUncurryThis;
10351
+ var requireObjectCoercible$4 = requireObjectCoercible$a;
10352
+ var toString$9 = toString$h;
10353
+ var whitespaces$3 = whitespaces$4;
10354
+
10355
+ var replace$4 = uncurryThis$e(''.replace);
10356
+ var whitespace = '[' + whitespaces$3 + ']';
10357
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
10358
+ var rtrim = RegExp(whitespace + whitespace + '*$');
10359
+
10360
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
10361
+ var createMethod$1 = function (TYPE) {
10362
+ return function ($this) {
10363
+ var string = toString$9(requireObjectCoercible$4($this));
10364
+ if (TYPE & 1) string = replace$4(string, ltrim, '');
10365
+ if (TYPE & 2) string = replace$4(string, rtrim, '');
10366
+ return string;
10367
+ };
10368
+ };
10369
+
10370
+ var stringTrim = {
10371
+ // `String.prototype.{ trimLeft, trimStart }` methods
10372
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
10373
+ start: createMethod$1(1),
10374
+ // `String.prototype.{ trimRight, trimEnd }` methods
10375
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
10376
+ end: createMethod$1(2),
10377
+ // `String.prototype.trim` method
10378
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
10379
+ trim: createMethod$1(3)
10380
+ };
10381
+
10382
+ var global$k = global$U;
10383
+ var fails$8 = fails$t;
10384
+ var uncurryThis$d = functionUncurryThis;
10385
+ var toString$8 = toString$h;
10386
+ var trim$1 = stringTrim.trim;
10387
+ var whitespaces$2 = whitespaces$4;
10388
+
10389
+ var $parseInt$1 = global$k.parseInt;
10390
+ var Symbol$6 = global$k.Symbol;
10391
+ var ITERATOR$6 = Symbol$6 && Symbol$6.iterator;
10392
+ var hex = /^[+-]?0x/i;
10393
+ var exec$4 = uncurryThis$d(hex.exec);
10394
+ var FORCED$2 = $parseInt$1(whitespaces$2 + '08') !== 8 || $parseInt$1(whitespaces$2 + '0x16') !== 22
10395
+ // MS Edge 18- broken with boxed symbols
10396
+ || (ITERATOR$6 && !fails$8(function () { $parseInt$1(Object(ITERATOR$6)); }));
10397
+
10398
+ // `parseInt` method
10399
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
10400
+ var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
10401
+ var S = trim$1(toString$8(string));
10402
+ return $parseInt$1(S, (radix >>> 0) || (exec$4(hex, S) ? 16 : 10));
10403
+ } : $parseInt$1;
10404
+
10405
+ var $$d = _export;
10406
+ var $parseInt = numberParseInt;
10407
+
10408
+ // `parseInt` method
10409
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
10410
+ $$d({ global: true, forced: parseInt != $parseInt }, {
10411
+ parseInt: $parseInt
10412
+ });
10413
+
10414
+ const Input$4 = styled(InputNumber, {
10415
+ border: `1px solid $gray150`,
10416
+ borderLeft: 'none',
10417
+ borderRight: 'none',
10418
+ borderRadius: 0,
10419
+ textAlign: 'center',
10420
+ fontSize: 16,
10421
+ fontWeight: 600,
10422
+ color: '$textPrimary',
10423
+ userSelect: 'none',
10424
+ '&:disabled': {
10425
+ backgroundColor: '$btnDisable',
10426
+ border: `1px solid $gray150`,
10427
+ '&:hover': {
10428
+ borderColor: '$gray150'
10429
+ }
10430
+ }
10431
+ });
10432
+ const Button = styled(Button$3, {
10433
+ border: `1px solid $gray150 !important`,
10434
+ paddingRight: '16px !important',
10435
+ paddingLeft: '16px !important',
10436
+ '&:hover': {
10437
+ backgroundColor: '$primary50',
10438
+ border: '1px solid $btnPrimary !important'
10439
+ },
10440
+ '&:active': {
10441
+ backgroundColor: '$primary100',
10442
+ border: '1px solid $btnPrimary !important'
10443
+ },
10444
+ '&:focus': {
10445
+ outline: 0,
10446
+ backgroundColor: '$primary50',
10447
+ border: '1px solid $btnPrimary !important'
10448
+ },
10449
+ '&:disabled': {
10450
+ '&:hover': {
10451
+ borderColor: '$gray150 !important'
10452
+ }
10453
+ },
10454
+ variants: {
10455
+ counterType: {
10456
+ minus: {
10457
+ borderRight: 'none !important',
10458
+ borderTopRightRadius: '0px !important',
10459
+ borderBottomRightRadius: '0px !important',
10460
+ '&:disabled': {
10461
+ border: `1px solid $gray150 !important`
10462
+ }
10463
+ },
10464
+ plus: {
10465
+ borderLeft: 'none !important',
10466
+ borderTopLeftRadius: '0px !important',
10467
+ borderBottomLeftRadius: '0px !important',
10468
+ '&:disabled': {
10469
+ border: `1px solid $gray150 !important`
10470
+ }
10471
+ }
10472
+ }
10473
+ }
10474
+ });
10475
+ const InputCounter = /*#__PURE__*/forwardRef((props, ref) => {
10476
+ var _a;
10477
+
10478
+ const {
10479
+ css,
10480
+ value,
10481
+ onChange,
10482
+ allowNegative,
10483
+ min,
10484
+ max,
10485
+ disabled
10486
+ } = props;
10487
+ const [inputValue, setInputValue] = useState((_a = min !== null && min !== void 0 ? min : value) !== null && _a !== void 0 ? _a : 0);
10488
+ useEffect(() => {
10489
+ if (min && inputValue < min) {
10490
+ setInputValue(min);
10491
+ onChange === null || onChange === void 0 ? void 0 : onChange(min);
10492
+ }
10493
+
10494
+ if (max && inputValue > max) {
10495
+ setInputValue(max);
10496
+ onChange === null || onChange === void 0 ? void 0 : onChange(max);
10497
+ }
10498
+ }, [inputValue, min, max, onChange]);
10499
+
10500
+ function handleUp() {
10501
+ if (!max || inputValue < max) {
10502
+ setInputValue(inputValue + 1);
10503
+ onChange === null || onChange === void 0 ? void 0 : onChange(inputValue + 1);
10504
+ }
10505
+ }
10506
+
10507
+ function handleDown() {
10508
+ if (inputValue !== 0 || allowNegative) {
10509
+ if (!min || inputValue > min) {
10510
+ setInputValue(inputValue - 1);
10511
+ onChange === null || onChange === void 0 ? void 0 : onChange(inputValue - 1);
10512
+ }
10513
+ }
10514
+ }
10515
+
10516
+ function handleChange(e) {
10517
+ setInputValue(parseInt(e.target.value));
10518
+ onChange === null || onChange === void 0 ? void 0 : onChange(parseInt(e.target.value));
10519
+ }
10520
+
10521
+ return jsxs(Flex$1, Object.assign({
10522
+ direction: "row",
10523
+ align: "center",
10524
+ css: css
10525
+ }, {
10526
+ children: [jsx(Button, Object.assign({
10527
+ disabled: disabled,
10528
+ buttonType: "secondary",
10529
+ counterType: "minus",
10530
+ icon: true,
10531
+ onClick: handleDown
10532
+ }, {
10533
+ children: jsx(MinusOutline, {
10534
+ color: disabled ? colors$4.iconDisable : colors$4.primary500
10535
+ }, void 0)
10536
+ }), void 0), jsx(Input$4, {
10537
+ ref: ref,
10538
+ disabled: disabled,
10539
+ value: inputValue,
10540
+ allowNegative: allowNegative,
10541
+ onChange: handleChange
10542
+ }, void 0), jsx(Button, Object.assign({
10543
+ disabled: disabled,
10544
+ buttonType: "secondary",
10545
+ counterType: "plus",
10546
+ icon: true,
10547
+ onClick: handleUp
10548
+ }, {
10549
+ children: jsx(PlusOutline, {
10550
+ color: disabled ? colors$4.iconDisable : colors$4.primary500
10551
+ }, void 0)
10552
+ }), void 0)]
10553
+ }), void 0);
10554
+ });
10555
+ InputCounter.defaultProps = {
10556
+ allowNegative: false,
10557
+ disabled: false
10558
+ };
10559
+
10302
10560
  const _excluded$b = ["children"];
10303
10561
  var _jsxFileName$r = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\popover\\Popover.js";
10304
10562
  const {
@@ -10390,8 +10648,8 @@ const PopoverContent = ({
10390
10648
  ref: floating,
10391
10649
  style: Object.assign({
10392
10650
  position: strategy,
10393
- top: isMobile ? 0 : y != null ? y : '',
10394
- left: isMobile ? 0 : x != null ? x : '',
10651
+ top: isMobile ? 0 : y !== null && y !== void 0 ? y : '',
10652
+ left: isMobile ? 0 : x !== null && x !== void 0 ? x : '',
10395
10653
  zIndex: zIndices.popover
10396
10654
  }, style)
10397
10655
  }), {
@@ -11216,74 +11474,6 @@ ButtonGroupItem.defaultProps = {
11216
11474
  isToggle: true
11217
11475
  };
11218
11476
 
11219
- // a string of all valid unicode whitespaces
11220
- var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
11221
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
11222
-
11223
- var uncurryThis$e = functionUncurryThis;
11224
- var requireObjectCoercible$4 = requireObjectCoercible$a;
11225
- var toString$9 = toString$h;
11226
- var whitespaces$3 = whitespaces$4;
11227
-
11228
- var replace$4 = uncurryThis$e(''.replace);
11229
- var whitespace = '[' + whitespaces$3 + ']';
11230
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
11231
- var rtrim = RegExp(whitespace + whitespace + '*$');
11232
-
11233
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
11234
- var createMethod$1 = function (TYPE) {
11235
- return function ($this) {
11236
- var string = toString$9(requireObjectCoercible$4($this));
11237
- if (TYPE & 1) string = replace$4(string, ltrim, '');
11238
- if (TYPE & 2) string = replace$4(string, rtrim, '');
11239
- return string;
11240
- };
11241
- };
11242
-
11243
- var stringTrim = {
11244
- // `String.prototype.{ trimLeft, trimStart }` methods
11245
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
11246
- start: createMethod$1(1),
11247
- // `String.prototype.{ trimRight, trimEnd }` methods
11248
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
11249
- end: createMethod$1(2),
11250
- // `String.prototype.trim` method
11251
- // https://tc39.es/ecma262/#sec-string.prototype.trim
11252
- trim: createMethod$1(3)
11253
- };
11254
-
11255
- var global$k = global$U;
11256
- var fails$8 = fails$t;
11257
- var uncurryThis$d = functionUncurryThis;
11258
- var toString$8 = toString$h;
11259
- var trim$1 = stringTrim.trim;
11260
- var whitespaces$2 = whitespaces$4;
11261
-
11262
- var $parseInt$1 = global$k.parseInt;
11263
- var Symbol$6 = global$k.Symbol;
11264
- var ITERATOR$6 = Symbol$6 && Symbol$6.iterator;
11265
- var hex = /^[+-]?0x/i;
11266
- var exec$4 = uncurryThis$d(hex.exec);
11267
- var FORCED$2 = $parseInt$1(whitespaces$2 + '08') !== 8 || $parseInt$1(whitespaces$2 + '0x16') !== 22
11268
- // MS Edge 18- broken with boxed symbols
11269
- || (ITERATOR$6 && !fails$8(function () { $parseInt$1(Object(ITERATOR$6)); }));
11270
-
11271
- // `parseInt` method
11272
- // https://tc39.es/ecma262/#sec-parseint-string-radix
11273
- var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
11274
- var S = trim$1(toString$8(string));
11275
- return $parseInt$1(S, (radix >>> 0) || (exec$4(hex, S) ? 16 : 10));
11276
- } : $parseInt$1;
11277
-
11278
- var $$d = _export;
11279
- var $parseInt = numberParseInt;
11280
-
11281
- // `parseInt` method
11282
- // https://tc39.es/ecma262/#sec-parseint-string-radix
11283
- $$d({ global: true, forced: parseInt != $parseInt }, {
11284
- parseInt: $parseInt
11285
- });
11286
-
11287
11477
  const _excluded$7 = ["children"];
11288
11478
  var _jsxFileName$n = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\notificationBadge\\NotificationBadge.js";
11289
11479
  const NotificationBadgeRootStyle = styled('span', {
@@ -11385,7 +11575,7 @@ const NotificationBadge = _ref => {
11385
11575
  props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
11386
11576
 
11387
11577
  const getValue = () => {
11388
- let value = props == null ? void 0 : props.value;
11578
+ let value = props === null || props === void 0 ? void 0 : props.value;
11389
11579
 
11390
11580
  if (typeof value === 'number' || parseInt(value)) {
11391
11581
  if (Math.sign(value) === 1 || Math.sign(value) === 0) {
@@ -13980,7 +14170,7 @@ const CalendarBox = ({
13980
14170
  }), void 0), jsxs(Flex$1, Object.assign({
13981
14171
  gap: 3
13982
14172
  }, {
13983
- children: [jsx(Button$2, Object.assign({
14173
+ children: [jsx(Button$3, Object.assign({
13984
14174
  buttonType: "ghost",
13985
14175
  css: {
13986
14176
  fontWeight: 600
@@ -13990,7 +14180,7 @@ const CalendarBox = ({
13990
14180
  size: "sm"
13991
14181
  }, {
13992
14182
  children: "Batal"
13993
- }), void 0), jsx(Button$2, Object.assign({
14183
+ }), void 0), jsx(Button$3, Object.assign({
13994
14184
  css: {
13995
14185
  fontWeight: 600
13996
14186
  },
@@ -14557,7 +14747,7 @@ const MobileCalendarBox = ({
14557
14747
  }), void 0), jsxs(Flex$1, Object.assign({
14558
14748
  gap: 3
14559
14749
  }, {
14560
- children: [jsx(Button$2, Object.assign({
14750
+ children: [jsx(Button$3, Object.assign({
14561
14751
  buttonType: "ghost",
14562
14752
  size: "sm",
14563
14753
  css: {
@@ -14570,7 +14760,7 @@ const MobileCalendarBox = ({
14570
14760
  disabled: disabled
14571
14761
  }, {
14572
14762
  children: "Batal"
14573
- }), void 0), jsx(Button$2, Object.assign({
14763
+ }), void 0), jsx(Button$3, Object.assign({
14574
14764
  size: "sm",
14575
14765
  css: {
14576
14766
  width: '160px',
@@ -15761,7 +15951,7 @@ const PageButton = _ref => {
15761
15951
  } = _ref,
15762
15952
  props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
15763
15953
 
15764
- return /*#__PURE__*/React__default.createElement(Button$2, _extends({
15954
+ return /*#__PURE__*/React__default.createElement(Button$3, _extends({
15765
15955
  onClick: onClick,
15766
15956
  buttonType: !isActive ? 'ghost' : 'primary',
15767
15957
  css: {
@@ -16109,7 +16299,7 @@ function PaginationInfo(_ref) {
16109
16299
  lineNumber: 40,
16110
16300
  columnNumber: 11
16111
16301
  }
16112
- }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
16302
+ }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
16113
16303
  key: limit,
16114
16304
  css: limitItemContainerStyle(selectedLimit === limit),
16115
16305
  onClick: () => onChange(limit),
@@ -16326,18 +16516,10 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
16326
16516
  }
16327
16517
 
16328
16518
  return jsxs(React__default.Fragment, {
16329
- children: [sortBy.length <= 0 && row.original['isTopChild'] && /*#__PURE__*/createElement$2(TableRow$3, Object.assign({
16330
- css: customStyle
16331
- }, row.getRowProps(), {
16332
- key: `${row.id}-group_header`
16333
- }), jsx(TableCell$3, Object.assign({
16334
- colSpan: 100
16519
+ children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row) : jsx(Text$1, Object.assign({
16520
+ variant: "contentButton"
16335
16521
  }, {
16336
- children: (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row) : jsx(Text$1, Object.assign({
16337
- variant: "contentButton"
16338
- }, {
16339
- children: row.cells[0].render('Cell')
16340
- }), void 0)
16522
+ children: row.cells[0].render('Cell')
16341
16523
  }), void 0)), jsx(TableRow$3, Object.assign({
16342
16524
  css: customStyle
16343
16525
  }, row.getRowProps(), {
@@ -16361,7 +16543,7 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
16361
16543
  }), void 0) : cell.render('Cell')
16362
16544
  }), void 0);
16363
16545
  })
16364
- }), void 0), row.isExpanded ? jsx(TableRow$3, {
16546
+ }), void 0), ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row)), row.isExpanded ? jsx(TableRow$3, {
16365
16547
  children: jsxs(TableCell$3, Object.assign({
16366
16548
  colSpan: visibleColumns.length
16367
16549
  }, {
@@ -16647,7 +16829,8 @@ const formattingData = (rawData, groupKey) => {
16647
16829
  if (item[groupKey] && item[groupKey].length > 0) {
16648
16830
  const newElement = item[groupKey].map((childItem, index) => Object.assign(Object.assign({}, childItem), {
16649
16831
  isTopChild: index === 0,
16650
- parentOriginal: item
16832
+ parentOriginal: item,
16833
+ isBottomChild: index === item[groupKey].length - 1
16651
16834
  }));
16652
16835
  rawData.splice(index, 1);
16653
16836
  rawData.splice(index + 1, 0, ...newElement);
@@ -16930,22 +17113,10 @@ function Table({
16930
17113
  }
16931
17114
 
16932
17115
  return jsxs(React.Fragment, {
16933
- children: [sortBy.length <= 0 && row.original['isTopChild'] && /*#__PURE__*/createElement$2(TableRow$2, Object.assign({
16934
- css: customStyle
16935
- }, row.getRowProps(), {
16936
- key: `${row.id}-group_header`
16937
- }), jsx(TableCell$2, Object.assign({
16938
- colSpan: 100,
16939
- css: {
16940
- padding: '20px 8px',
16941
- verticalAlign: cellAlign
16942
- }
17116
+ children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row) : jsx(Text$1, Object.assign({
17117
+ variant: "contentButton"
16943
17118
  }, {
16944
- children: (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row) : jsx(Text$1, Object.assign({
16945
- variant: "contentButton"
16946
- }, {
16947
- children: row.cells[0].render('Cell')
16948
- }), void 0)
17119
+ children: row.cells[0].render('Cell')
16949
17120
  }), void 0)), jsx(TableRow$2, Object.assign({
16950
17121
  css: customStyle
16951
17122
  }, row.getRowProps(), {
@@ -16959,7 +17130,7 @@ function Table({
16959
17130
  children: cell.render('Cell')
16960
17131
  }), void 0);
16961
17132
  })
16962
- }), void 0), row.isExpanded ? subRowCells.map((cell, index) => jsxs(TableRow$2, Object.assign({
17133
+ }), void 0), ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row)), row.isExpanded ? subRowCells.map((cell, index) => jsxs(TableRow$2, Object.assign({
16963
17134
  subRow: true
16964
17135
  }, {
16965
17136
  children: [leftAddOnCells.map((_, index) => jsx("td", {}, index)), jsxs(React.Fragment, {
@@ -18449,7 +18620,7 @@ const TemplateAlertFunction = props => {
18449
18620
  if (!props.onOpenAutoFocus) {
18450
18621
  e.preventDefault();
18451
18622
  } else {
18452
- props == null ? void 0 : props.onOpenAutoFocus();
18623
+ props === null || props === void 0 ? void 0 : props.onOpenAutoFocus();
18453
18624
  }
18454
18625
  },
18455
18626
  __self: undefined,
@@ -18566,12 +18737,12 @@ const TemplateAlertFunction = props => {
18566
18737
  lineNumber: 157,
18567
18738
  columnNumber: 15
18568
18739
  }
18569
- }, /*#__PURE__*/React__default.createElement(Button$2, _extends({
18740
+ }, /*#__PURE__*/React__default.createElement(Button$3, _extends({
18570
18741
  size: "sm",
18571
18742
  onClick: buttonConfirm,
18572
18743
  buttonType: props.dialogType,
18573
- disabled: props == null ? void 0 : props.disabledButton
18574
- }, props == null ? void 0 : props.actionButtonProps, {
18744
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
18745
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
18575
18746
  __self: undefined,
18576
18747
  __source: {
18577
18748
  fileName: _jsxFileName$b,
@@ -18586,16 +18757,16 @@ const TemplateAlertFunction = props => {
18586
18757
  lineNumber: 170,
18587
18758
  columnNumber: 17
18588
18759
  }
18589
- }, /*#__PURE__*/React__default.createElement(Button$2, _extends({
18760
+ }, /*#__PURE__*/React__default.createElement(Button$3, _extends({
18590
18761
  size: "sm",
18591
18762
  onClick: buttonCancel,
18592
18763
  css: {
18593
- color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$gray900 !important',
18764
+ color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
18594
18765
  flex: props.isMobile && 1
18595
18766
  },
18596
18767
  buttonType: "ghost",
18597
- disabled: props == null ? void 0 : props.disabledButton
18598
- }, props == null ? void 0 : props.cancelButtonProps, {
18768
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
18769
+ }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
18599
18770
  __self: undefined,
18600
18771
  __source: {
18601
18772
  fileName: _jsxFileName$b,
@@ -18610,15 +18781,15 @@ const TemplateAlertFunction = props => {
18610
18781
  lineNumber: 185,
18611
18782
  columnNumber: 17
18612
18783
  }
18613
- }, /*#__PURE__*/React__default.createElement(Button$2, _extends({
18784
+ }, /*#__PURE__*/React__default.createElement(Button$3, _extends({
18614
18785
  size: "sm",
18615
18786
  onClick: buttonConfirm,
18616
18787
  buttonType: props.dialogType,
18617
18788
  css: {
18618
18789
  flex: props.isMobile && 1
18619
18790
  },
18620
- disabled: props == null ? void 0 : props.disabledButton
18621
- }, props == null ? void 0 : props.actionButtonProps, {
18791
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
18792
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
18622
18793
  __self: undefined,
18623
18794
  __source: {
18624
18795
  fileName: _jsxFileName$b,
@@ -18770,15 +18941,15 @@ function AlertDialog(props) {
18770
18941
  lineNumber: 242,
18771
18942
  columnNumber: 15
18772
18943
  }
18773
- }, /*#__PURE__*/React__default.createElement(Button$2, _extends({
18944
+ }, /*#__PURE__*/React__default.createElement(Button$3, _extends({
18774
18945
  size: "sm",
18775
18946
  onClick: props.onConfirm,
18776
18947
  buttonType: props.dialogType,
18777
18948
  css: {
18778
18949
  flex: props.isMobile && 1
18779
18950
  },
18780
- disabled: props == null ? void 0 : props.disabledButton
18781
- }, props == null ? void 0 : props.actionButtonProps, {
18951
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
18952
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
18782
18953
  __self: this,
18783
18954
  __source: {
18784
18955
  fileName: _jsxFileName$b,
@@ -18793,16 +18964,16 @@ function AlertDialog(props) {
18793
18964
  lineNumber: 256,
18794
18965
  columnNumber: 17
18795
18966
  }
18796
- }, /*#__PURE__*/React__default.createElement(Button$2, _extends({
18967
+ }, /*#__PURE__*/React__default.createElement(Button$3, _extends({
18797
18968
  size: "sm",
18798
18969
  onClick: props.onCancel,
18799
18970
  css: {
18800
- color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$gray900 !important',
18971
+ color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
18801
18972
  flex: props.isMobile && 1
18802
18973
  },
18803
18974
  buttonType: "ghost",
18804
- disabled: props == null ? void 0 : props.disabledButton
18805
- }, props == null ? void 0 : props.cancelButtonProps, {
18975
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
18976
+ }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
18806
18977
  __self: this,
18807
18978
  __source: {
18808
18979
  fileName: _jsxFileName$b,
@@ -18817,15 +18988,15 @@ function AlertDialog(props) {
18817
18988
  lineNumber: 271,
18818
18989
  columnNumber: 17
18819
18990
  }
18820
- }, /*#__PURE__*/React__default.createElement(Button$2, _extends({
18991
+ }, /*#__PURE__*/React__default.createElement(Button$3, _extends({
18821
18992
  size: "sm",
18822
18993
  onClick: props.onConfirm,
18823
18994
  buttonType: props.dialogType,
18824
18995
  css: {
18825
18996
  flex: props.isMobile && 1
18826
18997
  },
18827
- disabled: props == null ? void 0 : props.disabledButton
18828
- }, props == null ? void 0 : props.actionButtonProps, {
18998
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
18999
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
18829
19000
  __self: this,
18830
19001
  __source: {
18831
19002
  fileName: _jsxFileName$b,
@@ -21306,7 +21477,7 @@ const Upload = ({
21306
21477
  file: fileProgress,
21307
21478
  indexReplace: indexReplace.current,
21308
21479
  isReplace: indexReplace.current !== null
21309
- })) == null ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) == null ? void 0 : _onChange$then.catch(error => setError(error.message));
21480
+ })) === null || _onChange === void 0 ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) === null || _onChange$then === void 0 ? void 0 : _onChange$then.catch(error => setError(error.message));
21310
21481
  }
21311
21482
  }).then(result => {
21312
21483
  var _onChange2, _onChange2$then;
@@ -21328,7 +21499,7 @@ const Upload = ({
21328
21499
  file: fileSuccess,
21329
21500
  indexReplace: indexReplace.current,
21330
21501
  isReplace: indexReplace.current !== null
21331
- })) == null ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) == null ? void 0 : _onChange2$then.catch(error => setError(error.message));
21502
+ })) === null || _onChange2 === void 0 ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) === null || _onChange2$then === void 0 ? void 0 : _onChange2$then.catch(error => setError(error.message));
21332
21503
  }).catch(error => {
21333
21504
  var _onChange3, _onChange3$then;
21334
21505
 
@@ -21349,7 +21520,7 @@ const Upload = ({
21349
21520
  file: fileError,
21350
21521
  indexReplace: indexReplace.current,
21351
21522
  isReplace: indexReplace.current !== null
21352
- })) == null ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) == null ? void 0 : _onChange3$then.catch(error => setError(error.message));
21523
+ })) === null || _onChange3 === void 0 ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) === null || _onChange3$then === void 0 ? void 0 : _onChange3$then.catch(error => setError(error.message));
21353
21524
  });
21354
21525
  } else {
21355
21526
  var _onChange4, _onChange4$then;
@@ -21359,7 +21530,7 @@ const Upload = ({
21359
21530
  file: newFile,
21360
21531
  indexReplace: indexReplace.current,
21361
21532
  isReplace: indexReplace.current !== null
21362
- })) == null ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) == null ? void 0 : _onChange4$then.catch(error => setError(error.message));
21533
+ })) === null || _onChange4 === void 0 ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) === null || _onChange4$then === void 0 ? void 0 : _onChange4$then.catch(error => setError(error.message));
21363
21534
  }
21364
21535
 
21365
21536
  if (indexReplace.current !== null) {
@@ -21386,9 +21557,9 @@ const Upload = ({
21386
21557
  }
21387
21558
 
21388
21559
  function handleCrop() {
21389
- if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
21560
+ if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
21390
21561
  imgPreview(imgRef.current, completedCrop, 1, 0, ratio).then(blob => {
21391
- const file = new File([blob], fileState == null ? void 0 : fileState.name, {
21562
+ const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
21392
21563
  type: blob.type
21393
21564
  });
21394
21565
  handleUpload([file]);
@@ -21456,22 +21627,22 @@ const Upload = ({
21456
21627
  function handleOpenFile(file) {
21457
21628
  var _String, _file$name;
21458
21629
 
21459
- let extension = (_String = String(file == null ? void 0 : (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
21630
+ let extension = (_String = String(file === null || file === void 0 ? void 0 : (_file$name = file.name) === null || _file$name === void 0 ? void 0 : _file$name.split('.').pop())) === null || _String === void 0 ? void 0 : _String.toLowerCase();
21460
21631
 
21461
21632
  if (extension === 'pdf') {
21462
- window.open(file == null ? void 0 : file.url);
21633
+ window.open(file === null || file === void 0 ? void 0 : file.url);
21463
21634
  } else {
21464
- request.get(file == null ? void 0 : file.url).end((err, res) => {
21635
+ request.get(file === null || file === void 0 ? void 0 : file.url).end((err, res) => {
21465
21636
  if (err) {
21466
21637
  console.error(err.message);
21467
21638
  }
21468
21639
 
21469
- if (res && res != null && res.ok) {
21470
- const response = res == null ? void 0 : res.text;
21640
+ if (res && res !== null && res !== void 0 && res.ok) {
21641
+ const response = res === null || res === void 0 ? void 0 : res.text;
21471
21642
  const url = window.URL.createObjectURL(new Blob([response]));
21472
21643
  const link = document.createElement('a');
21473
21644
  link.href = url;
21474
- link.setAttribute('download', file == null ? void 0 : file.name);
21645
+ link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
21475
21646
  document.body.appendChild(link);
21476
21647
  link.click();
21477
21648
  document.body.removeChild(link);
@@ -21541,12 +21712,12 @@ const Upload = ({
21541
21712
  }
21542
21713
 
21543
21714
  const renderPicture = () => {
21544
- return fileList == null ? void 0 : fileList.map((item, index) => {
21545
- if ((item == null ? void 0 : item.status) === 'uploading') {
21715
+ return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
21716
+ if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
21546
21717
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
21547
21718
  key: index,
21548
- progress: item == null ? void 0 : item.percent,
21549
- loading: item == null ? void 0 : item.loading,
21719
+ progress: item === null || item === void 0 ? void 0 : item.percent,
21720
+ loading: item === null || item === void 0 ? void 0 : item.loading,
21550
21721
  __self: undefined,
21551
21722
  __source: {
21552
21723
  fileName: _jsxFileName$9,
@@ -21621,14 +21792,14 @@ const Upload = ({
21621
21792
  };
21622
21793
 
21623
21794
  const renderFile = () => {
21624
- return fileList == null ? void 0 : fileList.map((item, index) => {
21795
+ return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
21625
21796
  var _item$name;
21626
21797
 
21627
- if ((item == null ? void 0 : item.status) === 'uploading') {
21798
+ if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
21628
21799
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
21629
21800
  key: index,
21630
- progress: item == null ? void 0 : item.percent,
21631
- loading: item == null ? void 0 : item.loading,
21801
+ progress: item === null || item === void 0 ? void 0 : item.percent,
21802
+ loading: item === null || item === void 0 ? void 0 : item.loading,
21632
21803
  __self: undefined,
21633
21804
  __source: {
21634
21805
  fileName: _jsxFileName$9,
@@ -21695,7 +21866,7 @@ const Upload = ({
21695
21866
  lineNumber: 611,
21696
21867
  columnNumber: 17
21697
21868
  }
21698
- }, ".", item == null ? void 0 : (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
21869
+ }, ".", item === null || item === void 0 ? void 0 : (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
21699
21870
  label: item.name,
21700
21871
  __self: undefined,
21701
21872
  __source: {
@@ -21867,7 +22038,7 @@ const Upload = ({
21867
22038
  lineNumber: 686,
21868
22039
  columnNumber: 11
21869
22040
  }
21870
- }, children != null ? children : /*#__PURE__*/React__default.createElement(React__default.Fragment, {
22041
+ }, children !== null && children !== void 0 ? children : /*#__PURE__*/React__default.createElement(React__default.Fragment, {
21871
22042
  __self: this,
21872
22043
  __source: {
21873
22044
  fileName: _jsxFileName$9,
@@ -21901,7 +22072,7 @@ const Upload = ({
21901
22072
  lineNumber: 692,
21902
22073
  columnNumber: 17
21903
22074
  }
21904
- }, placeholder != null ? placeholder : `Pilih atau letakkan ${isFile ? 'berkas' : 'gambar'} di sini`)))), error && /*#__PURE__*/React__default.createElement(ErrorMessage, {
22075
+ }, placeholder !== null && placeholder !== void 0 ? placeholder : `Pilih atau letakkan ${isFile ? 'berkas' : 'gambar'} di sini`)))), error && /*#__PURE__*/React__default.createElement(ErrorMessage, {
21905
22076
  __self: this,
21906
22077
  __source: {
21907
22078
  fileName: _jsxFileName$9,
@@ -21951,7 +22122,8 @@ const Upload = ({
21951
22122
  }, cropperTitle), /*#__PURE__*/React__default.createElement(ModalDialogContent, {
21952
22123
  css: {
21953
22124
  padding: '$spacing-03',
21954
- overflowY: 'auto'
22125
+ overflowY: 'auto',
22126
+ textAlign: 'center'
21955
22127
  },
21956
22128
  __self: this,
21957
22129
  __source: {
@@ -22031,7 +22203,7 @@ const Upload = ({
22031
22203
  lineNumber: 727,
22032
22204
  columnNumber: 13
22033
22205
  }
22034
- }, /*#__PURE__*/React__default.createElement(Button$2, {
22206
+ }, /*#__PURE__*/React__default.createElement(Button$3, {
22035
22207
  buttonType: "secondary",
22036
22208
  onClick: toggleModal,
22037
22209
  __self: this,
@@ -22040,7 +22212,7 @@ const Upload = ({
22040
22212
  lineNumber: 728,
22041
22213
  columnNumber: 15
22042
22214
  }
22043
- }, "Batal"), /*#__PURE__*/React__default.createElement(Button$2, {
22215
+ }, "Batal"), /*#__PURE__*/React__default.createElement(Button$3, {
22044
22216
  onClick: handleCrop,
22045
22217
  __self: this,
22046
22218
  __source: {
@@ -22048,12 +22220,12 @@ const Upload = ({
22048
22220
  lineNumber: 731,
22049
22221
  columnNumber: 15
22050
22222
  }
22051
- }, `${completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height ? 'Potong & Simpan' : 'Simpan'}`)))));
22223
+ }, `${completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height ? 'Potong & Simpan' : 'Simpan'}`)))));
22052
22224
  }
22053
22225
 
22054
22226
  return /*#__PURE__*/React__default.createElement(Flex$1, {
22055
22227
  direction: "row",
22056
- gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
22228
+ gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
22057
22229
  wrap: "wrap",
22058
22230
  css: {
22059
22231
  userSelect: 'none'
@@ -22475,10 +22647,10 @@ function InputColorPicker(props) {
22475
22647
  const [isPopover, setIsPopover] = useState(false);
22476
22648
 
22477
22649
  function getColor() {
22478
- const color = props == null ? void 0 : props.color;
22650
+ const color = props === null || props === void 0 ? void 0 : props.color;
22479
22651
 
22480
22652
  if (typeof color === 'string') {
22481
- return color == null ? void 0 : color.toUpperCase();
22653
+ return color === null || color === void 0 ? void 0 : color.toUpperCase();
22482
22654
  }
22483
22655
 
22484
22656
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
@@ -25448,9 +25620,9 @@ const Navigation = props => {
25448
25620
  lineNumber: 119,
25449
25621
  columnNumber: 30
25450
25622
  }
25451
- }), data[i - 1].title, ((_data = data[i - 1]) == null ? void 0 : _data.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
25623
+ }), data[i - 1].title, ((_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
25452
25624
  align: "center",
25453
- label: (_data2 = data[i - 1]) == null ? void 0 : _data2.tooltipsContents,
25625
+ label: (_data2 = data[i - 1]) === null || _data2 === void 0 ? void 0 : _data2.tooltipsContents,
25454
25626
  __self: undefined,
25455
25627
  __source: {
25456
25628
  fileName: _jsxFileName$4,
@@ -25521,10 +25693,10 @@ const Navigation = props => {
25521
25693
  lineNumber: 155,
25522
25694
  columnNumber: 15
25523
25695
  }
25524
- }, isActive ? data[i - 1].title : ''), isActive && ((_data3 = data[i - 1]) == null ? void 0 : _data3.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
25696
+ }, isActive ? data[i - 1].title : ''), isActive && ((_data3 = data[i - 1]) === null || _data3 === void 0 ? void 0 : _data3.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
25525
25697
  align: "center",
25526
25698
  withClick: true,
25527
- label: (_data4 = data[i - 1]) == null ? void 0 : _data4.tooltipsContents,
25699
+ label: (_data4 = data[i - 1]) === null || _data4 === void 0 ? void 0 : _data4.tooltipsContents,
25528
25700
  __self: undefined,
25529
25701
  __source: {
25530
25702
  fileName: _jsxFileName$4,
@@ -25592,30 +25764,40 @@ const Navigation = props => {
25592
25764
  const Default = props => {
25593
25765
  const [state, updateState] = React__default.useState(Object.assign({
25594
25766
  isComplete: [],
25595
- hide: false
25767
+ hide: props.hide || false
25596
25768
  }, props.state));
25597
25769
  useEffect(() => {
25598
25770
  updateState(current => Object.assign({}, current, {
25599
25771
  isComplete: props.completedSteps || []
25600
25772
  }));
25601
25773
  }, [props.completedSteps]);
25774
+ useEffect(() => {
25775
+ updateState(prev => Object.assign({}, prev, {
25776
+ hide: props.hide
25777
+ }));
25778
+ }, [props.hide]);
25779
+ useEffect(() => {
25780
+ var _props$onChangeVisibi;
25781
+
25782
+ props === null || props === void 0 ? void 0 : (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 ? void 0 : _props$onChangeVisibi.call(props, state.hide);
25783
+ }, [state.hide]);
25602
25784
 
25603
25785
  const toogleVisibility = value => {
25604
- updateState(Object.assign({}, state, {
25605
- hide: !state.hide
25786
+ updateState(prev => Object.assign({}, prev, {
25787
+ hide: !prev.hide
25606
25788
  }));
25607
25789
  };
25608
25790
 
25609
25791
  const getIsComplete = currentStep => {
25610
25792
  var _state$isComplete;
25611
25793
 
25612
- return state == null ? void 0 : (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
25794
+ return state === null || state === void 0 ? void 0 : (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
25613
25795
  };
25614
25796
 
25615
25797
  const getTitleStep = currentStep => {
25616
25798
  var _props$navContents, _props$navContents2;
25617
25799
 
25618
- return props == null ? void 0 : (_props$navContents = props.navContents) == null ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents2.title;
25800
+ return props === null || props === void 0 ? void 0 : (_props$navContents = props.navContents) === null || _props$navContents === void 0 ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) === null || _props$navContents2 === void 0 ? void 0 : _props$navContents2.title;
25619
25801
  };
25620
25802
 
25621
25803
  const setState = value => {
@@ -25661,17 +25843,17 @@ const Default = props => {
25661
25843
  __self: undefined,
25662
25844
  __source: {
25663
25845
  fileName: _jsxFileName$4,
25664
- lineNumber: 265,
25846
+ lineNumber: 273,
25665
25847
  columnNumber: 5
25666
25848
  }
25667
25849
  }, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
25668
25850
  value: {
25669
25851
  toogleVisibility,
25670
- isHide: state == null ? void 0 : state.hide,
25852
+ isHide: state === null || state === void 0 ? void 0 : state.hide,
25671
25853
  setComplete,
25672
25854
  setState,
25673
25855
  state,
25674
- SW: state == null ? void 0 : state.SW,
25856
+ SW: state === null || state === void 0 ? void 0 : state.SW,
25675
25857
  forbidClickNav: props.forbidClickNav,
25676
25858
  titles: props.titles,
25677
25859
  isMobile: props.isMobile,
@@ -25683,7 +25865,7 @@ const Default = props => {
25683
25865
  __self: undefined,
25684
25866
  __source: {
25685
25867
  fileName: _jsxFileName$4,
25686
- lineNumber: 266,
25868
+ lineNumber: 274,
25687
25869
  columnNumber: 7
25688
25870
  }
25689
25871
  }, /*#__PURE__*/React__default.createElement(Stepper, _extends({}, props, {
@@ -25695,7 +25877,7 @@ const Default = props => {
25695
25877
  __self: undefined,
25696
25878
  __source: {
25697
25879
  fileName: _jsxFileName$4,
25698
- lineNumber: 288,
25880
+ lineNumber: 296,
25699
25881
  columnNumber: 16
25700
25882
  }
25701
25883
  }),
@@ -25705,7 +25887,7 @@ const Default = props => {
25705
25887
  __self: undefined,
25706
25888
  __source: {
25707
25889
  fileName: _jsxFileName$4,
25708
- lineNumber: 283,
25890
+ lineNumber: 291,
25709
25891
  columnNumber: 9
25710
25892
  }
25711
25893
  }), props.children)));
@@ -25843,10 +26025,10 @@ function Content({
25843
26025
  function getDatasets(content, activeId, isCollapse) {
25844
26026
  const datasets = [];
25845
26027
 
25846
- for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
26028
+ for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
25847
26029
  var _content$i;
25848
26030
 
25849
- if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
26031
+ if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
25850
26032
  datasets.unshift(content[i]);
25851
26033
  } else {
25852
26034
  datasets.push(content[i]);
@@ -25886,7 +26068,7 @@ function Content({
25886
26068
  lineNumber: 99,
25887
26069
  columnNumber: 7
25888
26070
  }
25889
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
26071
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
25890
26072
  return /*#__PURE__*/React__default.createElement(List, {
25891
26073
  key: index,
25892
26074
  __self: this,
@@ -25903,11 +26085,11 @@ function Content({
25903
26085
  marginLeft: '-4px !important',
25904
26086
  borderLeftWidth: '4px !important',
25905
26087
  borderLeftStyle: 'solid !important',
25906
- borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
26088
+ borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
25907
26089
  paddingLeft: '16px !important',
25908
26090
  minHeight: 25
25909
26091
  },
25910
- "data-to-scrollspy-id": item == null ? void 0 : item.id,
26092
+ "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
25911
26093
  __self: this,
25912
26094
  __source: {
25913
26095
  fileName: _jsxFileName$2,
@@ -25916,8 +26098,8 @@ function Content({
25916
26098
  }
25917
26099
  }, /*#__PURE__*/React__default.createElement(Title$1, {
25918
26100
  className: "link-title",
25919
- active: (item == null ? void 0 : item.id) === activeId,
25920
- href: `#${item == null ? void 0 : item.id}`,
26101
+ active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
26102
+ href: `#${item === null || item === void 0 ? void 0 : item.id}`,
25921
26103
  onClick: e => {
25922
26104
  e.preventDefault();
25923
26105
  const target = window.document.getElementById(e.currentTarget.href.split('#')[1]);
@@ -25946,7 +26128,7 @@ function Content({
25946
26128
  lineNumber: 117,
25947
26129
  columnNumber: 17
25948
26130
  }
25949
- }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
26131
+ }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
25950
26132
  })));
25951
26133
  }
25952
26134
 
@@ -27506,7 +27688,7 @@ function InputMapPicker(props) {
27506
27688
  isTruncated: true
27507
27689
  }, {
27508
27690
  children: inputValue
27509
- }), void 0), jsx(Button$2, Object.assign({
27691
+ }), void 0), jsx(Button$3, Object.assign({
27510
27692
  type: "button",
27511
27693
  size: "sm",
27512
27694
  buttonType: "secondary",
@@ -27951,7 +28133,7 @@ const ComparatorController = ({
27951
28133
  }
27952
28134
  }
27953
28135
  }, {
27954
- children: jsx(Button$2, Object.assign({
28136
+ children: jsx(Button$3, Object.assign({
27955
28137
  buttonType: "ghost",
27956
28138
  css: {
27957
28139
  fontWeight: 600,
@@ -30135,4 +30317,4 @@ const useToggle = initialValue => {
30135
30317
  return useReducer(toggleReducer, initialValue);
30136
30318
  };
30137
30319
 
30138
- 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, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$2 as Button, ButtonDropdown, ButtonGroup$1 as ButtonGroup, ButtonGroupItem, ButtonPrimitive, Card, CardComponent, CardLineColor, CheckboxGroup, ColorPicker$1 as ColorPicker, Colors, DateColumn, DatePicker, 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, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EditableTable, Flex$1 as Flex, FormGroup, FormHelper, FormLabel, Grid, GridItem, Heading, IconButton, IconContainer, Image, ImageDevicePreview, InputCheckbox, InputColorPicker, InputCombobox, InputCreatable, InputDatePicker, InputGroup, InputLeftAddon, InputLeftElement, InputMapPicker, InputNumber, InputOTP, InputPrefix, InputRadio, InputRadioGroup, InputResourceList, InputRightAddon, InputRightElement, InputSearchbox, InputSelect, InputSelectCheck, InputSelectTag, InputSuffix, InputSwitch, TagsInput as InputTags, InputText, InputTextArea, InputTimePicker, LAST_7_DAYS, LAST_MONTH, LAST_TWO_MONTHS, LAST_WEEK, LineChart, Link, LoadingBar, MajooProvider, MapPicker, MobileTable, ModalDialog, ModalDialogContent, ModalDialogFooter, ModalDialogTitle, ModalDialogTrigger, NativeTimePicker, NotificationBadge, OptionWrapper$2 as OptionWrapper, PageContainer, PageDialog, PageDialogContent, PageDialogFooter, PageDialogTitle, PageDialogTrigger, Pagination, Paper, PaperComponent, Paragraph, Popover, PopoverClose, PopoverContent, PopoverTrigger, PriceColumn, Progress$1 as Progress, ProgressIndicator, RANGE_PICKER, ResendOTP, RightSlot, rowExpanderColumn as RowExpanderColumn, rowMenuColumn as RowMenuColumn, rowSelectionColumn as RowSelectionColumn, SINGLE_PICKER, SelectBox, SelectContainer, SelectInputSearch, SelectItem, SelectOption, Separator$2 as Separator, 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$2 as TableBody, TableColumn, TableContent$2 as TableContent, TableFoot$2 as TableFoot, TableFootCell$2 as TableFootCell, TableFootRow$2 as TableFootRow, TableHead$2 as TableHead, TableHeadCellContent, TableHeaderCellContainer, TableOfContent, TableOfContentPage, Tabs$1 as Tabs, TabsContent$1 as TabsContent, TabsList$1 as TabsList, TabsTrigger$1 as TabsTrigger, Tag, TagStatus, Text$1 as Text, TextVariantsEnum, TimePicker, ToastContext, Tooltip$1 as Tooltip, UPDATE_PICKER, Upload, YESTERDAY, addOnCellStyle, advancePickerDate, advancePickerOptions, defaultFetchDataParams, pickerReducer, useListOption, useToggle };
30320
+ 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, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$3 as Button, ButtonDropdown, ButtonGroup$1 as ButtonGroup, ButtonGroupItem, ButtonPrimitive, Card, CardComponent, CardLineColor, CheckboxGroup, ColorPicker$1 as ColorPicker, Colors, DateColumn, DatePicker, 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, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EditableTable, Flex$1 as Flex, FormGroup, FormHelper, FormLabel, Grid, GridItem, Heading, IconButton, IconContainer, Image, ImageDevicePreview, InputCheckbox, InputColorPicker, InputCombobox, InputCounter, InputCreatable, InputDatePicker, InputGroup, InputLeftAddon, InputLeftElement, InputMapPicker, InputNumber, InputOTP, InputPrefix, InputRadio, InputRadioGroup, InputResourceList, InputRightAddon, InputRightElement, InputSearchbox, InputSelect, InputSelectCheck, InputSelectTag, InputSuffix, InputSwitch, TagsInput as InputTags, InputText, InputTextArea, InputTimePicker, LAST_7_DAYS, LAST_MONTH, LAST_TWO_MONTHS, LAST_WEEK, LineChart, Link, LoadingBar, MajooProvider, MapPicker, MobileTable, ModalDialog, ModalDialogContent, ModalDialogFooter, ModalDialogTitle, ModalDialogTrigger, NativeTimePicker, NotificationBadge, OptionWrapper$2 as OptionWrapper, PageContainer, PageDialog, PageDialogContent, PageDialogFooter, PageDialogTitle, PageDialogTrigger, Pagination, Paper, PaperComponent, Paragraph, Popover, PopoverClose, PopoverContent, PopoverTrigger, PriceColumn, Progress$1 as Progress, ProgressIndicator, RANGE_PICKER, ResendOTP, RightSlot, rowExpanderColumn as RowExpanderColumn, rowMenuColumn as RowMenuColumn, rowSelectionColumn as RowSelectionColumn, SINGLE_PICKER, SelectBox, SelectContainer, SelectInputSearch, SelectItem, SelectOption, Separator$2 as Separator, 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$2 as TableBody, TableCell$2 as TableCell, TableColumn, TableContent$2 as TableContent, TableFoot$2 as TableFoot, TableFootCell$2 as TableFootCell, TableFootRow$2 as TableFootRow, TableHead$2 as TableHead, TableHeadCellContent, TableHeaderCellContainer, TableOfContent, TableOfContentPage, TableRow$2 as TableRow, Tabs$1 as Tabs, TabsContent$1 as TabsContent, TabsList$1 as TabsList, TabsTrigger$1 as TabsTrigger, Tag, TagStatus, Text$1 as Text, TextVariantsEnum, TimePicker, ToastContext, Tooltip$1 as Tooltip, UPDATE_PICKER, Upload, YESTERDAY, addOnCellStyle, advancePickerDate, advancePickerOptions, defaultFetchDataParams, pickerReducer, useListOption, useToggle };