@coopdigital/react 1.2.6 → 1.4.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/Button/Button.js +2 -2
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Fieldset/Fieldset.js +2 -2
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/Searchbox/Searchbox.d.ts +1 -1
- package/dist/components/Searchbox/Searchbox.js +6 -10
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/TextInput/TextInput.js +2 -2
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/ValidationSummary/ValidationSummary.d.ts +10 -2
- package/dist/components/ValidationSummary/ValidationSummary.js +2 -2
- package/dist/components/icons/AccountCircleFilledIcon.js +2 -2
- package/dist/components/icons/AccountCircleIcon.js +2 -2
- package/dist/components/icons/AccountFilledIcon.js +2 -2
- package/dist/components/icons/AccountIcon.js +2 -2
- package/dist/components/icons/AddIcon.js +2 -2
- package/dist/components/icons/AppsFilledIcon.js +2 -2
- package/dist/components/icons/AppsIcon.js +2 -2
- 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.js +2 -2
- package/dist/components/icons/BackspaceIcon.js +2 -2
- package/dist/components/icons/BasketFilledIcon.js +2 -2
- package/dist/components/icons/BasketIcon.js +2 -2
- package/dist/components/icons/BellFilledIcon.js +2 -2
- package/dist/components/icons/BellIcon.js +2 -2
- package/dist/components/icons/BroomIcon.js +2 -2
- package/dist/components/icons/CalendarFilledIcon.js +2 -2
- package/dist/components/icons/CalendarIcon.js +2 -2
- package/dist/components/icons/CashFilledIcon.js +2 -2
- package/dist/components/icons/CashIcon.js +2 -2
- 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.js +2 -2
- package/dist/components/icons/CircleBurgerIcon.js +2 -2
- package/dist/components/icons/ClipboardFilledIcon.js +2 -2
- package/dist/components/icons/ClipboardIcon.js +2 -2
- package/dist/components/icons/ClockFilledIcon.js +2 -2
- package/dist/components/icons/ClockIcon.js +2 -2
- package/dist/components/icons/CloseAltFilledIcon.js +2 -2
- package/dist/components/icons/CloseAltIcon.js +2 -2
- package/dist/components/icons/CogIcon.js +2 -2
- package/dist/components/icons/CommunityFilledIcon.js +2 -2
- package/dist/components/icons/CommunityIcon.js +2 -2
- package/dist/components/icons/ComputerIcon.js +2 -2
- package/dist/components/icons/ContactFilledIcon.js +2 -2
- package/dist/components/icons/ContactIcon.js +2 -2
- package/dist/components/icons/ContactlessFilledIcon.js +2 -2
- package/dist/components/icons/ContactlessIcon.js +2 -2
- package/dist/components/icons/CoopLiveIcon.js +2 -2
- package/dist/components/icons/CoopLocationFilledIcon.js +2 -2
- package/dist/components/icons/CoopLogoIcon.js +2 -2
- package/dist/components/icons/CoopMembershipCardFilledIcon.js +2 -2
- package/dist/components/icons/CreditCardFilledIcon.js +2 -2
- package/dist/components/icons/CreditCardIcon.js +2 -2
- package/dist/components/icons/CrossIcon.js +2 -2
- package/dist/components/icons/DocumentIcon.js +2 -2
- package/dist/components/icons/DownloadIcon.js +2 -2
- package/dist/components/icons/EnterStoreIcon.js +2 -2
- package/dist/components/icons/ExitStoreIcon.js +2 -2
- package/dist/components/icons/EyeFilledIcon.js +2 -2
- package/dist/components/icons/EyeIcon.js +2 -2
- package/dist/components/icons/EyeStrikeFilledIcon.js +2 -2
- package/dist/components/icons/EyeStrikeIcon.js +2 -2
- package/dist/components/icons/FeedbackFilledIcon.js +2 -2
- package/dist/components/icons/FeedbackIcon.js +2 -2
- package/dist/components/icons/FilterIcon.js +2 -2
- package/dist/components/icons/GiftCardFilledIcon.js +2 -2
- package/dist/components/icons/GiftCardIcon.js +2 -2
- package/dist/components/icons/GiftFilledIcon.js +2 -2
- package/dist/components/icons/GiftIcon.js +2 -2
- package/dist/components/icons/HelpFilledIcon.js +2 -2
- package/dist/components/icons/HelpIcon.js +2 -2
- package/dist/components/icons/HomeFilledIcon.js +2 -2
- package/dist/components/icons/HomeIcon.js +2 -2
- package/dist/components/icons/HowDoIAssistantIcon.js +2 -2
- package/dist/components/icons/InfoIcon.js +2 -2
- package/dist/components/icons/KebabIcon.js +2 -2
- package/dist/components/icons/LoadingIcon.js +2 -2
- package/dist/components/icons/LocationFilledIcon.js +2 -2
- package/dist/components/icons/LocationIcon.js +2 -2
- package/dist/components/icons/LogoutIcon.js +2 -2
- 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.js +2 -2
- package/dist/components/icons/NotesIcon.js +2 -2
- package/dist/components/icons/OpenNewIcon.js +2 -2
- package/dist/components/icons/OwnBagIcon.js +2 -2
- package/dist/components/icons/PadlockIcon.js +2 -2
- package/dist/components/icons/PencilIcon.js +2 -2
- package/dist/components/icons/PhoneIcon.js +2 -2
- package/dist/components/icons/PowerIcon.js +2 -2
- package/dist/components/icons/SaveFilledIcon.js +2 -2
- package/dist/components/icons/SaveIcon.js +2 -2
- package/dist/components/icons/ScooterIcon.js +2 -2
- package/dist/components/icons/SearchFilledIcon.js +2 -2
- package/dist/components/icons/SearchIcon.js +2 -2
- package/dist/components/icons/SendIcon.js +2 -2
- package/dist/components/icons/SpannerIcon.js +2 -2
- package/dist/components/icons/StarFilledIcon.js +2 -2
- package/dist/components/icons/StarIcon.js +2 -2
- package/dist/components/icons/TickAltFilledIcon.js +2 -2
- package/dist/components/icons/TickAltIcon.js +2 -2
- package/dist/components/icons/TickIcon.js +2 -2
- package/dist/components/icons/TruckIcon.js +2 -2
- package/dist/components/icons/UserWipeIcon.js +2 -2
- package/dist/components/icons/VoucherFilledIcon.js +2 -2
- package/dist/components/icons/VoucherIcon.js +2 -2
- package/dist/components/icons/WarningFilledIcon.js +2 -2
- package/dist/components/icons/WarningIcon.js +2 -2
- package/dist/components/icons/WifiIcon.js +2 -2
- package/dist/components/icons/WriteIcon.js +2 -2
- package/package.json +4 -4
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Checkbox/Checkbox.tsx +2 -2
- package/src/components/DatePicker/DatePicker.tsx +1 -1
- package/src/components/Fieldset/Fieldset.tsx +2 -2
- package/src/components/Radio/Radio.tsx +2 -2
- package/src/components/Searchbox/Searchbox.tsx +8 -11
- package/src/components/Select/Select.tsx +2 -2
- package/src/components/TextInput/TextInput.tsx +2 -2
- package/src/components/Textarea/Textarea.tsx +2 -2
- package/src/components/ValidationSummary/ValidationSummary.tsx +11 -2
- package/src/components/icons/AccountCircleFilledIcon.tsx +2 -2
- package/src/components/icons/AccountCircleIcon.tsx +2 -2
- package/src/components/icons/AccountFilledIcon.tsx +2 -2
- package/src/components/icons/AccountIcon.tsx +2 -2
- package/src/components/icons/AddIcon.tsx +2 -2
- package/src/components/icons/AppsFilledIcon.tsx +2 -2
- package/src/components/icons/AppsIcon.tsx +2 -2
- package/src/components/icons/ArrowDownIcon.tsx +2 -2
- package/src/components/icons/ArrowLeftIcon.tsx +2 -2
- package/src/components/icons/ArrowRightIcon.tsx +2 -2
- package/src/components/icons/ArrowUpIcon.tsx +2 -2
- package/src/components/icons/BackspaceFilledIcon.tsx +2 -2
- package/src/components/icons/BackspaceIcon.tsx +2 -2
- package/src/components/icons/BasketFilledIcon.tsx +2 -2
- package/src/components/icons/BasketIcon.tsx +2 -2
- package/src/components/icons/BellFilledIcon.tsx +2 -2
- package/src/components/icons/BellIcon.tsx +2 -2
- package/src/components/icons/BroomIcon.tsx +2 -2
- package/src/components/icons/CalendarFilledIcon.tsx +2 -2
- package/src/components/icons/CalendarIcon.tsx +2 -2
- package/src/components/icons/CashFilledIcon.tsx +2 -2
- package/src/components/icons/CashIcon.tsx +2 -2
- package/src/components/icons/ChevronDownIcon.tsx +2 -2
- package/src/components/icons/ChevronLeftIcon.tsx +2 -2
- package/src/components/icons/ChevronRightIcon.tsx +2 -2
- package/src/components/icons/ChevronUpIcon.tsx +2 -2
- package/src/components/icons/CircleBurgerFilledIcon.tsx +2 -2
- package/src/components/icons/CircleBurgerIcon.tsx +2 -2
- package/src/components/icons/ClipboardFilledIcon.tsx +2 -2
- package/src/components/icons/ClipboardIcon.tsx +2 -2
- package/src/components/icons/ClockFilledIcon.tsx +2 -2
- package/src/components/icons/ClockIcon.tsx +2 -2
- package/src/components/icons/CloseAltFilledIcon.tsx +2 -2
- package/src/components/icons/CloseAltIcon.tsx +2 -2
- package/src/components/icons/CogIcon.tsx +2 -2
- package/src/components/icons/CommunityFilledIcon.tsx +2 -2
- package/src/components/icons/CommunityIcon.tsx +2 -2
- package/src/components/icons/ComputerIcon.tsx +2 -2
- package/src/components/icons/ContactFilledIcon.tsx +2 -2
- package/src/components/icons/ContactIcon.tsx +2 -2
- package/src/components/icons/ContactlessFilledIcon.tsx +2 -2
- package/src/components/icons/ContactlessIcon.tsx +2 -2
- package/src/components/icons/CoopLiveIcon.tsx +2 -2
- package/src/components/icons/CoopLocationFilledIcon.tsx +2 -2
- package/src/components/icons/CoopLogoIcon.tsx +2 -2
- package/src/components/icons/CoopMembershipCardFilledIcon.tsx +2 -2
- package/src/components/icons/CreditCardFilledIcon.tsx +2 -2
- package/src/components/icons/CreditCardIcon.tsx +2 -2
- package/src/components/icons/CrossIcon.tsx +2 -2
- package/src/components/icons/DocumentIcon.tsx +2 -2
- package/src/components/icons/DownloadIcon.tsx +2 -2
- package/src/components/icons/EnterStoreIcon.tsx +2 -2
- package/src/components/icons/ExitStoreIcon.tsx +2 -2
- package/src/components/icons/EyeFilledIcon.tsx +2 -2
- package/src/components/icons/EyeIcon.tsx +2 -2
- package/src/components/icons/EyeStrikeFilledIcon.tsx +2 -2
- package/src/components/icons/EyeStrikeIcon.tsx +2 -2
- package/src/components/icons/FeedbackFilledIcon.tsx +2 -2
- package/src/components/icons/FeedbackIcon.tsx +2 -2
- package/src/components/icons/FilterIcon.tsx +2 -2
- package/src/components/icons/GiftCardFilledIcon.tsx +2 -2
- package/src/components/icons/GiftCardIcon.tsx +2 -2
- package/src/components/icons/GiftFilledIcon.tsx +2 -2
- package/src/components/icons/GiftIcon.tsx +2 -2
- package/src/components/icons/HelpFilledIcon.tsx +2 -2
- package/src/components/icons/HelpIcon.tsx +2 -2
- package/src/components/icons/HomeFilledIcon.tsx +2 -2
- package/src/components/icons/HomeIcon.tsx +2 -2
- package/src/components/icons/HowDoIAssistantIcon.tsx +2 -2
- package/src/components/icons/InfoIcon.tsx +2 -2
- package/src/components/icons/KebabIcon.tsx +2 -2
- package/src/components/icons/LoadingIcon.tsx +2 -2
- package/src/components/icons/LocationFilledIcon.tsx +2 -2
- package/src/components/icons/LocationIcon.tsx +2 -2
- package/src/components/icons/LogoutIcon.tsx +2 -2
- package/src/components/icons/MailIcon.tsx +2 -2
- package/src/components/icons/MenuIcon.tsx +2 -2
- package/src/components/icons/MessageIcon.tsx +2 -2
- package/src/components/icons/MinusIcon.tsx +2 -2
- package/src/components/icons/NotesFilledIcon.tsx +2 -2
- package/src/components/icons/NotesIcon.tsx +2 -2
- package/src/components/icons/OpenNewIcon.tsx +2 -2
- package/src/components/icons/OwnBagIcon.tsx +2 -2
- package/src/components/icons/PadlockIcon.tsx +2 -2
- package/src/components/icons/PencilIcon.tsx +2 -2
- package/src/components/icons/PhoneIcon.tsx +2 -2
- package/src/components/icons/PowerIcon.tsx +2 -2
- package/src/components/icons/SaveFilledIcon.tsx +2 -2
- package/src/components/icons/SaveIcon.tsx +2 -2
- package/src/components/icons/ScooterIcon.tsx +2 -2
- package/src/components/icons/SearchFilledIcon.tsx +2 -2
- package/src/components/icons/SearchIcon.tsx +3 -10
- package/src/components/icons/SendIcon.tsx +2 -2
- package/src/components/icons/SpannerIcon.tsx +2 -2
- package/src/components/icons/StarFilledIcon.tsx +2 -2
- package/src/components/icons/StarIcon.tsx +2 -2
- package/src/components/icons/TickAltFilledIcon.tsx +2 -2
- package/src/components/icons/TickAltIcon.tsx +2 -2
- package/src/components/icons/TickIcon.tsx +2 -2
- package/src/components/icons/TruckIcon.tsx +2 -2
- package/src/components/icons/UserWipeIcon.tsx +2 -2
- package/src/components/icons/VoucherFilledIcon.tsx +2 -2
- package/src/components/icons/VoucherIcon.tsx +2 -2
- package/src/components/icons/WarningFilledIcon.tsx +2 -2
- package/src/components/icons/WarningIcon.tsx +2 -2
- package/src/components/icons/WifiIcon.tsx +2 -2
- package/src/components/icons/WriteIcon.tsx +2 -2
|
@@ -5,7 +5,7 @@ import { useId } from '../../hooks/useId.js';
|
|
|
5
5
|
const WarningIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
7
|
const componentProps = {
|
|
8
|
-
"aria-labelledby": alt ? uid + "
|
|
8
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "warning",
|
|
11
11
|
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
@@ -14,7 +14,7 @@ const WarningIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
15
|
...props,
|
|
16
16
|
};
|
|
17
|
-
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "__title", children: alt }) : null, jsx("path", { d: "M14.239 5.27c.755-1.402 2.766-1.402 3.521 0l10.652 19.782c.717 1.332-.248 2.948-1.76 2.948H5.347l-.14-.005a2 2 0 0 1-1.683-2.817l.063-.126zM5.349 26H26.65L16 6.219zm10.65-5a1 1 0 1 1 0 2 1 1 0 0 1 0-2m0-8a1 1 0 0 1 1 1v5a1 1 0 0 1-2 0v-5a1 1 0 0 1 1-1" })] }));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { WarningIcon };
|
|
@@ -5,7 +5,7 @@ import { useId } from '../../hooks/useId.js';
|
|
|
5
5
|
const WifiIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
7
|
const componentProps = {
|
|
8
|
-
"aria-labelledby": alt ? uid + "
|
|
8
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "wifi",
|
|
11
11
|
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
@@ -14,7 +14,7 @@ const WifiIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
15
|
...props,
|
|
16
16
|
};
|
|
17
|
-
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "__title", children: alt }) : null, jsx("path", { d: "M16 22a2 2 0 1 1 0 4 2 2 0 0 1 0-4m-7.987-4.836c4.419-4.418 11.583-4.418 16.001 0a1.5 1.5 0 0 1-2.12 2.121 8.316 8.316 0 0 0-11.76 0 1.5 1.5 0 1 1-2.12-2.12m-5.552-5.55c7.485-7.485 19.621-7.485 27.106 0a1.5 1.5 0 0 1-2.122 2.12c-6.314-6.313-16.55-6.313-22.863 0a1.5 1.5 0 0 1-2.121-2.12" })] }));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { WifiIcon };
|
|
@@ -5,7 +5,7 @@ import { useId } from '../../hooks/useId.js';
|
|
|
5
5
|
const WriteIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
7
|
const componentProps = {
|
|
8
|
-
"aria-labelledby": alt ? uid + "
|
|
8
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "write",
|
|
11
11
|
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
@@ -14,7 +14,7 @@ const WriteIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
15
|
...props,
|
|
16
16
|
};
|
|
17
|
-
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "__title", children: alt }) : null, jsx("path", { d: "M19.67 10.13 17.9 11.9H7a1 1 0 0 1 0-2h12a1 1 0 0 1 .67.23M14.9 14.9l-2 2H7a1 1 0 0 1 0-2ZM20 15.9a1 1 0 0 1-1 1h-1.87l2-2a1 1 0 0 1 .82.59.85.85 0 0 1 .05.41M19 21.9H7a1 1 0 0 1 0-2h12a1 1 0 1 1 0 2" }), jsx("path", { d: "M24.08 10v20h-22V6h21.73l1.54-1.54a1.9 1.9 0 0 0-1-.44H2.07a2 2 0 0 0-2 2V30a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V8Z" }), jsx("path", { d: "M30.62 3.41 28.5 1.29a1 1 0 0 0-1.42 0L22.38 6l-3.9 3.9-5 5-1.33 1.33a1 1 0 0 0-.27.48v.19l-.6 2.57a.8.8 0 0 0 0 .43 1 1 0 0 0 1.19.77l2.74-.67a.64.64 0 0 0 .29-.13.6.6 0 0 0 .19-.14l2.85-2.86 1.4-1.39L30.62 4.82a1 1 0 0 0 0-1.41M15 19.06l-2.75.63.62-2.75 6.82-6.81L23.81 6l1.54-1.54L27.79 2l2.13 2.12Z" }), jsx("path", { d: "M31.33 2.7 29.21.58a2.06 2.06 0 0 0-2.83 0L11.44 15.52a2.1 2.1 0 0 0-.54 1l-.09.41-.54 2.34a2.18 2.18 0 0 0 .54 1.87 2 2 0 0 0 1.4.58 1.8 1.8 0 0 0 .46-.05l2.75-.67a2.1 2.1 0 0 0 1-.54L31.33 5.53a2 2 0 0 0 0-2.83M15 19.06l-2.75.63.62-2.75 6.82-6.81L23.81 6l1.54-1.54L27.79 2l2.13 2.12Z" })] }));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { WriteIcon };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coopdigital/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@storybook/react-vite": "^10.4.0",
|
|
68
68
|
"@testing-library/jest-dom": "^6.9.1",
|
|
69
69
|
"@testing-library/react": "^16.3.2",
|
|
70
|
-
"@types/react": "^19.2.
|
|
70
|
+
"@types/react": "^19.2.15",
|
|
71
71
|
"@types/react-dom": "^19.2.3",
|
|
72
72
|
"react": "^19.2.6",
|
|
73
73
|
"react-dom": "^19.2.6",
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
"storybook": "$storybook"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@coopdigital/styles": "^1.
|
|
87
|
+
"@coopdigital/styles": "^1.3.1",
|
|
88
88
|
"@radix-ui/react-popover": "^1.1.15",
|
|
89
89
|
"clsx": "^2.1.1",
|
|
90
90
|
"merge-refs": "^2.0.0",
|
|
91
91
|
"react-day-picker": "^10.0.0"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "1f09d7d3de31cb2a72cbfbb980883feb8b9c2d22"
|
|
94
94
|
}
|
|
@@ -51,7 +51,7 @@ export const Button = ({
|
|
|
51
51
|
loadingText = "Loading",
|
|
52
52
|
onClick,
|
|
53
53
|
ref,
|
|
54
|
-
size
|
|
54
|
+
size,
|
|
55
55
|
variant = "solid",
|
|
56
56
|
...props
|
|
57
57
|
}: ButtonProps): JSX.Element => {
|
|
@@ -82,7 +82,7 @@ export const Button = ({
|
|
|
82
82
|
className
|
|
83
83
|
),
|
|
84
84
|
"data-loading": isLoading || isPending ? true : undefined,
|
|
85
|
-
"data-size": size
|
|
85
|
+
"data-size": size ?? undefined,
|
|
86
86
|
"data-variant": variant !== "text" ? variant : undefined,
|
|
87
87
|
"data-width": isFullWidth ? "full" : undefined,
|
|
88
88
|
href,
|
|
@@ -32,14 +32,14 @@ export const Checkbox = ({
|
|
|
32
32
|
id,
|
|
33
33
|
name,
|
|
34
34
|
ref,
|
|
35
|
-
size
|
|
35
|
+
size,
|
|
36
36
|
...props
|
|
37
37
|
}: CheckboxProps): JSX.Element => {
|
|
38
38
|
const uid = useId(id)
|
|
39
39
|
const componentProps = {
|
|
40
40
|
className: clsx("coop-checkbox", "coop-field-element", className),
|
|
41
41
|
"data-error": error || undefined,
|
|
42
|
-
"data-size": size
|
|
42
|
+
"data-size": size ?? undefined,
|
|
43
43
|
disabled,
|
|
44
44
|
id: uid,
|
|
45
45
|
name,
|
|
@@ -31,7 +31,7 @@ export const Fieldset = ({
|
|
|
31
31
|
error = false,
|
|
32
32
|
hideErrorBar = false,
|
|
33
33
|
ref,
|
|
34
|
-
size
|
|
34
|
+
size,
|
|
35
35
|
...props
|
|
36
36
|
}: FieldsetProps): JSX.Element => {
|
|
37
37
|
const componentProps = {
|
|
@@ -39,7 +39,7 @@ export const Fieldset = ({
|
|
|
39
39
|
className: clsx("coop-fieldset", className),
|
|
40
40
|
"data-error": error || undefined,
|
|
41
41
|
"data-hide-error": hideErrorBar || undefined,
|
|
42
|
-
"data-size": size
|
|
42
|
+
"data-size": size ?? undefined,
|
|
43
43
|
disabled,
|
|
44
44
|
...props,
|
|
45
45
|
}
|
|
@@ -28,7 +28,7 @@ export const Radio = ({
|
|
|
28
28
|
id,
|
|
29
29
|
name,
|
|
30
30
|
ref,
|
|
31
|
-
size
|
|
31
|
+
size,
|
|
32
32
|
...props
|
|
33
33
|
}: RadioProps): JSX.Element => {
|
|
34
34
|
const uid = useId(id)
|
|
@@ -36,7 +36,7 @@ export const Radio = ({
|
|
|
36
36
|
const componentProps = {
|
|
37
37
|
className: clsx("coop-radio", "coop-field-element", className),
|
|
38
38
|
"data-error": error || undefined,
|
|
39
|
-
"data-size": size
|
|
39
|
+
"data-size": size ?? undefined,
|
|
40
40
|
disabled,
|
|
41
41
|
id: uid,
|
|
42
42
|
name,
|
|
@@ -46,12 +46,6 @@ const componentSlots = {
|
|
|
46
46
|
SearchboxInput: null,
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const defaultButtonText = React.createElement(SearchIcon, {
|
|
50
|
-
alt: "Search",
|
|
51
|
-
stroke: "currentColor",
|
|
52
|
-
width: 24,
|
|
53
|
-
})
|
|
54
|
-
|
|
55
49
|
export const Searchbox = ({
|
|
56
50
|
action,
|
|
57
51
|
children,
|
|
@@ -61,7 +55,7 @@ export const Searchbox = ({
|
|
|
61
55
|
labelVisible = false,
|
|
62
56
|
onSubmit,
|
|
63
57
|
ref,
|
|
64
|
-
size
|
|
58
|
+
size,
|
|
65
59
|
variant = "solid",
|
|
66
60
|
...props
|
|
67
61
|
}: SearchboxProps): JSX.Element => {
|
|
@@ -95,9 +89,9 @@ export const Searchbox = ({
|
|
|
95
89
|
const formProps = {
|
|
96
90
|
action: action ?? undefined,
|
|
97
91
|
className: clsx("coop-searchbox", borderClass, className),
|
|
98
|
-
"data-size": size
|
|
92
|
+
"data-size": size ?? undefined,
|
|
99
93
|
"data-variant": variant.length && variant !== "solid" ? variant : undefined,
|
|
100
|
-
id: uid + "
|
|
94
|
+
id: uid + "__form",
|
|
101
95
|
onSubmit: onSubmit ? handleSubmit : undefined,
|
|
102
96
|
...props,
|
|
103
97
|
}
|
|
@@ -136,9 +130,12 @@ export const Searchbox = ({
|
|
|
136
130
|
)
|
|
137
131
|
}
|
|
138
132
|
|
|
139
|
-
const SearchboxButton = ({ children, ...props }: ButtonProps) => {
|
|
133
|
+
const SearchboxButton = ({ children, id, ...props }: ButtonProps) => {
|
|
134
|
+
const uid = useId(id)
|
|
140
135
|
const buttonProps = {
|
|
141
|
-
children: children ??
|
|
136
|
+
children: children ?? (
|
|
137
|
+
<SearchIcon alt="Search" id={uid + "__icon"} stroke="currentColor" width="24" />
|
|
138
|
+
),
|
|
142
139
|
...props,
|
|
143
140
|
}
|
|
144
141
|
|
|
@@ -55,14 +55,14 @@ export const Select = ({
|
|
|
55
55
|
id,
|
|
56
56
|
name,
|
|
57
57
|
ref,
|
|
58
|
-
size
|
|
58
|
+
size,
|
|
59
59
|
...props
|
|
60
60
|
}: SelectProps): JSX.Element => {
|
|
61
61
|
const uid = useId(id)
|
|
62
62
|
const componentProps = {
|
|
63
63
|
className: clsx("coop-select", "coop-field-element", className),
|
|
64
64
|
"data-error": error ?? undefined,
|
|
65
|
-
"data-size": size
|
|
65
|
+
"data-size": size ?? undefined,
|
|
66
66
|
disabled,
|
|
67
67
|
id: uid,
|
|
68
68
|
name,
|
|
@@ -60,7 +60,7 @@ export const TextInput = ({
|
|
|
60
60
|
prefix,
|
|
61
61
|
prefixInline = false,
|
|
62
62
|
ref,
|
|
63
|
-
size
|
|
63
|
+
size,
|
|
64
64
|
suffix,
|
|
65
65
|
suffixInline = false,
|
|
66
66
|
type = "text",
|
|
@@ -72,7 +72,7 @@ export const TextInput = ({
|
|
|
72
72
|
"aria-placeholder": placeholder ?? ariaPlaceholder ?? undefined,
|
|
73
73
|
className: clsx("coop-text-input", "coop-field-element", className),
|
|
74
74
|
"data-error": error || undefined,
|
|
75
|
-
"data-size": size
|
|
75
|
+
"data-size": size?.length ? size : undefined,
|
|
76
76
|
disabled,
|
|
77
77
|
id: uid,
|
|
78
78
|
name,
|
|
@@ -62,7 +62,7 @@ export const Textarea = ({
|
|
|
62
62
|
placeholder,
|
|
63
63
|
ref,
|
|
64
64
|
rows = 4,
|
|
65
|
-
size
|
|
65
|
+
size,
|
|
66
66
|
...props
|
|
67
67
|
}: TextareaProps): JSX.Element => {
|
|
68
68
|
const uid = useId(id)
|
|
@@ -72,7 +72,7 @@ export const Textarea = ({
|
|
|
72
72
|
className: clsx("coop-textarea", "coop-field-element", className),
|
|
73
73
|
cols,
|
|
74
74
|
"data-error": error ?? undefined,
|
|
75
|
-
"data-size": size
|
|
75
|
+
"data-size": size ?? undefined,
|
|
76
76
|
disabled,
|
|
77
77
|
id: uid,
|
|
78
78
|
maxLength: cutoff ? maxLength : undefined,
|
|
@@ -11,12 +11,20 @@ import { useSlots } from "../../hooks/useSlots"
|
|
|
11
11
|
import { getFieldElement, sanitizeFieldId } from "./validationsummary-utils"
|
|
12
12
|
|
|
13
13
|
export interface ValidationSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
-
/** **(Optional)** Specify if the summary should be focused and the parent form scrolled into view if there are errors.
|
|
14
|
+
/** **(Optional)** Specify if the summary should be focused and the parent form scrolled into view if there are errors.
|
|
15
|
+
*
|
|
16
|
+
* Default: true
|
|
17
|
+
*/
|
|
15
18
|
autoScroll?: boolean
|
|
16
19
|
/** **(Optional)** This should be a set of `ValidationSummary.Heading`, `ValidationSummary.Prompt` and `ValidationSummary.Errors` components. */
|
|
17
20
|
children?: ReactNode
|
|
18
21
|
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
19
22
|
className?: string
|
|
23
|
+
/** **(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.
|
|
24
|
+
*
|
|
25
|
+
* Default: false
|
|
26
|
+
*/
|
|
27
|
+
forceMount?: boolean
|
|
20
28
|
/** **(Optional)** Specify a custom React ref for this component. */
|
|
21
29
|
ref?: Ref<HTMLDivElement>
|
|
22
30
|
}
|
|
@@ -66,6 +74,7 @@ export const ValidationSummary = ({
|
|
|
66
74
|
autoScroll = true,
|
|
67
75
|
children,
|
|
68
76
|
className,
|
|
77
|
+
forceMount = false,
|
|
69
78
|
ref,
|
|
70
79
|
...props
|
|
71
80
|
}: ValidationSummaryProps): JSX.Element | null => {
|
|
@@ -87,7 +96,7 @@ export const ValidationSummary = ({
|
|
|
87
96
|
}
|
|
88
97
|
}, [autoScroll, errors, hasErrors])
|
|
89
98
|
|
|
90
|
-
if (!hasErrors) {
|
|
99
|
+
if (!hasErrors && !forceMount) {
|
|
91
100
|
return null
|
|
92
101
|
}
|
|
93
102
|
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const AccountCircleFilledIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "account-circle-filled",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const AccountCircleFilledIcon = ({ alt, className, fill, id, ref, ...prop
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<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" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const AccountCircleIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "account-circle",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const AccountCircleIcon = ({ alt, className, fill, id, ref, ...props }: I
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<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" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const AccountFilledIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "account-filled",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const AccountFilledIcon = ({ alt, className, fill, id, ref, ...props }: I
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M16 2a7 7 0 0 1 4.055 12.703l.075.027a12.03 12.03 0 0 1 7.514 8.36q.063.252.115.51-.117.18-.24.357a14.05 14.05 0 0 1-7.11 5.334A13.9 13.9 0 0 1 16 30c-4.93 0-9.266-2.55-11.76-6.401a12.02 12.02 0 0 1 7.63-8.87l.074-.026A7 7 0 0 1 16 2" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const AccountIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "account",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const AccountIcon = ({ alt, className, fill, id, ref, ...props }: IconPro
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M16 2a7 7 0 0 1 4.055 12.703 12.03 12.03 0 0 1 7.565 8.304l.04.157q.054.216.099.435-.108.166-.22.329l-.075.105-.155.218-.097.13a14 14 0 0 1-.493.623l-.088.101A13.97 13.97 0 0 1 16 30a13.97 13.97 0 0 1-10.565-4.817l-.156-.18q-.085-.103-.169-.207l-.069-.085a13 13 0 0 1-.255-.331l-.097-.13-.155-.218-.074-.105a14 14 0 0 1-.22-.328q.045-.22.098-.436l.04-.157q.041-.165.089-.328.038-.128.078-.254l.066-.21a12 12 0 0 1 .128-.363 12.03 12.03 0 0 1 7.205-7.148A7 7 0 0 1 16 2m0 14c-4.55 0-8.387 3.04-9.598 7.2A11.98 11.98 0 0 0 16 28c3.926 0 7.407-1.887 9.596-4.802C24.385 19.04 20.55 16 16 16m0-12a5 5 0 1 0 0 10 5 5 0 0 0 0-10" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const AddIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "add",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const AddIcon = ({ alt, className, fill, id, ref, ...props }: IconProps)
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M15.957 4a1 1 0 0 1 1 1v10H27a1 1 0 1 1 0 2H16.957v10a1 1 0 0 1-2 0V17H5a1 1 0 1 1 0-2h9.957V5a1 1 0 0 1 1-1" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const AppsFilledIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "apps-filled",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const AppsFilledIcon = ({ alt, className, fill, id, ref, ...props }: Icon
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M13 17a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zm13.204.01A2 2 0 0 1 28 19v7l-.01.204a2 2 0 0 1-1.786 1.785L26 28h-7a2 2 0 0 1-1.99-1.796L17 26v-7a2 2 0 0 1 2-2h7zM19 26h7v-7h-7zM13 4a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm13 0a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const AppsIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "apps",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const AppsIcon = ({ alt, className, fill, id, ref, ...props }: IconProps)
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M13.204 17.01A2 2 0 0 1 15 19v7l-.01.204a2 2 0 0 1-1.786 1.785L13 28H6a2 2 0 0 1-1.99-1.796L4 26v-7a2 2 0 0 1 2-2h7zM26 17a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zM6 26h7v-7H6zm7.204-21.99A2 2 0 0 1 15 6v7l-.01.204a2 2 0 0 1-1.786 1.785L13 15H6a2 2 0 0 1-1.99-1.796L4 13V6a2 2 0 0 1 2-2h7zm13 0A2 2 0 0 1 28 6v7l-.01.204a2 2 0 0 1-1.786 1.785L26 15h-7a2 2 0 0 1-1.99-1.796L17 13V6a2 2 0 0 1 2-2h7zM6 13h7V6H6zm13 0h7V6h-7z" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const ArrowDownIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "arrow-down",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const ArrowDownIcon = ({ alt, className, fill, id, ref, ...props }: IconP
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M16 2a1 1 0 0 1 1 1v23.586l10.293-10.293a1 1 0 1 1 1.414 1.414L17.414 29a2 2 0 0 1-2.828 0L3.293 17.707a1 1 0 1 1 1.414-1.414L15 26.586V3a1 1 0 0 1 1-1" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const ArrowLeftIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "arrow-left",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const ArrowLeftIcon = ({ alt, className, fill, id, ref, ...props }: IconP
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M15.707 28.707a1 1 0 0 1-1.414 0L3 17.414a2 2 0 0 1 0-2.828L14.293 3.293a1 1 0 1 1 1.414 1.414L5.414 15H29a1 1 0 1 1 0 2H5.414l10.293 10.293a1 1 0 0 1 0 1.414" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const ArrowRightIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "arrow-right",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const ArrowRightIcon = ({ alt, className, fill, id, ref, ...props }: Icon
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M16.293 3.293a1 1 0 0 1 1.414 0L29 14.586a2 2 0 0 1 0 2.828L17.707 28.707a1 1 0 1 1-1.414-1.414L26.586 17H3a1 1 0 1 1 0-2h23.586L16.293 4.707a1 1 0 0 1 0-1.414" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const ArrowUpIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "arrow-up",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const ArrowUpIcon = ({ alt, className, fill, id, ref, ...props }: IconPro
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M14.586 3a2 2 0 0 1 2.829 0l11.308 11.309a1 1 0 0 1-1.415 1.414L17 5.413V29a1 1 0 0 1-2 0V5.414L4.692 15.723a1 1 0 0 1-1.414-1.415z" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const BackspaceFilledIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "backspace-filled",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const BackspaceFilledIcon = ({ alt, className, fill, id, ref, ...props }:
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M27.992 6a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H11.945a2 2 0 0 1-1.415-.586l-7.999-8a2 2 0 0 1 0-2.828l8-8A2 2 0 0 1 11.944 6zm-4.285 5.293a1 1 0 0 0-1.414 0L19 14.586l-3.293-3.293a1 1 0 1 0-1.414 1.414L17.586 16l-3.293 3.293a1 1 0 1 0 1.414 1.414L19 17.414l3.293 3.293a1 1 0 0 0 1.414-1.414L20.414 16l3.293-3.293a1 1 0 0 0 0-1.414" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const BackspaceIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "backspace",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const BackspaceIcon = ({ alt, className, fill, id, ref, ...props }: IconP
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M27.991 6a2 2 0 0 1 2 2v16l-.01.204A2 2 0 0 1 27.991 26H11.944l-.198-.01a2 2 0 0 1-1.217-.576l-7.998-8a2 2 0 0 1-.137-2.677l.137-.151 7.998-8c.328-.328.76-.53 1.217-.576l.198-.01zM3.945 16l8 8H27.99V8H11.944zm18.348-4.707a1 1 0 0 1 1.414 1.414L20.414 16l3.293 3.293a1 1 0 1 1-1.414 1.414L19 17.414l-3.293 3.293a1 1 0 0 1-1.414-1.414L17.586 16l-3.293-3.293a1 1 0 1 1 1.414-1.414L19 14.586z" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const BasketFilledIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "basket-filled",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const BasketFilledIcon = ({ alt, className, fill, id, ref, ...props }: Ic
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M19.293 5.293a1 1 0 0 1 1.414 0L26.414 11H28a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-.308l-1.431 9.304A2 2 0 0 1 24.284 28H7.716a2 2 0 0 1-1.977-1.696L4.308 17H4a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h1.586l5.707-5.707a1 1 0 1 1 1.414 1.414L8.414 11h15.172l-4.293-4.293a1 1 0 0 1 0-1.414M16 19a1 1 0 0 0-1 1v3a1 1 0 0 0 2 0v-3a1 1 0 0 0-1-1m-4.514.836a1 1 0 0 0-1.972.328l.5 3a1 1 0 0 0 1.972-.328zm10.178-.822a1 1 0 0 0-1.15.822l-.5 3a1 1 0 0 0 1.972.328l.5-3a1 1 0 0 0-.822-1.15" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const BasketIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "basket",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const BasketIcon = ({ alt, className, fill, id, ref, ...props }: IconProp
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M19.293 5.293a1 1 0 0 1 1.414 0L26.414 11H28a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-.308l-1.431 9.304a2 2 0 0 1-1.793 1.687l-.184.009H7.716a2 2 0 0 1-1.94-1.516l-.037-.18L4.308 17H4a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h1.586l5.707-5.707a1 1 0 1 1 1.414 1.414L8.414 11h15.172l-4.293-4.293a1 1 0 0 1 0-1.414M7.716 26h16.568l1.385-9H6.33zM16 19a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0v-3a1 1 0 0 1 1-1m-5.664.014a1 1 0 0 1 1.15.822l.5 3a1 1 0 0 1-1.972.328l-.5-3a1 1 0 0 1 .822-1.15m10.178.822a1 1 0 0 1 1.972.328l-.5 3a1 1 0 0 1-1.972-.328zM4 15h24v-2H4z" />
|
|
26
26
|
</svg>
|
|
27
27
|
)
|
|
@@ -10,7 +10,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
10
10
|
export const BellFilledIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
11
|
const uid = useId(id)
|
|
12
12
|
const componentProps = {
|
|
13
|
-
"aria-labelledby": alt ? uid + "
|
|
13
|
+
"aria-labelledby": alt ? uid + "__title" : undefined,
|
|
14
14
|
className: clsx("coop-icon", className),
|
|
15
15
|
"data-icon": "bell-filled",
|
|
16
16
|
fill: fill ?? "currentColor",
|
|
@@ -21,7 +21,7 @@ export const BellFilledIcon = ({ alt, className, fill, id, ref, ...props }: Icon
|
|
|
21
21
|
}
|
|
22
22
|
return (
|
|
23
23
|
<svg {...componentProps} ref={ref}>
|
|
24
|
-
{alt ? <title id={uid + "
|
|
24
|
+
{alt ? <title id={uid + "__title"}>{alt}</title> : null}
|
|
25
25
|
<path d="M27 26a1 1 0 0 0 0-2H5a1 1 0 1 0 0 2zM19 27a3 3 0 1 1-6 0zM13 5a3 3 0 1 1 6 0z" />
|
|
26
26
|
<path d="M16 5a9 9 0 0 1 9 9v11H7V14l.012-.463A9 9 0 0 1 16 5Z" strokeWidth="2" />
|
|
27
27
|
</svg>
|