@coopdigital/react 1.12.0 → 1.13.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/dist/components/AlertBanner/AlertBanner.d.ts +29 -28
- package/dist/components/AlertBanner/AlertBanner.js +16 -12
- package/dist/components/AlertBanner/index.d.ts +2 -4
- package/dist/components/AlertBanner/index.js +5 -0
- package/dist/components/Author/Author.d.ts +25 -23
- package/dist/components/Author/Author.js +24 -17
- package/dist/components/Author/index.d.ts +2 -4
- package/dist/components/Author/index.js +5 -0
- package/dist/components/Button/Button.d.ts +33 -33
- package/dist/components/Button/Button.js +34 -33
- package/dist/components/Button/index.d.ts +2 -4
- package/dist/components/Button/index.js +5 -0
- package/dist/components/Card/Card.d.ts +91 -90
- package/dist/components/Card/Card.js +76 -43
- package/dist/components/Card/index.d.ts +2 -4
- package/dist/components/Card/index.js +5 -0
- package/dist/components/Checkbox/Checkbox.d.ts +26 -25
- package/dist/components/Checkbox/Checkbox.js +20 -20
- package/dist/components/Checkbox/index.d.ts +2 -4
- package/dist/components/Checkbox/index.js +5 -0
- package/dist/components/DatePicker/DatePicker.d.ts +63 -62
- package/dist/components/DatePicker/DatePicker.js +237 -136
- package/dist/components/DatePicker/datepicker-utils.d.ts +6 -66
- package/dist/components/DatePicker/datepicker-utils.js +164 -175
- package/dist/components/DatePicker/index.d.ts +2 -4
- package/dist/components/DatePicker/index.js +5 -0
- package/dist/components/Dialog/Dialog.d.ts +81 -80
- package/dist/components/Dialog/Dialog.js +98 -94
- package/dist/components/Dialog/index.d.ts +2 -4
- package/dist/components/Dialog/index.js +5 -0
- package/dist/components/Expandable/Expandable.d.ts +40 -39
- package/dist/components/Expandable/Expandable.js +30 -22
- package/dist/components/Expandable/index.d.ts +2 -4
- package/dist/components/Expandable/index.js +5 -0
- package/dist/components/Field/Field.context.js +6 -8
- package/dist/components/Field/Field.d.ts +51 -51
- package/dist/components/Field/Field.js +80 -57
- package/dist/components/Field/index.d.ts +2 -4
- package/dist/components/Field/index.js +5 -6
- package/dist/components/FieldMarkers/Error.d.ts +11 -10
- package/dist/components/FieldMarkers/Error.js +11 -10
- package/dist/components/FieldMarkers/Hint.d.ts +11 -10
- package/dist/components/FieldMarkers/Hint.js +11 -10
- package/dist/components/FieldMarkers/Label.d.ts +12 -11
- package/dist/components/FieldMarkers/Label.js +14 -14
- package/dist/components/FieldMarkers/Legend.d.ts +12 -11
- package/dist/components/FieldMarkers/Legend.js +18 -11
- package/dist/components/Fieldset/Fieldset.d.ts +72 -71
- package/dist/components/Fieldset/Fieldset.js +29 -28
- package/dist/components/Fieldset/index.d.ts +2 -4
- package/dist/components/Fieldset/index.js +5 -0
- package/dist/components/Flourish/Flourish.d.ts +18 -17
- package/dist/components/Flourish/Flourish.js +15 -10
- package/dist/components/Flourish/index.d.ts +2 -4
- package/dist/components/Flourish/index.js +5 -0
- package/dist/components/Form/Form.d.ts +15 -14
- package/dist/components/Form/Form.js +10 -9
- package/dist/components/Form/index.d.ts +2 -4
- package/dist/components/Form/index.js +5 -0
- package/dist/components/Image/Image.d.ts +21 -20
- package/dist/components/Image/Image.js +37 -31
- package/dist/components/Image/index.d.ts +2 -4
- package/dist/components/Image/index.js +5 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +14 -12
- package/dist/components/LoadingSpinner/LoadingSpinner.js +12 -13
- package/dist/components/LoadingSpinner/index.d.ts +2 -4
- package/dist/components/LoadingSpinner/index.js +5 -0
- package/dist/components/Logo/Logo.d.ts +18 -16
- package/dist/components/Logo/Logo.js +20 -0
- package/dist/components/Logo/index.d.ts +2 -4
- package/dist/components/Logo/index.js +5 -0
- package/dist/components/Pill/Pill.d.ts +34 -34
- package/dist/components/Pill/Pill.js +26 -20
- package/dist/components/Pill/index.d.ts +2 -4
- package/dist/components/Pill/index.js +5 -0
- package/dist/components/Popover/Popover.d.ts +91 -90
- package/dist/components/Popover/Popover.js +64 -55
- package/dist/components/Popover/index.d.ts +2 -4
- package/dist/components/Popover/index.js +5 -0
- package/dist/components/Radio/Radio.d.ts +26 -25
- package/dist/components/Radio/Radio.js +20 -21
- package/dist/components/Radio/index.d.ts +2 -4
- package/dist/components/Radio/index.js +5 -0
- package/dist/components/RootSVG/RootSVG.d.ts +7 -6
- package/dist/components/RootSVG/RootSVG.js +19 -9
- package/dist/components/RootSVG/index.d.ts +2 -4
- package/dist/components/RootSVG/index.js +5 -0
- package/dist/components/Searchbox/Searchbox.context.js +6 -7
- package/dist/components/Searchbox/Searchbox.d.ts +49 -47
- package/dist/components/Searchbox/Searchbox.js +85 -60
- package/dist/components/Searchbox/index.d.ts +2 -4
- package/dist/components/Searchbox/index.js +5 -0
- package/dist/components/Select/Select.d.ts +58 -52
- package/dist/components/Select/Select.js +29 -20
- package/dist/components/Select/index.d.ts +2 -4
- package/dist/components/Select/index.js +5 -0
- package/dist/components/Signpost/Signpost.d.ts +25 -24
- package/dist/components/Signpost/Signpost.js +25 -13
- package/dist/components/Signpost/index.d.ts +2 -4
- package/dist/components/Signpost/index.js +5 -0
- package/dist/components/SkipNav/SkipNav.d.ts +20 -19
- package/dist/components/SkipNav/SkipNav.js +25 -18
- package/dist/components/SkipNav/index.d.ts +2 -4
- package/dist/components/SkipNav/index.js +5 -0
- package/dist/components/Squircle/Squircle.d.ts +17 -16
- package/dist/components/Squircle/Squircle.js +12 -11
- package/dist/components/Squircle/index.d.ts +2 -4
- package/dist/components/Squircle/index.js +5 -0
- package/dist/components/Tag/Tag.d.ts +21 -21
- package/dist/components/Tag/Tag.js +16 -13
- package/dist/components/Tag/index.d.ts +2 -4
- package/dist/components/Tag/index.js +5 -0
- package/dist/components/TextInput/TextInput.d.ts +41 -35
- package/dist/components/TextInput/TextInput.js +45 -28
- package/dist/components/TextInput/index.d.ts +2 -4
- package/dist/components/TextInput/index.js +5 -5
- package/dist/components/Textarea/Textarea.d.ts +44 -38
- package/dist/components/Textarea/Textarea.js +49 -35
- package/dist/components/Textarea/index.d.ts +2 -4
- package/dist/components/Textarea/index.js +5 -0
- package/dist/components/ValidationSummary/ValidationSummary.d.ts +73 -73
- package/dist/components/ValidationSummary/ValidationSummary.js +72 -62
- package/dist/components/ValidationSummary/index.d.ts +2 -4
- package/dist/components/ValidationSummary/index.js +5 -0
- package/dist/components/ValidationSummary/validationsummary-utils.js +7 -10
- package/dist/components/icons/AccountCircleFilledIcon.d.ts +6 -4
- package/dist/components/icons/AccountCircleFilledIcon.js +21 -17
- package/dist/components/icons/AccountCircleIcon.d.ts +6 -4
- package/dist/components/icons/AccountCircleIcon.js +21 -17
- package/dist/components/icons/AccountFilledIcon.d.ts +6 -4
- package/dist/components/icons/AccountFilledIcon.js +21 -17
- package/dist/components/icons/AccountIcon.d.ts +6 -4
- package/dist/components/icons/AccountIcon.js +21 -17
- package/dist/components/icons/AddIcon.d.ts +6 -4
- package/dist/components/icons/AddIcon.js +21 -17
- package/dist/components/icons/AppsFilledIcon.d.ts +6 -4
- package/dist/components/icons/AppsFilledIcon.js +21 -17
- package/dist/components/icons/AppsIcon.d.ts +6 -4
- package/dist/components/icons/AppsIcon.js +21 -17
- package/dist/components/icons/ArrowDownIcon.d.ts +6 -4
- package/dist/components/icons/ArrowDownIcon.js +21 -17
- package/dist/components/icons/ArrowLeftIcon.d.ts +6 -4
- package/dist/components/icons/ArrowLeftIcon.js +21 -17
- package/dist/components/icons/ArrowRightIcon.d.ts +6 -4
- package/dist/components/icons/ArrowRightIcon.js +21 -17
- package/dist/components/icons/ArrowUpIcon.d.ts +6 -4
- package/dist/components/icons/ArrowUpIcon.js +21 -17
- package/dist/components/icons/BackspaceFilledIcon.d.ts +6 -4
- package/dist/components/icons/BackspaceFilledIcon.js +21 -17
- package/dist/components/icons/BackspaceIcon.d.ts +6 -4
- package/dist/components/icons/BackspaceIcon.js +21 -17
- package/dist/components/icons/BasketFilledIcon.d.ts +6 -4
- package/dist/components/icons/BasketFilledIcon.js +21 -17
- package/dist/components/icons/BasketIcon.d.ts +6 -4
- package/dist/components/icons/BasketIcon.js +21 -17
- package/dist/components/icons/BellFilledIcon.d.ts +6 -4
- package/dist/components/icons/BellFilledIcon.js +28 -17
- package/dist/components/icons/BellIcon.d.ts +6 -4
- package/dist/components/icons/BellIcon.js +21 -17
- package/dist/components/icons/BroomIcon.d.ts +6 -4
- package/dist/components/icons/BroomIcon.js +21 -17
- package/dist/components/icons/CalendarFilledIcon.d.ts +6 -4
- package/dist/components/icons/CalendarFilledIcon.js +21 -17
- package/dist/components/icons/CalendarIcon.d.ts +6 -4
- package/dist/components/icons/CalendarIcon.js +21 -17
- package/dist/components/icons/CashFilledIcon.d.ts +6 -4
- package/dist/components/icons/CashFilledIcon.js +21 -17
- package/dist/components/icons/CashIcon.d.ts +6 -4
- package/dist/components/icons/CashIcon.js +29 -17
- package/dist/components/icons/ChevronDownIcon.d.ts +6 -4
- package/dist/components/icons/ChevronDownIcon.js +21 -17
- package/dist/components/icons/ChevronLeftIcon.d.ts +6 -4
- package/dist/components/icons/ChevronLeftIcon.js +21 -17
- package/dist/components/icons/ChevronRightIcon.d.ts +6 -4
- package/dist/components/icons/ChevronRightIcon.js +21 -17
- package/dist/components/icons/ChevronUpIcon.d.ts +6 -4
- package/dist/components/icons/ChevronUpIcon.js +21 -17
- package/dist/components/icons/CircleBurgerFilledIcon.d.ts +6 -4
- package/dist/components/icons/CircleBurgerFilledIcon.js +21 -17
- package/dist/components/icons/CircleBurgerIcon.d.ts +6 -4
- package/dist/components/icons/CircleBurgerIcon.js +21 -17
- package/dist/components/icons/ClipboardFilledIcon.d.ts +6 -4
- package/dist/components/icons/ClipboardFilledIcon.js +21 -17
- package/dist/components/icons/ClipboardIcon.d.ts +6 -4
- package/dist/components/icons/ClipboardIcon.js +21 -17
- package/dist/components/icons/ClockFilledIcon.d.ts +6 -4
- package/dist/components/icons/ClockFilledIcon.js +25 -17
- package/dist/components/icons/ClockIcon.d.ts +6 -4
- package/dist/components/icons/ClockIcon.js +21 -17
- package/dist/components/icons/CloseAltFilledIcon.d.ts +6 -4
- package/dist/components/icons/CloseAltFilledIcon.js +25 -17
- package/dist/components/icons/CloseAltIcon.d.ts +6 -4
- package/dist/components/icons/CloseAltIcon.js +21 -17
- package/dist/components/icons/CogIcon.d.ts +6 -4
- package/dist/components/icons/CogIcon.js +21 -17
- package/dist/components/icons/CommunityFilledIcon.d.ts +6 -4
- package/dist/components/icons/CommunityFilledIcon.js +21 -17
- package/dist/components/icons/CommunityIcon.d.ts +6 -4
- package/dist/components/icons/CommunityIcon.js +21 -17
- package/dist/components/icons/ComputerIcon.d.ts +6 -4
- package/dist/components/icons/ComputerIcon.js +21 -17
- package/dist/components/icons/ContactFilledIcon.d.ts +6 -4
- package/dist/components/icons/ContactFilledIcon.js +21 -17
- package/dist/components/icons/ContactIcon.d.ts +6 -4
- package/dist/components/icons/ContactIcon.js +21 -17
- package/dist/components/icons/ContactlessFilledIcon.d.ts +6 -4
- package/dist/components/icons/ContactlessFilledIcon.js +21 -17
- package/dist/components/icons/ContactlessIcon.d.ts +6 -4
- package/dist/components/icons/ContactlessIcon.js +21 -17
- package/dist/components/icons/CoopLiveIcon.d.ts +6 -4
- package/dist/components/icons/CoopLiveIcon.js +25 -17
- package/dist/components/icons/CoopLocationFilledIcon.d.ts +6 -4
- package/dist/components/icons/CoopLocationFilledIcon.js +26 -17
- package/dist/components/icons/CoopLogoIcon.d.ts +6 -4
- package/dist/components/icons/CoopLogoIcon.js +21 -17
- package/dist/components/icons/CoopMembershipCardFilledIcon.d.ts +6 -4
- package/dist/components/icons/CoopMembershipCardFilledIcon.js +29 -17
- package/dist/components/icons/CreditCardFilledIcon.d.ts +6 -4
- package/dist/components/icons/CreditCardFilledIcon.js +25 -17
- package/dist/components/icons/CreditCardIcon.d.ts +6 -4
- package/dist/components/icons/CreditCardIcon.js +21 -17
- package/dist/components/icons/CrossIcon.d.ts +6 -4
- package/dist/components/icons/CrossIcon.js +21 -17
- package/dist/components/icons/DocumentIcon.d.ts +6 -4
- package/dist/components/icons/DocumentIcon.js +21 -17
- package/dist/components/icons/DownloadIcon.d.ts +6 -4
- package/dist/components/icons/DownloadIcon.js +21 -17
- package/dist/components/icons/EnterStoreIcon.d.ts +6 -4
- package/dist/components/icons/EnterStoreIcon.js +21 -17
- package/dist/components/icons/ExitStoreIcon.d.ts +6 -4
- package/dist/components/icons/ExitStoreIcon.js +21 -17
- package/dist/components/icons/EyeFilledIcon.d.ts +6 -4
- package/dist/components/icons/EyeFilledIcon.js +21 -17
- package/dist/components/icons/EyeIcon.d.ts +6 -4
- package/dist/components/icons/EyeIcon.js +21 -17
- package/dist/components/icons/EyeStrikeFilledIcon.d.ts +6 -4
- package/dist/components/icons/EyeStrikeFilledIcon.js +21 -17
- package/dist/components/icons/EyeStrikeIcon.d.ts +6 -4
- package/dist/components/icons/EyeStrikeIcon.js +21 -17
- package/dist/components/icons/FeedbackFilledIcon.d.ts +6 -4
- package/dist/components/icons/FeedbackFilledIcon.js +24 -17
- package/dist/components/icons/FeedbackIcon.d.ts +6 -4
- package/dist/components/icons/FeedbackIcon.js +21 -17
- package/dist/components/icons/FilterIcon.d.ts +6 -4
- package/dist/components/icons/FilterIcon.js +21 -17
- package/dist/components/icons/GiftCardFilledIcon.d.ts +6 -4
- package/dist/components/icons/GiftCardFilledIcon.js +21 -17
- package/dist/components/icons/GiftCardIcon.d.ts +6 -4
- package/dist/components/icons/GiftCardIcon.js +21 -17
- package/dist/components/icons/GiftFilledIcon.d.ts +6 -4
- package/dist/components/icons/GiftFilledIcon.js +21 -17
- package/dist/components/icons/GiftIcon.d.ts +6 -4
- package/dist/components/icons/GiftIcon.js +21 -17
- package/dist/components/icons/HelpFilledIcon.d.ts +6 -4
- package/dist/components/icons/HelpFilledIcon.js +21 -17
- package/dist/components/icons/HelpIcon.d.ts +6 -4
- package/dist/components/icons/HelpIcon.js +21 -17
- package/dist/components/icons/HomeFilledIcon.d.ts +6 -4
- package/dist/components/icons/HomeFilledIcon.js +21 -17
- package/dist/components/icons/HomeIcon.d.ts +6 -4
- package/dist/components/icons/HomeIcon.js +21 -17
- package/dist/components/icons/HowDoIAssistantIcon.d.ts +6 -4
- package/dist/components/icons/HowDoIAssistantIcon.js +21 -17
- package/dist/components/icons/InfoIcon.d.ts +6 -4
- package/dist/components/icons/InfoIcon.js +21 -17
- package/dist/components/icons/KebabIcon.d.ts +6 -4
- package/dist/components/icons/KebabIcon.js +21 -17
- package/dist/components/icons/LoadingIcon.d.ts +6 -4
- package/dist/components/icons/LoadingIcon.js +21 -17
- package/dist/components/icons/LocationFilledIcon.d.ts +6 -4
- package/dist/components/icons/LocationFilledIcon.js +21 -17
- package/dist/components/icons/LocationIcon.d.ts +6 -4
- package/dist/components/icons/LocationIcon.js +21 -17
- package/dist/components/icons/LogoutIcon.d.ts +6 -4
- package/dist/components/icons/LogoutIcon.js +21 -17
- package/dist/components/icons/MailIcon.d.ts +6 -4
- package/dist/components/icons/MailIcon.js +21 -17
- package/dist/components/icons/MenuIcon.d.ts +6 -4
- package/dist/components/icons/MenuIcon.js +21 -17
- package/dist/components/icons/MessageIcon.d.ts +6 -4
- package/dist/components/icons/MessageIcon.js +21 -17
- package/dist/components/icons/MinusIcon.d.ts +6 -4
- package/dist/components/icons/MinusIcon.js +21 -17
- package/dist/components/icons/NotesFilledIcon.d.ts +6 -4
- package/dist/components/icons/NotesFilledIcon.js +21 -17
- package/dist/components/icons/NotesIcon.d.ts +6 -4
- package/dist/components/icons/NotesIcon.js +21 -17
- package/dist/components/icons/OpenNewIcon.d.ts +6 -4
- package/dist/components/icons/OpenNewIcon.js +25 -17
- package/dist/components/icons/OwnBagIcon.d.ts +6 -4
- package/dist/components/icons/OwnBagIcon.js +21 -17
- package/dist/components/icons/PadlockIcon.d.ts +6 -4
- package/dist/components/icons/PadlockIcon.js +21 -17
- package/dist/components/icons/PencilIcon.d.ts +6 -4
- package/dist/components/icons/PencilIcon.js +21 -17
- package/dist/components/icons/PhoneIcon.d.ts +6 -4
- package/dist/components/icons/PhoneIcon.js +21 -17
- package/dist/components/icons/PowerIcon.d.ts +6 -4
- package/dist/components/icons/PowerIcon.js +21 -17
- package/dist/components/icons/SaveFilledIcon.d.ts +6 -4
- package/dist/components/icons/SaveFilledIcon.js +21 -17
- package/dist/components/icons/SaveIcon.d.ts +6 -4
- package/dist/components/icons/SaveIcon.js +21 -17
- package/dist/components/icons/ScooterIcon.d.ts +6 -4
- package/dist/components/icons/ScooterIcon.js +21 -17
- package/dist/components/icons/SearchFilledIcon.d.ts +6 -4
- package/dist/components/icons/SearchFilledIcon.js +21 -17
- package/dist/components/icons/SearchIcon.d.ts +6 -4
- package/dist/components/icons/SearchIcon.js +21 -17
- package/dist/components/icons/SendIcon.d.ts +6 -4
- package/dist/components/icons/SendIcon.js +21 -17
- package/dist/components/icons/SpannerIcon.d.ts +6 -4
- package/dist/components/icons/SpannerIcon.js +21 -17
- package/dist/components/icons/StarFilledIcon.d.ts +6 -4
- package/dist/components/icons/StarFilledIcon.js +24 -17
- package/dist/components/icons/StarIcon.d.ts +6 -4
- package/dist/components/icons/StarIcon.js +21 -17
- package/dist/components/icons/TickAltFilledIcon.d.ts +6 -4
- package/dist/components/icons/TickAltFilledIcon.js +25 -17
- package/dist/components/icons/TickAltIcon.d.ts +6 -4
- package/dist/components/icons/TickAltIcon.js +21 -17
- package/dist/components/icons/TickIcon.d.ts +6 -4
- package/dist/components/icons/TickIcon.js +21 -17
- package/dist/components/icons/TruckIcon.d.ts +6 -4
- package/dist/components/icons/TruckIcon.js +21 -17
- package/dist/components/icons/UserWipeIcon.d.ts +6 -4
- package/dist/components/icons/UserWipeIcon.js +21 -17
- package/dist/components/icons/VoucherFilledIcon.d.ts +6 -4
- package/dist/components/icons/VoucherFilledIcon.js +21 -17
- package/dist/components/icons/VoucherIcon.d.ts +6 -4
- package/dist/components/icons/VoucherIcon.js +21 -17
- package/dist/components/icons/WarningCircleFilledIcon.d.ts +6 -4
- package/dist/components/icons/WarningCircleFilledIcon.js +25 -17
- package/dist/components/icons/WarningCircleIcon.d.ts +6 -4
- package/dist/components/icons/WarningCircleIcon.js +29 -17
- package/dist/components/icons/WarningFilledIcon.d.ts +6 -4
- package/dist/components/icons/WarningFilledIcon.js +21 -17
- package/dist/components/icons/WarningIcon.d.ts +6 -4
- package/dist/components/icons/WarningIcon.js +21 -17
- package/dist/components/icons/WifiIcon.d.ts +6 -4
- package/dist/components/icons/WifiIcon.js +21 -17
- package/dist/components/icons/WriteIcon.d.ts +6 -4
- package/dist/components/icons/WriteIcon.js +27 -17
- package/dist/components/icons/index.d.ts +110 -109
- package/dist/components/icons/index.js +110 -109
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/useDebounce.d.ts +4 -1
- package/dist/hooks/useDebounce.js +13 -13
- package/dist/hooks/useId.d.ts +5 -2
- package/dist/hooks/useId.js +7 -7
- package/dist/hooks/useSlots.d.ts +5 -8
- package/dist/hooks/useSlots.js +30 -50
- package/dist/index.d.ts +28 -27
- package/dist/index.js +28 -27
- package/dist/types/colors.d.ts +10 -10
- package/dist/types/index.d.ts +4 -16
- package/dist/utils/index.d.ts +8 -5
- package/dist/utils/index.js +9 -13
- package/package.json +4 -3
- package/src/components/Select/Select.tsx +7 -0
- package/src/components/TextInput/TextInput.tsx +7 -0
- package/src/components/Textarea/Textarea.tsx +7 -0
- package/src/hooks/index.ts +3 -0
- package/src/index.ts +27 -27
- package/dist/components/Field/Field.context.d.ts +0 -14
- package/dist/components/Searchbox/Searchbox.context.d.ts +0 -13
- package/dist/components/ValidationSummary/validationsummary-utils.d.ts +0 -2
|
@@ -1,42 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
2
|
+
import { useField } from "../Field/Field.context.js";
|
|
3
|
+
import { useDebounce } from "../../hooks/useDebounce.js";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
//#region src/components/Textarea/Textarea.tsx
|
|
8
8
|
const DEBOUNCE_DELAY = 750;
|
|
9
9
|
const charCountMessage = (remaining) => {
|
|
10
|
-
|
|
10
|
+
return `You have ${Math.abs(remaining).toLocaleString()} ${Math.abs(remaining) === 1 ? "character" : "characters"} ${remaining < 0 ? "too many" : "remaining"}`;
|
|
11
11
|
};
|
|
12
|
-
const Textarea = ({ "aria-placeholder": ariaPlaceholder, className, cols = 30, counter = false, cutoff = false, disabled = false, error = false, id, maxLength, name, onChange: userOnChange, placeholder, ref, rows = 4, size, ...props }) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
const Textarea = ({ "aria-placeholder": ariaPlaceholder, className, cols = 30, counter = false, cutoff = false, disabled = false, error = false, fit = false, id, maxLength, name, onChange: userOnChange, placeholder, ref, rows = 4, size, ...props }) => {
|
|
13
|
+
const field = useField();
|
|
14
|
+
const componentProps = {
|
|
15
|
+
"aria-placeholder": placeholder ?? ariaPlaceholder ?? void 0,
|
|
16
|
+
className: clsx("coop-textarea", "coop-field-element", className),
|
|
17
|
+
cols,
|
|
18
|
+
"data-error": error ?? void 0,
|
|
19
|
+
"data-fit": fit || void 0,
|
|
20
|
+
"data-size": size ?? void 0,
|
|
21
|
+
disabled,
|
|
22
|
+
id: id ?? field?.id,
|
|
23
|
+
maxLength: cutoff ? maxLength : void 0,
|
|
24
|
+
name,
|
|
25
|
+
placeholder,
|
|
26
|
+
rows,
|
|
27
|
+
...props
|
|
28
|
+
};
|
|
29
|
+
const [remaining, setRemaining] = useState(maxLength);
|
|
30
|
+
const debouncedRemaining = useDebounce(remaining, DEBOUNCE_DELAY);
|
|
31
|
+
const showCounter = !disabled && counter && maxLength && remaining != null && debouncedRemaining != null;
|
|
32
|
+
const handleChange = (e) => {
|
|
33
|
+
userOnChange?.(e);
|
|
34
|
+
if (maxLength && e.target) setRemaining(maxLength - e.target.value.length);
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
37
|
+
className: "coop-textarea-wrapper",
|
|
38
|
+
children: [/* @__PURE__ */ jsx("textarea", {
|
|
39
|
+
...componentProps,
|
|
40
|
+
onChange: handleChange,
|
|
41
|
+
ref
|
|
42
|
+
}), showCounter && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("small", {
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
className: "coop-textarea-counter",
|
|
45
|
+
...remaining < 0 && { "data-error": true },
|
|
46
|
+
children: charCountMessage(remaining)
|
|
47
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
48
|
+
"aria-live": "polite",
|
|
49
|
+
className: "sr-only",
|
|
50
|
+
children: charCountMessage(debouncedRemaining)
|
|
51
|
+
})] })]
|
|
52
|
+
});
|
|
39
53
|
};
|
|
40
54
|
Textarea.slot = { name: "Textarea" };
|
|
41
|
-
|
|
55
|
+
//#endregion
|
|
42
56
|
export { Textarea, Textarea as default };
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import React, { HTMLAttributes, JSX, ReactNode, Ref } from "react";
|
|
2
|
+
//#region src/components/ValidationSummary/ValidationSummary.d.ts
|
|
3
|
+
interface ValidationSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** **(Optional)** Specify if the summary should be focused and the parent form scrolled into view if there are errors.
|
|
5
|
+
*
|
|
6
|
+
* Default: true
|
|
7
|
+
*/
|
|
8
|
+
autoScroll?: boolean;
|
|
9
|
+
/** **(Optional)** This should be a set of `ValidationSummary.Heading`, `ValidationSummary.Prompt` and `ValidationSummary.Errors` components. */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** **(Optional)** Specify if the summary should always render regardless of error state. Use this if you want to control the logic in your own code.
|
|
14
|
+
*
|
|
15
|
+
* Default: false
|
|
16
|
+
*/
|
|
17
|
+
forceMount?: boolean;
|
|
18
|
+
/** **(Optional)** Specify a custom React ref for this component. */
|
|
19
|
+
ref?: Ref<HTMLDivElement>;
|
|
20
20
|
}
|
|
21
21
|
interface ValidationSummaryHeadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
/** **(Optional)** Specify a custom element to use instead of `h2`. */
|
|
23
|
+
as?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
24
|
+
/** **(Optional)** Content inside the Heading.
|
|
25
|
+
*
|
|
26
|
+
* Defaults to `There's a problem`.
|
|
27
|
+
*/
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the Heading. */
|
|
30
|
+
className?: string;
|
|
31
31
|
}
|
|
32
32
|
interface ValidationSummaryPromptProps extends HTMLAttributes<HTMLDivElement> {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
/** **(Optional)** Content inside the Prompt.
|
|
34
|
+
*
|
|
35
|
+
* Defaults to `Check the form. You must:`.
|
|
36
|
+
*/
|
|
37
|
+
children?: React.ReactNode;
|
|
38
38
|
}
|
|
39
39
|
interface FieldError {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
message?: string | number;
|
|
41
|
+
ref?: {
|
|
42
|
+
focus?: () => void;
|
|
43
|
+
id?: string;
|
|
44
|
+
};
|
|
45
|
+
type?: string | number;
|
|
46
46
|
}
|
|
47
47
|
interface ValidationSummaryErrorsProps extends HTMLAttributes<HTMLDivElement> {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
/** **(Optional)** Content inside the Errors. */
|
|
49
|
+
errors?: Record<string, FieldError>;
|
|
50
50
|
}
|
|
51
51
|
declare const ValidationSummary: {
|
|
52
|
-
|
|
52
|
+
({ autoScroll, children, className, forceMount, ref, ...props }: ValidationSummaryProps): JSX.Element | null;
|
|
53
|
+
slot: {
|
|
54
|
+
name: string;
|
|
55
|
+
};
|
|
56
|
+
Heading: {
|
|
57
|
+
({ as, children, className }: ValidationSummaryHeadingProps): JSX.Element;
|
|
53
58
|
slot: {
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
Heading: {
|
|
57
|
-
({ as, children, className, }: ValidationSummaryHeadingProps): JSX.Element;
|
|
58
|
-
slot: {
|
|
59
|
-
name: string;
|
|
60
|
-
};
|
|
59
|
+
name: string;
|
|
61
60
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
};
|
|
62
|
+
Prompt: {
|
|
63
|
+
({ children }: ValidationSummaryPromptProps): JSX.Element;
|
|
64
|
+
slot: {
|
|
65
|
+
name: string;
|
|
67
66
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
};
|
|
68
|
+
Errors: {
|
|
69
|
+
({ errors }: ValidationSummaryErrorsProps): JSX.Element | null;
|
|
70
|
+
slot: {
|
|
71
|
+
name: string;
|
|
73
72
|
};
|
|
73
|
+
};
|
|
74
74
|
};
|
|
75
75
|
declare const ValidationSummaryHeading: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
({ as, children, className }: ValidationSummaryHeadingProps): JSX.Element;
|
|
77
|
+
slot: {
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
|
80
80
|
};
|
|
81
81
|
declare const ValidationSummaryPrompt: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
({ children }: ValidationSummaryPromptProps): JSX.Element;
|
|
83
|
+
slot: {
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
86
|
};
|
|
87
87
|
declare const ValidationSummaryErrors: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
({ errors }: ValidationSummaryErrorsProps): JSX.Element | null;
|
|
89
|
+
slot: {
|
|
90
|
+
name: string;
|
|
91
|
+
};
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
export { ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt, };
|
|
93
|
+
//#endregion
|
|
94
|
+
export { ValidationSummary, ValidationSummary as default, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt, ValidationSummaryProps };
|
|
@@ -1,71 +1,81 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
2
|
+
import { useSlots } from "../../hooks/useSlots.js";
|
|
3
|
+
import { getFieldElement, sanitizeFieldId } from "./validationsummary-utils.js";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import React, { useEffect, useRef } from "react";
|
|
7
|
+
import mergeRefs from "merge-refs";
|
|
8
|
+
//#region src/components/ValidationSummary/ValidationSummary.tsx
|
|
9
9
|
const componentSlots = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
Children: null,
|
|
11
|
+
ValidationSummaryErrors: null,
|
|
12
|
+
ValidationSummaryHeading: null,
|
|
13
|
+
ValidationSummaryPrompt: null
|
|
14
14
|
};
|
|
15
15
|
const ValidationSummary = ({ autoScroll = true, children, className, forceMount = false, ref, ...props }) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
const slots = { ...useSlots(componentSlots, children) };
|
|
17
|
+
const errors = React.isValidElement(slots.ValidationSummaryErrors) && Object.keys(slots.ValidationSummaryErrors.props.errors ?? {});
|
|
18
|
+
const hasErrors = Object.keys(errors).length > 0;
|
|
19
|
+
const internalRef = useRef(null);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (hasErrors && autoScroll) {
|
|
22
|
+
const form = internalRef.current?.closest("form");
|
|
23
|
+
if (typeof form?.scrollIntoView === "function") form.scrollIntoView({ behavior: "smooth" });
|
|
24
|
+
internalRef.current?.focus();
|
|
25
|
+
}
|
|
26
|
+
}, [
|
|
27
|
+
autoScroll,
|
|
28
|
+
errors,
|
|
29
|
+
hasErrors
|
|
30
|
+
]);
|
|
31
|
+
if (!hasErrors && !forceMount) return null;
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: clsx("coop-validation-summary ", className),
|
|
34
|
+
...props,
|
|
35
|
+
"aria-live": "assertive",
|
|
36
|
+
ref: mergeRefs(internalRef, ref),
|
|
37
|
+
role: "alert",
|
|
38
|
+
tabIndex: -1,
|
|
39
|
+
children: [
|
|
40
|
+
slots.ValidationSummaryHeading,
|
|
41
|
+
slots.ValidationSummaryPrompt,
|
|
42
|
+
slots.ValidationSummaryErrors,
|
|
43
|
+
slots.Children
|
|
44
|
+
]
|
|
45
|
+
});
|
|
39
46
|
};
|
|
40
|
-
const ValidationSummaryHeading = ({ as = "h2", children = "There's a problem", className
|
|
41
|
-
|
|
47
|
+
const ValidationSummaryHeading = ({ as = "h2", children = "There's a problem", className }) => {
|
|
48
|
+
return React.createElement(as, { className: clsx("coop-validation-summary--heading", className) }, children);
|
|
42
49
|
};
|
|
43
|
-
const ValidationSummaryPrompt = ({ children = "Check the form. You must:"
|
|
44
|
-
|
|
50
|
+
const ValidationSummaryPrompt = ({ children = "Check the form. You must:" }) => {
|
|
51
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
45
52
|
};
|
|
46
|
-
const focusable = [
|
|
53
|
+
const focusable = [
|
|
54
|
+
"INPUT",
|
|
55
|
+
"TEXTAREA",
|
|
56
|
+
"SELECT"
|
|
57
|
+
];
|
|
47
58
|
const ValidationSummaryErrors = ({ errors }) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}) }) })) : null;
|
|
59
|
+
const errorsArray = (errors && Object.entries(errors)) ?? [];
|
|
60
|
+
return errorsArray.length ? /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: "coop-validation-summary--errors",
|
|
62
|
+
children: /* @__PURE__ */ jsx("ul", { children: errorsArray.map(([field, error]) => {
|
|
63
|
+
const id = error.ref?.id ? sanitizeFieldId(error.ref.id) : void 0;
|
|
64
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
|
|
65
|
+
href: "#",
|
|
66
|
+
onClick: (e) => {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
const el = getFieldElement(field, id);
|
|
69
|
+
if (el) {
|
|
70
|
+
if (typeof el.scrollIntoView === "function") el.scrollIntoView();
|
|
71
|
+
if (focusable.includes(el.nodeName)) el.focus();
|
|
72
|
+
else el.querySelector("input")?.focus();
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
children: error.message
|
|
76
|
+
}) }, field);
|
|
77
|
+
}) })
|
|
78
|
+
}) : null;
|
|
69
79
|
};
|
|
70
80
|
ValidationSummary.slot = { name: "ValidationSummary" };
|
|
71
81
|
ValidationSummaryHeading.slot = { name: "ValidationSummaryHeading" };
|
|
@@ -74,5 +84,5 @@ ValidationSummaryErrors.slot = { name: "ValidationSummaryErrors" };
|
|
|
74
84
|
ValidationSummary.Heading = ValidationSummaryHeading;
|
|
75
85
|
ValidationSummary.Prompt = ValidationSummaryPrompt;
|
|
76
86
|
ValidationSummary.Errors = ValidationSummaryErrors;
|
|
77
|
-
|
|
78
|
-
export { ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ValidationSummary, ValidationSummary as default, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import ValidationSummary from "./ValidationSummary";
|
|
2
|
-
export default
|
|
3
|
-
export { ValidationSummary };
|
|
4
|
-
export * from "./ValidationSummary";
|
|
1
|
+
import { ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt, ValidationSummaryProps } from "./ValidationSummary.js";
|
|
2
|
+
export { ValidationSummary, ValidationSummary as default, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt, ValidationSummaryProps };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt } from "./ValidationSummary.js";
|
|
2
|
+
//#region src/components/ValidationSummary/index.ts
|
|
3
|
+
var ValidationSummary_default = ValidationSummary;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt, ValidationSummary_default as default };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/ValidationSummary/validationsummary-utils.ts
|
|
2
|
+
const sanitizeFieldId = (id) => id?.startsWith("#") ? id.slice(1) : id;
|
|
2
3
|
const getFieldElement = (field, id) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
return ((_c = (_b = document.querySelector(`[name=${field}_display]`)) !== null && _b !== void 0 ? _b : document.querySelector(`#${field}`)) !== null && _c !== void 0 ? _c : document.querySelector(`[name=${field}]`));
|
|
10
|
-
}
|
|
4
|
+
if (id) {
|
|
5
|
+
const safeId = sanitizeFieldId(id);
|
|
6
|
+
return document.querySelector(`#${safeId}`) ?? document.querySelector(`[name=${safeId}]`);
|
|
7
|
+
} else return document.querySelector(`[name=${field}_display]`) ?? document.querySelector(`#${field}`) ?? document.querySelector(`[name=${field}]`);
|
|
11
8
|
};
|
|
12
|
-
|
|
9
|
+
//#endregion
|
|
13
10
|
export { getFieldElement, sanitizeFieldId };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { JSX, SVGProps } from "react";
|
|
2
|
+
//#region src/components/icons/AccountCircleFilledIcon.d.ts
|
|
2
3
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
-
|
|
4
|
+
alt?: string;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
declare const AccountCircleFilledIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { AccountCircleFilledIcon };
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import clsx from
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { useId } from "../../hooks/useId.js";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/icons/AccountCircleFilledIcon.tsx
|
|
5
5
|
const AccountCircleFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account-circle-filled",
|
|
11
|
+
fill: fill ?? "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : void 0,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
ref,
|
|
17
|
+
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
|
+
id: uid + "__title",
|
|
19
|
+
children: alt
|
|
20
|
+
}) : null, /* @__PURE__ */ 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" })]
|
|
21
|
+
});
|
|
18
22
|
};
|
|
19
|
-
|
|
23
|
+
//#endregion
|
|
20
24
|
export { AccountCircleFilledIcon };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { JSX, SVGProps } from "react";
|
|
2
|
+
//#region src/components/icons/AccountCircleIcon.d.ts
|
|
2
3
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
-
|
|
4
|
+
alt?: string;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
declare const AccountCircleIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { AccountCircleIcon };
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import clsx from
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { useId } from "../../hooks/useId.js";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/icons/AccountCircleIcon.tsx
|
|
5
5
|
const AccountCircleIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account-circle",
|
|
11
|
+
fill: fill ?? "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : void 0,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
ref,
|
|
17
|
+
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
|
+
id: uid + "__title",
|
|
19
|
+
children: alt
|
|
20
|
+
}) : null, /* @__PURE__ */ 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" })]
|
|
21
|
+
});
|
|
18
22
|
};
|
|
19
|
-
|
|
23
|
+
//#endregion
|
|
20
24
|
export { AccountCircleIcon };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { JSX, SVGProps } from "react";
|
|
2
|
+
//#region src/components/icons/AccountFilledIcon.d.ts
|
|
2
3
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
-
|
|
4
|
+
alt?: string;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
declare const AccountFilledIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { AccountFilledIcon };
|