@onewelcome/react-lib-components 10.0.0 → 10.0.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/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
- package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
- package/dist/components/Button/Button.module.scss.cjs.js +2 -2
- package/dist/components/Button/Button.module.scss.es.js +17 -17
- package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/IconButton.module.scss.es.js +18 -18
- package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +5 -5
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGrid.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +8 -8
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +7 -7
- package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
- package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
- package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
- package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
- package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +5 -5
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
- package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
- package/dist/components/Form/Form.module.scss.cjs.js +2 -2
- package/dist/components/Form/Form.module.scss.es.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +5 -5
- package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
- package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
- package/dist/components/Form/Input/Input.module.scss.es.js +9 -9
- package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
- package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js +64 -7
- package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +15 -15
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
- package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +17 -17
- package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
- package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
- package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
- package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
- package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +4 -4
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
- package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
- package/dist/components/Icon/Icon.module.scss.es.js +104 -104
- package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
- package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +12 -12
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
- package/dist/components/Link/Link.module.scss.cjs.js +2 -2
- package/dist/components/Link/Link.module.scss.es.js +16 -16
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
- package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
- package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
- package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
- package/dist/components/Pagination/Pagination.module.scss.es.js +14 -14
- package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
- package/dist/components/Popover/Popover.module.scss.es.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
- package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
- package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
- package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
- package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
- package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Step.module.scss.es.js +22 -22
- package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
- package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
- package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
- package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
- package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
- package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
- package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
- package/dist/components/Tag/Tag.module.scss.es.js +6 -6
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
- package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
- package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.scss.es.js +27 -27
- package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
- package/dist/components/Typography/Typography.module.scss.es.js +13 -13
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/readyclasses.module.scss.cjs.js +2 -2
- package/dist/readyclasses.module.scss.es.js +5 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.es.js","sources":["../../../../../src/components/Form/Select/MultiSelect/MultiSelect.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classes from \"./MultiSelect.module.scss\";\n\nimport React, {\n ForwardRefRenderFunction,\n ReactElement,\n createRef,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { useClickOutside } from \"../../../../hooks/useClickOutside\";\nimport { useDetermineStatusIcon } from \"../../../../hooks/useDetermineStatusIcon\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { filterProps, generateID } from \"../../../../util/helper\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { MultiSelectProps, Position } from \"../Select.interfaces\";\nimport { useAddNewBtn } from \"../useAddNewBtn\";\nimport { useSelectPositionList } from \"../useSelectPositionList\";\nimport { SelectButton } from \"./SelectButton\";\nimport { Display, SelectedOptions } from \"./SelectedOptions\";\nimport { useArrowNavigation } from \"./useArrowNavigation\";\nimport { useSearch } from \"./useSearch\";\nimport { withReadOnly } from \"../../../withReadOnly\";\n\nconst getOptionId = (multiSelectId: string, optionIndex: number) =>\n `${multiSelectId}_option${optionIndex}`;\n\nconst getListboxId = (multiSelectId: string) => `${multiSelectId}_listbox`;\n\nconst extractTextFromChildren = (children: React.ReactNode): string => {\n return React.Children.toArray(children).reduce((text: string, child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return text + child;\n }\n if (React.isValidElement(child) && child.props.children) {\n return text + extractTextFromChildren(child.props.children);\n }\n return text;\n }, \"\");\n};\n\nconst MultiSelectComponent: ForwardRefRenderFunction<HTMLSelectElement, MultiSelectProps> = (\n {\n id,\n children,\n name,\n disabled = false,\n labeledBy,\n placeholder,\n describedBy,\n selectButtonProps = {},\n className,\n error = false,\n success = false,\n value,\n clearLabel = \"Clear selection\",\n noResultsLabel = \"No results found\",\n onChange,\n addNew,\n search = { enabled: true, renderThreshold: 0, searchPlaceholder: \"Search item\" },\n isReadOnlyView,\n ...rest\n }: MultiSelectProps,\n ref\n) => {\n const multiSelectId = useRef(id ?? generateID(20));\n const [expanded, setExpanded] = useState(false);\n const [display, setDisplay] = useState<Display[]>([]);\n const containerReference = useRef<HTMLDivElement>(null);\n const optionListReference = useRef<HTMLDivElement>(null);\n const [focusedSelectItem, setFocusedSelectItem] = useState(0);\n const [shouldClick, setShouldClick] =\n useState(\n false\n ); /** We need this, because whenever we use the arrow keys to select the select item, and we focus the currently selected item it fires the \"click\" listener in Option component. Instead, we only want this to fire if we press \"enter\" or \"spacebar\" so we set this to true whenever that is the case, and back to false when it has been executed. */\n const [shouldFocusButtonAfterClose, setShouldFocusButtonAfterClose] = useState(false);\n const [optionsVisibleCount, setOptionsVisibleCount] = useState(\n React.Children.count(children) - display.length\n );\n const { filter, renderSearch, searchInputRef, resetSearchState, searchVisible } = useSearch({\n selectId: multiSelectId.current,\n expanded,\n search,\n searchInputClassName: classes[\"select-search\"],\n optionsCount: optionsVisibleCount,\n focusedSelectItem,\n setFocusedSelectItem,\n describedBy,\n getOptionId,\n getListboxId\n });\n const { addBtnRef, addNewBtnOptionsContainerClassName, renderAddNew } = useAddNewBtn({\n id: getOptionId(multiSelectId.current, optionsVisibleCount),\n addNew,\n filter,\n focusedSelectItem,\n optionsCount: optionsVisibleCount,\n searchInputRef,\n shouldClick,\n onClickCallback: () => {\n setShouldClick(false);\n resetSearchState();\n }\n });\n\n const nativeSelect = (ref as React.RefObject<HTMLSelectElement>) || createRef();\n\n const onOptionChangeHandler = (optionElement: HTMLElement | null) => {\n if (nativeSelect.current && optionElement) {\n const value = optionElement.getAttribute(\"data-value\")!;\n const options = [...nativeSelect.current.options];\n const lastSelectedOptionValues = options\n .filter(option => option.selected)\n .map(option => option.value);\n options.forEach(option => {\n if (option.value === value || lastSelectedOptionValues.includes(option.value)) {\n option.selected = true;\n }\n });\n nativeSelect.current.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n setExpanded(false);\n resetSearchState();\n };\n\n const onSelectedOptionRemoveHandler = (value: string) => {\n if (nativeSelect.current) {\n const options = [...nativeSelect.current.options];\n options.find(option => option.value === value)!.selected = false;\n nativeSelect.current.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n };\n\n const customSelectButtonRef = useRef<HTMLButtonElement>(null);\n const readOnlyView = !!rest[\"data-readonlyview\"] || isReadOnlyView;\n const { onArrowNavigation } = useArrowNavigation({\n expanded,\n setExpanded,\n setFocusedSelectItem,\n childrenCount: optionsVisibleCount,\n setShouldClick,\n addBtnRef,\n searchInputRef,\n customSelectButtonRef,\n onClose: resetSearchState,\n isReadOnlyView: readOnlyView\n });\n\n const { listPosition, opacity, optionsListMaxHeight, setListPosition, setOpacity } =\n useSelectPositionList({ expanded, optionListReference, containerReference, addBtnRef });\n\n const syncDisplayValue = (values: string[]) => {\n const options = React.Children.map(children, child => child);\n const displayArray: Display[] = values.map(value => {\n const option = options.find(option => option.props.value === value);\n return { value, label: option?.props.children, fixed: option?.props.fixed };\n });\n setDisplay(displayArray);\n };\n\n const syncSelectedOption = (vals: string[]) => {\n if (nativeSelect.current) {\n const options = [...nativeSelect.current.options];\n options.forEach(option => {\n if (vals.includes(option.value)) {\n option.selected = true;\n } else {\n option.selected = false;\n }\n });\n }\n };\n\n /**\n * @description We have to modify the children (Option component) to have a additional props that allows us to keep track of which one is selected and focused at all times and if a filter is active.\n * The `children` prop can be either a single object (1 child) or an array of multiple children.\n */\n const renderOptions = () => {\n type ReactChildrenType = ReturnType<typeof React.Children.toArray>;\n\n const filterOutSelectedChildren = (internalChildren: ReactChildrenType) => {\n return internalChildren.filter(\n child =>\n typeof child === \"object\" &&\n \"props\" in child &&\n !display.find(option => option.value === child.props.value)\n );\n };\n\n let results;\n if (filter !== \"\") {\n const filteredChildren = React.Children.toArray(children).filter(child => {\n const childElement = child as ReactElement;\n const childText = extractTextFromChildren(childElement.props.children);\n return childText.toLowerCase().includes(filter.toLowerCase());\n });\n\n results = _internalRenderChildren(filterOutSelectedChildren(filteredChildren));\n } else {\n results = _internalRenderChildren(\n filterOutSelectedChildren(React.Children.toArray(children))\n );\n }\n\n optionsVisibleCount !== results.length && setOptionsVisibleCount(results.length);\n\n if (results.length === 0) {\n return <li className={classes[\"no-results\"]}>{noResultsLabel}</li>;\n }\n\n return results;\n\n function _internalRenderChildren(internalChildren: ReactChildrenType) {\n return React.Children.map(internalChildren, (child, index) => {\n return React.cloneElement(child as ReactElement, {\n onFocusChange: (childIndex: number) => {\n setFocusedSelectItem(childIndex);\n },\n onOptionSelect: (optionRef: React.RefObject<HTMLLIElement>) => {\n onOptionChangeHandler(optionRef.current);\n setExpanded(false);\n setShouldClick(false);\n },\n isSearching: false,\n selectOpened: expanded,\n childIndex: index,\n hasFocus: focusedSelectItem === index,\n shouldClick: shouldClick,\n id: getOptionId(multiSelectId.current, index)\n });\n });\n }\n };\n\n const renderChevronIcon = () => {\n return expanded ? (\n <Icon className={classes[\"chevron-icon\"]} icon={Icons.ChevronUp} />\n ) : (\n <Icon className={classes[\"chevron-icon\"]} icon={Icons.ChevronDown} />\n );\n };\n\n const icon = useDetermineStatusIcon({ success, error });\n\n const nativeOnChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n onChange?.(event);\n };\n\n useEffect(() => {\n if (expanded && searchInputRef.current) {\n setShouldFocusButtonAfterClose(true);\n searchInputRef.current.focus();\n }\n\n if (!expanded && customSelectButtonRef.current && shouldFocusButtonAfterClose) {\n setShouldFocusButtonAfterClose(false);\n customSelectButtonRef.current.focus();\n }\n }, [\n expanded,\n customSelectButtonRef.current,\n shouldFocusButtonAfterClose,\n searchInputRef.current\n ]);\n\n useEffect(() => {\n syncDisplayValue(value);\n syncSelectedOption(value);\n }, [value]);\n\n const myElementRef = useRef<HTMLDivElement>(null);\n\n useClickOutside(myElementRef, () => {\n if (!expanded) {\n return;\n }\n setExpanded(false);\n setListPosition(Position.Below);\n setOpacity(0);\n }, [expanded]);\n\n const additionalClasses = [];\n expanded && additionalClasses.push(classes.expanded);\n error && additionalClasses.push(classes.error);\n disabled && additionalClasses.push(classes.disabled);\n className && additionalClasses.push(className);\n success && additionalClasses.push(classes.success);\n\n const onSelectButtonClick = () => {\n if (rest[\"data-readonlyview\"] || isReadOnlyView) {\n return;\n }\n setExpanded(expanded => !expanded);\n setShouldClick(false);\n };\n\n const optionsElement = (\n <div className={`list-wrapper-container ${classes[\"list-wrapper-container\"]}`}>\n <div\n ref={optionListReference}\n className={`list-wrapper ${classes[\"list-wrapper\"]}`}\n style={{\n display: expanded ? \"block\" : \"none\",\n opacity: opacity,\n maxHeight: optionsListMaxHeight.wrapper,\n pointerEvents: expanded ? \"auto\" : \"none\",\n top: listPosition === Position.Below ? \"4px\" : \"initial\",\n bottom: listPosition === Position.Above ? \"4px\" : \"initial\"\n }}\n >\n <ul\n id={getListboxId(multiSelectId.current)}\n className={addNewBtnOptionsContainerClassName}\n role=\"listbox\"\n aria-multiselectable=\"true\"\n style={{ maxHeight: optionsListMaxHeight.list }}\n >\n {renderOptions()}\n </ul>\n {renderAddNew()}\n </div>\n </div>\n );\n\n /** The native select is purely for external form libraries. We use it to emit an onChange with native select event object so they know exactly what's happening. */\n return (\n <div ref={myElementRef}>\n <select\n {...filterProps(rest, /^data-/, false)}\n tabIndex={-1}\n multiple={true}\n aria-hidden=\"true\"\n ref={nativeSelect}\n name={name}\n onChange={nativeOnChangeHandler}\n className={readyclasses[\"sr-only\"]}\n >\n <option value=\"\"></option>\n {React.Children.map(children, child => (\n <option value={child.props.value}></option>\n ))}\n </select>\n <div\n {...filterProps(rest, /^data-/)}\n id={multiSelectId.current}\n ref={containerReference}\n onKeyDown={onArrowNavigation}\n className={`custom-select ${classes.select} ${additionalClasses.join(\" \")}`}\n >\n {listPosition === Position.Above ? optionsElement : undefined}\n <div\n className={`${classes[\"custom-select\"]} ${additionalClasses.join(\" \")} `}\n style={{ display: \"flex\" }}\n >\n <div className={classes[\"display-container\"]} data-display>\n <SelectButton\n {...selectButtonProps}\n onClick={onSelectButtonClick}\n name={name}\n ref={customSelectButtonRef}\n disabled={disabled}\n aria-disabled={disabled}\n aria-invalid={error}\n aria-expanded={expanded}\n aria-haspopup=\"listbox\"\n aria-labelledby={labeledBy}\n aria-describedby={describedBy}\n />\n {value?.length === 0 && placeholder && (\n <span className={classes[\"placeholder\"]}>{placeholder}</span>\n )}\n {value?.length > 0 && (\n <SelectedOptions\n disabled={disabled}\n display={display}\n onClick={onSelectButtonClick}\n onRemove={onSelectedOptionRemoveHandler}\n />\n )}\n {searchVisible && renderSearch()}\n </div>\n <div className={classes[\"status\"]}>{icon || renderChevronIcon()}</div>\n </div>\n {listPosition === Position.Below ? optionsElement : undefined}\n </div>\n </div>\n );\n};\n\nexport const MultiSelect = withReadOnly(React.forwardRef(MultiSelectComponent));\n"],"names":["value","option","expanded"],"mappings":";;;;;;;;;;;;;;;AAwCA,MAAM,cAAc,CAAC,eAAuB,gBAC1C,GAAG,aAAa,UAAU,WAAW;AAEvC,MAAM,eAAe,CAAC,kBAA0B,GAAG,aAAa;AAEhE,MAAM,0BAA0B,CAAC,aAAsC;AAC9D,SAAA,MAAM,SAAS,QAAQ,QAAQ,EAAE,OAAO,CAAC,MAAc,UAAU;AACtE,QAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;AAC1D,aAAO,OAAO;AAAA,IAAA;AAEhB,QAAI,MAAM,eAAe,KAAK,KAAK,MAAM,MAAM,UAAU;AACvD,aAAO,OAAO,wBAAwB,MAAM,MAAM,QAAQ;AAAA,IAAA;AAErD,WAAA;AAAA,KACN,EAAE;AACP;AAEA,MAAM,uBAAsF,CAC1F;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB,CAAC;AAAA,EACrB;AAAA,EACA,QAAQ;AAAA,EACR,UAAU;AAAA,EACV;AAAA,EACA,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA,SAAS,EAAE,SAAS,MAAM,iBAAiB,GAAG,mBAAmB,cAAc;AAAA,EAC/E;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM,gBAAgB,OAAO,MAAM,WAAW,EAAE,CAAC;AACjD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,CAAC,SAAS,UAAU,IAAI,SAAoB,CAAA,CAAE;AAC9C,QAAA,qBAAqB,OAAuB,IAAI;AAChD,QAAA,sBAAsB,OAAuB,IAAI;AACvD,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,CAA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B,CAAC;"}
|
|
1
|
+
{"version":3,"file":"MultiSelect.es.js","sources":["../../../../../src/components/Form/Select/MultiSelect/MultiSelect.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classes from \"./MultiSelect.module.scss\";\n\nimport React, {\n ForwardRefRenderFunction,\n ReactElement,\n createRef,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useClickOutside } from \"../../../../hooks/useClickOutside\";\nimport { useDetermineStatusIcon } from \"../../../../hooks/useDetermineStatusIcon\";\nimport { useGetDomRoot } from \"../../../../hooks/useGetDomRoot\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { filterProps, generateID } from \"../../../../util/helper\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { MultiSelectProps, Position } from \"../Select.interfaces\";\nimport { useAddNewBtn } from \"../useAddNewBtn\";\nimport { useSelectPositionList } from \"../useSelectPositionList\";\nimport { SelectButton } from \"./SelectButton\";\nimport { Display, SelectedOptions } from \"./SelectedOptions\";\nimport { useArrowNavigation } from \"./useArrowNavigation\";\nimport { useSearch } from \"./useSearch\";\nimport { withReadOnly } from \"../../../withReadOnly\";\n\nconst getOptionId = (multiSelectId: string, optionIndex: number) =>\n `${multiSelectId}_option${optionIndex}`;\n\nconst getListboxId = (multiSelectId: string) => `${multiSelectId}_listbox`;\n\nconst extractTextFromChildren = (children: React.ReactNode): string => {\n return React.Children.toArray(children).reduce((text: string, child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return text + child;\n }\n if (React.isValidElement(child) && child.props.children) {\n return text + extractTextFromChildren(child.props.children);\n }\n return text;\n }, \"\");\n};\n\nconst MultiSelectComponent: ForwardRefRenderFunction<HTMLSelectElement, MultiSelectProps> = (\n {\n id,\n children,\n name,\n disabled = false,\n labeledBy,\n placeholder,\n describedBy,\n selectButtonProps = {},\n className,\n error = false,\n success = false,\n value,\n clearLabel = \"Clear selection\",\n noResultsLabel = \"No results found\",\n onChange,\n addNew,\n search = { enabled: true, renderThreshold: 0, searchPlaceholder: \"Search item\" },\n isReadOnlyView,\n domRoot,\n ...rest\n }: MultiSelectProps,\n ref\n) => {\n const multiSelectId = useRef(id ?? generateID(20));\n const [expanded, setExpanded] = useState(false);\n const [display, setDisplay] = useState<Display[]>([]);\n const myElementRef = useRef<HTMLDivElement>(null);\n const containerReference = useRef<HTMLDivElement>(null);\n const optionListReference = useRef<HTMLDivElement>(null);\n const portalRef = useRef<HTMLDivElement>(null);\n const { root } = useGetDomRoot(domRoot, myElementRef);\n const [focusedSelectItem, setFocusedSelectItem] = useState(0);\n const [shouldClick, setShouldClick] =\n useState(\n false\n ); /** We need this, because whenever we use the arrow keys to select the select item, and we focus the currently selected item it fires the \"click\" listener in Option component. Instead, we only want this to fire if we press \"enter\" or \"spacebar\" so we set this to true whenever that is the case, and back to false when it has been executed. */\n const [shouldFocusButtonAfterClose, setShouldFocusButtonAfterClose] = useState(false);\n const [optionsVisibleCount, setOptionsVisibleCount] = useState(\n React.Children.count(children) - display.length\n );\n const { filter, renderSearch, searchInputRef, resetSearchState, searchVisible } = useSearch({\n selectId: multiSelectId.current,\n expanded,\n search,\n searchInputClassName: classes[\"select-search\"],\n optionsCount: optionsVisibleCount,\n focusedSelectItem,\n setFocusedSelectItem,\n describedBy,\n getOptionId,\n getListboxId\n });\n const { addBtnRef, addNewBtnOptionsContainerClassName, renderAddNew } = useAddNewBtn({\n id: getOptionId(multiSelectId.current, optionsVisibleCount),\n addNew,\n filter,\n focusedSelectItem,\n optionsCount: optionsVisibleCount,\n searchInputRef,\n shouldClick,\n onClickCallback: () => {\n setShouldClick(false);\n resetSearchState();\n }\n });\n\n const nativeSelect = (ref as React.RefObject<HTMLSelectElement>) || createRef();\n\n const onOptionChangeHandler = (optionElement: HTMLElement | null) => {\n if (nativeSelect.current && optionElement) {\n const value = optionElement.getAttribute(\"data-value\")!;\n const options = [...nativeSelect.current.options];\n const lastSelectedOptionValues = options\n .filter(option => option.selected)\n .map(option => option.value);\n options.forEach(option => {\n if (option.value === value || lastSelectedOptionValues.includes(option.value)) {\n option.selected = true;\n }\n });\n nativeSelect.current.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n setExpanded(false);\n resetSearchState();\n };\n\n const onSelectedOptionRemoveHandler = (value: string) => {\n if (nativeSelect.current) {\n const options = [...nativeSelect.current.options];\n options.find(option => option.value === value)!.selected = false;\n nativeSelect.current.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n };\n\n const customSelectButtonRef = useRef<HTMLButtonElement>(null);\n const readOnlyView = !!rest[\"data-readonlyview\"] || isReadOnlyView;\n const { onArrowNavigation } = useArrowNavigation({\n expanded,\n setExpanded,\n setFocusedSelectItem,\n childrenCount: optionsVisibleCount,\n setShouldClick,\n addBtnRef,\n searchInputRef,\n customSelectButtonRef,\n onClose: resetSearchState,\n isReadOnlyView: readOnlyView\n });\n\n const { listPosition, opacity, optionsListMaxHeight, setListPosition, setOpacity } =\n useSelectPositionList({ expanded, optionListReference, containerReference, addBtnRef });\n\n const syncDisplayValue = (values: string[]) => {\n const options = React.Children.map(children, child => child);\n const displayArray: Display[] = values.map(value => {\n const option = options.find(option => option.props.value === value);\n return { value, label: option?.props.children, fixed: option?.props.fixed };\n });\n setDisplay(displayArray);\n };\n\n const syncSelectedOption = (vals: string[]) => {\n if (nativeSelect.current) {\n const options = [...nativeSelect.current.options];\n options.forEach(option => {\n if (vals.includes(option.value)) {\n option.selected = true;\n } else {\n option.selected = false;\n }\n });\n }\n };\n\n /**\n * @description We have to modify the children (Option component) to have a additional props that allows us to keep track of which one is selected and focused at all times and if a filter is active.\n * The `children` prop can be either a single object (1 child) or an array of multiple children.\n */\n const renderOptions = () => {\n type ReactChildrenType = ReturnType<typeof React.Children.toArray>;\n\n const filterOutSelectedChildren = (internalChildren: ReactChildrenType) => {\n return internalChildren.filter(\n child =>\n typeof child === \"object\" &&\n \"props\" in child &&\n !display.find(option => option.value === child.props.value)\n );\n };\n\n let results;\n if (filter !== \"\") {\n const filteredChildren = React.Children.toArray(children).filter(child => {\n const childElement = child as ReactElement;\n const childText = extractTextFromChildren(childElement.props.children);\n return childText.toLowerCase().includes(filter.toLowerCase());\n });\n\n results = _internalRenderChildren(filterOutSelectedChildren(filteredChildren));\n } else {\n results = _internalRenderChildren(\n filterOutSelectedChildren(React.Children.toArray(children))\n );\n }\n\n optionsVisibleCount !== results.length && setOptionsVisibleCount(results.length);\n\n if (results.length === 0) {\n return <li className={classes[\"no-results\"]}>{noResultsLabel}</li>;\n }\n\n return results;\n\n function _internalRenderChildren(internalChildren: ReactChildrenType) {\n return React.Children.map(internalChildren, (child, index) => {\n return React.cloneElement(child as ReactElement, {\n onFocusChange: (childIndex: number) => {\n setFocusedSelectItem(childIndex);\n },\n onOptionSelect: (optionRef: React.RefObject<HTMLLIElement>) => {\n onOptionChangeHandler(optionRef.current);\n setExpanded(false);\n setShouldClick(false);\n },\n isSearching: false,\n selectOpened: expanded,\n childIndex: index,\n hasFocus: focusedSelectItem === index,\n shouldClick: shouldClick,\n id: getOptionId(multiSelectId.current, index)\n });\n });\n }\n };\n\n const renderChevronIcon = () => {\n return expanded ? (\n <Icon className={classes[\"chevron-icon\"]} icon={Icons.ChevronUp} />\n ) : (\n <Icon className={classes[\"chevron-icon\"]} icon={Icons.ChevronDown} />\n );\n };\n\n const icon = useDetermineStatusIcon({ success, error });\n\n const nativeOnChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n onChange?.(event);\n };\n\n useEffect(() => {\n if (expanded && searchInputRef.current) {\n setShouldFocusButtonAfterClose(true);\n searchInputRef.current.focus();\n }\n\n if (!expanded && customSelectButtonRef.current && shouldFocusButtonAfterClose) {\n setShouldFocusButtonAfterClose(false);\n customSelectButtonRef.current.focus();\n }\n }, [\n expanded,\n customSelectButtonRef.current,\n shouldFocusButtonAfterClose,\n searchInputRef.current\n ]);\n\n useEffect(() => {\n syncDisplayValue(value);\n syncSelectedOption(value);\n }, [value]);\n\n useClickOutside(myElementRef, () => {\n if (!expanded) {\n return;\n }\n setExpanded(false);\n setListPosition(Position.Below);\n setOpacity(0);\n }, [expanded]);\n\n const additionalClasses = [];\n expanded && additionalClasses.push(classes.expanded);\n error && additionalClasses.push(classes.error);\n disabled && additionalClasses.push(classes.disabled);\n className && additionalClasses.push(className);\n success && additionalClasses.push(classes.success);\n\n const onSelectButtonClick = () => {\n if (rest[\"data-readonlyview\"] || isReadOnlyView) {\n return;\n }\n setExpanded(expanded => !expanded);\n setShouldClick(false);\n };\n\n useEffect(() => {\n if (!expanded) {\n return;\n }\n\n const anchor = containerReference.current;\n const portal = portalRef.current;\n\n if (!anchor || !portal) {\n return;\n }\n\n let frameId: number | null = null;\n\n const updatePosition = () => {\n if (!anchor || !portal) {\n return;\n }\n\n const rect = anchor.getBoundingClientRect();\n const x = rect.left;\n const y = listPosition === Position.Below ? rect.bottom : rect.top;\n\n portal.style.position = \"fixed\";\n portal.style.zIndex = \"1000\";\n portal.style.left = \"0\";\n portal.style.top = \"0\";\n portal.style.width = `${rect.width}px`;\n portal.style.transform = `translate3d(${x}px, ${y}px, 0)`;\n };\n\n const scheduleUpdate = () => {\n if (frameId != null) {\n return;\n }\n frameId = globalThis.requestAnimationFrame(() => {\n frameId = null;\n updatePosition();\n });\n };\n\n updatePosition();\n\n const handleScroll = () => scheduleUpdate();\n const handleResize = () => scheduleUpdate();\n\n window.addEventListener(\"scroll\", handleScroll, { passive: true, capture: true });\n window.addEventListener(\"resize\", handleResize);\n\n const resizeObserver = new ResizeObserver(() => {\n scheduleUpdate();\n });\n resizeObserver.observe(anchor);\n\n return () => {\n window.removeEventListener(\"scroll\", handleScroll, true);\n window.removeEventListener(\"resize\", handleResize);\n resizeObserver.disconnect();\n if (frameId != null) {\n globalThis.cancelAnimationFrame(frameId);\n }\n };\n }, [expanded, listPosition]);\n\n const optionsElement = (\n <div className={`list-wrapper-container ${classes[\"list-wrapper-container\"]}`}>\n <div\n ref={optionListReference}\n className={`list-wrapper ${classes[\"list-wrapper\"]}`}\n style={{\n display: expanded ? \"block\" : \"none\",\n opacity: opacity,\n maxHeight: optionsListMaxHeight.wrapper,\n pointerEvents: expanded ? \"auto\" : \"none\",\n top: listPosition === Position.Below ? \"4px\" : undefined,\n bottom: listPosition === Position.Above ? \"4px\" : undefined\n }}\n >\n <ul\n id={getListboxId(multiSelectId.current)}\n className={addNewBtnOptionsContainerClassName}\n role=\"listbox\"\n aria-multiselectable=\"true\"\n style={{ maxHeight: optionsListMaxHeight.list }}\n >\n {renderOptions()}\n </ul>\n {renderAddNew()}\n </div>\n </div>\n );\n\n /** The native select is purely for external form libraries. We use it to emit an onChange with native select event object so they know exactly what's happening. */\n return (\n <>\n <div ref={myElementRef}>\n <select\n {...filterProps(rest, /^data-/, false)}\n tabIndex={-1}\n multiple={true}\n aria-hidden=\"true\"\n ref={nativeSelect}\n name={name}\n onChange={nativeOnChangeHandler}\n className={readyclasses[\"sr-only\"]}\n >\n <option value=\"\"></option>\n {React.Children.map(children, child => (\n <option value={child.props.value}></option>\n ))}\n </select>\n <div\n {...filterProps(rest, /^data-/)}\n id={multiSelectId.current}\n ref={containerReference}\n onKeyDown={onArrowNavigation}\n className={`custom-select ${classes.select} ${additionalClasses.join(\" \")}`}\n >\n <div\n className={`${classes[\"custom-select\"]} ${additionalClasses.join(\" \")} `}\n style={{ display: \"flex\" }}\n >\n <div className={classes[\"display-container\"]} data-display>\n <SelectButton\n {...selectButtonProps}\n onClick={onSelectButtonClick}\n name={name}\n ref={customSelectButtonRef}\n disabled={disabled}\n aria-disabled={disabled}\n aria-invalid={error}\n aria-expanded={expanded}\n aria-haspopup=\"listbox\"\n aria-labelledby={labeledBy}\n aria-describedby={describedBy}\n />\n {value?.length === 0 && placeholder && (\n <span className={classes[\"placeholder\"]}>{placeholder}</span>\n )}\n {value?.length > 0 && (\n <SelectedOptions\n disabled={disabled}\n display={display}\n onClick={onSelectButtonClick}\n onRemove={onSelectedOptionRemoveHandler}\n />\n )}\n {searchVisible && renderSearch()}\n </div>\n <div className={classes[\"status\"]}>{icon || renderChevronIcon()}</div>\n </div>\n </div>\n </div>\n {createPortal(\n <div ref={portalRef} className={`${classes.select} ${additionalClasses.join(\" \")}`}>\n {optionsElement}\n </div>,\n root\n )}\n </>\n );\n};\n\nexport const MultiSelect = withReadOnly(React.forwardRef(MultiSelectComponent));\n"],"names":["value","option","expanded"],"mappings":";;;;;;;;;;;;;;;;;AA0CA,MAAM,cAAc,CAAC,eAAuB,gBAC1C,GAAG,aAAa,UAAU,WAAW;AAEvC,MAAM,eAAe,CAAC,kBAA0B,GAAG,aAAa;AAEhE,MAAM,0BAA0B,CAAC,aAAsC;AAC9D,SAAA,MAAM,SAAS,QAAQ,QAAQ,EAAE,OAAO,CAAC,MAAc,UAAU;AACtE,QAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;AAC1D,aAAO,OAAO;AAAA,IAAA;AAEhB,QAAI,MAAM,eAAe,KAAK,KAAK,MAAM,MAAM,UAAU;AACvD,aAAO,OAAO,wBAAwB,MAAM,MAAM,QAAQ;AAAA,IAAA;AAErD,WAAA;AAAA,KACN,EAAE;AACP;AAEA,MAAM,uBAAsF,CAC1F;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB,CAAC;AAAA,EACrB;AAAA,EACA,QAAQ;AAAA,EACR,UAAU;AAAA,EACV;AAAA,EACA,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA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EnB,+BAAO,YAAW,KAAK,eACrB,sBAAA,cAAA,QAAA,EAAK,WAAW,QAAQ,aAAa,EAAI,GAAA,WAAY,IAEvD,+BAAO,UAAS,KACf,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,SAAS;AAAA,UACT,UAAU;AAAA,QAAA;AAAA,MAAA,GAGb,iBAAiB,cACpB;AAAA,MACA,sBAAA,cAAC,SAAI,WAAW,QAAQ,QAAQ,EAAI,GAAA,QAAQ,kBAAoB,CAAA;AAAA,IAAA;AAAA,EAGtE,CAAA,GACC;AAAA,IACE,sBAAA,cAAA,OAAA,EAAI,KAAK,WAAW,WAAW,GAAG,QAAQ,MAAM,IAAI,kBAAkB,KAAK,GAAG,CAAC,MAC7E,cACH;AAAA,IACA;AAAA,EAAA,CAEJ;AAEJ;AAEO,MAAM,cAAc,aAAa,MAAM,WAAW,oBAAoB,CAAC;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.MultiSelect_sr-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.MultiSelect_sr-only_k4xuc{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.MultiSelect_hidden_k4xuc{display:none}.MultiSelect_slide-in_k4xuc{animation:MultiSelect_slide-in_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.MultiSelect_slide-in_k4xuc{animation-duration:.1ms}}.MultiSelect_slide-out_k4xuc{animation:MultiSelect_slide-out_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.MultiSelect_slide-out_k4xuc{animation-duration:.1ms}}@keyframes MultiSelect_slide-in_k4xuc{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes MultiSelect_slide-out_k4xuc{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.MultiSelect_select_k4xuc{position:relative;box-sizing:border-box;border:0;border-radius:var(--input-border-radius);background-color:var(--input-background-color);font-size:var(--form-control-font-size);transition-property:background-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.MultiSelect_select_k4xuc{transition-duration:.1ms}}.MultiSelect_select_k4xuc [data-display]{color:var(--color-default);font-family:var(--font-family)}.MultiSelect_select_k4xuc.MultiSelect_expanded_k4xuc .MultiSelect_list-wrapper_k4xuc{background:var(--light)}.MultiSelect_select_k4xuc:not(.MultiSelect_expanded_k4xuc):has(button:focus){position:relative;z-index:2;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.MultiSelect_select_k4xuc:not(.MultiSelect_expanded_k4xuc) .MultiSelect_custom-select_k4xuc:focus:not(.MultiSelect_error_k4xuc){border-color:var(--input-border-color);border-width:var(--input-border-width);padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.MultiSelect_select_k4xuc:hover:not(.MultiSelect_disabled_k4xuc):not(.MultiSelect_expanded_k4xuc):not(.MultiSelect_error_k4xuc) .MultiSelect_custom-select_k4xuc:not(:focus){border-color:var(--input-border-color);border-width:var(--input-border-width);background-color:var(--color-blue-grey25)}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc{box-sizing:border-box;width:100%;min-height:calc(2.875 * var(--font-size) - 2 * var(--input-border-width));padding:0 calc(.5 * var(--font-size) - var(--input-border-width));background-color:transparent;border-color:var(--color-blue-grey500);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);font-size:var(--form-control-font-size);transition-property:background-color,border-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc{transition-duration:.1ms}}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc:focus-visible,.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc:focus{outline:none}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc.MultiSelect_error_k4xuc{border-color:var(--error)}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc.MultiSelect_error_k4xuc:focus{border-width:var(--input-border-width)}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc.MultiSelect_disabled_k4xuc{border-color:var(--color-disabled);pointer-events:none}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc .MultiSelect_display-container_k4xuc{flex:1;display:flex;align-items:center;padding:.1875rem 0;gap:.375rem}.MultiSelect_select_k4xuc .MultiSelect_list-wrapper-container_k4xuc{position:relative}.MultiSelect_select_k4xuc .MultiSelect_list-wrapper_k4xuc{border-color:var(--light-grey-border);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);box-shadow:0 4px 5px #01053233;box-shadow:0 3px 14px #0105321f;box-shadow:0 8px 10px #01053224;position:absolute;z-index:11;left:0;width:100%;overflow:auto}.MultiSelect_select_k4xuc ul{box-sizing:border-box;padding:.25rem 0;width:100%;margin:0;list-style:none;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;overflow:auto;max-height:25rem}.MultiSelect_select_k4xuc ul li{padding:.62rem .75rem;font-size:var(--form-control-font-size);font-family:var(--font-family);margin:0;position:relative;line-height:1.43;box-sizing:border-box;min-height:2.5rem;cursor:pointer}.MultiSelect_select_k4xuc ul li:after{content:"";position:absolute;top:0;left:0;background-color:transparent;width:100%;height:100%;opacity:.05}.MultiSelect_select_k4xuc ul li:focus,.MultiSelect_select_k4xuc ul li.MultiSelect_focus_k4xuc{outline:none}.MultiSelect_select_k4xuc ul li:focus:before,.MultiSelect_select_k4xuc ul li.MultiSelect_focus_k4xuc:before{content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.MultiSelect_select_k4xuc ul li:hover:after,.MultiSelect_select_k4xuc ul li:active:after{background-color:var(--color-primary)}.MultiSelect_select_k4xuc ul li:active:after{opacity:.1}.MultiSelect_select_k4xuc ul li.MultiSelect_disabled_k4xuc{color:var(--greyed-out);background-color:var(--disabled);pointer-events:none}.MultiSelect_status_k4xuc{padding:.3125rem;display:flex;align-items:center}.MultiSelect_status_k4xuc [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.MultiSelect_status_k4xuc [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.MultiSelect_status_k4xuc .MultiSelect_chevron-icon_k4xuc{color:var(--default);font-size:var(--font-size-small)}.MultiSelect_status_k4xuc *+*{margin-left:1.25rem}.MultiSelect_placeholder_k4xuc{color:var(--greyed-out)}.MultiSelect_select-search_k4xuc{flex:1;box-sizing:border-box;border-bottom-left-radius:0;border-bottom-right-radius:0;border:0;background-color:transparent;color:var(--default);font-family:var(--font-family);font-size:calc(.83 * var(--font-size));line-height:1.3333;margin:0;padding:0}.MultiSelect_select-search_k4xuc:focus-visible,.MultiSelect_select-search_k4xuc:focus{outline:none}.MultiSelect_disabled_k4xuc{cursor:not-allowed;color:var(--greyed-out);background-color:var(--color-blue-grey25)}.MultiSelect_disabled_k4xuc>*{pointer-events:none}@media only screen and (min-width: 30em){.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc{padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.MultiSelect_select_k4xuc:not(.MultiSelect_expanded_k4xuc) .MultiSelect_custom-select_k4xuc:focus:not(.MultiSelect_error_k4xuc){padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}}[data-readonlyview=true] .MultiSelect_custom-select_k4xuc{color:var(--read-only-text-color);border-color:var(--read-only-border-color);background-color:var(--color-white)}[data-readonlyview=true] .MultiSelect_custom-select_k4xuc.MultiSelect_error_k4xuc,[data-readonlyview=true] .MultiSelect_custom-select_k4xuc.MultiSelect_success_k4xuc{border-color:var(--read-only-border-color)}[data-readonlyview=true] .MultiSelect_custom-select_k4xuc button{pointer-events:none}[data-readonlyview=true] .MultiSelect_status_k4xuc .MultiSelect_chevron-icon_k4xuc{visibility:hidden}[data-readonlyview=true]:hover:not(.MultiSelect_disabled_k4xuc):not(.MultiSelect_expanded_k4xuc):not(.MultiSelect_error_k4xuc) .MultiSelect_custom-select_k4xuc:not(:focus){color:var(--read-only-text-color);border-color:var(--read-only-border-color);background-color:var(--color-white)}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="MultiSelect_select_k4xuc",t="MultiSelect_expanded_k4xuc",c="MultiSelect_error_k4xuc",l="MultiSelect_disabled_k4xuc",s="MultiSelect_focus_k4xuc",u="MultiSelect_status_k4xuc",r="MultiSelect_placeholder_k4xuc",o="MultiSelect_success_k4xuc",i={select:e,expanded:t,"list-wrapper":"MultiSelect_list-wrapper_k4xuc","custom-select":"MultiSelect_custom-select_k4xuc",error:c,disabled:l,"display-container":"MultiSelect_display-container_k4xuc","list-wrapper-container":"MultiSelect_list-wrapper-container_k4xuc",focus:s,status:u,"chevron-icon":"MultiSelect_chevron-icon_k4xuc",placeholder:r,"select-search":"MultiSelect_select-search_k4xuc",success:o};exports.default=i,exports.disabled=l,exports.error=c,exports.expanded=t,exports.focus=s,exports.placeholder=r,exports.select=e,exports.status=u,exports.success=o;
|
|
3
3
|
//# sourceMappingURL=MultiSelect.module.scss.cjs.js.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.MultiSelect_sr-
|
|
2
|
-
const select = "
|
|
3
|
-
const expanded = "
|
|
4
|
-
const error = "
|
|
5
|
-
const disabled = "
|
|
6
|
-
const focus = "
|
|
7
|
-
const status = "
|
|
8
|
-
const placeholder = "
|
|
9
|
-
const success = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.MultiSelect_sr-only_k4xuc{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.MultiSelect_hidden_k4xuc{display:none}.MultiSelect_slide-in_k4xuc{animation:MultiSelect_slide-in_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.MultiSelect_slide-in_k4xuc{animation-duration:.1ms}}.MultiSelect_slide-out_k4xuc{animation:MultiSelect_slide-out_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.MultiSelect_slide-out_k4xuc{animation-duration:.1ms}}@keyframes MultiSelect_slide-in_k4xuc{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes MultiSelect_slide-out_k4xuc{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.MultiSelect_select_k4xuc{position:relative;box-sizing:border-box;border:0;border-radius:var(--input-border-radius);background-color:var(--input-background-color);font-size:var(--form-control-font-size);transition-property:background-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.MultiSelect_select_k4xuc{transition-duration:.1ms}}.MultiSelect_select_k4xuc [data-display]{color:var(--color-default);font-family:var(--font-family)}.MultiSelect_select_k4xuc.MultiSelect_expanded_k4xuc .MultiSelect_list-wrapper_k4xuc{background:var(--light)}.MultiSelect_select_k4xuc:not(.MultiSelect_expanded_k4xuc):has(button:focus){position:relative;z-index:2;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.MultiSelect_select_k4xuc:not(.MultiSelect_expanded_k4xuc) .MultiSelect_custom-select_k4xuc:focus:not(.MultiSelect_error_k4xuc){border-color:var(--input-border-color);border-width:var(--input-border-width);padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.MultiSelect_select_k4xuc:hover:not(.MultiSelect_disabled_k4xuc):not(.MultiSelect_expanded_k4xuc):not(.MultiSelect_error_k4xuc) .MultiSelect_custom-select_k4xuc:not(:focus){border-color:var(--input-border-color);border-width:var(--input-border-width);background-color:var(--color-blue-grey25)}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc{box-sizing:border-box;width:100%;min-height:calc(2.875 * var(--font-size) - 2 * var(--input-border-width));padding:0 calc(.5 * var(--font-size) - var(--input-border-width));background-color:transparent;border-color:var(--color-blue-grey500);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);font-size:var(--form-control-font-size);transition-property:background-color,border-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc{transition-duration:.1ms}}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc:focus-visible,.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc:focus{outline:none}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc.MultiSelect_error_k4xuc{border-color:var(--error)}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc.MultiSelect_error_k4xuc:focus{border-width:var(--input-border-width)}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc.MultiSelect_disabled_k4xuc{border-color:var(--color-disabled);pointer-events:none}.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc .MultiSelect_display-container_k4xuc{flex:1;display:flex;align-items:center;padding:.1875rem 0;gap:.375rem}.MultiSelect_select_k4xuc .MultiSelect_list-wrapper-container_k4xuc{position:relative}.MultiSelect_select_k4xuc .MultiSelect_list-wrapper_k4xuc{border-color:var(--light-grey-border);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);box-shadow:0 4px 5px #01053233;box-shadow:0 3px 14px #0105321f;box-shadow:0 8px 10px #01053224;position:absolute;z-index:11;left:0;width:100%;overflow:auto}.MultiSelect_select_k4xuc ul{box-sizing:border-box;padding:.25rem 0;width:100%;margin:0;list-style:none;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;overflow:auto;max-height:25rem}.MultiSelect_select_k4xuc ul li{padding:.62rem .75rem;font-size:var(--form-control-font-size);font-family:var(--font-family);margin:0;position:relative;line-height:1.43;box-sizing:border-box;min-height:2.5rem;cursor:pointer}.MultiSelect_select_k4xuc ul li:after{content:"";position:absolute;top:0;left:0;background-color:transparent;width:100%;height:100%;opacity:.05}.MultiSelect_select_k4xuc ul li:focus,.MultiSelect_select_k4xuc ul li.MultiSelect_focus_k4xuc{outline:none}.MultiSelect_select_k4xuc ul li:focus:before,.MultiSelect_select_k4xuc ul li.MultiSelect_focus_k4xuc:before{content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.MultiSelect_select_k4xuc ul li:hover:after,.MultiSelect_select_k4xuc ul li:active:after{background-color:var(--color-primary)}.MultiSelect_select_k4xuc ul li:active:after{opacity:.1}.MultiSelect_select_k4xuc ul li.MultiSelect_disabled_k4xuc{color:var(--greyed-out);background-color:var(--disabled);pointer-events:none}.MultiSelect_status_k4xuc{padding:.3125rem;display:flex;align-items:center}.MultiSelect_status_k4xuc [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.MultiSelect_status_k4xuc [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.MultiSelect_status_k4xuc .MultiSelect_chevron-icon_k4xuc{color:var(--default);font-size:var(--font-size-small)}.MultiSelect_status_k4xuc *+*{margin-left:1.25rem}.MultiSelect_placeholder_k4xuc{color:var(--greyed-out)}.MultiSelect_select-search_k4xuc{flex:1;box-sizing:border-box;border-bottom-left-radius:0;border-bottom-right-radius:0;border:0;background-color:transparent;color:var(--default);font-family:var(--font-family);font-size:calc(.83 * var(--font-size));line-height:1.3333;margin:0;padding:0}.MultiSelect_select-search_k4xuc:focus-visible,.MultiSelect_select-search_k4xuc:focus{outline:none}.MultiSelect_disabled_k4xuc{cursor:not-allowed;color:var(--greyed-out);background-color:var(--color-blue-grey25)}.MultiSelect_disabled_k4xuc>*{pointer-events:none}@media only screen and (min-width: 30em){.MultiSelect_select_k4xuc .MultiSelect_custom-select_k4xuc{padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.MultiSelect_select_k4xuc:not(.MultiSelect_expanded_k4xuc) .MultiSelect_custom-select_k4xuc:focus:not(.MultiSelect_error_k4xuc){padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}}[data-readonlyview=true] .MultiSelect_custom-select_k4xuc{color:var(--read-only-text-color);border-color:var(--read-only-border-color);background-color:var(--color-white)}[data-readonlyview=true] .MultiSelect_custom-select_k4xuc.MultiSelect_error_k4xuc,[data-readonlyview=true] .MultiSelect_custom-select_k4xuc.MultiSelect_success_k4xuc{border-color:var(--read-only-border-color)}[data-readonlyview=true] .MultiSelect_custom-select_k4xuc button{pointer-events:none}[data-readonlyview=true] .MultiSelect_status_k4xuc .MultiSelect_chevron-icon_k4xuc{visibility:hidden}[data-readonlyview=true]:hover:not(.MultiSelect_disabled_k4xuc):not(.MultiSelect_expanded_k4xuc):not(.MultiSelect_error_k4xuc) .MultiSelect_custom-select_k4xuc:not(:focus){color:var(--read-only-text-color);border-color:var(--read-only-border-color);background-color:var(--color-white)}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
const select = "MultiSelect_select_k4xuc";
|
|
3
|
+
const expanded = "MultiSelect_expanded_k4xuc";
|
|
4
|
+
const error = "MultiSelect_error_k4xuc";
|
|
5
|
+
const disabled = "MultiSelect_disabled_k4xuc";
|
|
6
|
+
const focus = "MultiSelect_focus_k4xuc";
|
|
7
|
+
const status = "MultiSelect_status_k4xuc";
|
|
8
|
+
const placeholder = "MultiSelect_placeholder_k4xuc";
|
|
9
|
+
const success = "MultiSelect_success_k4xuc";
|
|
10
10
|
const classes = {
|
|
11
11
|
select,
|
|
12
12
|
expanded,
|
|
13
|
-
"list-wrapper": "MultiSelect_list-
|
|
14
|
-
"custom-select": "MultiSelect_custom-
|
|
13
|
+
"list-wrapper": "MultiSelect_list-wrapper_k4xuc",
|
|
14
|
+
"custom-select": "MultiSelect_custom-select_k4xuc",
|
|
15
15
|
error,
|
|
16
16
|
disabled,
|
|
17
|
-
"display-container": "MultiSelect_display-
|
|
18
|
-
"list-wrapper-container": "MultiSelect_list-wrapper-
|
|
17
|
+
"display-container": "MultiSelect_display-container_k4xuc",
|
|
18
|
+
"list-wrapper-container": "MultiSelect_list-wrapper-container_k4xuc",
|
|
19
19
|
focus,
|
|
20
20
|
status,
|
|
21
|
-
"chevron-icon": "MultiSelect_chevron-
|
|
21
|
+
"chevron-icon": "MultiSelect_chevron-icon_k4xuc",
|
|
22
22
|
placeholder,
|
|
23
|
-
"select-search": "MultiSelect_select-
|
|
23
|
+
"select-search": "MultiSelect_select-search_k4xuc",
|
|
24
24
|
success
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.SelectButton_btn_k4xuc{position:absolute;top:0;left:0;height:100%;width:100%;border:0;padding:0;background:none;cursor:pointer;outline:0}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="SelectButton_btn_k4xuc",t={btn:e};exports.btn=e,exports.default=t;
|
|
3
3
|
//# sourceMappingURL=SelectButton.module.scss.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.
|
|
2
|
-
const btn = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.SelectButton_btn_k4xuc{position:absolute;top:0;left:0;height:100%;width:100%;border:0;padding:0;background:none;cursor:pointer;outline:0}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const btn = "SelectButton_btn_k4xuc";
|
|
3
3
|
const classes = {
|
|
4
4
|
btn
|
|
5
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.SelectedOptions_options_k4xuc{position:relative;display:flex;gap:.375rem;flex-wrap:wrap;cursor:pointer}.SelectedOptions_tag_k4xuc{cursor:text}.SelectedOptions_tag_k4xuc .SelectedOptions_remove-btn_k4xuc{cursor:pointer}[data-readonlyview=true] .SelectedOptions_tag_k4xuc .SelectedOptions_remove-btn_k4xuc{display:none}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="SelectedOptions_options_k4xuc",t="SelectedOptions_tag_k4xuc",o={options:e,tag:t,"remove-btn":"SelectedOptions_remove-btn_k4xuc"};exports.default=o,exports.options=e,exports.tag=t;
|
|
3
3
|
//# sourceMappingURL=SelectedOptions.module.scss.cjs.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.
|
|
2
|
-
const options = "
|
|
3
|
-
const tag = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.SelectedOptions_options_k4xuc{position:relative;display:flex;gap:.375rem;flex-wrap:wrap;cursor:pointer}.SelectedOptions_tag_k4xuc{cursor:text}.SelectedOptions_tag_k4xuc .SelectedOptions_remove-btn_k4xuc{cursor:pointer}[data-readonlyview=true] .SelectedOptions_tag_k4xuc .SelectedOptions_remove-btn_k4xuc{display:none}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const options = "SelectedOptions_options_k4xuc";
|
|
3
|
+
const tag = "SelectedOptions_tag_k4xuc";
|
|
4
4
|
const classes = {
|
|
5
5
|
options,
|
|
6
6
|
tag,
|
|
7
|
-
"remove-btn": "SelectedOptions_remove-
|
|
7
|
+
"remove-btn": "SelectedOptions_remove-btn_k4xuc"
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
classes as default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.interfaces.cjs.js","sources":["../../../../src/components/Form/Select/Select.interfaces.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentPropsWithRef, ReactElement } from \"react\";\nimport { Props as InputProps } from \"../Input/Input\";\nimport { FormElement } from \"../form.interfaces\";\n\nexport type PartialInputProps = Partial<InputProps>;\n\nexport interface SearchProps {\n enabled?: boolean;\n renderThreshold?: number;\n searchPlaceholder?: string;\n searchInputProps?: PartialInputProps & { reset?: boolean };\n}\n\nexport interface AddNewProps {\n label: string;\n onAddNew: (value: string) => void;\n btnProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n alwaysEnabled?: boolean;\n}\n\nexport interface SelectProps<V extends string | readonly string[] | undefined>\n extends ComponentPropsWithRef<\"select\">,\n FormElement {\n children: ReactElement[];\n name?: string;\n labeledBy?: string;\n describedBy?: string;\n placeholder?: string;\n selectButtonProps?: ComponentPropsWithRef<\"button\"> & FormElement;\n search?: SearchProps;\n className?: string;\n value: V;\n clearLabel?: string;\n noResultsLabel?: string;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>, child?: ReactElement) => void;\n addNew?: AddNewProps;\n isReadOnlyView?: boolean;\n}\n\nexport type SingleSelectProps = SelectProps<string>;\nexport type MultiSelectProps = SelectProps<string[]>;\n\nexport enum Position {\n Above = \"Above\",\n Below = \"Below\"\n}\n\nexport interface UseArrowNavigationParams {\n expanded: boolean;\n setExpanded: React.Dispatch<React.SetStateAction<boolean>>;\n isSearching: boolean;\n setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;\n setFocusedSelectItem: React.Dispatch<React.SetStateAction<number>>;\n childrenCount: number;\n setShouldClick: React.Dispatch<React.SetStateAction<boolean>>;\n onOptionChangeHandler: (optionElement: HTMLElement | null) => void;\n searchInputRef: React.RefObject<HTMLInputElement>;\n addBtnRef?: React.RefObject<HTMLButtonElement>;\n renderThreshold: number;\n isReadOnlyView?: boolean;\n}\n\nexport interface UseSelectPositionListParams {\n expanded: boolean;\n optionListReference: React.RefObject<HTMLDivElement>;\n containerReference: React.RefObject<HTMLDivElement>;\n addBtnRef: React.RefObject<HTMLButtonElement>;\n}\n"],"names":["Position"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.interfaces.cjs.js","sources":["../../../../src/components/Form/Select/Select.interfaces.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentPropsWithRef, ReactElement } from \"react\";\nimport { Props as InputProps } from \"../Input/Input\";\nimport { FormElement } from \"../form.interfaces\";\n\nexport type PartialInputProps = Partial<InputProps>;\n\nexport interface SearchProps {\n enabled?: boolean;\n renderThreshold?: number;\n searchPlaceholder?: string;\n searchInputProps?: PartialInputProps & { reset?: boolean };\n}\n\nexport interface AddNewProps {\n label: string;\n onAddNew: (value: string) => void;\n btnProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n alwaysEnabled?: boolean;\n}\n\nexport interface SelectProps<V extends string | readonly string[] | undefined>\n extends ComponentPropsWithRef<\"select\">,\n FormElement {\n children: ReactElement[];\n name?: string;\n labeledBy?: string;\n describedBy?: string;\n placeholder?: string;\n selectButtonProps?: ComponentPropsWithRef<\"button\"> & FormElement;\n search?: SearchProps;\n className?: string;\n value: V;\n clearLabel?: string;\n noResultsLabel?: string;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>, child?: ReactElement) => void;\n addNew?: AddNewProps;\n isReadOnlyView?: boolean;\n domRoot?: HTMLElement;\n}\n\nexport type SingleSelectProps = SelectProps<string>;\nexport type MultiSelectProps = SelectProps<string[]>;\n\nexport enum Position {\n Above = \"Above\",\n Below = \"Below\"\n}\n\nexport interface UseArrowNavigationParams {\n expanded: boolean;\n setExpanded: React.Dispatch<React.SetStateAction<boolean>>;\n isSearching: boolean;\n setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;\n setFocusedSelectItem: React.Dispatch<React.SetStateAction<number>>;\n childrenCount: number;\n setShouldClick: React.Dispatch<React.SetStateAction<boolean>>;\n onOptionChangeHandler: (optionElement: HTMLElement | null) => void;\n searchInputRef: React.RefObject<HTMLInputElement>;\n addBtnRef?: React.RefObject<HTMLButtonElement>;\n renderThreshold: number;\n isReadOnlyView?: boolean;\n}\n\nexport interface UseSelectPositionListParams {\n expanded: boolean;\n optionListReference: React.RefObject<HTMLDivElement>;\n containerReference: React.RefObject<HTMLDivElement>;\n addBtnRef: React.RefObject<HTMLButtonElement>;\n}\n"],"names":["Position"],"mappings":"gFA2DY,IAAAA,GAAAA,IACVA,EAAQ,MAAA,QACRA,EAAQ,MAAA,QAFEA,IAAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.interfaces.es.js","sources":["../../../../src/components/Form/Select/Select.interfaces.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentPropsWithRef, ReactElement } from \"react\";\nimport { Props as InputProps } from \"../Input/Input\";\nimport { FormElement } from \"../form.interfaces\";\n\nexport type PartialInputProps = Partial<InputProps>;\n\nexport interface SearchProps {\n enabled?: boolean;\n renderThreshold?: number;\n searchPlaceholder?: string;\n searchInputProps?: PartialInputProps & { reset?: boolean };\n}\n\nexport interface AddNewProps {\n label: string;\n onAddNew: (value: string) => void;\n btnProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n alwaysEnabled?: boolean;\n}\n\nexport interface SelectProps<V extends string | readonly string[] | undefined>\n extends ComponentPropsWithRef<\"select\">,\n FormElement {\n children: ReactElement[];\n name?: string;\n labeledBy?: string;\n describedBy?: string;\n placeholder?: string;\n selectButtonProps?: ComponentPropsWithRef<\"button\"> & FormElement;\n search?: SearchProps;\n className?: string;\n value: V;\n clearLabel?: string;\n noResultsLabel?: string;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>, child?: ReactElement) => void;\n addNew?: AddNewProps;\n isReadOnlyView?: boolean;\n}\n\nexport type SingleSelectProps = SelectProps<string>;\nexport type MultiSelectProps = SelectProps<string[]>;\n\nexport enum Position {\n Above = \"Above\",\n Below = \"Below\"\n}\n\nexport interface UseArrowNavigationParams {\n expanded: boolean;\n setExpanded: React.Dispatch<React.SetStateAction<boolean>>;\n isSearching: boolean;\n setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;\n setFocusedSelectItem: React.Dispatch<React.SetStateAction<number>>;\n childrenCount: number;\n setShouldClick: React.Dispatch<React.SetStateAction<boolean>>;\n onOptionChangeHandler: (optionElement: HTMLElement | null) => void;\n searchInputRef: React.RefObject<HTMLInputElement>;\n addBtnRef?: React.RefObject<HTMLButtonElement>;\n renderThreshold: number;\n isReadOnlyView?: boolean;\n}\n\nexport interface UseSelectPositionListParams {\n expanded: boolean;\n optionListReference: React.RefObject<HTMLDivElement>;\n containerReference: React.RefObject<HTMLDivElement>;\n addBtnRef: React.RefObject<HTMLButtonElement>;\n}\n"],"names":["Position"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.interfaces.es.js","sources":["../../../../src/components/Form/Select/Select.interfaces.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentPropsWithRef, ReactElement } from \"react\";\nimport { Props as InputProps } from \"../Input/Input\";\nimport { FormElement } from \"../form.interfaces\";\n\nexport type PartialInputProps = Partial<InputProps>;\n\nexport interface SearchProps {\n enabled?: boolean;\n renderThreshold?: number;\n searchPlaceholder?: string;\n searchInputProps?: PartialInputProps & { reset?: boolean };\n}\n\nexport interface AddNewProps {\n label: string;\n onAddNew: (value: string) => void;\n btnProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n alwaysEnabled?: boolean;\n}\n\nexport interface SelectProps<V extends string | readonly string[] | undefined>\n extends ComponentPropsWithRef<\"select\">,\n FormElement {\n children: ReactElement[];\n name?: string;\n labeledBy?: string;\n describedBy?: string;\n placeholder?: string;\n selectButtonProps?: ComponentPropsWithRef<\"button\"> & FormElement;\n search?: SearchProps;\n className?: string;\n value: V;\n clearLabel?: string;\n noResultsLabel?: string;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>, child?: ReactElement) => void;\n addNew?: AddNewProps;\n isReadOnlyView?: boolean;\n domRoot?: HTMLElement;\n}\n\nexport type SingleSelectProps = SelectProps<string>;\nexport type MultiSelectProps = SelectProps<string[]>;\n\nexport enum Position {\n Above = \"Above\",\n Below = \"Below\"\n}\n\nexport interface UseArrowNavigationParams {\n expanded: boolean;\n setExpanded: React.Dispatch<React.SetStateAction<boolean>>;\n isSearching: boolean;\n setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;\n setFocusedSelectItem: React.Dispatch<React.SetStateAction<number>>;\n childrenCount: number;\n setShouldClick: React.Dispatch<React.SetStateAction<boolean>>;\n onOptionChangeHandler: (optionElement: HTMLElement | null) => void;\n searchInputRef: React.RefObject<HTMLInputElement>;\n addBtnRef?: React.RefObject<HTMLButtonElement>;\n renderThreshold: number;\n isReadOnlyView?: boolean;\n}\n\nexport interface UseSelectPositionListParams {\n expanded: boolean;\n optionListReference: React.RefObject<HTMLDivElement>;\n containerReference: React.RefObject<HTMLDivElement>;\n addBtnRef: React.RefObject<HTMLButtonElement>;\n}\n"],"names":["Position"],"mappings":"AA2DY,IAAA,6BAAAA,cAAL;AACLA,YAAA,OAAQ,IAAA;AACRA,YAAA,OAAQ,IAAA;AAFEA,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Select_sr-only_E7GBT{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Select_hidden_E7GBT{display:none}.Select_slide-in_E7GBT{animation:Select_slide-in_E7GBT .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-in_E7GBT{animation-duration:.1ms}}.Select_slide-out_E7GBT{animation:Select_slide-out_E7GBT .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-out_E7GBT{animation-duration:.1ms}}@keyframes Select_slide-in_E7GBT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Select_slide-out_E7GBT{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Select_select_E7GBT{position:relative;box-sizing:border-box;border:0;border-radius:var(--input-border-radius);background-color:var(--input-background-color);font-size:var(--form-control-font-size);transition-property:background-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_E7GBT{transition-duration:.1ms}}.Select_select_E7GBT [data-display]{color:var(--color-default);font-family:var(--font-family)}.Select_select_E7GBT.Select_expanded_E7GBT .Select_list-wrapper_E7GBT{background:var(--light)}.Select_select_E7GBT:not(.Select_expanded_E7GBT):has(button:focus){position:relative;z-index:2;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.Select_select_E7GBT:not(.Select_expanded_E7GBT) button:focus:not(.Select_error_E7GBT){border-color:var(--input-border-color);border-width:var(--input-border-width);padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_E7GBT:hover:not(.Select_disabled_E7GBT):not(.Select_expanded_E7GBT):not(.Select_error_E7GBT) button:not(:focus){border-color:var(--input-border-color);border-width:var(--input-border-width);background-color:var(--color-blue-grey25)}.Select_select_E7GBT .Select_custom-select_E7GBT{position:relative;width:100%;min-height:calc(2.875 * var(--font-size) - 2 * var(--input-border-width));padding:0 calc(.5 * var(--font-size) - var(--input-border-width));background-color:transparent;border-color:var(--input-border-color);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);font-size:var(--form-control-font-size);cursor:pointer;transition-property:background-color,border-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_E7GBT .Select_custom-select_E7GBT{transition-duration:.1ms}}.Select_select_E7GBT .Select_custom-select_E7GBT:focus{outline:0}.Select_select_E7GBT .Select_custom-select_E7GBT.Select_error_E7GBT{border-color:var(--error);color:var(--error)}.Select_select_E7GBT .Select_custom-select_E7GBT.Select_error_E7GBT:focus{border-width:var(--input-border-width)}.Select_select_E7GBT .Select_custom-select_E7GBT.Select_disabled_E7GBT{border-color:var(--color-disabled)}.Select_select_E7GBT .Select_list-wrapper-container_E7GBT{position:relative}.Select_select_E7GBT .Select_list-wrapper_E7GBT{border-color:var(--light-grey-border);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);box-shadow:0 8px 10px #01053224;position:absolute;z-index:11;left:0;width:100%;overflow:auto}.Select_select_E7GBT ul{box-sizing:border-box;padding:.25rem 0;width:100%;margin:0;list-style:none;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;overflow:auto;max-height:25rem}.Select_select_E7GBT ul li{padding:.62rem .75rem;font-size:var(--form-control-font-size);margin:0;position:relative;line-height:1.43;box-sizing:border-box;min-height:2.5rem;cursor:pointer}.Select_select_E7GBT ul li:focus{outline:none}.Select_select_E7GBT ul li:focus:before{content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.Select_select_E7GBT ul li:hover{background-color:var(--color-blue-grey50)}.Select_select_E7GBT ul li:active{background-color:var(--color-blue-grey100)}.Select_select_E7GBT ul li.Select_disabled_E7GBT{color:var(--greyed-out);background-color:var(--disabled);pointer-events:none}.Select_select_E7GBT[data-readonlyview=true]{-webkit-user-select:text;user-select:text;pointer-events:none}.Select_select_E7GBT[data-readonlyview=true] button[type=button]{background-color:var(--color-white);color:var(--read-only-text-color);border-color:var(--read-only-border-color)}.Select_select_E7GBT[data-readonlyview=true] button[type=button] .Select_selected_E7GBT{color:var(--read-only-text-color)}.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_error_E7GBT,.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_success_E7GBT{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_error_E7GBT .Select_status_E7GBT,.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_success_E7GBT .Select_status_E7GBT{visibility:visible}.Select_select_E7GBT[data-readonlyview=true] button[type=button] .Select_status_E7GBT .Select_chevron-icon_E7GBT,.Select_select_E7GBT[data-readonlyview=true] .Select_list-wrapper_E7GBT{visibility:hidden}.Select_select_E7GBT[data-readonlyview=true] .Select_list-wrapper_E7GBT ul{display:none}.Select_selected-option_E7GBT{content:"";position:absolute;top:0;left:0;height:100%;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-left:.25rem solid var(--color-primary);color:var(--color-primary)}.Select_selected_E7GBT{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;left:calc(.5 * var(--font-size) - var(--input-border-width));right:2.25rem;text-align:left;white-space:normal}.Select_selected_E7GBT .Select_required_E7GBT{color:var(--error)}.Select_status_E7GBT{position:absolute;top:50%;right:.8125rem;transform:translateY(-50%);display:flex;align-items:center;flex-shrink:0}.Select_status_E7GBT [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.Select_status_E7GBT [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.Select_status_E7GBT [data-icon-status=info]{color:var(--default);font-size:var(--font-size-big)}.Select_status_E7GBT .Select_chevron-icon_E7GBT{color:var(--default);font-size:var(--font-size-small)}.Select_status_E7GBT *+*{margin-left:1.25rem}.Select_placeholder_E7GBT{color:var(--greyed-out)}.Select_select-search_E7GBT{position:relative;width:100%;box-sizing:border-box;border-bottom-left-radius:0;border-bottom-right-radius:0}.Select_disabled_E7GBT{cursor:not-allowed;color:var(--greyed-out);background-color:var(--color-blue-grey25)}.Select_disabled_E7GBT>*{pointer-events:none}@media only screen and (min-width: 30em){.Select_select_E7GBT .Select_custom-select_E7GBT{padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_E7GBT:not(.Select_expanded_E7GBT) button:focus:not(.Select_error_E7GBT){padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}}[data-readonlyview=true] .Select_root_E7GBT [data-readonlyview] button{border-color:var(--read-only-border-color)}[data-readonlyview=true] .Select_root_E7GBT [data-readonlyview] button .Select_status_E7GBT .Select_chevron-icon_E7GBT{visibility:hidden}[data-readonlyview=true] .Select_root_E7GBT [data-readonlyview] button.Select_error_E7GBT{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_inlineEditing_E7GBT .Select_select_E7GBT{background-color:transparent;transition:none}.Select_inlineEditing_E7GBT .Select_select_E7GBT:not(.Select_expanded_E7GBT) button:focus:not(.Select_error_E7GBT){border-width:0;border-radius:.3125rem}.Select_inlineEditing_E7GBT .Select_select_E7GBT:focus button:focus{border:.125rem solid var(--color-focus)}.Select_inlineEditing_E7GBT .Select_select_E7GBT:hover button .Select_status_E7GBT span.Select_chevron-icon_E7GBT{visibility:visible}.Select_inlineEditing_E7GBT .Select_select_E7GBT:hover:not(.Select_disabled_E7GBT):not(.Select_expanded_E7GBT):not(.Select_error_E7GBT) button:not(:focus){border:0;background-color:transparent}.Select_inlineEditing_E7GBT .Select_select_E7GBT button{border:0}.Select_inlineEditing_E7GBT .Select_select_E7GBT button.Select_expanded_E7GBT div.Select_status_E7GBT span.Select_chevron-icon_E7GBT{visibility:visible}.Select_inlineEditing_E7GBT .Select_select_E7GBT button:focus-visible{outline:.125rem solid var(--color-focus);border-radius:.3125rem;outline-offset:-1px}.Select_inlineEditing_E7GBT .Select_select_E7GBT button.Select_error_E7GBT{color:var(--color-default)}.Select_inlineEditing_E7GBT .Select_select_E7GBT button .Select_status_E7GBT span.Select_chevron-icon_E7GBT{visibility:hidden}.Select_inlineEditing_E7GBT .Select_select_E7GBT[data-readonlyview=true] button{background-color:transparent}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Select_sr-only_k4xuc{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Select_hidden_k4xuc{display:none}.Select_slide-in_k4xuc{animation:Select_slide-in_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-in_k4xuc{animation-duration:.1ms}}.Select_slide-out_k4xuc{animation:Select_slide-out_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-out_k4xuc{animation-duration:.1ms}}@keyframes Select_slide-in_k4xuc{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Select_slide-out_k4xuc{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Select_select_k4xuc{position:relative;box-sizing:border-box;border:0;border-radius:var(--input-border-radius);background-color:var(--input-background-color);font-size:var(--form-control-font-size);transition-property:background-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_k4xuc{transition-duration:.1ms}}.Select_select_k4xuc [data-display]{color:var(--color-default);font-family:var(--font-family)}.Select_select_k4xuc.Select_expanded_k4xuc .Select_list-wrapper_k4xuc{background:var(--light)}.Select_select_k4xuc:not(.Select_expanded_k4xuc):has(button:focus){position:relative;z-index:2;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.Select_select_k4xuc:not(.Select_expanded_k4xuc) button:focus:not(.Select_error_k4xuc){border-color:var(--input-border-color);border-width:var(--input-border-width);padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_k4xuc:hover:not(.Select_disabled_k4xuc):not(.Select_expanded_k4xuc):not(.Select_error_k4xuc) button:not(:focus){border-color:var(--input-border-color);border-width:var(--input-border-width);background-color:var(--color-blue-grey25)}.Select_select_k4xuc .Select_custom-select_k4xuc{position:relative;width:100%;min-height:calc(2.875 * var(--font-size) - 2 * var(--input-border-width));padding:0 calc(.5 * var(--font-size) - var(--input-border-width));background-color:transparent;border-color:var(--input-border-color);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);font-size:var(--form-control-font-size);cursor:pointer;transition-property:background-color,border-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_k4xuc .Select_custom-select_k4xuc{transition-duration:.1ms}}.Select_select_k4xuc .Select_custom-select_k4xuc:focus{outline:0}.Select_select_k4xuc .Select_custom-select_k4xuc.Select_error_k4xuc{border-color:var(--error);color:var(--error)}.Select_select_k4xuc .Select_custom-select_k4xuc.Select_error_k4xuc:focus{border-width:var(--input-border-width)}.Select_select_k4xuc .Select_custom-select_k4xuc.Select_disabled_k4xuc{border-color:var(--color-disabled)}.Select_select_k4xuc .Select_list-wrapper-container_k4xuc{position:relative}.Select_select_k4xuc .Select_list-wrapper_k4xuc{border-color:var(--light-grey-border);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);box-shadow:0 8px 10px #01053224;position:absolute;z-index:11;left:0;width:100%;overflow:auto}.Select_select_k4xuc ul{box-sizing:border-box;padding:.25rem 0;width:100%;margin:0;list-style:none;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;overflow:auto;max-height:25rem}.Select_select_k4xuc ul li{padding:.62rem .75rem;font-size:var(--form-control-font-size);font-family:var(--font-family);margin:0;position:relative;line-height:1.43;box-sizing:border-box;min-height:2.5rem;cursor:pointer}.Select_select_k4xuc ul li:focus{outline:none}.Select_select_k4xuc ul li:focus:before{content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.Select_select_k4xuc ul li:hover{background-color:var(--color-blue-grey50)}.Select_select_k4xuc ul li:active{background-color:var(--color-blue-grey100)}.Select_select_k4xuc ul li.Select_disabled_k4xuc{color:var(--greyed-out);background-color:var(--disabled);pointer-events:none}.Select_select_k4xuc[data-readonlyview=true]{-webkit-user-select:text;user-select:text;pointer-events:none}.Select_select_k4xuc[data-readonlyview=true] button[type=button]{background-color:var(--color-white);color:var(--read-only-text-color);border-color:var(--read-only-border-color)}.Select_select_k4xuc[data-readonlyview=true] button[type=button] .Select_selected_k4xuc{color:var(--read-only-text-color)}.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_error_k4xuc,.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_success_k4xuc{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_error_k4xuc .Select_status_k4xuc,.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_success_k4xuc .Select_status_k4xuc{visibility:visible}.Select_select_k4xuc[data-readonlyview=true] button[type=button] .Select_status_k4xuc .Select_chevron-icon_k4xuc,.Select_select_k4xuc[data-readonlyview=true] .Select_list-wrapper_k4xuc{visibility:hidden}.Select_select_k4xuc[data-readonlyview=true] .Select_list-wrapper_k4xuc ul{display:none}.Select_selected-option_k4xuc{content:"";position:absolute;top:0;left:0;height:100%;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-left:.25rem solid var(--color-primary);color:var(--color-primary)}.Select_selected_k4xuc{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;left:calc(.5 * var(--font-size) - var(--input-border-width));right:2.25rem;text-align:left;white-space:normal}.Select_selected_k4xuc .Select_required_k4xuc{color:var(--error)}.Select_status_k4xuc{position:absolute;top:50%;right:.8125rem;transform:translateY(-50%);display:flex;align-items:center;flex-shrink:0}.Select_status_k4xuc [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.Select_status_k4xuc [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.Select_status_k4xuc [data-icon-status=info]{color:var(--default);font-size:var(--font-size-big)}.Select_status_k4xuc .Select_chevron-icon_k4xuc{color:var(--default);font-size:var(--font-size-small)}.Select_status_k4xuc *+*{margin-left:1.25rem}.Select_placeholder_k4xuc{color:var(--greyed-out)}.Select_select-search_k4xuc{position:relative;width:100%;box-sizing:border-box;border-bottom-left-radius:0;border-bottom-right-radius:0}.Select_disabled_k4xuc{cursor:not-allowed;color:var(--greyed-out);background-color:var(--color-blue-grey25)}.Select_disabled_k4xuc>*{pointer-events:none}@media only screen and (min-width: 30em){.Select_select_k4xuc .Select_custom-select_k4xuc{padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_k4xuc:not(.Select_expanded_k4xuc) button:focus:not(.Select_error_k4xuc){padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}}[data-readonlyview=true] .Select_root_k4xuc [data-readonlyview] button{border-color:var(--read-only-border-color)}[data-readonlyview=true] .Select_root_k4xuc [data-readonlyview] button .Select_status_k4xuc .Select_chevron-icon_k4xuc{visibility:hidden}[data-readonlyview=true] .Select_root_k4xuc [data-readonlyview] button.Select_error_k4xuc{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_inlineEditing_k4xuc .Select_select_k4xuc{background-color:transparent;transition:none}.Select_inlineEditing_k4xuc .Select_select_k4xuc:not(.Select_expanded_k4xuc) button:focus:not(.Select_error_k4xuc){border-width:0;border-radius:.3125rem}.Select_inlineEditing_k4xuc .Select_select_k4xuc:focus button:focus{border:.125rem solid var(--color-focus)}.Select_inlineEditing_k4xuc .Select_select_k4xuc:hover button .Select_status_k4xuc span.Select_chevron-icon_k4xuc{visibility:visible}.Select_inlineEditing_k4xuc .Select_select_k4xuc:hover:not(.Select_disabled_k4xuc):not(.Select_expanded_k4xuc):not(.Select_error_k4xuc) button:not(:focus){border:0;background-color:transparent}.Select_inlineEditing_k4xuc .Select_select_k4xuc button{border:0}.Select_inlineEditing_k4xuc .Select_select_k4xuc button.Select_expanded_k4xuc div.Select_status_k4xuc span.Select_chevron-icon_k4xuc{visibility:visible}.Select_inlineEditing_k4xuc .Select_select_k4xuc button:focus-visible{outline:.125rem solid var(--color-focus);border-radius:.3125rem;outline-offset:-1px}.Select_inlineEditing_k4xuc .Select_select_k4xuc button.Select_error_k4xuc{color:var(--color-default)}.Select_inlineEditing_k4xuc .Select_select_k4xuc button .Select_status_k4xuc span.Select_chevron-icon_k4xuc{visibility:hidden}.Select_inlineEditing_k4xuc .Select_select_k4xuc[data-readonlyview=true] button{background-color:transparent}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="Select_select_k4xuc",t="Select_expanded_k4xuc",c="Select_error_k4xuc",s="Select_disabled_k4xuc",l="Select_selected_k4xuc",r="Select_success_k4xuc",o="Select_status_k4xuc",_="Select_required_k4xuc",u="Select_placeholder_k4xuc",x="Select_root_k4xuc",d="Select_inlineEditing_k4xuc",i={select:e,expanded:t,"list-wrapper":"Select_list-wrapper_k4xuc",error:c,disabled:s,"custom-select":"Select_custom-select_k4xuc",selected:l,success:r,status:o,"chevron-icon":"Select_chevron-icon_k4xuc","selected-option":"Select_selected-option_k4xuc",required:_,placeholder:u,"select-search":"Select_select-search_k4xuc",root:x,inlineEditing:d};exports.default=i,exports.disabled=s,exports.error=c,exports.expanded=t,exports.inlineEditing=d,exports.placeholder=u,exports.required=_,exports.root=x,exports.select=e,exports.selected=l,exports.status=o,exports.success=r;
|
|
3
3
|
//# sourceMappingURL=Select.module.scss.cjs.js.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Select_sr-only_E7GBT{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Select_hidden_E7GBT{display:none}.Select_slide-in_E7GBT{animation:Select_slide-in_E7GBT .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-in_E7GBT{animation-duration:.1ms}}.Select_slide-out_E7GBT{animation:Select_slide-out_E7GBT .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-out_E7GBT{animation-duration:.1ms}}@keyframes Select_slide-in_E7GBT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Select_slide-out_E7GBT{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Select_select_E7GBT{position:relative;box-sizing:border-box;border:0;border-radius:var(--input-border-radius);background-color:var(--input-background-color);font-size:var(--form-control-font-size);transition-property:background-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_E7GBT{transition-duration:.1ms}}.Select_select_E7GBT [data-display]{color:var(--color-default);font-family:var(--font-family)}.Select_select_E7GBT.Select_expanded_E7GBT .Select_list-wrapper_E7GBT{background:var(--light)}.Select_select_E7GBT:not(.Select_expanded_E7GBT):has(button:focus){position:relative;z-index:2;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.Select_select_E7GBT:not(.Select_expanded_E7GBT) button:focus:not(.Select_error_E7GBT){border-color:var(--input-border-color);border-width:var(--input-border-width);padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_E7GBT:hover:not(.Select_disabled_E7GBT):not(.Select_expanded_E7GBT):not(.Select_error_E7GBT) button:not(:focus){border-color:var(--input-border-color);border-width:var(--input-border-width);background-color:var(--color-blue-grey25)}.Select_select_E7GBT .Select_custom-select_E7GBT{position:relative;width:100%;min-height:calc(2.875 * var(--font-size) - 2 * var(--input-border-width));padding:0 calc(.5 * var(--font-size) - var(--input-border-width));background-color:transparent;border-color:var(--input-border-color);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);font-size:var(--form-control-font-size);cursor:pointer;transition-property:background-color,border-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_E7GBT .Select_custom-select_E7GBT{transition-duration:.1ms}}.Select_select_E7GBT .Select_custom-select_E7GBT:focus{outline:0}.Select_select_E7GBT .Select_custom-select_E7GBT.Select_error_E7GBT{border-color:var(--error);color:var(--error)}.Select_select_E7GBT .Select_custom-select_E7GBT.Select_error_E7GBT:focus{border-width:var(--input-border-width)}.Select_select_E7GBT .Select_custom-select_E7GBT.Select_disabled_E7GBT{border-color:var(--color-disabled)}.Select_select_E7GBT .Select_list-wrapper-container_E7GBT{position:relative}.Select_select_E7GBT .Select_list-wrapper_E7GBT{border-color:var(--light-grey-border);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);box-shadow:0 8px 10px #01053224;position:absolute;z-index:11;left:0;width:100%;overflow:auto}.Select_select_E7GBT ul{box-sizing:border-box;padding:.25rem 0;width:100%;margin:0;list-style:none;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;overflow:auto;max-height:25rem}.Select_select_E7GBT ul li{padding:.62rem .75rem;font-size:var(--form-control-font-size);margin:0;position:relative;line-height:1.43;box-sizing:border-box;min-height:2.5rem;cursor:pointer}.Select_select_E7GBT ul li:focus{outline:none}.Select_select_E7GBT ul li:focus:before{content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.Select_select_E7GBT ul li:hover{background-color:var(--color-blue-grey50)}.Select_select_E7GBT ul li:active{background-color:var(--color-blue-grey100)}.Select_select_E7GBT ul li.Select_disabled_E7GBT{color:var(--greyed-out);background-color:var(--disabled);pointer-events:none}.Select_select_E7GBT[data-readonlyview=true]{-webkit-user-select:text;user-select:text;pointer-events:none}.Select_select_E7GBT[data-readonlyview=true] button[type=button]{background-color:var(--color-white);color:var(--read-only-text-color);border-color:var(--read-only-border-color)}.Select_select_E7GBT[data-readonlyview=true] button[type=button] .Select_selected_E7GBT{color:var(--read-only-text-color)}.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_error_E7GBT,.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_success_E7GBT{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_error_E7GBT .Select_status_E7GBT,.Select_select_E7GBT[data-readonlyview=true] button[type=button].Select_success_E7GBT .Select_status_E7GBT{visibility:visible}.Select_select_E7GBT[data-readonlyview=true] button[type=button] .Select_status_E7GBT .Select_chevron-icon_E7GBT,.Select_select_E7GBT[data-readonlyview=true] .Select_list-wrapper_E7GBT{visibility:hidden}.Select_select_E7GBT[data-readonlyview=true] .Select_list-wrapper_E7GBT ul{display:none}.Select_selected-option_E7GBT{content:"";position:absolute;top:0;left:0;height:100%;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-left:.25rem solid var(--color-primary);color:var(--color-primary)}.Select_selected_E7GBT{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;left:calc(.5 * var(--font-size) - var(--input-border-width));right:2.25rem;text-align:left;white-space:normal}.Select_selected_E7GBT .Select_required_E7GBT{color:var(--error)}.Select_status_E7GBT{position:absolute;top:50%;right:.8125rem;transform:translateY(-50%);display:flex;align-items:center;flex-shrink:0}.Select_status_E7GBT [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.Select_status_E7GBT [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.Select_status_E7GBT [data-icon-status=info]{color:var(--default);font-size:var(--font-size-big)}.Select_status_E7GBT .Select_chevron-icon_E7GBT{color:var(--default);font-size:var(--font-size-small)}.Select_status_E7GBT *+*{margin-left:1.25rem}.Select_placeholder_E7GBT{color:var(--greyed-out)}.Select_select-search_E7GBT{position:relative;width:100%;box-sizing:border-box;border-bottom-left-radius:0;border-bottom-right-radius:0}.Select_disabled_E7GBT{cursor:not-allowed;color:var(--greyed-out);background-color:var(--color-blue-grey25)}.Select_disabled_E7GBT>*{pointer-events:none}@media only screen and (min-width: 30em){.Select_select_E7GBT .Select_custom-select_E7GBT{padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_E7GBT:not(.Select_expanded_E7GBT) button:focus:not(.Select_error_E7GBT){padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}}[data-readonlyview=true] .Select_root_E7GBT [data-readonlyview] button{border-color:var(--read-only-border-color)}[data-readonlyview=true] .Select_root_E7GBT [data-readonlyview] button .Select_status_E7GBT .Select_chevron-icon_E7GBT{visibility:hidden}[data-readonlyview=true] .Select_root_E7GBT [data-readonlyview] button.Select_error_E7GBT{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_inlineEditing_E7GBT .Select_select_E7GBT{background-color:transparent;transition:none}.Select_inlineEditing_E7GBT .Select_select_E7GBT:not(.Select_expanded_E7GBT) button:focus:not(.Select_error_E7GBT){border-width:0;border-radius:.3125rem}.Select_inlineEditing_E7GBT .Select_select_E7GBT:focus button:focus{border:.125rem solid var(--color-focus)}.Select_inlineEditing_E7GBT .Select_select_E7GBT:hover button .Select_status_E7GBT span.Select_chevron-icon_E7GBT{visibility:visible}.Select_inlineEditing_E7GBT .Select_select_E7GBT:hover:not(.Select_disabled_E7GBT):not(.Select_expanded_E7GBT):not(.Select_error_E7GBT) button:not(:focus){border:0;background-color:transparent}.Select_inlineEditing_E7GBT .Select_select_E7GBT button{border:0}.Select_inlineEditing_E7GBT .Select_select_E7GBT button.Select_expanded_E7GBT div.Select_status_E7GBT span.Select_chevron-icon_E7GBT{visibility:visible}.Select_inlineEditing_E7GBT .Select_select_E7GBT button:focus-visible{outline:.125rem solid var(--color-focus);border-radius:.3125rem;outline-offset:-1px}.Select_inlineEditing_E7GBT .Select_select_E7GBT button.Select_error_E7GBT{color:var(--color-default)}.Select_inlineEditing_E7GBT .Select_select_E7GBT button .Select_status_E7GBT span.Select_chevron-icon_E7GBT{visibility:hidden}.Select_inlineEditing_E7GBT .Select_select_E7GBT[data-readonlyview=true] button{background-color:transparent}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
-
const select = "
|
|
3
|
-
const expanded = "
|
|
4
|
-
const error = "
|
|
5
|
-
const disabled = "
|
|
6
|
-
const selected = "
|
|
7
|
-
const success = "
|
|
8
|
-
const status = "
|
|
9
|
-
const required = "
|
|
10
|
-
const placeholder = "
|
|
11
|
-
const root = "
|
|
12
|
-
const inlineEditing = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Select_sr-only_k4xuc{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Select_hidden_k4xuc{display:none}.Select_slide-in_k4xuc{animation:Select_slide-in_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-in_k4xuc{animation-duration:.1ms}}.Select_slide-out_k4xuc{animation:Select_slide-out_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.Select_slide-out_k4xuc{animation-duration:.1ms}}@keyframes Select_slide-in_k4xuc{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Select_slide-out_k4xuc{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Select_select_k4xuc{position:relative;box-sizing:border-box;border:0;border-radius:var(--input-border-radius);background-color:var(--input-background-color);font-size:var(--form-control-font-size);transition-property:background-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_k4xuc{transition-duration:.1ms}}.Select_select_k4xuc [data-display]{color:var(--color-default);font-family:var(--font-family)}.Select_select_k4xuc.Select_expanded_k4xuc .Select_list-wrapper_k4xuc{background:var(--light)}.Select_select_k4xuc:not(.Select_expanded_k4xuc):has(button:focus){position:relative;z-index:2;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.Select_select_k4xuc:not(.Select_expanded_k4xuc) button:focus:not(.Select_error_k4xuc){border-color:var(--input-border-color);border-width:var(--input-border-width);padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_k4xuc:hover:not(.Select_disabled_k4xuc):not(.Select_expanded_k4xuc):not(.Select_error_k4xuc) button:not(:focus){border-color:var(--input-border-color);border-width:var(--input-border-width);background-color:var(--color-blue-grey25)}.Select_select_k4xuc .Select_custom-select_k4xuc{position:relative;width:100%;min-height:calc(2.875 * var(--font-size) - 2 * var(--input-border-width));padding:0 calc(.5 * var(--font-size) - var(--input-border-width));background-color:transparent;border-color:var(--input-border-color);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);font-size:var(--form-control-font-size);cursor:pointer;transition-property:background-color,border-color;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Select_select_k4xuc .Select_custom-select_k4xuc{transition-duration:.1ms}}.Select_select_k4xuc .Select_custom-select_k4xuc:focus{outline:0}.Select_select_k4xuc .Select_custom-select_k4xuc.Select_error_k4xuc{border-color:var(--error);color:var(--error)}.Select_select_k4xuc .Select_custom-select_k4xuc.Select_error_k4xuc:focus{border-width:var(--input-border-width)}.Select_select_k4xuc .Select_custom-select_k4xuc.Select_disabled_k4xuc{border-color:var(--color-disabled)}.Select_select_k4xuc .Select_list-wrapper-container_k4xuc{position:relative}.Select_select_k4xuc .Select_list-wrapper_k4xuc{border-color:var(--light-grey-border);border-style:var(--input-border-style);border-width:var(--input-border-width);border-radius:var(--input-border-radius);box-shadow:0 8px 10px #01053224;position:absolute;z-index:11;left:0;width:100%;overflow:auto}.Select_select_k4xuc ul{box-sizing:border-box;padding:.25rem 0;width:100%;margin:0;list-style:none;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;overflow:auto;max-height:25rem}.Select_select_k4xuc ul li{padding:.62rem .75rem;font-size:var(--form-control-font-size);font-family:var(--font-family);margin:0;position:relative;line-height:1.43;box-sizing:border-box;min-height:2.5rem;cursor:pointer}.Select_select_k4xuc ul li:focus{outline:none}.Select_select_k4xuc ul li:focus:before{content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101;outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius)}.Select_select_k4xuc ul li:hover{background-color:var(--color-blue-grey50)}.Select_select_k4xuc ul li:active{background-color:var(--color-blue-grey100)}.Select_select_k4xuc ul li.Select_disabled_k4xuc{color:var(--greyed-out);background-color:var(--disabled);pointer-events:none}.Select_select_k4xuc[data-readonlyview=true]{-webkit-user-select:text;user-select:text;pointer-events:none}.Select_select_k4xuc[data-readonlyview=true] button[type=button]{background-color:var(--color-white);color:var(--read-only-text-color);border-color:var(--read-only-border-color)}.Select_select_k4xuc[data-readonlyview=true] button[type=button] .Select_selected_k4xuc{color:var(--read-only-text-color)}.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_error_k4xuc,.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_success_k4xuc{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_error_k4xuc .Select_status_k4xuc,.Select_select_k4xuc[data-readonlyview=true] button[type=button].Select_success_k4xuc .Select_status_k4xuc{visibility:visible}.Select_select_k4xuc[data-readonlyview=true] button[type=button] .Select_status_k4xuc .Select_chevron-icon_k4xuc,.Select_select_k4xuc[data-readonlyview=true] .Select_list-wrapper_k4xuc{visibility:hidden}.Select_select_k4xuc[data-readonlyview=true] .Select_list-wrapper_k4xuc ul{display:none}.Select_selected-option_k4xuc{content:"";position:absolute;top:0;left:0;height:100%;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-left:.25rem solid var(--color-primary);color:var(--color-primary)}.Select_selected_k4xuc{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;left:calc(.5 * var(--font-size) - var(--input-border-width));right:2.25rem;text-align:left;white-space:normal}.Select_selected_k4xuc .Select_required_k4xuc{color:var(--error)}.Select_status_k4xuc{position:absolute;top:50%;right:.8125rem;transform:translateY(-50%);display:flex;align-items:center;flex-shrink:0}.Select_status_k4xuc [data-icon-status=success]{color:var(--success);font-size:var(--font-size-big)}.Select_status_k4xuc [data-icon-status=error]{color:var(--error);font-size:var(--font-size-big)}.Select_status_k4xuc [data-icon-status=info]{color:var(--default);font-size:var(--font-size-big)}.Select_status_k4xuc .Select_chevron-icon_k4xuc{color:var(--default);font-size:var(--font-size-small)}.Select_status_k4xuc *+*{margin-left:1.25rem}.Select_placeholder_k4xuc{color:var(--greyed-out)}.Select_select-search_k4xuc{position:relative;width:100%;box-sizing:border-box;border-bottom-left-radius:0;border-bottom-right-radius:0}.Select_disabled_k4xuc{cursor:not-allowed;color:var(--greyed-out);background-color:var(--color-blue-grey25)}.Select_disabled_k4xuc>*{pointer-events:none}@media only screen and (min-width: 30em){.Select_select_k4xuc .Select_custom-select_k4xuc{padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}.Select_select_k4xuc:not(.Select_expanded_k4xuc) button:focus:not(.Select_error_k4xuc){padding:0 calc(.5 * var(--font-size) - var(--input-border-width))}}[data-readonlyview=true] .Select_root_k4xuc [data-readonlyview] button{border-color:var(--read-only-border-color)}[data-readonlyview=true] .Select_root_k4xuc [data-readonlyview] button .Select_status_k4xuc .Select_chevron-icon_k4xuc{visibility:hidden}[data-readonlyview=true] .Select_root_k4xuc [data-readonlyview] button.Select_error_k4xuc{border-color:var(--read-only-border-color);color:var(--read-only-text-color)}.Select_inlineEditing_k4xuc .Select_select_k4xuc{background-color:transparent;transition:none}.Select_inlineEditing_k4xuc .Select_select_k4xuc:not(.Select_expanded_k4xuc) button:focus:not(.Select_error_k4xuc){border-width:0;border-radius:.3125rem}.Select_inlineEditing_k4xuc .Select_select_k4xuc:focus button:focus{border:.125rem solid var(--color-focus)}.Select_inlineEditing_k4xuc .Select_select_k4xuc:hover button .Select_status_k4xuc span.Select_chevron-icon_k4xuc{visibility:visible}.Select_inlineEditing_k4xuc .Select_select_k4xuc:hover:not(.Select_disabled_k4xuc):not(.Select_expanded_k4xuc):not(.Select_error_k4xuc) button:not(:focus){border:0;background-color:transparent}.Select_inlineEditing_k4xuc .Select_select_k4xuc button{border:0}.Select_inlineEditing_k4xuc .Select_select_k4xuc button.Select_expanded_k4xuc div.Select_status_k4xuc span.Select_chevron-icon_k4xuc{visibility:visible}.Select_inlineEditing_k4xuc .Select_select_k4xuc button:focus-visible{outline:.125rem solid var(--color-focus);border-radius:.3125rem;outline-offset:-1px}.Select_inlineEditing_k4xuc .Select_select_k4xuc button.Select_error_k4xuc{color:var(--color-default)}.Select_inlineEditing_k4xuc .Select_select_k4xuc button .Select_status_k4xuc span.Select_chevron-icon_k4xuc{visibility:hidden}.Select_inlineEditing_k4xuc .Select_select_k4xuc[data-readonlyview=true] button{background-color:transparent}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
const select = "Select_select_k4xuc";
|
|
3
|
+
const expanded = "Select_expanded_k4xuc";
|
|
4
|
+
const error = "Select_error_k4xuc";
|
|
5
|
+
const disabled = "Select_disabled_k4xuc";
|
|
6
|
+
const selected = "Select_selected_k4xuc";
|
|
7
|
+
const success = "Select_success_k4xuc";
|
|
8
|
+
const status = "Select_status_k4xuc";
|
|
9
|
+
const required = "Select_required_k4xuc";
|
|
10
|
+
const placeholder = "Select_placeholder_k4xuc";
|
|
11
|
+
const root = "Select_root_k4xuc";
|
|
12
|
+
const inlineEditing = "Select_inlineEditing_k4xuc";
|
|
13
13
|
const selectClasses = {
|
|
14
14
|
select,
|
|
15
15
|
expanded,
|
|
16
|
-
"list-wrapper": "Select_list-
|
|
16
|
+
"list-wrapper": "Select_list-wrapper_k4xuc",
|
|
17
17
|
error,
|
|
18
18
|
disabled,
|
|
19
|
-
"custom-select": "Select_custom-
|
|
19
|
+
"custom-select": "Select_custom-select_k4xuc",
|
|
20
20
|
selected,
|
|
21
21
|
success,
|
|
22
22
|
status,
|
|
23
|
-
"chevron-icon": "Select_chevron-
|
|
24
|
-
"selected-option": "Select_selected-
|
|
23
|
+
"chevron-icon": "Select_chevron-icon_k4xuc",
|
|
24
|
+
"selected-option": "Select_selected-option_k4xuc",
|
|
25
25
|
required,
|
|
26
26
|
placeholder,
|
|
27
|
-
"select-search": "Select_select-
|
|
27
|
+
"select-search": "Select_select-search_k4xuc",
|
|
28
28
|
root,
|
|
29
29
|
inlineEditing
|
|
30
30
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.useAddNewBtn_sr-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.useAddNewBtn_sr-only_k4xuc{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.useAddNewBtn_hidden_k4xuc{display:none}.useAddNewBtn_slide-in_k4xuc{animation:useAddNewBtn_slide-in_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.useAddNewBtn_slide-in_k4xuc{animation-duration:.1ms}}.useAddNewBtn_slide-out_k4xuc{animation:useAddNewBtn_slide-out_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.useAddNewBtn_slide-out_k4xuc{animation-duration:.1ms}}@keyframes useAddNewBtn_slide-in_k4xuc{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes useAddNewBtn_slide-out_k4xuc{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ul.useAddNewBtn_has-sibling_k4xuc{padding-bottom:2px}.useAddNewBtn_action-button_k4xuc{position:relative;border:none;border-top:1px solid var(--color-blue-grey50);width:100%;height:calc(2.5 * var(--font-size));padding:.625rem .75rem;margin:0 0 .25rem;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;box-sizing:border-box;cursor:pointer;font-family:var(--font-family);font-size:var(--form-control-font-size)}.useAddNewBtn_action-button_k4xuc:focus,.useAddNewBtn_action-button_k4xuc.useAddNewBtn_focus_k4xuc{outline:none}.useAddNewBtn_action-button_k4xuc:focus:before,.useAddNewBtn_action-button_k4xuc.useAddNewBtn_focus_k4xuc:before{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius);content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101}.useAddNewBtn_action-button_k4xuc:hover{background-color:var(--color-blue-grey50)}.useAddNewBtn_action-button_k4xuc:active{background-color:var(--color-blue-grey100)}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="useAddNewBtn_focus_k4xuc",t={"has-sibling":"useAddNewBtn_has-sibling_k4xuc","action-button":"useAddNewBtn_action-button_k4xuc",focus:e};exports.default=t,exports.focus=e;
|
|
3
3
|
//# sourceMappingURL=useAddNewBtn.module.scss.cjs.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.useAddNewBtn_sr-
|
|
2
|
-
const focus = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.useAddNewBtn_sr-only_k4xuc{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.useAddNewBtn_hidden_k4xuc{display:none}.useAddNewBtn_slide-in_k4xuc{animation:useAddNewBtn_slide-in_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.useAddNewBtn_slide-in_k4xuc{animation-duration:.1ms}}.useAddNewBtn_slide-out_k4xuc{animation:useAddNewBtn_slide-out_k4xuc .5s forwards}@media (prefers-reduced-motion: reduce){.useAddNewBtn_slide-out_k4xuc{animation-duration:.1ms}}@keyframes useAddNewBtn_slide-in_k4xuc{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes useAddNewBtn_slide-out_k4xuc{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ul.useAddNewBtn_has-sibling_k4xuc{padding-bottom:2px}.useAddNewBtn_action-button_k4xuc{position:relative;border:none;border-top:1px solid var(--color-blue-grey50);width:100%;height:calc(2.5 * var(--font-size));padding:.625rem .75rem;margin:0 0 .25rem;background-color:var(--light);border-radius:var(--input-border-radius);color:var(--default);text-align:left;box-sizing:border-box;cursor:pointer;font-family:var(--font-family);font-size:var(--form-control-font-size)}.useAddNewBtn_action-button_k4xuc:focus,.useAddNewBtn_action-button_k4xuc.useAddNewBtn_focus_k4xuc{outline:none}.useAddNewBtn_action-button_k4xuc:focus:before,.useAddNewBtn_action-button_k4xuc.useAddNewBtn_focus_k4xuc:before{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:0;border-radius:var(--focus-border-radius);content:"";position:absolute;top:0;left:.125rem;height:100%;width:calc(100% - .25rem);opacity:1;z-index:101}.useAddNewBtn_action-button_k4xuc:hover{background-color:var(--color-blue-grey50)}.useAddNewBtn_action-button_k4xuc:active{background-color:var(--color-blue-grey100)}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const focus = "useAddNewBtn_focus_k4xuc";
|
|
3
3
|
const classes = {
|
|
4
|
-
"has-sibling": "useAddNewBtn_has-
|
|
5
|
-
"action-button": "useAddNewBtn_action-
|
|
4
|
+
"has-sibling": "useAddNewBtn_has-sibling_k4xuc",
|
|
5
|
+
"action-button": "useAddNewBtn_action-button_k4xuc",
|
|
6
6
|
focus
|
|
7
7
|
};
|
|
8
8
|
export {
|