@ctlyst.id/internal-ui 1.0.4-canary.3 → 1.0.4-canary.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/datepicker/components/datepicker-month/datepicker-month.d.ts +2 -0
- package/dist/components/datepicker/components/datepicker-month/multi-datepicker-month.d.ts +2 -0
- package/dist/internal-ui.cjs.development.js +18 -9
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +4 -7
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +18 -9
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +2 -2
@@ -4,6 +4,8 @@ export interface MultiDatePickerMonthProps {
|
|
4
4
|
min?: string;
|
5
5
|
max?: string;
|
6
6
|
isError?: boolean;
|
7
|
+
widthEmpty?: string | number;
|
8
|
+
widthFilled?: string | number;
|
7
9
|
}
|
8
10
|
declare const MultiDatePickerMonth: FC<MultiDatePickerMonthProps>;
|
9
11
|
export default MultiDatePickerMonth;
|
@@ -1208,6 +1208,8 @@ const DatePickerMonth = ({
|
|
1208
1208
|
onChange,
|
1209
1209
|
min,
|
1210
1210
|
max,
|
1211
|
+
widthEmpty,
|
1212
|
+
widthFilled,
|
1211
1213
|
...props
|
1212
1214
|
}) => {
|
1213
1215
|
const [date, setDate] = React__default.useState(null);
|
@@ -1220,14 +1222,11 @@ const DatePickerMonth = ({
|
|
1220
1222
|
display: none;
|
1221
1223
|
-webkit-appearance: none;
|
1222
1224
|
}
|
1223
|
-
input[value=''] {
|
1224
|
-
width: 58px;
|
1225
|
-
}
|
1226
1225
|
`
|
1227
1226
|
}, /*#__PURE__*/React__default.createElement(react.Input, {
|
1228
1227
|
"data-test-id": props['data-test-id'],
|
1229
1228
|
type: "date",
|
1230
|
-
width: date ?
|
1229
|
+
width: date ? widthFilled : widthEmpty,
|
1231
1230
|
onChange: e => {
|
1232
1231
|
onChange(e.target.value);
|
1233
1232
|
setDate(e.target.value);
|
@@ -1252,7 +1251,9 @@ const DatePickerMonth = ({
|
|
1252
1251
|
}));
|
1253
1252
|
};
|
1254
1253
|
DatePickerMonth.defaultProps = {
|
1255
|
-
'data-test-id': ''
|
1254
|
+
'data-test-id': '',
|
1255
|
+
widthEmpty: '58px',
|
1256
|
+
widthFilled: '51px'
|
1256
1257
|
};
|
1257
1258
|
|
1258
1259
|
const transparent = 'transparent';
|
@@ -1662,7 +1663,9 @@ const MultiDatePickerMonth = ({
|
|
1662
1663
|
onChange,
|
1663
1664
|
isError = false,
|
1664
1665
|
min = '2020-01-01',
|
1665
|
-
max = '2020-12-31'
|
1666
|
+
max = '2020-12-31',
|
1667
|
+
widthEmpty,
|
1668
|
+
widthFilled
|
1666
1669
|
}) => {
|
1667
1670
|
const [date, setDate] = React__default.useState([null, null]);
|
1668
1671
|
return /*#__PURE__*/React__default.createElement(MultiDateWrapper, {
|
@@ -1674,7 +1677,9 @@ const MultiDatePickerMonth = ({
|
|
1674
1677
|
setDate([val, date[1]]);
|
1675
1678
|
},
|
1676
1679
|
min: min,
|
1677
|
-
max: max
|
1680
|
+
max: max,
|
1681
|
+
widthEmpty: widthEmpty,
|
1682
|
+
widthFilled: widthFilled
|
1678
1683
|
}), /*#__PURE__*/React__default.createElement(react.Box, null, "-"), /*#__PURE__*/React__default.createElement(DatePickerMonth, {
|
1679
1684
|
"data-test-id": "CT_DatePickerMonth_EndDate",
|
1680
1685
|
onChange: val => {
|
@@ -1682,13 +1687,17 @@ const MultiDatePickerMonth = ({
|
|
1682
1687
|
setDate([date[0], val]);
|
1683
1688
|
},
|
1684
1689
|
min: min,
|
1685
|
-
max: max
|
1690
|
+
max: max,
|
1691
|
+
widthEmpty: widthEmpty,
|
1692
|
+
widthFilled: widthFilled
|
1686
1693
|
}));
|
1687
1694
|
};
|
1688
1695
|
MultiDatePickerMonth.defaultProps = {
|
1689
1696
|
min: '2020-01-01',
|
1690
1697
|
max: '2020-12-31',
|
1691
|
-
isError: false
|
1698
|
+
isError: false,
|
1699
|
+
widthEmpty: '58px',
|
1700
|
+
widthFilled: '51px'
|
1692
1701
|
};
|
1693
1702
|
|
1694
1703
|
/* eslint-disable no-nested-ternary */
|