fis-component 0.1.8 → 0.1.10
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 +109 -88
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Select/index.d.ts +2 -2
- package/dist/cjs/types/src/components/Select/types.d.ts +4 -0
- package/dist/cjs/types/src/components/Switch/Switch.stories.d.ts +2 -2
- package/dist/cjs/types/src/components/Switch/index.d.ts +4 -0
- package/dist/cjs/types/src/components/Switch/styles.d.ts +1 -0
- package/dist/cjs/types/src/components/Table/ColumnCell/index.d.ts +4 -0
- package/dist/cjs/types/src/components/Table/HeaderCell/index.d.ts +1 -0
- package/dist/cjs/types/src/components/Tooltip/index.d.ts +1 -1
- package/dist/esm/index.js +109 -88
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Select/index.d.ts +2 -2
- package/dist/esm/types/src/components/Select/types.d.ts +4 -0
- package/dist/esm/types/src/components/Switch/Switch.stories.d.ts +2 -2
- package/dist/esm/types/src/components/Switch/index.d.ts +4 -0
- package/dist/esm/types/src/components/Switch/styles.d.ts +1 -0
- package/dist/esm/types/src/components/Table/ColumnCell/index.d.ts +4 -0
- package/dist/esm/types/src/components/Table/HeaderCell/index.d.ts +1 -0
- package/dist/esm/types/src/components/Tooltip/index.d.ts +1 -1
- package/dist/index.d.ts +15 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -61893,6 +61893,11 @@ function SeparatorIcon(props) {
|
|
|
61893
61893
|
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M3.5 11L8.5 1", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
61894
61894
|
}
|
|
61895
61895
|
|
|
61896
|
+
function HomeIcon(props) {
|
|
61897
|
+
const { width = 16, height = 16, ...rest } = props;
|
|
61898
|
+
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M5.33333 11.3333H10.6667M7.34513 1.84267L2.82359 5.35942C2.52135 5.5945 2.37022 5.71204 2.26135 5.85925C2.16491 5.98964 2.09307 6.13653 2.04935 6.29271C2 6.46902 2 6.66047 2 7.04338V11.8667C2 12.6134 2 12.9868 2.14532 13.272C2.27316 13.5229 2.47713 13.7268 2.72801 13.8547C3.01323 14 3.3866 14 4.13333 14H11.8667C12.6134 14 12.9868 14 13.272 13.8547C13.5229 13.7268 13.7268 13.5229 13.8547 13.272C14 12.9868 14 12.6134 14 11.8667V7.04338C14 6.66047 14 6.46902 13.9506 6.29271C13.9069 6.13653 13.8351 5.98964 13.7386 5.85925C13.6298 5.71204 13.4787 5.5945 13.1764 5.35942L8.65487 1.84267C8.42065 1.6605 8.30354 1.56942 8.17423 1.53441C8.06013 1.50351 7.93987 1.50351 7.82577 1.53441C7.69646 1.56942 7.57935 1.6605 7.34513 1.84267Z", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
61899
|
+
}
|
|
61900
|
+
|
|
61896
61901
|
function CloseIcon(props) {
|
|
61897
61902
|
const { width = 16, height = 16, ...rest } = props;
|
|
61898
61903
|
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M12.6671 3.33325L3.33374 12.6666M3.33374 3.33325L12.6671 12.6666", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
@@ -63142,6 +63147,12 @@ const DivSwitchKnobSC = styled.div `
|
|
|
63142
63147
|
left: ${getTheme("com/switch/item/size-md/left-padding")};
|
|
63143
63148
|
`}
|
|
63144
63149
|
`;
|
|
63150
|
+
const DivWrapperSC$6 = styled.div `
|
|
63151
|
+
display: flex;
|
|
63152
|
+
flex-direction: column;
|
|
63153
|
+
gap: ${getTheme("com/input/vertical-gap")};
|
|
63154
|
+
width: fit-content;
|
|
63155
|
+
`;
|
|
63145
63156
|
const DivSwitchContainerSC = styled.div `
|
|
63146
63157
|
display: flex;
|
|
63147
63158
|
align-items: flex-start;
|
|
@@ -63209,9 +63220,29 @@ const DivSwitchContainerSC = styled.div `
|
|
|
63209
63220
|
`}
|
|
63210
63221
|
`;
|
|
63211
63222
|
|
|
63212
|
-
const
|
|
63223
|
+
const DivLabelSC = styled.div `
|
|
63224
|
+
width: 100%;
|
|
63225
|
+
display: flex;
|
|
63226
|
+
align-items: center;
|
|
63227
|
+
`;
|
|
63228
|
+
const LabelTextSC = styled.label `
|
|
63229
|
+
${getTheme("Label/Sm")}
|
|
63230
|
+
color: ${getTheme("com/input/label/label/color-text")};
|
|
63231
|
+
`;
|
|
63232
|
+
const SpanRequiredSC = styled.span `
|
|
63233
|
+
${getTheme("Label/Sm")}
|
|
63234
|
+
color: ${getTheme("com/input/label/required-mark/color-text")};
|
|
63235
|
+
`;
|
|
63236
|
+
|
|
63237
|
+
const FISInputLabel = (props) => {
|
|
63238
|
+
const { textLabel, required, iconLabel, onClickIconLabel } = props;
|
|
63239
|
+
return (jsxRuntime.jsxs(DivLabelSC, { children: [jsxRuntime.jsxs(LabelTextSC, { children: [textLabel, required && jsxRuntime.jsx(SpanRequiredSC, { children: "\u00A0*" })] }), iconLabel && (jsxRuntime.jsx(FISIconButton, { size: "xs", variant: "tertiary-invisible", icon: iconLabel, onClick: onClickIconLabel }))] }));
|
|
63240
|
+
};
|
|
63241
|
+
FISInputLabel.displayName = "FISInputLabel";
|
|
63242
|
+
|
|
63243
|
+
const FISSwitch = React.forwardRef(({ isOn, disabled = false, size = "md", label, subLabel, onToggle, textLabel = "", required, iconLabel, onClickIconLabel, ...props }, ref) => {
|
|
63213
63244
|
const labelContent = label || subLabel ? (jsxRuntime.jsxs(DivSwitchLabelContainerSC, { children: [label && jsxRuntime.jsx(SpanLabelSC$2, { "$size": size, children: label }), subLabel && jsxRuntime.jsx(SpanSubLabelSC$1, { "$size": size, children: subLabel })] })) : null;
|
|
63214
|
-
return (jsxRuntime.jsxs(DivSwitchContainerSC, { ref: ref, "$size": size, "$isOn": isOn, "$disabled": disabled,
|
|
63245
|
+
return (jsxRuntime.jsxs(DivWrapperSC$6, { ...props, onClick: () => !disabled && onToggle(), children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivSwitchContainerSC, { ref: ref, "$size": size, "$isOn": isOn, "$disabled": disabled, children: [jsxRuntime.jsx(DivSwitchTrackSC, { "$isOn": isOn, children: jsxRuntime.jsx(DivSwitchKnobSC, { "$isOn": isOn, "$size": size }) }), labelContent] })] }));
|
|
63215
63246
|
});
|
|
63216
63247
|
// Add display name for better debugging experience
|
|
63217
63248
|
FISSwitch.displayName = "FISSwitch";
|
|
@@ -64230,7 +64261,7 @@ const BreadcrumbEllipsis = () => (jsxRuntime.jsxs(jsxRuntime.Fragment, { childre
|
|
|
64230
64261
|
const FISBreadcrumb = ({ items, className }) => {
|
|
64231
64262
|
if (items.length === 0)
|
|
64232
64263
|
return null;
|
|
64233
|
-
return (jsxRuntime.jsxs(DivContainerSC$9, { className: className, children: [
|
|
64264
|
+
return (jsxRuntime.jsxs(DivContainerSC$9, { className: className, children: [jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FISIconButton, { size: "xs", icon: items?.[0]?.icon ?? jsxRuntime.jsx(HomeIcon, {}), variant: "tertiary-invisible", onClick: items[0].onClick }), jsxRuntime.jsx(DivSeparatorIconSC$1, { children: jsxRuntime.jsx(SeparatorIcon, {}) })] }), items.length > MAX_VISIBLE_ITEMS ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [items.slice(1, 2).map((item, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(BreadcrumbItem, { ...item }), jsxRuntime.jsx(DivSeparatorIconSC$1, { children: jsxRuntime.jsx(SeparatorIcon, {}) })] }, index))), jsxRuntime.jsx(BreadcrumbEllipsis, {}), items.slice(-2).map((item, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(BreadcrumbItem, { ...item }), jsxRuntime.jsx(DivSeparatorIconSC$1, { children: jsxRuntime.jsx(SeparatorIcon, {}) })] }, `end-${index}`)))] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: items.slice(1).map((item, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(BreadcrumbItem, { ...item }), jsxRuntime.jsx(DivSeparatorIconSC$1, { children: jsxRuntime.jsx(SeparatorIcon, {}) })] }, index))) }))] }));
|
|
64234
64265
|
};
|
|
64235
64266
|
FISBreadcrumb.displayName = "FISBreadcrumb";
|
|
64236
64267
|
|
|
@@ -65305,26 +65336,6 @@ const SpanHintSC$3 = styled.span `
|
|
|
65305
65336
|
}
|
|
65306
65337
|
`;
|
|
65307
65338
|
|
|
65308
|
-
const DivLabelSC = styled.div `
|
|
65309
|
-
width: 100%;
|
|
65310
|
-
display: flex;
|
|
65311
|
-
align-items: center;
|
|
65312
|
-
`;
|
|
65313
|
-
const LabelTextSC = styled.label `
|
|
65314
|
-
${getTheme("Label/Sm")}
|
|
65315
|
-
color: ${getTheme("com/input/label/label/color-text")};
|
|
65316
|
-
`;
|
|
65317
|
-
const SpanRequiredSC = styled.span `
|
|
65318
|
-
${getTheme("Label/Sm")}
|
|
65319
|
-
color: ${getTheme("com/input/label/required-mark/color-text")};
|
|
65320
|
-
`;
|
|
65321
|
-
|
|
65322
|
-
const FISInputLabel = (props) => {
|
|
65323
|
-
const { textLabel, required, iconLabel, onClickIconLabel } = props;
|
|
65324
|
-
return (jsxRuntime.jsxs(DivLabelSC, { children: [jsxRuntime.jsxs(LabelTextSC, { children: [textLabel, required && jsxRuntime.jsx(SpanRequiredSC, { children: "\u00A0*" })] }), iconLabel && (jsxRuntime.jsx(FISIconButton, { size: "xs", variant: "tertiary-invisible", icon: iconLabel, onClick: onClickIconLabel }))] }));
|
|
65325
|
-
};
|
|
65326
|
-
FISInputLabel.displayName = "FISInputLabel";
|
|
65327
|
-
|
|
65328
65339
|
/**
|
|
65329
65340
|
* A utility function to merge multiple React refs into a single callback function.
|
|
65330
65341
|
* This function accepts any number of refs as arguments and returns a callback function.
|
|
@@ -66513,13 +66524,13 @@ const FISInputArea = React.forwardRef((props, ref) => {
|
|
|
66513
66524
|
"input-area-icon": iconSuffix,
|
|
66514
66525
|
}) }), iconSuffix && (jsxRuntime.jsx(DivIconSC$1, { className: classNames({
|
|
66515
66526
|
"input-area-lg": size === "lg",
|
|
66516
|
-
}), children: jsxRuntime.jsx(FISIconButton, { variant: "tertiary-invisible", size: "sm", icon: iconSuffix, onClick: onClickIconSuffix }) })), jsxRuntime.jsx(DivResizeSC, { id: "resizeHandle", onMouseDown: handleResize, children: jsxRuntime.jsx(ResizeIcon, {}) })] }), jsxRuntime.jsxs(DivBottomSC, { children: [jsxRuntime.jsx(SpanHintSC$2, { className: classNames({
|
|
66527
|
+
}), children: jsxRuntime.jsx(FISIconButton, { variant: "tertiary-invisible", size: "sm", icon: iconSuffix, onClick: onClickIconSuffix }) })), jsxRuntime.jsx(DivResizeSC, { id: "resizeHandle", onMouseDown: handleResize, children: jsxRuntime.jsx(ResizeIcon, {}) })] }), (!!message || (showCount && maxLength > 0)) && (jsxRuntime.jsxs(DivBottomSC, { children: [jsxRuntime.jsx(SpanHintSC$2, { className: classNames({
|
|
66517
66528
|
disabled,
|
|
66518
66529
|
negative,
|
|
66519
66530
|
positive,
|
|
66520
66531
|
}), children: message ? message : "" }), jsxRuntime.jsx(DivCountSC, { children: showCount && maxLength > 0 && (jsxRuntime.jsxs("span", { className: classNames("text-area__count", {
|
|
66521
66532
|
negative: getCurrentValue()?.length > maxLength,
|
|
66522
|
-
}), children: [getCurrentValue()?.length, "/", maxLength] })) })] })] }));
|
|
66533
|
+
}), children: [getCurrentValue()?.length, "/", maxLength] })) })] }))] }));
|
|
66523
66534
|
});
|
|
66524
66535
|
FISInputArea.displayName = "FISInputArea";
|
|
66525
66536
|
|
|
@@ -72574,28 +72585,36 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
72574
72585
|
justify-content: ${(props) => props.$textAlign === "right" ? "flex-end" : "space-between"};
|
|
72575
72586
|
width: 100%;
|
|
72576
72587
|
gap: ${getTheme("com/table/title-cell/default/label/vertical-gap")};
|
|
72588
|
+
.label-container {
|
|
72589
|
+
display: flex;
|
|
72590
|
+
gap: 4px;
|
|
72577
72591
|
|
|
72578
|
-
|
|
72579
|
-
|
|
72580
|
-
|
|
72581
|
-
|
|
72582
|
-
|
|
72583
|
-
|
|
72592
|
+
.label {
|
|
72593
|
+
${getTheme("Label/XS")};
|
|
72594
|
+
width: 100%;
|
|
72595
|
+
display: inline-block;
|
|
72596
|
+
${(props) => (props.$textAlign === "right" ? "text-align: end" : "")};
|
|
72597
|
+
color: ${(props) => getTheme(`com/table/title-cell/${props?.$disabled ? "disable" : "default"}/label/color-text`)};
|
|
72584
72598
|
|
|
72585
|
-
|
|
72599
|
+
${(props) => {
|
|
72586
72600
|
if (props.$hasTruncateLabel) {
|
|
72587
72601
|
return styled.css `
|
|
72588
|
-
|
|
72589
|
-
|
|
72590
|
-
|
|
72591
|
-
|
|
72602
|
+
white-space: nowrap;
|
|
72603
|
+
overflow: hidden;
|
|
72604
|
+
text-overflow: ellipsis;
|
|
72605
|
+
`;
|
|
72592
72606
|
}
|
|
72593
72607
|
else {
|
|
72594
72608
|
return styled.css `
|
|
72595
|
-
|
|
72596
|
-
|
|
72609
|
+
white-space: pre-wrap;
|
|
72610
|
+
`;
|
|
72597
72611
|
}
|
|
72598
72612
|
}};
|
|
72613
|
+
}
|
|
72614
|
+
.required-asterisk {
|
|
72615
|
+
${getTheme("Label/XS")};
|
|
72616
|
+
color: #D92D20;
|
|
72617
|
+
}
|
|
72599
72618
|
}
|
|
72600
72619
|
|
|
72601
72620
|
.right-component-father {
|
|
@@ -72629,8 +72648,8 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
72629
72648
|
}
|
|
72630
72649
|
`;
|
|
72631
72650
|
|
|
72632
|
-
const FISTableHeaderCell = React.forwardRef(({ className, label, description, rightComponent, disabled, hasRightDivider = true, hasTruncateLabel = false, onlyIcon = false, textAlign = "left", ...rest }, ref) => {
|
|
72633
|
-
return (jsxRuntime.jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$onlyIcon": onlyIcon, ...rest, children: jsxRuntime.jsxs("div", { className: "header-cell-content", children: [jsxRuntime.jsxs("div", { className: "cell-content title", children: [label && jsxRuntime.jsx("div", { className: "label", children: label }), rightComponent && (jsxRuntime.jsx("div", { className: "right-component-father", children: rightComponent }))] }), description && (jsxRuntime.jsx("div", { className: "cell-content", children: jsxRuntime.jsx("div", { className: "description", children: description }) }))] }) }));
|
|
72651
|
+
const FISTableHeaderCell = React.forwardRef(({ className, label, description, rightComponent, disabled, hasRightDivider = true, hasTruncateLabel = false, onlyIcon = false, textAlign = "left", required, ...rest }, ref) => {
|
|
72652
|
+
return (jsxRuntime.jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$onlyIcon": onlyIcon, ...rest, children: jsxRuntime.jsxs("div", { className: "header-cell-content", children: [jsxRuntime.jsxs("div", { className: "cell-content title", children: [label && (jsxRuntime.jsxs("div", { className: "label-container", children: [jsxRuntime.jsx("div", { className: "label", children: label }), required && jsxRuntime.jsx("div", { className: "required-asterisk", children: "*" })] })), rightComponent && (jsxRuntime.jsx("div", { className: "right-component-father", children: rightComponent }))] }), description && (jsxRuntime.jsx("div", { className: "cell-content", children: jsxRuntime.jsx("div", { className: "description", children: description }) }))] }) }));
|
|
72634
72653
|
});
|
|
72635
72654
|
FISTableHeaderCell.displayName = "FISTableHeaderCell";
|
|
72636
72655
|
|
|
@@ -72930,8 +72949,8 @@ const DivIconSC = styled.div `
|
|
|
72930
72949
|
}}
|
|
72931
72950
|
`;
|
|
72932
72951
|
|
|
72933
|
-
const FISTableCell = React.forwardRef(({ className, textAlign, variant = COLUMN_VARIANT.PRIMARY, content, description, icon, disabled, hasBorder, onChange, contentWrapText = false, ...rest }, ref) => {
|
|
72934
|
-
return (jsxRuntime.jsx(DivColumnCellContainerSC, { "$hasBorder": hasBorder, "$disabled": disabled, "$variant": variant, "$textAlign": textAlign, "$contentWrapText": contentWrapText, "$hasContent": content ? "true" : undefined, "$hasDescription": description, ref: ref, className: classNames("column-cell-container", className), ...rest, children: textAlign === COLUMN_TEXT_ALIGN.SINGLE_LINE ? (jsxRuntime.jsxs("div", { className: "single-line-content", children: [icon && (jsxRuntime.jsx("div", { className: "icon-box", children: jsxRuntime.jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon }) })), (content || description) && (jsxRuntime.jsxs("div", { className: "content-box", children: [content && jsxRuntime.jsx("div", { className: "content", children: content }), description && (jsxRuntime.jsx("div", { className: "description", children: description }))] }))] })) : (jsxRuntime.jsxs("div", { className: "left-right-content", children: [(icon || content) && (jsxRuntime.jsxs("div", { className: "content-box", children: [icon && (jsxRuntime.jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon })), content && jsxRuntime.jsx("div", { className: "content", children: content })] })), description && jsxRuntime.jsx("div", { className: "description", children: description })] })) }));
|
|
72952
|
+
const FISTableCell = React.forwardRef(({ className, textAlign, variant = COLUMN_VARIANT.PRIMARY, content, description, icon, disabled, hasBorder, onChange, contentWrapText = false, tooltip = false, placement = "top", variantTooltip = "primary", ...rest }, ref) => {
|
|
72953
|
+
return (jsxRuntime.jsx(FISTooltip, { variant: variantTooltip, placement: placement, title: tooltip ? content || "" : undefined, children: jsxRuntime.jsx(DivColumnCellContainerSC, { "$hasBorder": hasBorder, "$disabled": disabled, "$variant": variant, "$textAlign": textAlign, "$contentWrapText": contentWrapText, "$hasContent": content ? "true" : undefined, "$hasDescription": description, ref: ref, className: classNames("column-cell-container", className), ...rest, children: textAlign === COLUMN_TEXT_ALIGN.SINGLE_LINE ? (jsxRuntime.jsxs("div", { className: "single-line-content", children: [icon && (jsxRuntime.jsx("div", { className: "icon-box", children: jsxRuntime.jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon }) })), (content || description) && (jsxRuntime.jsxs("div", { className: "content-box", children: [content && jsxRuntime.jsx("div", { className: "content", children: content }), description && (jsxRuntime.jsx("div", { className: "description", children: description }))] }))] })) : (jsxRuntime.jsxs("div", { className: "left-right-content", children: [(icon || content) && (jsxRuntime.jsxs("div", { className: "content-box", children: [icon && (jsxRuntime.jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon })), content && jsxRuntime.jsx("div", { className: "content", children: content })] })), description && jsxRuntime.jsx("div", { className: "description", children: description })] })) }) }));
|
|
72935
72954
|
});
|
|
72936
72955
|
FISTableCell.displayName = "FISTableCell";
|
|
72937
72956
|
|
|
@@ -74344,48 +74363,6 @@ const FISSplitButton = React.forwardRef((props, ref) => {
|
|
|
74344
74363
|
});
|
|
74345
74364
|
FISSplitButton.displayName = "FISSplitButton";
|
|
74346
74365
|
|
|
74347
|
-
const DivWrapperSC$1 = styled.div `
|
|
74348
|
-
width: 100%;
|
|
74349
|
-
display: flex;
|
|
74350
|
-
flex-direction: column;
|
|
74351
|
-
gap: ${getTheme("com/input/vertical-gap")};
|
|
74352
|
-
`;
|
|
74353
|
-
const preventSelection = styled.css `
|
|
74354
|
-
user-select: none !important;
|
|
74355
|
-
-webkit-user-select: none !important;
|
|
74356
|
-
-moz-user-select: none !important;
|
|
74357
|
-
-ms-user-select: none !important;
|
|
74358
|
-
cursor: pointer !important;
|
|
74359
|
-
`;
|
|
74360
|
-
const DivInputWrapperSC = styled.div `
|
|
74361
|
-
position: relative;
|
|
74362
|
-
display: inline-block;
|
|
74363
|
-
width: 100%;
|
|
74364
|
-
|
|
74365
|
-
${(props) => props.$hasValue &&
|
|
74366
|
-
styled.css `
|
|
74367
|
-
${preventSelection}
|
|
74368
|
-
|
|
74369
|
-
input {
|
|
74370
|
-
${preventSelection}
|
|
74371
|
-
pointer-events: none;
|
|
74372
|
-
}
|
|
74373
|
-
`}
|
|
74374
|
-
`;
|
|
74375
|
-
const DivDropdownMenuSC = styled.div `
|
|
74376
|
-
margin-top: ${getTheme("com/select/vertical-gap")};
|
|
74377
|
-
`;
|
|
74378
|
-
const SelectedTagsWrapper = styled.div `
|
|
74379
|
-
display: flex;
|
|
74380
|
-
flex-wrap: wrap;
|
|
74381
|
-
gap: ${getTheme("com/combo-box/selected-data/horizontal-gap")};
|
|
74382
|
-
width: 100%;
|
|
74383
|
-
max-height: calc(
|
|
74384
|
-
2 * ${getTheme("com/chips-button/size-xs/height")} +
|
|
74385
|
-
${getTheme("com/combo-box/selected-data/horizontal-gap")}
|
|
74386
|
-
);
|
|
74387
|
-
`;
|
|
74388
|
-
|
|
74389
74366
|
const InputSC = styled.input `
|
|
74390
74367
|
width: 100%;
|
|
74391
74368
|
cursor: pointer;
|
|
@@ -74463,7 +74440,7 @@ const InputSC = styled.input `
|
|
|
74463
74440
|
}
|
|
74464
74441
|
}
|
|
74465
74442
|
`;
|
|
74466
|
-
const DivWrapperSC = styled.div `
|
|
74443
|
+
const DivWrapperSC$1 = styled.div `
|
|
74467
74444
|
width: 100%;
|
|
74468
74445
|
display: flex;
|
|
74469
74446
|
align-items: center;
|
|
@@ -74667,10 +74644,52 @@ const FISSelectItem = React.forwardRef((props, ref) => {
|
|
|
74667
74644
|
iconPrefix: iconPrefix,
|
|
74668
74645
|
negative: negative,
|
|
74669
74646
|
activeDropdown: activeDropdown,
|
|
74670
|
-
}), "$size": size, "$activeDropdown": activeDropdown, children: jsxRuntime.jsxs(DivWrapperSC, { children: [iconPrefix && (jsxRuntime.jsx(DivIconPrefixSC, { "$size": size, children: iconPrefix })), jsxRuntime.jsx(InputSC, { ...rest, ref: ref, disabled: disabled, "$size": size, autoComplete: "off" }), iconSuffix && (jsxRuntime.jsx(DivIconSuffixSC, { "$size": size, "$disabled": disabled, children: iconSuffix }))] }) }));
|
|
74647
|
+
}), "$size": size, "$activeDropdown": activeDropdown, children: jsxRuntime.jsxs(DivWrapperSC$1, { children: [iconPrefix && (jsxRuntime.jsx(DivIconPrefixSC, { "$size": size, children: iconPrefix })), jsxRuntime.jsx(InputSC, { ...rest, ref: ref, disabled: disabled, "$size": size, autoComplete: "off" }), iconSuffix && (jsxRuntime.jsx(DivIconSuffixSC, { "$size": size, "$disabled": disabled, children: iconSuffix }))] }) }));
|
|
74671
74648
|
});
|
|
74672
74649
|
FISSelectItem.displayName = "FISSelectItem";
|
|
74673
74650
|
|
|
74651
|
+
const DivWrapperSC = styled.div `
|
|
74652
|
+
width: 100%;
|
|
74653
|
+
display: flex;
|
|
74654
|
+
flex-direction: column;
|
|
74655
|
+
gap: ${getTheme("com/input/vertical-gap")};
|
|
74656
|
+
`;
|
|
74657
|
+
const preventSelection = styled.css `
|
|
74658
|
+
user-select: none !important;
|
|
74659
|
+
-webkit-user-select: none !important;
|
|
74660
|
+
-moz-user-select: none !important;
|
|
74661
|
+
-ms-user-select: none !important;
|
|
74662
|
+
cursor: pointer !important;
|
|
74663
|
+
`;
|
|
74664
|
+
const DivInputWrapperSC = styled.div `
|
|
74665
|
+
position: relative;
|
|
74666
|
+
display: inline-block;
|
|
74667
|
+
width: 100%;
|
|
74668
|
+
|
|
74669
|
+
${(props) => props.$hasValue &&
|
|
74670
|
+
styled.css `
|
|
74671
|
+
${preventSelection}
|
|
74672
|
+
|
|
74673
|
+
input {
|
|
74674
|
+
${preventSelection}
|
|
74675
|
+
pointer-events: none;
|
|
74676
|
+
}
|
|
74677
|
+
`}
|
|
74678
|
+
`;
|
|
74679
|
+
const DivDropdownMenuSC = styled.div `
|
|
74680
|
+
margin-top: ${getTheme("com/select/vertical-gap")};
|
|
74681
|
+
`;
|
|
74682
|
+
const SelectedTagsWrapper = styled.div `
|
|
74683
|
+
display: flex;
|
|
74684
|
+
flex-wrap: wrap;
|
|
74685
|
+
gap: ${getTheme("com/combo-box/selected-data/horizontal-gap")};
|
|
74686
|
+
width: 100%;
|
|
74687
|
+
max-height: calc(
|
|
74688
|
+
2 * ${getTheme("com/chips-button/size-xs/height")} +
|
|
74689
|
+
${getTheme("com/combo-box/selected-data/horizontal-gap")}
|
|
74690
|
+
);
|
|
74691
|
+
`;
|
|
74692
|
+
|
|
74674
74693
|
function isMenuSize(value) {
|
|
74675
74694
|
return value === "sm" || value === "md";
|
|
74676
74695
|
}
|
|
@@ -74684,7 +74703,9 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
|
|
|
74684
74703
|
const inputRef = React.useRef(null);
|
|
74685
74704
|
// Expose focus and openDropdown methods via ref
|
|
74686
74705
|
React.useImperativeHandle(ref, () => ({
|
|
74687
|
-
|
|
74706
|
+
focus: () => {
|
|
74707
|
+
inputRef.current?.focus();
|
|
74708
|
+
},
|
|
74688
74709
|
openDropdown: () => {
|
|
74689
74710
|
if (!disabled && !isOpen) {
|
|
74690
74711
|
setIsOpen(true);
|
|
@@ -74865,7 +74886,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
|
|
|
74865
74886
|
}
|
|
74866
74887
|
return selectInput;
|
|
74867
74888
|
};
|
|
74868
|
-
return (jsxRuntime.jsxs(DivWrapperSC
|
|
74889
|
+
return (jsxRuntime.jsxs(DivWrapperSC, { className: className, style: style, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), renderSelectInput(), message && (jsxRuntime.jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && !hideChip && Array.isArray(value) && value.length > 0 && (jsxRuntime.jsx(SelectedTagsWrapper, { children: jsxRuntime.jsx(MultipleValue, { options: selectedItems, onRemove: handleOptionRemove }) })), isOpen && (jsxRuntime.jsx(Portal, { portal: portal, children: jsxRuntime.jsx(DivDropdownMenuSC, { ref: setPopperElement, style: {
|
|
74869
74890
|
...styles.popper,
|
|
74870
74891
|
width: referenceElement?.offsetWidth,
|
|
74871
74892
|
zIndex: 9999,
|