@cfx-dev/ui-components 4.5.22 → 5.0.2
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/DropdownContent-BMfQCuaP.js +964 -0
- package/dist/Table.module-CMz5ENmI.js +17 -0
- package/dist/assets/all_css.css +1 -1
- package/dist/assets/css/Accordion.css +1 -1
- package/dist/assets/css/AccordionShowcase.css +1 -1
- package/dist/assets/css/Avatar.css +1 -1
- package/dist/assets/css/Badge.css +1 -1
- package/dist/assets/css/BurgerMenu.css +1 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/ControlBox.css +1 -1
- package/dist/assets/css/CountryFlag.css +1 -1
- package/dist/assets/css/DataTable.css +1 -1
- package/dist/assets/css/Dot.css +1 -1
- package/dist/assets/css/DropdownContent.css +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/FlexShowcase.css +1 -1
- package/dist/assets/css/Flyout.css +1 -1
- package/dist/assets/css/FormField.css +1 -0
- package/dist/assets/css/Icon.css +1 -1
- package/dist/assets/css/IconButton.css +1 -1
- package/dist/assets/css/InfoPanel.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/InputDropzone.css +1 -1
- package/dist/assets/css/Island.css +1 -1
- package/dist/assets/css/ItemPreview.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/css/Loaf.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/NavList.css +1 -1
- package/dist/assets/css/Page.css +1 -1
- package/dist/assets/css/Popover.css +1 -1
- package/dist/assets/css/Prose.css +1 -1
- package/dist/assets/css/Radio.css +1 -1
- package/dist/assets/css/Range.css +1 -1
- package/dist/assets/css/RangeInput.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/Separator.css +1 -1
- package/dist/assets/css/Skeleton.css +1 -1
- package/dist/assets/css/Slider.css +1 -1
- package/dist/assets/css/StyledInput.css +1 -1
- package/dist/assets/css/StyledTextarea.css +1 -1
- package/dist/assets/css/Switch.css +1 -1
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/css/Tabular.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/css/TextShowcase.css +1 -1
- package/dist/assets/css/Textarea.css +1 -1
- package/dist/assets/css/Title.css +1 -1
- package/dist/assets/css/ToggleGroup.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-0xD_EEXT.js +110 -0
- package/dist/cfxIconsXLarge-D0vz6Yd_.js +110 -0
- package/dist/components/Accordion/Accordion.d.ts +0 -3
- package/dist/components/Accordion/Accordion.js +117 -121
- package/dist/components/Accordion/AccordionShowcase.js +22 -26
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +12 -12
- package/dist/components/Avatar/AvatarShowcase.js +4 -4
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +7 -7
- package/dist/components/Badge/BadgeShowcase.js +20 -20
- package/dist/components/BurgerMenu/BurgerMenu.js +7 -7
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +8 -8
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +15 -15
- package/dist/components/Button/ButtonShowcase.js +80 -57
- package/dist/components/Checkbox/Checkbox.d.ts +4 -1
- package/dist/components/Checkbox/Checkbox.js +276 -191
- package/dist/components/Checkbox/CheckboxShowcase.js +170 -29
- package/dist/components/ControlBox/ControlBox.d.ts +1 -1
- package/dist/components/ControlBox/ControlBox.js +17 -17
- package/dist/components/DataTable/DataTableShowcase.js +5 -5
- package/dist/components/Dot/Dot.d.ts +1 -1
- package/dist/components/Dot/Dot.js +15 -15
- package/dist/components/DropdownContent/DropdownContent.d.ts +1 -5
- package/dist/components/DropdownContent/DropdownContent.js +2 -3
- package/dist/components/DropdownContent/index.d.ts +1 -1
- package/dist/components/DropdownContent/index.js +2 -3
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -2
- package/dist/components/DropdownMenu/DropdownMenu.js +17 -19
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +0 -5
- package/dist/components/DropdownSelect/DropdownSelect.js +47 -55
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +10 -11
- package/dist/components/Flyout/Flyout.d.ts +1 -1
- package/dist/components/Flyout/Flyout.js +10 -10
- package/dist/components/FormField/FormField.d.ts +20 -0
- package/dist/components/FormField/FormField.js +68 -0
- package/dist/components/FormField/FormFieldShowcase.d.ts +5 -0
- package/dist/components/FormField/FormFieldShowcase.js +59 -0
- package/dist/components/FormField/index.d.ts +1 -0
- package/dist/components/FormField/index.js +4 -0
- package/dist/components/Icon/Icon.d.ts +6 -2
- package/dist/components/Icon/Icon.js +33 -32
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Icons/Icons.types.d.ts +1 -3
- package/dist/components/Icons/IconsShowcase.js +224 -92
- package/dist/components/Icons/cfx-icons/Cart.js +17 -33
- package/dist/components/Icons/cfx-icons/Close.js +7 -8
- package/dist/components/Icons/cfx-icons/Controller.js +13 -20
- package/dist/components/Icons/cfx-icons/Copy.js +6 -7
- package/dist/components/Icons/cfx-icons/DownArrow.js +4 -5
- package/dist/components/Icons/cfx-icons/DownChevron.js +4 -5
- package/dist/components/Icons/cfx-icons/Download.js +6 -7
- package/dist/components/Icons/cfx-icons/Expand.js +1 -1
- package/dist/components/Icons/cfx-icons/ExternalLink.js +9 -10
- package/dist/components/Icons/cfx-icons/Filter.js +9 -9
- package/dist/components/Icons/cfx-icons/Folder.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Folder.js +24 -0
- package/dist/components/Icons/cfx-icons/Heart.js +9 -10
- package/dist/components/Icons/cfx-icons/HeartFilled.js +3 -4
- package/dist/components/Icons/cfx-icons/Help.js +9 -10
- package/dist/components/Icons/cfx-icons/LeftArrow.js +9 -10
- package/dist/components/Icons/cfx-icons/LeftChevron.js +7 -8
- package/dist/components/Icons/cfx-icons/Map.js +14 -30
- package/dist/components/Icons/cfx-icons/Menu.js +17 -40
- package/dist/components/Icons/cfx-icons/Minus.js +2 -3
- package/dist/components/Icons/cfx-icons/More.js +4 -5
- package/dist/components/Icons/cfx-icons/MoreInfo.js +6 -7
- package/dist/components/Icons/cfx-icons/Pencil.js +3 -3
- package/dist/components/Icons/cfx-icons/Play.js +6 -6
- package/dist/components/Icons/cfx-icons/Plus.js +4 -5
- package/dist/components/Icons/cfx-icons/Radio.js +15 -25
- package/dist/components/Icons/cfx-icons/Refresh.js +10 -11
- package/dist/components/Icons/cfx-icons/RightArrow.js +9 -10
- package/dist/components/Icons/cfx-icons/RightChevron.js +4 -5
- package/dist/components/Icons/cfx-icons/Search.js +9 -10
- package/dist/components/Icons/cfx-icons/ServerList.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/ServerList.js +24 -0
- package/dist/components/Icons/cfx-icons/ServerReconnect.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/ServerReconnect.js +24 -0
- package/dist/components/Icons/cfx-icons/Sort.js +6 -7
- package/dist/components/Icons/cfx-icons/Square.js +8 -9
- package/dist/components/Icons/cfx-icons/SquareFilled.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/SquareFilled.js +23 -0
- package/dist/components/Icons/cfx-icons/SquareTick.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/SquareTick.js +26 -0
- package/dist/components/Icons/cfx-icons/Stop.js +7 -8
- package/dist/components/Icons/cfx-icons/Success.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Success.js +26 -0
- package/dist/components/Icons/cfx-icons/Tick.js +4 -5
- package/dist/components/Icons/cfx-icons/Transfer.js +7 -8
- package/dist/components/Icons/cfx-icons/Trash.js +6 -6
- package/dist/components/Icons/cfx-icons/Undo.js +5 -6
- package/dist/components/Icons/cfx-icons/UpArrow.js +9 -10
- package/dist/components/Icons/cfx-icons/UpChevron.js +4 -5
- package/dist/components/Icons/cfx-icons/Upload.js +7 -8
- package/dist/components/Icons/cfx-icons/UpvotesBurst.js +10 -10
- package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +10 -11
- package/dist/components/Icons/cfx-icons/User.js +13 -20
- package/dist/components/Icons/cfx-icons/Users.js +13 -32
- package/dist/components/Icons/cfx-icons/Verified.js +1 -1
- package/dist/components/Icons/cfx-icons/Visibility.js +8 -8
- package/dist/components/Icons/cfx-icons/VisibilityOff.js +1 -1
- package/dist/components/Icons/cfx-icons/Warning.js +9 -10
- package/dist/components/Icons/cfx-iconsXLarge/Cart.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Cart.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Close.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Close.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Controller.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Controller.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/Copy.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Copy.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/DownArrow.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/DownArrow.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/DownChevron.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/DownChevron.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Download.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Download.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Expand.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Expand.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/ExternalLink.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/ExternalLink.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Filter.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Filter.js +23 -0
- package/dist/components/Icons/cfx-iconsXLarge/Folder.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Folder.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/Heart.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Heart.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/Help.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Help.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Map.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Map.js +23 -0
- package/dist/components/Icons/cfx-iconsXLarge/Menu.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Menu.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Minus.d.ts +5 -0
- package/dist/components/Icons/{cfx-icons-big/Upload.js → cfx-iconsXLarge/Minus.js} +2 -3
- package/dist/components/Icons/cfx-iconsXLarge/More.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/More.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Pencil.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Pencil.js +25 -0
- package/dist/components/Icons/cfx-iconsXLarge/Play.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Play.js +25 -0
- package/dist/components/Icons/cfx-iconsXLarge/Plus.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Plus.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Radio.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Refresh.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Refresh.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/RightArrow.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/RightArrow.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/RightChevron.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/RightChevron.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Search.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Search.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/ServerList.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/ServerList.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/Sort.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Sort.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Square.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Square.js +23 -0
- package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/SquareTick.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/SquareTick.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Stop.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Stop.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Success.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Success.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Tick.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Tick.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Transfer.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Transfer.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Trash.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Trash.js +23 -0
- package/dist/components/Icons/cfx-iconsXLarge/Undo.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Undo.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpArrow.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpArrow.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpChevron.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpChevron.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/Upload.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpvotesBurst.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpvotesBurst.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpvotesRecurring.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/UpvotesRecurring.js +26 -0
- package/dist/components/Icons/cfx-iconsXLarge/User.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/User.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/Users.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Users.js +24 -0
- package/dist/components/Icons/cfx-iconsXLarge/Verified.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Verified.js +23 -0
- package/dist/components/Icons/cfx-iconsXLarge/Visibility.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/Visibility.js +23 -0
- package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.d.ts +5 -0
- package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.js +23 -0
- package/dist/components/Icons/cfx-iconsXLarge/Warning.js +26 -0
- package/dist/components/Icons/cfxIcons.d.ts +6 -1
- package/dist/components/Icons/cfxIcons.js +88 -78
- package/dist/components/Icons/cfxIconsXLarge.d.ts +52 -0
- package/dist/components/Icons/cfxIconsXLarge.js +106 -0
- package/dist/components/Icons/index.d.ts +2 -2
- package/dist/components/Icons/index.js +3 -3
- package/dist/components/InfoPanel/InfoPanel.d.ts +1 -1
- package/dist/components/InfoPanel/InfoPanel.js +10 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +30 -30
- package/dist/components/Input/Input.d.ts +3 -3
- package/dist/components/Input/Input.js +94 -107
- package/dist/components/Input/Input.types.d.ts +1 -1
- package/dist/components/Input/InputShowcase.js +80 -64
- package/dist/components/Input/RichInput.js +48 -62
- package/dist/components/InputDropzone/InputDropzone.js +52 -43
- package/dist/components/InputDropzone/ItemPreview.js +23 -21
- package/dist/components/Layout/Pad/Pad.d.ts +2 -2
- package/dist/components/Layout/Pad/Pad.js +1 -1
- package/dist/components/Link/LinkShowcase.js +39 -39
- package/dist/components/Loaf/Loaf.d.ts +2 -2
- package/dist/components/Loaf/Loaf.js +15 -15
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.js +26 -26
- package/dist/components/Modal/ModalShowcase.js +13 -13
- package/dist/components/Pagination/Pagination.js +5 -5
- package/dist/components/RSC/Flex/Flex.d.ts +2 -2
- package/dist/components/RSC/Flex/Flex.js +17 -17
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js +19 -19
- package/dist/components/Range/RangeShowcase.js +10 -10
- package/dist/components/Select/Select.d.ts +0 -3
- package/dist/components/Select/Select.js +372 -391
- package/dist/components/Select/SelectShowcase.js +20 -47
- package/dist/components/Separator/Separator.d.ts +1 -2
- package/dist/components/Separator/Separator.js +29 -42
- package/dist/components/Skeleton/SkeletonShowcase.js +12 -12
- package/dist/components/Slider/SliderShowcase.js +6 -6
- package/dist/components/StyledInput/StyledInput.d.ts +3 -3
- package/dist/components/StyledInput/StyledInput.js +16 -32
- package/dist/components/Switch/Switch.d.ts +6 -0
- package/dist/components/Switch/Switch.js +99 -85
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCell.js +1 -1
- package/dist/components/Table/TableCellCheckbox.js +1 -1
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableIconButton.js +1 -1
- package/dist/components/Table/TableRoot.js +1 -1
- package/dist/components/Table/TableRow.d.ts +1 -1
- package/dist/components/Table/TableRow.js +8 -8
- package/dist/components/TableResponsiveText/TableResponsiveText.js +4 -4
- package/dist/components/Tabular/TabularShowcase.js +22 -22
- package/dist/components/Text/BodyShowcase.js +261 -48
- package/dist/components/Text/HeadingShowcase.js +179 -24
- package/dist/components/Text/Text.d.ts +1 -0
- package/dist/components/Text/Text.js +62 -57
- package/dist/components/Text/Text.types.d.ts +6 -4
- package/dist/components/Text/TextShowcase.d.ts +15 -6
- package/dist/components/Text/TextShowcase.js +63 -38
- package/dist/components/Title/TitleShowcase.js +97 -17
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +22 -22
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +76 -40
- package/dist/main.d.ts +5 -6
- package/dist/main.js +87 -87
- package/dist/styles-scss/_ui.scss +94 -14
- package/dist/styles-scss/global.scss +17 -15
- package/dist/styles-scss/tokens.scss +158 -53
- package/dist/utils/ui/index.d.ts +2 -2
- package/dist/utils/ui/index.js +12 -10
- package/dist/utils/ui/ui.d.ts +7 -2
- package/dist/utils/ui/ui.js +64 -46
- package/dist/utils/ui/ui.types.d.ts +67 -22
- package/dist/utils/ui/ui.types.js +10 -7
- package/package.json +1 -1
- package/dist/DropdownContent-MvHlrWi6.js +0 -989
- package/dist/Table.module-DffST69u.js +0 -17
- package/dist/assets/css/IconBig.css +0 -1
- package/dist/cfxIcons-B4SQ4Ljd.js +0 -100
- package/dist/cfxIconsBig-BLJjMT-Y.js +0 -16
- package/dist/components/IconBig/IconBig.d.ts +0 -13
- package/dist/components/IconBig/IconBig.js +0 -78
- package/dist/components/IconBig/index.d.ts +0 -2
- package/dist/components/IconBig/index.js +0 -4
- package/dist/components/Icons/cfx-icons/SquareCheck.d.ts +0 -5
- package/dist/components/Icons/cfx-icons/SquareCheck.js +0 -27
- package/dist/components/Icons/cfx-icons-big/Confirm.d.ts +0 -5
- package/dist/components/Icons/cfx-icons-big/Confirm.js +0 -39
- package/dist/components/Icons/cfx-icons-big/Like.d.ts +0 -5
- package/dist/components/Icons/cfx-icons-big/Like.js +0 -25
- package/dist/components/Icons/cfx-icons-big/Subscriptions.d.ts +0 -5
- package/dist/components/Icons/cfx-icons-big/Subscriptions.js +0 -33
- package/dist/components/Icons/cfx-icons-big/Warning.js +0 -27
- package/dist/components/Icons/cfxIconsBig.d.ts +0 -5
- package/dist/components/Icons/cfxIconsBig.js +0 -12
- /package/dist/components/Icons/{cfx-icons-big → cfx-iconsXLarge}/Upload.d.ts +0 -0
- /package/dist/components/Icons/{cfx-icons-big → cfx-iconsXLarge}/Warning.d.ts +0 -0
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { jsx as i, jsxs as $, Fragment as
|
|
1
|
+
import { jsx as i, jsxs as $, Fragment as be } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import q from "react";
|
|
4
4
|
import { R as ft, r as De } from "../../index-Cl_RnsqN.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { e as
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as Le, d as
|
|
5
|
+
import { c as Re } from "../../index-rKs9bXHr.js";
|
|
6
|
+
import { e as z, P as N, u as Oe, c as mt, b as V, a as b, f as ht } from "../../index-CfQtbUfi.js";
|
|
7
|
+
import { u as vt, c as gt } from "../../index-9LBuZ7x4.js";
|
|
8
|
+
import { c as Le, d as St, u as Ne, A as wt, a as yt, h as Ct, b as xt, R as _t, F as It, D as Tt, C as Pt, e as bt } from "../../Combination-CcTTSYNP.js";
|
|
9
9
|
import { u as Nt } from "../../index-BZPx6jYI.js";
|
|
10
|
-
import { Icon as
|
|
11
|
-
import { clsx as
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
var a;
|
|
10
|
+
import { Icon as Et } from "../Icon/Icon.js";
|
|
11
|
+
import { clsx as Ce } from "../../utils/clsx.js";
|
|
12
|
+
var Rt = "Portal", ke = l.forwardRef((t, o) => {
|
|
13
|
+
var s;
|
|
15
14
|
const { container: e, ...r } = t, [n, d] = l.useState(!1);
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
return
|
|
15
|
+
z(() => d(!0), []);
|
|
16
|
+
const a = e || n && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
17
|
+
return a ? ft.createPortal(/* @__PURE__ */ i(N.div, { ...r, ref: o }), a) : null;
|
|
19
18
|
});
|
|
20
|
-
ke.displayName =
|
|
21
|
-
var
|
|
19
|
+
ke.displayName = Rt;
|
|
20
|
+
var Be = Object.freeze({
|
|
22
21
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
23
22
|
position: "absolute",
|
|
24
23
|
border: 0,
|
|
@@ -30,54 +29,54 @@ var ze = Object.freeze({
|
|
|
30
29
|
clip: "rect(0, 0, 0, 0)",
|
|
31
30
|
whiteSpace: "nowrap",
|
|
32
31
|
wordWrap: "normal"
|
|
33
|
-
}),
|
|
32
|
+
}), Ot = "VisuallyHidden", Mt = l.forwardRef(
|
|
34
33
|
(t, o) => /* @__PURE__ */ i(
|
|
35
34
|
N.span,
|
|
36
35
|
{
|
|
37
36
|
...t,
|
|
38
37
|
ref: o,
|
|
39
|
-
style: { ...
|
|
38
|
+
style: { ...Be, ...t.style }
|
|
40
39
|
}
|
|
41
40
|
)
|
|
42
41
|
);
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
|
|
42
|
+
Mt.displayName = Ot;
|
|
43
|
+
var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Select", [pe, fe, Lt] = gt(oe), [le, Lo] = mt(oe, [
|
|
44
|
+
Lt,
|
|
46
45
|
Le
|
|
47
|
-
]), me = Le(), [
|
|
46
|
+
]), me = Le(), [kt, Z] = le(oe), [Bt, Vt] = le(oe), Ve = (t) => {
|
|
48
47
|
const {
|
|
49
48
|
__scopeSelect: o,
|
|
50
49
|
children: e,
|
|
51
50
|
open: r,
|
|
52
51
|
defaultOpen: n,
|
|
53
52
|
onOpenChange: d,
|
|
54
|
-
value:
|
|
55
|
-
defaultValue:
|
|
56
|
-
onValueChange:
|
|
53
|
+
value: a,
|
|
54
|
+
defaultValue: s,
|
|
55
|
+
onValueChange: c,
|
|
57
56
|
dir: p,
|
|
58
|
-
name:
|
|
59
|
-
autoComplete:
|
|
60
|
-
disabled:
|
|
61
|
-
required:
|
|
62
|
-
form:
|
|
63
|
-
} = t, u = me(o), [
|
|
57
|
+
name: g,
|
|
58
|
+
autoComplete: S,
|
|
59
|
+
disabled: _,
|
|
60
|
+
required: P,
|
|
61
|
+
form: T
|
|
62
|
+
} = t, u = me(o), [v, C] = l.useState(null), [f, h] = l.useState(null), [M, A] = l.useState(!1), ce = vt(p), [E, L] = Oe({
|
|
64
63
|
prop: r,
|
|
65
64
|
defaultProp: n ?? !1,
|
|
66
65
|
onChange: d,
|
|
67
66
|
caller: oe
|
|
68
67
|
}), [j, Q] = Oe({
|
|
69
|
-
prop:
|
|
70
|
-
defaultProp:
|
|
71
|
-
onChange:
|
|
68
|
+
prop: a,
|
|
69
|
+
defaultProp: s,
|
|
70
|
+
onChange: c,
|
|
72
71
|
caller: oe
|
|
73
|
-
}),
|
|
74
|
-
return /* @__PURE__ */ i(
|
|
75
|
-
|
|
72
|
+
}), H = l.useRef(null), W = v ? T || !!v.closest("form") : !0, [G, U] = l.useState(/* @__PURE__ */ new Set()), F = Array.from(G).map((R) => R.props.value).join(";");
|
|
73
|
+
return /* @__PURE__ */ i(St, { ...u, children: /* @__PURE__ */ $(
|
|
74
|
+
kt,
|
|
76
75
|
{
|
|
77
|
-
required:
|
|
76
|
+
required: P,
|
|
78
77
|
scope: o,
|
|
79
|
-
trigger:
|
|
80
|
-
onTriggerChange:
|
|
78
|
+
trigger: v,
|
|
79
|
+
onTriggerChange: C,
|
|
81
80
|
valueNode: f,
|
|
82
81
|
onValueNodeChange: h,
|
|
83
82
|
valueNodeHasChildren: M,
|
|
@@ -85,40 +84,40 @@ var Dt = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = [" ", "Enter"], oe = "Sele
|
|
|
85
84
|
contentId: Ne(),
|
|
86
85
|
value: j,
|
|
87
86
|
onValueChange: Q,
|
|
88
|
-
open:
|
|
89
|
-
onOpenChange:
|
|
90
|
-
dir:
|
|
91
|
-
triggerPointerDownPosRef:
|
|
92
|
-
disabled:
|
|
87
|
+
open: E,
|
|
88
|
+
onOpenChange: L,
|
|
89
|
+
dir: ce,
|
|
90
|
+
triggerPointerDownPosRef: H,
|
|
91
|
+
disabled: _,
|
|
93
92
|
children: [
|
|
94
93
|
/* @__PURE__ */ i(pe.Provider, { scope: o, children: /* @__PURE__ */ i(
|
|
95
94
|
Bt,
|
|
96
95
|
{
|
|
97
96
|
scope: t.__scopeSelect,
|
|
98
|
-
onNativeOptionAdd: l.useCallback((
|
|
99
|
-
|
|
97
|
+
onNativeOptionAdd: l.useCallback((R) => {
|
|
98
|
+
U((k) => new Set(k).add(R));
|
|
100
99
|
}, []),
|
|
101
|
-
onNativeOptionRemove: l.useCallback((
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
return
|
|
100
|
+
onNativeOptionRemove: l.useCallback((R) => {
|
|
101
|
+
U((k) => {
|
|
102
|
+
const K = new Set(k);
|
|
103
|
+
return K.delete(R), K;
|
|
105
104
|
});
|
|
106
105
|
}, []),
|
|
107
106
|
children: e
|
|
108
107
|
}
|
|
109
108
|
) }),
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
W ? /* @__PURE__ */ $(
|
|
110
|
+
ct,
|
|
112
111
|
{
|
|
113
112
|
"aria-hidden": !0,
|
|
114
|
-
required:
|
|
113
|
+
required: P,
|
|
115
114
|
tabIndex: -1,
|
|
116
|
-
name:
|
|
117
|
-
autoComplete:
|
|
115
|
+
name: g,
|
|
116
|
+
autoComplete: S,
|
|
118
117
|
value: j,
|
|
119
|
-
onChange: (
|
|
120
|
-
disabled:
|
|
121
|
-
form:
|
|
118
|
+
onChange: (R) => Q(R.target.value),
|
|
119
|
+
disabled: _,
|
|
120
|
+
form: T,
|
|
122
121
|
children: [
|
|
123
122
|
j === void 0 ? /* @__PURE__ */ i("option", { value: "" }) : null,
|
|
124
123
|
Array.from(G)
|
|
@@ -130,81 +129,81 @@ var Dt = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = [" ", "Enter"], oe = "Sele
|
|
|
130
129
|
}
|
|
131
130
|
) });
|
|
132
131
|
};
|
|
133
|
-
|
|
134
|
-
var
|
|
132
|
+
Ve.displayName = oe;
|
|
133
|
+
var He = "SelectTrigger", We = l.forwardRef(
|
|
135
134
|
(t, o) => {
|
|
136
|
-
const { __scopeSelect: e, disabled: r = !1, ...n } = t, d = me(e),
|
|
137
|
-
const
|
|
138
|
-
f !== void 0 &&
|
|
139
|
-
}),
|
|
140
|
-
|
|
135
|
+
const { __scopeSelect: e, disabled: r = !1, ...n } = t, d = me(e), a = Z(He, e), s = a.disabled || r, c = V(o, a.onTriggerChange), p = fe(e), g = l.useRef("touch"), [S, _, P] = at((u) => {
|
|
136
|
+
const v = p().filter((h) => !h.disabled), C = v.find((h) => h.value === a.value), f = it(v, u, C);
|
|
137
|
+
f !== void 0 && a.onValueChange(f.value);
|
|
138
|
+
}), T = (u) => {
|
|
139
|
+
s || (a.onOpenChange(!0), P()), u && (a.triggerPointerDownPosRef.current = {
|
|
141
140
|
x: Math.round(u.pageX),
|
|
142
141
|
y: Math.round(u.pageY)
|
|
143
142
|
});
|
|
144
143
|
};
|
|
145
|
-
return /* @__PURE__ */ i(
|
|
144
|
+
return /* @__PURE__ */ i(wt, { asChild: !0, ...d, children: /* @__PURE__ */ i(
|
|
146
145
|
N.button,
|
|
147
146
|
{
|
|
148
147
|
type: "button",
|
|
149
148
|
role: "combobox",
|
|
150
|
-
"aria-controls":
|
|
151
|
-
"aria-expanded":
|
|
152
|
-
"aria-required":
|
|
149
|
+
"aria-controls": a.contentId,
|
|
150
|
+
"aria-expanded": a.open,
|
|
151
|
+
"aria-required": a.required,
|
|
153
152
|
"aria-autocomplete": "none",
|
|
154
|
-
dir:
|
|
155
|
-
"data-state":
|
|
156
|
-
disabled:
|
|
157
|
-
"data-disabled":
|
|
158
|
-
"data-placeholder":
|
|
153
|
+
dir: a.dir,
|
|
154
|
+
"data-state": a.open ? "open" : "closed",
|
|
155
|
+
disabled: s,
|
|
156
|
+
"data-disabled": s ? "" : void 0,
|
|
157
|
+
"data-placeholder": st(a.value) ? "" : void 0,
|
|
159
158
|
...n,
|
|
160
|
-
ref:
|
|
161
|
-
onClick:
|
|
162
|
-
u.currentTarget.focus(),
|
|
159
|
+
ref: c,
|
|
160
|
+
onClick: b(n.onClick, (u) => {
|
|
161
|
+
u.currentTarget.focus(), g.current !== "mouse" && T(u);
|
|
163
162
|
}),
|
|
164
|
-
onPointerDown:
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
|
|
163
|
+
onPointerDown: b(n.onPointerDown, (u) => {
|
|
164
|
+
g.current = u.pointerType;
|
|
165
|
+
const v = u.target;
|
|
166
|
+
v.hasPointerCapture(u.pointerId) && v.releasePointerCapture(u.pointerId), u.button === 0 && u.ctrlKey === !1 && u.pointerType === "mouse" && (T(u), u.preventDefault());
|
|
168
167
|
}),
|
|
169
|
-
onKeyDown:
|
|
170
|
-
const
|
|
171
|
-
!(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 &&
|
|
168
|
+
onKeyDown: b(n.onKeyDown, (u) => {
|
|
169
|
+
const v = S.current !== "";
|
|
170
|
+
!(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 && _(u.key), !(v && u.key === " ") && At.includes(u.key) && (T(), u.preventDefault());
|
|
172
171
|
})
|
|
173
172
|
}
|
|
174
173
|
) });
|
|
175
174
|
}
|
|
176
175
|
);
|
|
177
|
-
|
|
178
|
-
var
|
|
176
|
+
We.displayName = He;
|
|
177
|
+
var Ue = "SelectValue", Fe = l.forwardRef(
|
|
179
178
|
(t, o) => {
|
|
180
|
-
const { __scopeSelect: e, className: r, style: n, children: d, placeholder:
|
|
181
|
-
return
|
|
182
|
-
p(
|
|
183
|
-
}, [p,
|
|
179
|
+
const { __scopeSelect: e, className: r, style: n, children: d, placeholder: a = "", ...s } = t, c = Z(Ue, e), { onValueNodeHasChildrenChange: p } = c, g = d !== void 0, S = V(o, c.onValueNodeChange);
|
|
180
|
+
return z(() => {
|
|
181
|
+
p(g);
|
|
182
|
+
}, [p, g]), /* @__PURE__ */ i(
|
|
184
183
|
N.span,
|
|
185
184
|
{
|
|
186
|
-
...
|
|
187
|
-
ref:
|
|
185
|
+
...s,
|
|
186
|
+
ref: S,
|
|
188
187
|
style: { pointerEvents: "none" },
|
|
189
|
-
children:
|
|
188
|
+
children: st(c.value) ? /* @__PURE__ */ i(be, { children: a }) : d
|
|
190
189
|
}
|
|
191
190
|
);
|
|
192
191
|
}
|
|
193
192
|
);
|
|
194
|
-
Fe.displayName =
|
|
195
|
-
var Ht = "SelectIcon",
|
|
193
|
+
Fe.displayName = Ue;
|
|
194
|
+
var Ht = "SelectIcon", Ke = l.forwardRef(
|
|
196
195
|
(t, o) => {
|
|
197
196
|
const { __scopeSelect: e, children: r, ...n } = t;
|
|
198
197
|
return /* @__PURE__ */ i(N.span, { "aria-hidden": !0, ...n, ref: o, children: r || "▼" });
|
|
199
198
|
}
|
|
200
199
|
);
|
|
201
|
-
|
|
202
|
-
var Wt = "SelectPortal",
|
|
203
|
-
|
|
200
|
+
Ke.displayName = Ht;
|
|
201
|
+
var Wt = "SelectPortal", ze = (t) => /* @__PURE__ */ i(ke, { asChild: !0, ...t });
|
|
202
|
+
ze.displayName = Wt;
|
|
204
203
|
var ne = "SelectContent", je = l.forwardRef(
|
|
205
204
|
(t, o) => {
|
|
206
205
|
const e = Z(ne, t.__scopeSelect), [r, n] = l.useState();
|
|
207
|
-
if (
|
|
206
|
+
if (z(() => {
|
|
208
207
|
n(new DocumentFragment());
|
|
209
208
|
}, []), !e.open) {
|
|
210
209
|
const d = r;
|
|
@@ -217,97 +216,97 @@ var ne = "SelectContent", je = l.forwardRef(
|
|
|
217
216
|
}
|
|
218
217
|
);
|
|
219
218
|
je.displayName = ne;
|
|
220
|
-
var
|
|
219
|
+
var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.RemoveScroll"), Ye = l.forwardRef(
|
|
221
220
|
(t, o) => {
|
|
222
221
|
const {
|
|
223
222
|
__scopeSelect: e,
|
|
224
223
|
position: r = "item-aligned",
|
|
225
224
|
onCloseAutoFocus: n,
|
|
226
225
|
onEscapeKeyDown: d,
|
|
227
|
-
onPointerDownOutside:
|
|
226
|
+
onPointerDownOutside: a,
|
|
228
227
|
//
|
|
229
228
|
// PopperContent props
|
|
230
|
-
side:
|
|
231
|
-
sideOffset:
|
|
229
|
+
side: s,
|
|
230
|
+
sideOffset: c,
|
|
232
231
|
align: p,
|
|
233
|
-
alignOffset:
|
|
234
|
-
arrowPadding:
|
|
235
|
-
collisionBoundary:
|
|
236
|
-
collisionPadding:
|
|
237
|
-
sticky:
|
|
232
|
+
alignOffset: g,
|
|
233
|
+
arrowPadding: S,
|
|
234
|
+
collisionBoundary: _,
|
|
235
|
+
collisionPadding: P,
|
|
236
|
+
sticky: T,
|
|
238
237
|
hideWhenDetached: u,
|
|
239
|
-
avoidCollisions:
|
|
238
|
+
avoidCollisions: v,
|
|
240
239
|
//
|
|
241
|
-
...
|
|
242
|
-
} = t, f = Z(ne, e), [h, M] = l.useState(null), [A,
|
|
240
|
+
...C
|
|
241
|
+
} = t, f = Z(ne, e), [h, M] = l.useState(null), [A, ce] = l.useState(null), E = V(o, (m) => M(m)), [L, j] = l.useState(null), [Q, H] = l.useState(
|
|
243
242
|
null
|
|
244
|
-
),
|
|
243
|
+
), W = fe(e), [G, U] = l.useState(!1), F = l.useRef(!1);
|
|
245
244
|
l.useEffect(() => {
|
|
246
|
-
if (h) return
|
|
247
|
-
}, [h]),
|
|
248
|
-
const
|
|
245
|
+
if (h) return Ct(h);
|
|
246
|
+
}, [h]), xt();
|
|
247
|
+
const R = l.useCallback(
|
|
249
248
|
(m) => {
|
|
250
|
-
const [I, ...O] =
|
|
251
|
-
for (const
|
|
252
|
-
if (
|
|
249
|
+
const [I, ...O] = W().map((y) => y.ref.current), [x] = O.slice(-1), w = document.activeElement;
|
|
250
|
+
for (const y of m)
|
|
251
|
+
if (y === w || (y == null || y.scrollIntoView({ block: "nearest" }), y === I && A && (A.scrollTop = 0), y === x && A && (A.scrollTop = A.scrollHeight), y == null || y.focus(), document.activeElement !== w)) return;
|
|
253
252
|
},
|
|
254
|
-
[
|
|
255
|
-
),
|
|
256
|
-
() =>
|
|
257
|
-
[
|
|
253
|
+
[W, A]
|
|
254
|
+
), k = l.useCallback(
|
|
255
|
+
() => R([L, h]),
|
|
256
|
+
[R, L, h]
|
|
258
257
|
);
|
|
259
258
|
l.useEffect(() => {
|
|
260
|
-
G &&
|
|
261
|
-
}, [G,
|
|
262
|
-
const { onOpenChange:
|
|
259
|
+
G && k();
|
|
260
|
+
}, [G, k]);
|
|
261
|
+
const { onOpenChange: K, triggerPointerDownPosRef: Y } = f;
|
|
263
262
|
l.useEffect(() => {
|
|
264
263
|
if (h) {
|
|
265
264
|
let m = { x: 0, y: 0 };
|
|
266
|
-
const I = (
|
|
267
|
-
var w,
|
|
265
|
+
const I = (x) => {
|
|
266
|
+
var w, y;
|
|
268
267
|
m = {
|
|
269
|
-
x: Math.abs(Math.round(
|
|
270
|
-
y: Math.abs(Math.round(
|
|
268
|
+
x: Math.abs(Math.round(x.pageX) - (((w = Y.current) == null ? void 0 : w.x) ?? 0)),
|
|
269
|
+
y: Math.abs(Math.round(x.pageY) - (((y = Y.current) == null ? void 0 : y.y) ?? 0))
|
|
271
270
|
};
|
|
272
|
-
}, O = (
|
|
273
|
-
m.x <= 10 && m.y <= 10 ?
|
|
271
|
+
}, O = (x) => {
|
|
272
|
+
m.x <= 10 && m.y <= 10 ? x.preventDefault() : h.contains(x.target) || K(!1), document.removeEventListener("pointermove", I), Y.current = null;
|
|
274
273
|
};
|
|
275
274
|
return Y.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", O, { capture: !0, once: !0 })), () => {
|
|
276
275
|
document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", O, { capture: !0 });
|
|
277
276
|
};
|
|
278
277
|
}
|
|
279
|
-
}, [h,
|
|
280
|
-
const m = () =>
|
|
278
|
+
}, [h, K, Y]), l.useEffect(() => {
|
|
279
|
+
const m = () => K(!1);
|
|
281
280
|
return window.addEventListener("blur", m), window.addEventListener("resize", m), () => {
|
|
282
281
|
window.removeEventListener("blur", m), window.removeEventListener("resize", m);
|
|
283
282
|
};
|
|
284
|
-
}, [
|
|
283
|
+
}, [K]);
|
|
285
284
|
const [he, ie] = at((m) => {
|
|
286
|
-
const I =
|
|
287
|
-
|
|
288
|
-
}),
|
|
285
|
+
const I = W().filter((w) => !w.disabled), O = I.find((w) => w.ref.current === document.activeElement), x = it(I, m, O);
|
|
286
|
+
x && setTimeout(() => x.ref.current.focus());
|
|
287
|
+
}), ve = l.useCallback(
|
|
289
288
|
(m, I, O) => {
|
|
290
|
-
const
|
|
291
|
-
(f.value !== void 0 && f.value === I ||
|
|
289
|
+
const x = !F.current && !O;
|
|
290
|
+
(f.value !== void 0 && f.value === I || x) && (j(m), x && (F.current = !0));
|
|
292
291
|
},
|
|
293
292
|
[f.value]
|
|
294
|
-
),
|
|
293
|
+
), ge = l.useCallback(() => h == null ? void 0 : h.focus(), [h]), re = l.useCallback(
|
|
295
294
|
(m, I, O) => {
|
|
296
|
-
const
|
|
297
|
-
(f.value !== void 0 && f.value === I ||
|
|
295
|
+
const x = !F.current && !O;
|
|
296
|
+
(f.value !== void 0 && f.value === I || x) && H(m);
|
|
298
297
|
},
|
|
299
298
|
[f.value]
|
|
300
|
-
), de = r === "popper" ?
|
|
301
|
-
side:
|
|
302
|
-
sideOffset:
|
|
299
|
+
), de = r === "popper" ? xe : $e, se = de === xe ? {
|
|
300
|
+
side: s,
|
|
301
|
+
sideOffset: c,
|
|
303
302
|
align: p,
|
|
304
|
-
alignOffset:
|
|
305
|
-
arrowPadding:
|
|
306
|
-
collisionBoundary:
|
|
307
|
-
collisionPadding:
|
|
308
|
-
sticky:
|
|
303
|
+
alignOffset: g,
|
|
304
|
+
arrowPadding: S,
|
|
305
|
+
collisionBoundary: _,
|
|
306
|
+
collisionPadding: P,
|
|
307
|
+
sticky: T,
|
|
309
308
|
hideWhenDetached: u,
|
|
310
|
-
avoidCollisions:
|
|
309
|
+
avoidCollisions: v
|
|
311
310
|
} : {};
|
|
312
311
|
return /* @__PURE__ */ i(
|
|
313
312
|
Ge,
|
|
@@ -315,17 +314,17 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
|
|
|
315
314
|
scope: e,
|
|
316
315
|
content: h,
|
|
317
316
|
viewport: A,
|
|
318
|
-
onViewportChange:
|
|
319
|
-
itemRefCallback:
|
|
320
|
-
selectedItem:
|
|
321
|
-
onItemLeave:
|
|
317
|
+
onViewportChange: ce,
|
|
318
|
+
itemRefCallback: ve,
|
|
319
|
+
selectedItem: L,
|
|
320
|
+
onItemLeave: ge,
|
|
322
321
|
itemTextRefCallback: re,
|
|
323
|
-
focusSelectedItem:
|
|
322
|
+
focusSelectedItem: k,
|
|
324
323
|
selectedItemText: Q,
|
|
325
324
|
position: r,
|
|
326
325
|
isPositioned: G,
|
|
327
326
|
searchRef: he,
|
|
328
|
-
children: /* @__PURE__ */ i(
|
|
327
|
+
children: /* @__PURE__ */ i(_t, { as: Ft, allowPinchZoom: !0, children: /* @__PURE__ */ i(
|
|
329
328
|
It,
|
|
330
329
|
{
|
|
331
330
|
asChild: !0,
|
|
@@ -333,7 +332,7 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
|
|
|
333
332
|
onMountAutoFocus: (m) => {
|
|
334
333
|
m.preventDefault();
|
|
335
334
|
},
|
|
336
|
-
onUnmountAutoFocus:
|
|
335
|
+
onUnmountAutoFocus: b(n, (m) => {
|
|
337
336
|
var I;
|
|
338
337
|
(I = f.trigger) == null || I.focus({ preventScroll: !0 }), m.preventDefault();
|
|
339
338
|
}),
|
|
@@ -343,7 +342,7 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
|
|
|
343
342
|
asChild: !0,
|
|
344
343
|
disableOutsidePointerEvents: !0,
|
|
345
344
|
onEscapeKeyDown: d,
|
|
346
|
-
onPointerDownOutside:
|
|
345
|
+
onPointerDownOutside: a,
|
|
347
346
|
onFocusOutside: (m) => m.preventDefault(),
|
|
348
347
|
onDismiss: () => f.onOpenChange(!1),
|
|
349
348
|
children: /* @__PURE__ */ i(
|
|
@@ -354,27 +353,27 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
|
|
|
354
353
|
"data-state": f.open ? "open" : "closed",
|
|
355
354
|
dir: f.dir,
|
|
356
355
|
onContextMenu: (m) => m.preventDefault(),
|
|
357
|
-
...
|
|
358
|
-
...
|
|
359
|
-
onPlaced: () =>
|
|
360
|
-
ref:
|
|
356
|
+
...C,
|
|
357
|
+
...se,
|
|
358
|
+
onPlaced: () => U(!0),
|
|
359
|
+
ref: E,
|
|
361
360
|
style: {
|
|
362
361
|
// flex layout so we can place the scroll buttons properly
|
|
363
362
|
display: "flex",
|
|
364
363
|
flexDirection: "column",
|
|
365
364
|
// reset the outline by default as the content MAY get focused
|
|
366
365
|
outline: "none",
|
|
367
|
-
...
|
|
366
|
+
...C.style
|
|
368
367
|
},
|
|
369
|
-
onKeyDown:
|
|
368
|
+
onKeyDown: b(C.onKeyDown, (m) => {
|
|
370
369
|
const I = m.ctrlKey || m.altKey || m.metaKey;
|
|
371
370
|
if (m.key === "Tab" && m.preventDefault(), !I && m.key.length === 1 && ie(m.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(m.key)) {
|
|
372
|
-
let
|
|
373
|
-
if (["ArrowUp", "End"].includes(m.key) && (
|
|
374
|
-
const w = m.target,
|
|
375
|
-
|
|
371
|
+
let x = W().filter((w) => !w.disabled).map((w) => w.ref.current);
|
|
372
|
+
if (["ArrowUp", "End"].includes(m.key) && (x = x.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(m.key)) {
|
|
373
|
+
const w = m.target, y = x.indexOf(w);
|
|
374
|
+
x = x.slice(y + 1);
|
|
376
375
|
}
|
|
377
|
-
setTimeout(() =>
|
|
376
|
+
setTimeout(() => R(x)), m.preventDefault();
|
|
378
377
|
}
|
|
379
378
|
})
|
|
380
379
|
}
|
|
@@ -387,85 +386,85 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
|
|
|
387
386
|
);
|
|
388
387
|
}
|
|
389
388
|
);
|
|
390
|
-
Ye.displayName =
|
|
389
|
+
Ye.displayName = Ut;
|
|
391
390
|
var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
392
|
-
const { __scopeSelect: e, onPlaced: r, ...n } = t, d = Z(ne, e),
|
|
393
|
-
if (d.trigger && d.valueNode &&
|
|
394
|
-
const
|
|
391
|
+
const { __scopeSelect: e, onPlaced: r, ...n } = t, d = Z(ne, e), a = J(ne, e), [s, c] = l.useState(null), [p, g] = l.useState(null), S = V(o, (E) => g(E)), _ = fe(e), P = l.useRef(!1), T = l.useRef(!0), { viewport: u, selectedItem: v, selectedItemText: C, focusSelectedItem: f } = a, h = l.useCallback(() => {
|
|
392
|
+
if (d.trigger && d.valueNode && s && p && u && v && C) {
|
|
393
|
+
const E = d.trigger.getBoundingClientRect(), L = p.getBoundingClientRect(), j = d.valueNode.getBoundingClientRect(), Q = C.getBoundingClientRect();
|
|
395
394
|
if (d.dir !== "rtl") {
|
|
396
|
-
const w = Q.left -
|
|
397
|
-
|
|
395
|
+
const w = Q.left - L.left, y = j.left - w, ee = E.left - y, te = E.width + ee, Se = Math.max(te, L.width), we = window.innerWidth - D, ye = Re(y, [
|
|
396
|
+
D,
|
|
398
397
|
// Prevents the content from going off the starting edge of the
|
|
399
398
|
// viewport. It may still go off the ending edge, but this can be
|
|
400
399
|
// controlled by the user since they may want to manage overflow in a
|
|
401
400
|
// specific way.
|
|
402
401
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
403
|
-
Math.max(
|
|
402
|
+
Math.max(D, we - Se)
|
|
404
403
|
]);
|
|
405
|
-
|
|
404
|
+
s.style.minWidth = te + "px", s.style.left = ye + "px";
|
|
406
405
|
} else {
|
|
407
|
-
const w =
|
|
408
|
-
|
|
409
|
-
Math.max(
|
|
406
|
+
const w = L.right - Q.right, y = window.innerWidth - j.right - w, ee = window.innerWidth - E.right - y, te = E.width + ee, Se = Math.max(te, L.width), we = window.innerWidth - D, ye = Re(y, [
|
|
407
|
+
D,
|
|
408
|
+
Math.max(D, we - Se)
|
|
410
409
|
]);
|
|
411
|
-
|
|
410
|
+
s.style.minWidth = te + "px", s.style.right = ye + "px";
|
|
412
411
|
}
|
|
413
|
-
const
|
|
412
|
+
const H = _(), W = window.innerHeight - D * 2, G = u.scrollHeight, U = window.getComputedStyle(p), F = parseInt(U.borderTopWidth, 10), R = parseInt(U.paddingTop, 10), k = parseInt(U.borderBottomWidth, 10), K = parseInt(U.paddingBottom, 10), Y = F + R + G + K + k, he = Math.min(v.offsetHeight * 5, Y), ie = window.getComputedStyle(u), ve = parseInt(ie.paddingTop, 10), ge = parseInt(ie.paddingBottom, 10), re = E.top + E.height / 2 - D, de = W - re, se = v.offsetHeight / 2, m = v.offsetTop + se, I = F + R + m, O = Y - I;
|
|
414
413
|
if (I <= re) {
|
|
415
|
-
const w =
|
|
416
|
-
|
|
417
|
-
const
|
|
414
|
+
const w = H.length > 0 && v === H[H.length - 1].ref.current;
|
|
415
|
+
s.style.bottom = "0px";
|
|
416
|
+
const y = p.clientHeight - u.offsetTop - u.offsetHeight, ee = Math.max(
|
|
418
417
|
de,
|
|
419
|
-
|
|
420
|
-
(w ?
|
|
418
|
+
se + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
419
|
+
(w ? ge : 0) + y + k
|
|
421
420
|
), te = I + ee;
|
|
422
|
-
|
|
421
|
+
s.style.height = te + "px";
|
|
423
422
|
} else {
|
|
424
|
-
const w =
|
|
425
|
-
|
|
423
|
+
const w = H.length > 0 && v === H[0].ref.current;
|
|
424
|
+
s.style.top = "0px";
|
|
426
425
|
const ee = Math.max(
|
|
427
426
|
re,
|
|
428
427
|
F + u.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
429
|
-
(w ?
|
|
428
|
+
(w ? ve : 0) + se
|
|
430
429
|
) + O;
|
|
431
|
-
|
|
430
|
+
s.style.height = ee + "px", u.scrollTop = I - re + u.offsetTop;
|
|
432
431
|
}
|
|
433
|
-
|
|
432
|
+
s.style.margin = `${D}px 0`, s.style.minHeight = he + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => P.current = !0);
|
|
434
433
|
}
|
|
435
434
|
}, [
|
|
436
|
-
|
|
435
|
+
_,
|
|
437
436
|
d.trigger,
|
|
438
437
|
d.valueNode,
|
|
439
|
-
|
|
438
|
+
s,
|
|
440
439
|
p,
|
|
441
440
|
u,
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
v,
|
|
442
|
+
C,
|
|
444
443
|
d.dir,
|
|
445
444
|
r
|
|
446
445
|
]);
|
|
447
|
-
|
|
446
|
+
z(() => h(), [h]);
|
|
448
447
|
const [M, A] = l.useState();
|
|
449
|
-
|
|
448
|
+
z(() => {
|
|
450
449
|
p && A(window.getComputedStyle(p).zIndex);
|
|
451
450
|
}, [p]);
|
|
452
|
-
const
|
|
453
|
-
(
|
|
454
|
-
|
|
451
|
+
const ce = l.useCallback(
|
|
452
|
+
(E) => {
|
|
453
|
+
E && T.current === !0 && (h(), f == null || f(), T.current = !1);
|
|
455
454
|
},
|
|
456
455
|
[h, f]
|
|
457
456
|
);
|
|
458
457
|
return /* @__PURE__ */ i(
|
|
459
|
-
|
|
458
|
+
jt,
|
|
460
459
|
{
|
|
461
460
|
scope: e,
|
|
462
|
-
contentWrapper:
|
|
463
|
-
shouldExpandOnScrollRef:
|
|
464
|
-
onScrollButtonChange:
|
|
461
|
+
contentWrapper: s,
|
|
462
|
+
shouldExpandOnScrollRef: P,
|
|
463
|
+
onScrollButtonChange: ce,
|
|
465
464
|
children: /* @__PURE__ */ i(
|
|
466
465
|
"div",
|
|
467
466
|
{
|
|
468
|
-
ref:
|
|
467
|
+
ref: c,
|
|
469
468
|
style: {
|
|
470
469
|
display: "flex",
|
|
471
470
|
flexDirection: "column",
|
|
@@ -476,7 +475,7 @@ var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
|
476
475
|
N.div,
|
|
477
476
|
{
|
|
478
477
|
...n,
|
|
479
|
-
ref:
|
|
478
|
+
ref: S,
|
|
480
479
|
style: {
|
|
481
480
|
// When we get the height of the content, it includes borders. If we were to set
|
|
482
481
|
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
@@ -493,17 +492,17 @@ var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
|
493
492
|
);
|
|
494
493
|
});
|
|
495
494
|
$e.displayName = Kt;
|
|
496
|
-
var
|
|
495
|
+
var zt = "SelectPopperPosition", xe = l.forwardRef((t, o) => {
|
|
497
496
|
const {
|
|
498
497
|
__scopeSelect: e,
|
|
499
498
|
align: r = "start",
|
|
500
|
-
collisionPadding: n =
|
|
499
|
+
collisionPadding: n = D,
|
|
501
500
|
...d
|
|
502
|
-
} = t,
|
|
501
|
+
} = t, a = me(e);
|
|
503
502
|
return /* @__PURE__ */ i(
|
|
504
|
-
|
|
503
|
+
Pt,
|
|
505
504
|
{
|
|
506
|
-
...
|
|
505
|
+
...a,
|
|
507
506
|
...d,
|
|
508
507
|
ref: o,
|
|
509
508
|
align: r,
|
|
@@ -521,11 +520,11 @@ var jt = "SelectPopperPosition", ye = l.forwardRef((t, o) => {
|
|
|
521
520
|
}
|
|
522
521
|
);
|
|
523
522
|
});
|
|
524
|
-
|
|
525
|
-
var [
|
|
523
|
+
xe.displayName = zt;
|
|
524
|
+
var [jt, Ee] = le(ne, {}), _e = "SelectViewport", qe = l.forwardRef(
|
|
526
525
|
(t, o) => {
|
|
527
|
-
const { __scopeSelect: e, nonce: r, ...n } = t, d = J(
|
|
528
|
-
return /* @__PURE__ */ $(
|
|
526
|
+
const { __scopeSelect: e, nonce: r, ...n } = t, d = J(_e, e), a = Ee(_e, e), s = V(o, d.onViewportChange), c = l.useRef(0);
|
|
527
|
+
return /* @__PURE__ */ $(be, { children: [
|
|
529
528
|
/* @__PURE__ */ i(
|
|
530
529
|
"style",
|
|
531
530
|
{
|
|
@@ -541,7 +540,7 @@ var [Gt, Re] = le(ne, {}), Ce = "SelectViewport", qe = l.forwardRef(
|
|
|
541
540
|
"data-radix-select-viewport": "",
|
|
542
541
|
role: "presentation",
|
|
543
542
|
...n,
|
|
544
|
-
ref:
|
|
543
|
+
ref: s,
|
|
545
544
|
style: {
|
|
546
545
|
// we use position: 'relative' here on the `viewport` so that when we call
|
|
547
546
|
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
@@ -555,63 +554,63 @@ var [Gt, Re] = le(ne, {}), Ce = "SelectViewport", qe = l.forwardRef(
|
|
|
555
554
|
overflow: "hidden auto",
|
|
556
555
|
...n.style
|
|
557
556
|
},
|
|
558
|
-
onScroll:
|
|
559
|
-
const
|
|
560
|
-
if (
|
|
561
|
-
const
|
|
562
|
-
if (
|
|
563
|
-
const
|
|
564
|
-
if (
|
|
565
|
-
const f =
|
|
566
|
-
|
|
557
|
+
onScroll: b(n.onScroll, (p) => {
|
|
558
|
+
const g = p.currentTarget, { contentWrapper: S, shouldExpandOnScrollRef: _ } = a;
|
|
559
|
+
if (_ != null && _.current && S) {
|
|
560
|
+
const P = Math.abs(c.current - g.scrollTop);
|
|
561
|
+
if (P > 0) {
|
|
562
|
+
const T = window.innerHeight - D * 2, u = parseFloat(S.style.minHeight), v = parseFloat(S.style.height), C = Math.max(u, v);
|
|
563
|
+
if (C < T) {
|
|
564
|
+
const f = C + P, h = Math.min(T, f), M = f - h;
|
|
565
|
+
S.style.height = h + "px", S.style.bottom === "0px" && (g.scrollTop = M > 0 ? M : 0, S.style.justifyContent = "flex-end");
|
|
567
566
|
}
|
|
568
567
|
}
|
|
569
568
|
}
|
|
570
|
-
|
|
569
|
+
c.current = g.scrollTop;
|
|
571
570
|
})
|
|
572
571
|
}
|
|
573
572
|
) })
|
|
574
573
|
] });
|
|
575
574
|
}
|
|
576
575
|
);
|
|
577
|
-
qe.displayName =
|
|
578
|
-
var Xe = "SelectGroup", [
|
|
576
|
+
qe.displayName = _e;
|
|
577
|
+
var Xe = "SelectGroup", [Gt, Yt] = le(Xe), $t = l.forwardRef(
|
|
579
578
|
(t, o) => {
|
|
580
579
|
const { __scopeSelect: e, ...r } = t, n = Ne();
|
|
581
|
-
return /* @__PURE__ */ i(
|
|
580
|
+
return /* @__PURE__ */ i(Gt, { scope: e, id: n, children: /* @__PURE__ */ i(N.div, { role: "group", "aria-labelledby": n, ...r, ref: o }) });
|
|
582
581
|
}
|
|
583
582
|
);
|
|
584
|
-
|
|
585
|
-
var Ze = "SelectLabel",
|
|
583
|
+
$t.displayName = Xe;
|
|
584
|
+
var Ze = "SelectLabel", qt = l.forwardRef(
|
|
586
585
|
(t, o) => {
|
|
587
|
-
const { __scopeSelect: e, ...r } = t, n =
|
|
586
|
+
const { __scopeSelect: e, ...r } = t, n = Yt(Ze, e);
|
|
588
587
|
return /* @__PURE__ */ i(N.div, { id: n.id, ...r, ref: o });
|
|
589
588
|
}
|
|
590
589
|
);
|
|
591
|
-
|
|
592
|
-
var ue = "SelectItem", [
|
|
590
|
+
qt.displayName = Ze;
|
|
591
|
+
var ue = "SelectItem", [Xt, Je] = le(ue), Qe = l.forwardRef(
|
|
593
592
|
(t, o) => {
|
|
594
593
|
const {
|
|
595
594
|
__scopeSelect: e,
|
|
596
595
|
value: r,
|
|
597
596
|
disabled: n = !1,
|
|
598
597
|
textValue: d,
|
|
599
|
-
...
|
|
600
|
-
} = t,
|
|
598
|
+
...a
|
|
599
|
+
} = t, s = Z(ue, e), c = J(ue, e), p = s.value === r, [g, S] = l.useState(d ?? ""), [_, P] = l.useState(!1), T = V(
|
|
601
600
|
o,
|
|
602
601
|
(f) => {
|
|
603
602
|
var h;
|
|
604
|
-
return (h =
|
|
603
|
+
return (h = c.itemRefCallback) == null ? void 0 : h.call(c, f, r, n);
|
|
605
604
|
}
|
|
606
|
-
), u = Ne(),
|
|
607
|
-
n || (
|
|
605
|
+
), u = Ne(), v = l.useRef("touch"), C = () => {
|
|
606
|
+
n || (s.onValueChange(r), s.onOpenChange(!1));
|
|
608
607
|
};
|
|
609
608
|
if (r === "")
|
|
610
609
|
throw new Error(
|
|
611
610
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
612
611
|
);
|
|
613
612
|
return /* @__PURE__ */ i(
|
|
614
|
-
|
|
613
|
+
Xt,
|
|
615
614
|
{
|
|
616
615
|
scope: e,
|
|
617
616
|
value: r,
|
|
@@ -619,7 +618,7 @@ var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
|
|
|
619
618
|
textId: u,
|
|
620
619
|
isSelected: p,
|
|
621
620
|
onItemTextChange: l.useCallback((f) => {
|
|
622
|
-
|
|
621
|
+
S((h) => h || ((f == null ? void 0 : f.textContent) ?? "").trim());
|
|
623
622
|
}, []),
|
|
624
623
|
children: /* @__PURE__ */ i(
|
|
625
624
|
pe.ItemSlot,
|
|
@@ -627,42 +626,42 @@ var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
|
|
|
627
626
|
scope: e,
|
|
628
627
|
value: r,
|
|
629
628
|
disabled: n,
|
|
630
|
-
textValue:
|
|
629
|
+
textValue: g,
|
|
631
630
|
children: /* @__PURE__ */ i(
|
|
632
631
|
N.div,
|
|
633
632
|
{
|
|
634
633
|
role: "option",
|
|
635
634
|
"aria-labelledby": u,
|
|
636
|
-
"data-highlighted":
|
|
637
|
-
"aria-selected": p &&
|
|
635
|
+
"data-highlighted": _ ? "" : void 0,
|
|
636
|
+
"aria-selected": p && _,
|
|
638
637
|
"data-state": p ? "checked" : "unchecked",
|
|
639
638
|
"aria-disabled": n || void 0,
|
|
640
639
|
"data-disabled": n ? "" : void 0,
|
|
641
640
|
tabIndex: n ? void 0 : -1,
|
|
642
|
-
...
|
|
643
|
-
ref:
|
|
644
|
-
onFocus:
|
|
645
|
-
onBlur:
|
|
646
|
-
onClick:
|
|
647
|
-
|
|
641
|
+
...a,
|
|
642
|
+
ref: T,
|
|
643
|
+
onFocus: b(a.onFocus, () => P(!0)),
|
|
644
|
+
onBlur: b(a.onBlur, () => P(!1)),
|
|
645
|
+
onClick: b(a.onClick, () => {
|
|
646
|
+
v.current !== "mouse" && C();
|
|
648
647
|
}),
|
|
649
|
-
onPointerUp:
|
|
650
|
-
|
|
648
|
+
onPointerUp: b(a.onPointerUp, () => {
|
|
649
|
+
v.current === "mouse" && C();
|
|
651
650
|
}),
|
|
652
|
-
onPointerDown:
|
|
653
|
-
|
|
651
|
+
onPointerDown: b(a.onPointerDown, (f) => {
|
|
652
|
+
v.current = f.pointerType;
|
|
654
653
|
}),
|
|
655
|
-
onPointerMove:
|
|
654
|
+
onPointerMove: b(a.onPointerMove, (f) => {
|
|
656
655
|
var h;
|
|
657
|
-
|
|
656
|
+
v.current = f.pointerType, n ? (h = c.onItemLeave) == null || h.call(c) : v.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
|
|
658
657
|
}),
|
|
659
|
-
onPointerLeave:
|
|
658
|
+
onPointerLeave: b(a.onPointerLeave, (f) => {
|
|
660
659
|
var h;
|
|
661
|
-
f.currentTarget === document.activeElement && ((h =
|
|
660
|
+
f.currentTarget === document.activeElement && ((h = c.onItemLeave) == null || h.call(c));
|
|
662
661
|
}),
|
|
663
|
-
onKeyDown:
|
|
662
|
+
onKeyDown: b(a.onKeyDown, (f) => {
|
|
664
663
|
var M;
|
|
665
|
-
((M =
|
|
664
|
+
((M = c.searchRef) == null ? void 0 : M.current) !== "" && f.key === " " || (Dt.includes(f.key) && C(), f.key === " " && f.preventDefault());
|
|
666
665
|
})
|
|
667
666
|
}
|
|
668
667
|
)
|
|
@@ -675,21 +674,21 @@ var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
|
|
|
675
674
|
Qe.displayName = ue;
|
|
676
675
|
var ae = "SelectItemText", et = l.forwardRef(
|
|
677
676
|
(t, o) => {
|
|
678
|
-
const { __scopeSelect: e, className: r, style: n, ...d } = t,
|
|
677
|
+
const { __scopeSelect: e, className: r, style: n, ...d } = t, a = Z(ae, e), s = J(ae, e), c = Je(ae, e), p = Vt(ae, e), [g, S] = l.useState(null), _ = V(
|
|
679
678
|
o,
|
|
680
|
-
(
|
|
681
|
-
|
|
682
|
-
(
|
|
679
|
+
(C) => S(C),
|
|
680
|
+
c.onItemTextChange,
|
|
681
|
+
(C) => {
|
|
683
682
|
var f;
|
|
684
|
-
return (f =
|
|
683
|
+
return (f = s.itemTextRefCallback) == null ? void 0 : f.call(s, C, c.value, c.disabled);
|
|
685
684
|
}
|
|
686
|
-
),
|
|
687
|
-
() => /* @__PURE__ */ i("option", { value:
|
|
688
|
-
[
|
|
689
|
-
), { onNativeOptionAdd: u, onNativeOptionRemove:
|
|
690
|
-
return
|
|
691
|
-
/* @__PURE__ */ i(N.span, { id:
|
|
692
|
-
|
|
685
|
+
), P = g == null ? void 0 : g.textContent, T = l.useMemo(
|
|
686
|
+
() => /* @__PURE__ */ i("option", { value: c.value, disabled: c.disabled, children: P }, c.value),
|
|
687
|
+
[c.disabled, c.value, P]
|
|
688
|
+
), { onNativeOptionAdd: u, onNativeOptionRemove: v } = p;
|
|
689
|
+
return z(() => (u(T), () => v(T)), [u, v, T]), /* @__PURE__ */ $(be, { children: [
|
|
690
|
+
/* @__PURE__ */ i(N.span, { id: c.textId, ...d, ref: _ }),
|
|
691
|
+
c.isSelected && a.valueNode && !a.valueNodeHasChildren ? De.createPortal(d.children, a.valueNode) : null
|
|
693
692
|
] });
|
|
694
693
|
}
|
|
695
694
|
);
|
|
@@ -702,130 +701,130 @@ var tt = "SelectItemIndicator", ot = l.forwardRef(
|
|
|
702
701
|
);
|
|
703
702
|
ot.displayName = tt;
|
|
704
703
|
var Ie = "SelectScrollUpButton", nt = l.forwardRef((t, o) => {
|
|
705
|
-
const e = J(Ie, t.__scopeSelect), r =
|
|
706
|
-
return
|
|
704
|
+
const e = J(Ie, t.__scopeSelect), r = Ee(Ie, t.__scopeSelect), [n, d] = l.useState(!1), a = V(o, r.onScrollButtonChange);
|
|
705
|
+
return z(() => {
|
|
707
706
|
if (e.viewport && e.isPositioned) {
|
|
708
|
-
let
|
|
709
|
-
const p =
|
|
707
|
+
let s = function() {
|
|
708
|
+
const p = c.scrollTop > 0;
|
|
710
709
|
d(p);
|
|
711
710
|
};
|
|
712
|
-
const
|
|
713
|
-
return
|
|
711
|
+
const c = e.viewport;
|
|
712
|
+
return s(), c.addEventListener("scroll", s), () => c.removeEventListener("scroll", s);
|
|
714
713
|
}
|
|
715
714
|
}, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
|
|
716
715
|
lt,
|
|
717
716
|
{
|
|
718
717
|
...t,
|
|
719
|
-
ref:
|
|
718
|
+
ref: a,
|
|
720
719
|
onAutoScroll: () => {
|
|
721
|
-
const { viewport:
|
|
722
|
-
|
|
720
|
+
const { viewport: s, selectedItem: c } = e;
|
|
721
|
+
s && c && (s.scrollTop = s.scrollTop - c.offsetHeight);
|
|
723
722
|
}
|
|
724
723
|
}
|
|
725
724
|
) : null;
|
|
726
725
|
});
|
|
727
726
|
nt.displayName = Ie;
|
|
728
727
|
var Te = "SelectScrollDownButton", rt = l.forwardRef((t, o) => {
|
|
729
|
-
const e = J(Te, t.__scopeSelect), r =
|
|
730
|
-
return
|
|
728
|
+
const e = J(Te, t.__scopeSelect), r = Ee(Te, t.__scopeSelect), [n, d] = l.useState(!1), a = V(o, r.onScrollButtonChange);
|
|
729
|
+
return z(() => {
|
|
731
730
|
if (e.viewport && e.isPositioned) {
|
|
732
|
-
let
|
|
733
|
-
const p =
|
|
734
|
-
d(
|
|
731
|
+
let s = function() {
|
|
732
|
+
const p = c.scrollHeight - c.clientHeight, g = Math.ceil(c.scrollTop) < p;
|
|
733
|
+
d(g);
|
|
735
734
|
};
|
|
736
|
-
const
|
|
737
|
-
return
|
|
735
|
+
const c = e.viewport;
|
|
736
|
+
return s(), c.addEventListener("scroll", s), () => c.removeEventListener("scroll", s);
|
|
738
737
|
}
|
|
739
738
|
}, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
|
|
740
739
|
lt,
|
|
741
740
|
{
|
|
742
741
|
...t,
|
|
743
|
-
ref:
|
|
742
|
+
ref: a,
|
|
744
743
|
onAutoScroll: () => {
|
|
745
|
-
const { viewport:
|
|
746
|
-
|
|
744
|
+
const { viewport: s, selectedItem: c } = e;
|
|
745
|
+
s && c && (s.scrollTop = s.scrollTop + c.offsetHeight);
|
|
747
746
|
}
|
|
748
747
|
}
|
|
749
748
|
) : null;
|
|
750
749
|
});
|
|
751
750
|
rt.displayName = Te;
|
|
752
751
|
var lt = l.forwardRef((t, o) => {
|
|
753
|
-
const { __scopeSelect: e, onAutoScroll: r, ...n } = t, d = J("SelectScrollButton", e),
|
|
754
|
-
|
|
752
|
+
const { __scopeSelect: e, onAutoScroll: r, ...n } = t, d = J("SelectScrollButton", e), a = l.useRef(null), s = fe(e), c = l.useCallback(() => {
|
|
753
|
+
a.current !== null && (window.clearInterval(a.current), a.current = null);
|
|
755
754
|
}, []);
|
|
756
|
-
return l.useEffect(() => () =>
|
|
757
|
-
var
|
|
758
|
-
const p =
|
|
759
|
-
(
|
|
760
|
-
}, [
|
|
755
|
+
return l.useEffect(() => () => c(), [c]), z(() => {
|
|
756
|
+
var g;
|
|
757
|
+
const p = s().find((S) => S.ref.current === document.activeElement);
|
|
758
|
+
(g = p == null ? void 0 : p.ref.current) == null || g.scrollIntoView({ block: "nearest" });
|
|
759
|
+
}, [s]), /* @__PURE__ */ i(
|
|
761
760
|
N.div,
|
|
762
761
|
{
|
|
763
762
|
"aria-hidden": !0,
|
|
764
763
|
...n,
|
|
765
764
|
ref: o,
|
|
766
765
|
style: { flexShrink: 0, ...n.style },
|
|
767
|
-
onPointerDown:
|
|
768
|
-
|
|
766
|
+
onPointerDown: b(n.onPointerDown, () => {
|
|
767
|
+
a.current === null && (a.current = window.setInterval(r, 50));
|
|
769
768
|
}),
|
|
770
|
-
onPointerMove:
|
|
769
|
+
onPointerMove: b(n.onPointerMove, () => {
|
|
771
770
|
var p;
|
|
772
|
-
(p = d.onItemLeave) == null || p.call(d),
|
|
771
|
+
(p = d.onItemLeave) == null || p.call(d), a.current === null && (a.current = window.setInterval(r, 50));
|
|
773
772
|
}),
|
|
774
|
-
onPointerLeave:
|
|
775
|
-
|
|
773
|
+
onPointerLeave: b(n.onPointerLeave, () => {
|
|
774
|
+
c();
|
|
776
775
|
})
|
|
777
776
|
}
|
|
778
777
|
);
|
|
779
|
-
}),
|
|
778
|
+
}), Zt = "SelectSeparator", Jt = l.forwardRef(
|
|
780
779
|
(t, o) => {
|
|
781
780
|
const { __scopeSelect: e, ...r } = t;
|
|
782
781
|
return /* @__PURE__ */ i(N.div, { "aria-hidden": !0, ...r, ref: o });
|
|
783
782
|
}
|
|
784
783
|
);
|
|
785
|
-
|
|
786
|
-
var
|
|
784
|
+
Jt.displayName = Zt;
|
|
785
|
+
var Pe = "SelectArrow", Qt = l.forwardRef(
|
|
787
786
|
(t, o) => {
|
|
788
|
-
const { __scopeSelect: e, ...r } = t, n = me(e), d = Z(
|
|
789
|
-
return d.open &&
|
|
787
|
+
const { __scopeSelect: e, ...r } = t, n = me(e), d = Z(Pe, e), a = J(Pe, e);
|
|
788
|
+
return d.open && a.position === "popper" ? /* @__PURE__ */ i(bt, { ...n, ...r, ref: o }) : null;
|
|
790
789
|
}
|
|
791
790
|
);
|
|
792
|
-
|
|
793
|
-
var
|
|
791
|
+
Qt.displayName = Pe;
|
|
792
|
+
var eo = "SelectBubbleInput", ct = l.forwardRef(
|
|
794
793
|
({ __scopeSelect: t, value: o, ...e }, r) => {
|
|
795
|
-
const n = l.useRef(null), d =
|
|
794
|
+
const n = l.useRef(null), d = V(r, n), a = Nt(o);
|
|
796
795
|
return l.useEffect(() => {
|
|
797
|
-
const
|
|
798
|
-
if (!
|
|
799
|
-
const
|
|
800
|
-
|
|
796
|
+
const s = n.current;
|
|
797
|
+
if (!s) return;
|
|
798
|
+
const c = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
|
|
799
|
+
c,
|
|
801
800
|
"value"
|
|
802
801
|
).set;
|
|
803
|
-
if (
|
|
804
|
-
const
|
|
805
|
-
|
|
802
|
+
if (a !== o && g) {
|
|
803
|
+
const S = new Event("change", { bubbles: !0 });
|
|
804
|
+
g.call(s, o), s.dispatchEvent(S);
|
|
806
805
|
}
|
|
807
|
-
}, [
|
|
806
|
+
}, [a, o]), /* @__PURE__ */ i(
|
|
808
807
|
N.select,
|
|
809
808
|
{
|
|
810
809
|
...e,
|
|
811
|
-
style: { ...
|
|
810
|
+
style: { ...Be, ...e.style },
|
|
812
811
|
ref: d,
|
|
813
812
|
defaultValue: o
|
|
814
813
|
}
|
|
815
814
|
);
|
|
816
815
|
}
|
|
817
816
|
);
|
|
818
|
-
|
|
819
|
-
function
|
|
817
|
+
ct.displayName = eo;
|
|
818
|
+
function st(t) {
|
|
820
819
|
return t === "" || t === void 0;
|
|
821
820
|
}
|
|
822
821
|
function at(t) {
|
|
823
|
-
const o =
|
|
824
|
-
(
|
|
825
|
-
const
|
|
826
|
-
o(
|
|
827
|
-
e.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() =>
|
|
828
|
-
}(
|
|
822
|
+
const o = yt(t), e = l.useRef(""), r = l.useRef(0), n = l.useCallback(
|
|
823
|
+
(a) => {
|
|
824
|
+
const s = e.current + a;
|
|
825
|
+
o(s), function c(p) {
|
|
826
|
+
e.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() => c(""), 1e3));
|
|
827
|
+
}(s);
|
|
829
828
|
},
|
|
830
829
|
[o]
|
|
831
830
|
), d = l.useCallback(() => {
|
|
@@ -835,17 +834,17 @@ function at(t) {
|
|
|
835
834
|
}
|
|
836
835
|
function it(t, o, e) {
|
|
837
836
|
const n = o.length > 1 && Array.from(o).every((p) => p === o[0]) ? o[0] : o, d = e ? t.indexOf(e) : -1;
|
|
838
|
-
let
|
|
839
|
-
n.length === 1 && (
|
|
840
|
-
const
|
|
837
|
+
let a = to(t, Math.max(d, 0));
|
|
838
|
+
n.length === 1 && (a = a.filter((p) => p !== e));
|
|
839
|
+
const c = a.find(
|
|
841
840
|
(p) => p.textValue.toLowerCase().startsWith(n.toLowerCase())
|
|
842
841
|
);
|
|
843
|
-
return
|
|
842
|
+
return c !== e ? c : void 0;
|
|
844
843
|
}
|
|
845
|
-
function
|
|
844
|
+
function to(t, o) {
|
|
846
845
|
return t.map((e, r) => t[(o + r) % t.length]);
|
|
847
846
|
}
|
|
848
|
-
var
|
|
847
|
+
var oo = Ve, no = We, ro = Fe, lo = Ke, co = ze, so = je, ao = qe, io = Qe, uo = et, po = ot, fo = nt, mo = rt, dt = {
|
|
849
848
|
color: void 0,
|
|
850
849
|
size: void 0,
|
|
851
850
|
className: void 0,
|
|
@@ -859,7 +858,7 @@ var no = Be, ro = He, lo = Fe, so = Ue, co = Ke, ao = je, io = qe, uo = Qe, po =
|
|
|
859
858
|
}
|
|
860
859
|
return t;
|
|
861
860
|
}, X.apply(this, arguments);
|
|
862
|
-
},
|
|
861
|
+
}, ho = function(t, o) {
|
|
863
862
|
var e = {};
|
|
864
863
|
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && o.indexOf(r) < 0 && (e[r] = t[r]);
|
|
865
864
|
if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, r = Object.getOwnPropertySymbols(t); n < r.length; n++)
|
|
@@ -882,18 +881,18 @@ function pt(t) {
|
|
|
882
881
|
}
|
|
883
882
|
function vo(t) {
|
|
884
883
|
var o = function(e) {
|
|
885
|
-
var r = t.attr, n = t.size, d = t.title,
|
|
886
|
-
return e.className && (
|
|
884
|
+
var r = t.attr, n = t.size, d = t.title, a = ho(t, ["attr", "size", "title"]), s = n || e.size || "1em", c;
|
|
885
|
+
return e.className && (c = e.className), t.className && (c = (c ? c + " " : "") + t.className), q.createElement("svg", X({
|
|
887
886
|
stroke: "currentColor",
|
|
888
887
|
fill: "currentColor",
|
|
889
888
|
strokeWidth: "0"
|
|
890
|
-
}, e.attr, r,
|
|
891
|
-
className:
|
|
889
|
+
}, e.attr, r, a, {
|
|
890
|
+
className: c,
|
|
892
891
|
style: X(X({
|
|
893
892
|
color: t.color || e.color
|
|
894
893
|
}, e.style), t.style),
|
|
895
|
-
height:
|
|
896
|
-
width:
|
|
894
|
+
height: s,
|
|
895
|
+
width: s,
|
|
897
896
|
xmlns: "http://www.w3.org/2000/svg"
|
|
898
897
|
}), d && q.createElement("title", null, d), t.children);
|
|
899
898
|
};
|
|
@@ -904,70 +903,52 @@ function vo(t) {
|
|
|
904
903
|
function Ae(t) {
|
|
905
904
|
return pt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" } }] })(t);
|
|
906
905
|
}
|
|
907
|
-
function
|
|
906
|
+
function go(t) {
|
|
908
907
|
return pt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" } }] })(t);
|
|
909
908
|
}
|
|
910
|
-
const So = "cfxui__Select__trigger__232e4", wo = "cfxui__Select__fullWidth__739d7",
|
|
909
|
+
const So = "cfxui__Select__trigger__232e4", wo = "cfxui__Select__fullWidth__739d7", yo = "cfxui__Select__icon__36b6c", Co = "cfxui__Select__content__067da", xo = "cfxui__Select__arrow__8e7eb", _o = "cfxui__Select__option__2de5d", Io = "cfxui__Select__tickIcon__71e80", B = {
|
|
911
910
|
trigger: So,
|
|
912
911
|
fullWidth: wo,
|
|
913
|
-
icon:
|
|
914
|
-
content:
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
tickIcon: bo,
|
|
919
|
-
"select-size-initial-large": "cfxui__Select__select-size-initial-large__5e47d",
|
|
920
|
-
"select-size-initial-small": "cfxui__Select__select-size-initial-small__5ae12",
|
|
921
|
-
"select-size-small-large": "cfxui__Select__select-size-small-large__79811",
|
|
922
|
-
"select-size-small-small": "cfxui__Select__select-size-small-small__1c10c",
|
|
923
|
-
"select-size-small-medium-large": "cfxui__Select__select-size-small-medium-large__0bc35",
|
|
924
|
-
"select-size-small-medium-small": "cfxui__Select__select-size-small-medium-small__82515",
|
|
925
|
-
"select-size-medium-large": "cfxui__Select__select-size-medium-large__e0eb0",
|
|
926
|
-
"select-size-medium-small": "cfxui__Select__select-size-medium-small__2c904",
|
|
927
|
-
"select-size-medium-large-large": "cfxui__Select__select-size-medium-large-large__a66c1",
|
|
928
|
-
"select-size-medium-large-small": "cfxui__Select__select-size-medium-large-small__7dce3",
|
|
929
|
-
"select-size-large-large": "cfxui__Select__select-size-large-large__88062",
|
|
930
|
-
"select-size-large-small": "cfxui__Select__select-size-large-small__fb50b",
|
|
931
|
-
"select-size-xlarge-large": "cfxui__Select__select-size-xlarge-large__5abb1",
|
|
932
|
-
"select-size-xlarge-small": "cfxui__Select__select-size-xlarge-small__5ddbb"
|
|
912
|
+
icon: yo,
|
|
913
|
+
content: Co,
|
|
914
|
+
arrow: xo,
|
|
915
|
+
option: _o,
|
|
916
|
+
tickIcon: Io
|
|
933
917
|
};
|
|
934
|
-
function
|
|
918
|
+
function ko(t) {
|
|
935
919
|
const {
|
|
936
920
|
value: o,
|
|
937
921
|
options: e,
|
|
938
922
|
onChange: r,
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
disabled: c = !1,
|
|
923
|
+
placeholder: n,
|
|
924
|
+
disabled: d = !1,
|
|
942
925
|
fullWidth: a = !1,
|
|
943
926
|
className: s
|
|
944
|
-
} = t, [
|
|
927
|
+
} = t, [c, p] = q.useState(!1), g = Ce(
|
|
945
928
|
s,
|
|
946
|
-
|
|
947
|
-
_,
|
|
929
|
+
B.trigger,
|
|
948
930
|
{
|
|
949
|
-
[
|
|
950
|
-
[
|
|
931
|
+
[B.disabled]: d,
|
|
932
|
+
[B.fullWidth]: a
|
|
951
933
|
}
|
|
952
|
-
),
|
|
953
|
-
|
|
954
|
-
_
|
|
934
|
+
), S = Ce(
|
|
935
|
+
B.content
|
|
955
936
|
);
|
|
956
|
-
return /* @__PURE__ */ $(
|
|
957
|
-
/* @__PURE__ */ $(
|
|
958
|
-
/* @__PURE__ */ i(
|
|
959
|
-
/* @__PURE__ */ i(
|
|
937
|
+
return /* @__PURE__ */ $(oo, { value: o, onValueChange: r, onOpenChange: p, open: c, children: [
|
|
938
|
+
/* @__PURE__ */ $(no, { disabled: d, className: g, children: [
|
|
939
|
+
/* @__PURE__ */ i(ro, { placeholder: n }),
|
|
940
|
+
/* @__PURE__ */ i(lo, { className: B.icon, children: /* @__PURE__ */ i(Ae, {}) })
|
|
960
941
|
] }),
|
|
961
|
-
/* @__PURE__ */ i(co, { children: /* @__PURE__ */ $(
|
|
962
|
-
/* @__PURE__ */ i(
|
|
963
|
-
/* @__PURE__ */ i(
|
|
964
|
-
/* @__PURE__ */ i(
|
|
965
|
-
/* @__PURE__ */ i(
|
|
966
|
-
] },
|
|
967
|
-
/* @__PURE__ */ i(
|
|
942
|
+
/* @__PURE__ */ i(co, { children: /* @__PURE__ */ $(so, { className: S, children: [
|
|
943
|
+
/* @__PURE__ */ i(fo, { className: B.arrow, children: /* @__PURE__ */ i(go, {}) }),
|
|
944
|
+
/* @__PURE__ */ i(ao, { children: e.map((_) => /* @__PURE__ */ $(io, { value: _.value, className: Ce(B.option), children: [
|
|
945
|
+
/* @__PURE__ */ i(uo, { children: _.label }),
|
|
946
|
+
/* @__PURE__ */ i(po, { className: B.indicator, children: /* @__PURE__ */ i(Et, { name: "Tick", className: B.tickIcon }) })
|
|
947
|
+
] }, _.value)) }),
|
|
948
|
+
/* @__PURE__ */ i(mo, { className: B.arrow, children: /* @__PURE__ */ i(Ae, {}) })
|
|
968
949
|
] }) })
|
|
969
950
|
] });
|
|
970
951
|
}
|
|
971
952
|
export {
|
|
972
|
-
|
|
953
|
+
ko as Select
|
|
973
954
|
};
|