@majoo-ui/react 1.49.3 → 1.50.0
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/components/form/components/InputCounter/InputCounter.d.ts +34 -0
- package/components/form/components/InputCounter/index.d.ts +2 -0
- package/components/form/components/index.d.ts +1 -0
- package/components/stepWizard/index.d.ts +2 -0
- package/index.esm.js +407 -237
- package/index.umd.js +408 -235
- package/package.json +1 -1
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,
|
|
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
|
|
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
|
|
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$
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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$
|
|
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
|
|
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:
|
|
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:
|
|
7541
|
+
lineNumber: 169,
|
|
7529
7542
|
columnNumber: 7
|
|
7530
7543
|
}
|
|
7531
|
-
}), /*#__PURE__*/React__default.createElement(Input$
|
|
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:
|
|
7556
|
+
lineNumber: 177,
|
|
7544
7557
|
columnNumber: 9
|
|
7545
7558
|
}
|
|
7546
|
-
})), regexError && pattern && (pattern
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
9122
|
+
const Input$6 = styled('input', {
|
|
9109
9123
|
width: '100%',
|
|
9110
9124
|
textAlign: 'left',
|
|
9111
9125
|
background: 'unset',
|
|
@@ -9116,7 +9130,7 @@ const Input$5 = styled('input', {
|
|
|
9116
9130
|
cursor: 'not-allowed'
|
|
9117
9131
|
}
|
|
9118
9132
|
});
|
|
9119
|
-
const Button = styled('button', {
|
|
9133
|
+
const Button$1 = styled('button', {
|
|
9120
9134
|
background: 'none',
|
|
9121
9135
|
outline: 'none',
|
|
9122
9136
|
border: 'none',
|
|
@@ -9240,12 +9254,15 @@ function InputSelectCheck(_ref) {
|
|
|
9240
9254
|
} = _ref,
|
|
9241
9255
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
9242
9256
|
|
|
9243
|
-
const [initItem, setInitItem] =
|
|
9257
|
+
const [initItem, setInitItem] = React__default.useState(option); //init filter selectedItems on useMultipleSelection
|
|
9244
9258
|
|
|
9245
|
-
const [item, setItem] =
|
|
9246
|
-
const [selectedValue, setSelectedValue] =
|
|
9247
|
-
const [inputValue, setInputValue] =
|
|
9248
|
-
|
|
9259
|
+
const [item, setItem] = React__default.useState([]);
|
|
9260
|
+
const [selectedValue, setSelectedValue] = React__default.useState([]);
|
|
9261
|
+
const [inputValue, setInputValue] = React__default.useState('');
|
|
9262
|
+
useEffect(() => {
|
|
9263
|
+
setItem(option);
|
|
9264
|
+
}, [option]);
|
|
9265
|
+
const sortItem = React__default.useCallback(() => {
|
|
9249
9266
|
if (sortBy === 'id') {
|
|
9250
9267
|
option.sort(function (a, b) {
|
|
9251
9268
|
const idA = a.id.toUpperCase(); // ignore upper and lowercase
|
|
@@ -9302,27 +9319,24 @@ function InputSelectCheck(_ref) {
|
|
|
9302
9319
|
return [...res, ...filterOption]; // add the missing elements
|
|
9303
9320
|
}
|
|
9304
9321
|
}, []) : option;
|
|
9305
|
-
|
|
9322
|
+
React__default.useEffect(() => {
|
|
9306
9323
|
if (selectedValue.length > 0 && disabledOptions.length === 0) {
|
|
9307
9324
|
setInitItem(sortValue);
|
|
9308
9325
|
setItem(sortValue);
|
|
9309
9326
|
}
|
|
9310
9327
|
}, []);
|
|
9311
|
-
|
|
9328
|
+
React__default.useEffect(() => {
|
|
9312
9329
|
sortItem();
|
|
9313
9330
|
}, [sortBy]);
|
|
9314
|
-
|
|
9331
|
+
React__default.useEffect(() => {
|
|
9315
9332
|
if (disabledOptions.length > 0) {
|
|
9316
9333
|
setInitItem(generateOptions(sortDisabled));
|
|
9317
9334
|
setItem(generateOptions(sortDisabled)); // setItem(generateOptions(option));
|
|
9318
9335
|
}
|
|
9319
9336
|
}, [disabledOptions]);
|
|
9320
|
-
|
|
9337
|
+
React__default.useEffect(() => {
|
|
9321
9338
|
setSelectedValue(value);
|
|
9322
9339
|
}, [value]);
|
|
9323
|
-
React.useEffect(() => {
|
|
9324
|
-
onChange && onChange(selectedValue);
|
|
9325
|
-
}, [selectedValue]);
|
|
9326
9340
|
const {
|
|
9327
9341
|
getSelectedItemProps,
|
|
9328
9342
|
getDropdownProps,
|
|
@@ -9373,6 +9387,7 @@ function InputSelectCheck(_ref) {
|
|
|
9373
9387
|
let filterItems = selectedValue.filter(item => item !== selected.id);
|
|
9374
9388
|
removeSelectedItem(selected);
|
|
9375
9389
|
setSelectedValue(filterItems);
|
|
9390
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(filterItems);
|
|
9376
9391
|
}
|
|
9377
9392
|
};
|
|
9378
9393
|
|
|
@@ -9417,6 +9432,7 @@ function InputSelectCheck(_ref) {
|
|
|
9417
9432
|
openMenu();
|
|
9418
9433
|
addSelectedItem(selectedItem);
|
|
9419
9434
|
setSelectedValue([...selectedValue, selectedItem.id]);
|
|
9435
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([...selectedValue, selectedItem.id]);
|
|
9420
9436
|
selectItem(null);
|
|
9421
9437
|
}
|
|
9422
9438
|
}
|
|
@@ -9427,26 +9443,26 @@ function InputSelectCheck(_ref) {
|
|
|
9427
9443
|
}
|
|
9428
9444
|
}
|
|
9429
9445
|
});
|
|
9430
|
-
return /*#__PURE__*/
|
|
9446
|
+
return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
|
|
9431
9447
|
css: css
|
|
9432
9448
|
}, props, {
|
|
9433
9449
|
__self: this,
|
|
9434
9450
|
__source: {
|
|
9435
9451
|
fileName: _jsxFileName$u,
|
|
9436
|
-
lineNumber:
|
|
9452
|
+
lineNumber: 404,
|
|
9437
9453
|
columnNumber: 5
|
|
9438
9454
|
}
|
|
9439
|
-
}), /*#__PURE__*/
|
|
9455
|
+
}), /*#__PURE__*/React__default.createElement(Select, {
|
|
9440
9456
|
size: size,
|
|
9441
9457
|
disabled: disabled || readOnly,
|
|
9442
9458
|
isInvalid: isInvalid,
|
|
9443
9459
|
__self: this,
|
|
9444
9460
|
__source: {
|
|
9445
9461
|
fileName: _jsxFileName$u,
|
|
9446
|
-
lineNumber:
|
|
9462
|
+
lineNumber: 405,
|
|
9447
9463
|
columnNumber: 7
|
|
9448
9464
|
}
|
|
9449
|
-
}, /*#__PURE__*/
|
|
9465
|
+
}, /*#__PURE__*/React__default.createElement(InputWrapper$1, _extends({}, getComboboxProps(getDropdownProps({
|
|
9450
9466
|
preventKeyAction: isOpen,
|
|
9451
9467
|
disabled: disabled || readOnly
|
|
9452
9468
|
})), {
|
|
@@ -9454,10 +9470,10 @@ function InputSelectCheck(_ref) {
|
|
|
9454
9470
|
__self: this,
|
|
9455
9471
|
__source: {
|
|
9456
9472
|
fileName: _jsxFileName$u,
|
|
9457
|
-
lineNumber:
|
|
9473
|
+
lineNumber: 406,
|
|
9458
9474
|
columnNumber: 9
|
|
9459
9475
|
}
|
|
9460
|
-
}), search ? /*#__PURE__*/
|
|
9476
|
+
}), search ? /*#__PURE__*/React__default.createElement(Input$6, _extends({}, getInputProps({
|
|
9461
9477
|
disabled: disabled || readOnly
|
|
9462
9478
|
}), {
|
|
9463
9479
|
placeholder: placeholder,
|
|
@@ -9465,10 +9481,10 @@ function InputSelectCheck(_ref) {
|
|
|
9465
9481
|
__self: this,
|
|
9466
9482
|
__source: {
|
|
9467
9483
|
fileName: _jsxFileName$u,
|
|
9468
|
-
lineNumber:
|
|
9484
|
+
lineNumber: 411,
|
|
9469
9485
|
columnNumber: 13
|
|
9470
9486
|
}
|
|
9471
|
-
})) : /*#__PURE__*/
|
|
9487
|
+
})) : /*#__PURE__*/React__default.createElement(Button$1, _extends({}, getToggleButtonProps({
|
|
9472
9488
|
disabled: disabled || readOnly
|
|
9473
9489
|
}), {
|
|
9474
9490
|
disabled: disabled || readOnly,
|
|
@@ -9477,10 +9493,10 @@ function InputSelectCheck(_ref) {
|
|
|
9477
9493
|
__self: this,
|
|
9478
9494
|
__source: {
|
|
9479
9495
|
fileName: _jsxFileName$u,
|
|
9480
|
-
lineNumber:
|
|
9496
|
+
lineNumber: 417,
|
|
9481
9497
|
columnNumber: 13
|
|
9482
9498
|
}
|
|
9483
|
-
}), placeholder)), /*#__PURE__*/
|
|
9499
|
+
}), placeholder)), /*#__PURE__*/React__default.createElement(IconWrapper, _extends({}, getToggleButtonProps({
|
|
9484
9500
|
disabled: disabled || readOnly
|
|
9485
9501
|
}), {
|
|
9486
9502
|
disabled: disabled,
|
|
@@ -9488,18 +9504,18 @@ function InputSelectCheck(_ref) {
|
|
|
9488
9504
|
__self: this,
|
|
9489
9505
|
__source: {
|
|
9490
9506
|
fileName: _jsxFileName$u,
|
|
9491
|
-
lineNumber:
|
|
9507
|
+
lineNumber: 427,
|
|
9492
9508
|
columnNumber: 9
|
|
9493
9509
|
}
|
|
9494
|
-
}), /*#__PURE__*/
|
|
9510
|
+
}), /*#__PURE__*/React__default.createElement(IconCaretDown, {
|
|
9495
9511
|
color: disabled || readOnly ? colors$4.iconDisable : colors$4.iconPrimary,
|
|
9496
9512
|
__self: this,
|
|
9497
9513
|
__source: {
|
|
9498
9514
|
fileName: _jsxFileName$u,
|
|
9499
|
-
lineNumber:
|
|
9515
|
+
lineNumber: 432,
|
|
9500
9516
|
columnNumber: 11
|
|
9501
9517
|
}
|
|
9502
|
-
}))), helperText && /*#__PURE__*/
|
|
9518
|
+
}))), helperText && /*#__PURE__*/React__default.createElement(Paragraph, {
|
|
9503
9519
|
shortContentRegular: true,
|
|
9504
9520
|
css: {
|
|
9505
9521
|
paddingTop: 8,
|
|
@@ -9509,18 +9525,18 @@ function InputSelectCheck(_ref) {
|
|
|
9509
9525
|
__self: this,
|
|
9510
9526
|
__source: {
|
|
9511
9527
|
fileName: _jsxFileName$u,
|
|
9512
|
-
lineNumber:
|
|
9528
|
+
lineNumber: 436,
|
|
9513
9529
|
columnNumber: 9
|
|
9514
9530
|
}
|
|
9515
|
-
}, helperText), showSelectedTag && selectedItems.length !== 0 && /*#__PURE__*/
|
|
9531
|
+
}, helperText), showSelectedTag && selectedItems.length !== 0 && /*#__PURE__*/React__default.createElement(TagWrapper$1, {
|
|
9516
9532
|
disabled: disabled,
|
|
9517
9533
|
__self: this,
|
|
9518
9534
|
__source: {
|
|
9519
9535
|
fileName: _jsxFileName$u,
|
|
9520
|
-
lineNumber:
|
|
9536
|
+
lineNumber: 441,
|
|
9521
9537
|
columnNumber: 9
|
|
9522
9538
|
}
|
|
9523
|
-
}, selectedItems.map((selectedItem, index) => /*#__PURE__*/
|
|
9539
|
+
}, selectedItems.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
|
|
9524
9540
|
isRemovable: readOnly || disabled ? false : true,
|
|
9525
9541
|
disabled: disabled,
|
|
9526
9542
|
size: "lg",
|
|
@@ -9541,10 +9557,10 @@ function InputSelectCheck(_ref) {
|
|
|
9541
9557
|
__self: this,
|
|
9542
9558
|
__source: {
|
|
9543
9559
|
fileName: _jsxFileName$u,
|
|
9544
|
-
lineNumber:
|
|
9560
|
+
lineNumber: 443,
|
|
9545
9561
|
columnNumber: 13
|
|
9546
9562
|
}
|
|
9547
|
-
}), selectedItem.name))), /*#__PURE__*/
|
|
9563
|
+
}), selectedItem.name))), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
|
|
9548
9564
|
placement: placement,
|
|
9549
9565
|
css: {
|
|
9550
9566
|
display: isOpen && disabled === false ? 'block' : 'none',
|
|
@@ -9553,17 +9569,17 @@ function InputSelectCheck(_ref) {
|
|
|
9553
9569
|
__self: this,
|
|
9554
9570
|
__source: {
|
|
9555
9571
|
fileName: _jsxFileName$u,
|
|
9556
|
-
lineNumber:
|
|
9572
|
+
lineNumber: 464,
|
|
9557
9573
|
columnNumber: 7
|
|
9558
9574
|
}
|
|
9559
|
-
}, item.length !== 0 ? /*#__PURE__*/
|
|
9575
|
+
}, item.length !== 0 ? /*#__PURE__*/React__default.createElement(Option, _extends({}, getMenuProps(), {
|
|
9560
9576
|
__self: this,
|
|
9561
9577
|
__source: {
|
|
9562
9578
|
fileName: _jsxFileName$u,
|
|
9563
|
-
lineNumber:
|
|
9579
|
+
lineNumber: 469,
|
|
9564
9580
|
columnNumber: 11
|
|
9565
9581
|
}
|
|
9566
|
-
}), isOpen && item.map((item, index) => /*#__PURE__*/
|
|
9582
|
+
}), isOpen && item.map((item, index) => /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
|
|
9567
9583
|
key: item.id
|
|
9568
9584
|
}, getItemProps({
|
|
9569
9585
|
item,
|
|
@@ -9578,10 +9594,10 @@ function InputSelectCheck(_ref) {
|
|
|
9578
9594
|
__self: this,
|
|
9579
9595
|
__source: {
|
|
9580
9596
|
fileName: _jsxFileName$u,
|
|
9581
|
-
lineNumber:
|
|
9597
|
+
lineNumber: 472,
|
|
9582
9598
|
columnNumber: 17
|
|
9583
9599
|
}
|
|
9584
|
-
}), /*#__PURE__*/
|
|
9600
|
+
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
9585
9601
|
css: {
|
|
9586
9602
|
width: '16px',
|
|
9587
9603
|
height: '16px',
|
|
@@ -9591,36 +9607,36 @@ function InputSelectCheck(_ref) {
|
|
|
9591
9607
|
__self: this,
|
|
9592
9608
|
__source: {
|
|
9593
9609
|
fileName: _jsxFileName$u,
|
|
9594
|
-
lineNumber:
|
|
9610
|
+
lineNumber: 485,
|
|
9595
9611
|
columnNumber: 19
|
|
9596
9612
|
}
|
|
9597
|
-
}, item.isDisabled ? /*#__PURE__*/
|
|
9613
|
+
}, item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
9598
9614
|
color: colors$4.iconDisable,
|
|
9599
9615
|
__self: this,
|
|
9600
9616
|
__source: {
|
|
9601
9617
|
fileName: _jsxFileName$u,
|
|
9602
|
-
lineNumber:
|
|
9618
|
+
lineNumber: 494,
|
|
9603
9619
|
columnNumber: 23
|
|
9604
9620
|
}
|
|
9605
|
-
}) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/
|
|
9621
|
+
}) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
9606
9622
|
color: colors$4.iconGreen,
|
|
9607
9623
|
__self: this,
|
|
9608
9624
|
__source: {
|
|
9609
9625
|
fileName: _jsxFileName$u,
|
|
9610
|
-
lineNumber:
|
|
9626
|
+
lineNumber: 498,
|
|
9611
9627
|
columnNumber: 25
|
|
9612
9628
|
}
|
|
9613
|
-
})), /*#__PURE__*/
|
|
9629
|
+
})), /*#__PURE__*/React__default.createElement(Item$2, {
|
|
9614
9630
|
css: {
|
|
9615
9631
|
backgroundColor: 'unset'
|
|
9616
9632
|
},
|
|
9617
9633
|
__self: this,
|
|
9618
9634
|
__source: {
|
|
9619
9635
|
fileName: _jsxFileName$u,
|
|
9620
|
-
lineNumber:
|
|
9636
|
+
lineNumber: 502,
|
|
9621
9637
|
columnNumber: 19
|
|
9622
9638
|
}
|
|
9623
|
-
}, item.name)))) : /*#__PURE__*/
|
|
9639
|
+
}, item.name)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
|
|
9624
9640
|
css: {
|
|
9625
9641
|
height: 'auto'
|
|
9626
9642
|
}
|
|
@@ -9628,27 +9644,27 @@ function InputSelectCheck(_ref) {
|
|
|
9628
9644
|
__self: this,
|
|
9629
9645
|
__source: {
|
|
9630
9646
|
fileName: _jsxFileName$u,
|
|
9631
|
-
lineNumber:
|
|
9647
|
+
lineNumber: 507,
|
|
9632
9648
|
columnNumber: 11
|
|
9633
9649
|
}
|
|
9634
|
-
}), /*#__PURE__*/
|
|
9650
|
+
}), /*#__PURE__*/React__default.createElement(StyledDiv$1, {
|
|
9635
9651
|
__self: this,
|
|
9636
9652
|
__source: {
|
|
9637
9653
|
fileName: _jsxFileName$u,
|
|
9638
|
-
lineNumber:
|
|
9654
|
+
lineNumber: 508,
|
|
9639
9655
|
columnNumber: 13
|
|
9640
9656
|
}
|
|
9641
|
-
}, /*#__PURE__*/
|
|
9657
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9642
9658
|
style: {
|
|
9643
9659
|
marginRight: '6px'
|
|
9644
9660
|
},
|
|
9645
9661
|
__self: this,
|
|
9646
9662
|
__source: {
|
|
9647
9663
|
fileName: _jsxFileName$u,
|
|
9648
|
-
lineNumber:
|
|
9664
|
+
lineNumber: 509,
|
|
9649
9665
|
columnNumber: 15
|
|
9650
9666
|
}
|
|
9651
|
-
}, /*#__PURE__*/
|
|
9667
|
+
}, /*#__PURE__*/React__default.createElement(CircleInfoOutline, {
|
|
9652
9668
|
size: "16px",
|
|
9653
9669
|
color: colors$4.iconDisable,
|
|
9654
9670
|
style: {
|
|
@@ -9657,7 +9673,7 @@ function InputSelectCheck(_ref) {
|
|
|
9657
9673
|
__self: this,
|
|
9658
9674
|
__source: {
|
|
9659
9675
|
fileName: _jsxFileName$u,
|
|
9660
|
-
lineNumber:
|
|
9676
|
+
lineNumber: 510,
|
|
9661
9677
|
columnNumber: 17
|
|
9662
9678
|
}
|
|
9663
9679
|
})), textEmptyItem))));
|
|
@@ -9812,7 +9828,7 @@ const InputWrapper = styled('div', {
|
|
|
9812
9828
|
}
|
|
9813
9829
|
}
|
|
9814
9830
|
});
|
|
9815
|
-
const Input$
|
|
9831
|
+
const Input$5 = styled('input', {
|
|
9816
9832
|
display: 'flex',
|
|
9817
9833
|
position: 'relative',
|
|
9818
9834
|
flex: 'auto',
|
|
@@ -9924,7 +9940,7 @@ function InputCreatable({
|
|
|
9924
9940
|
lineNumber: 168,
|
|
9925
9941
|
columnNumber: 7
|
|
9926
9942
|
}
|
|
9927
|
-
}, /*#__PURE__*/React__default.createElement(Input$
|
|
9943
|
+
}, /*#__PURE__*/React__default.createElement(Input$5, {
|
|
9928
9944
|
type: "text",
|
|
9929
9945
|
placeholder: placeholder,
|
|
9930
9946
|
disabled: disabled,
|
|
@@ -10299,6 +10315,220 @@ ResendOTP.defaultProps = {
|
|
|
10299
10315
|
timeInterval: 1000
|
|
10300
10316
|
};
|
|
10301
10317
|
|
|
10318
|
+
// a string of all valid unicode whitespaces
|
|
10319
|
+
var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
10320
|
+
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
10321
|
+
|
|
10322
|
+
var uncurryThis$e = functionUncurryThis;
|
|
10323
|
+
var requireObjectCoercible$4 = requireObjectCoercible$a;
|
|
10324
|
+
var toString$9 = toString$h;
|
|
10325
|
+
var whitespaces$3 = whitespaces$4;
|
|
10326
|
+
|
|
10327
|
+
var replace$4 = uncurryThis$e(''.replace);
|
|
10328
|
+
var whitespace = '[' + whitespaces$3 + ']';
|
|
10329
|
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
10330
|
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
10331
|
+
|
|
10332
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
10333
|
+
var createMethod$1 = function (TYPE) {
|
|
10334
|
+
return function ($this) {
|
|
10335
|
+
var string = toString$9(requireObjectCoercible$4($this));
|
|
10336
|
+
if (TYPE & 1) string = replace$4(string, ltrim, '');
|
|
10337
|
+
if (TYPE & 2) string = replace$4(string, rtrim, '');
|
|
10338
|
+
return string;
|
|
10339
|
+
};
|
|
10340
|
+
};
|
|
10341
|
+
|
|
10342
|
+
var stringTrim = {
|
|
10343
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
10344
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
10345
|
+
start: createMethod$1(1),
|
|
10346
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
10347
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
10348
|
+
end: createMethod$1(2),
|
|
10349
|
+
// `String.prototype.trim` method
|
|
10350
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
10351
|
+
trim: createMethod$1(3)
|
|
10352
|
+
};
|
|
10353
|
+
|
|
10354
|
+
var global$k = global$U;
|
|
10355
|
+
var fails$8 = fails$t;
|
|
10356
|
+
var uncurryThis$d = functionUncurryThis;
|
|
10357
|
+
var toString$8 = toString$h;
|
|
10358
|
+
var trim$1 = stringTrim.trim;
|
|
10359
|
+
var whitespaces$2 = whitespaces$4;
|
|
10360
|
+
|
|
10361
|
+
var $parseInt$1 = global$k.parseInt;
|
|
10362
|
+
var Symbol$6 = global$k.Symbol;
|
|
10363
|
+
var ITERATOR$6 = Symbol$6 && Symbol$6.iterator;
|
|
10364
|
+
var hex = /^[+-]?0x/i;
|
|
10365
|
+
var exec$4 = uncurryThis$d(hex.exec);
|
|
10366
|
+
var FORCED$2 = $parseInt$1(whitespaces$2 + '08') !== 8 || $parseInt$1(whitespaces$2 + '0x16') !== 22
|
|
10367
|
+
// MS Edge 18- broken with boxed symbols
|
|
10368
|
+
|| (ITERATOR$6 && !fails$8(function () { $parseInt$1(Object(ITERATOR$6)); }));
|
|
10369
|
+
|
|
10370
|
+
// `parseInt` method
|
|
10371
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
10372
|
+
var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
|
|
10373
|
+
var S = trim$1(toString$8(string));
|
|
10374
|
+
return $parseInt$1(S, (radix >>> 0) || (exec$4(hex, S) ? 16 : 10));
|
|
10375
|
+
} : $parseInt$1;
|
|
10376
|
+
|
|
10377
|
+
var $$d = _export;
|
|
10378
|
+
var $parseInt = numberParseInt;
|
|
10379
|
+
|
|
10380
|
+
// `parseInt` method
|
|
10381
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
10382
|
+
$$d({ global: true, forced: parseInt != $parseInt }, {
|
|
10383
|
+
parseInt: $parseInt
|
|
10384
|
+
});
|
|
10385
|
+
|
|
10386
|
+
const Input$4 = styled(InputNumber, {
|
|
10387
|
+
border: `1px solid $gray150`,
|
|
10388
|
+
borderLeft: 'none',
|
|
10389
|
+
borderRight: 'none',
|
|
10390
|
+
borderRadius: 0,
|
|
10391
|
+
textAlign: 'center',
|
|
10392
|
+
fontSize: 16,
|
|
10393
|
+
fontWeight: 600,
|
|
10394
|
+
color: '$textPrimary',
|
|
10395
|
+
userSelect: 'none',
|
|
10396
|
+
'&:disabled': {
|
|
10397
|
+
backgroundColor: '$btnDisable',
|
|
10398
|
+
border: `1px solid $gray150`,
|
|
10399
|
+
'&:hover': {
|
|
10400
|
+
borderColor: '$gray150'
|
|
10401
|
+
}
|
|
10402
|
+
}
|
|
10403
|
+
});
|
|
10404
|
+
const Button = styled(Button$3, {
|
|
10405
|
+
border: `1px solid $gray150 !important`,
|
|
10406
|
+
paddingRight: '16px !important',
|
|
10407
|
+
paddingLeft: '16px !important',
|
|
10408
|
+
'&:hover': {
|
|
10409
|
+
backgroundColor: '$primary50',
|
|
10410
|
+
border: '1px solid $btnPrimary !important'
|
|
10411
|
+
},
|
|
10412
|
+
'&:active': {
|
|
10413
|
+
backgroundColor: '$primary100',
|
|
10414
|
+
border: '1px solid $btnPrimary !important'
|
|
10415
|
+
},
|
|
10416
|
+
'&:focus': {
|
|
10417
|
+
outline: 0,
|
|
10418
|
+
backgroundColor: '$primary50',
|
|
10419
|
+
border: '1px solid $btnPrimary !important'
|
|
10420
|
+
},
|
|
10421
|
+
'&:disabled': {
|
|
10422
|
+
'&:hover': {
|
|
10423
|
+
borderColor: '$gray150 !important'
|
|
10424
|
+
}
|
|
10425
|
+
},
|
|
10426
|
+
variants: {
|
|
10427
|
+
counterType: {
|
|
10428
|
+
minus: {
|
|
10429
|
+
borderRight: 'none !important',
|
|
10430
|
+
borderTopRightRadius: '0px !important',
|
|
10431
|
+
borderBottomRightRadius: '0px !important',
|
|
10432
|
+
'&:disabled': {
|
|
10433
|
+
border: `1px solid $gray150 !important`
|
|
10434
|
+
}
|
|
10435
|
+
},
|
|
10436
|
+
plus: {
|
|
10437
|
+
borderLeft: 'none !important',
|
|
10438
|
+
borderTopLeftRadius: '0px !important',
|
|
10439
|
+
borderBottomLeftRadius: '0px !important',
|
|
10440
|
+
'&:disabled': {
|
|
10441
|
+
border: `1px solid $gray150 !important`
|
|
10442
|
+
}
|
|
10443
|
+
}
|
|
10444
|
+
}
|
|
10445
|
+
}
|
|
10446
|
+
});
|
|
10447
|
+
const InputCounter = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10448
|
+
var _a;
|
|
10449
|
+
|
|
10450
|
+
const {
|
|
10451
|
+
css,
|
|
10452
|
+
value,
|
|
10453
|
+
onChange,
|
|
10454
|
+
allowNegative,
|
|
10455
|
+
min,
|
|
10456
|
+
max,
|
|
10457
|
+
disabled
|
|
10458
|
+
} = props;
|
|
10459
|
+
const [inputValue, setInputValue] = useState((_a = min !== null && min !== void 0 ? min : value) !== null && _a !== void 0 ? _a : 0);
|
|
10460
|
+
useEffect(() => {
|
|
10461
|
+
if (min && inputValue < min) {
|
|
10462
|
+
setInputValue(min);
|
|
10463
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(min);
|
|
10464
|
+
}
|
|
10465
|
+
|
|
10466
|
+
if (max && inputValue > max) {
|
|
10467
|
+
setInputValue(max);
|
|
10468
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(max);
|
|
10469
|
+
}
|
|
10470
|
+
}, [inputValue, min, max, onChange]);
|
|
10471
|
+
|
|
10472
|
+
function handleUp() {
|
|
10473
|
+
if (!max || inputValue < max) {
|
|
10474
|
+
setInputValue(inputValue + 1);
|
|
10475
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(inputValue + 1);
|
|
10476
|
+
}
|
|
10477
|
+
}
|
|
10478
|
+
|
|
10479
|
+
function handleDown() {
|
|
10480
|
+
if (inputValue !== 0 || allowNegative) {
|
|
10481
|
+
if (!min || inputValue > min) {
|
|
10482
|
+
setInputValue(inputValue - 1);
|
|
10483
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(inputValue - 1);
|
|
10484
|
+
}
|
|
10485
|
+
}
|
|
10486
|
+
}
|
|
10487
|
+
|
|
10488
|
+
function handleChange(e) {
|
|
10489
|
+
setInputValue(parseInt(e.target.value));
|
|
10490
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parseInt(e.target.value));
|
|
10491
|
+
}
|
|
10492
|
+
|
|
10493
|
+
return jsxs(Flex$1, Object.assign({
|
|
10494
|
+
direction: "row",
|
|
10495
|
+
align: "center",
|
|
10496
|
+
css: css
|
|
10497
|
+
}, {
|
|
10498
|
+
children: [jsx(Button, Object.assign({
|
|
10499
|
+
disabled: disabled,
|
|
10500
|
+
buttonType: "secondary",
|
|
10501
|
+
counterType: "minus",
|
|
10502
|
+
icon: true,
|
|
10503
|
+
onClick: handleDown
|
|
10504
|
+
}, {
|
|
10505
|
+
children: jsx(MinusOutline, {
|
|
10506
|
+
color: disabled ? colors$4.iconDisable : colors$4.primary500
|
|
10507
|
+
}, void 0)
|
|
10508
|
+
}), void 0), jsx(Input$4, {
|
|
10509
|
+
ref: ref,
|
|
10510
|
+
disabled: disabled,
|
|
10511
|
+
value: inputValue,
|
|
10512
|
+
allowNegative: allowNegative,
|
|
10513
|
+
onChange: handleChange
|
|
10514
|
+
}, void 0), jsx(Button, Object.assign({
|
|
10515
|
+
disabled: disabled,
|
|
10516
|
+
buttonType: "secondary",
|
|
10517
|
+
counterType: "plus",
|
|
10518
|
+
icon: true,
|
|
10519
|
+
onClick: handleUp
|
|
10520
|
+
}, {
|
|
10521
|
+
children: jsx(PlusOutline, {
|
|
10522
|
+
color: disabled ? colors$4.iconDisable : colors$4.primary500
|
|
10523
|
+
}, void 0)
|
|
10524
|
+
}), void 0)]
|
|
10525
|
+
}), void 0);
|
|
10526
|
+
});
|
|
10527
|
+
InputCounter.defaultProps = {
|
|
10528
|
+
allowNegative: false,
|
|
10529
|
+
disabled: false
|
|
10530
|
+
};
|
|
10531
|
+
|
|
10302
10532
|
const _excluded$b = ["children"];
|
|
10303
10533
|
var _jsxFileName$r = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\popover\\Popover.js";
|
|
10304
10534
|
const {
|
|
@@ -10390,8 +10620,8 @@ const PopoverContent = ({
|
|
|
10390
10620
|
ref: floating,
|
|
10391
10621
|
style: Object.assign({
|
|
10392
10622
|
position: strategy,
|
|
10393
|
-
top: isMobile ? 0 : y
|
|
10394
|
-
left: isMobile ? 0 : x
|
|
10623
|
+
top: isMobile ? 0 : y !== null && y !== void 0 ? y : '',
|
|
10624
|
+
left: isMobile ? 0 : x !== null && x !== void 0 ? x : '',
|
|
10395
10625
|
zIndex: zIndices.popover
|
|
10396
10626
|
}, style)
|
|
10397
10627
|
}), {
|
|
@@ -11216,74 +11446,6 @@ ButtonGroupItem.defaultProps = {
|
|
|
11216
11446
|
isToggle: true
|
|
11217
11447
|
};
|
|
11218
11448
|
|
|
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
11449
|
const _excluded$7 = ["children"];
|
|
11288
11450
|
var _jsxFileName$n = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\notificationBadge\\NotificationBadge.js";
|
|
11289
11451
|
const NotificationBadgeRootStyle = styled('span', {
|
|
@@ -11385,7 +11547,7 @@ const NotificationBadge = _ref => {
|
|
|
11385
11547
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
11386
11548
|
|
|
11387
11549
|
const getValue = () => {
|
|
11388
|
-
let value = props
|
|
11550
|
+
let value = props === null || props === void 0 ? void 0 : props.value;
|
|
11389
11551
|
|
|
11390
11552
|
if (typeof value === 'number' || parseInt(value)) {
|
|
11391
11553
|
if (Math.sign(value) === 1 || Math.sign(value) === 0) {
|
|
@@ -13980,7 +14142,7 @@ const CalendarBox = ({
|
|
|
13980
14142
|
}), void 0), jsxs(Flex$1, Object.assign({
|
|
13981
14143
|
gap: 3
|
|
13982
14144
|
}, {
|
|
13983
|
-
children: [jsx(Button$
|
|
14145
|
+
children: [jsx(Button$3, Object.assign({
|
|
13984
14146
|
buttonType: "ghost",
|
|
13985
14147
|
css: {
|
|
13986
14148
|
fontWeight: 600
|
|
@@ -13990,7 +14152,7 @@ const CalendarBox = ({
|
|
|
13990
14152
|
size: "sm"
|
|
13991
14153
|
}, {
|
|
13992
14154
|
children: "Batal"
|
|
13993
|
-
}), void 0), jsx(Button$
|
|
14155
|
+
}), void 0), jsx(Button$3, Object.assign({
|
|
13994
14156
|
css: {
|
|
13995
14157
|
fontWeight: 600
|
|
13996
14158
|
},
|
|
@@ -14557,7 +14719,7 @@ const MobileCalendarBox = ({
|
|
|
14557
14719
|
}), void 0), jsxs(Flex$1, Object.assign({
|
|
14558
14720
|
gap: 3
|
|
14559
14721
|
}, {
|
|
14560
|
-
children: [jsx(Button$
|
|
14722
|
+
children: [jsx(Button$3, Object.assign({
|
|
14561
14723
|
buttonType: "ghost",
|
|
14562
14724
|
size: "sm",
|
|
14563
14725
|
css: {
|
|
@@ -14570,7 +14732,7 @@ const MobileCalendarBox = ({
|
|
|
14570
14732
|
disabled: disabled
|
|
14571
14733
|
}, {
|
|
14572
14734
|
children: "Batal"
|
|
14573
|
-
}), void 0), jsx(Button$
|
|
14735
|
+
}), void 0), jsx(Button$3, Object.assign({
|
|
14574
14736
|
size: "sm",
|
|
14575
14737
|
css: {
|
|
14576
14738
|
width: '160px',
|
|
@@ -15761,7 +15923,7 @@ const PageButton = _ref => {
|
|
|
15761
15923
|
} = _ref,
|
|
15762
15924
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
15763
15925
|
|
|
15764
|
-
return /*#__PURE__*/React__default.createElement(Button$
|
|
15926
|
+
return /*#__PURE__*/React__default.createElement(Button$3, _extends({
|
|
15765
15927
|
onClick: onClick,
|
|
15766
15928
|
buttonType: !isActive ? 'ghost' : 'primary',
|
|
15767
15929
|
css: {
|
|
@@ -16109,7 +16271,7 @@ function PaginationInfo(_ref) {
|
|
|
16109
16271
|
lineNumber: 40,
|
|
16110
16272
|
columnNumber: 11
|
|
16111
16273
|
}
|
|
16112
|
-
}, limits
|
|
16274
|
+
}, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
|
|
16113
16275
|
key: limit,
|
|
16114
16276
|
css: limitItemContainerStyle(selectedLimit === limit),
|
|
16115
16277
|
onClick: () => onChange(limit),
|
|
@@ -18449,7 +18611,7 @@ const TemplateAlertFunction = props => {
|
|
|
18449
18611
|
if (!props.onOpenAutoFocus) {
|
|
18450
18612
|
e.preventDefault();
|
|
18451
18613
|
} else {
|
|
18452
|
-
props
|
|
18614
|
+
props === null || props === void 0 ? void 0 : props.onOpenAutoFocus();
|
|
18453
18615
|
}
|
|
18454
18616
|
},
|
|
18455
18617
|
__self: undefined,
|
|
@@ -18566,12 +18728,12 @@ const TemplateAlertFunction = props => {
|
|
|
18566
18728
|
lineNumber: 157,
|
|
18567
18729
|
columnNumber: 15
|
|
18568
18730
|
}
|
|
18569
|
-
}, /*#__PURE__*/React__default.createElement(Button$
|
|
18731
|
+
}, /*#__PURE__*/React__default.createElement(Button$3, _extends({
|
|
18570
18732
|
size: "sm",
|
|
18571
18733
|
onClick: buttonConfirm,
|
|
18572
18734
|
buttonType: props.dialogType,
|
|
18573
|
-
disabled: props
|
|
18574
|
-
}, props
|
|
18735
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
18736
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
18575
18737
|
__self: undefined,
|
|
18576
18738
|
__source: {
|
|
18577
18739
|
fileName: _jsxFileName$b,
|
|
@@ -18586,16 +18748,16 @@ const TemplateAlertFunction = props => {
|
|
|
18586
18748
|
lineNumber: 170,
|
|
18587
18749
|
columnNumber: 17
|
|
18588
18750
|
}
|
|
18589
|
-
}, /*#__PURE__*/React__default.createElement(Button$
|
|
18751
|
+
}, /*#__PURE__*/React__default.createElement(Button$3, _extends({
|
|
18590
18752
|
size: "sm",
|
|
18591
18753
|
onClick: buttonCancel,
|
|
18592
18754
|
css: {
|
|
18593
|
-
color: props.dialogType === 'negative' && !(props
|
|
18755
|
+
color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
|
|
18594
18756
|
flex: props.isMobile && 1
|
|
18595
18757
|
},
|
|
18596
18758
|
buttonType: "ghost",
|
|
18597
|
-
disabled: props
|
|
18598
|
-
}, props
|
|
18759
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
18760
|
+
}, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
|
|
18599
18761
|
__self: undefined,
|
|
18600
18762
|
__source: {
|
|
18601
18763
|
fileName: _jsxFileName$b,
|
|
@@ -18610,15 +18772,15 @@ const TemplateAlertFunction = props => {
|
|
|
18610
18772
|
lineNumber: 185,
|
|
18611
18773
|
columnNumber: 17
|
|
18612
18774
|
}
|
|
18613
|
-
}, /*#__PURE__*/React__default.createElement(Button$
|
|
18775
|
+
}, /*#__PURE__*/React__default.createElement(Button$3, _extends({
|
|
18614
18776
|
size: "sm",
|
|
18615
18777
|
onClick: buttonConfirm,
|
|
18616
18778
|
buttonType: props.dialogType,
|
|
18617
18779
|
css: {
|
|
18618
18780
|
flex: props.isMobile && 1
|
|
18619
18781
|
},
|
|
18620
|
-
disabled: props
|
|
18621
|
-
}, props
|
|
18782
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
18783
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
18622
18784
|
__self: undefined,
|
|
18623
18785
|
__source: {
|
|
18624
18786
|
fileName: _jsxFileName$b,
|
|
@@ -18770,15 +18932,15 @@ function AlertDialog(props) {
|
|
|
18770
18932
|
lineNumber: 242,
|
|
18771
18933
|
columnNumber: 15
|
|
18772
18934
|
}
|
|
18773
|
-
}, /*#__PURE__*/React__default.createElement(Button$
|
|
18935
|
+
}, /*#__PURE__*/React__default.createElement(Button$3, _extends({
|
|
18774
18936
|
size: "sm",
|
|
18775
18937
|
onClick: props.onConfirm,
|
|
18776
18938
|
buttonType: props.dialogType,
|
|
18777
18939
|
css: {
|
|
18778
18940
|
flex: props.isMobile && 1
|
|
18779
18941
|
},
|
|
18780
|
-
disabled: props
|
|
18781
|
-
}, props
|
|
18942
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
18943
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
18782
18944
|
__self: this,
|
|
18783
18945
|
__source: {
|
|
18784
18946
|
fileName: _jsxFileName$b,
|
|
@@ -18793,16 +18955,16 @@ function AlertDialog(props) {
|
|
|
18793
18955
|
lineNumber: 256,
|
|
18794
18956
|
columnNumber: 17
|
|
18795
18957
|
}
|
|
18796
|
-
}, /*#__PURE__*/React__default.createElement(Button$
|
|
18958
|
+
}, /*#__PURE__*/React__default.createElement(Button$3, _extends({
|
|
18797
18959
|
size: "sm",
|
|
18798
18960
|
onClick: props.onCancel,
|
|
18799
18961
|
css: {
|
|
18800
|
-
color: props.dialogType === 'negative' && !(props
|
|
18962
|
+
color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
|
|
18801
18963
|
flex: props.isMobile && 1
|
|
18802
18964
|
},
|
|
18803
18965
|
buttonType: "ghost",
|
|
18804
|
-
disabled: props
|
|
18805
|
-
}, props
|
|
18966
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
18967
|
+
}, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
|
|
18806
18968
|
__self: this,
|
|
18807
18969
|
__source: {
|
|
18808
18970
|
fileName: _jsxFileName$b,
|
|
@@ -18817,15 +18979,15 @@ function AlertDialog(props) {
|
|
|
18817
18979
|
lineNumber: 271,
|
|
18818
18980
|
columnNumber: 17
|
|
18819
18981
|
}
|
|
18820
|
-
}, /*#__PURE__*/React__default.createElement(Button$
|
|
18982
|
+
}, /*#__PURE__*/React__default.createElement(Button$3, _extends({
|
|
18821
18983
|
size: "sm",
|
|
18822
18984
|
onClick: props.onConfirm,
|
|
18823
18985
|
buttonType: props.dialogType,
|
|
18824
18986
|
css: {
|
|
18825
18987
|
flex: props.isMobile && 1
|
|
18826
18988
|
},
|
|
18827
|
-
disabled: props
|
|
18828
|
-
}, props
|
|
18989
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
18990
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
18829
18991
|
__self: this,
|
|
18830
18992
|
__source: {
|
|
18831
18993
|
fileName: _jsxFileName$b,
|
|
@@ -21306,7 +21468,7 @@ const Upload = ({
|
|
|
21306
21468
|
file: fileProgress,
|
|
21307
21469
|
indexReplace: indexReplace.current,
|
|
21308
21470
|
isReplace: indexReplace.current !== null
|
|
21309
|
-
}))
|
|
21471
|
+
})) === 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
21472
|
}
|
|
21311
21473
|
}).then(result => {
|
|
21312
21474
|
var _onChange2, _onChange2$then;
|
|
@@ -21328,7 +21490,7 @@ const Upload = ({
|
|
|
21328
21490
|
file: fileSuccess,
|
|
21329
21491
|
indexReplace: indexReplace.current,
|
|
21330
21492
|
isReplace: indexReplace.current !== null
|
|
21331
|
-
}))
|
|
21493
|
+
})) === 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
21494
|
}).catch(error => {
|
|
21333
21495
|
var _onChange3, _onChange3$then;
|
|
21334
21496
|
|
|
@@ -21349,7 +21511,7 @@ const Upload = ({
|
|
|
21349
21511
|
file: fileError,
|
|
21350
21512
|
indexReplace: indexReplace.current,
|
|
21351
21513
|
isReplace: indexReplace.current !== null
|
|
21352
|
-
}))
|
|
21514
|
+
})) === 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
21515
|
});
|
|
21354
21516
|
} else {
|
|
21355
21517
|
var _onChange4, _onChange4$then;
|
|
@@ -21359,7 +21521,7 @@ const Upload = ({
|
|
|
21359
21521
|
file: newFile,
|
|
21360
21522
|
indexReplace: indexReplace.current,
|
|
21361
21523
|
isReplace: indexReplace.current !== null
|
|
21362
|
-
}))
|
|
21524
|
+
})) === 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
21525
|
}
|
|
21364
21526
|
|
|
21365
21527
|
if (indexReplace.current !== null) {
|
|
@@ -21386,9 +21548,9 @@ const Upload = ({
|
|
|
21386
21548
|
}
|
|
21387
21549
|
|
|
21388
21550
|
function handleCrop() {
|
|
21389
|
-
if (completedCrop
|
|
21551
|
+
if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
|
|
21390
21552
|
imgPreview(imgRef.current, completedCrop, 1, 0, ratio).then(blob => {
|
|
21391
|
-
const file = new File([blob], fileState
|
|
21553
|
+
const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
|
|
21392
21554
|
type: blob.type
|
|
21393
21555
|
});
|
|
21394
21556
|
handleUpload([file]);
|
|
@@ -21456,22 +21618,22 @@ const Upload = ({
|
|
|
21456
21618
|
function handleOpenFile(file) {
|
|
21457
21619
|
var _String, _file$name;
|
|
21458
21620
|
|
|
21459
|
-
let extension = (_String = String(file
|
|
21621
|
+
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
21622
|
|
|
21461
21623
|
if (extension === 'pdf') {
|
|
21462
|
-
window.open(file
|
|
21624
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21463
21625
|
} else {
|
|
21464
|
-
request.get(file
|
|
21626
|
+
request.get(file === null || file === void 0 ? void 0 : file.url).end((err, res) => {
|
|
21465
21627
|
if (err) {
|
|
21466
21628
|
console.error(err.message);
|
|
21467
21629
|
}
|
|
21468
21630
|
|
|
21469
|
-
if (res && res
|
|
21470
|
-
const response = res
|
|
21631
|
+
if (res && res !== null && res !== void 0 && res.ok) {
|
|
21632
|
+
const response = res === null || res === void 0 ? void 0 : res.text;
|
|
21471
21633
|
const url = window.URL.createObjectURL(new Blob([response]));
|
|
21472
21634
|
const link = document.createElement('a');
|
|
21473
21635
|
link.href = url;
|
|
21474
|
-
link.setAttribute('download', file
|
|
21636
|
+
link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
|
|
21475
21637
|
document.body.appendChild(link);
|
|
21476
21638
|
link.click();
|
|
21477
21639
|
document.body.removeChild(link);
|
|
@@ -21541,12 +21703,12 @@ const Upload = ({
|
|
|
21541
21703
|
}
|
|
21542
21704
|
|
|
21543
21705
|
const renderPicture = () => {
|
|
21544
|
-
return fileList
|
|
21545
|
-
if ((item
|
|
21706
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
|
|
21707
|
+
if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
|
|
21546
21708
|
return /*#__PURE__*/React__default.createElement(UploadProgress, {
|
|
21547
21709
|
key: index,
|
|
21548
|
-
progress: item
|
|
21549
|
-
loading: item
|
|
21710
|
+
progress: item === null || item === void 0 ? void 0 : item.percent,
|
|
21711
|
+
loading: item === null || item === void 0 ? void 0 : item.loading,
|
|
21550
21712
|
__self: undefined,
|
|
21551
21713
|
__source: {
|
|
21552
21714
|
fileName: _jsxFileName$9,
|
|
@@ -21621,14 +21783,14 @@ const Upload = ({
|
|
|
21621
21783
|
};
|
|
21622
21784
|
|
|
21623
21785
|
const renderFile = () => {
|
|
21624
|
-
return fileList
|
|
21786
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
|
|
21625
21787
|
var _item$name;
|
|
21626
21788
|
|
|
21627
|
-
if ((item
|
|
21789
|
+
if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
|
|
21628
21790
|
return /*#__PURE__*/React__default.createElement(UploadProgress, {
|
|
21629
21791
|
key: index,
|
|
21630
|
-
progress: item
|
|
21631
|
-
loading: item
|
|
21792
|
+
progress: item === null || item === void 0 ? void 0 : item.percent,
|
|
21793
|
+
loading: item === null || item === void 0 ? void 0 : item.loading,
|
|
21632
21794
|
__self: undefined,
|
|
21633
21795
|
__source: {
|
|
21634
21796
|
fileName: _jsxFileName$9,
|
|
@@ -21695,7 +21857,7 @@ const Upload = ({
|
|
|
21695
21857
|
lineNumber: 611,
|
|
21696
21858
|
columnNumber: 17
|
|
21697
21859
|
}
|
|
21698
|
-
}, ".", item
|
|
21860
|
+
}, ".", 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
21861
|
label: item.name,
|
|
21700
21862
|
__self: undefined,
|
|
21701
21863
|
__source: {
|
|
@@ -21867,7 +22029,7 @@ const Upload = ({
|
|
|
21867
22029
|
lineNumber: 686,
|
|
21868
22030
|
columnNumber: 11
|
|
21869
22031
|
}
|
|
21870
|
-
}, children
|
|
22032
|
+
}, children !== null && children !== void 0 ? children : /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
21871
22033
|
__self: this,
|
|
21872
22034
|
__source: {
|
|
21873
22035
|
fileName: _jsxFileName$9,
|
|
@@ -21901,7 +22063,7 @@ const Upload = ({
|
|
|
21901
22063
|
lineNumber: 692,
|
|
21902
22064
|
columnNumber: 17
|
|
21903
22065
|
}
|
|
21904
|
-
}, placeholder
|
|
22066
|
+
}, placeholder !== null && placeholder !== void 0 ? placeholder : `Pilih atau letakkan ${isFile ? 'berkas' : 'gambar'} di sini`)))), error && /*#__PURE__*/React__default.createElement(ErrorMessage, {
|
|
21905
22067
|
__self: this,
|
|
21906
22068
|
__source: {
|
|
21907
22069
|
fileName: _jsxFileName$9,
|
|
@@ -22031,7 +22193,7 @@ const Upload = ({
|
|
|
22031
22193
|
lineNumber: 727,
|
|
22032
22194
|
columnNumber: 13
|
|
22033
22195
|
}
|
|
22034
|
-
}, /*#__PURE__*/React__default.createElement(Button$
|
|
22196
|
+
}, /*#__PURE__*/React__default.createElement(Button$3, {
|
|
22035
22197
|
buttonType: "secondary",
|
|
22036
22198
|
onClick: toggleModal,
|
|
22037
22199
|
__self: this,
|
|
@@ -22040,7 +22202,7 @@ const Upload = ({
|
|
|
22040
22202
|
lineNumber: 728,
|
|
22041
22203
|
columnNumber: 15
|
|
22042
22204
|
}
|
|
22043
|
-
}, "Batal"), /*#__PURE__*/React__default.createElement(Button$
|
|
22205
|
+
}, "Batal"), /*#__PURE__*/React__default.createElement(Button$3, {
|
|
22044
22206
|
onClick: handleCrop,
|
|
22045
22207
|
__self: this,
|
|
22046
22208
|
__source: {
|
|
@@ -22048,12 +22210,12 @@ const Upload = ({
|
|
|
22048
22210
|
lineNumber: 731,
|
|
22049
22211
|
columnNumber: 15
|
|
22050
22212
|
}
|
|
22051
|
-
}, `${completedCrop
|
|
22213
|
+
}, `${completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height ? 'Potong & Simpan' : 'Simpan'}`)))));
|
|
22052
22214
|
}
|
|
22053
22215
|
|
|
22054
22216
|
return /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
22055
22217
|
direction: "row",
|
|
22056
|
-
gap: (fileList
|
|
22218
|
+
gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
|
|
22057
22219
|
wrap: "wrap",
|
|
22058
22220
|
css: {
|
|
22059
22221
|
userSelect: 'none'
|
|
@@ -22475,10 +22637,10 @@ function InputColorPicker(props) {
|
|
|
22475
22637
|
const [isPopover, setIsPopover] = useState(false);
|
|
22476
22638
|
|
|
22477
22639
|
function getColor() {
|
|
22478
|
-
const color = props
|
|
22640
|
+
const color = props === null || props === void 0 ? void 0 : props.color;
|
|
22479
22641
|
|
|
22480
22642
|
if (typeof color === 'string') {
|
|
22481
|
-
return color
|
|
22643
|
+
return color === null || color === void 0 ? void 0 : color.toUpperCase();
|
|
22482
22644
|
}
|
|
22483
22645
|
|
|
22484
22646
|
return `rgba(${color.r},${color.g},${color.b},${color.a})`;
|
|
@@ -25448,9 +25610,9 @@ const Navigation = props => {
|
|
|
25448
25610
|
lineNumber: 119,
|
|
25449
25611
|
columnNumber: 30
|
|
25450
25612
|
}
|
|
25451
|
-
}), data[i - 1].title, ((_data = data[i - 1])
|
|
25613
|
+
}), data[i - 1].title, ((_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
25452
25614
|
align: "center",
|
|
25453
|
-
label: (_data2 = data[i - 1])
|
|
25615
|
+
label: (_data2 = data[i - 1]) === null || _data2 === void 0 ? void 0 : _data2.tooltipsContents,
|
|
25454
25616
|
__self: undefined,
|
|
25455
25617
|
__source: {
|
|
25456
25618
|
fileName: _jsxFileName$4,
|
|
@@ -25521,10 +25683,10 @@ const Navigation = props => {
|
|
|
25521
25683
|
lineNumber: 155,
|
|
25522
25684
|
columnNumber: 15
|
|
25523
25685
|
}
|
|
25524
|
-
}, isActive ? data[i - 1].title : ''), isActive && ((_data3 = data[i - 1])
|
|
25686
|
+
}, 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
25687
|
align: "center",
|
|
25526
25688
|
withClick: true,
|
|
25527
|
-
label: (_data4 = data[i - 1])
|
|
25689
|
+
label: (_data4 = data[i - 1]) === null || _data4 === void 0 ? void 0 : _data4.tooltipsContents,
|
|
25528
25690
|
__self: undefined,
|
|
25529
25691
|
__source: {
|
|
25530
25692
|
fileName: _jsxFileName$4,
|
|
@@ -25592,30 +25754,38 @@ const Navigation = props => {
|
|
|
25592
25754
|
const Default = props => {
|
|
25593
25755
|
const [state, updateState] = React__default.useState(Object.assign({
|
|
25594
25756
|
isComplete: [],
|
|
25595
|
-
hide: false
|
|
25757
|
+
hide: props.hide || false
|
|
25596
25758
|
}, props.state));
|
|
25597
25759
|
useEffect(() => {
|
|
25598
25760
|
updateState(current => Object.assign({}, current, {
|
|
25599
25761
|
isComplete: props.completedSteps || []
|
|
25600
25762
|
}));
|
|
25601
25763
|
}, [props.completedSteps]);
|
|
25764
|
+
useEffect(() => {
|
|
25765
|
+
updateState(prev => Object.assign({}, prev, {
|
|
25766
|
+
hide: props.hide
|
|
25767
|
+
}));
|
|
25768
|
+
}, [props.hide]);
|
|
25769
|
+
useEffect(() => {
|
|
25770
|
+
props.onChangeVisibility(state.hide);
|
|
25771
|
+
}, [state.hide]);
|
|
25602
25772
|
|
|
25603
25773
|
const toogleVisibility = value => {
|
|
25604
|
-
updateState(Object.assign({},
|
|
25605
|
-
hide: !
|
|
25774
|
+
updateState(prev => Object.assign({}, prev, {
|
|
25775
|
+
hide: !prev.hide
|
|
25606
25776
|
}));
|
|
25607
25777
|
};
|
|
25608
25778
|
|
|
25609
25779
|
const getIsComplete = currentStep => {
|
|
25610
25780
|
var _state$isComplete;
|
|
25611
25781
|
|
|
25612
|
-
return state
|
|
25782
|
+
return state === null || state === void 0 ? void 0 : (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
|
|
25613
25783
|
};
|
|
25614
25784
|
|
|
25615
25785
|
const getTitleStep = currentStep => {
|
|
25616
25786
|
var _props$navContents, _props$navContents2;
|
|
25617
25787
|
|
|
25618
|
-
return props
|
|
25788
|
+
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
25789
|
};
|
|
25620
25790
|
|
|
25621
25791
|
const setState = value => {
|
|
@@ -25661,17 +25831,17 @@ const Default = props => {
|
|
|
25661
25831
|
__self: undefined,
|
|
25662
25832
|
__source: {
|
|
25663
25833
|
fileName: _jsxFileName$4,
|
|
25664
|
-
lineNumber:
|
|
25834
|
+
lineNumber: 273,
|
|
25665
25835
|
columnNumber: 5
|
|
25666
25836
|
}
|
|
25667
25837
|
}, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
|
|
25668
25838
|
value: {
|
|
25669
25839
|
toogleVisibility,
|
|
25670
|
-
isHide: state
|
|
25840
|
+
isHide: state === null || state === void 0 ? void 0 : state.hide,
|
|
25671
25841
|
setComplete,
|
|
25672
25842
|
setState,
|
|
25673
25843
|
state,
|
|
25674
|
-
SW: state
|
|
25844
|
+
SW: state === null || state === void 0 ? void 0 : state.SW,
|
|
25675
25845
|
forbidClickNav: props.forbidClickNav,
|
|
25676
25846
|
titles: props.titles,
|
|
25677
25847
|
isMobile: props.isMobile,
|
|
@@ -25683,7 +25853,7 @@ const Default = props => {
|
|
|
25683
25853
|
__self: undefined,
|
|
25684
25854
|
__source: {
|
|
25685
25855
|
fileName: _jsxFileName$4,
|
|
25686
|
-
lineNumber:
|
|
25856
|
+
lineNumber: 274,
|
|
25687
25857
|
columnNumber: 7
|
|
25688
25858
|
}
|
|
25689
25859
|
}, /*#__PURE__*/React__default.createElement(Stepper, _extends({}, props, {
|
|
@@ -25695,7 +25865,7 @@ const Default = props => {
|
|
|
25695
25865
|
__self: undefined,
|
|
25696
25866
|
__source: {
|
|
25697
25867
|
fileName: _jsxFileName$4,
|
|
25698
|
-
lineNumber:
|
|
25868
|
+
lineNumber: 296,
|
|
25699
25869
|
columnNumber: 16
|
|
25700
25870
|
}
|
|
25701
25871
|
}),
|
|
@@ -25705,7 +25875,7 @@ const Default = props => {
|
|
|
25705
25875
|
__self: undefined,
|
|
25706
25876
|
__source: {
|
|
25707
25877
|
fileName: _jsxFileName$4,
|
|
25708
|
-
lineNumber:
|
|
25878
|
+
lineNumber: 291,
|
|
25709
25879
|
columnNumber: 9
|
|
25710
25880
|
}
|
|
25711
25881
|
}), props.children)));
|
|
@@ -25843,10 +26013,10 @@ function Content({
|
|
|
25843
26013
|
function getDatasets(content, activeId, isCollapse) {
|
|
25844
26014
|
const datasets = [];
|
|
25845
26015
|
|
|
25846
|
-
for (let i = 0; i < (content
|
|
26016
|
+
for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
|
|
25847
26017
|
var _content$i;
|
|
25848
26018
|
|
|
25849
|
-
if (((_content$i = content[i])
|
|
26019
|
+
if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
|
|
25850
26020
|
datasets.unshift(content[i]);
|
|
25851
26021
|
} else {
|
|
25852
26022
|
datasets.push(content[i]);
|
|
@@ -25886,7 +26056,7 @@ function Content({
|
|
|
25886
26056
|
lineNumber: 99,
|
|
25887
26057
|
columnNumber: 7
|
|
25888
26058
|
}
|
|
25889
|
-
}, (_getDatasets = getDatasets(content, activeId, isCollapse))
|
|
26059
|
+
}, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
|
|
25890
26060
|
return /*#__PURE__*/React__default.createElement(List, {
|
|
25891
26061
|
key: index,
|
|
25892
26062
|
__self: this,
|
|
@@ -25903,11 +26073,11 @@ function Content({
|
|
|
25903
26073
|
marginLeft: '-4px !important',
|
|
25904
26074
|
borderLeftWidth: '4px !important',
|
|
25905
26075
|
borderLeftStyle: 'solid !important',
|
|
25906
|
-
borderLeftColor: `${(item
|
|
26076
|
+
borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
|
|
25907
26077
|
paddingLeft: '16px !important',
|
|
25908
26078
|
minHeight: 25
|
|
25909
26079
|
},
|
|
25910
|
-
"data-to-scrollspy-id": item
|
|
26080
|
+
"data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
|
|
25911
26081
|
__self: this,
|
|
25912
26082
|
__source: {
|
|
25913
26083
|
fileName: _jsxFileName$2,
|
|
@@ -25916,8 +26086,8 @@ function Content({
|
|
|
25916
26086
|
}
|
|
25917
26087
|
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
25918
26088
|
className: "link-title",
|
|
25919
|
-
active: (item
|
|
25920
|
-
href: `#${item
|
|
26089
|
+
active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
|
|
26090
|
+
href: `#${item === null || item === void 0 ? void 0 : item.id}`,
|
|
25921
26091
|
onClick: e => {
|
|
25922
26092
|
e.preventDefault();
|
|
25923
26093
|
const target = window.document.getElementById(e.currentTarget.href.split('#')[1]);
|
|
@@ -25946,7 +26116,7 @@ function Content({
|
|
|
25946
26116
|
lineNumber: 117,
|
|
25947
26117
|
columnNumber: 17
|
|
25948
26118
|
}
|
|
25949
|
-
}, item
|
|
26119
|
+
}, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
|
|
25950
26120
|
})));
|
|
25951
26121
|
}
|
|
25952
26122
|
|
|
@@ -27506,7 +27676,7 @@ function InputMapPicker(props) {
|
|
|
27506
27676
|
isTruncated: true
|
|
27507
27677
|
}, {
|
|
27508
27678
|
children: inputValue
|
|
27509
|
-
}), void 0), jsx(Button$
|
|
27679
|
+
}), void 0), jsx(Button$3, Object.assign({
|
|
27510
27680
|
type: "button",
|
|
27511
27681
|
size: "sm",
|
|
27512
27682
|
buttonType: "secondary",
|
|
@@ -27951,7 +28121,7 @@ const ComparatorController = ({
|
|
|
27951
28121
|
}
|
|
27952
28122
|
}
|
|
27953
28123
|
}, {
|
|
27954
|
-
children: jsx(Button$
|
|
28124
|
+
children: jsx(Button$3, Object.assign({
|
|
27955
28125
|
buttonType: "ghost",
|
|
27956
28126
|
css: {
|
|
27957
28127
|
fontWeight: 600,
|
|
@@ -30135,4 +30305,4 @@ const useToggle = initialValue => {
|
|
|
30135
30305
|
return useReducer(toggleReducer, initialValue);
|
|
30136
30306
|
};
|
|
30137
30307
|
|
|
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$
|
|
30308
|
+
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, 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 };
|