sag_components 2.0.0-beta176 → 2.0.0-beta177
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/dist/index.d.ts +14 -1
- package/dist/index.esm.js +214 -130
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +214 -130
- package/dist/index.js.map +1 -1
- package/dist/types/components/Input/Input.d.ts +14 -1
- package/dist/types/components/Input/Input.stories.d.ts +85 -14
- package/dist/types/components/Input/Input.style.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10555,24 +10555,23 @@ const QuarterPopupPicker = ({
|
|
|
10555
10555
|
};
|
|
10556
10556
|
|
|
10557
10557
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10558
|
-
const QuarterPicker =
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
} = _ref;
|
|
10558
|
+
const QuarterPicker = ({
|
|
10559
|
+
availableQuarters,
|
|
10560
|
+
// ["Q1-2024"]
|
|
10561
|
+
label,
|
|
10562
|
+
onChange,
|
|
10563
|
+
borderRadius,
|
|
10564
|
+
required,
|
|
10565
|
+
width,
|
|
10566
|
+
height,
|
|
10567
|
+
placeholder,
|
|
10568
|
+
disabled,
|
|
10569
|
+
borderColor,
|
|
10570
|
+
borderColorFocus,
|
|
10571
|
+
textColor,
|
|
10572
|
+
selectedValue,
|
|
10573
|
+
startYear
|
|
10574
|
+
}) => {
|
|
10576
10575
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
10577
10576
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
10578
10577
|
const [value, setValue] = React$1.useState('');
|
|
@@ -11014,23 +11013,22 @@ const MonthPopupPicker = ({
|
|
|
11014
11013
|
};
|
|
11015
11014
|
|
|
11016
11015
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11017
|
-
const MonthPicker =
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
} = _ref;
|
|
11016
|
+
const MonthPicker = ({
|
|
11017
|
+
availableMonths,
|
|
11018
|
+
label,
|
|
11019
|
+
onChange,
|
|
11020
|
+
borderRadius,
|
|
11021
|
+
required,
|
|
11022
|
+
width,
|
|
11023
|
+
height,
|
|
11024
|
+
placeholder,
|
|
11025
|
+
disabled,
|
|
11026
|
+
borderColor,
|
|
11027
|
+
borderColorFocus,
|
|
11028
|
+
textColor,
|
|
11029
|
+
selectedValue,
|
|
11030
|
+
startYear
|
|
11031
|
+
}) => {
|
|
11034
11032
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
11035
11033
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
11036
11034
|
const [value, setValue] = React$1.useState('');
|
|
@@ -24141,22 +24139,21 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
24141
24139
|
position: absolute;
|
|
24142
24140
|
`;
|
|
24143
24141
|
|
|
24144
|
-
const QuickFilterDropdownSingle =
|
|
24145
|
-
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
} = _ref;
|
|
24142
|
+
const QuickFilterDropdownSingle = ({
|
|
24143
|
+
label,
|
|
24144
|
+
hoverColor,
|
|
24145
|
+
options,
|
|
24146
|
+
selectedValue,
|
|
24147
|
+
placeHolder,
|
|
24148
|
+
onChange,
|
|
24149
|
+
disabled,
|
|
24150
|
+
width,
|
|
24151
|
+
error,
|
|
24152
|
+
errorMessage,
|
|
24153
|
+
xIconShow,
|
|
24154
|
+
labelColor,
|
|
24155
|
+
showLabelOnTop
|
|
24156
|
+
}) => {
|
|
24160
24157
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24161
24158
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24162
24159
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -24553,24 +24550,23 @@ const IconContainer$2 = styled__default["default"].div`
|
|
|
24553
24550
|
cursor: pointer;
|
|
24554
24551
|
`;
|
|
24555
24552
|
|
|
24556
|
-
const QuickFilterDropdownMultiSelection =
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
|
|
24560
|
-
|
|
24561
|
-
|
|
24562
|
-
|
|
24563
|
-
|
|
24564
|
-
|
|
24565
|
-
|
|
24566
|
-
|
|
24567
|
-
|
|
24568
|
-
|
|
24569
|
-
|
|
24570
|
-
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
} = _ref;
|
|
24553
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24554
|
+
label,
|
|
24555
|
+
labelEmptyValue,
|
|
24556
|
+
options,
|
|
24557
|
+
selectedValue,
|
|
24558
|
+
placeHolder,
|
|
24559
|
+
onChange,
|
|
24560
|
+
required,
|
|
24561
|
+
disabled,
|
|
24562
|
+
width,
|
|
24563
|
+
error,
|
|
24564
|
+
errorMessage,
|
|
24565
|
+
labelColor,
|
|
24566
|
+
xIconShow,
|
|
24567
|
+
checkBoxColor,
|
|
24568
|
+
showLabelOnTop
|
|
24569
|
+
}) => {
|
|
24574
24570
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24575
24571
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24576
24572
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -35410,18 +35406,19 @@ const MainContainer = styled__default["default"].div`
|
|
|
35410
35406
|
display: flex;
|
|
35411
35407
|
flex-direction: column;
|
|
35412
35408
|
align-content: center;
|
|
35413
|
-
justify-content:
|
|
35409
|
+
justify-content: flex-start;
|
|
35414
35410
|
align-items: flex-start;
|
|
35415
|
-
width: ${props => props.width || '300px'};
|
|
35411
|
+
width: ${props => props.width || '300px'};
|
|
35412
|
+
height: ${props => props.height || '45px'};
|
|
35416
35413
|
font-family: "Poppins", sans-serif;
|
|
35417
35414
|
font-weight: 400;
|
|
35418
35415
|
font-size: 14px;
|
|
35419
35416
|
border-radius: ${props => props.size === 'small' ? '8px' : '12px'};
|
|
35420
35417
|
padding: 0;
|
|
35421
35418
|
cursor: ${props => props.disabled ? 'not-allowed' : 'default'};
|
|
35419
|
+
min-height: ${props => props.multiline ? '80px' : 'auto'};
|
|
35422
35420
|
`;
|
|
35423
35421
|
const Label$3 = styled__default["default"].label`
|
|
35424
|
-
|
|
35425
35422
|
font-size: ${props => props.isFocused || props.hasValue ? '14px' : '14px'};
|
|
35426
35423
|
font-weight: 400;
|
|
35427
35424
|
padding-inline-end: 5px;
|
|
@@ -35431,8 +35428,18 @@ const Label$3 = styled__default["default"].label`
|
|
|
35431
35428
|
color: ${props => props.error ? 'red' : props.disabled ? '#D0D0D0' : props.labelColor};
|
|
35432
35429
|
background-color: ${props => props.disabled && props.isDarkerBackground ? '#F2F2F2' : '#fff'};
|
|
35433
35430
|
position: absolute;
|
|
35434
|
-
top: ${props =>
|
|
35435
|
-
|
|
35431
|
+
top: ${props => {
|
|
35432
|
+
if (props.multiline) {
|
|
35433
|
+
return props.isFocused || props.hasValue ? '0px' : '20px';
|
|
35434
|
+
}
|
|
35435
|
+
return props.isFocused || props.hasValue ? '0px' : props.size === 'medium' ? '27px' : '17px';
|
|
35436
|
+
}};
|
|
35437
|
+
left: ${props => {
|
|
35438
|
+
if (props.multiline) {
|
|
35439
|
+
return props.isFocused || props.hasValue ? '23px' : '16px';
|
|
35440
|
+
}
|
|
35441
|
+
return props.isFocused || props.hasValue ? '23px' : props.leftIcon && props.leftIcon !== 'none' ? '42px' : '16px';
|
|
35442
|
+
}};
|
|
35436
35443
|
font-family: Poppins;
|
|
35437
35444
|
transform: translateY(-50%);
|
|
35438
35445
|
transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;
|
|
@@ -35449,17 +35456,17 @@ const InputContainer = styled__default["default"].div`
|
|
|
35449
35456
|
display: flex;
|
|
35450
35457
|
flex-wrap: nowrap;
|
|
35451
35458
|
justify-content: flex-start;
|
|
35452
|
-
align-content: center;
|
|
35459
|
+
align-content: ${props => props.multiline ? 'flex-start' : 'center'};
|
|
35453
35460
|
white-space: pre-wrap;
|
|
35454
|
-
align-items: center;
|
|
35461
|
+
align-items: ${props => props.multiline ? 'flex-start' : 'center'};
|
|
35455
35462
|
overflow: hidden;
|
|
35456
|
-
padding: 0 16px;
|
|
35457
|
-
gap: 14px;
|
|
35463
|
+
padding: ${props => props.multiline ? '16px' : '0 16px'};
|
|
35464
|
+
gap: ${props => props.multiline ? '0' : '14px'};
|
|
35458
35465
|
width: 100%;
|
|
35459
35466
|
height: 100%;
|
|
35460
35467
|
box-sizing: border-box;
|
|
35461
35468
|
background-color: ${props => props.disabled && props.isDarkerBackground ? '#F2F2F2' : '#fff'};
|
|
35462
|
-
border:
|
|
35469
|
+
border: 1px solid ${props => props.disabled ? '#D0D0D0' : props.error ? 'red' : '#B1B1B1'};
|
|
35463
35470
|
font-family: "Poppins", sans-serif;
|
|
35464
35471
|
font-weight: 400;
|
|
35465
35472
|
font-size: 14px;
|
|
@@ -35471,10 +35478,9 @@ const InputContainer = styled__default["default"].div`
|
|
|
35471
35478
|
border: 1px solid ${props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121'};
|
|
35472
35479
|
}
|
|
35473
35480
|
|
|
35474
|
-
&:focus {
|
|
35481
|
+
&:focus-within {
|
|
35475
35482
|
border: 1px solid ${props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121'};
|
|
35476
35483
|
}
|
|
35477
|
-
|
|
35478
35484
|
`;
|
|
35479
35485
|
const InputSubContainer = styled__default["default"].div`
|
|
35480
35486
|
display: flex;
|
|
@@ -35482,13 +35488,16 @@ const InputSubContainer = styled__default["default"].div`
|
|
|
35482
35488
|
flex-wrap: nowrap;
|
|
35483
35489
|
align-content: center;
|
|
35484
35490
|
align-items: flex-start;
|
|
35485
|
-
justify-content: center;
|
|
35491
|
+
justify-content: ${props => props.multiline ? 'flex-start' : 'center'};
|
|
35486
35492
|
white-space: pre-wrap;
|
|
35487
35493
|
overflow: hidden;
|
|
35488
|
-
padding: 5px 0;
|
|
35494
|
+
padding: ${props => props.multiline ? '5px 0 0 0' : '5px 0'};
|
|
35489
35495
|
width: 100%;
|
|
35490
|
-
height:
|
|
35491
|
-
min-height: ${props =>
|
|
35496
|
+
height: ${props => props.height || '45px'};
|
|
35497
|
+
min-height: ${props => {
|
|
35498
|
+
if (props.multiline) return 'auto';
|
|
35499
|
+
return props.size === 'medium' ? '52px' : '32px';
|
|
35500
|
+
}};
|
|
35492
35501
|
box-sizing: border-box;
|
|
35493
35502
|
background-color: ${props => props.disabled && props.isDarkerBackground ? '#F2F2F2' : '#fff'};
|
|
35494
35503
|
border-radius: ${props => props.size === 'small' ? '8px' : '12px'};
|
|
@@ -35498,14 +35507,59 @@ const InputSubContainer = styled__default["default"].div`
|
|
|
35498
35507
|
`;
|
|
35499
35508
|
const StyledInput = styled__default["default"].input`
|
|
35500
35509
|
width: calc(100% - 10px);
|
|
35501
|
-
height: 20px;
|
|
35510
|
+
height: ${props => props.height || '20px'};
|
|
35502
35511
|
font-weight: 400;
|
|
35503
35512
|
font-size: 14px;
|
|
35504
35513
|
outline: none;
|
|
35505
35514
|
color: ${props => props.disabled ? '#D0D0D0' : '#212121'};
|
|
35506
35515
|
background-color: ${props => props.disabled && props.isDarkerBackground ? '#F2F2F2' : '#fff'};
|
|
35507
35516
|
border: none;
|
|
35508
|
-
cursor: ${props => props.disabled ? 'not-allowed' : '
|
|
35517
|
+
cursor: ${props => props.disabled ? 'not-allowed' : 'text'};
|
|
35518
|
+
font-family: "Poppins", sans-serif;
|
|
35519
|
+
`;
|
|
35520
|
+
const StyledTextarea = styled__default["default"].textarea`
|
|
35521
|
+
width: 100%;
|
|
35522
|
+
min-height: 60px;
|
|
35523
|
+
font-weight: 400;
|
|
35524
|
+
font-size: 14px;
|
|
35525
|
+
outline: none;
|
|
35526
|
+
color: ${props => props.disabled ? '#D0D0D0' : '#212121'};
|
|
35527
|
+
background-color: ${props => props.disabled && props.isDarkerBackground ? '#F2F2F2' : '#fff'};
|
|
35528
|
+
border: none;
|
|
35529
|
+
cursor: ${props => props.disabled ? 'not-allowed' : 'text'};
|
|
35530
|
+
font-family: "Poppins", sans-serif;
|
|
35531
|
+
resize: vertical;
|
|
35532
|
+
line-height: 1.4;
|
|
35533
|
+
padding: 0;
|
|
35534
|
+
margin-top: 10px;
|
|
35535
|
+
|
|
35536
|
+
&::placeholder {
|
|
35537
|
+
color: #999;
|
|
35538
|
+
font-style: italic;
|
|
35539
|
+
}
|
|
35540
|
+
|
|
35541
|
+
&:focus {
|
|
35542
|
+
outline: none;
|
|
35543
|
+
}
|
|
35544
|
+
|
|
35545
|
+
/* Remove default textarea styling */
|
|
35546
|
+
&::-webkit-scrollbar {
|
|
35547
|
+
width: 6px;
|
|
35548
|
+
}
|
|
35549
|
+
|
|
35550
|
+
&::-webkit-scrollbar-track {
|
|
35551
|
+
background: #f1f1f1;
|
|
35552
|
+
border-radius: 3px;
|
|
35553
|
+
}
|
|
35554
|
+
|
|
35555
|
+
&::-webkit-scrollbar-thumb {
|
|
35556
|
+
background: #c1c1c1;
|
|
35557
|
+
border-radius: 3px;
|
|
35558
|
+
}
|
|
35559
|
+
|
|
35560
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
35561
|
+
background: #a8a8a8;
|
|
35562
|
+
}
|
|
35509
35563
|
`;
|
|
35510
35564
|
const ErrorMessage = styled__default["default"].div`
|
|
35511
35565
|
font-size: 12px;
|
|
@@ -35538,6 +35592,7 @@ const Input$2 = _ref => {
|
|
|
35538
35592
|
disabled,
|
|
35539
35593
|
isDarkerBackground = false,
|
|
35540
35594
|
width,
|
|
35595
|
+
height = '50px',
|
|
35541
35596
|
error,
|
|
35542
35597
|
errorMessage,
|
|
35543
35598
|
labelColor,
|
|
@@ -35545,7 +35600,12 @@ const Input$2 = _ref => {
|
|
|
35545
35600
|
rightIcon,
|
|
35546
35601
|
password,
|
|
35547
35602
|
leftIconOnClick,
|
|
35548
|
-
rightIconOnClick
|
|
35603
|
+
rightIconOnClick,
|
|
35604
|
+
multiline = false,
|
|
35605
|
+
// New prop to enable textarea mode
|
|
35606
|
+
rows = 3,
|
|
35607
|
+
// New prop for textarea rows
|
|
35608
|
+
maxLength // New prop for character limit
|
|
35549
35609
|
} = _ref;
|
|
35550
35610
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
35551
35611
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -35619,12 +35679,24 @@ const Input$2 = _ref => {
|
|
|
35619
35679
|
}
|
|
35620
35680
|
return getIcon('eye', '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer', toggleShowPassword);
|
|
35621
35681
|
};
|
|
35682
|
+
|
|
35683
|
+
// Calculate dynamic height for multiline inputs
|
|
35684
|
+
const calculateHeight = () => {
|
|
35685
|
+
if (!multiline) return height;
|
|
35686
|
+
const baseHeight = size === 'small' ? 32 : 52;
|
|
35687
|
+
const lineHeight = 20;
|
|
35688
|
+
const padding = 10;
|
|
35689
|
+
return `${baseHeight + (rows - 1) * lineHeight + padding}px`;
|
|
35690
|
+
};
|
|
35691
|
+
const InputElement = multiline ? StyledTextarea : StyledInput;
|
|
35622
35692
|
return /*#__PURE__*/React__default["default"].createElement(MainContainer, {
|
|
35623
35693
|
className: "MainContainer",
|
|
35624
35694
|
width: width,
|
|
35695
|
+
height: calculateHeight(),
|
|
35625
35696
|
size: size,
|
|
35626
35697
|
disabled: disabled,
|
|
35627
|
-
isDarkerBackground: isDarkerBackground
|
|
35698
|
+
isDarkerBackground: isDarkerBackground,
|
|
35699
|
+
multiline: multiline
|
|
35628
35700
|
}, /*#__PURE__*/React__default["default"].createElement(InputContainer, {
|
|
35629
35701
|
className: "InputContainer",
|
|
35630
35702
|
labelColor: labelColor,
|
|
@@ -35632,8 +35704,9 @@ const Input$2 = _ref => {
|
|
|
35632
35704
|
isDarkerBackground: isDarkerBackground,
|
|
35633
35705
|
error: error,
|
|
35634
35706
|
isFocused: isFocused,
|
|
35635
|
-
size: size
|
|
35636
|
-
|
|
35707
|
+
size: size,
|
|
35708
|
+
multiline: multiline
|
|
35709
|
+
}, !multiline && getLeftIcon(), /*#__PURE__*/React__default["default"].createElement(InputSubContainer, {
|
|
35637
35710
|
className: "InputSubContainer",
|
|
35638
35711
|
ref: containerRef,
|
|
35639
35712
|
labelColor: labelColor,
|
|
@@ -35641,26 +35714,29 @@ const Input$2 = _ref => {
|
|
|
35641
35714
|
isDarkerBackground: isDarkerBackground,
|
|
35642
35715
|
error: error,
|
|
35643
35716
|
onClick: handleLabelClick,
|
|
35644
|
-
|
|
35717
|
+
height: calculateHeight(),
|
|
35718
|
+
size: size,
|
|
35719
|
+
multiline: multiline
|
|
35645
35720
|
}, /*#__PURE__*/React__default["default"].createElement(Label$3, {
|
|
35646
35721
|
className: "Label",
|
|
35647
35722
|
isFocused: isFocused,
|
|
35648
35723
|
labelColor: labelColor,
|
|
35649
35724
|
hasValue: inputValue,
|
|
35650
|
-
leftIcon: leftIcon,
|
|
35725
|
+
leftIcon: !multiline ? leftIcon : 'none',
|
|
35651
35726
|
disabled: disabled,
|
|
35652
35727
|
isDarkerBackground: isDarkerBackground,
|
|
35653
35728
|
error: error,
|
|
35654
35729
|
errorMessage: errorMessage,
|
|
35655
35730
|
onClick: handleLabelClick,
|
|
35656
|
-
size: size
|
|
35731
|
+
size: size,
|
|
35732
|
+
multiline: multiline
|
|
35657
35733
|
}, inputValue ? label : labelEmptyValue || label, required && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
35658
35734
|
style: {
|
|
35659
35735
|
color: disabled ? '#D0D0D0' : 'red',
|
|
35660
35736
|
height: '16px'
|
|
35661
35737
|
}
|
|
35662
|
-
}, "*")), /*#__PURE__*/React__default["default"].createElement(
|
|
35663
|
-
className: "StyledInput",
|
|
35738
|
+
}, "*")), /*#__PURE__*/React__default["default"].createElement(InputElement, {
|
|
35739
|
+
className: multiline ? "StyledTextarea" : "StyledInput",
|
|
35664
35740
|
ref: inputRef,
|
|
35665
35741
|
type: password && !showPassword ? 'password' : 'text',
|
|
35666
35742
|
value: inputValue,
|
|
@@ -35672,11 +35748,22 @@ const Input$2 = _ref => {
|
|
|
35672
35748
|
isDarkerBackground: isDarkerBackground,
|
|
35673
35749
|
placeholder: isFocused ? placeHolder : '',
|
|
35674
35750
|
error: error,
|
|
35675
|
-
|
|
35676
|
-
|
|
35751
|
+
height: calculateHeight(),
|
|
35752
|
+
isFocused: isFocused,
|
|
35753
|
+
rows: multiline ? rows : undefined,
|
|
35754
|
+
maxLength: maxLength,
|
|
35755
|
+
multiline: multiline
|
|
35756
|
+
})), !multiline && (password ? getPasswordIcon() : getRightIcon())), error && errorMessage?.length > 0 && /*#__PURE__*/React__default["default"].createElement(ErrorMessage, {
|
|
35677
35757
|
className: "ErrorMessage",
|
|
35678
35758
|
width: width
|
|
35679
|
-
}, errorMessage)
|
|
35759
|
+
}, errorMessage), multiline && maxLength && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
35760
|
+
style: {
|
|
35761
|
+
fontSize: '12px',
|
|
35762
|
+
color: inputValue.length > maxLength * 0.9 ? 'orange' : '#666',
|
|
35763
|
+
textAlign: 'right',
|
|
35764
|
+
marginTop: '4px'
|
|
35765
|
+
}
|
|
35766
|
+
}, inputValue.length, "/", maxLength));
|
|
35680
35767
|
};
|
|
35681
35768
|
Input$2.propTypes = {
|
|
35682
35769
|
placeHolder: PropTypes.string,
|
|
@@ -35696,7 +35783,10 @@ Input$2.propTypes = {
|
|
|
35696
35783
|
onBlur: PropTypes.func,
|
|
35697
35784
|
leftIcon: PropTypes.string,
|
|
35698
35785
|
rightIcon: PropTypes.string,
|
|
35699
|
-
password: PropTypes.bool
|
|
35786
|
+
password: PropTypes.bool,
|
|
35787
|
+
multiline: PropTypes.bool,
|
|
35788
|
+
rows: PropTypes.number,
|
|
35789
|
+
maxLength: PropTypes.number
|
|
35700
35790
|
};
|
|
35701
35791
|
Input$2.defaultProps = {
|
|
35702
35792
|
placeHolder: 'Type...',
|
|
@@ -35715,7 +35805,10 @@ Input$2.defaultProps = {
|
|
|
35715
35805
|
leftIconOnClick: () => {},
|
|
35716
35806
|
rightIconOnClick: () => {},
|
|
35717
35807
|
onBlur: () => {},
|
|
35718
|
-
password: false
|
|
35808
|
+
password: false,
|
|
35809
|
+
multiline: false,
|
|
35810
|
+
rows: 3,
|
|
35811
|
+
maxLength: undefined
|
|
35719
35812
|
};
|
|
35720
35813
|
|
|
35721
35814
|
const ToggleSwitchLabel = styled__default["default"].label`
|
|
@@ -35723,12 +35816,9 @@ const ToggleSwitchLabel = styled__default["default"].label`
|
|
|
35723
35816
|
position: relative;
|
|
35724
35817
|
cursor: pointer;
|
|
35725
35818
|
user-select: none;
|
|
35726
|
-
opacity: ${
|
|
35727
|
-
|
|
35728
|
-
|
|
35729
|
-
} = _ref;
|
|
35730
|
-
return disabled ? 0.5 : 1;
|
|
35731
|
-
}};
|
|
35819
|
+
opacity: ${({
|
|
35820
|
+
disabled
|
|
35821
|
+
}) => disabled ? 0.5 : 1};
|
|
35732
35822
|
`;
|
|
35733
35823
|
const ToggleInput = styled__default["default"].input`
|
|
35734
35824
|
display: none;
|
|
@@ -35736,19 +35826,15 @@ const ToggleInput = styled__default["default"].input`
|
|
|
35736
35826
|
const ToggleSlider = styled__default["default"].span`
|
|
35737
35827
|
display: block;
|
|
35738
35828
|
position: relative;
|
|
35739
|
-
background: ${
|
|
35740
|
-
|
|
35741
|
-
|
|
35742
|
-
|
|
35743
|
-
} = _ref2;
|
|
35744
|
-
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
35745
|
-
}};
|
|
35829
|
+
background: ${({
|
|
35830
|
+
checked,
|
|
35831
|
+
disabled
|
|
35832
|
+
}) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
|
|
35746
35833
|
border-radius: 999px;
|
|
35747
35834
|
transition: background 0.2s;
|
|
35748
|
-
${
|
|
35749
|
-
|
|
35750
|
-
|
|
35751
|
-
} = _ref3;
|
|
35835
|
+
${({
|
|
35836
|
+
size
|
|
35837
|
+
}) => {
|
|
35752
35838
|
switch (size) {
|
|
35753
35839
|
case "s":
|
|
35754
35840
|
return styled.css`width: 40px; height: 20px;`;
|
|
@@ -35767,10 +35853,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35767
35853
|
background: #fff;
|
|
35768
35854
|
border-radius: 50%;
|
|
35769
35855
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
35770
|
-
${
|
|
35771
|
-
|
|
35772
|
-
|
|
35773
|
-
} = _ref4;
|
|
35856
|
+
${({
|
|
35857
|
+
size
|
|
35858
|
+
}) => {
|
|
35774
35859
|
switch (size) {
|
|
35775
35860
|
case "s":
|
|
35776
35861
|
return styled.css`width: 14px; height: 14px;`;
|
|
@@ -35780,11 +35865,10 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35780
35865
|
return styled.css`width: 20px; height: 20px;`;
|
|
35781
35866
|
}
|
|
35782
35867
|
}}
|
|
35783
|
-
left: ${
|
|
35784
|
-
|
|
35785
|
-
|
|
35786
|
-
|
|
35787
|
-
} = _ref5;
|
|
35868
|
+
left: ${({
|
|
35869
|
+
checked,
|
|
35870
|
+
size
|
|
35871
|
+
}) => {
|
|
35788
35872
|
if (!checked) return "3px";
|
|
35789
35873
|
switch (size) {
|
|
35790
35874
|
case "s":
|
|
@@ -35798,9 +35882,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35798
35882
|
}
|
|
35799
35883
|
`;
|
|
35800
35884
|
|
|
35801
|
-
/**
|
|
35802
|
-
* ToggleSwitch component for on/off states.
|
|
35803
|
-
* Supports small/large sizes and disabled state.
|
|
35885
|
+
/**
|
|
35886
|
+
* ToggleSwitch component for on/off states.
|
|
35887
|
+
* Supports small/large sizes and disabled state.
|
|
35804
35888
|
*/
|
|
35805
35889
|
function ToggleSwitch(_ref) {
|
|
35806
35890
|
let {
|