fis-component 0.0.68 → 0.0.70
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 +24 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +24 -14
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -61552,12 +61552,12 @@ function LevelingIcon(props) {
|
|
|
61552
61552
|
|
|
61553
61553
|
function CaretIcon(props) {
|
|
61554
61554
|
const { width = 16, height = 16, ...rest } = props;
|
|
61555
|
-
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", {
|
|
61555
|
+
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", { clipPath: "url(#clip0_11094_8532)", children: jsxRuntime.jsx("path", { d: "M4.66699 6L8.66699 10L12.667 6", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_11094_8532", children: jsxRuntime.jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(0.666992)" }) }) })] }));
|
|
61556
61556
|
}
|
|
61557
61557
|
|
|
61558
61558
|
function ExitIcon(props) {
|
|
61559
61559
|
const { width = 16, height = 16, ...rest } = props;
|
|
61560
|
-
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("g", {
|
|
61560
|
+
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("g", { clipPath: "url(#clip0_11161_972)", children: jsxRuntime.jsx("path", { d: "M12.6001 4L4.6001 12M4.6001 4L12.6001 12", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_11161_972", children: jsxRuntime.jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(0.600098)" }) }) })] }));
|
|
61561
61561
|
}
|
|
61562
61562
|
|
|
61563
61563
|
function InfoIcon(props) {
|
|
@@ -61566,7 +61566,7 @@ function InfoIcon(props) {
|
|
|
61566
61566
|
|
|
61567
61567
|
function CheckIcon(props) {
|
|
61568
61568
|
const { width = 20, height = 20, ...rest } = props;
|
|
61569
|
-
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M16.6666 5L7.49992 14.1667L3.33325 10", stroke: "currentColor",
|
|
61569
|
+
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M16.6666 5L7.49992 14.1667L3.33325 10", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
61570
61570
|
}
|
|
61571
61571
|
|
|
61572
61572
|
function WarningIcon(props) {
|
|
@@ -61586,7 +61586,7 @@ function PositiveIcon(props) {
|
|
|
61586
61586
|
|
|
61587
61587
|
function ArrowDownIcon(props) {
|
|
61588
61588
|
const { width = 16, height = 16, ...rest } = props;
|
|
61589
|
-
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", {
|
|
61589
|
+
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", { clipPath: "url(#clip0_11182_21084)", children: jsxRuntime.jsx("path", { d: "M4.66666 6L8.66666 10L12.6667 6", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_11182_21084", children: jsxRuntime.jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(0.666656)" }) }) })] }));
|
|
61590
61590
|
}
|
|
61591
61591
|
|
|
61592
61592
|
function ArrowUpIcon(props) {
|
|
@@ -61596,12 +61596,12 @@ function ArrowUpIcon(props) {
|
|
|
61596
61596
|
|
|
61597
61597
|
function CloseChipIcon(props) {
|
|
61598
61598
|
const { width = 20, height = 20, ...rest } = props;
|
|
61599
|
-
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", {
|
|
61599
|
+
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", { clipPath: "url(#clip0_10200_41079)", children: jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_10200_41079", children: jsxRuntime.jsx("rect", { width: "20", height: "20", fill: "white" }) }) })] }));
|
|
61600
61600
|
}
|
|
61601
61601
|
|
|
61602
61602
|
function TimeIcon(props) {
|
|
61603
61603
|
const { width = 16, height = 16, ...rest } = props;
|
|
61604
|
-
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", {
|
|
61604
|
+
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("g", { clipPath: "url(#clip0_10132_275)", children: jsxRuntime.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" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_10132_275", children: jsxRuntime.jsx("rect", { width: width, height: height, fill: "white" }) }) })] }));
|
|
61605
61605
|
}
|
|
61606
61606
|
|
|
61607
61607
|
function DateIcon(props) {
|
|
@@ -64837,7 +64837,7 @@ const FISInputText = React.forwardRef((props, ref) => {
|
|
|
64837
64837
|
}
|
|
64838
64838
|
}
|
|
64839
64839
|
}, [onEnter]);
|
|
64840
|
-
return (jsxRuntime.jsxs(DivContainerSC$6, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(FISInputField, { ...rest, ref: ref, typeSuffix: typeSuffix, sizeInput: sizeInput, iconPrefix: iconPrefix, onKeyPress: handleKeyPress, onChange: handleChange, disabled: disabled, negative: negative, onClickSuffix: onClickSuffix }), (message || showCount) && (jsxRuntime.jsxs(DivHintWrapperSC$1, { children: [jsxRuntime.jsx(SpanHintSC$3, { className: classNames({
|
|
64840
|
+
return (jsxRuntime.jsxs(DivContainerSC$6, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(FISInputField, { ...rest, ref: ref, typeSuffix: typeSuffix, sizeInput: sizeInput, iconPrefix: iconPrefix, onKeyPress: handleKeyPress, onChange: handleChange, disabled: disabled, negative: negative, maxLength: maxLength, onClickSuffix: onClickSuffix }), (message || showCount) && (jsxRuntime.jsxs(DivHintWrapperSC$1, { children: [jsxRuntime.jsx(SpanHintSC$3, { className: classNames({
|
|
64841
64841
|
disabled: disabled,
|
|
64842
64842
|
negative: negative,
|
|
64843
64843
|
positive: positive,
|
|
@@ -70943,18 +70943,23 @@ const FISInputTime = React.forwardRef((props, ref) => {
|
|
|
70943
70943
|
const [timeValue, setTimeValue] = React.useState(null);
|
|
70944
70944
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
70945
70945
|
const containerRef = React.useRef(null);
|
|
70946
|
+
const timePickerRef = React.useRef(null);
|
|
70946
70947
|
React.useEffect(() => {
|
|
70947
70948
|
const handleClickOutside = (event) => {
|
|
70949
|
+
const target = event.target;
|
|
70948
70950
|
if (containerRef.current &&
|
|
70949
|
-
!containerRef.current.contains(
|
|
70951
|
+
!containerRef.current.contains(target) &&
|
|
70952
|
+
!document.querySelector(".ant-picker-dropdown")?.contains(target)) {
|
|
70950
70953
|
setIsOpen(false);
|
|
70951
70954
|
}
|
|
70952
70955
|
};
|
|
70953
|
-
|
|
70956
|
+
if (isOpen) {
|
|
70957
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
70958
|
+
}
|
|
70954
70959
|
return () => {
|
|
70955
70960
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
70956
70961
|
};
|
|
70957
|
-
}, []);
|
|
70962
|
+
}, [isOpen]);
|
|
70958
70963
|
const handleTimeChange = (time) => {
|
|
70959
70964
|
onChange?.(time ? time.toDate() : null);
|
|
70960
70965
|
setTimeValue(time);
|
|
@@ -70975,14 +70980,19 @@ const FISInputTime = React.forwardRef((props, ref) => {
|
|
|
70975
70980
|
}
|
|
70976
70981
|
};
|
|
70977
70982
|
const handleClickInput = () => {
|
|
70978
|
-
|
|
70983
|
+
if (!disabled) {
|
|
70984
|
+
setIsOpen(true);
|
|
70985
|
+
}
|
|
70979
70986
|
};
|
|
70980
70987
|
const handleOpenChange = (open) => {
|
|
70981
|
-
|
|
70982
|
-
|
|
70988
|
+
setIsOpen(open);
|
|
70989
|
+
};
|
|
70990
|
+
const handleKeyDown = (e) => {
|
|
70991
|
+
if (e.key === "Escape") {
|
|
70992
|
+
setIsOpen(false);
|
|
70983
70993
|
}
|
|
70984
70994
|
};
|
|
70985
|
-
return (jsxRuntime.jsxs(DivContainerSC$2, { className: className, ref: containerRef, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivInputTimeSC, { children: [jsxRuntime.jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsxRuntime.jsx(TimeIcon, {}), negative: negative, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput }), jsxRuntime.jsx(HiddenTimePickerSC, { format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange, getPopupContainer: getPopupContainer })] }), message && (jsxRuntime.jsx(DivHintWrapperSC, { children: jsxRuntime.jsx(SpanHintSC, { className: classNames({
|
|
70995
|
+
return (jsxRuntime.jsxs(DivContainerSC$2, { className: className, ref: containerRef, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivInputTimeSC, { children: [jsxRuntime.jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsxRuntime.jsx(TimeIcon, {}), negative: negative, disabled: disabled, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput, onKeyDown: handleKeyDown }), jsxRuntime.jsx(HiddenTimePickerSC, { ref: timePickerRef, format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange, getPopupContainer: getPopupContainer, showNow: true, inputReadOnly: true })] }), message && (jsxRuntime.jsx(DivHintWrapperSC, { children: jsxRuntime.jsx(SpanHintSC, { className: classNames({
|
|
70986
70996
|
disabled: disabled,
|
|
70987
70997
|
negative: negative,
|
|
70988
70998
|
positive: positive,
|