x-ui-design 0.6.93 → 0.6.94
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.esm.js
CHANGED
|
@@ -2596,6 +2596,7 @@ const TimePicker = ({
|
|
|
2596
2596
|
}) => {
|
|
2597
2597
|
const [open, setOpen] = useState(false);
|
|
2598
2598
|
const [innerValue, setInnerValue] = useState(propValue || defaultValue ? new Date(propValue || defaultValue) : null);
|
|
2599
|
+
const [[showHour, showMinutes, showSeconds]] = useState(`${format}`.split(':'));
|
|
2599
2600
|
const [tempValue, setTempValue] = useState(null);
|
|
2600
2601
|
const inputRef = useRef(null);
|
|
2601
2602
|
const popupRef = useRef(null);
|
|
@@ -2776,7 +2777,7 @@ const TimePicker = ({
|
|
|
2776
2777
|
const currentMinute = selectedMinute ?? 0;
|
|
2777
2778
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
2778
2779
|
className: `${prefixCls}-panel`
|
|
2779
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2780
|
+
}, showHour ? /*#__PURE__*/React.createElement("div", {
|
|
2780
2781
|
ref: hourRef,
|
|
2781
2782
|
className: `${prefixCls}-column`
|
|
2782
2783
|
}, hours.map((h, index) => h === false ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -2794,7 +2795,7 @@ const TimePicker = ({
|
|
|
2794
2795
|
[`${prefixCls}-cell-selected`]: selectedHour === h
|
|
2795
2796
|
}]),
|
|
2796
2797
|
onClick: () => !getDisabled('hour').includes(h) && onSelectHour(h)
|
|
2797
|
-
}, pad(h)))), /*#__PURE__*/React.createElement("div", {
|
|
2798
|
+
}, pad(h)))) : null, showMinutes ? /*#__PURE__*/React.createElement("div", {
|
|
2798
2799
|
ref: minuteRef,
|
|
2799
2800
|
className: `${prefixCls}-column`
|
|
2800
2801
|
}, minutesSeconds.map((m, index) => m === false ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -2812,7 +2813,7 @@ const TimePicker = ({
|
|
|
2812
2813
|
[`${prefixCls}-cell-selected`]: selectedMinute === m
|
|
2813
2814
|
}]),
|
|
2814
2815
|
onClick: () => !getDisabled('minute', currentHour).includes(m) && onSelectMinute(m)
|
|
2815
|
-
}, pad(m)))), /*#__PURE__*/React.createElement("div", {
|
|
2816
|
+
}, pad(m)))) : null, showSeconds ? /*#__PURE__*/React.createElement("div", {
|
|
2816
2817
|
ref: secondRef,
|
|
2817
2818
|
className: `${prefixCls}-column`
|
|
2818
2819
|
}, minutesSeconds.map((s, index) => s === false ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -2830,7 +2831,7 @@ const TimePicker = ({
|
|
|
2830
2831
|
[`${prefixCls}-cell-selected`]: selectedSecond === s
|
|
2831
2832
|
}]),
|
|
2832
2833
|
onClick: () => !getDisabled('second', currentHour, currentMinute).includes(s) && onSelectSecond(s)
|
|
2833
|
-
}, pad(s))))), /*#__PURE__*/React.createElement("div", {
|
|
2834
|
+
}, pad(s)))) : null), /*#__PURE__*/React.createElement("div", {
|
|
2834
2835
|
className: `${prefixCls}-actions`
|
|
2835
2836
|
}, showNow ? /*#__PURE__*/React.createElement("div", {
|
|
2836
2837
|
className: `${prefixCls}-now-btn`,
|