uiw 4.12.2 → 4.13.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/dist/uiw.css +56 -0
- package/dist/uiw.js +121 -6
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/package.json +57 -57
package/dist/uiw.css
CHANGED
|
@@ -1943,6 +1943,62 @@ sup.w-badge-count {
|
|
|
1943
1943
|
display: none;
|
|
1944
1944
|
}
|
|
1945
1945
|
|
|
1946
|
+
.w-dateinputrange-contents {
|
|
1947
|
+
display: flex;
|
|
1948
|
+
justify-content: space-between;
|
|
1949
|
+
}
|
|
1950
|
+
.w-dateinputrange-contents input {
|
|
1951
|
+
box-shadow: none;
|
|
1952
|
+
padding: 0px;
|
|
1953
|
+
height: 20px;
|
|
1954
|
+
}
|
|
1955
|
+
.w-dateinputrange-contents .w-input-inner:hover {
|
|
1956
|
+
box-shadow: none !important;
|
|
1957
|
+
}
|
|
1958
|
+
.w-dateinputrange-contents .w-input-inner:focus {
|
|
1959
|
+
box-shadow: none !important;
|
|
1960
|
+
}
|
|
1961
|
+
.w-dateinputrange-inner {
|
|
1962
|
+
display: flex;
|
|
1963
|
+
justify-content: space-between;
|
|
1964
|
+
outline: none;
|
|
1965
|
+
border: none;
|
|
1966
|
+
align-items: center;
|
|
1967
|
+
border-radius: 3px;
|
|
1968
|
+
box-shadow: 0 0 0 0 rgba(19, 124, 189, 0), 0 0 0 0 rgba(19, 124, 189, 0), inset 0 0 0 1px rgba(16, 22, 26, 0.15), inset 0 1px 1px rgba(16, 22, 26, 0.2);
|
|
1969
|
+
box-sizing: border-box;
|
|
1970
|
+
background: #fff;
|
|
1971
|
+
min-height: 30px;
|
|
1972
|
+
margin: 0 !important;
|
|
1973
|
+
padding: 3px 10px 3px 10px;
|
|
1974
|
+
vertical-align: middle;
|
|
1975
|
+
line-height: 30px;
|
|
1976
|
+
color: #393e48;
|
|
1977
|
+
font-weight: 400;
|
|
1978
|
+
font-size: inherit;
|
|
1979
|
+
transition: box-shadow 0.3s cubic-bezier(0.4, 1, 0.75, 0.9);
|
|
1980
|
+
-webkit-appearance: none;
|
|
1981
|
+
-moz-appearance: none;
|
|
1982
|
+
appearance: none;
|
|
1983
|
+
}
|
|
1984
|
+
.w-dateinputrange-inner:focus {
|
|
1985
|
+
box-shadow: 0 0 0 1px #393e48, 0 0 0 3px rgba(57, 62, 72, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2);
|
|
1986
|
+
}
|
|
1987
|
+
.w-dateinputrange-inner:hover {
|
|
1988
|
+
box-shadow: 0 0 0 1px #6e6e6e, 0 0 0 3px rgba(57, 62, 72, 0), inset 0 1px 1px rgba(16, 22, 26, 0.2);
|
|
1989
|
+
}
|
|
1990
|
+
.w-dateinputrange-inner:focus.w-dateinputrange-inner:hover {
|
|
1991
|
+
box-shadow: 0 0 0 1px #6e6e6e, 0 0 0 3px rgba(57, 62, 72, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2);
|
|
1992
|
+
}
|
|
1993
|
+
.w-dateinputrange-inner:disabled {
|
|
1994
|
+
box-shadow: none;
|
|
1995
|
+
background: #dddddd;
|
|
1996
|
+
opacity: 0.75;
|
|
1997
|
+
color: #a5a5a5;
|
|
1998
|
+
cursor: not-allowed;
|
|
1999
|
+
resize: none;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
1946
2002
|
.w-dateinput {
|
|
1947
2003
|
display: inline-block;
|
|
1948
2004
|
}
|
package/dist/uiw.js
CHANGED
|
@@ -328,6 +328,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
328
328
|
"Collapse": () => (/* reexport */ react_collapse_esm),
|
|
329
329
|
"CopyToClipboard": () => (/* reexport */ CopyToClipboard),
|
|
330
330
|
"DateInput": () => (/* reexport */ DateInput),
|
|
331
|
+
"DateInputRange": () => (/* reexport */ DateInputRange),
|
|
331
332
|
"DatePicker": () => (/* reexport */ DatePicker),
|
|
332
333
|
"DatePickerCaption": () => (/* reexport */ DatePickerCaption),
|
|
333
334
|
"DatePickerDay": () => (/* reexport */ DatePickerDay),
|
|
@@ -4483,6 +4484,117 @@ function CopyToClipboard(props) {
|
|
|
4483
4484
|
}));
|
|
4484
4485
|
}
|
|
4485
4486
|
|
|
4487
|
+
;// CONCATENATED MODULE: ../react-date-input/esm/style/date-input-range.css
|
|
4488
|
+
// extracted by mini-css-extract-plugin
|
|
4489
|
+
/* harmony default export */ const date_input_range = ({});
|
|
4490
|
+
;// CONCATENATED MODULE: ../react-date-input/esm/DateInputRange.js
|
|
4491
|
+
|
|
4492
|
+
|
|
4493
|
+
var DateInputRange_excluded = ["prefixCls", "bodyStyle", "className", "popoverProps", "datePickerProps", "allowClear", "format", "onChange", "value"];
|
|
4494
|
+
|
|
4495
|
+
|
|
4496
|
+
|
|
4497
|
+
|
|
4498
|
+
|
|
4499
|
+
|
|
4500
|
+
|
|
4501
|
+
|
|
4502
|
+
|
|
4503
|
+
function DateInputRange(props) {
|
|
4504
|
+
var {
|
|
4505
|
+
prefixCls = 'w-dateinputrange',
|
|
4506
|
+
bodyStyle = undefined,
|
|
4507
|
+
className,
|
|
4508
|
+
popoverProps,
|
|
4509
|
+
datePickerProps,
|
|
4510
|
+
allowClear = true,
|
|
4511
|
+
format = 'YYYY/MM/DD',
|
|
4512
|
+
onChange,
|
|
4513
|
+
value
|
|
4514
|
+
} = props,
|
|
4515
|
+
inputProps = _objectWithoutPropertiesLoose(props, DateInputRange_excluded);
|
|
4516
|
+
|
|
4517
|
+
var [dateRange, setDateRange] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
|
|
4518
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
4519
|
+
var valueTemp = [];
|
|
4520
|
+
var propsValue = value;
|
|
4521
|
+
|
|
4522
|
+
if (Array.isArray(propsValue) && !!(propsValue != null && propsValue.length)) {
|
|
4523
|
+
propsValue.forEach((date, index) => {
|
|
4524
|
+
valueTemp[index] = typeof propsValue[index] === 'string' ? new Date(date) : date;
|
|
4525
|
+
});
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
setDateRange(valueTemp);
|
|
4529
|
+
}, [JSON.stringify(value)]);
|
|
4530
|
+
|
|
4531
|
+
function handleChange(cdate, idx) {
|
|
4532
|
+
var changeValue = [...dateRange];
|
|
4533
|
+
changeValue[idx] = cdate;
|
|
4534
|
+
setDateRange(changeValue);
|
|
4535
|
+
onChange && onChange(cdate, changeValue);
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4538
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
4539
|
+
className: [prefixCls + "-contents", prefixCls + "-inner"].filter(Boolean).join(' ').trim(),
|
|
4540
|
+
style: _extends({
|
|
4541
|
+
width: 300
|
|
4542
|
+
}, bodyStyle),
|
|
4543
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Popover, _extends({
|
|
4544
|
+
trigger: "focus",
|
|
4545
|
+
placement: "bottomLeft",
|
|
4546
|
+
autoAdjustOverflow: true
|
|
4547
|
+
}, popoverProps, {
|
|
4548
|
+
content: /*#__PURE__*/(0,jsx_runtime.jsx)(DatePicker, _extends({
|
|
4549
|
+
date: dateRange[0],
|
|
4550
|
+
className: prefixCls + "-popover"
|
|
4551
|
+
}, datePickerProps, {
|
|
4552
|
+
onChange: selectedDate => handleChange(selectedDate, 0)
|
|
4553
|
+
})),
|
|
4554
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({
|
|
4555
|
+
placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
|
|
4556
|
+
readOnly: true
|
|
4557
|
+
}, inputProps, {
|
|
4558
|
+
// onChange={(v) => console.log('v', v)}
|
|
4559
|
+
value: dateRange[0] ? formatter(format, dateRange[0]) : '',
|
|
4560
|
+
className: [prefixCls, className].filter(Boolean).join(' ').trim()
|
|
4561
|
+
}))
|
|
4562
|
+
})), /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
4563
|
+
type: "swap-right",
|
|
4564
|
+
verticalAlign: "baseline",
|
|
4565
|
+
style: {
|
|
4566
|
+
fontSize: 21,
|
|
4567
|
+
top: -1,
|
|
4568
|
+
margin: '0px 8px 0px 5px'
|
|
4569
|
+
}
|
|
4570
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, _extends({
|
|
4571
|
+
trigger: "focus",
|
|
4572
|
+
placement: "bottomLeft",
|
|
4573
|
+
autoAdjustOverflow: true
|
|
4574
|
+
}, popoverProps, {
|
|
4575
|
+
content: /*#__PURE__*/(0,jsx_runtime.jsx)(DatePicker, _extends({
|
|
4576
|
+
date: dateRange[1],
|
|
4577
|
+
className: prefixCls + "-popover"
|
|
4578
|
+
}, datePickerProps, {
|
|
4579
|
+
onChange: selectedDate => handleChange(selectedDate, 1)
|
|
4580
|
+
})),
|
|
4581
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({
|
|
4582
|
+
placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
|
|
4583
|
+
readOnly: true
|
|
4584
|
+
}, inputProps, {
|
|
4585
|
+
value: dateRange[1] ? formatter(format, dateRange[1]) : '' // onChange={(v) => console.log('v2', v)}
|
|
4586
|
+
,
|
|
4587
|
+
className: [prefixCls, className].filter(Boolean).join(' ').trim()
|
|
4588
|
+
}))
|
|
4589
|
+
})), allowClear && dateRange.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
4590
|
+
className: prefixCls + "-close-btn",
|
|
4591
|
+
color: "#ccc",
|
|
4592
|
+
onClick: () => setDateRange([]),
|
|
4593
|
+
type: "close"
|
|
4594
|
+
})]
|
|
4595
|
+
});
|
|
4596
|
+
}
|
|
4597
|
+
|
|
4486
4598
|
;// CONCATENATED MODULE: ../react-date-input/esm/style/index.css
|
|
4487
4599
|
// extracted by mini-css-extract-plugin
|
|
4488
4600
|
/* harmony default export */ const react_date_input_esm_style = ({});
|
|
@@ -4498,6 +4610,7 @@ var react_date_input_esm_excluded = ["prefixCls", "className", "popoverProps", "
|
|
|
4498
4610
|
|
|
4499
4611
|
|
|
4500
4612
|
|
|
4613
|
+
|
|
4501
4614
|
function DateInput(props) {
|
|
4502
4615
|
var {
|
|
4503
4616
|
prefixCls = 'w-dateinput',
|
|
@@ -7682,7 +7795,7 @@ var react_tag_esm_excluded = ["prefixCls", "className", "style", "title", "child
|
|
|
7682
7795
|
;// CONCATENATED MODULE: ../react-search-select/esm/index.js
|
|
7683
7796
|
|
|
7684
7797
|
|
|
7685
|
-
var react_search_select_esm_excluded = ["allowClear", "disabled", "size", "maxTagCount", "option", "loading", "labelInValue", "prefixCls", "className", "mode", "style", "isOpen", "value", "defaultValue", "showSearch", "placeholder", "onSearch", "onChange", "onSelect"];
|
|
7798
|
+
var react_search_select_esm_excluded = ["allowClear", "disabled", "size", "maxTagCount", "option", "loading", "labelInValue", "prefixCls", "className", "mode", "style", "isOpen", "value", "defaultValue", "showSearch", "tagProps", "placeholder", "onSearch", "onChange", "onSelect"];
|
|
7686
7799
|
|
|
7687
7800
|
|
|
7688
7801
|
|
|
@@ -7711,6 +7824,7 @@ function SearchSelect(props) {
|
|
|
7711
7824
|
value,
|
|
7712
7825
|
defaultValue,
|
|
7713
7826
|
showSearch,
|
|
7827
|
+
tagProps = {},
|
|
7714
7828
|
placeholder,
|
|
7715
7829
|
onSearch,
|
|
7716
7830
|
onChange,
|
|
@@ -7893,19 +8007,20 @@ function SearchSelect(props) {
|
|
|
7893
8007
|
flexFlow: 'wrap'
|
|
7894
8008
|
},
|
|
7895
8009
|
children: [isMultiple && selectedValue.slice(0, maxTagCount).map((item, index) => {
|
|
7896
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, {
|
|
7897
|
-
style: {
|
|
8010
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, _extends({
|
|
8011
|
+
style: _extends({
|
|
7898
8012
|
height: 20,
|
|
7899
8013
|
margin: 1,
|
|
7900
8014
|
display: 'flex',
|
|
7901
8015
|
alignItems: 'center'
|
|
7902
|
-
},
|
|
8016
|
+
}, tagProps.style),
|
|
7903
8017
|
className: prefixCls + "-tag",
|
|
8018
|
+
color: "#393E48"
|
|
8019
|
+
}, tagProps, {
|
|
7904
8020
|
closable: true,
|
|
7905
8021
|
onClose: () => handleItemsClick(index, item),
|
|
7906
|
-
color: "#393E48",
|
|
7907
8022
|
children: item.label
|
|
7908
|
-
}, index);
|
|
8023
|
+
}), index);
|
|
7909
8024
|
}), !!omitTagCount && /*#__PURE__*/(0,jsx_runtime.jsxs)(react_tag_esm, {
|
|
7910
8025
|
style: {
|
|
7911
8026
|
height: 20,
|