@eyesee/ui-components 0.7.0 → 0.9.0
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/README.md +2 -0
- package/dist/components/Avatar/Avatar.d.ts +139 -0
- package/dist/components/Avatar/Avatar.js +8 -7
- package/dist/components/Badge/Badge.d.ts +59 -0
- package/dist/components/Badge/Badge.js +7 -7
- package/dist/components/Badge/badgeVariants.d.ts +17 -0
- package/dist/components/Button/Button.d.ts +299 -0
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Checkbox/Checkbox.d.ts +124 -0
- package/dist/components/Checkbox/Checkbox.js +13 -12
- package/dist/components/DropdownList/DropdownList.d.ts +153 -0
- package/dist/components/DropdownList/DropdownList.js +15 -15
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +114 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +24 -24
- package/dist/components/EllipsisTooltip/EllipsisTooltip.module.scss.js +4 -6
- package/dist/components/ExpandableItem/ExpandableItem.d.ts +89 -0
- package/dist/components/ExpandableItem/ExpandableItem.js +6 -6
- package/dist/components/Fields/InputField/InputField.d.ts +309 -0
- package/dist/components/Fields/InputField/InputField.js +54 -49
- package/dist/components/Fields/InputFieldContainer.d.ts +11 -0
- package/dist/components/Fields/SelectField/SelectField.d.ts +404 -0
- package/dist/components/Fields/SelectField/SelectField.js +61 -56
- package/dist/components/Fields/SelectField/SelectFieldTags.d.ts +6 -0
- package/dist/components/Fields/SelectField/selectOptionRow.d.ts +1 -0
- package/dist/components/Fields/SelectField/selectUtils.d.ts +35 -0
- package/dist/components/Fields/SelectField/useSelectFieldDropdownPosition.d.ts +7 -0
- package/dist/components/Fields/TextField/TextField.d.ts +272 -0
- package/dist/components/Fields/TextField/TextField.js +68 -61
- package/dist/components/FileType/FileType.d.ts +61 -0
- package/dist/components/FileType/FileType.js +6 -5
- package/dist/components/FileType/PaperIcon.d.ts +5 -0
- package/dist/components/ImagePlaceholder/ImageHoverPreview/ImageHoverPreview.d.ts +75 -0
- package/dist/components/ImagePlaceholder/ImageHoverPreview/ImageHoverPreview.js +13 -12
- package/dist/components/ImagePlaceholder/ImagePlaceholder.d.ts +606 -0
- package/dist/components/ImagePlaceholder/ImagePlaceholder.js +78 -76
- package/dist/components/ImagePlaceholder/ImagePlaceholder.module.scss.js +34 -32
- package/dist/components/ImagePlaceholder/constantsImgPh.d.ts +16 -0
- package/dist/components/ImagePlaceholder/utilsImgPh.d.ts +18 -0
- package/dist/components/ImageWithData/ImageWithData.d.ts +284 -0
- package/dist/components/ImageWithData/ImageWithData.js +11 -11
- package/dist/components/Infobox/Infobox.d.ts +90 -0
- package/dist/components/Infobox/Infobox.js +5 -5
- package/dist/components/Infobox/infoboxVariants.d.ts +8 -0
- package/dist/components/ListItem/ListItem.d.ts +311 -0
- package/dist/components/ListItem/ListItem.js +7 -7
- package/dist/components/ListItem/useListItems.d.ts +108 -0
- package/dist/components/ListItem/useListItems.js +18 -17
- package/dist/components/Modal/Modal.d.ts +239 -0
- package/dist/components/Modal/Modal.js +4 -3
- package/dist/components/Notifications/Notifications.d.ts +261 -0
- package/dist/components/Notifications/Notifications.js +4 -3
- package/dist/components/Notifications/useNotifications.d.ts +59 -0
- package/dist/components/Notifications/useNotifications.js +3 -2
- package/dist/components/Pill/Pill.d.ts +81 -0
- package/dist/components/Pill/Pill.js +7 -12
- package/dist/components/Pill/pillVariants.d.ts +16 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +111 -0
- package/dist/components/ProgressBar/ProgressBar.js +17 -16
- package/dist/components/Radio/Radio.d.ts +58 -0
- package/dist/components/Radio/Radio.js +12 -11
- package/dist/components/Tab/Tab.d.ts +204 -0
- package/dist/components/Tab/Tab.js +3 -3
- package/dist/components/Tabs/Tabs.d.ts +356 -0
- package/dist/components/Tabs/Tabs.js +3 -3
- package/dist/components/Tabs/tabsUtils.d.ts +33 -0
- package/dist/components/Tabs/tabsUtils.js +18 -12
- package/dist/components/Tag/Tag.d.ts +93 -0
- package/dist/components/Tag/Tag.js +4 -3
- package/dist/components/Tag/tagVariants.d.ts +7 -0
- package/dist/components/TextHoverable/TextHoverable.d.ts +46 -0
- package/dist/components/TextHoverable/TextHoverable.js +5 -3
- package/dist/components/Toggle/Toggle.d.ts +115 -0
- package/dist/components/Toggle/Toggle.js +6 -5
- package/dist/components/Tooltip/Tooltip.d.ts +294 -0
- package/dist/components/Tooltip/Tooltip.js +22 -21
- package/dist/components/Tooltip/Tooltip.module.scss.js +30 -28
- package/dist/components/Tooltip/useTooltipPositioning.d.ts +21 -0
- package/dist/components/icons-v2/AdIcon.d.ts +2 -0
- package/dist/components/icons-v2/AddMessageIcon.d.ts +13 -0
- package/dist/components/icons-v2/AddUserIcon.d.ts +13 -0
- package/dist/components/icons-v2/AdjustmentsIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlertIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlignCenterIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlignHorizontallyIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlignJustifyIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlignLeftIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlignRightIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlignVerticallyIcon.d.ts +13 -0
- package/dist/components/icons-v2/AlphabetIcon.d.ts +20 -0
- package/dist/components/icons-v2/ArchiveIcon.d.ts +13 -0
- package/dist/components/icons-v2/ArrowDownIcon.d.ts +13 -0
- package/dist/components/icons-v2/ArrowDownRightIcon.d.ts +13 -0
- package/dist/components/icons-v2/ArrowLeftIcon.d.ts +13 -0
- package/dist/components/icons-v2/ArrowMoveDownIcon.d.ts +13 -0
- package/dist/components/icons-v2/ArrowRightIcon.d.ts +13 -0
- package/dist/components/icons-v2/ArrowUpIcon.d.ts +13 -0
- package/dist/components/icons-v2/AspectRatioIcon.d.ts +13 -0
- package/dist/components/icons-v2/AspectRatioIcon.js +15 -0
- package/dist/components/icons-v2/AttributesEvaluationIcon.d.ts +13 -0
- package/dist/components/icons-v2/BellIcon.d.ts +13 -0
- package/dist/components/icons-v2/BoldIcon.d.ts +13 -0
- package/dist/components/icons-v2/BoltIcon.d.ts +13 -0
- package/dist/components/icons-v2/BookIcon.d.ts +13 -0
- package/dist/components/icons-v2/BookmarkIcon.d.ts +13 -0
- package/dist/components/icons-v2/BooksIcon.d.ts +13 -0
- package/dist/components/icons-v2/BoxIcon.d.ts +13 -0
- package/dist/components/icons-v2/BugIcon.d.ts +13 -0
- package/dist/components/icons-v2/CalendarIcon.d.ts +13 -0
- package/dist/components/icons-v2/CameraPlusIcon.d.ts +13 -0
- package/dist/components/icons-v2/CardsIcon.d.ts +13 -0
- package/dist/components/icons-v2/CellIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChartbarIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChartbarOffIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChatBubbleIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChatbotIcon.d.ts +13 -0
- package/dist/components/icons-v2/CheckCircleIcon.d.ts +13 -0
- package/dist/components/icons-v2/CheckboxIcon.d.ts +13 -0
- package/dist/components/icons-v2/CheckmarkDoubleIcon.d.ts +13 -0
- package/dist/components/icons-v2/CheckmarkLargeIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronDownIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronLeftIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronRightIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronUpIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronsDownIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronsLeftIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronsRightIcon.d.ts +13 -0
- package/dist/components/icons-v2/ChevronsUpIcon.d.ts +13 -0
- package/dist/components/icons-v2/CircleIcon.d.ts +11 -0
- package/dist/components/icons-v2/CirclesIcon.d.ts +13 -0
- package/dist/components/icons-v2/ClickIcon.d.ts +13 -0
- package/dist/components/icons-v2/ClipboardIcon.d.ts +13 -0
- package/dist/components/icons-v2/ClockIcon.d.ts +13 -0
- package/dist/components/icons-v2/ClockShareIcon.d.ts +13 -0
- package/dist/components/icons-v2/CloseIcon.d.ts +13 -0
- package/dist/components/icons-v2/ColumnIcon.d.ts +1 -0
- package/dist/components/icons-v2/CopyIcon.d.ts +13 -0
- package/dist/components/icons-v2/CreditCardIcon.d.ts +13 -0
- package/dist/components/icons-v2/CropIcon.d.ts +13 -0
- package/dist/components/icons-v2/DashboardMeterIcon.d.ts +13 -0
- package/dist/components/icons-v2/DatabaseCheckIcon.d.ts +13 -0
- package/dist/components/icons-v2/DatabaseIcon.d.ts +13 -0
- package/dist/components/icons-v2/DeleteIcon.d.ts +12 -0
- package/dist/components/icons-v2/DetailsIcon.d.ts +13 -0
- package/dist/components/icons-v2/DevicesIcon.d.ts +13 -0
- package/dist/components/icons-v2/DislikeIcon.d.ts +13 -0
- package/dist/components/icons-v2/DollarIcon.d.ts +13 -0
- package/dist/components/icons-v2/DownloadIcon.d.ts +13 -0
- package/dist/components/icons-v2/DragToolIcon.d.ts +13 -0
- package/dist/components/icons-v2/DrawRectangleIcon.d.ts +13 -0
- package/dist/components/icons-v2/EditIcon.d.ts +12 -0
- package/dist/components/icons-v2/EmailIcon.d.ts +13 -0
- package/dist/components/icons-v2/EmojiNeutralIcon.d.ts +13 -0
- package/dist/components/icons-v2/EmojiSadIcon.d.ts +13 -0
- package/dist/components/icons-v2/EmojiSlightSmileyIcon.d.ts +13 -0
- package/dist/components/icons-v2/EmojiSmileyIcon.d.ts +13 -0
- package/dist/components/icons-v2/EmojiVerySadIcon.d.ts +13 -0
- package/dist/components/icons-v2/EraserIcon.d.ts +13 -0
- package/dist/components/icons-v2/EtShelfIcon.d.ts +13 -0
- package/dist/components/icons-v2/EtStandaloneIcon.d.ts +13 -0
- package/dist/components/icons-v2/ExternalLinkIcon.d.ts +13 -0
- package/dist/components/icons-v2/EyeSeeTokenIcon.d.ts +1 -0
- package/dist/components/icons-v2/FileExportIcon.d.ts +13 -0
- package/dist/components/icons-v2/FileIcon.d.ts +13 -0
- package/dist/components/icons-v2/FileImportIcon.d.ts +13 -0
- package/dist/components/icons-v2/FileNewIcon.d.ts +13 -0
- package/dist/components/icons-v2/FileRemoveIcon.d.ts +13 -0
- package/dist/components/icons-v2/FileTemplateIcon.d.ts +13 -0
- package/dist/components/icons-v2/FileUploadIcon.d.ts +13 -0
- package/dist/components/icons-v2/FilesIcon.d.ts +13 -0
- package/dist/components/icons-v2/FilterOffIcon.d.ts +13 -0
- package/dist/components/icons-v2/FilterOnIcon.d.ts +13 -0
- package/dist/components/icons-v2/FlagIcon.d.ts +13 -0
- package/dist/components/icons-v2/FolderIcon.d.ts +13 -0
- package/dist/components/icons-v2/FullscreenIcon.d.ts +13 -0
- package/dist/components/icons-v2/GridviewIcon.d.ts +13 -0
- package/dist/components/icons-v2/HelpIcon.d.ts +10 -0
- package/dist/components/icons-v2/HomeIcon.d.ts +13 -0
- package/dist/components/icons-v2/ImageIcon.d.ts +13 -0
- package/dist/components/icons-v2/ImageOffIcon.d.ts +13 -0
- package/dist/components/icons-v2/ImageStarIcon.d.ts +15 -0
- package/dist/components/icons-v2/ImageUploadIcon.d.ts +13 -0
- package/dist/components/icons-v2/InfoIcon.d.ts +13 -0
- package/dist/components/icons-v2/ItalicIcon.d.ts +13 -0
- package/dist/components/icons-v2/LanguageIcon.d.ts +13 -0
- package/dist/components/icons-v2/LaunchIcon.d.ts +13 -0
- package/dist/components/icons-v2/LayersIcon.d.ts +13 -0
- package/dist/components/icons-v2/LeftSidebarCollapseIcon.d.ts +13 -0
- package/dist/components/icons-v2/LeftSidebarExpandIcon.d.ts +13 -0
- package/dist/components/icons-v2/LightDarkIcon.d.ts +13 -0
- package/dist/components/icons-v2/LightbulbIcon.d.ts +13 -0
- package/dist/components/icons-v2/LikeIcon.d.ts +13 -0
- package/dist/components/icons-v2/LinkIcon.d.ts +13 -0
- package/dist/components/icons-v2/ListCheckIcon.d.ts +1 -0
- package/dist/components/icons-v2/ListViewIcon.d.ts +13 -0
- package/dist/components/icons-v2/LoaderIcon.d.ts +14 -0
- package/dist/components/icons-v2/LoadingIcon.d.ts +14 -0
- package/dist/components/icons-v2/LockIcon.d.ts +13 -0
- package/dist/components/icons-v2/LockOffIcon.d.ts +13 -0
- package/dist/components/icons-v2/LoginIcon.d.ts +13 -0
- package/dist/components/icons-v2/LogoutIcon.d.ts +13 -0
- package/dist/components/icons-v2/MagicwandIcon.d.ts +13 -0
- package/dist/components/icons-v2/MaximizeIcon.d.ts +13 -0
- package/dist/components/icons-v2/MenuIcon.d.ts +13 -0
- package/dist/components/icons-v2/MessageIcon.d.ts +13 -0
- package/dist/components/icons-v2/MeterIcon.d.ts +13 -0
- package/dist/components/icons-v2/MinimizeIcon.d.ts +13 -0
- package/dist/components/icons-v2/MinusIcon.d.ts +13 -0
- package/dist/components/icons-v2/MoreHorizontalIcon.d.ts +13 -0
- package/dist/components/icons-v2/MoreIcon.d.ts +13 -0
- package/dist/components/icons-v2/MouseIcon.d.ts +13 -0
- package/dist/components/icons-v2/MoveIcon.d.ts +13 -0
- package/dist/components/icons-v2/Multiplier05Icon.d.ts +13 -0
- package/dist/components/icons-v2/Multiplier10Icon.d.ts +13 -0
- package/dist/components/icons-v2/Multiplier15Icon.d.ts +13 -0
- package/dist/components/icons-v2/Multiplier20Icon.d.ts +13 -0
- package/dist/components/icons-v2/NoteIcon.d.ts +13 -0
- package/dist/components/icons-v2/NoteOffIcon.d.ts +13 -0
- package/dist/components/icons-v2/NotifyIcon.d.ts +13 -0
- package/dist/components/icons-v2/PackAIIcon.d.ts +13 -0
- package/dist/components/icons-v2/PackseeIcon.d.ts +1 -0
- package/dist/components/icons-v2/PaperclipIcon.d.ts +13 -0
- package/dist/components/icons-v2/PauseIcon.d.ts +13 -0
- package/dist/components/icons-v2/PdfIcon.d.ts +13 -0
- package/dist/components/icons-v2/PentoolIcon.d.ts +13 -0
- package/dist/components/icons-v2/PiechartIcon.d.ts +13 -0
- package/dist/components/icons-v2/PinIcon.d.ts +13 -0
- package/dist/components/icons-v2/PinskewedIcon.d.ts +13 -0
- package/dist/components/icons-v2/PlayIcon.d.ts +13 -0
- package/dist/components/icons-v2/PlusIcon.d.ts +12 -0
- package/dist/components/icons-v2/PredictiveETIcon.d.ts +13 -0
- package/dist/components/icons-v2/RectanglesAddIcon.d.ts +1 -0
- package/dist/components/icons-v2/RedoIcon.d.ts +13 -0
- package/dist/components/icons-v2/RefreshAlertIcon.d.ts +13 -0
- package/dist/components/icons-v2/RefreshIcon.d.ts +13 -0
- package/dist/components/icons-v2/ReplaceIcon.d.ts +13 -0
- package/dist/components/icons-v2/ReplyIcon.d.ts +13 -0
- package/dist/components/icons-v2/SaveIcon.d.ts +12 -0
- package/dist/components/icons-v2/ScalesIcon.d.ts +13 -0
- package/dist/components/icons-v2/SearchIcon.d.ts +13 -0
- package/dist/components/icons-v2/SendIcon.d.ts +13 -0
- package/dist/components/icons-v2/SettingsIcon.d.ts +13 -0
- package/dist/components/icons-v2/ShareIcon.d.ts +13 -0
- package/dist/components/icons-v2/ShelfAddIcon.d.ts +13 -0
- package/dist/components/icons-v2/ShelfIcon.d.ts +13 -0
- package/dist/components/icons-v2/ShelfInfoIcon.d.ts +13 -0
- package/dist/components/icons-v2/ShoppingIcon.d.ts +13 -0
- package/dist/components/icons-v2/SlideshowIcon.d.ts +13 -0
- package/dist/components/icons-v2/SocialFacebookIcon.d.ts +13 -0
- package/dist/components/icons-v2/SocialInstagramIcon.d.ts +13 -0
- package/dist/components/icons-v2/SocialSnapchatIcon.d.ts +13 -0
- package/dist/components/icons-v2/SocialTiktok2Icon.d.ts +13 -0
- package/dist/components/icons-v2/SocialTiktokIcon.d.ts +13 -0
- package/dist/components/icons-v2/SocialXIcon.d.ts +13 -0
- package/dist/components/icons-v2/SocialYoutubeIcon.d.ts +13 -0
- package/dist/components/icons-v2/SortHorizontalIcon.d.ts +13 -0
- package/dist/components/icons-v2/SquareAddIcon.d.ts +1 -0
- package/dist/components/icons-v2/StarIcon.d.ts +20 -0
- package/dist/components/icons-v2/StopIcon.d.ts +11 -0
- package/dist/components/icons-v2/SurveyIcon.d.ts +13 -0
- package/dist/components/icons-v2/TableExportIcon.d.ts +13 -0
- package/dist/components/icons-v2/TableIcon.d.ts +13 -0
- package/dist/components/icons-v2/TableOptionsIcon.d.ts +13 -0
- package/dist/components/icons-v2/TagIcon.d.ts +13 -0
- package/dist/components/icons-v2/TargetArrowIcon.d.ts +13 -0
- package/dist/components/icons-v2/TargetIcon.d.ts +13 -0
- package/dist/components/icons-v2/TextRecognitionIcon.d.ts +13 -0
- package/dist/components/icons-v2/TriangleFlagIcon.d.ts +13 -0
- package/dist/components/icons-v2/TrophyIcon.d.ts +13 -0
- package/dist/components/icons-v2/UnderlineIcon.d.ts +13 -0
- package/dist/components/icons-v2/UndoIcon.d.ts +13 -0
- package/dist/components/icons-v2/UnitBuyRateIcon.d.ts +13 -0
- package/dist/components/icons-v2/UploadIcon.d.ts +13 -0
- package/dist/components/icons-v2/UserGroupIcon.d.ts +13 -0
- package/dist/components/icons-v2/UserIcon.d.ts +13 -0
- package/dist/components/icons-v2/UsersIcon.d.ts +13 -0
- package/dist/components/icons-v2/ValueBuyRateIcon.d.ts +13 -0
- package/dist/components/icons-v2/VideoIcon.d.ts +13 -0
- package/dist/components/icons-v2/ViewOffIcon.d.ts +13 -0
- package/dist/components/icons-v2/ViewOnIcon.d.ts +13 -0
- package/dist/components/icons-v2/VolumeOffIcon.d.ts +13 -0
- package/dist/components/icons-v2/VolumeOnIcon.d.ts +13 -0
- package/dist/components/icons-v2/WebIcon.d.ts +13 -0
- package/dist/components/icons-v2/XIcon.d.ts +13 -0
- package/dist/components/icons-v2/ZipFileIcon.d.ts +13 -0
- package/dist/components/icons-v2/ZonePercentageIcon.d.ts +1 -0
- package/dist/components/icons-v2/ZoomInIcon.d.ts +1 -0
- package/dist/components/icons-v2/ZoomOutIcon.d.ts +1 -0
- package/dist/components/icons-v2/constants.d.ts +61 -0
- package/dist/components/icons-v2/createIcon.d.ts +45 -0
- package/dist/components/icons-v2/index.d.ts +209 -0
- package/dist/components/icons-v2/index.js +376 -374
- package/dist/components/index.d.ts +30 -0
- package/dist/hooks/useClickOutside.d.ts +2 -0
- package/dist/hooks/useEscapeKey.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +17 -4
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Combobox select built on {@link InputFieldContent} with optional multi-select, tags, and search.
|
|
3
|
+
*
|
|
4
|
+
* ## Props
|
|
5
|
+
*
|
|
6
|
+
* **label** `string` — no default
|
|
7
|
+
* Field label.
|
|
8
|
+
*
|
|
9
|
+
* **infoText** `string` — no default
|
|
10
|
+
* Helper text below the field. Overridden by `error.message`.
|
|
11
|
+
*
|
|
12
|
+
* **status** `'default' | 'error'` — default `'default'`
|
|
13
|
+
* Validation shell state.
|
|
14
|
+
*
|
|
15
|
+
* **disabled** `boolean` — default `false`
|
|
16
|
+
* Disables the field.
|
|
17
|
+
*
|
|
18
|
+
* **required** `boolean` — default `false`
|
|
19
|
+
* Shows required mark when `label` is set.
|
|
20
|
+
*
|
|
21
|
+
* **id** `string` — no default
|
|
22
|
+
* Combobox `id`. Auto-generated when omitted.
|
|
23
|
+
*
|
|
24
|
+
* **name** `string` — no default
|
|
25
|
+
* Field `name`. Also used as RHF field name with `control`.
|
|
26
|
+
*
|
|
27
|
+
* **value** `string | string[] | number | number[]` — no default
|
|
28
|
+
* Controlled value. String/number for single; array for multi.
|
|
29
|
+
*
|
|
30
|
+
* **defaultValue** `string | string[] | number | number[] | SelectFieldOption` — no default
|
|
31
|
+
* Uncontrolled initial value.
|
|
32
|
+
*
|
|
33
|
+
* **placeholder** `string` — default `'Select'`
|
|
34
|
+
* Placeholder when nothing is selected.
|
|
35
|
+
*
|
|
36
|
+
* **onChange** `(value: string | string[] | number | number[]) => void` — default `() => {}`
|
|
37
|
+
* Fired with the selected value (not a DOM event).
|
|
38
|
+
*
|
|
39
|
+
* **onBlur** `(event: FocusEvent<HTMLInputElement>) => void` — no default
|
|
40
|
+
* Blur handler forwarded to the combobox input.
|
|
41
|
+
*
|
|
42
|
+
* **options** `SelectFieldOption[] | SelectFieldSection[] | object` — default `[]`
|
|
43
|
+
* Flat list, section array, or section object map.
|
|
44
|
+
* - `value` `string | number` — required. Option value.
|
|
45
|
+
* - `label` `string` — required. Row text.
|
|
46
|
+
* - `disabled` `boolean` — default `false`
|
|
47
|
+
* - `infoTooltip` `string` — optional. Used when `listItemType` is `'info'`.
|
|
48
|
+
*
|
|
49
|
+
* **size** `'lg' | 'md' | 'sm' | 'xs'` — default `'lg'`
|
|
50
|
+
* Field height.
|
|
51
|
+
*
|
|
52
|
+
* **startIcon** `ReactNode` — no default
|
|
53
|
+
* Leading icon inside the field.
|
|
54
|
+
*
|
|
55
|
+
* **onEndIconClick** `() => void` — no default
|
|
56
|
+
* Overrides default chevron toggle when set.
|
|
57
|
+
*
|
|
58
|
+
* **multiSelect** `boolean` — default `false`
|
|
59
|
+
* Multiple selection.
|
|
60
|
+
*
|
|
61
|
+
* **tags** `boolean` — default `false`
|
|
62
|
+
* Tag badges in the field; implies multi-select and search.
|
|
63
|
+
*
|
|
64
|
+
* **tagsWrap** `boolean` — default `false`
|
|
65
|
+
* Wrap tags to two rows.
|
|
66
|
+
*
|
|
67
|
+
* **search** `boolean` — default `false`
|
|
68
|
+
* Search input in the dropdown.
|
|
69
|
+
*
|
|
70
|
+
* **onSearchChange** `(query: string) => void` — default `() => {}`
|
|
71
|
+
* Fired when the dropdown search query changes.
|
|
72
|
+
*
|
|
73
|
+
* **onLoadMore** `() => void` — no default
|
|
74
|
+
* Infinite scroll callback on {@link DropdownList}.
|
|
75
|
+
*
|
|
76
|
+
* **optionsLoading** `boolean` — default `false`
|
|
77
|
+
* Shows loading spinner instead of options.
|
|
78
|
+
*
|
|
79
|
+
* **selectAllLabel** `string | null` — default `null`
|
|
80
|
+
* Multi-select only: checkbox row label.
|
|
81
|
+
*
|
|
82
|
+
* **listItemType** `'checkbox' | 'info' | null` — default `null`
|
|
83
|
+
* Row rendering mode. Default `null` (radio for single, checkbox for multi/tags).
|
|
84
|
+
*
|
|
85
|
+
* **dir** `'down' | 'up'` — default `'down'`
|
|
86
|
+
* Preferred dropdown direction.
|
|
87
|
+
*
|
|
88
|
+
* **dropdownMaxHeight** `string` — no default
|
|
89
|
+
* Max height CSS value for the dropdown list.
|
|
90
|
+
*
|
|
91
|
+
* **control** `object` — no default
|
|
92
|
+
* react-hook-form `control`. With `name`, wires via `useController`.
|
|
93
|
+
*
|
|
94
|
+
* **rules** `object` — no default
|
|
95
|
+
* RHF validation rules.
|
|
96
|
+
*
|
|
97
|
+
* **error** `object` — no default
|
|
98
|
+
* RHF field error (`error.message` → info text and error status).
|
|
99
|
+
*
|
|
100
|
+
* **inputRef** `Ref` — no default
|
|
101
|
+
* Ref forwarded to the combobox input.
|
|
102
|
+
*
|
|
103
|
+
* **aria-label** `string` — default `'select field'` when no `label`
|
|
104
|
+
* Accessible name when `label` is omitted.
|
|
105
|
+
*
|
|
106
|
+
* @param {SelectFieldProps} props
|
|
107
|
+
* @returns {import('react').ReactElement}
|
|
108
|
+
*
|
|
109
|
+
* @example <caption>Default</caption>
|
|
110
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
111
|
+
*
|
|
112
|
+
* <SelectField
|
|
113
|
+
* label="Country"
|
|
114
|
+
* infoText="Pick one"
|
|
115
|
+
* placeholder="Select a country"
|
|
116
|
+
* options={[
|
|
117
|
+
* { value: 'nl', label: 'Netherlands' },
|
|
118
|
+
* { value: 'de', label: 'Germany' },
|
|
119
|
+
* { value: 'fr', label: 'France' },
|
|
120
|
+
* ]}
|
|
121
|
+
* />
|
|
122
|
+
*
|
|
123
|
+
* @example <caption>Error</caption>
|
|
124
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
125
|
+
*
|
|
126
|
+
* <SelectField
|
|
127
|
+
* label="Country"
|
|
128
|
+
* infoText="This field is required"
|
|
129
|
+
* status="error"
|
|
130
|
+
* placeholder="Select a country"
|
|
131
|
+
* options={[
|
|
132
|
+
* { value: 'nl', label: 'Netherlands' },
|
|
133
|
+
* { value: 'de', label: 'Germany' },
|
|
134
|
+
* ]}
|
|
135
|
+
* />
|
|
136
|
+
*
|
|
137
|
+
* @example <caption>Disabled</caption>
|
|
138
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
139
|
+
*
|
|
140
|
+
* <SelectField label="Country" disabled placeholder="Select a country" options={[]} />
|
|
141
|
+
*
|
|
142
|
+
* @example <caption>Multi-select + search</caption>
|
|
143
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
144
|
+
*
|
|
145
|
+
* <SelectField
|
|
146
|
+
* label="Markets"
|
|
147
|
+
* placeholder="Select markets"
|
|
148
|
+
* value={['nl', 'de']}
|
|
149
|
+
* multiSelect
|
|
150
|
+
* search
|
|
151
|
+
* options={[
|
|
152
|
+
* { value: 'nl', label: 'Netherlands' },
|
|
153
|
+
* { value: 'de', label: 'Germany' },
|
|
154
|
+
* { value: 'fr', label: 'France' },
|
|
155
|
+
* ]}
|
|
156
|
+
* />
|
|
157
|
+
*
|
|
158
|
+
* @example <caption>Tags</caption>
|
|
159
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
160
|
+
*
|
|
161
|
+
* <SelectField
|
|
162
|
+
* label="Tags mode"
|
|
163
|
+
* placeholder="Select tags"
|
|
164
|
+
* value={['nl', 'de', 'fr']}
|
|
165
|
+
* multiSelect
|
|
166
|
+
* tags
|
|
167
|
+
* selectAllLabel="Select all"
|
|
168
|
+
* options={[
|
|
169
|
+
* { value: 'nl', label: 'Netherlands' },
|
|
170
|
+
* { value: 'de', label: 'Germany' },
|
|
171
|
+
* { value: 'fr', label: 'France' },
|
|
172
|
+
* ]}
|
|
173
|
+
* />
|
|
174
|
+
*
|
|
175
|
+
* @example <caption>Tags (wrap 2 rows)</caption>
|
|
176
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
177
|
+
*
|
|
178
|
+
* <SelectField
|
|
179
|
+
* label="Tags wrap"
|
|
180
|
+
* placeholder="Select tags"
|
|
181
|
+
* value={['nl', 'de', 'fr', 'be']}
|
|
182
|
+
* multiSelect
|
|
183
|
+
* tags
|
|
184
|
+
* tagsWrap
|
|
185
|
+
* selectAllLabel="Select all"
|
|
186
|
+
* options={[
|
|
187
|
+
* { value: 'nl', label: 'Netherlands' },
|
|
188
|
+
* { value: 'de', label: 'Germany' },
|
|
189
|
+
* { value: 'fr', label: 'France' },
|
|
190
|
+
* { value: 'be', label: 'Belgium' },
|
|
191
|
+
* ]}
|
|
192
|
+
* />
|
|
193
|
+
*
|
|
194
|
+
* @example <caption>Sections</caption>
|
|
195
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
196
|
+
*
|
|
197
|
+
* <SelectField
|
|
198
|
+
* label="Sectioned select"
|
|
199
|
+
* search
|
|
200
|
+
* options={[
|
|
201
|
+
* {
|
|
202
|
+
* sectionTitle: 'Europe',
|
|
203
|
+
* options: [
|
|
204
|
+
* { value: 'nl', label: 'Netherlands' },
|
|
205
|
+
* { value: 'de', label: 'Germany' },
|
|
206
|
+
* ],
|
|
207
|
+
* },
|
|
208
|
+
* {
|
|
209
|
+
* sectionTitle: 'Americas',
|
|
210
|
+
* options: [{ value: 'us', label: 'United States' }],
|
|
211
|
+
* },
|
|
212
|
+
* ]}
|
|
213
|
+
* />
|
|
214
|
+
*
|
|
215
|
+
* @example <caption>Loading</caption>
|
|
216
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
217
|
+
*
|
|
218
|
+
* <SelectField label="Loading options" search optionsLoading options={[]} />
|
|
219
|
+
*
|
|
220
|
+
* @example <caption>Search with load more</caption>
|
|
221
|
+
* import { SelectField } from '@eyesee/ui-components';
|
|
222
|
+
*
|
|
223
|
+
* <SelectField
|
|
224
|
+
* label="Options"
|
|
225
|
+
* placeholder="Select an option"
|
|
226
|
+
* search
|
|
227
|
+
* dropdownMaxHeight="220px"
|
|
228
|
+
* options={[
|
|
229
|
+
* { value: 1, label: 'Option 1' },
|
|
230
|
+
* { value: 2, label: 'Option 2' },
|
|
231
|
+
* { value: 3, label: 'Option 3' },
|
|
232
|
+
* ]}
|
|
233
|
+
* />
|
|
234
|
+
*/
|
|
235
|
+
export function SelectField(props: SelectFieldProps): import("react").ReactElement;
|
|
236
|
+
export type SelectFieldChangeHandler = (value: string | string[] | number | number[]) => void;
|
|
237
|
+
export type SelectFieldSearchChangeHandler = (query: string) => void;
|
|
238
|
+
export type SelectFieldLoadMoreHandler = () => void;
|
|
239
|
+
export type SelectFieldEndIconClickHandler = () => void;
|
|
240
|
+
export type SelectFieldBlurHandler = (event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
241
|
+
/**
|
|
242
|
+
* Flat dropdown option.
|
|
243
|
+
*/
|
|
244
|
+
export type SelectFieldOption = {
|
|
245
|
+
/**
|
|
246
|
+
* - Option value.
|
|
247
|
+
*/
|
|
248
|
+
value: string | number;
|
|
249
|
+
/**
|
|
250
|
+
* - Row text.
|
|
251
|
+
*/
|
|
252
|
+
label: string;
|
|
253
|
+
/**
|
|
254
|
+
* Disables the row. Default `false`.
|
|
255
|
+
*/
|
|
256
|
+
disabled?: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* Tooltip content when `listItemType` is `'info'`.
|
|
259
|
+
*/
|
|
260
|
+
infoTooltip?: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Section grouping for dropdown options.
|
|
264
|
+
*/
|
|
265
|
+
export type SelectFieldSection = {
|
|
266
|
+
/**
|
|
267
|
+
* - Section heading.
|
|
268
|
+
*/
|
|
269
|
+
sectionTitle: string;
|
|
270
|
+
/**
|
|
271
|
+
* - Options in this section.
|
|
272
|
+
*/
|
|
273
|
+
options: SelectFieldOption[];
|
|
274
|
+
};
|
|
275
|
+
export type SelectFieldProps = {
|
|
276
|
+
/**
|
|
277
|
+
* Field label.
|
|
278
|
+
*/
|
|
279
|
+
label?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Helper text below the field. Overridden by `error.message`.
|
|
282
|
+
*/
|
|
283
|
+
infoText?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Validation shell state. Default `'default'`.
|
|
286
|
+
*/
|
|
287
|
+
status?: "default" | "error";
|
|
288
|
+
/**
|
|
289
|
+
* Disables the field. Default `false`.
|
|
290
|
+
*/
|
|
291
|
+
disabled?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Shows required mark when `label` is set. Default `false`.
|
|
294
|
+
*/
|
|
295
|
+
required?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Combobox `id`. Auto-generated when omitted.
|
|
298
|
+
*/
|
|
299
|
+
id?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Field `name`. Also used as RHF field name with `control`.
|
|
302
|
+
*/
|
|
303
|
+
name?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Controlled value. String/number for single; array for multi.
|
|
306
|
+
*/
|
|
307
|
+
value?: string | string[] | number | number[];
|
|
308
|
+
/**
|
|
309
|
+
* Uncontrolled initial value. Option object uses its `value`/`label`.
|
|
310
|
+
*/
|
|
311
|
+
defaultValue?: string | string[] | number | number[] | SelectFieldOption;
|
|
312
|
+
/**
|
|
313
|
+
* Placeholder when nothing is selected. Default `'Select'`.
|
|
314
|
+
*/
|
|
315
|
+
placeholder?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Fired with the selected value (not a DOM event). Default `() => {}`.
|
|
318
|
+
*/
|
|
319
|
+
onChange?: SelectFieldChangeHandler;
|
|
320
|
+
/**
|
|
321
|
+
* Blur handler forwarded to the combobox input.
|
|
322
|
+
*/
|
|
323
|
+
onBlur?: SelectFieldBlurHandler;
|
|
324
|
+
/**
|
|
325
|
+
* Flat list, section array, or section object map. Default `[]`.
|
|
326
|
+
*/
|
|
327
|
+
options?: SelectFieldOption[] | SelectFieldSection[] | object;
|
|
328
|
+
/**
|
|
329
|
+
* Field height. Default `'lg'`.
|
|
330
|
+
*/
|
|
331
|
+
size?: "lg" | "md" | "sm" | "xs";
|
|
332
|
+
/**
|
|
333
|
+
* Leading icon inside the field.
|
|
334
|
+
*/
|
|
335
|
+
startIcon?: React.ReactNode;
|
|
336
|
+
/**
|
|
337
|
+
* Overrides default chevron toggle when set.
|
|
338
|
+
*/
|
|
339
|
+
onEndIconClick?: SelectFieldEndIconClickHandler;
|
|
340
|
+
/**
|
|
341
|
+
* Multiple selection. Default `false`.
|
|
342
|
+
*/
|
|
343
|
+
multiSelect?: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Tag badges in the field; implies multi-select and search. Default `false`.
|
|
346
|
+
*/
|
|
347
|
+
tags?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* Wrap tags to two rows. Default `false`.
|
|
350
|
+
*/
|
|
351
|
+
tagsWrap?: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Search input in the dropdown. Default `false`.
|
|
354
|
+
*/
|
|
355
|
+
search?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Fired when the dropdown search query changes. Default `() => {}`.
|
|
358
|
+
*/
|
|
359
|
+
onSearchChange?: SelectFieldSearchChangeHandler;
|
|
360
|
+
/**
|
|
361
|
+
* Infinite scroll callback on {@link DropdownList}.
|
|
362
|
+
*/
|
|
363
|
+
onLoadMore?: SelectFieldLoadMoreHandler;
|
|
364
|
+
/**
|
|
365
|
+
* Shows loading spinner instead of options. Default `false`.
|
|
366
|
+
*/
|
|
367
|
+
optionsLoading?: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Multi-select only: checkbox row label. Default `null`.
|
|
370
|
+
*/
|
|
371
|
+
selectAllLabel?: string | null;
|
|
372
|
+
/**
|
|
373
|
+
* Row rendering mode. Default `null` (radio for single, checkbox for multi/tags).
|
|
374
|
+
*/
|
|
375
|
+
listItemType?: "checkbox" | "info" | null;
|
|
376
|
+
/**
|
|
377
|
+
* Preferred dropdown direction. Default `'down'`.
|
|
378
|
+
*/
|
|
379
|
+
dir?: "down" | "up";
|
|
380
|
+
/**
|
|
381
|
+
* Max height CSS value for the dropdown list.
|
|
382
|
+
*/
|
|
383
|
+
dropdownMaxHeight?: string;
|
|
384
|
+
/**
|
|
385
|
+
* react-hook-form `control`. With `name`, wires via `useController`.
|
|
386
|
+
*/
|
|
387
|
+
control?: object;
|
|
388
|
+
/**
|
|
389
|
+
* RHF validation rules.
|
|
390
|
+
*/
|
|
391
|
+
rules?: object;
|
|
392
|
+
/**
|
|
393
|
+
* RHF field error (`error.message` → info text and error status).
|
|
394
|
+
*/
|
|
395
|
+
error?: object;
|
|
396
|
+
/**
|
|
397
|
+
* Ref forwarded to the combobox input.
|
|
398
|
+
*/
|
|
399
|
+
inputRef?: any;
|
|
400
|
+
/**
|
|
401
|
+
* Accessible name when `label` is omitted. Default `'select field'`.
|
|
402
|
+
*/
|
|
403
|
+
"aria-label"?: string;
|
|
404
|
+
};
|
|
@@ -7,40 +7,40 @@ import { InputFieldContent as J } from "../InputField/InputField.js";
|
|
|
7
7
|
import { ChevronDownIcon as Te } from "../../icons-v2/ChevronDownIcon.js";
|
|
8
8
|
import { ChevronUpIcon as be } from "../../icons-v2/ChevronUpIcon.js";
|
|
9
9
|
import { LoadingIcon as De } from "../../icons-v2/LoadingIcon.js";
|
|
10
|
-
import { SearchIcon as
|
|
11
|
-
import { DropdownList as
|
|
12
|
-
import { ExpandableItem as
|
|
13
|
-
import { renderOptionRow as
|
|
10
|
+
import { SearchIcon as Fe } from "../../icons-v2/SearchIcon.js";
|
|
11
|
+
import { DropdownList as Ee } from "../../DropdownList/DropdownList.js";
|
|
12
|
+
import { ExpandableItem as Re } from "../../ExpandableItem/ExpandableItem.js";
|
|
13
|
+
import { renderOptionRow as Ce } from "./selectOptionRow.js";
|
|
14
14
|
import { SelectFieldTags as ke } from "./SelectFieldTags.js";
|
|
15
15
|
import { useSelectFieldDropdownPosition as Be } from "./useSelectFieldDropdownPosition.js";
|
|
16
16
|
import { normalizeSelectOptions as Le, getEffectiveSelectValue as Ae, getSelectedOptions as Ve, getSelectFieldDisplayValue as $e, filterOptionsByQuery as Y, toArrayValue as X, emitSelectChange as Me, filterSectionsByQuery as We, getNextToggleAllValues as ze, getResolvedListItemType as Ke, isOptionSelected as Ne, areAllOptionsSelected as je } from "./selectUtils.js";
|
|
17
|
-
const Qe = ({ isOpen:
|
|
18
|
-
withSections:
|
|
17
|
+
const Qe = ({ isOpen: i }) => i ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(Te, {}), He = ({
|
|
18
|
+
withSections: i,
|
|
19
19
|
sections: f,
|
|
20
20
|
flatOptionList: c,
|
|
21
|
-
searchValue:
|
|
21
|
+
searchValue: l,
|
|
22
22
|
listItemType: k,
|
|
23
|
-
value:
|
|
23
|
+
value: r,
|
|
24
24
|
selectAllLabel: I,
|
|
25
25
|
onSelectOption: B,
|
|
26
26
|
onToggleAll: w
|
|
27
27
|
}) => {
|
|
28
28
|
const p = h(
|
|
29
|
-
() => We(f,
|
|
30
|
-
[f,
|
|
29
|
+
() => We(f, l),
|
|
30
|
+
[f, l]
|
|
31
31
|
), O = h(
|
|
32
|
-
() => Y(c,
|
|
33
|
-
[c,
|
|
34
|
-
), L = (o) => Ne(
|
|
32
|
+
() => Y(c, l),
|
|
33
|
+
[c, l]
|
|
34
|
+
), L = (o) => Ne(r, o), y = (o, a = k, T = L, m = !1) => Ce(o, a, T, B, w, m);
|
|
35
35
|
return /* @__PURE__ */ H(ye, { children: [
|
|
36
36
|
I ? y(
|
|
37
37
|
{ label: I },
|
|
38
38
|
"checkbox",
|
|
39
|
-
() => je(
|
|
39
|
+
() => je(r, c),
|
|
40
40
|
!0
|
|
41
41
|
) : null,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
i ? p.map((o) => /* @__PURE__ */ n(
|
|
43
|
+
Re,
|
|
44
44
|
{
|
|
45
45
|
title: o.sectionTitle,
|
|
46
46
|
defaultOpen: !0,
|
|
@@ -50,13 +50,14 @@ const Qe = ({ isOpen: s }) => s ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(
|
|
|
50
50
|
o.sectionTitle
|
|
51
51
|
)) : O.map((o) => /* @__PURE__ */ n("div", { children: y(o) }, String(o.value)))
|
|
52
52
|
] });
|
|
53
|
-
}
|
|
54
|
-
|
|
53
|
+
};
|
|
54
|
+
function Pe({
|
|
55
|
+
id: i,
|
|
55
56
|
name: f,
|
|
56
57
|
value: c,
|
|
57
|
-
defaultValue:
|
|
58
|
+
defaultValue: l,
|
|
58
59
|
placeholder: k = "Select",
|
|
59
|
-
disabled:
|
|
60
|
+
disabled: r = !1,
|
|
60
61
|
onChange: I = () => {
|
|
61
62
|
},
|
|
62
63
|
ariaLabel: B,
|
|
@@ -79,29 +80,29 @@ const Qe = ({ isOpen: s }) => s ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(
|
|
|
79
80
|
listItemType: ne = null,
|
|
80
81
|
dir: P = "down",
|
|
81
82
|
dropdownMaxHeight: ie
|
|
82
|
-
})
|
|
83
|
+
}) {
|
|
83
84
|
const u = !!(T || m), re = !!(_ || m), le = !!(m && u), se = Ke({
|
|
84
85
|
multiSelect: T,
|
|
85
86
|
tags: m,
|
|
86
87
|
listItemType: ne
|
|
87
|
-
}), [g, V] = j(!1), [b, D] = j(""),
|
|
88
|
+
}), [g, V] = j(!1), [b, D] = j(""), F = G(null), $ = G(null), E = i ? `${i}-listbox` : void 0, [v, ce] = j(!1);
|
|
88
89
|
xe(() => {
|
|
89
90
|
var e;
|
|
90
|
-
ce(!!((e =
|
|
91
|
+
ce(!!((e = F.current) != null && e.closest("#modal")));
|
|
91
92
|
}, []);
|
|
92
|
-
const
|
|
93
|
+
const s = Be({
|
|
93
94
|
open: g,
|
|
94
|
-
anchorRef:
|
|
95
|
+
anchorRef: F,
|
|
95
96
|
dropdownRef: $,
|
|
96
97
|
dir: P,
|
|
97
98
|
fixed: v
|
|
98
|
-
}), ae = (
|
|
99
|
+
}), ae = (s == null ? void 0 : s.resolvedDir) ?? P;
|
|
99
100
|
Ie(() => {
|
|
100
101
|
if (!g) return () => {
|
|
101
102
|
};
|
|
102
103
|
const e = (t) => {
|
|
103
104
|
var x, K;
|
|
104
|
-
(x =
|
|
105
|
+
(x = F.current) != null && x.contains(t.target) || v && ((K = $.current) != null && K.contains(t.target)) || (V(!1), D(""));
|
|
105
106
|
};
|
|
106
107
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
107
108
|
}, [g, v]);
|
|
@@ -110,34 +111,34 @@ const Qe = ({ isOpen: s }) => s ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(
|
|
|
110
111
|
sections: fe,
|
|
111
112
|
options: d
|
|
112
113
|
} = h(() => Le(O), [O]), S = h(
|
|
113
|
-
() => Ae(c,
|
|
114
|
-
[c,
|
|
114
|
+
() => Ae(c, l),
|
|
115
|
+
[c, l]
|
|
115
116
|
), U = h(
|
|
116
117
|
() => Ve(S, d),
|
|
117
118
|
[S, d]
|
|
118
|
-
), pe = $e(c,
|
|
119
|
+
), pe = $e(c, l, d), me = h(
|
|
119
120
|
() => Y(d, b),
|
|
120
121
|
[d, b]
|
|
121
122
|
), M = (e) => {
|
|
122
123
|
const t = u ? e : e[0] ?? "";
|
|
123
124
|
Me(I, t);
|
|
124
125
|
}, q = (e) => {
|
|
125
|
-
const t = X(S),
|
|
126
|
+
const t = X(S), C = t.map((N) => String(N)), x = String(e), he = C.includes(x) ? t.filter((N) => String(N) !== x) : [...t, e];
|
|
126
127
|
M(u ? he : [e]), u || (V(!1), D(""));
|
|
127
128
|
}, ue = (e) => {
|
|
128
|
-
if (
|
|
129
|
-
const t = X(S).filter((
|
|
129
|
+
if (r) return;
|
|
130
|
+
const t = X(S).filter((C) => String(C) !== String(e));
|
|
130
131
|
M(t);
|
|
131
132
|
}, ge = le && U.length > 0 ? /* @__PURE__ */ n(
|
|
132
133
|
ke,
|
|
133
134
|
{
|
|
134
135
|
options: U,
|
|
135
136
|
wrap: Z,
|
|
136
|
-
disabled:
|
|
137
|
+
disabled: r,
|
|
137
138
|
onRemove: ue
|
|
138
139
|
}
|
|
139
|
-
) : null,
|
|
140
|
-
|
|
140
|
+
) : null, R = () => {
|
|
141
|
+
r || (V((e) => !e), D(""));
|
|
141
142
|
}, ve = () => {
|
|
142
143
|
u && M(ze(S, d));
|
|
143
144
|
}, Se = () => {
|
|
@@ -145,21 +146,21 @@ const Qe = ({ isOpen: s }) => s ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(
|
|
|
145
146
|
o();
|
|
146
147
|
return;
|
|
147
148
|
}
|
|
148
|
-
|
|
149
|
+
R();
|
|
149
150
|
};
|
|
150
151
|
let W;
|
|
151
|
-
v &&
|
|
152
|
+
v && s ? W = {
|
|
152
153
|
position: "fixed",
|
|
153
154
|
zIndex: 9999,
|
|
154
|
-
top:
|
|
155
|
-
bottom:
|
|
156
|
-
left:
|
|
157
|
-
minWidth:
|
|
155
|
+
top: s.top,
|
|
156
|
+
bottom: s.bottom,
|
|
157
|
+
left: s.left,
|
|
158
|
+
minWidth: s.minWidth
|
|
158
159
|
} : v && (W = { position: "fixed", visibility: "hidden" });
|
|
159
160
|
const z = g ? /* @__PURE__ */ H(
|
|
160
|
-
|
|
161
|
+
Ee,
|
|
161
162
|
{
|
|
162
|
-
id:
|
|
163
|
+
id: E,
|
|
163
164
|
listRef: $,
|
|
164
165
|
dir: ae,
|
|
165
166
|
maxHeight: ie,
|
|
@@ -169,18 +170,18 @@ const Qe = ({ isOpen: s }) => s ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(
|
|
|
169
170
|
re ? /* @__PURE__ */ n("div", { className: Q.search, onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ n(
|
|
170
171
|
J,
|
|
171
172
|
{
|
|
172
|
-
id:
|
|
173
|
+
id: E ? `${E}-search` : void 0,
|
|
173
174
|
name: f ? `${f}-search` : void 0,
|
|
174
175
|
value: b,
|
|
175
176
|
placeholder: "Search",
|
|
176
|
-
disabled:
|
|
177
|
+
disabled: r,
|
|
177
178
|
ariaLabel: "Search options",
|
|
178
179
|
size: "sm",
|
|
179
180
|
onChange: (e) => {
|
|
180
181
|
D(e.target.value), A == null || A(e.target.value);
|
|
181
182
|
},
|
|
182
183
|
containerFieldClassName: a,
|
|
183
|
-
startIcon: /* @__PURE__ */ n(
|
|
184
|
+
startIcon: /* @__PURE__ */ n(Fe, {}),
|
|
184
185
|
inputProps: {
|
|
185
186
|
onKeyDown: (e) => {
|
|
186
187
|
if (e.key !== "Enter") return;
|
|
@@ -207,22 +208,22 @@ const Qe = ({ isOpen: s }) => s ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(
|
|
|
207
208
|
]
|
|
208
209
|
}
|
|
209
210
|
) : null;
|
|
210
|
-
return /* @__PURE__ */ H("div", { className: Q.wrapper, ref:
|
|
211
|
+
return /* @__PURE__ */ H("div", { className: Q.wrapper, ref: F, children: [
|
|
211
212
|
/* @__PURE__ */ n(
|
|
212
213
|
J,
|
|
213
214
|
{
|
|
214
|
-
id:
|
|
215
|
+
id: i,
|
|
215
216
|
name: f,
|
|
216
217
|
value: pe,
|
|
217
218
|
placeholder: k,
|
|
218
|
-
disabled:
|
|
219
|
+
disabled: r,
|
|
219
220
|
onChange: () => {
|
|
220
221
|
},
|
|
221
222
|
startIcon: y,
|
|
222
223
|
endIcon: Qe({ isOpen: g }),
|
|
223
224
|
onEndIconClick: Se,
|
|
224
|
-
onFieldClick:
|
|
225
|
-
onEnter:
|
|
225
|
+
onFieldClick: R,
|
|
226
|
+
onEnter: R,
|
|
226
227
|
size: L,
|
|
227
228
|
ariaLabel: B ?? (w ? void 0 : "select field"),
|
|
228
229
|
label: w,
|
|
@@ -231,20 +232,24 @@ const Qe = ({ isOpen: s }) => s ? /* @__PURE__ */ n(be, {}) : /* @__PURE__ */ n(
|
|
|
231
232
|
inputProps: {
|
|
232
233
|
readOnly: !0,
|
|
233
234
|
role: "combobox",
|
|
234
|
-
"aria-controls":
|
|
235
|
+
"aria-controls": E,
|
|
235
236
|
"aria-expanded": g,
|
|
236
237
|
"aria-haspopup": "listbox",
|
|
237
238
|
...p,
|
|
238
239
|
onKeyDown: (e) => {
|
|
239
240
|
var t;
|
|
240
|
-
e.key === " " && !
|
|
241
|
+
e.key === " " && !r && (e.preventDefault(), R()), (t = p.onKeyDown) == null || t.call(p, e);
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
245
|
),
|
|
245
246
|
z && (v ? we(z, document.body) : z)
|
|
246
247
|
] });
|
|
247
|
-
}
|
|
248
|
+
}
|
|
249
|
+
const Ue = Oe(Pe);
|
|
250
|
+
function at(i) {
|
|
251
|
+
return /* @__PURE__ */ n(Ue, { ...i });
|
|
252
|
+
}
|
|
248
253
|
export {
|
|
249
|
-
|
|
254
|
+
at as SelectField
|
|
250
255
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function renderOptionRow(opt: any, listItemType: any, isSelected: any, toggleValue: any, toggleAllValues: any, checkAll?: boolean): import("react").JSX.Element;
|