fis-component 0.0.68 → 0.0.69
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/cjs/index.js +23 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +23 -13
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -61532,12 +61532,12 @@ function LevelingIcon(props) {
|
|
|
61532
61532
|
|
|
61533
61533
|
function CaretIcon(props) {
|
|
61534
61534
|
const { width = 16, height = 16, ...rest } = props;
|
|
61535
|
-
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", {
|
|
61535
|
+
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", { clipPath: "url(#clip0_11094_8532)", children: jsx("path", { d: "M4.66699 6L8.66699 10L12.667 6", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_11094_8532", children: jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(0.666992)" }) }) })] }));
|
|
61536
61536
|
}
|
|
61537
61537
|
|
|
61538
61538
|
function ExitIcon(props) {
|
|
61539
61539
|
const { width = 16, height = 16, ...rest } = props;
|
|
61540
|
-
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("g", {
|
|
61540
|
+
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("g", { clipPath: "url(#clip0_11161_972)", children: jsx("path", { d: "M12.6001 4L4.6001 12M4.6001 4L12.6001 12", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_11161_972", children: jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(0.600098)" }) }) })] }));
|
|
61541
61541
|
}
|
|
61542
61542
|
|
|
61543
61543
|
function InfoIcon(props) {
|
|
@@ -61546,7 +61546,7 @@ function InfoIcon(props) {
|
|
|
61546
61546
|
|
|
61547
61547
|
function CheckIcon(props) {
|
|
61548
61548
|
const { width = 20, height = 20, ...rest } = props;
|
|
61549
|
-
return (jsx("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M16.6666 5L7.49992 14.1667L3.33325 10", stroke: "currentColor",
|
|
61549
|
+
return (jsx("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M16.6666 5L7.49992 14.1667L3.33325 10", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
61550
61550
|
}
|
|
61551
61551
|
|
|
61552
61552
|
function WarningIcon(props) {
|
|
@@ -61566,7 +61566,7 @@ function PositiveIcon(props) {
|
|
|
61566
61566
|
|
|
61567
61567
|
function ArrowDownIcon(props) {
|
|
61568
61568
|
const { width = 16, height = 16, ...rest } = props;
|
|
61569
|
-
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", {
|
|
61569
|
+
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", { clipPath: "url(#clip0_11182_21084)", children: jsx("path", { d: "M4.66666 6L8.66666 10L12.6667 6", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_11182_21084", children: jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(0.666656)" }) }) })] }));
|
|
61570
61570
|
}
|
|
61571
61571
|
|
|
61572
61572
|
function ArrowUpIcon(props) {
|
|
@@ -61576,12 +61576,12 @@ function ArrowUpIcon(props) {
|
|
|
61576
61576
|
|
|
61577
61577
|
function CloseChipIcon(props) {
|
|
61578
61578
|
const { width = 20, height = 20, ...rest } = props;
|
|
61579
|
-
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", {
|
|
61579
|
+
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", { clipPath: "url(#clip0_10200_41079)", children: jsx("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_10200_41079", children: jsx("rect", { width: "20", height: "20", fill: "white" }) }) })] }));
|
|
61580
61580
|
}
|
|
61581
61581
|
|
|
61582
61582
|
function TimeIcon(props) {
|
|
61583
61583
|
const { width = 16, height = 16, ...rest } = props;
|
|
61584
|
-
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", {
|
|
61584
|
+
return (jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsx("g", { clipPath: "url(#clip0_10132_275)", children: jsx("path", { d: "M8.00004 4.00004V8.00004L10.6667 9.33337M14.6667 8.00004C14.6667 11.6819 11.6819 14.6667 8.00004 14.6667C4.31814 14.6667 1.33337 11.6819 1.33337 8.00004C1.33337 4.31814 4.31814 1.33337 8.00004 1.33337C11.6819 1.33337 14.6667 4.31814 14.6667 8.00004Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_10132_275", children: jsx("rect", { width: width, height: height, fill: "white" }) }) })] }));
|
|
61585
61585
|
}
|
|
61586
61586
|
|
|
61587
61587
|
function DateIcon(props) {
|
|
@@ -70923,18 +70923,23 @@ const FISInputTime = forwardRef((props, ref) => {
|
|
|
70923
70923
|
const [timeValue, setTimeValue] = useState(null);
|
|
70924
70924
|
const [isOpen, setIsOpen] = useState(false);
|
|
70925
70925
|
const containerRef = useRef(null);
|
|
70926
|
+
const timePickerRef = useRef(null);
|
|
70926
70927
|
useEffect(() => {
|
|
70927
70928
|
const handleClickOutside = (event) => {
|
|
70929
|
+
const target = event.target;
|
|
70928
70930
|
if (containerRef.current &&
|
|
70929
|
-
!containerRef.current.contains(
|
|
70931
|
+
!containerRef.current.contains(target) &&
|
|
70932
|
+
!document.querySelector(".ant-picker-dropdown")?.contains(target)) {
|
|
70930
70933
|
setIsOpen(false);
|
|
70931
70934
|
}
|
|
70932
70935
|
};
|
|
70933
|
-
|
|
70936
|
+
if (isOpen) {
|
|
70937
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
70938
|
+
}
|
|
70934
70939
|
return () => {
|
|
70935
70940
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
70936
70941
|
};
|
|
70937
|
-
}, []);
|
|
70942
|
+
}, [isOpen]);
|
|
70938
70943
|
const handleTimeChange = (time) => {
|
|
70939
70944
|
onChange?.(time ? time.toDate() : null);
|
|
70940
70945
|
setTimeValue(time);
|
|
@@ -70955,14 +70960,19 @@ const FISInputTime = forwardRef((props, ref) => {
|
|
|
70955
70960
|
}
|
|
70956
70961
|
};
|
|
70957
70962
|
const handleClickInput = () => {
|
|
70958
|
-
|
|
70963
|
+
if (!disabled) {
|
|
70964
|
+
setIsOpen(true);
|
|
70965
|
+
}
|
|
70959
70966
|
};
|
|
70960
70967
|
const handleOpenChange = (open) => {
|
|
70961
|
-
|
|
70962
|
-
|
|
70968
|
+
setIsOpen(open);
|
|
70969
|
+
};
|
|
70970
|
+
const handleKeyDown = (e) => {
|
|
70971
|
+
if (e.key === "Escape") {
|
|
70972
|
+
setIsOpen(false);
|
|
70963
70973
|
}
|
|
70964
70974
|
};
|
|
70965
|
-
return (jsxs(DivContainerSC$2, { className: className, ref: containerRef, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputTimeSC, { children: [jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsx(TimeIcon, {}), negative: negative, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput }), jsx(HiddenTimePickerSC, { format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange, getPopupContainer: getPopupContainer })] }), message && (jsx(DivHintWrapperSC, { children: jsx(SpanHintSC, { className: classNames({
|
|
70975
|
+
return (jsxs(DivContainerSC$2, { className: className, ref: containerRef, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputTimeSC, { children: [jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsx(TimeIcon, {}), negative: negative, disabled: disabled, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput, onKeyDown: handleKeyDown }), jsx(HiddenTimePickerSC, { ref: timePickerRef, format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange, getPopupContainer: getPopupContainer, showNow: true, inputReadOnly: true })] }), message && (jsx(DivHintWrapperSC, { children: jsx(SpanHintSC, { className: classNames({
|
|
70966
70976
|
disabled: disabled,
|
|
70967
70977
|
negative: negative,
|
|
70968
70978
|
positive: positive,
|