@coopdigital/react 0.46.0 → 0.48.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 +16 -4
- package/dist/components/AlertBanner/AlertBanner.js +8 -3
- package/dist/components/Author/Author.d.ts +4 -2
- package/dist/components/Author/Author.js +2 -2
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +1 -2
- package/dist/components/Card/Card.d.ts +4 -2
- package/dist/components/Card/Card.js +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +4 -2
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Expandable/Expandable.d.ts +4 -2
- package/dist/components/Expandable/Expandable.js +2 -2
- package/dist/components/Field/Field.d.ts +4 -2
- package/dist/components/Field/Field.js +4 -4
- package/dist/components/FieldMarkers/Error.d.ts +4 -2
- package/dist/components/FieldMarkers/Error.js +2 -2
- package/dist/components/FieldMarkers/Hint.d.ts +5 -3
- package/dist/components/FieldMarkers/Hint.js +2 -2
- package/dist/components/FieldMarkers/Label.d.ts +4 -2
- package/dist/components/FieldMarkers/Label.js +6 -2
- package/dist/components/FieldMarkers/Legend.d.ts +4 -2
- package/dist/components/FieldMarkers/Legend.js +2 -2
- package/dist/components/Fieldset/Fieldset.d.ts +4 -2
- package/dist/components/Fieldset/Fieldset.js +2 -4
- package/dist/components/Flourish/Flourish.d.ts +4 -2
- package/dist/components/Flourish/Flourish.js +2 -2
- package/dist/components/Icon/AddIcon.d.ts +1 -1
- package/dist/components/Icon/AddIcon.js +6 -5
- package/dist/components/Icon/ArrowDownIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowDownIcon.js +6 -5
- package/dist/components/Icon/ArrowLeftIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowLeftIcon.js +6 -5
- package/dist/components/Icon/ArrowRightIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowRightIcon.js +6 -5
- package/dist/components/Icon/ArrowUpIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowUpIcon.js +6 -5
- package/dist/components/Icon/AvatarAltIcon.d.ts +1 -1
- package/dist/components/Icon/AvatarAltIcon.js +6 -5
- package/dist/components/Icon/AvatarIcon.d.ts +1 -1
- package/dist/components/Icon/AvatarIcon.js +6 -5
- package/dist/components/Icon/BasketIcon.d.ts +1 -1
- package/dist/components/Icon/BasketIcon.js +6 -5
- package/dist/components/Icon/CalendarIcon.d.ts +1 -1
- package/dist/components/Icon/CalendarIcon.js +6 -5
- package/dist/components/Icon/ChevronDownIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronDownIcon.js +6 -5
- package/dist/components/Icon/ChevronLeftIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronLeftIcon.js +6 -5
- package/dist/components/Icon/ChevronRightIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronRightIcon.js +6 -5
- package/dist/components/Icon/ChevronUpIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronUpIcon.js +6 -5
- package/dist/components/Icon/ClockIcon.d.ts +1 -1
- package/dist/components/Icon/ClockIcon.js +6 -5
- package/dist/components/Icon/CloseAltIcon.d.ts +1 -1
- package/dist/components/Icon/CloseAltIcon.js +6 -5
- package/dist/components/Icon/CloseIcon.d.ts +1 -1
- package/dist/components/Icon/CloseIcon.js +6 -5
- package/dist/components/Icon/CoopCardIcon.d.ts +1 -1
- package/dist/components/Icon/CoopCardIcon.js +6 -5
- package/dist/components/Icon/CoopIcon.d.ts +1 -1
- package/dist/components/Icon/CoopIcon.js +6 -5
- package/dist/components/Icon/CoopLocationIcon.d.ts +1 -1
- package/dist/components/Icon/CoopLocationIcon.js +6 -5
- package/dist/components/Icon/DownloadIcon.d.ts +1 -1
- package/dist/components/Icon/DownloadIcon.js +6 -5
- package/dist/components/Icon/HomeIcon.d.ts +1 -1
- package/dist/components/Icon/HomeIcon.js +6 -5
- package/dist/components/Icon/InformationIcon.d.ts +1 -1
- package/dist/components/Icon/InformationIcon.js +6 -5
- package/dist/components/Icon/LoadingIcon.d.ts +1 -1
- package/dist/components/Icon/LoadingIcon.js +6 -5
- package/dist/components/Icon/LocationIcon.d.ts +1 -1
- package/dist/components/Icon/LocationIcon.js +6 -5
- package/dist/components/Icon/MailIcon.d.ts +1 -1
- package/dist/components/Icon/MailIcon.js +6 -5
- package/dist/components/Icon/MenuIcon.d.ts +1 -1
- package/dist/components/Icon/MenuIcon.js +6 -5
- package/dist/components/Icon/MessageIcon.d.ts +1 -1
- package/dist/components/Icon/MessageIcon.js +6 -5
- package/dist/components/Icon/MinusIcon.d.ts +1 -1
- package/dist/components/Icon/MinusIcon.js +6 -5
- package/dist/components/Icon/OpenNewIcon.d.ts +1 -1
- package/dist/components/Icon/OpenNewIcon.js +6 -5
- package/dist/components/Icon/PencilIcon.d.ts +1 -1
- package/dist/components/Icon/PencilIcon.js +6 -5
- package/dist/components/Icon/PhoneIcon.d.ts +1 -1
- package/dist/components/Icon/PhoneIcon.js +6 -5
- package/dist/components/Icon/QuestionIcon.d.ts +1 -1
- package/dist/components/Icon/QuestionIcon.js +6 -5
- package/dist/components/Icon/ScooterIcon.d.ts +1 -1
- package/dist/components/Icon/ScooterIcon.js +6 -5
- package/dist/components/Icon/SearchIcon.d.ts +1 -1
- package/dist/components/Icon/SearchIcon.js +6 -5
- package/dist/components/Icon/SettingsIcon.d.ts +1 -1
- package/dist/components/Icon/SettingsIcon.js +6 -5
- package/dist/components/Icon/TickAltIcon.d.ts +1 -1
- package/dist/components/Icon/TickAltIcon.js +6 -5
- package/dist/components/Icon/TickIcon.d.ts +1 -1
- package/dist/components/Icon/TickIcon.js +6 -5
- package/dist/components/Icon/VanIcon.d.ts +1 -1
- package/dist/components/Icon/VanIcon.js +6 -5
- package/dist/components/Icon/WarningIcon.d.ts +1 -1
- package/dist/components/Icon/WarningIcon.js +6 -5
- package/dist/components/Icon/WriteIcon.d.ts +1 -1
- package/dist/components/Icon/WriteIcon.js +6 -5
- package/dist/components/Image/Image.d.ts +4 -2
- package/dist/components/Image/Image.js +2 -2
- package/dist/components/Pill/Pill.d.ts +4 -2
- package/dist/components/Pill/Pill.js +5 -6
- package/dist/components/Radio/Radio.d.ts +5 -3
- package/dist/components/Radio/Radio.js +6 -7
- package/dist/components/Searchbox/Searchbox.d.ts +4 -2
- package/dist/components/Searchbox/Searchbox.js +14 -9
- package/dist/components/Select/Select.d.ts +46 -0
- package/dist/components/Select/Select.js +29 -0
- package/dist/components/Select/index.d.ts +4 -0
- package/dist/components/Signpost/Signpost.d.ts +6 -4
- package/dist/components/Signpost/Signpost.js +3 -6
- package/dist/components/SkipNav/SkipNav.d.ts +4 -2
- package/dist/components/SkipNav/SkipNav.js +2 -2
- package/dist/components/Squircle/Squircle.d.ts +4 -2
- package/dist/components/Squircle/Squircle.js +2 -2
- package/dist/components/Tag/Tag.d.ts +5 -3
- package/dist/components/Tag/Tag.js +3 -6
- package/dist/components/TextInput/TextInput.d.ts +4 -2
- package/dist/components/TextInput/TextInput.js +3 -3
- package/dist/components/Textarea/Textarea.d.ts +4 -2
- package/dist/components/Textarea/Textarea.js +5 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +10 -10
- package/src/components/AlertBanner/AlertBanner.tsx +22 -9
- package/src/components/Author/Author.tsx +5 -2
- package/src/components/Button/Button.tsx +2 -3
- package/src/components/Card/Card.tsx +5 -2
- package/src/components/Checkbox/Checkbox.tsx +11 -5
- package/src/components/Expandable/Expandable.tsx +10 -3
- package/src/components/Field/Field.tsx +7 -5
- package/src/components/FieldMarkers/Error.tsx +9 -3
- package/src/components/FieldMarkers/Hint.tsx +10 -4
- package/src/components/FieldMarkers/Label.tsx +9 -3
- package/src/components/FieldMarkers/Legend.tsx +9 -3
- package/src/components/Fieldset/Fieldset.tsx +9 -4
- package/src/components/Flourish/Flourish.tsx +5 -2
- package/src/components/Icon/AddIcon.tsx +9 -6
- package/src/components/Icon/ArrowDownIcon.tsx +9 -6
- package/src/components/Icon/ArrowLeftIcon.tsx +9 -6
- package/src/components/Icon/ArrowRightIcon.tsx +9 -6
- package/src/components/Icon/ArrowUpIcon.tsx +9 -6
- package/src/components/Icon/AvatarAltIcon.tsx +9 -6
- package/src/components/Icon/AvatarIcon.tsx +9 -6
- package/src/components/Icon/BasketIcon.tsx +9 -6
- package/src/components/Icon/CalendarIcon.tsx +9 -6
- package/src/components/Icon/ChevronDownIcon.tsx +9 -6
- package/src/components/Icon/ChevronLeftIcon.tsx +9 -6
- package/src/components/Icon/ChevronRightIcon.tsx +9 -6
- package/src/components/Icon/ChevronUpIcon.tsx +9 -6
- package/src/components/Icon/ClockIcon.tsx +9 -6
- package/src/components/Icon/CloseAltIcon.tsx +9 -6
- package/src/components/Icon/CloseIcon.tsx +9 -6
- package/src/components/Icon/CoopCardIcon.tsx +9 -6
- package/src/components/Icon/CoopIcon.tsx +9 -6
- package/src/components/Icon/CoopLocationIcon.tsx +9 -6
- package/src/components/Icon/DownloadIcon.tsx +9 -6
- package/src/components/Icon/HomeIcon.tsx +9 -6
- package/src/components/Icon/InformationIcon.tsx +9 -6
- package/src/components/Icon/LoadingIcon.tsx +9 -6
- package/src/components/Icon/LocationIcon.tsx +9 -6
- package/src/components/Icon/MailIcon.tsx +9 -6
- package/src/components/Icon/MenuIcon.tsx +9 -6
- package/src/components/Icon/MessageIcon.tsx +9 -6
- package/src/components/Icon/MinusIcon.tsx +9 -6
- package/src/components/Icon/OpenNewIcon.tsx +9 -6
- package/src/components/Icon/PencilIcon.tsx +9 -6
- package/src/components/Icon/PhoneIcon.tsx +9 -6
- package/src/components/Icon/QuestionIcon.tsx +9 -6
- package/src/components/Icon/ScooterIcon.tsx +9 -6
- package/src/components/Icon/SearchIcon.tsx +9 -6
- package/src/components/Icon/SettingsIcon.tsx +9 -6
- package/src/components/Icon/TickAltIcon.tsx +9 -6
- package/src/components/Icon/TickIcon.tsx +9 -6
- package/src/components/Icon/VanIcon.tsx +9 -6
- package/src/components/Icon/WarningIcon.tsx +9 -6
- package/src/components/Icon/WriteIcon.tsx +9 -6
- package/src/components/Image/Image.tsx +5 -2
- package/src/components/Pill/Pill.tsx +8 -7
- package/src/components/Radio/Radio.tsx +11 -8
- package/src/components/Searchbox/Searchbox.tsx +26 -21
- package/src/components/Select/Select.tsx +97 -0
- package/src/components/Select/index.ts +5 -0
- package/src/components/Signpost/Signpost.tsx +8 -8
- package/src/components/SkipNav/SkipNav.tsx +5 -2
- package/src/components/Squircle/Squircle.tsx +5 -2
- package/src/components/Tag/Tag.tsx +9 -8
- package/src/components/TextInput/TextInput.tsx +10 -5
- package/src/components/Textarea/Textarea.tsx +9 -7
- package/src/index.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSX, ReactNode, SVGProps } from "react"
|
|
1
|
+
import type { JSX, ReactNode, Ref, SVGProps } from "react"
|
|
2
2
|
|
|
3
3
|
import clsx from "clsx"
|
|
4
4
|
|
|
@@ -11,12 +11,15 @@ export interface FlourishProps extends SVGProps<SVGSVGElement> {
|
|
|
11
11
|
className?: string
|
|
12
12
|
/** **(Optional)** Specify the Flourish color. */
|
|
13
13
|
fill?: Darks | Lights | Tints | OfferRed | BrandBlue | White | Black
|
|
14
|
+
/** **(Optional)** Specify a custom React ref for this component. */
|
|
15
|
+
ref?: Ref<SVGSVGElement>
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export const Flourish = ({
|
|
17
19
|
children,
|
|
18
20
|
className,
|
|
19
21
|
fill = "brand-blue",
|
|
22
|
+
ref,
|
|
20
23
|
...props
|
|
21
24
|
}: FlourishProps): JSX.Element => {
|
|
22
25
|
const componentProps = {
|
|
@@ -28,7 +31,7 @@ export const Flourish = ({
|
|
|
28
31
|
return (
|
|
29
32
|
<span style={{ position: "relative" }}>
|
|
30
33
|
{children}
|
|
31
|
-
<svg {...componentProps} viewBox="0 0 276 10">
|
|
34
|
+
<svg {...componentProps} ref={ref} viewBox="0 0 276 10">
|
|
32
35
|
<path d="M275.9 8.6c.1-1.6.2-1.8-.4-2.9.3-1-.3-1.2-1.8-1.1v-.3c.6-.4.2-.2 1.4-.1-.9-2.3-5.6-1.8-8.5-2.3C259 .5 246.3.7 237.4.5L185 .4l-33-.2-26.1-.2-67.4 1.2-44.3.5C10.7 2.1 1.5.4 0 3.3l1 .2L0 4v.5C8.2 7.9 26.6 7.2 35.6 7c5 0 13.5 1.6 16.5-.6C53.4 8 59.5 8 62 7.7l45 .1 42.8.3 30.7.3 44.2.6 27.8-.5 23 .8c.1-.8-.3-.5.5-.7ZM219 2.8v-.2l.8-.2h.4l.3.4H219Zm30-.1h1.2c-.8.4-.5.3-1.2 0Zm6.2.6.2-.4h.3l-.5.4Z" />
|
|
33
36
|
</svg>
|
|
34
37
|
</span>
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const AddIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const AddIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "add",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M24.7 16.72a1 1 0 0 1-.7.28H8a1 1 0 1 1 0-2h16a1 1 0 0 1 1 1 1 1 0 0 1-.3.72"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ArrowDownIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ArrowDownIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "arrow-down",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path d="M15 28.66V3a1 1 0 0 1 2 0v25.66a1 1 0 0 1-2 0" fill={fill ?? "currentColor"} />
|
|
23
26
|
<path
|
|
24
27
|
d="M3 17a1 1 0 0 1 .29-.71 1 1 0 0 1 1.42 0L16 27.58l11.29-11.29a1 1 0 0 1 1.42 0 1 1 0 0 1 0 1.41l-12 12a1 1 0 0 1-1.41 0l-12-12A1 1 0 0 1 3 17"
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ArrowLeftIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ArrowLeftIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "arrow-left",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path d="M3.34 17H29a1 1 0 0 0 0-2H3.34a1 1 0 0 0 0 2" fill={fill ?? "currentColor"} />
|
|
23
26
|
<path
|
|
24
27
|
d="M15 29a1 1 0 0 0 .71-.29 1 1 0 0 0 0-1.42L5.12 16.71a1 1 0 0 1 0-1.42L15.71 4.71a1 1 0 0 0 0-1.42 1 1 0 0 0-1.41 0l-12 12a1 1 0 0 0 0 1.42l12 12a1 1 0 0 0 .7.29"
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ArrowRightIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ArrowRightIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "arrow-right",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path d="M28.7 15H3a1 1 0 0 0 0 2h25.7a1 1 0 0 0 0-2" fill={fill ?? "currentColor"} />
|
|
23
26
|
<path
|
|
24
27
|
d="M17 3a1 1 0 0 0-.7.3 1 1 0 0 0 0 1.4l10.6 10.6a1 1 0 0 1 0 1.4L16.3 27.3a1 1 0 0 0 0 1.4 1 1 0 0 0 1.4 0l12-12a1 1 0 0 0 0-1.4l-12-12A1 1 0 0 0 17 3"
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ArrowUpIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ArrowUpIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "arrow-up",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path d="M17 3.34V29a1 1 0 0 1-2 0V3.34a1 1 0 0 1 2 0" fill={fill ?? "currentColor"} />
|
|
23
26
|
<path
|
|
24
27
|
d="M29 15a1 1 0 0 1-.29.71 1 1 0 0 1-1.42 0L16 4.42 4.71 15.71a1 1 0 0 1-1.42 0 1 1 0 0 1 0-1.41l12-12a1 1 0 0 1 1.41 0l12 12a1 1 0 0 1 .3.7"
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const AvatarAltIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const AvatarAltIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "avatar-alt",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M16 32a16 16 0 1 1 16-16 16 16 0 0 1-16 16m0-30a14 14 0 1 0 14 14A14 14 0 0 0 16 2"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const AvatarIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const AvatarIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "avatar",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M16 31a18.24 18.24 0 0 1-12.64-5.1A1.19 1.19 0 0 1 3 24.86a12.31 12.31 0 0 1 12-10h2a12.31 12.31 0 0 1 12 10 1.19 1.19 0 0 1-.34 1.06A18.24 18.24 0 0 1 16 31M5.42 24.68a15.9 15.9 0 0 0 21.16 0A10 10 0 0 0 17 17.17h-2a10 10 0 0 0-9.58 7.51"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const BasketIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const BasketIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "basket",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M16.07 26a1 1 0 0 0 1-1v-4.08a1 1 0 1 0-2 0V25a1 1 0 0 0 1 1M21.5 26h.17a1 1 0 0 0 1-.85l.68-4.07a1 1 0 0 0-.82-1.18 1 1 0 0 0-1.16.84l-.67 4.07a1 1 0 0 0 .8 1.19M10.43 26h.17a1 1 0 0 0 .82-1.18l-.68-4.07a1 1 0 0 0-1.15-.84 1 1 0 0 0-.82 1.18l.67 4.07a1 1 0 0 0 .99.84"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const CalendarIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const CalendarIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "calendar",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M31 2h-4V1a1 1 0 0 0-2 0v1H7V1a1 1 0 0 0-2 0v1H1a1 1 0 0 0-1 1v28a1 1 0 0 0 1 1h30a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1m-1 28H2V10h28Zm0-22H2V4h3v1a1 1 0 0 0 2 0V4h18v1a1 1 0 0 0 2 0V4h3Z"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ChevronDownIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ChevronDownIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "chevron-down",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M31 9a1 1 0 0 0-.29-.71 1 1 0 0 0-1.42 0L16 21.59 2.71 8.3a1 1 0 0 0-1.42 0 1 1 0 0 0 0 1.41l14 14a1 1 0 0 0 1.41 0l14-14A1 1 0 0 0 31 9"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ChevronLeftIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ChevronLeftIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "chevron-left",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M22.5 30a1 1 0 0 0 .71-.29 1 1 0 0 0 0-1.42L10.91 16 23.2 3.71a1 1 0 0 0 0-1.41 1 1 0 0 0-1.41 0l-13 13a1 1 0 0 0 0 1.41l13 13a1 1 0 0 0 .71.29"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ChevronRightIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ChevronRightIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "chevron-right",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M9.49 2a1 1 0 0 0-.71 1.71L21.07 16 8.79 28.3a1 1 0 1 0 1.41 1.41l13-13a1 1 0 0 0 0-1.42l-13-13A1 1 0 0 0 9.49 2"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ChevronUpIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ChevronUpIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "chevron-up",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M1 23a1 1 0 0 0 .29.71 1 1 0 0 0 1.42 0L16 10.41 29.29 23.7a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.41l-14-14a1 1 0 0 0-1.41 0l-14 14A1 1 0 0 0 1 23"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const ClockIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const ClockIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "clock",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M23 21.05a.93.93 0 0 1-.5-.14L15 16.58v-9.5a1 1 0 0 1 1-1 1 1 0 0 1 1 1v8.35l6.47 3.77a1 1 0 0 1 .36 1.36 1 1 0 0 1-.83.49"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const CloseAltIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const CloseAltIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "close-alt",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M21.55 22.51a1 1 0 0 1-.7-.3l-11-11a1 1 0 0 1 1.41-1.41l11 11a1 1 0 0 1 0 1.41 1 1 0 0 1-.71.3"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const CloseIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const CloseIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "close",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M27 28a1 1 0 0 1-.71-.29l-22-22a1 1 0 0 1 1.42-1.42l22 22a1 1 0 0 1 0 1.42A1 1 0 0 1 27 28"
|
|
24
27
|
fill={fill ?? "currentColor"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import { type SVGProps
|
|
2
|
+
import { type SVGProps } from "react"
|
|
3
|
+
|
|
4
|
+
import { useId } from "../../hooks/useId"
|
|
3
5
|
|
|
4
6
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
5
7
|
alt?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const CoopCardIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
9
|
-
const
|
|
10
|
+
export const CoopCardIcon = ({ alt, className, fill, id, ref, ...props }: IconProps) => {
|
|
11
|
+
const uid = useId(id)
|
|
10
12
|
const componentProps = {
|
|
11
|
-
"aria-labelledby": alt ?
|
|
13
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
12
14
|
className: clsx("coop-icon", className),
|
|
13
15
|
"data-icon": "coop-card",
|
|
14
16
|
fill: fill ?? "none",
|
|
17
|
+
id: uid,
|
|
15
18
|
role: alt ? "img" : undefined,
|
|
16
19
|
viewBox: "0 0 32 32",
|
|
17
20
|
...props,
|
|
18
21
|
}
|
|
19
22
|
return (
|
|
20
|
-
<svg {...componentProps}>
|
|
21
|
-
{alt ? <title id={
|
|
23
|
+
<svg {...componentProps} ref={ref}>
|
|
24
|
+
{alt ? <title id={uid + "-title"}>{alt}</title> : null}
|
|
22
25
|
<path
|
|
23
26
|
d="M6.67 0a1.34 1.34 0 0 0-1.34 1.33v29.34A1.34 1.34 0 0 0 6.67 32h18.66a1.34 1.34 0 0 0 1.34-1.33V1.33A1.34 1.34 0 0 0 25.33 0ZM23 4.77a6.4 6.4 0 0 1 .21 1.62A6.8 6.8 0 0 1 22.94 8a2.1 2.1 0 0 1-.48.85 2.3 2.3 0 0 1-.82.55 6.3 6.3 0 0 1-1.93.31 5.3 5.3 0 0 1-1.94-.31 2.2 2.2 0 0 1-.8-.55 2.3 2.3 0 0 1-.49-.85 5.94 5.94 0 0 1 0-3.24 2.2 2.2 0 0 1 .52-.84 2.1 2.1 0 0 1 .82-.54 5.84 5.84 0 0 1 3.87 0 2.24 2.24 0 0 1 .81.55 2.3 2.3 0 0 1 .5.84m-2 2.4a2.5 2.5 0 0 0 .12-.78 2.4 2.4 0 0 0-.13-.8 1 1 0 0 0-.28-.45 1.15 1.15 0 0 0-.47-.23 2.8 2.8 0 0 0-1 0 1 1 0 0 0-.47.24.9.9 0 0 0-.29.44 2.66 2.66 0 0 0 0 1.58 1 1 0 0 0 .28.45 1.1 1.1 0 0 0 .48.23 2.8 2.8 0 0 0 1 0 1.1 1.1 0 0 0 .47-.24 1 1 0 0 0 .23-.44Zm-5.5 4.75a5.9 5.9 0 0 1 0 3.23 2.07 2.07 0 0 1-1.3 1.4 5.84 5.84 0 0 1-3.87 0 2.16 2.16 0 0 1-.81-.55 2.1 2.1 0 0 1-.52-.85 5.9 5.9 0 0 1 0-3.23 2.1 2.1 0 0 1 .48-.85 2.16 2.16 0 0 1 .82-.55 5.84 5.84 0 0 1 3.87 0 2.19 2.19 0 0 1 1.3 1.4Zm-2 2.41a2.5 2.5 0 0 0 .12-.77 2.7 2.7 0 0 0-.12-.8 1 1 0 0 0-.28-.45 1 1 0 0 0-.48-.23 2.8 2.8 0 0 0-1 0 1 1 0 0 0-.47.24 1 1 0 0 0-.28.44 2.63 2.63 0 0 0 0 1.57.9.9 0 0 0 .28.45 1 1 0 0 0 .47.23 2.8 2.8 0 0 0 1 0 1 1 0 0 0 .47-.23 1 1 0 0 0 .29-.45m2.22-8h-2.1a3.3 3.3 0 0 0-.1-.78 1 1 0 0 0-.29-.45 1.1 1.1 0 0 0-.47-.23 2.8 2.8 0 0 0-1 0 1.05 1.05 0 0 0-.47.24 1.1 1.1 0 0 0-.29.44 2.66 2.66 0 0 0 0 1.58 1 1 0 0 0 .28.45 1.1 1.1 0 0 0 .48.23 2.8 2.8 0 0 0 1 0 1.1 1.1 0 0 0 .47-.24 1.1 1.1 0 0 0 .29-.44 2.3 2.3 0 0 0 .07-.36l2 .92a3 3 0 0 0-.09.31 2.1 2.1 0 0 1-.49.85 2.16 2.16 0 0 1-.81.55 6.4 6.4 0 0 1-1.94.31 5.7 5.7 0 0 1-1.93-.31 2.1 2.1 0 0 1-.8-.55A2.16 2.16 0 0 1 9 8a5.94 5.94 0 0 1 0-3.23 2.06 2.06 0 0 1 .48-.85 2 2 0 0 1 .82-.54 5.84 5.84 0 0 1 3.87 0 2.2 2.2 0 0 1 .8.55 2 2 0 0 1 .49.84 6.7 6.7 0 0 1 .26 1.6Zm.5 7.18a6.2 6.2 0 0 1 .21-1.61 2.06 2.06 0 0 1 .51-.85 2 2 0 0 1 .85-.5 5.84 5.84 0 0 1 3.87 0 2.16 2.16 0 0 1 .81.55 2.1 2.1 0 0 1 .53.9 5.9 5.9 0 0 1 0 3.23 2.1 2.1 0 0 1-.48.85 2.16 2.16 0 0 1-.82.55 6.7 6.7 0 0 1-1.93.32L19 15h.2a2.8 2.8 0 0 0 1 0 1 1 0 0 0 .46-.24 1.05 1.05 0 0 0 .27-.44 2.66 2.66 0 0 0 0-1.58 1 1 0 0 0-.28-.44 1 1 0 0 0-.47-.23 2.4 2.4 0 0 0-1 0 .9.9 0 0 0-.47.23.9.9 0 0 0-.29.44 2.3 2.3 0 0 0-.11.78v4.73h-2.1Z"
|
|
24
27
|
fill={fill ?? "currentColor"}
|