@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
package/README.md
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
<a href="https://www.npmjs.com/package/@coopdigital/react"><img src="https://img.shields.io/npm/v/%40coopdigital%2Freact?color=E85A00" alt="npm version" /></a>
|
|
10
10
|
<img alt="NPM Last Update" src="https://img.shields.io/npm/last-update/%40coopdigital%2Freact?label=published&color=6762F9">
|
|
11
11
|
<img alt="NPM Downloads" src="https://img.shields.io/npm/d18m/%40coopdigital%2Freact?color=819C00">
|
|
12
|
-
<a href="https://
|
|
12
|
+
<a href="https://experience.coop.co.uk/react/"><img src="https://img.shields.io/badge/storybook-react-F85792" alt="storybook" /></a>
|
|
13
13
|
|
|
14
14
|
> React components for the Experience Library design system.
|
|
15
15
|
|
|
16
|
-
You can see the full range of components and documentation on the [Experience Kit Storybook](https://
|
|
16
|
+
You can see the full range of components and documentation on the [Experience Kit Storybook](https://experience.coop.co.uk/react/)
|
|
17
17
|
|
|
18
18
|
## Getting started
|
|
19
19
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import
|
|
5
|
+
import React, { useState, useCallback } from 'react';
|
|
6
6
|
import { hasUserBg } from '../../utils/index.js';
|
|
7
7
|
import { LoadingIcon } from '../icons/LoadingIcon.js';
|
|
8
8
|
|
|
@@ -32,8 +32,8 @@ const Button = ({ as, children, className, href, isDisabled = false, isFullWidth
|
|
|
32
32
|
onClick: onClick ? handleClick : undefined,
|
|
33
33
|
...props,
|
|
34
34
|
};
|
|
35
|
-
const finalChildren = isPending || isLoading ? (jsxs(Fragment, { children: [loadingText, jsx(LoadingIcon, {})] })) : (children);
|
|
36
|
-
return
|
|
35
|
+
const finalChildren = isPending || isLoading ? (jsxs(Fragment, { children: [loadingText, jsx(LoadingIcon, { stroke: "currentColor", strokeWidth: "1px" })] })) : (children);
|
|
36
|
+
return React.createElement(element, { ...componentProps, ref }, finalChildren);
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export { Button, Button as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { useSlots } from '../../hooks/useSlots.js';
|
|
5
5
|
import { hasUserBg } from '../../utils/index.js';
|
|
6
6
|
import { ChevronRightIcon } from '../icons/ChevronRightIcon.js';
|
|
@@ -35,12 +35,12 @@ const Card = ({ chevron = false, children, className, href, hrefAs, imagePositio
|
|
|
35
35
|
...props,
|
|
36
36
|
};
|
|
37
37
|
if (href && slots.CardHeading) {
|
|
38
|
-
slots.CardHeading =
|
|
38
|
+
slots.CardHeading = React.createElement(linkElement, linkProps, slots.CardHeading);
|
|
39
39
|
}
|
|
40
|
-
return (jsxs("article", { ...componentProps, ref: ref, children: [slots.CardImage, slots.CardBadge,
|
|
40
|
+
return (jsxs("article", { ...componentProps, ref: ref, children: [slots.CardImage, slots.CardBadge, React.createElement(hasLinkWrapper ? linkElement : "div", hasLinkWrapper ? { href, ...innerProps } : innerProps, jsxs("div", { className: "coop-card--content", children: [slots.CardLabel, slots.CardHeading, slots.CardBody, slots.Children] }), chevron && (jsx("span", { "aria-hidden": "true", className: "coop-card--icon", role: "presentation", children: jsx(ChevronRightIcon, {}) })))] }));
|
|
41
41
|
};
|
|
42
42
|
const CardHeading = ({ as = "h3", children, className }) => {
|
|
43
|
-
return
|
|
43
|
+
return React.createElement(as, { className: clsx("coop-card--heading", className) }, children);
|
|
44
44
|
};
|
|
45
45
|
const CardLabel = ({ children, className }) => {
|
|
46
46
|
return jsx("span", { className: clsx("coop-card--label", className), children: children });
|
|
@@ -26,11 +26,12 @@ export interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputEleme
|
|
|
26
26
|
error?: boolean;
|
|
27
27
|
/** **(Optional)** Specify the Date Picker id. Will be auto-generated if not set. */
|
|
28
28
|
id?: string;
|
|
29
|
-
/** **(Optional)** Specify the initial month view for the picker.
|
|
29
|
+
/** **(Optional)** Specify the initial month view for the picker. Combine with `initialSelected` to pre-select a date.
|
|
30
30
|
*
|
|
31
31
|
* Default: today.
|
|
32
32
|
*/
|
|
33
33
|
initialDate?: Date | DateRange;
|
|
34
|
+
/** **(Optional)** Specify whether the initial date should be pre-selected. */
|
|
34
35
|
initialSelected?: boolean;
|
|
35
36
|
/** **(Optional)** Specify the picker mode. */
|
|
36
37
|
mode?: Mode;
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useMemo, useReducer, useCallback } from 'react';
|
|
6
|
+
import { DayPicker } from 'react-day-picker';
|
|
6
7
|
import { useId } from '../../hooks/useId.js';
|
|
7
8
|
import { Button } from '../Button/Button.js';
|
|
8
|
-
import {
|
|
9
|
+
import { CalendarIcon } from '../icons/CalendarIcon.js';
|
|
10
|
+
import { CrossIcon } from '../icons/CrossIcon.js';
|
|
9
11
|
import { TickIcon } from '../icons/TickIcon.js';
|
|
10
12
|
import { Popover } from '../Popover/Popover.js';
|
|
11
13
|
import { TextInput } from '../TextInput/TextInput.js';
|
|
12
14
|
import { getInitialDate, getStartDate, getEndDate, getDefaultMonth, getDateValues, shouldClose, shouldSkipParsing } from './datepicker-utils.js';
|
|
13
|
-
import { DayPicker } from '../../node_modules/react-day-picker/dist/esm/DayPicker.js';
|
|
14
15
|
|
|
15
16
|
const now = new Date();
|
|
16
17
|
const componentConfig = {
|
|
@@ -116,9 +117,9 @@ const DatePicker = ({ className, closeOnSelect = true, dateFormat = "dd/MM/yyyy"
|
|
|
116
117
|
return lowerCaseDateFormat;
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
|
-
return (jsxs("div", { ...componentProps, children: [jsxs(Popover, { onOpenChange: setOpen, open: state.open, children: [
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
return (jsxs("div", { ...componentProps, children: [jsxs(Popover, { onOpenChange: setOpen, open: state.open, children: [jsx(Popover.Anchor, { className: "coop-datepicker-inner", children: jsx(TextInput, { autoComplete: "off", className: "coop-datepicker-input", disabled: disabled, id: uid + componentConfig.fieldSuffix,
|
|
121
|
+
//maxLength={dateFormat.length}
|
|
122
|
+
name: name + componentConfig.fieldSuffix, onChange: updateFromInput, placeholder: getPlaceholder(), ref: ref, required: required, size: size, suffix: jsx(Popover.Trigger, { "aria-label": "Choose date", className: "coop-datepicker-trigger", children: jsx(CalendarIcon, { width: 24 }) }), suffixInline: true, value: (_f = (_e = state === null || state === void 0 ? void 0 : state[mode]) === null || _e === void 0 ? void 0 : _e.input) !== null && _f !== void 0 ? _f : "" }) }), jsxs(Popover.Content, { "aria-label": "Date picker", className: "coop-datepicker-calendar bg-white", collisionPadding: 16, sideOffset: 4, children: [jsx(Calendar
|
|
122
123
|
// jsx-ally throws here because we set autoFocus, but this
|
|
123
124
|
// is not a standard element. Daypicker uses this value to
|
|
124
125
|
// focus the day rather than the nav when it renders.
|
|
@@ -130,7 +131,7 @@ const DatePicker = ({ className, closeOnSelect = true, dateFormat = "dd/MM/yyyy"
|
|
|
130
131
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
131
132
|
autoFocus: true, captionLayout: "dropdown",
|
|
132
133
|
//defaultMonth={defaultMonth}
|
|
133
|
-
disabled: disabledDates, endMonth: endDate, month: state.view, onMonthChange: setView, onSelect: updateValues, startMonth: startDate, ...calendarProps[mode] }), jsxs("div", { className: "coop-datepicker-actions", children: [jsxs(Button, { "aria-label": "Cancel", className: "bg-tint-grey", onClick: resetState, size: "sm", children: ["Clear ", jsx(
|
|
134
|
+
disabled: disabledDates, endMonth: endDate, month: state.view, onMonthChange: setView, onSelect: updateValues, startMonth: startDate, ...calendarProps[mode] }), jsxs("div", { className: "coop-datepicker-actions", children: [jsxs(Button, { "aria-label": "Cancel", className: "bg-tint-grey", onClick: resetState, size: "sm", children: ["Clear ", jsx(CrossIcon, { stroke: "black", strokeWidth: 1 })] }), jsx(Popover.Close, { asChild: true, children: jsxs(Button, { "aria-label": "Accept", size: "sm", children: ["OK ", jsx(TickIcon, { stroke: "white", strokeWidth: 1 })] }) })] })] })] }), jsx("div", { "aria-live": "assertive", className: "sr-only coop-datepicker-status", role: "status", children: (_g = state.message) !== null && _g !== void 0 ? _g : footerMessage[mode] }), mode === "single" && jsx("input", { ...valueProps, value: (_j = (_h = state.single) === null || _h === void 0 ? void 0 : _h.field) !== null && _j !== void 0 ? _j : "" }), mode === "multiple" && jsx("input", { ...valueProps, value: (_l = (_k = state.multiple) === null || _k === void 0 ? void 0 : _k.field) !== null && _l !== void 0 ? _l : "" }), mode === "range" && (jsxs(Fragment, { children: [jsx("input", { ...baseValueProps, id: `${uid}_start`, name: `${name}_start`, value: (_p = (_o = (_m = state.range) === null || _m === void 0 ? void 0 : _m.field) === null || _o === void 0 ? void 0 : _o.from) !== null && _p !== void 0 ? _p : "" }), jsx("input", { ...baseValueProps, id: `${uid}_end`, name: `${name}_end`, value: (_s = (_r = (_q = state.range) === null || _q === void 0 ? void 0 : _q.field) === null || _r === void 0 ? void 0 : _r.to) !== null && _s !== void 0 ? _s : "" })] }))] }));
|
|
134
135
|
};
|
|
135
136
|
DatePicker.config = componentConfig;
|
|
136
137
|
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { isValid } from '
|
|
2
|
-
import { parse } from '../../node_modules/date-fns/parse.js';
|
|
3
|
-
import { addYears } from '../../node_modules/date-fns/addYears.js';
|
|
4
|
-
import { format } from '../../node_modules/date-fns/format.js';
|
|
5
|
-
import { isBefore } from '../../node_modules/date-fns/isBefore.js';
|
|
1
|
+
import { addYears, isValid, parse, format, isBefore } from 'date-fns';
|
|
6
2
|
|
|
7
3
|
function isValidDate(date) {
|
|
8
4
|
return !!date && typeof date !== "string" && typeof date !== "number" && isValid(date);
|
|
@@ -21,7 +21,7 @@ const Expandable = ({ children, className, ref, ...props }) => {
|
|
|
21
21
|
return (jsxs("details", { ...componentProps, ref: ref, children: [slots.ExpandableSummary, slots.ExpandableContent] }));
|
|
22
22
|
};
|
|
23
23
|
const ExpandableSummary = ({ children, className, ...props }) => {
|
|
24
|
-
return (jsxs("summary", { ...props, className: className, children: [children, jsx(ChevronDownIcon, { className: "coop-expandable--icon",
|
|
24
|
+
return (jsxs("summary", { ...props, className: className, children: [children, jsx(ChevronDownIcon, { className: "coop-expandable--icon", width: "20" })] }));
|
|
25
25
|
};
|
|
26
26
|
const ExpandableContent = ({ children, className, ...props }) => {
|
|
27
27
|
return (jsx("div", { className: clsx("coop-expandable--content", className), ...props, children: children }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HTMLAttributes,
|
|
1
|
+
import type { HTMLAttributes, Ref } from "react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { type ErrorProps } from "../FieldMarkers/Error";
|
|
4
4
|
import { type HintProps } from "../FieldMarkers/Hint";
|
|
@@ -19,27 +19,10 @@ interface FieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
19
19
|
/** **(Optional)** Specify a custom React ref for this component. */
|
|
20
20
|
ref?: Ref<HTMLDivElement>;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
className?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare const FieldControl: {
|
|
29
|
-
({ children, className, ...props }: ControlProps): JSX.Element;
|
|
30
|
-
config: {
|
|
31
|
-
name: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export declare const Field: (({ boxed, children, className, error, hideErrorBar, ref, ...props }: FieldProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
35
|
-
Control: {
|
|
36
|
-
({ children, className, ...props }: ControlProps): JSX.Element;
|
|
37
|
-
config: {
|
|
38
|
-
name: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
Error: {
|
|
42
|
-
(props: ErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const Field: {
|
|
23
|
+
({ boxed, children, className, error, hideErrorBar, ref, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Label: {
|
|
25
|
+
(props: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
43
26
|
config: {
|
|
44
27
|
name: string;
|
|
45
28
|
};
|
|
@@ -50,8 +33,8 @@ export declare const Field: (({ boxed, children, className, error, hideErrorBar,
|
|
|
50
33
|
name: string;
|
|
51
34
|
};
|
|
52
35
|
};
|
|
53
|
-
|
|
54
|
-
(props:
|
|
36
|
+
Error: {
|
|
37
|
+
(props: ErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
55
38
|
config: {
|
|
56
39
|
name: string;
|
|
57
40
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { useId } from '../../hooks/useId.js';
|
|
5
5
|
import { useSlots } from '../../hooks/useSlots.js';
|
|
6
6
|
import { Error } from '../FieldMarkers/Error.js';
|
|
@@ -14,7 +14,7 @@ const componentSlots = {
|
|
|
14
14
|
FieldHint: null,
|
|
15
15
|
FieldLabel: null,
|
|
16
16
|
};
|
|
17
|
-
const
|
|
17
|
+
const Field = ({ boxed = false, children, className, error = false, hideErrorBar = false, ref, ...props }) => {
|
|
18
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
19
19
|
const slots = { ...useSlots(componentSlots, children) };
|
|
20
20
|
const hasMarkers = !!((_b = (_a = slots.FieldLabel) !== null && _a !== void 0 ? _a : slots.FieldError) !== null && _b !== void 0 ? _b : slots.FieldHint);
|
|
@@ -33,7 +33,7 @@ const Root = ({ boxed = false, children, className, error = false, hideErrorBar
|
|
|
33
33
|
return true;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
if (
|
|
36
|
+
if (React.isValidElement(control)) {
|
|
37
37
|
const controlProps = control.props;
|
|
38
38
|
controlId = (_c = controlProps.id) !== null && _c !== void 0 ? _c : controlId;
|
|
39
39
|
controlDisabled = (_d = controlProps.disabled) !== null && _d !== void 0 ? _d : false;
|
|
@@ -41,10 +41,10 @@ const Root = ({ boxed = false, children, className, error = false, hideErrorBar
|
|
|
41
41
|
isInline = (_k = (_j = (_h = control === null || control === void 0 ? void 0 : control.type) === null || _h === void 0 ? void 0 : _h.config) === null || _j === void 0 ? void 0 : _j.isInline) !== null && _k !== void 0 ? _k : false;
|
|
42
42
|
slots.Control = controlProps.id
|
|
43
43
|
? control
|
|
44
|
-
:
|
|
44
|
+
: React.cloneElement(control, { id: controlId });
|
|
45
45
|
}
|
|
46
|
-
if (
|
|
47
|
-
slots.FieldLabel =
|
|
46
|
+
if (React.isValidElement(slots.FieldLabel) && !slots.FieldLabel.props.htmlFor) {
|
|
47
|
+
slots.FieldLabel = React.cloneElement(slots.FieldLabel, {
|
|
48
48
|
htmlFor: controlId + controlSuffix,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
@@ -58,21 +58,14 @@ const Root = ({ boxed = false, children, className, error = false, hideErrorBar
|
|
|
58
58
|
};
|
|
59
59
|
return (jsxs("div", { ...componentProps, ref: ref, children: [!isInline && hasMarkers && (jsxs("div", { className: "coop-field-markers", children: [slots.FieldLabel, slots.FieldHint, slots.FieldError] })), slots.Control && (jsxs("div", { className: "coop-field-control", children: [slots.Control, isInline && hasMarkers && (jsxs("div", { className: "coop-field-markers", children: [slots.FieldLabel, slots.FieldHint, slots.FieldError] }))] })), slots.Children] }));
|
|
60
60
|
};
|
|
61
|
-
const FieldControl = ({ children, className, ...props }) => {
|
|
62
|
-
return (jsx("div", { className: clsx("coop-field-control ", className), ...props, children: children }));
|
|
63
|
-
};
|
|
64
61
|
const FieldLabel = (props) => jsx(Label, { ...props });
|
|
65
62
|
const FieldHint = (props) => jsx(Hint, { ...props });
|
|
66
63
|
const FieldError = (props) => jsx(Error, { ...props });
|
|
67
|
-
FieldControl.config = { name: "FieldControl" };
|
|
68
64
|
FieldLabel.config = { name: "FieldLabel" };
|
|
69
65
|
FieldHint.config = { name: "FieldHint" };
|
|
70
66
|
FieldError.config = { name: "FieldError" };
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Hint: FieldHint,
|
|
75
|
-
Label: FieldLabel,
|
|
76
|
-
});
|
|
67
|
+
Field.Label = FieldLabel;
|
|
68
|
+
Field.Hint = FieldHint;
|
|
69
|
+
Field.Error = FieldError;
|
|
77
70
|
|
|
78
|
-
export { Field,
|
|
71
|
+
export { Field, Field as default };
|
|
@@ -21,23 +21,8 @@ export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElemen
|
|
|
21
21
|
/** **(Optional)** Specify the size of the Fieldset and all its descendents. */
|
|
22
22
|
size?: StandardSizes;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
boxed?: boolean;
|
|
27
|
-
/** **(Optional)** Form elements inside the Fieldset.Fields container. */
|
|
28
|
-
children?: string | React.ReactNode;
|
|
29
|
-
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
30
|
-
className?: string;
|
|
31
|
-
/** **(Optional)** Specify the CheckboxGroup orientation. */
|
|
32
|
-
orientation?: "horizontal" | "vertical";
|
|
33
|
-
}
|
|
34
|
-
export declare const FieldsetFields: {
|
|
35
|
-
({ boxed, children, className, orientation, ...props }: FieldsetFieldsProps): JSX.Element;
|
|
36
|
-
config: {
|
|
37
|
-
name: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export declare const Fieldset: (({ children, className, disabled, error, hideErrorBar, ref, size, ...props }: FieldsetProps) => JSX.Element) & {
|
|
24
|
+
export declare const Fieldset: {
|
|
25
|
+
({ children, className, disabled, error, hideErrorBar, ref, size, ...props }: FieldsetProps): JSX.Element;
|
|
41
26
|
Error: {
|
|
42
27
|
(props: ErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
43
28
|
config: {
|
|
@@ -63,4 +48,14 @@ export declare const Fieldset: (({ children, className, disabled, error, hideErr
|
|
|
63
48
|
};
|
|
64
49
|
};
|
|
65
50
|
};
|
|
51
|
+
interface FieldsetFieldsProps {
|
|
52
|
+
/** **(Optional)** Specify whether all descendent Fields should render inside a box. */
|
|
53
|
+
boxed?: boolean;
|
|
54
|
+
/** **(Optional)** Form elements inside the Fieldset.Fields container. */
|
|
55
|
+
children?: string | React.ReactNode;
|
|
56
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
57
|
+
className?: string;
|
|
58
|
+
/** **(Optional)** Specify the CheckboxGroup orientation. */
|
|
59
|
+
orientation?: "horizontal" | "vertical";
|
|
60
|
+
}
|
|
66
61
|
export default Fieldset;
|
|
@@ -4,7 +4,7 @@ import { Error } from '../FieldMarkers/Error.js';
|
|
|
4
4
|
import { Hint } from '../FieldMarkers/Hint.js';
|
|
5
5
|
import { Legend } from '../FieldMarkers/Legend.js';
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const Fieldset = ({ children, className, disabled, error = false, hideErrorBar = false, ref, size = "md", ...props }) => {
|
|
8
8
|
const componentProps = {
|
|
9
9
|
"aria-disabled": disabled,
|
|
10
10
|
className: clsx("coop-fieldset", className),
|
|
@@ -32,11 +32,9 @@ FieldsetFields.config = { name: "FieldsetField" };
|
|
|
32
32
|
FieldsetLegend.config = { name: "FieldsetLegend" };
|
|
33
33
|
FieldsetHint.config = { name: "FieldsetHint" };
|
|
34
34
|
FieldsetError.config = { name: "FieldsetError" };
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Legend: FieldsetLegend,
|
|
40
|
-
});
|
|
35
|
+
Fieldset.Error = FieldsetError;
|
|
36
|
+
Fieldset.Fields = FieldsetFields;
|
|
37
|
+
Fieldset.Hint = FieldsetHint;
|
|
38
|
+
Fieldset.Legend = FieldsetLegend;
|
|
41
39
|
|
|
42
|
-
export { Fieldset,
|
|
40
|
+
export { Fieldset, Fieldset as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { useSlots } from '../../hooks/useSlots.js';
|
|
5
5
|
import { hasUserBg } from '../../utils/index.js';
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ const Pill = ({ as, children, className, href, ref, size = "md", ...props }) =>
|
|
|
19
19
|
};
|
|
20
20
|
// https://github.com/facebook/react/issues/34775
|
|
21
21
|
// eslint-disable-next-line react-hooks/refs
|
|
22
|
-
return
|
|
22
|
+
return React.createElement(element, { ...componentProps, ref }, slots.PillBadge, slots.Children);
|
|
23
23
|
};
|
|
24
24
|
const PillBadge = ({ children, className }) => {
|
|
25
25
|
return (jsx("span", { className: clsx("coop-pill--badge", !hasUserBg(className) && "bg-red", className), children: children }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useSlots } from '../../hooks/useSlots.js';
|
|
5
5
|
import { hasUserBg, bgClassToColor } from '../../utils/index.js';
|
|
@@ -12,7 +12,7 @@ const componentSlots = {
|
|
|
12
12
|
const Popover = ({ children, ...props }) => {
|
|
13
13
|
var _a;
|
|
14
14
|
const slots = useSlots(componentSlots, children);
|
|
15
|
-
return (jsxs(
|
|
15
|
+
return (jsxs(RadixPopover.Root, { ...props, children: [(_a = slots.PopoverAnchor) !== null && _a !== void 0 ? _a : slots.PopoverTrigger, jsx(RadixPopover.Portal, { children: slots.PopoverContent })] }));
|
|
16
16
|
};
|
|
17
17
|
const PopoverContent = ({ align = "center", alignOffset = 0, asChild = false, avoidCollisions = true, children, className, collisionPadding = 16, ref, side = "bottom", sideOffset = 4, style, ...props }) => {
|
|
18
18
|
const componentProps = {
|
|
@@ -31,7 +31,7 @@ const PopoverContent = ({ align = "center", alignOffset = 0, asChild = false, av
|
|
|
31
31
|
...style,
|
|
32
32
|
"--popover-bg": `var(--color-${bgClassToColor(componentProps.className)})`,
|
|
33
33
|
};
|
|
34
|
-
return (jsxs(
|
|
34
|
+
return (jsxs(RadixPopover.Content, { ref: ref, ...componentProps, children: [children, jsx(RadixPopover.Arrow, { className: "coop-popover-arrow" })] }));
|
|
35
35
|
};
|
|
36
36
|
const PopoverTrigger = ({ asChild = false, children, className, ...props }) => {
|
|
37
37
|
const componentProps = {
|
|
@@ -46,7 +46,7 @@ const PopoverTrigger = ({ asChild = false, children, className, ...props }) => {
|
|
|
46
46
|
className: clsx("coop-popover-trigger", className),
|
|
47
47
|
...props,
|
|
48
48
|
};
|
|
49
|
-
return jsx(Trigger, { ...componentProps, children: children });
|
|
49
|
+
return jsx(RadixPopover.Trigger, { ...componentProps, children: children });
|
|
50
50
|
};
|
|
51
51
|
const PopoverClose = ({ asChild = false, children, className, ...props }) => {
|
|
52
52
|
const componentProps = {
|
|
@@ -54,14 +54,14 @@ const PopoverClose = ({ asChild = false, children, className, ...props }) => {
|
|
|
54
54
|
className: clsx("coop-popover-close", className),
|
|
55
55
|
...props,
|
|
56
56
|
};
|
|
57
|
-
return (jsx(Close, { "aria-label": "Close", ...componentProps, children: children }));
|
|
57
|
+
return (jsx(RadixPopover.Close, { "aria-label": "Close", ...componentProps, children: children }));
|
|
58
58
|
};
|
|
59
59
|
const PopoverAnchor = ({ asChild = false, children, ...props }) => {
|
|
60
60
|
const componentProps = {
|
|
61
61
|
asChild,
|
|
62
62
|
...props,
|
|
63
63
|
};
|
|
64
|
-
return jsx(
|
|
64
|
+
return jsx(RadixPopover.Anchor, { ...componentProps, children: children });
|
|
65
65
|
};
|
|
66
66
|
PopoverTrigger.config = { name: "PopoverTrigger" };
|
|
67
67
|
PopoverContent.config = { name: "PopoverContent" };
|
|
@@ -21,7 +21,7 @@ export interface SearchboxProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
|
21
21
|
/** **(Optional)** Specify the TextInput name, also used as the URL search parameter. Defaults to `query`. */
|
|
22
22
|
name?: string;
|
|
23
23
|
/** **(Optional)** Callback to run when the form is submitted. If this is an async function, it will be awaited and the Searchbox will be in a pending state until the promise is resolved. */
|
|
24
|
-
onSubmit?: React.
|
|
24
|
+
onSubmit?: React.SubmitEventHandler<HTMLElement> | undefined;
|
|
25
25
|
/** **(Optional)** Specify the TextInput placeholder text Do not use in place of a form label. */
|
|
26
26
|
placeholder?: string;
|
|
27
27
|
/** **(Optional)** Specify a custom React ref for this component. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import
|
|
5
|
+
import React, { useState, useCallback } from 'react';
|
|
6
6
|
import { useId } from '../../hooks/useId.js';
|
|
7
7
|
import { useSlots } from '../../hooks/useSlots.js';
|
|
8
8
|
import { hasUserBorder } from '../../utils/index.js';
|
|
@@ -15,10 +15,10 @@ const componentSlots = {
|
|
|
15
15
|
SearchboxButton: null,
|
|
16
16
|
SearchboxInput: null,
|
|
17
17
|
};
|
|
18
|
-
const defaultButtonText =
|
|
18
|
+
const defaultButtonText = React.createElement(SearchIcon, {
|
|
19
19
|
alt: "Search",
|
|
20
20
|
stroke: "currentColor",
|
|
21
|
-
|
|
21
|
+
width: 24,
|
|
22
22
|
});
|
|
23
23
|
const Searchbox = ({ action, children, className, id, label, labelVisible = false, onSubmit, ref, size = "md", variant = "solid", ...props }) => {
|
|
24
24
|
const slots = useSlots(componentSlots, children);
|
|
@@ -49,11 +49,11 @@ const Searchbox = ({ action, children, className, id, label, labelVisible = fals
|
|
|
49
49
|
onSubmit: onSubmit ? handleSubmit : undefined,
|
|
50
50
|
...props,
|
|
51
51
|
};
|
|
52
|
-
slots.SearchboxButton =
|
|
52
|
+
slots.SearchboxButton = React.cloneElement(slots.SearchboxButton, {
|
|
53
53
|
isLoading: isPending,
|
|
54
54
|
size,
|
|
55
55
|
});
|
|
56
|
-
slots.SearchboxInput =
|
|
56
|
+
slots.SearchboxInput = React.cloneElement(slots.SearchboxInput, {
|
|
57
57
|
autoCapitalize: "off",
|
|
58
58
|
id: uid,
|
|
59
59
|
size,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { ChevronRightIcon } from '../icons/ChevronRightIcon.js';
|
|
5
5
|
import { Image } from '../Image/Image.js';
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ const Signpost = ({ as, children, className, headingLevel = "h3", href, image, r
|
|
|
10
10
|
className: clsx("coop-signpost", className),
|
|
11
11
|
...props,
|
|
12
12
|
};
|
|
13
|
-
return (jsxs("div", { ...componentProps, ref: ref, children: [image && jsx(Image, { crop: "wide", ...image }),
|
|
13
|
+
return (jsxs("div", { ...componentProps, ref: ref, children: [image && jsx(Image, { crop: "wide", ...image }), React.createElement(element, { href }, jsxs("div", { className: "coop-signpost--content", children: [React.createElement(headingLevel, { className: "coop-signpost--heading" }, children), jsx("span", { "aria-hidden": "true", className: "coop-signpost--icon", role: "presentation", children: jsx(ChevronRightIcon, {}) })] }))] }));
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { Signpost, Signpost as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { hasUserBg } from '../../utils/index.js';
|
|
4
4
|
|
|
5
5
|
const Tag = ({ as, children, className, href, ref, size = "md", ...props }) => {
|
|
@@ -10,7 +10,7 @@ const Tag = ({ as, children, className, href, ref, size = "md", ...props }) => {
|
|
|
10
10
|
href,
|
|
11
11
|
...props,
|
|
12
12
|
};
|
|
13
|
-
return
|
|
13
|
+
return React.createElement(element, { ...componentProps, ref }, children);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { Tag, Tag as default };
|
|
@@ -15,17 +15,21 @@ export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
/** **(Optional)** Specify the prefix. It can be any valid JSX or string. */
|
|
17
17
|
prefix?: React.ReactNode;
|
|
18
|
+
/** **(Optional)** Specify whether the prefix should be rendered inside the input. */
|
|
19
|
+
prefixInline?: boolean;
|
|
18
20
|
/** **(Optional)** Specify a custom React ref for this component. */
|
|
19
21
|
ref?: Ref<HTMLInputElement>;
|
|
20
22
|
/** **(Optional)** Specify the TextInput size. */
|
|
21
23
|
size?: StandardSizes;
|
|
22
24
|
/** **(Optional)** Specify the suffix. It can be any valid JSX or string. */
|
|
23
25
|
suffix?: React.ReactNode;
|
|
26
|
+
/** **(Optional)** Specify whether the suffix should be rendered inside the input. */
|
|
27
|
+
suffixInline?: boolean;
|
|
24
28
|
/** **(Optional)** Specify the TextInput type. */
|
|
25
29
|
type?: "text" | "email" | "number" | "password" | "search" | "tel" | "url" | "date" | "datetime-local" | "week" | "month" | "time";
|
|
26
30
|
}
|
|
27
31
|
export declare const TextInput: {
|
|
28
|
-
({ "aria-placeholder": ariaPlaceholder, className, disabled, error, id, name, placeholder, prefix, ref, size, suffix, type, ...props }: TextInputProps): JSX.Element;
|
|
32
|
+
({ "aria-placeholder": ariaPlaceholder, className, disabled, error, id, name, placeholder, prefix, prefixInline, ref, size, suffix, suffixInline, type, ...props }: TextInputProps): JSX.Element;
|
|
29
33
|
config: {
|
|
30
34
|
isField: true;
|
|
31
35
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useId } from '../../hooks/useId.js';
|
|
4
4
|
|
|
5
|
-
const TextInput = ({ "aria-placeholder": ariaPlaceholder, className, disabled, error = false, id, name, placeholder, prefix, ref, size = "md", suffix, type = "text", ...props }) => {
|
|
5
|
+
const TextInput = ({ "aria-placeholder": ariaPlaceholder, className, disabled, error = false, id, name, placeholder, prefix, prefixInline = false, ref, size = "md", suffix, suffixInline = false, type = "text", ...props }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
const uid = useId(id);
|
|
8
8
|
const componentProps = {
|
|
@@ -17,8 +17,14 @@ const TextInput = ({ "aria-placeholder": ariaPlaceholder, className, disabled, e
|
|
|
17
17
|
type,
|
|
18
18
|
...props,
|
|
19
19
|
};
|
|
20
|
+
const prefixProps = prefix
|
|
21
|
+
? { className: "coop-text-input--prefix", "data-inline": prefixInline || undefined }
|
|
22
|
+
: {};
|
|
23
|
+
const suffixProps = suffix
|
|
24
|
+
? { className: "coop-text-input--suffix", "data-inline": suffixInline || undefined }
|
|
25
|
+
: {};
|
|
20
26
|
//const formItemProps = { "aria-disabled": disabled ? true : undefined }
|
|
21
|
-
return (jsxs("div", { className: "coop-text-input-wrapper", children: [prefix && jsx("span", {
|
|
27
|
+
return (jsxs("div", { className: "coop-text-input-wrapper", children: [prefix && jsx("span", { ...prefixProps, children: prefix }), jsx("input", { ...componentProps, ref: ref }), suffix && jsx("span", { ...suffixProps, children: suffix })] }));
|
|
22
28
|
};
|
|
23
29
|
TextInput.config = {
|
|
24
30
|
isField: true,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SVGProps } from "react";
|
|
2
|
+
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
+
alt?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const AccountCircleFilledIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AccountCircleFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account-circle-filled",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2c7.732 0 14 6.268 14 14 0 6.34-4.216 11.695-9.997 13.417l-.034.012-.029.008a14 14 0 0 1-3.453.553l-.037.002h-.022q-.211.007-.424.007L16 30 16 29.999V30q-.216 0-.432-.008h-.017l-.042-.003c-1.19-.04-2.34-.229-3.437-.549l-.035-.01-.075-.023a14 14 0 0 1-1.96-.755l-.06-.027-.011-.006C5.238 26.36 2 21.557 2 16 2 8.268 8.268 2 16 2m0 2C9.373 4 4 9.373 4 16a11.95 11.95 0 0 0 2.256 6.997 12.03 12.03 0 0 1 5.92-4.374 6 6 0 1 1 7.648 0 12.03 12.03 0 0 1 5.918 4.374A11.95 11.95 0 0 0 28 16c0-6.627-5.373-12-12-12" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AccountCircleFilledIcon };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SVGProps } from "react";
|
|
2
|
+
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
+
alt?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const AccountCircleIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AccountCircleIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account-circle",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2c7.732 0 14 6.268 14 14 0 6.378-4.265 11.758-10.099 13.447l-.03.01q-.447.127-.904.227l-.038.007q-.126.027-.251.051l-.099.02a14 14 0 0 1-.558.091l-.09.013a13 13 0 0 1-.559.067l-.203.017-.115.01q-.153.011-.306.02l-.033.001a14 14 0 0 1-1.43 0q-.018 0-.034-.002l-.306-.019-.115-.01q-.102-.007-.203-.017l-.225-.025-.087-.01-.245-.03-.093-.014-.236-.037-.1-.016a15 15 0 0 1-.57-.109l-.039-.008a14 14 0 0 1-.903-.227l-.032-.01C6.264 27.757 2 22.377 2 16 2 8.268 8.268 2 16 2m.001 18a9.99 9.99 0 0 0-8.397 4.57A11.95 11.95 0 0 0 16 28c3.27 0 6.23-1.31 8.393-3.43A9.99 9.99 0 0 0 16 20M16 4C9.373 4 4 9.373 4 16a11.95 11.95 0 0 0 2.256 6.997 12.03 12.03 0 0 1 5.92-4.374 6 6 0 1 1 7.648 0 12.03 12.03 0 0 1 5.918 4.374A11.95 11.95 0 0 0 28 16c0-6.627-5.373-12-12-12m0 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AccountCircleIcon };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SVGProps } from "react";
|
|
2
|
+
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
+
alt?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const AccountFilledIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|