@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,57 +0,0 @@
|
|
|
1
|
-
import { toTimeZone } from './toTimeZone.js';
|
|
2
|
-
import { isDateRange, isDateInterval, isDateAfterType, isDateBeforeType } from './typeguards.js';
|
|
3
|
-
|
|
4
|
-
function convertMatcher(matcher, timeZone) {
|
|
5
|
-
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
6
|
-
return matcher;
|
|
7
|
-
}
|
|
8
|
-
if (matcher instanceof Date) {
|
|
9
|
-
return toTimeZone(matcher, timeZone);
|
|
10
|
-
}
|
|
11
|
-
if (Array.isArray(matcher)) {
|
|
12
|
-
return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
|
|
13
|
-
}
|
|
14
|
-
if (isDateRange(matcher)) {
|
|
15
|
-
return {
|
|
16
|
-
...matcher,
|
|
17
|
-
from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
|
|
18
|
-
to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
if (isDateInterval(matcher)) {
|
|
22
|
-
return {
|
|
23
|
-
before: toTimeZone(matcher.before, timeZone),
|
|
24
|
-
after: toTimeZone(matcher.after, timeZone),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
if (isDateAfterType(matcher)) {
|
|
28
|
-
return {
|
|
29
|
-
after: toTimeZone(matcher.after, timeZone),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
if (isDateBeforeType(matcher)) {
|
|
33
|
-
return {
|
|
34
|
-
before: toTimeZone(matcher.before, timeZone),
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
return matcher;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Convert any {@link Matcher} or array of matchers to the specified time zone.
|
|
41
|
-
*
|
|
42
|
-
* @param matchers - The matcher or matchers to convert.
|
|
43
|
-
* @param timeZone - The target IANA time zone.
|
|
44
|
-
* @returns The converted matcher(s).
|
|
45
|
-
* @group Utilities
|
|
46
|
-
*/
|
|
47
|
-
function convertMatchersToTimeZone(matchers, timeZone) {
|
|
48
|
-
if (!matchers) {
|
|
49
|
-
return matchers;
|
|
50
|
-
}
|
|
51
|
-
if (Array.isArray(matchers)) {
|
|
52
|
-
return matchers.map((matcher) => convertMatcher(matcher, timeZone));
|
|
53
|
-
}
|
|
54
|
-
return convertMatcher(matchers, timeZone);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { convertMatchersToTimeZone };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { defaultDateLib } from '../classes/DateLib.js';
|
|
2
|
-
import { rangeIncludesDate } from './rangeIncludesDate.js';
|
|
3
|
-
import { isDatesArray, isDateRange, isDayOfWeekType, isDateInterval, isDateAfterType, isDateBeforeType } from './typeguards.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Checks if a given date matches at least one of the specified {@link Matcher}.
|
|
7
|
-
*
|
|
8
|
-
* @param date - The date to check.
|
|
9
|
-
* @param matchers - The matchers to check against.
|
|
10
|
-
* @param dateLib - The date utility library instance.
|
|
11
|
-
* @returns `true` if the date matches any of the matchers, otherwise `false`.
|
|
12
|
-
* @group Utilities
|
|
13
|
-
*/
|
|
14
|
-
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
15
|
-
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
16
|
-
const { isSameDay, differenceInCalendarDays, isAfter } = dateLib;
|
|
17
|
-
return matchersArr.some((matcher) => {
|
|
18
|
-
if (typeof matcher === "boolean") {
|
|
19
|
-
return matcher;
|
|
20
|
-
}
|
|
21
|
-
if (dateLib.isDate(matcher)) {
|
|
22
|
-
return isSameDay(date, matcher);
|
|
23
|
-
}
|
|
24
|
-
if (isDatesArray(matcher, dateLib)) {
|
|
25
|
-
return matcher.some((matcherDate) => isSameDay(date, matcherDate));
|
|
26
|
-
}
|
|
27
|
-
if (isDateRange(matcher)) {
|
|
28
|
-
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
29
|
-
}
|
|
30
|
-
if (isDayOfWeekType(matcher)) {
|
|
31
|
-
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
32
|
-
return matcher.dayOfWeek === date.getDay();
|
|
33
|
-
}
|
|
34
|
-
return matcher.dayOfWeek.includes(date.getDay());
|
|
35
|
-
}
|
|
36
|
-
if (isDateInterval(matcher)) {
|
|
37
|
-
const diffBefore = differenceInCalendarDays(matcher.before, date);
|
|
38
|
-
const diffAfter = differenceInCalendarDays(matcher.after, date);
|
|
39
|
-
const isDayBefore = diffBefore > 0;
|
|
40
|
-
const isDayAfter = diffAfter < 0;
|
|
41
|
-
const isClosedInterval = isAfter(matcher.before, matcher.after);
|
|
42
|
-
if (isClosedInterval) {
|
|
43
|
-
return isDayAfter && isDayBefore;
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
return isDayBefore || isDayAfter;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (isDateAfterType(matcher)) {
|
|
50
|
-
return differenceInCalendarDays(date, matcher.after) > 0;
|
|
51
|
-
}
|
|
52
|
-
if (isDateBeforeType(matcher)) {
|
|
53
|
-
return differenceInCalendarDays(matcher.before, date) > 0;
|
|
54
|
-
}
|
|
55
|
-
if (typeof matcher === "function") {
|
|
56
|
-
return matcher(date);
|
|
57
|
-
}
|
|
58
|
-
return false;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { dateMatchModifiers };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defaultDateLib } from '../classes/DateLib.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Checks if a date range contains one or more specified days of the week.
|
|
5
|
-
*
|
|
6
|
-
* @since 9.2.2
|
|
7
|
-
* @param range - The date range to check.
|
|
8
|
-
* @param dayOfWeek - The day(s) of the week to check for (`0-6`, where `0` is
|
|
9
|
-
* Sunday).
|
|
10
|
-
* @param dateLib - The date utility library instance.
|
|
11
|
-
* @returns `true` if the range contains the specified day(s) of the week,
|
|
12
|
-
* otherwise `false`.
|
|
13
|
-
* @group Utilities
|
|
14
|
-
*/
|
|
15
|
-
function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {
|
|
16
|
-
const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;
|
|
17
|
-
let date = range.from;
|
|
18
|
-
const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
|
|
19
|
-
// iterate at maximum one week or the total days if the range is shorter than one week
|
|
20
|
-
const totalDaysLimit = Math.min(totalDays, 6);
|
|
21
|
-
for (let i = 0; i <= totalDaysLimit; i++) {
|
|
22
|
-
if (dayOfWeekArr.includes(date.getDay())) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
date = dateLib.addDays(date, 1);
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { rangeContainsDayOfWeek };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { defaultDateLib } from '../classes/DateLib.js';
|
|
2
|
-
import { dateMatchModifiers } from './dateMatchModifiers.js';
|
|
3
|
-
import { rangeContainsDayOfWeek } from './rangeContainsDayOfWeek.js';
|
|
4
|
-
import { rangeIncludesDate } from './rangeIncludesDate.js';
|
|
5
|
-
import { rangeOverlaps } from './rangeOverlaps.js';
|
|
6
|
-
import { isDatesArray, isDateRange, isDayOfWeekType, isDateInterval, isDateAfterType, isDateBeforeType } from './typeguards.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Checks if a date range contains dates that match the given modifiers.
|
|
10
|
-
*
|
|
11
|
-
* @since 9.2.2
|
|
12
|
-
* @param range - The date range to check.
|
|
13
|
-
* @param modifiers - The modifiers to match against.
|
|
14
|
-
* @param dateLib - The date utility library instance.
|
|
15
|
-
* @returns `true` if the range contains matching dates, otherwise `false`.
|
|
16
|
-
* @group Utilities
|
|
17
|
-
*/
|
|
18
|
-
function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
|
|
19
|
-
const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];
|
|
20
|
-
// Defer function matchers evaluation as they are the least performant.
|
|
21
|
-
const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== "function");
|
|
22
|
-
const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {
|
|
23
|
-
if (typeof matcher === "boolean")
|
|
24
|
-
return matcher;
|
|
25
|
-
if (dateLib.isDate(matcher)) {
|
|
26
|
-
return rangeIncludesDate(range, matcher, false, dateLib);
|
|
27
|
-
}
|
|
28
|
-
if (isDatesArray(matcher, dateLib)) {
|
|
29
|
-
return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));
|
|
30
|
-
}
|
|
31
|
-
if (isDateRange(matcher)) {
|
|
32
|
-
if (matcher.from && matcher.to) {
|
|
33
|
-
return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);
|
|
34
|
-
}
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
if (isDayOfWeekType(matcher)) {
|
|
38
|
-
return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);
|
|
39
|
-
}
|
|
40
|
-
if (isDateInterval(matcher)) {
|
|
41
|
-
const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);
|
|
42
|
-
if (isClosedInterval) {
|
|
43
|
-
return rangeOverlaps(range, {
|
|
44
|
-
from: dateLib.addDays(matcher.after, 1),
|
|
45
|
-
to: dateLib.addDays(matcher.before, -1),
|
|
46
|
-
}, dateLib);
|
|
47
|
-
}
|
|
48
|
-
return (dateMatchModifiers(range.from, matcher, dateLib) ||
|
|
49
|
-
dateMatchModifiers(range.to, matcher, dateLib));
|
|
50
|
-
}
|
|
51
|
-
if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {
|
|
52
|
-
return (dateMatchModifiers(range.from, matcher, dateLib) ||
|
|
53
|
-
dateMatchModifiers(range.to, matcher, dateLib));
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
});
|
|
57
|
-
if (nonFunctionMatchersResult) {
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
const functionMatchers = matchers.filter((matcher) => typeof matcher === "function");
|
|
61
|
-
if (functionMatchers.length) {
|
|
62
|
-
let date = range.from;
|
|
63
|
-
const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
|
|
64
|
-
for (let i = 0; i <= totalDays; i++) {
|
|
65
|
-
if (functionMatchers.some((matcher) => matcher(date))) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
date = dateLib.addDays(date, 1);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { rangeContainsModifiers };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { defaultDateLib } from '../classes/DateLib.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Checks if a given date is within a specified date range.
|
|
5
|
-
*
|
|
6
|
-
* @since 9.0.0
|
|
7
|
-
* @param range - The date range to check against.
|
|
8
|
-
* @param date - The date to check.
|
|
9
|
-
* @param excludeEnds - If `true`, the range's start and end dates are excluded.
|
|
10
|
-
* @param dateLib - The date utility library instance.
|
|
11
|
-
* @returns `true` if the date is within the range, otherwise `false`.
|
|
12
|
-
* @group Utilities
|
|
13
|
-
*/
|
|
14
|
-
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
15
|
-
let { from, to } = range;
|
|
16
|
-
const { differenceInCalendarDays, isSameDay } = dateLib;
|
|
17
|
-
if (from && to) {
|
|
18
|
-
const isRangeInverted = differenceInCalendarDays(to, from) < 0;
|
|
19
|
-
if (isRangeInverted) {
|
|
20
|
-
[from, to] = [to, from];
|
|
21
|
-
}
|
|
22
|
-
const isInRange = differenceInCalendarDays(date, from) >= (excludeEnds ? 1 : 0) &&
|
|
23
|
-
differenceInCalendarDays(to, date) >= (excludeEnds ? 1 : 0);
|
|
24
|
-
return isInRange;
|
|
25
|
-
}
|
|
26
|
-
if (!excludeEnds && to) {
|
|
27
|
-
return isSameDay(to, date);
|
|
28
|
-
}
|
|
29
|
-
if (!excludeEnds && from) {
|
|
30
|
-
return isSameDay(from, date);
|
|
31
|
-
}
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { rangeIncludesDate };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { rangeIncludesDate } from './rangeIncludesDate.js';
|
|
2
|
-
import { defaultDateLib } from '../classes/DateLib.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Determines if two date ranges overlap.
|
|
6
|
-
*
|
|
7
|
-
* @since 9.2.2
|
|
8
|
-
* @param rangeLeft - The first date range.
|
|
9
|
-
* @param rangeRight - The second date range.
|
|
10
|
-
* @param dateLib - The date utility library instance.
|
|
11
|
-
* @returns `true` if the ranges overlap, otherwise `false`.
|
|
12
|
-
* @group Utilities
|
|
13
|
-
*/
|
|
14
|
-
function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {
|
|
15
|
-
return (rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||
|
|
16
|
-
rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||
|
|
17
|
-
rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||
|
|
18
|
-
rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { rangeOverlaps };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TZDate } from '../../../../@date-fns/tz/date/index.js';
|
|
2
|
-
import '../../../../@date-fns/tz/date/mini.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Convert a {@link Date} or {@link TZDate} instance to the given time zone.
|
|
6
|
-
* Reuses the same instance when it is already a {@link TZDate} using the target
|
|
7
|
-
* time zone to avoid extra allocations.
|
|
8
|
-
*/
|
|
9
|
-
function toTimeZone(date, timeZone) {
|
|
10
|
-
if (date instanceof TZDate && date.timeZone === timeZone) {
|
|
11
|
-
return date;
|
|
12
|
-
}
|
|
13
|
-
return new TZDate(date, timeZone);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { toTimeZone };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if the given value is of type {@link DateInterval}.
|
|
3
|
-
*
|
|
4
|
-
* @param matcher - The value to check.
|
|
5
|
-
* @returns `true` if the value is a {@link DateInterval}, otherwise `false`.
|
|
6
|
-
* @group Utilities
|
|
7
|
-
*/
|
|
8
|
-
function isDateInterval(matcher) {
|
|
9
|
-
return Boolean(matcher &&
|
|
10
|
-
typeof matcher === "object" &&
|
|
11
|
-
"before" in matcher &&
|
|
12
|
-
"after" in matcher);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Checks if the given value is of type {@link DateRange}.
|
|
16
|
-
*
|
|
17
|
-
* @param value - The value to check.
|
|
18
|
-
* @returns `true` if the value is a {@link DateRange}, otherwise `false`.
|
|
19
|
-
* @group Utilities
|
|
20
|
-
*/
|
|
21
|
-
function isDateRange(value) {
|
|
22
|
-
return Boolean(value && typeof value === "object" && "from" in value);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Checks if the given value is of type {@link DateAfter}.
|
|
26
|
-
*
|
|
27
|
-
* @param value - The value to check.
|
|
28
|
-
* @returns `true` if the value is a {@link DateAfter}, otherwise `false`.
|
|
29
|
-
* @group Utilities
|
|
30
|
-
*/
|
|
31
|
-
function isDateAfterType(value) {
|
|
32
|
-
return Boolean(value && typeof value === "object" && "after" in value);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Checks if the given value is of type {@link DateBefore}.
|
|
36
|
-
*
|
|
37
|
-
* @param value - The value to check.
|
|
38
|
-
* @returns `true` if the value is a {@link DateBefore}, otherwise `false`.
|
|
39
|
-
* @group Utilities
|
|
40
|
-
*/
|
|
41
|
-
function isDateBeforeType(value) {
|
|
42
|
-
return Boolean(value && typeof value === "object" && "before" in value);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Checks if the given value is of type {@link DayOfWeek}.
|
|
46
|
-
*
|
|
47
|
-
* @param value - The value to check.
|
|
48
|
-
* @returns `true` if the value is a {@link DayOfWeek}, otherwise `false`.
|
|
49
|
-
* @group Utilities
|
|
50
|
-
*/
|
|
51
|
-
function isDayOfWeekType(value) {
|
|
52
|
-
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Checks if the given value is an array of valid dates.
|
|
56
|
-
*
|
|
57
|
-
* @private
|
|
58
|
-
* @param value - The value to check.
|
|
59
|
-
* @param dateLib - The date utility library instance.
|
|
60
|
-
* @returns `true` if the value is an array of valid dates, otherwise `false`.
|
|
61
|
-
*/
|
|
62
|
-
function isDatesArray(value, dateLib) {
|
|
63
|
-
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { __assign } from '../../../tslib/tslib.es6.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { RemoveScroll } from './UI.js';
|
|
4
|
-
import SideCar from './sidecar.js';
|
|
5
|
-
|
|
6
|
-
var ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
|
|
7
|
-
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
8
|
-
|
|
9
|
-
export { ReactRemoveScroll as default };
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { __spreadArray } from '../../../tslib/tslib.es6.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { RemoveScrollBar } from '../../../react-remove-scroll-bar/dist/es2015/component.js';
|
|
4
|
-
import { styleSingleton } from '../../../react-style-singleton/dist/es2015/component.js';
|
|
5
|
-
import { nonPassive } from './aggresiveCapture.js';
|
|
6
|
-
import { locationCouldBeScrolled, handleScroll } from './handleScroll.js';
|
|
7
|
-
|
|
8
|
-
var getTouchXY = function (event) {
|
|
9
|
-
return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
10
|
-
};
|
|
11
|
-
var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
|
|
12
|
-
var extractRef = function (ref) {
|
|
13
|
-
return ref && 'current' in ref ? ref.current : ref;
|
|
14
|
-
};
|
|
15
|
-
var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
|
|
16
|
-
var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
|
|
17
|
-
var idCounter = 0;
|
|
18
|
-
var lockStack = [];
|
|
19
|
-
function RemoveScrollSideCar(props) {
|
|
20
|
-
var shouldPreventQueue = React.useRef([]);
|
|
21
|
-
var touchStartRef = React.useRef([0, 0]);
|
|
22
|
-
var activeAxis = React.useRef();
|
|
23
|
-
var id = React.useState(idCounter++)[0];
|
|
24
|
-
var Style = React.useState(styleSingleton)[0];
|
|
25
|
-
var lastProps = React.useRef(props);
|
|
26
|
-
React.useEffect(function () {
|
|
27
|
-
lastProps.current = props;
|
|
28
|
-
}, [props]);
|
|
29
|
-
React.useEffect(function () {
|
|
30
|
-
if (props.inert) {
|
|
31
|
-
document.body.classList.add("block-interactivity-".concat(id));
|
|
32
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
33
|
-
allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
|
|
34
|
-
return function () {
|
|
35
|
-
document.body.classList.remove("block-interactivity-".concat(id));
|
|
36
|
-
allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return;
|
|
40
|
-
}, [props.inert, props.lockRef.current, props.shards]);
|
|
41
|
-
var shouldCancelEvent = React.useCallback(function (event, parent) {
|
|
42
|
-
if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {
|
|
43
|
-
return !lastProps.current.allowPinchZoom;
|
|
44
|
-
}
|
|
45
|
-
var touch = getTouchXY(event);
|
|
46
|
-
var touchStart = touchStartRef.current;
|
|
47
|
-
var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
|
|
48
|
-
var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
|
|
49
|
-
var currentAxis;
|
|
50
|
-
var target = event.target;
|
|
51
|
-
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
|
|
52
|
-
// allow horizontal touch move on Range inputs. They will not cause any scroll
|
|
53
|
-
if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
// allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target
|
|
57
|
-
var selection = window.getSelection();
|
|
58
|
-
var anchorNode = selection && selection.anchorNode;
|
|
59
|
-
var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
|
|
60
|
-
if (isTouchingSelection) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
64
|
-
if (!canBeScrolledInMainDirection) {
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
if (canBeScrolledInMainDirection) {
|
|
68
|
-
currentAxis = moveDirection;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
currentAxis = moveDirection === 'v' ? 'h' : 'v';
|
|
72
|
-
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
73
|
-
// other axis might be not scrollable
|
|
74
|
-
}
|
|
75
|
-
if (!canBeScrolledInMainDirection) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
|
|
79
|
-
activeAxis.current = currentAxis;
|
|
80
|
-
}
|
|
81
|
-
if (!currentAxis) {
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
var cancelingAxis = activeAxis.current || currentAxis;
|
|
85
|
-
return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY);
|
|
86
|
-
}, []);
|
|
87
|
-
var shouldPrevent = React.useCallback(function (_event) {
|
|
88
|
-
var event = _event;
|
|
89
|
-
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
|
|
90
|
-
// not the last active
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
|
|
94
|
-
var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];
|
|
95
|
-
// self event, and should be canceled
|
|
96
|
-
if (sourceEvent && sourceEvent.should) {
|
|
97
|
-
if (event.cancelable) {
|
|
98
|
-
event.preventDefault();
|
|
99
|
-
}
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
// outside or shard event
|
|
103
|
-
if (!sourceEvent) {
|
|
104
|
-
var shardNodes = (lastProps.current.shards || [])
|
|
105
|
-
.map(extractRef)
|
|
106
|
-
.filter(Boolean)
|
|
107
|
-
.filter(function (node) { return node.contains(event.target); });
|
|
108
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
109
|
-
if (shouldStop) {
|
|
110
|
-
if (event.cancelable) {
|
|
111
|
-
event.preventDefault();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}, []);
|
|
116
|
-
var shouldCancel = React.useCallback(function (name, delta, target, should) {
|
|
117
|
-
var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };
|
|
118
|
-
shouldPreventQueue.current.push(event);
|
|
119
|
-
setTimeout(function () {
|
|
120
|
-
shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
|
|
121
|
-
}, 1);
|
|
122
|
-
}, []);
|
|
123
|
-
var scrollTouchStart = React.useCallback(function (event) {
|
|
124
|
-
touchStartRef.current = getTouchXY(event);
|
|
125
|
-
activeAxis.current = undefined;
|
|
126
|
-
}, []);
|
|
127
|
-
var scrollWheel = React.useCallback(function (event) {
|
|
128
|
-
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
129
|
-
}, []);
|
|
130
|
-
var scrollTouchMove = React.useCallback(function (event) {
|
|
131
|
-
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
132
|
-
}, []);
|
|
133
|
-
React.useEffect(function () {
|
|
134
|
-
lockStack.push(Style);
|
|
135
|
-
props.setCallbacks({
|
|
136
|
-
onScrollCapture: scrollWheel,
|
|
137
|
-
onWheelCapture: scrollWheel,
|
|
138
|
-
onTouchMoveCapture: scrollTouchMove,
|
|
139
|
-
});
|
|
140
|
-
document.addEventListener('wheel', shouldPrevent, nonPassive);
|
|
141
|
-
document.addEventListener('touchmove', shouldPrevent, nonPassive);
|
|
142
|
-
document.addEventListener('touchstart', scrollTouchStart, nonPassive);
|
|
143
|
-
return function () {
|
|
144
|
-
lockStack = lockStack.filter(function (inst) { return inst !== Style; });
|
|
145
|
-
document.removeEventListener('wheel', shouldPrevent, nonPassive);
|
|
146
|
-
document.removeEventListener('touchmove', shouldPrevent, nonPassive);
|
|
147
|
-
document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
|
|
148
|
-
};
|
|
149
|
-
}, []);
|
|
150
|
-
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
151
|
-
return (React.createElement(React.Fragment, null,
|
|
152
|
-
inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,
|
|
153
|
-
removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));
|
|
154
|
-
}
|
|
155
|
-
function getOutermostShadowParent(node) {
|
|
156
|
-
var shadowParent = null;
|
|
157
|
-
while (node !== null) {
|
|
158
|
-
if (node instanceof ShadowRoot) {
|
|
159
|
-
shadowParent = node.host;
|
|
160
|
-
node = node.host;
|
|
161
|
-
}
|
|
162
|
-
node = node.parentNode;
|
|
163
|
-
}
|
|
164
|
-
return shadowParent;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export { RemoveScrollSideCar, getDeltaXY, getTouchXY };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { __rest, __assign } from '../../../tslib/tslib.es6.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { zeroRightClassName, fullWidthClassName } from '../../../react-remove-scroll-bar/dist/es2015/constants.js';
|
|
4
|
-
import { effectCar } from './medium.js';
|
|
5
|
-
import { useMergeRefs } from '../../../use-callback-ref/dist/es2015/useMergeRef.js';
|
|
6
|
-
|
|
7
|
-
var nothing = function () {
|
|
8
|
-
return;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Removes scrollbar from the page and contain the scroll within the Lock
|
|
12
|
-
*/
|
|
13
|
-
var RemoveScroll = React.forwardRef(function (props, parentRef) {
|
|
14
|
-
var ref = React.useRef(null);
|
|
15
|
-
var _a = React.useState({
|
|
16
|
-
onScrollCapture: nothing,
|
|
17
|
-
onWheelCapture: nothing,
|
|
18
|
-
onTouchMoveCapture: nothing,
|
|
19
|
-
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
20
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
21
|
-
var SideCar = sideCar;
|
|
22
|
-
var containerRef = useMergeRefs([ref, parentRef]);
|
|
23
|
-
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
24
|
-
return (React.createElement(React.Fragment, null,
|
|
25
|
-
enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
|
|
26
|
-
forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
27
|
-
});
|
|
28
|
-
RemoveScroll.defaultProps = {
|
|
29
|
-
enabled: true,
|
|
30
|
-
removeScrollBar: true,
|
|
31
|
-
inert: false,
|
|
32
|
-
};
|
|
33
|
-
RemoveScroll.classNames = {
|
|
34
|
-
fullWidth: fullWidthClassName,
|
|
35
|
-
zeroRight: zeroRightClassName,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export { RemoveScroll };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var passiveSupported = false;
|
|
2
|
-
if (typeof window !== 'undefined') {
|
|
3
|
-
try {
|
|
4
|
-
var options = Object.defineProperty({}, 'passive', {
|
|
5
|
-
get: function () {
|
|
6
|
-
passiveSupported = true;
|
|
7
|
-
return true;
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
window.addEventListener('test', options, options);
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
window.removeEventListener('test', options, options);
|
|
14
|
-
}
|
|
15
|
-
catch (err) {
|
|
16
|
-
passiveSupported = false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
20
|
-
|
|
21
|
-
export { nonPassive };
|