@coopdigital/react 0.54.0 → 0.56.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 -2
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Card/Card.js +4 -4
- package/dist/components/DatePicker/DatePicker.d.ts +2 -1
- package/dist/components/DatePicker/DatePicker.js +7 -6
- package/dist/components/DatePicker/datepicker-utils.js +1 -5
- package/dist/components/Expandable/Expandable.js +1 -1
- package/dist/components/Field/Field.d.ts +7 -24
- package/dist/components/Field/Field.js +11 -18
- package/dist/components/Field/index.js +0 -1
- package/dist/components/Fieldset/Fieldset.d.ts +12 -17
- package/dist/components/Fieldset/Fieldset.js +6 -8
- package/dist/components/Pill/Pill.js +2 -2
- package/dist/components/Popover/Popover.js +6 -6
- package/dist/components/Searchbox/Searchbox.d.ts +1 -1
- package/dist/components/Searchbox/Searchbox.js +5 -5
- package/dist/components/Signpost/Signpost.js +2 -2
- package/dist/components/Tag/Tag.js +2 -2
- package/dist/components/TextInput/TextInput.d.ts +5 -1
- package/dist/components/TextInput/TextInput.js +8 -2
- package/dist/components/Textarea/Textarea.js +2 -0
- package/dist/components/icons/AccountCircleFilledIcon.d.ts +6 -0
- package/dist/components/icons/AccountCircleFilledIcon.js +20 -0
- package/dist/components/icons/AccountCircleIcon.d.ts +6 -0
- package/dist/components/icons/AccountCircleIcon.js +20 -0
- package/dist/components/icons/AccountFilledIcon.d.ts +6 -0
- package/dist/components/icons/AccountFilledIcon.js +20 -0
- package/dist/components/icons/AccountIcon.d.ts +6 -0
- package/dist/components/icons/AccountIcon.js +20 -0
- package/dist/components/icons/AddIcon.js +2 -2
- package/dist/components/icons/AppsFilledIcon.d.ts +6 -0
- package/dist/components/icons/AppsFilledIcon.js +20 -0
- package/dist/components/icons/{CoopIcon.d.ts → AppsIcon.d.ts} +1 -1
- package/dist/components/icons/AppsIcon.js +20 -0
- package/dist/components/icons/ArrowDownIcon.js +2 -2
- package/dist/components/icons/ArrowLeftIcon.js +2 -2
- package/dist/components/icons/ArrowRightIcon.js +2 -2
- package/dist/components/icons/ArrowUpIcon.js +2 -2
- package/dist/components/icons/BackspaceFilledIcon.d.ts +6 -0
- package/dist/components/icons/BackspaceFilledIcon.js +20 -0
- package/dist/components/icons/{AvatarAltIcon.d.ts → BackspaceIcon.d.ts} +1 -1
- package/dist/components/icons/BackspaceIcon.js +20 -0
- package/dist/components/icons/{CoopLocationIcon.d.ts → BasketFilledIcon.d.ts} +1 -1
- package/dist/components/icons/BasketFilledIcon.js +20 -0
- package/dist/components/icons/BasketIcon.js +2 -2
- package/dist/components/icons/BellFilledIcon.d.ts +6 -0
- package/dist/components/icons/BellFilledIcon.js +20 -0
- package/dist/components/icons/BellIcon.d.ts +6 -0
- package/dist/components/icons/BellIcon.js +20 -0
- package/dist/components/icons/{CloseIcon.d.ts → BroomIcon.d.ts} +1 -1
- package/dist/components/icons/BroomIcon.js +20 -0
- package/dist/components/icons/CalendarFilledIcon.d.ts +6 -0
- package/dist/components/icons/CalendarFilledIcon.js +20 -0
- package/dist/components/icons/CalendarIcon.js +2 -2
- package/dist/components/icons/CashFilledIcon.d.ts +6 -0
- package/dist/components/icons/CashFilledIcon.js +20 -0
- package/dist/components/icons/CashIcon.d.ts +6 -0
- package/dist/components/icons/CashIcon.js +20 -0
- package/dist/components/icons/ChevronDownIcon.js +2 -2
- package/dist/components/icons/ChevronLeftIcon.js +2 -2
- package/dist/components/icons/ChevronRightIcon.js +2 -2
- package/dist/components/icons/ChevronUpIcon.js +2 -2
- package/dist/components/icons/CircleBurgerFilledIcon.d.ts +6 -0
- package/dist/components/icons/CircleBurgerFilledIcon.js +20 -0
- package/dist/components/icons/CircleBurgerIcon.d.ts +6 -0
- package/dist/components/icons/CircleBurgerIcon.js +20 -0
- package/dist/components/icons/ClipboardFilledIcon.d.ts +6 -0
- package/dist/components/icons/ClipboardFilledIcon.js +20 -0
- package/dist/components/icons/ClipboardIcon.d.ts +6 -0
- package/dist/components/icons/ClipboardIcon.js +20 -0
- package/dist/components/icons/{InformationIcon.d.ts → ClockFilledIcon.d.ts} +1 -1
- package/dist/components/icons/ClockFilledIcon.js +20 -0
- package/dist/components/icons/ClockIcon.js +2 -2
- package/dist/components/icons/CloseAltFilledIcon.d.ts +6 -0
- package/dist/components/icons/CloseAltFilledIcon.js +20 -0
- package/dist/components/icons/CloseAltIcon.js +2 -2
- package/dist/components/icons/{VanIcon.d.ts → CogIcon.d.ts} +1 -1
- package/dist/components/icons/CogIcon.js +20 -0
- package/dist/components/icons/CommunityFilledIcon.d.ts +6 -0
- package/dist/components/icons/CommunityFilledIcon.js +20 -0
- package/dist/components/icons/CommunityIcon.d.ts +6 -0
- package/dist/components/icons/CommunityIcon.js +20 -0
- package/dist/components/icons/{QuestionIcon.d.ts → ComputerIcon.d.ts} +1 -1
- package/dist/components/icons/ComputerIcon.js +20 -0
- package/dist/components/icons/ContactFilledIcon.d.ts +6 -0
- package/dist/components/icons/ContactFilledIcon.js +20 -0
- package/dist/components/icons/ContactIcon.d.ts +6 -0
- package/dist/components/icons/ContactIcon.js +20 -0
- package/dist/components/icons/ContactlessFilledIcon.d.ts +6 -0
- package/dist/components/icons/ContactlessFilledIcon.js +20 -0
- package/dist/components/icons/ContactlessIcon.d.ts +6 -0
- package/dist/components/icons/ContactlessIcon.js +20 -0
- package/dist/components/icons/{SettingsIcon.d.ts → CoopLiveIcon.d.ts} +1 -1
- package/dist/components/icons/CoopLiveIcon.js +20 -0
- package/dist/components/icons/CoopLocationFilledIcon.d.ts +6 -0
- package/dist/components/icons/{CoopLocationIcon.js → CoopLocationFilledIcon.js} +5 -5
- package/dist/components/icons/{CoopCardIcon.d.ts → CoopLogoIcon.d.ts} +1 -1
- package/dist/components/icons/CoopLogoIcon.js +20 -0
- package/dist/components/icons/CoopMembershipCardFilledIcon.d.ts +6 -0
- package/dist/components/icons/CoopMembershipCardFilledIcon.js +20 -0
- package/dist/components/icons/CreditCardFilledIcon.d.ts +6 -0
- package/dist/components/icons/CreditCardFilledIcon.js +20 -0
- package/dist/components/icons/CreditCardIcon.d.ts +6 -0
- package/dist/components/icons/CreditCardIcon.js +20 -0
- package/dist/components/icons/CrossIcon.d.ts +6 -0
- package/dist/components/icons/CrossIcon.js +20 -0
- package/dist/components/icons/DocumentIcon.d.ts +6 -0
- package/dist/components/icons/DocumentIcon.js +20 -0
- package/dist/components/icons/DownloadIcon.js +2 -2
- package/dist/components/icons/EnterStoreIcon.d.ts +6 -0
- package/dist/components/icons/EnterStoreIcon.js +20 -0
- package/dist/components/icons/ExitStoreIcon.d.ts +6 -0
- package/dist/components/icons/ExitStoreIcon.js +20 -0
- package/dist/components/icons/EyeFilledIcon.d.ts +6 -0
- package/dist/components/icons/EyeFilledIcon.js +20 -0
- package/dist/components/icons/EyeIcon.d.ts +6 -0
- package/dist/components/icons/EyeIcon.js +20 -0
- package/dist/components/icons/EyeStrikeFilledIcon.d.ts +6 -0
- package/dist/components/icons/EyeStrikeFilledIcon.js +20 -0
- package/dist/components/icons/EyeStrikeIcon.d.ts +6 -0
- package/dist/components/icons/EyeStrikeIcon.js +20 -0
- package/dist/components/icons/FeedbackFilledIcon.d.ts +6 -0
- package/dist/components/icons/FeedbackFilledIcon.js +20 -0
- package/dist/components/icons/FeedbackIcon.d.ts +6 -0
- package/dist/components/icons/FeedbackIcon.js +20 -0
- package/dist/components/icons/{AvatarIcon.d.ts → FilterIcon.d.ts} +1 -1
- package/dist/components/icons/FilterIcon.js +20 -0
- package/dist/components/icons/GiftCardFilledIcon.d.ts +6 -0
- package/dist/components/icons/GiftCardFilledIcon.js +20 -0
- package/dist/components/icons/GiftCardIcon.d.ts +6 -0
- package/dist/components/icons/GiftCardIcon.js +20 -0
- package/dist/components/icons/GiftFilledIcon.d.ts +6 -0
- package/dist/components/icons/GiftFilledIcon.js +20 -0
- package/dist/components/icons/GiftIcon.d.ts +6 -0
- package/dist/components/icons/GiftIcon.js +20 -0
- package/dist/components/icons/HelpFilledIcon.d.ts +6 -0
- package/dist/components/icons/HelpFilledIcon.js +20 -0
- package/dist/components/icons/HelpIcon.d.ts +6 -0
- package/dist/components/icons/HelpIcon.js +20 -0
- package/dist/components/icons/HomeFilledIcon.d.ts +6 -0
- package/dist/components/icons/HomeFilledIcon.js +20 -0
- package/dist/components/icons/HomeIcon.js +2 -2
- package/dist/components/icons/HowDoIAssistantIcon.d.ts +6 -0
- package/dist/components/icons/HowDoIAssistantIcon.js +20 -0
- package/dist/components/icons/InfoIcon.d.ts +6 -0
- package/dist/components/icons/InfoIcon.js +20 -0
- package/dist/components/icons/KebabIcon.d.ts +6 -0
- package/dist/components/icons/KebabIcon.js +20 -0
- package/dist/components/icons/LoadingIcon.js +3 -3
- package/dist/components/icons/LocationFilledIcon.d.ts +6 -0
- package/dist/components/icons/LocationFilledIcon.js +20 -0
- package/dist/components/icons/LocationIcon.js +2 -2
- package/dist/components/icons/LogoutIcon.d.ts +6 -0
- package/dist/components/icons/LogoutIcon.js +20 -0
- package/dist/components/icons/MailIcon.js +2 -2
- package/dist/components/icons/MenuIcon.js +2 -2
- package/dist/components/icons/MessageIcon.js +2 -2
- package/dist/components/icons/MinusIcon.js +2 -2
- package/dist/components/icons/NotesFilledIcon.d.ts +6 -0
- package/dist/components/icons/NotesFilledIcon.js +20 -0
- package/dist/components/icons/NotesIcon.d.ts +6 -0
- package/dist/components/icons/NotesIcon.js +20 -0
- package/dist/components/icons/OpenNewIcon.js +2 -2
- package/dist/components/icons/OwnBagIcon.d.ts +6 -0
- package/dist/components/icons/OwnBagIcon.js +20 -0
- package/dist/components/icons/PadlockIcon.d.ts +6 -0
- package/dist/components/icons/PadlockIcon.js +20 -0
- package/dist/components/icons/PencilIcon.js +2 -2
- package/dist/components/icons/PhoneIcon.js +2 -2
- package/dist/components/icons/PowerIcon.d.ts +6 -0
- package/dist/components/icons/PowerIcon.js +20 -0
- package/dist/components/icons/SaveFilledIcon.d.ts +6 -0
- package/dist/components/icons/SaveFilledIcon.js +20 -0
- package/dist/components/icons/SaveIcon.d.ts +6 -0
- package/dist/components/icons/SaveIcon.js +20 -0
- package/dist/components/icons/ScooterIcon.js +3 -3
- package/dist/components/icons/SearchFilledIcon.d.ts +6 -0
- package/dist/components/icons/SearchFilledIcon.js +20 -0
- package/dist/components/icons/SearchIcon.js +2 -2
- package/dist/components/icons/SendIcon.d.ts +6 -0
- package/dist/components/icons/SendIcon.js +20 -0
- package/dist/components/icons/SpannerIcon.d.ts +6 -0
- package/dist/components/icons/SpannerIcon.js +20 -0
- package/dist/components/icons/StarFilledIcon.d.ts +6 -0
- package/dist/components/icons/StarFilledIcon.js +20 -0
- package/dist/components/icons/StarIcon.d.ts +6 -0
- package/dist/components/icons/StarIcon.js +20 -0
- package/dist/components/icons/TickAltFilledIcon.d.ts +6 -0
- package/dist/components/icons/TickAltFilledIcon.js +20 -0
- package/dist/components/icons/TickAltIcon.js +2 -2
- package/dist/components/icons/TickIcon.js +2 -2
- package/dist/components/icons/TruckIcon.d.ts +6 -0
- package/dist/components/icons/TruckIcon.js +20 -0
- package/dist/components/icons/UserWipeIcon.d.ts +6 -0
- package/dist/components/icons/UserWipeIcon.js +20 -0
- package/dist/components/icons/VoucherFilledIcon.d.ts +6 -0
- package/dist/components/icons/VoucherFilledIcon.js +20 -0
- package/dist/components/icons/VoucherIcon.d.ts +6 -0
- package/dist/components/icons/VoucherIcon.js +20 -0
- package/dist/components/icons/WarningFilledIcon.d.ts +6 -0
- package/dist/components/icons/WarningFilledIcon.js +20 -0
- package/dist/components/icons/WarningIcon.js +2 -2
- package/dist/components/icons/WifiIcon.d.ts +6 -0
- package/dist/components/icons/WifiIcon.js +20 -0
- package/dist/components/icons/WriteIcon.js +2 -2
- package/dist/components/icons/index.d.ts +77 -10
- package/dist/components/icons/index.js +77 -10
- package/dist/hooks/useSlots.js +3 -3
- package/dist/index.js +2 -2
- package/package.json +11 -11
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +13 -12
- package/src/components/Expandable/Expandable.tsx +1 -6
- package/src/components/Field/Field.tsx +5 -29
- package/src/components/Fieldset/Fieldset.tsx +6 -8
- package/src/components/Searchbox/Searchbox.tsx +2 -2
- package/src/components/TextInput/TextInput.tsx +18 -2
- package/src/components/Textarea/Textarea.tsx +2 -0
- package/src/components/icons/AccountCircleFilledIcon.tsx +28 -0
- package/src/components/icons/AccountCircleIcon.tsx +28 -0
- package/src/components/icons/AccountFilledIcon.tsx +28 -0
- package/src/components/icons/AccountIcon.tsx +28 -0
- package/src/components/icons/AddIcon.tsx +2 -9
- package/src/components/icons/AppsFilledIcon.tsx +28 -0
- package/src/components/icons/AppsIcon.tsx +28 -0
- package/src/components/icons/ArrowDownIcon.tsx +2 -6
- package/src/components/icons/ArrowLeftIcon.tsx +2 -6
- package/src/components/icons/ArrowRightIcon.tsx +2 -6
- package/src/components/icons/ArrowUpIcon.tsx +2 -6
- package/src/components/icons/BackspaceFilledIcon.tsx +28 -0
- package/src/components/icons/BackspaceIcon.tsx +28 -0
- package/src/components/icons/BasketFilledIcon.tsx +28 -0
- package/src/components/icons/BasketIcon.tsx +2 -9
- package/src/components/icons/BellFilledIcon.tsx +29 -0
- package/src/components/icons/BellIcon.tsx +28 -0
- package/src/components/icons/BroomIcon.tsx +28 -0
- package/src/components/icons/CalendarFilledIcon.tsx +28 -0
- package/src/components/icons/CalendarIcon.tsx +2 -9
- package/src/components/icons/CashFilledIcon.tsx +28 -0
- package/src/components/icons/CashIcon.tsx +33 -0
- package/src/components/icons/ChevronDownIcon.tsx +2 -5
- package/src/components/icons/ChevronLeftIcon.tsx +2 -5
- package/src/components/icons/ChevronRightIcon.tsx +2 -5
- package/src/components/icons/ChevronUpIcon.tsx +2 -5
- package/src/components/icons/CircleBurgerFilledIcon.tsx +28 -0
- package/src/components/icons/CircleBurgerIcon.tsx +28 -0
- package/src/components/icons/ClipboardFilledIcon.tsx +28 -0
- package/src/components/icons/ClipboardIcon.tsx +28 -0
- package/src/components/icons/{InformationIcon.tsx → ClockFilledIcon.tsx} +6 -9
- package/src/components/icons/ClockIcon.tsx +2 -9
- package/src/components/icons/CloseAltFilledIcon.tsx +32 -0
- package/src/components/icons/CloseAltIcon.tsx +2 -13
- package/src/components/icons/CogIcon.tsx +28 -0
- package/src/components/icons/CommunityFilledIcon.tsx +28 -0
- package/src/components/icons/CommunityIcon.tsx +28 -0
- package/src/components/icons/ComputerIcon.tsx +28 -0
- package/src/components/icons/ContactFilledIcon.tsx +28 -0
- package/src/components/icons/ContactIcon.tsx +28 -0
- package/src/components/icons/ContactlessFilledIcon.tsx +28 -0
- package/src/components/icons/ContactlessIcon.tsx +28 -0
- package/src/components/icons/CoopLiveIcon.tsx +29 -0
- package/src/components/icons/CoopLocationFilledIcon.tsx +30 -0
- package/src/components/icons/CoopLogoIcon.tsx +28 -0
- package/src/components/icons/CoopMembershipCardFilledIcon.tsx +40 -0
- package/src/components/icons/CreditCardFilledIcon.tsx +42 -0
- package/src/components/icons/CreditCardIcon.tsx +28 -0
- package/src/components/icons/{CloseIcon.tsx → CrossIcon.tsx} +4 -11
- package/src/components/icons/DocumentIcon.tsx +28 -0
- package/src/components/icons/DownloadIcon.tsx +2 -13
- package/src/components/icons/EnterStoreIcon.tsx +28 -0
- package/src/components/icons/ExitStoreIcon.tsx +28 -0
- package/src/components/icons/EyeFilledIcon.tsx +28 -0
- package/src/components/icons/EyeIcon.tsx +28 -0
- package/src/components/icons/EyeStrikeFilledIcon.tsx +28 -0
- package/src/components/icons/EyeStrikeIcon.tsx +28 -0
- package/src/components/icons/FeedbackFilledIcon.tsx +35 -0
- package/src/components/icons/FeedbackIcon.tsx +28 -0
- package/src/components/icons/FilterIcon.tsx +28 -0
- package/src/components/icons/GiftCardFilledIcon.tsx +28 -0
- package/src/components/icons/GiftCardIcon.tsx +28 -0
- package/src/components/icons/GiftFilledIcon.tsx +28 -0
- package/src/components/icons/GiftIcon.tsx +28 -0
- package/src/components/icons/HelpFilledIcon.tsx +28 -0
- package/src/components/icons/HelpIcon.tsx +28 -0
- package/src/components/icons/HomeFilledIcon.tsx +28 -0
- package/src/components/icons/HomeIcon.tsx +2 -13
- package/src/components/icons/HowDoIAssistantIcon.tsx +28 -0
- package/src/components/icons/InfoIcon.tsx +28 -0
- package/src/components/icons/KebabIcon.tsx +28 -0
- package/src/components/icons/LoadingIcon.tsx +3 -6
- package/src/components/icons/LocationFilledIcon.tsx +28 -0
- package/src/components/icons/LocationIcon.tsx +2 -9
- package/src/components/icons/LogoutIcon.tsx +28 -0
- package/src/components/icons/MailIcon.tsx +2 -5
- package/src/components/icons/MenuIcon.tsx +2 -5
- package/src/components/icons/MessageIcon.tsx +2 -5
- package/src/components/icons/MinusIcon.tsx +2 -5
- package/src/components/icons/NotesFilledIcon.tsx +28 -0
- package/src/components/icons/NotesIcon.tsx +28 -0
- package/src/components/icons/OpenNewIcon.tsx +3 -9
- package/src/components/icons/OwnBagIcon.tsx +28 -0
- package/src/components/icons/PadlockIcon.tsx +28 -0
- package/src/components/icons/PencilIcon.tsx +2 -5
- package/src/components/icons/PhoneIcon.tsx +2 -5
- package/src/components/icons/PowerIcon.tsx +28 -0
- package/src/components/icons/SaveFilledIcon.tsx +28 -0
- package/src/components/icons/SaveIcon.tsx +28 -0
- package/src/components/icons/ScooterIcon.tsx +3 -22
- package/src/components/icons/SearchFilledIcon.tsx +28 -0
- package/src/components/icons/SearchIcon.tsx +9 -9
- package/src/components/icons/SendIcon.tsx +28 -0
- package/src/components/icons/SpannerIcon.tsx +28 -0
- package/src/components/icons/StarFilledIcon.tsx +31 -0
- package/src/components/icons/StarIcon.tsx +28 -0
- package/src/components/icons/TickAltFilledIcon.tsx +32 -0
- package/src/components/icons/TickAltIcon.tsx +2 -9
- package/src/components/icons/TickIcon.tsx +2 -5
- package/src/components/icons/TruckIcon.tsx +28 -0
- package/src/components/icons/UserWipeIcon.tsx +28 -0
- package/src/components/icons/VoucherFilledIcon.tsx +28 -0
- package/src/components/icons/VoucherIcon.tsx +28 -0
- package/src/components/icons/WarningFilledIcon.tsx +28 -0
- package/src/components/icons/WarningIcon.tsx +2 -9
- package/src/components/icons/WifiIcon.tsx +28 -0
- package/src/components/icons/WriteIcon.tsx +5 -17
- package/src/components/icons/index.ts +77 -10
- package/dist/components/icons/AvatarAltIcon.js +0 -20
- package/dist/components/icons/AvatarIcon.js +0 -20
- package/dist/components/icons/CloseIcon.js +0 -20
- package/dist/components/icons/CoopCardIcon.js +0 -20
- package/dist/components/icons/CoopIcon.js +0 -20
- package/dist/components/icons/InformationIcon.js +0 -20
- package/dist/components/icons/QuestionIcon.js +0 -20
- package/dist/components/icons/SettingsIcon.js +0 -20
- package/dist/components/icons/VanIcon.js +0 -20
- package/dist/node_modules/@date-fns/tz/date/index.js +0 -83
- package/dist/node_modules/@date-fns/tz/date/mini.js +0 -235
- package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -39
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -44
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -814
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -751
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -350
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -161
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -137
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -11
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -63
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -213
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -31
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -209
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -15
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -303
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -285
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -19
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -132
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -43
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -89
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -70
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -18
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -7
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -40
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -137
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -7
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
- package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -775
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -94
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -66
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -31
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -25
- package/dist/node_modules/date-fns/addDays.js +0 -41
- package/dist/node_modules/date-fns/addMonths.js +0 -75
- package/dist/node_modules/date-fns/addWeeks.js +0 -33
- package/dist/node_modules/date-fns/addYears.js +0 -33
- package/dist/node_modules/date-fns/constants.js +0 -67
- package/dist/node_modules/date-fns/constructFrom.js +0 -49
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -62
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -42
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -65
- package/dist/node_modules/date-fns/eachYearOfInterval.js +0 -65
- package/dist/node_modules/date-fns/endOfISOWeek.js +0 -35
- package/dist/node_modules/date-fns/endOfMonth.js +0 -37
- package/dist/node_modules/date-fns/endOfWeek.js +0 -53
- package/dist/node_modules/date-fns/endOfYear.js +0 -37
- package/dist/node_modules/date-fns/format.js +0 -423
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -34
- package/dist/node_modules/date-fns/getDaysInMonth.js +0 -36
- package/dist/node_modules/date-fns/getDefaultOptions.js +0 -31
- package/dist/node_modules/date-fns/getISODay.js +0 -33
- package/dist/node_modules/date-fns/getISOWeek.js +0 -40
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -52
- package/dist/node_modules/date-fns/getMonth.js +0 -29
- package/dist/node_modules/date-fns/getWeek.js +0 -54
- package/dist/node_modules/date-fns/getWeekYear.js +0 -75
- package/dist/node_modules/date-fns/getYear.js +0 -29
- package/dist/node_modules/date-fns/isAfter.js +0 -25
- package/dist/node_modules/date-fns/isBefore.js +0 -25
- package/dist/node_modules/date-fns/isDate.js +0 -41
- package/dist/node_modules/date-fns/isSameDay.js +0 -46
- package/dist/node_modules/date-fns/isSameMonth.js +0 -43
- package/dist/node_modules/date-fns/isSameYear.js +0 -35
- package/dist/node_modules/date-fns/isValid.js +0 -39
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -64
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -59
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -22
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -103
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -41
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -13
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -189
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -134
- package/dist/node_modules/date-fns/locale/en-US.js +0 -28
- package/dist/node_modules/date-fns/max.js +0 -49
- package/dist/node_modules/date-fns/min.js +0 -49
- package/dist/node_modules/date-fns/parse/_lib/Parser.js +0 -27
- package/dist/node_modules/date-fns/parse/_lib/Setter.js +0 -59
- package/dist/node_modules/date-fns/parse/_lib/constants.js +0 -33
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -55
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -55
- package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -59
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -57
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -64
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -56
- package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -41
- package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -24
- package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -21
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -36
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -31
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -32
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -38
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -118
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -47
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -47
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -48
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -44
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -96
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -47
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -76
- package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -31
- package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -86
- package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -83
- package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -31
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -97
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -86
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -83
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -19
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -19
- package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -62
- package/dist/node_modules/date-fns/parse/_lib/parsers.js +0 -110
- package/dist/node_modules/date-fns/parse/_lib/utils.js +0 -135
- package/dist/node_modules/date-fns/parse.js +0 -497
- package/dist/node_modules/date-fns/setDay.js +0 -59
- package/dist/node_modules/date-fns/setISODay.js +0 -40
- package/dist/node_modules/date-fns/setISOWeek.js +0 -39
- package/dist/node_modules/date-fns/setMonth.js +0 -46
- package/dist/node_modules/date-fns/setWeek.js +0 -53
- package/dist/node_modules/date-fns/setYear.js +0 -40
- package/dist/node_modules/date-fns/startOfDay.js +0 -35
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -35
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -42
- package/dist/node_modules/date-fns/startOfMonth.js +0 -37
- package/dist/node_modules/date-fns/startOfWeek.js +0 -53
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -64
- package/dist/node_modules/date-fns/startOfYear.js +0 -36
- package/dist/node_modules/date-fns/toDate.js +0 -46
- package/dist/node_modules/date-fns/transpose.js +0 -52
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -320
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -122
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -604
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -20
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -23
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -73
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -95
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -20
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -59
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -46
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getLabels.js +0 -53
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -69
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -51
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -40
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -36
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -37
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -36
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -32
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -25
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/locale/en-US.js +0 -67
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -57
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -45
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -44
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -174
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -113
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -25
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -56
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -95
- package/dist/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js +0 -57
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -62
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -30
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -74
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -35
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/utils/toTimeZone.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -66
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -167
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -38
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -21
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -110
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -56
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -10
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -31
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -19
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -25
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -51
- package/dist/node_modules/tslib/tslib.es6.js +0 -56
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -24
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -48
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -42
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -77
- package/src/components/icons/AvatarAltIcon.tsx +0 -39
- package/src/components/icons/AvatarIcon.tsx +0 -35
- package/src/components/icons/CoopCardIcon.tsx +0 -32
- package/src/components/icons/CoopIcon.tsx +0 -32
- package/src/components/icons/CoopLocationIcon.tsx +0 -39
- package/src/components/icons/QuestionIcon.tsx +0 -35
- package/src/components/icons/SettingsIcon.tsx +0 -31
- package/src/components/icons/VanIcon.tsx +0 -31
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
import { computePosition, offset as offset$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$2, limitShift as limitShift$1 } from '../../dom/dist/floating-ui.dom.js';
|
|
2
|
-
export { autoUpdate, platform } from '../../dom/dist/floating-ui.dom.js';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { useLayoutEffect } from 'react';
|
|
5
|
-
import * as ReactDOM from 'react-dom';
|
|
6
|
-
|
|
7
|
-
var isClient = typeof document !== 'undefined';
|
|
8
|
-
|
|
9
|
-
var noop = function noop() {};
|
|
10
|
-
var index = isClient ? useLayoutEffect : noop;
|
|
11
|
-
|
|
12
|
-
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
|
|
13
|
-
// functions
|
|
14
|
-
function deepEqual(a, b) {
|
|
15
|
-
if (a === b) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
if (typeof a !== typeof b) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
if (typeof a === 'function' && a.toString() === b.toString()) {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
let length;
|
|
25
|
-
let i;
|
|
26
|
-
let keys;
|
|
27
|
-
if (a && b && typeof a === 'object') {
|
|
28
|
-
if (Array.isArray(a)) {
|
|
29
|
-
length = a.length;
|
|
30
|
-
if (length !== b.length) return false;
|
|
31
|
-
for (i = length; i-- !== 0;) {
|
|
32
|
-
if (!deepEqual(a[i], b[i])) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
keys = Object.keys(a);
|
|
39
|
-
length = keys.length;
|
|
40
|
-
if (length !== Object.keys(b).length) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
for (i = length; i-- !== 0;) {
|
|
44
|
-
if (!{}.hasOwnProperty.call(b, keys[i])) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
for (i = length; i-- !== 0;) {
|
|
49
|
-
const key = keys[i];
|
|
50
|
-
if (key === '_owner' && a.$$typeof) {
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
if (!deepEqual(a[key], b[key])) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
return a !== a && b !== b;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function getDPR(element) {
|
|
63
|
-
if (typeof window === 'undefined') {
|
|
64
|
-
return 1;
|
|
65
|
-
}
|
|
66
|
-
const win = element.ownerDocument.defaultView || window;
|
|
67
|
-
return win.devicePixelRatio || 1;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function roundByDPR(element, value) {
|
|
71
|
-
const dpr = getDPR(element);
|
|
72
|
-
return Math.round(value * dpr) / dpr;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function useLatestRef(value) {
|
|
76
|
-
const ref = React.useRef(value);
|
|
77
|
-
index(() => {
|
|
78
|
-
ref.current = value;
|
|
79
|
-
});
|
|
80
|
-
return ref;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Provides data to position a floating element.
|
|
85
|
-
* @see https://floating-ui.com/docs/useFloating
|
|
86
|
-
*/
|
|
87
|
-
function useFloating(options) {
|
|
88
|
-
if (options === void 0) {
|
|
89
|
-
options = {};
|
|
90
|
-
}
|
|
91
|
-
const {
|
|
92
|
-
placement = 'bottom',
|
|
93
|
-
strategy = 'absolute',
|
|
94
|
-
middleware = [],
|
|
95
|
-
platform,
|
|
96
|
-
elements: {
|
|
97
|
-
reference: externalReference,
|
|
98
|
-
floating: externalFloating
|
|
99
|
-
} = {},
|
|
100
|
-
transform = true,
|
|
101
|
-
whileElementsMounted,
|
|
102
|
-
open
|
|
103
|
-
} = options;
|
|
104
|
-
const [data, setData] = React.useState({
|
|
105
|
-
x: 0,
|
|
106
|
-
y: 0,
|
|
107
|
-
strategy,
|
|
108
|
-
placement,
|
|
109
|
-
middlewareData: {},
|
|
110
|
-
isPositioned: false
|
|
111
|
-
});
|
|
112
|
-
const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
|
|
113
|
-
if (!deepEqual(latestMiddleware, middleware)) {
|
|
114
|
-
setLatestMiddleware(middleware);
|
|
115
|
-
}
|
|
116
|
-
const [_reference, _setReference] = React.useState(null);
|
|
117
|
-
const [_floating, _setFloating] = React.useState(null);
|
|
118
|
-
const setReference = React.useCallback(node => {
|
|
119
|
-
if (node !== referenceRef.current) {
|
|
120
|
-
referenceRef.current = node;
|
|
121
|
-
_setReference(node);
|
|
122
|
-
}
|
|
123
|
-
}, []);
|
|
124
|
-
const setFloating = React.useCallback(node => {
|
|
125
|
-
if (node !== floatingRef.current) {
|
|
126
|
-
floatingRef.current = node;
|
|
127
|
-
_setFloating(node);
|
|
128
|
-
}
|
|
129
|
-
}, []);
|
|
130
|
-
const referenceEl = externalReference || _reference;
|
|
131
|
-
const floatingEl = externalFloating || _floating;
|
|
132
|
-
const referenceRef = React.useRef(null);
|
|
133
|
-
const floatingRef = React.useRef(null);
|
|
134
|
-
const dataRef = React.useRef(data);
|
|
135
|
-
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
136
|
-
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
137
|
-
const platformRef = useLatestRef(platform);
|
|
138
|
-
const openRef = useLatestRef(open);
|
|
139
|
-
const update = React.useCallback(() => {
|
|
140
|
-
if (!referenceRef.current || !floatingRef.current) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const config = {
|
|
144
|
-
placement,
|
|
145
|
-
strategy,
|
|
146
|
-
middleware: latestMiddleware
|
|
147
|
-
};
|
|
148
|
-
if (platformRef.current) {
|
|
149
|
-
config.platform = platformRef.current;
|
|
150
|
-
}
|
|
151
|
-
computePosition(referenceRef.current, floatingRef.current, config).then(data => {
|
|
152
|
-
const fullData = {
|
|
153
|
-
...data,
|
|
154
|
-
// The floating element's position may be recomputed while it's closed
|
|
155
|
-
// but still mounted (such as when transitioning out). To ensure
|
|
156
|
-
// `isPositioned` will be `false` initially on the next open, avoid
|
|
157
|
-
// setting it to `true` when `open === false` (must be specified).
|
|
158
|
-
isPositioned: openRef.current !== false
|
|
159
|
-
};
|
|
160
|
-
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
161
|
-
dataRef.current = fullData;
|
|
162
|
-
ReactDOM.flushSync(() => {
|
|
163
|
-
setData(fullData);
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
}, [latestMiddleware, placement, strategy, platformRef, openRef]);
|
|
168
|
-
index(() => {
|
|
169
|
-
if (open === false && dataRef.current.isPositioned) {
|
|
170
|
-
dataRef.current.isPositioned = false;
|
|
171
|
-
setData(data => ({
|
|
172
|
-
...data,
|
|
173
|
-
isPositioned: false
|
|
174
|
-
}));
|
|
175
|
-
}
|
|
176
|
-
}, [open]);
|
|
177
|
-
const isMountedRef = React.useRef(false);
|
|
178
|
-
index(() => {
|
|
179
|
-
isMountedRef.current = true;
|
|
180
|
-
return () => {
|
|
181
|
-
isMountedRef.current = false;
|
|
182
|
-
};
|
|
183
|
-
}, []);
|
|
184
|
-
index(() => {
|
|
185
|
-
if (referenceEl) referenceRef.current = referenceEl;
|
|
186
|
-
if (floatingEl) floatingRef.current = floatingEl;
|
|
187
|
-
if (referenceEl && floatingEl) {
|
|
188
|
-
if (whileElementsMountedRef.current) {
|
|
189
|
-
return whileElementsMountedRef.current(referenceEl, floatingEl, update);
|
|
190
|
-
}
|
|
191
|
-
update();
|
|
192
|
-
}
|
|
193
|
-
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
194
|
-
const refs = React.useMemo(() => ({
|
|
195
|
-
reference: referenceRef,
|
|
196
|
-
floating: floatingRef,
|
|
197
|
-
setReference,
|
|
198
|
-
setFloating
|
|
199
|
-
}), [setReference, setFloating]);
|
|
200
|
-
const elements = React.useMemo(() => ({
|
|
201
|
-
reference: referenceEl,
|
|
202
|
-
floating: floatingEl
|
|
203
|
-
}), [referenceEl, floatingEl]);
|
|
204
|
-
const floatingStyles = React.useMemo(() => {
|
|
205
|
-
const initialStyles = {
|
|
206
|
-
position: strategy,
|
|
207
|
-
left: 0,
|
|
208
|
-
top: 0
|
|
209
|
-
};
|
|
210
|
-
if (!elements.floating) {
|
|
211
|
-
return initialStyles;
|
|
212
|
-
}
|
|
213
|
-
const x = roundByDPR(elements.floating, data.x);
|
|
214
|
-
const y = roundByDPR(elements.floating, data.y);
|
|
215
|
-
if (transform) {
|
|
216
|
-
return {
|
|
217
|
-
...initialStyles,
|
|
218
|
-
transform: "translate(" + x + "px, " + y + "px)",
|
|
219
|
-
...(getDPR(elements.floating) >= 1.5 && {
|
|
220
|
-
willChange: 'transform'
|
|
221
|
-
})
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
return {
|
|
225
|
-
position: strategy,
|
|
226
|
-
left: x,
|
|
227
|
-
top: y
|
|
228
|
-
};
|
|
229
|
-
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
230
|
-
return React.useMemo(() => ({
|
|
231
|
-
...data,
|
|
232
|
-
update,
|
|
233
|
-
refs,
|
|
234
|
-
elements,
|
|
235
|
-
floatingStyles
|
|
236
|
-
}), [data, update, refs, elements, floatingStyles]);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Provides data to position an inner element of the floating element so that it
|
|
241
|
-
* appears centered to the reference element.
|
|
242
|
-
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
243
|
-
* @see https://floating-ui.com/docs/arrow
|
|
244
|
-
*/
|
|
245
|
-
const arrow$1 = options => {
|
|
246
|
-
function isRef(value) {
|
|
247
|
-
return {}.hasOwnProperty.call(value, 'current');
|
|
248
|
-
}
|
|
249
|
-
return {
|
|
250
|
-
name: 'arrow',
|
|
251
|
-
options,
|
|
252
|
-
fn(state) {
|
|
253
|
-
const {
|
|
254
|
-
element,
|
|
255
|
-
padding
|
|
256
|
-
} = typeof options === 'function' ? options(state) : options;
|
|
257
|
-
if (element && isRef(element)) {
|
|
258
|
-
if (element.current != null) {
|
|
259
|
-
return arrow$2({
|
|
260
|
-
element: element.current,
|
|
261
|
-
padding
|
|
262
|
-
}).fn(state);
|
|
263
|
-
}
|
|
264
|
-
return {};
|
|
265
|
-
}
|
|
266
|
-
if (element) {
|
|
267
|
-
return arrow$2({
|
|
268
|
-
element,
|
|
269
|
-
padding
|
|
270
|
-
}).fn(state);
|
|
271
|
-
}
|
|
272
|
-
return {};
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Modifies the placement by translating the floating element along the
|
|
279
|
-
* specified axes.
|
|
280
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
281
|
-
* object may be passed.
|
|
282
|
-
* @see https://floating-ui.com/docs/offset
|
|
283
|
-
*/
|
|
284
|
-
const offset = (options, deps) => ({
|
|
285
|
-
...offset$1(options),
|
|
286
|
-
options: [options, deps]
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
291
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
292
|
-
* @see https://floating-ui.com/docs/shift
|
|
293
|
-
*/
|
|
294
|
-
const shift = (options, deps) => ({
|
|
295
|
-
...shift$1(options),
|
|
296
|
-
options: [options, deps]
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
301
|
-
*/
|
|
302
|
-
const limitShift = (options, deps) => ({
|
|
303
|
-
...limitShift$1(options),
|
|
304
|
-
options: [options, deps]
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
309
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
310
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
311
|
-
* @see https://floating-ui.com/docs/flip
|
|
312
|
-
*/
|
|
313
|
-
const flip = (options, deps) => ({
|
|
314
|
-
...flip$1(options),
|
|
315
|
-
options: [options, deps]
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Provides data that allows you to change the size of the floating element —
|
|
320
|
-
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
321
|
-
* width of the reference element.
|
|
322
|
-
* @see https://floating-ui.com/docs/size
|
|
323
|
-
*/
|
|
324
|
-
const size = (options, deps) => ({
|
|
325
|
-
...size$1(options),
|
|
326
|
-
options: [options, deps]
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Provides data to hide the floating element in applicable situations, such as
|
|
331
|
-
* when it is not in the same clipping context as the reference element.
|
|
332
|
-
* @see https://floating-ui.com/docs/hide
|
|
333
|
-
*/
|
|
334
|
-
const hide = (options, deps) => ({
|
|
335
|
-
...hide$1(options),
|
|
336
|
-
options: [options, deps]
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Provides data to position an inner element of the floating element so that it
|
|
341
|
-
* appears centered to the reference element.
|
|
342
|
-
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
343
|
-
* @see https://floating-ui.com/docs/arrow
|
|
344
|
-
*/
|
|
345
|
-
const arrow = (options, deps) => ({
|
|
346
|
-
...arrow$1(options),
|
|
347
|
-
options: [options, deps]
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
export { arrow, computePosition, flip, hide, limitShift, offset, shift, size, useFloating };
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
function hasWindow() {
|
|
2
|
-
return typeof window !== 'undefined';
|
|
3
|
-
}
|
|
4
|
-
function getNodeName(node) {
|
|
5
|
-
if (isNode(node)) {
|
|
6
|
-
return (node.nodeName || '').toLowerCase();
|
|
7
|
-
}
|
|
8
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
9
|
-
// returning `#document` an infinite loop won't occur.
|
|
10
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
11
|
-
return '#document';
|
|
12
|
-
}
|
|
13
|
-
function getWindow(node) {
|
|
14
|
-
var _node$ownerDocument;
|
|
15
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
16
|
-
}
|
|
17
|
-
function getDocumentElement(node) {
|
|
18
|
-
var _ref;
|
|
19
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
20
|
-
}
|
|
21
|
-
function isNode(value) {
|
|
22
|
-
if (!hasWindow()) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
26
|
-
}
|
|
27
|
-
function isElement(value) {
|
|
28
|
-
if (!hasWindow()) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
32
|
-
}
|
|
33
|
-
function isHTMLElement(value) {
|
|
34
|
-
if (!hasWindow()) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
38
|
-
}
|
|
39
|
-
function isShadowRoot(value) {
|
|
40
|
-
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
44
|
-
}
|
|
45
|
-
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
46
|
-
function isOverflowElement(element) {
|
|
47
|
-
const {
|
|
48
|
-
overflow,
|
|
49
|
-
overflowX,
|
|
50
|
-
overflowY,
|
|
51
|
-
display
|
|
52
|
-
} = getComputedStyle(element);
|
|
53
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
54
|
-
}
|
|
55
|
-
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
56
|
-
function isTableElement(element) {
|
|
57
|
-
return tableElements.has(getNodeName(element));
|
|
58
|
-
}
|
|
59
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
60
|
-
function isTopLayer(element) {
|
|
61
|
-
return topLayerSelectors.some(selector => {
|
|
62
|
-
try {
|
|
63
|
-
return element.matches(selector);
|
|
64
|
-
} catch (_e) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
|
|
70
|
-
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
|
|
71
|
-
const containValues = ['paint', 'layout', 'strict', 'content'];
|
|
72
|
-
function isContainingBlock(elementOrCss) {
|
|
73
|
-
const webkit = isWebKit();
|
|
74
|
-
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
75
|
-
|
|
76
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
77
|
-
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
78
|
-
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
|
|
79
|
-
}
|
|
80
|
-
function getContainingBlock(element) {
|
|
81
|
-
let currentNode = getParentNode(element);
|
|
82
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
83
|
-
if (isContainingBlock(currentNode)) {
|
|
84
|
-
return currentNode;
|
|
85
|
-
} else if (isTopLayer(currentNode)) {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
currentNode = getParentNode(currentNode);
|
|
89
|
-
}
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
function isWebKit() {
|
|
93
|
-
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
94
|
-
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
95
|
-
}
|
|
96
|
-
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
97
|
-
function isLastTraversableNode(node) {
|
|
98
|
-
return lastTraversableNodeNames.has(getNodeName(node));
|
|
99
|
-
}
|
|
100
|
-
function getComputedStyle(element) {
|
|
101
|
-
return getWindow(element).getComputedStyle(element);
|
|
102
|
-
}
|
|
103
|
-
function getNodeScroll(element) {
|
|
104
|
-
if (isElement(element)) {
|
|
105
|
-
return {
|
|
106
|
-
scrollLeft: element.scrollLeft,
|
|
107
|
-
scrollTop: element.scrollTop
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
scrollLeft: element.scrollX,
|
|
112
|
-
scrollTop: element.scrollY
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function getParentNode(node) {
|
|
116
|
-
if (getNodeName(node) === 'html') {
|
|
117
|
-
return node;
|
|
118
|
-
}
|
|
119
|
-
const result =
|
|
120
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
121
|
-
node.assignedSlot ||
|
|
122
|
-
// DOM Element detected.
|
|
123
|
-
node.parentNode ||
|
|
124
|
-
// ShadowRoot detected.
|
|
125
|
-
isShadowRoot(node) && node.host ||
|
|
126
|
-
// Fallback.
|
|
127
|
-
getDocumentElement(node);
|
|
128
|
-
return isShadowRoot(result) ? result.host : result;
|
|
129
|
-
}
|
|
130
|
-
function getNearestOverflowAncestor(node) {
|
|
131
|
-
const parentNode = getParentNode(node);
|
|
132
|
-
if (isLastTraversableNode(parentNode)) {
|
|
133
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
134
|
-
}
|
|
135
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
136
|
-
return parentNode;
|
|
137
|
-
}
|
|
138
|
-
return getNearestOverflowAncestor(parentNode);
|
|
139
|
-
}
|
|
140
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
141
|
-
var _node$ownerDocument2;
|
|
142
|
-
if (list === void 0) {
|
|
143
|
-
list = [];
|
|
144
|
-
}
|
|
145
|
-
if (traverseIframes === void 0) {
|
|
146
|
-
traverseIframes = true;
|
|
147
|
-
}
|
|
148
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
149
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
150
|
-
const win = getWindow(scrollableAncestor);
|
|
151
|
-
if (isBody) {
|
|
152
|
-
const frameElement = getFrameElement(win);
|
|
153
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
154
|
-
}
|
|
155
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
156
|
-
}
|
|
157
|
-
function getFrameElement(win) {
|
|
158
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom positioning reference element.
|
|
3
|
-
* @see https://floating-ui.com/docs/virtual-elements
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const sides = ['top', 'right', 'bottom', 'left'];
|
|
7
|
-
const min = Math.min;
|
|
8
|
-
const max = Math.max;
|
|
9
|
-
const round = Math.round;
|
|
10
|
-
const floor = Math.floor;
|
|
11
|
-
const createCoords = v => ({
|
|
12
|
-
x: v,
|
|
13
|
-
y: v
|
|
14
|
-
});
|
|
15
|
-
const oppositeSideMap = {
|
|
16
|
-
left: 'right',
|
|
17
|
-
right: 'left',
|
|
18
|
-
bottom: 'top',
|
|
19
|
-
top: 'bottom'
|
|
20
|
-
};
|
|
21
|
-
const oppositeAlignmentMap = {
|
|
22
|
-
start: 'end',
|
|
23
|
-
end: 'start'
|
|
24
|
-
};
|
|
25
|
-
function clamp(start, value, end) {
|
|
26
|
-
return max(start, min(value, end));
|
|
27
|
-
}
|
|
28
|
-
function evaluate(value, param) {
|
|
29
|
-
return typeof value === 'function' ? value(param) : value;
|
|
30
|
-
}
|
|
31
|
-
function getSide(placement) {
|
|
32
|
-
return placement.split('-')[0];
|
|
33
|
-
}
|
|
34
|
-
function getAlignment(placement) {
|
|
35
|
-
return placement.split('-')[1];
|
|
36
|
-
}
|
|
37
|
-
function getOppositeAxis(axis) {
|
|
38
|
-
return axis === 'x' ? 'y' : 'x';
|
|
39
|
-
}
|
|
40
|
-
function getAxisLength(axis) {
|
|
41
|
-
return axis === 'y' ? 'height' : 'width';
|
|
42
|
-
}
|
|
43
|
-
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
44
|
-
function getSideAxis(placement) {
|
|
45
|
-
return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
|
|
46
|
-
}
|
|
47
|
-
function getAlignmentAxis(placement) {
|
|
48
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
49
|
-
}
|
|
50
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
51
|
-
if (rtl === void 0) {
|
|
52
|
-
rtl = false;
|
|
53
|
-
}
|
|
54
|
-
const alignment = getAlignment(placement);
|
|
55
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
56
|
-
const length = getAxisLength(alignmentAxis);
|
|
57
|
-
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
58
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
59
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
60
|
-
}
|
|
61
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
62
|
-
}
|
|
63
|
-
function getExpandedPlacements(placement) {
|
|
64
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
65
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
66
|
-
}
|
|
67
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
68
|
-
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
69
|
-
}
|
|
70
|
-
const lrPlacement = ['left', 'right'];
|
|
71
|
-
const rlPlacement = ['right', 'left'];
|
|
72
|
-
const tbPlacement = ['top', 'bottom'];
|
|
73
|
-
const btPlacement = ['bottom', 'top'];
|
|
74
|
-
function getSideList(side, isStart, rtl) {
|
|
75
|
-
switch (side) {
|
|
76
|
-
case 'top':
|
|
77
|
-
case 'bottom':
|
|
78
|
-
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
79
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
80
|
-
case 'left':
|
|
81
|
-
case 'right':
|
|
82
|
-
return isStart ? tbPlacement : btPlacement;
|
|
83
|
-
default:
|
|
84
|
-
return [];
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
88
|
-
const alignment = getAlignment(placement);
|
|
89
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
90
|
-
if (alignment) {
|
|
91
|
-
list = list.map(side => side + "-" + alignment);
|
|
92
|
-
if (flipAlignment) {
|
|
93
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return list;
|
|
97
|
-
}
|
|
98
|
-
function getOppositePlacement(placement) {
|
|
99
|
-
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
100
|
-
}
|
|
101
|
-
function expandPaddingObject(padding) {
|
|
102
|
-
return {
|
|
103
|
-
top: 0,
|
|
104
|
-
right: 0,
|
|
105
|
-
bottom: 0,
|
|
106
|
-
left: 0,
|
|
107
|
-
...padding
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function getPaddingObject(padding) {
|
|
111
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
112
|
-
top: padding,
|
|
113
|
-
right: padding,
|
|
114
|
-
bottom: padding,
|
|
115
|
-
left: padding
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function rectToClientRect(rect) {
|
|
119
|
-
const {
|
|
120
|
-
x,
|
|
121
|
-
y,
|
|
122
|
-
width,
|
|
123
|
-
height
|
|
124
|
-
} = rect;
|
|
125
|
-
return {
|
|
126
|
-
width,
|
|
127
|
-
height,
|
|
128
|
-
top: y,
|
|
129
|
-
left: x,
|
|
130
|
-
right: x + width,
|
|
131
|
-
bottom: y + height,
|
|
132
|
-
x,
|
|
133
|
-
y
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export { clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, rectToClientRect, round, sides };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// src/primitive.tsx
|
|
2
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
3
|
-
return function handleEvent(event) {
|
|
4
|
-
originalEventHandler?.(event);
|
|
5
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
6
|
-
return ourEventHandler?.(event);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { composeEventHandlers };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Primitive } from '../../react-primitive/dist/index.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
// src/arrow.tsx
|
|
6
|
-
var NAME = "Arrow";
|
|
7
|
-
var Arrow = React.forwardRef((props, forwardedRef) => {
|
|
8
|
-
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
Primitive.svg,
|
|
11
|
-
{
|
|
12
|
-
...arrowProps,
|
|
13
|
-
ref: forwardedRef,
|
|
14
|
-
width,
|
|
15
|
-
height,
|
|
16
|
-
viewBox: "0 0 30 10",
|
|
17
|
-
preserveAspectRatio: "none",
|
|
18
|
-
children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
Arrow.displayName = NAME;
|
|
23
|
-
var Root = Arrow;
|
|
24
|
-
|
|
25
|
-
export { Arrow, Root };
|