fis-component 0.0.99 → 0.1.1
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 +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Select/types.d.ts +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Select/types.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ type BaseSelectProps<T extends string | number> = Partial<InputLabelProps> & Omi
|
|
|
22
22
|
portal?: boolean;
|
|
23
23
|
maxHeight?: string | number;
|
|
24
24
|
onPopupScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
|
25
|
+
hideChip?: boolean;
|
|
25
26
|
};
|
|
26
27
|
export type SingleSelectProps<T extends string | number> = BaseSelectProps<T> & {
|
|
27
28
|
multi?: false;
|
package/dist/esm/index.js
CHANGED
|
@@ -66092,7 +66092,7 @@ const FISInputArea = forwardRef((props, ref) => {
|
|
|
66092
66092
|
"input-area-lg": size === "lg",
|
|
66093
66093
|
"input-area-icon": iconSuffix,
|
|
66094
66094
|
negative,
|
|
66095
|
-
}), style: { width: fixedWidth ? `${fixedWidth}px` : "auto" }, children: [jsx(TextAreaSC, { ...rest, onChange: handleChange, onKeyDown: handleKeyPress, ref: mergeRefs(ref, inputRef), disabled: disabled, className: classNames({
|
|
66095
|
+
}), style: { width: fixedWidth ? `${fixedWidth}px` : "auto" }, children: [jsx(TextAreaSC, { ...rest, onChange: handleChange, onKeyDown: handleKeyPress, ref: mergeRefs(ref, inputRef), disabled: disabled, maxLength: maxLength, className: classNames({
|
|
66096
66096
|
negative,
|
|
66097
66097
|
"input-area-lg": size === "lg",
|
|
66098
66098
|
"input-area-icon": iconSuffix,
|
|
@@ -73647,7 +73647,7 @@ function isMenuSize(value) {
|
|
|
73647
73647
|
return value === "sm" || value === "md";
|
|
73648
73648
|
}
|
|
73649
73649
|
|
|
73650
|
-
const FISSelect = forwardRef(({ className, style, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholder, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal, maxHeight, onPopupScroll, ...restProps }, ref) => {
|
|
73650
|
+
const FISSelect = forwardRef(({ className, style, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholder, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal, maxHeight, onPopupScroll, hideChip, ...restProps }, ref) => {
|
|
73651
73651
|
const [isOpen, setIsOpen] = useState(false);
|
|
73652
73652
|
const [referenceElement, setReferenceElement] = useState(null);
|
|
73653
73653
|
const [popperElement, setPopperElement] = useState(null);
|
|
@@ -73794,7 +73794,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
73794
73794
|
return () => clearTimeout(timer);
|
|
73795
73795
|
}
|
|
73796
73796
|
}, [isOpen, multi]);
|
|
73797
|
-
return (jsxs(DivWrapperSC$1, { className: className, style: style, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, "$hasValue": !!value, children: jsx(FISSelectItem, { ...restProps, onBlur: handleBlur, ref: ref, size: size, placeholder: placeholder, iconSuffix: isOpen ? jsx(ArrowUpIcon, {}) : jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen, negative: negative }) }), message && (jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && Array.isArray(value) && value.length > 0 && (jsx(SelectedTagsWrapper, { children: jsx(MultipleValue, { options: selectedItems, onRemove: handleOptionRemove }) })), isOpen && (jsx(Portal, { portal: portal, children: jsx(DivDropdownMenuSC, { ref: setPopperElement, style: {
|
|
73797
|
+
return (jsxs(DivWrapperSC$1, { className: className, style: style, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, "$hasValue": !!value, children: jsx(FISSelectItem, { ...restProps, onBlur: handleBlur, ref: ref, size: size, placeholder: placeholder, iconSuffix: isOpen ? jsx(ArrowUpIcon, {}) : jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen, negative: negative }) }), message && (jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && !hideChip && Array.isArray(value) && value.length > 0 && (jsx(SelectedTagsWrapper, { children: jsx(MultipleValue, { options: selectedItems, onRemove: handleOptionRemove }) })), isOpen && (jsx(Portal, { portal: portal, children: jsx(DivDropdownMenuSC, { ref: setPopperElement, style: {
|
|
73798
73798
|
...styles.popper,
|
|
73799
73799
|
width: referenceElement?.offsetWidth,
|
|
73800
73800
|
zIndex: 9999,
|