fis-component 0.1.8 → 0.1.9
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 +103 -87
- 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 +103 -87
- 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
|
@@ -63142,6 +63142,12 @@ const DivSwitchKnobSC = styled.div `
|
|
|
63142
63142
|
left: ${getTheme("com/switch/item/size-md/left-padding")};
|
|
63143
63143
|
`}
|
|
63144
63144
|
`;
|
|
63145
|
+
const DivWrapperSC$6 = styled.div `
|
|
63146
|
+
display: flex;
|
|
63147
|
+
flex-direction: column;
|
|
63148
|
+
gap: ${getTheme("com/input/vertical-gap")};
|
|
63149
|
+
width: fit-content;
|
|
63150
|
+
`;
|
|
63145
63151
|
const DivSwitchContainerSC = styled.div `
|
|
63146
63152
|
display: flex;
|
|
63147
63153
|
align-items: flex-start;
|
|
@@ -63209,9 +63215,29 @@ const DivSwitchContainerSC = styled.div `
|
|
|
63209
63215
|
`}
|
|
63210
63216
|
`;
|
|
63211
63217
|
|
|
63212
|
-
const
|
|
63218
|
+
const DivLabelSC = styled.div `
|
|
63219
|
+
width: 100%;
|
|
63220
|
+
display: flex;
|
|
63221
|
+
align-items: center;
|
|
63222
|
+
`;
|
|
63223
|
+
const LabelTextSC = styled.label `
|
|
63224
|
+
${getTheme("Label/Sm")}
|
|
63225
|
+
color: ${getTheme("com/input/label/label/color-text")};
|
|
63226
|
+
`;
|
|
63227
|
+
const SpanRequiredSC = styled.span `
|
|
63228
|
+
${getTheme("Label/Sm")}
|
|
63229
|
+
color: ${getTheme("com/input/label/required-mark/color-text")};
|
|
63230
|
+
`;
|
|
63231
|
+
|
|
63232
|
+
const FISInputLabel = (props) => {
|
|
63233
|
+
const { textLabel, required, iconLabel, onClickIconLabel } = props;
|
|
63234
|
+
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 }))] }));
|
|
63235
|
+
};
|
|
63236
|
+
FISInputLabel.displayName = "FISInputLabel";
|
|
63237
|
+
|
|
63238
|
+
const FISSwitch = React.forwardRef(({ isOn, disabled = false, size = "md", label, subLabel, onToggle, textLabel = "", required, iconLabel, onClickIconLabel, ...props }, ref) => {
|
|
63213
63239
|
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,
|
|
63240
|
+
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
63241
|
});
|
|
63216
63242
|
// Add display name for better debugging experience
|
|
63217
63243
|
FISSwitch.displayName = "FISSwitch";
|
|
@@ -65305,26 +65331,6 @@ const SpanHintSC$3 = styled.span `
|
|
|
65305
65331
|
}
|
|
65306
65332
|
`;
|
|
65307
65333
|
|
|
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
65334
|
/**
|
|
65329
65335
|
* A utility function to merge multiple React refs into a single callback function.
|
|
65330
65336
|
* This function accepts any number of refs as arguments and returns a callback function.
|
|
@@ -66513,13 +66519,13 @@ const FISInputArea = React.forwardRef((props, ref) => {
|
|
|
66513
66519
|
"input-area-icon": iconSuffix,
|
|
66514
66520
|
}) }), iconSuffix && (jsxRuntime.jsx(DivIconSC$1, { className: classNames({
|
|
66515
66521
|
"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({
|
|
66522
|
+
}), 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
66523
|
disabled,
|
|
66518
66524
|
negative,
|
|
66519
66525
|
positive,
|
|
66520
66526
|
}), children: message ? message : "" }), jsxRuntime.jsx(DivCountSC, { children: showCount && maxLength > 0 && (jsxRuntime.jsxs("span", { className: classNames("text-area__count", {
|
|
66521
66527
|
negative: getCurrentValue()?.length > maxLength,
|
|
66522
|
-
}), children: [getCurrentValue()?.length, "/", maxLength] })) })] })] }));
|
|
66528
|
+
}), children: [getCurrentValue()?.length, "/", maxLength] })) })] }))] }));
|
|
66523
66529
|
});
|
|
66524
66530
|
FISInputArea.displayName = "FISInputArea";
|
|
66525
66531
|
|
|
@@ -72574,28 +72580,36 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
72574
72580
|
justify-content: ${(props) => props.$textAlign === "right" ? "flex-end" : "space-between"};
|
|
72575
72581
|
width: 100%;
|
|
72576
72582
|
gap: ${getTheme("com/table/title-cell/default/label/vertical-gap")};
|
|
72583
|
+
.label-container {
|
|
72584
|
+
display: flex;
|
|
72585
|
+
gap: 4px;
|
|
72577
72586
|
|
|
72578
|
-
|
|
72579
|
-
|
|
72580
|
-
|
|
72581
|
-
|
|
72582
|
-
|
|
72583
|
-
|
|
72587
|
+
.label {
|
|
72588
|
+
${getTheme("Label/XS")};
|
|
72589
|
+
width: 100%;
|
|
72590
|
+
display: inline-block;
|
|
72591
|
+
${(props) => (props.$textAlign === "right" ? "text-align: end" : "")};
|
|
72592
|
+
color: ${(props) => getTheme(`com/table/title-cell/${props?.$disabled ? "disable" : "default"}/label/color-text`)};
|
|
72584
72593
|
|
|
72585
|
-
|
|
72594
|
+
${(props) => {
|
|
72586
72595
|
if (props.$hasTruncateLabel) {
|
|
72587
72596
|
return styled.css `
|
|
72588
|
-
|
|
72589
|
-
|
|
72590
|
-
|
|
72591
|
-
|
|
72597
|
+
white-space: nowrap;
|
|
72598
|
+
overflow: hidden;
|
|
72599
|
+
text-overflow: ellipsis;
|
|
72600
|
+
`;
|
|
72592
72601
|
}
|
|
72593
72602
|
else {
|
|
72594
72603
|
return styled.css `
|
|
72595
|
-
|
|
72596
|
-
|
|
72604
|
+
white-space: pre-wrap;
|
|
72605
|
+
`;
|
|
72597
72606
|
}
|
|
72598
72607
|
}};
|
|
72608
|
+
}
|
|
72609
|
+
.required-asterisk {
|
|
72610
|
+
${getTheme("Label/XS")};
|
|
72611
|
+
color: #D92D20;
|
|
72612
|
+
}
|
|
72599
72613
|
}
|
|
72600
72614
|
|
|
72601
72615
|
.right-component-father {
|
|
@@ -72629,8 +72643,8 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
72629
72643
|
}
|
|
72630
72644
|
`;
|
|
72631
72645
|
|
|
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 }) }))] }) }));
|
|
72646
|
+
const FISTableHeaderCell = React.forwardRef(({ className, label, description, rightComponent, disabled, hasRightDivider = true, hasTruncateLabel = false, onlyIcon = false, textAlign = "left", required, ...rest }, ref) => {
|
|
72647
|
+
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
72648
|
});
|
|
72635
72649
|
FISTableHeaderCell.displayName = "FISTableHeaderCell";
|
|
72636
72650
|
|
|
@@ -72930,8 +72944,8 @@ const DivIconSC = styled.div `
|
|
|
72930
72944
|
}}
|
|
72931
72945
|
`;
|
|
72932
72946
|
|
|
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 })] })) }));
|
|
72947
|
+
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) => {
|
|
72948
|
+
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
72949
|
});
|
|
72936
72950
|
FISTableCell.displayName = "FISTableCell";
|
|
72937
72951
|
|
|
@@ -74344,48 +74358,6 @@ const FISSplitButton = React.forwardRef((props, ref) => {
|
|
|
74344
74358
|
});
|
|
74345
74359
|
FISSplitButton.displayName = "FISSplitButton";
|
|
74346
74360
|
|
|
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
74361
|
const InputSC = styled.input `
|
|
74390
74362
|
width: 100%;
|
|
74391
74363
|
cursor: pointer;
|
|
@@ -74463,7 +74435,7 @@ const InputSC = styled.input `
|
|
|
74463
74435
|
}
|
|
74464
74436
|
}
|
|
74465
74437
|
`;
|
|
74466
|
-
const DivWrapperSC = styled.div `
|
|
74438
|
+
const DivWrapperSC$1 = styled.div `
|
|
74467
74439
|
width: 100%;
|
|
74468
74440
|
display: flex;
|
|
74469
74441
|
align-items: center;
|
|
@@ -74667,10 +74639,52 @@ const FISSelectItem = React.forwardRef((props, ref) => {
|
|
|
74667
74639
|
iconPrefix: iconPrefix,
|
|
74668
74640
|
negative: negative,
|
|
74669
74641
|
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 }))] }) }));
|
|
74642
|
+
}), "$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
74643
|
});
|
|
74672
74644
|
FISSelectItem.displayName = "FISSelectItem";
|
|
74673
74645
|
|
|
74646
|
+
const DivWrapperSC = styled.div `
|
|
74647
|
+
width: 100%;
|
|
74648
|
+
display: flex;
|
|
74649
|
+
flex-direction: column;
|
|
74650
|
+
gap: ${getTheme("com/input/vertical-gap")};
|
|
74651
|
+
`;
|
|
74652
|
+
const preventSelection = styled.css `
|
|
74653
|
+
user-select: none !important;
|
|
74654
|
+
-webkit-user-select: none !important;
|
|
74655
|
+
-moz-user-select: none !important;
|
|
74656
|
+
-ms-user-select: none !important;
|
|
74657
|
+
cursor: pointer !important;
|
|
74658
|
+
`;
|
|
74659
|
+
const DivInputWrapperSC = styled.div `
|
|
74660
|
+
position: relative;
|
|
74661
|
+
display: inline-block;
|
|
74662
|
+
width: 100%;
|
|
74663
|
+
|
|
74664
|
+
${(props) => props.$hasValue &&
|
|
74665
|
+
styled.css `
|
|
74666
|
+
${preventSelection}
|
|
74667
|
+
|
|
74668
|
+
input {
|
|
74669
|
+
${preventSelection}
|
|
74670
|
+
pointer-events: none;
|
|
74671
|
+
}
|
|
74672
|
+
`}
|
|
74673
|
+
`;
|
|
74674
|
+
const DivDropdownMenuSC = styled.div `
|
|
74675
|
+
margin-top: ${getTheme("com/select/vertical-gap")};
|
|
74676
|
+
`;
|
|
74677
|
+
const SelectedTagsWrapper = styled.div `
|
|
74678
|
+
display: flex;
|
|
74679
|
+
flex-wrap: wrap;
|
|
74680
|
+
gap: ${getTheme("com/combo-box/selected-data/horizontal-gap")};
|
|
74681
|
+
width: 100%;
|
|
74682
|
+
max-height: calc(
|
|
74683
|
+
2 * ${getTheme("com/chips-button/size-xs/height")} +
|
|
74684
|
+
${getTheme("com/combo-box/selected-data/horizontal-gap")}
|
|
74685
|
+
);
|
|
74686
|
+
`;
|
|
74687
|
+
|
|
74674
74688
|
function isMenuSize(value) {
|
|
74675
74689
|
return value === "sm" || value === "md";
|
|
74676
74690
|
}
|
|
@@ -74684,7 +74698,9 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
|
|
|
74684
74698
|
const inputRef = React.useRef(null);
|
|
74685
74699
|
// Expose focus and openDropdown methods via ref
|
|
74686
74700
|
React.useImperativeHandle(ref, () => ({
|
|
74687
|
-
|
|
74701
|
+
focus: () => {
|
|
74702
|
+
inputRef.current?.focus();
|
|
74703
|
+
},
|
|
74688
74704
|
openDropdown: () => {
|
|
74689
74705
|
if (!disabled && !isOpen) {
|
|
74690
74706
|
setIsOpen(true);
|
|
@@ -74865,7 +74881,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
|
|
|
74865
74881
|
}
|
|
74866
74882
|
return selectInput;
|
|
74867
74883
|
};
|
|
74868
|
-
return (jsxRuntime.jsxs(DivWrapperSC
|
|
74884
|
+
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
74885
|
...styles.popper,
|
|
74870
74886
|
width: referenceElement?.offsetWidth,
|
|
74871
74887
|
zIndex: 9999,
|