@coopdigital/react 0.19.5 → 0.19.6
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 +3 -3
- package/dist/components/AlertBanner/AlertBanner.js +3 -2
- package/dist/components/Author/Author.d.ts +4 -4
- package/dist/components/Author/Author.js +3 -2
- package/dist/components/Button/Button.d.ts +10 -10
- package/dist/components/Button/Button.js +3 -2
- package/dist/components/Card/Card.d.ts +14 -14
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Expandable/Expandable.d.ts +4 -4
- package/dist/components/Expandable/Expandable.js +4 -2
- package/dist/components/Icon/AddIcon.d.ts +1 -1
- package/dist/components/Icon/AddIcon.js +4 -3
- package/dist/components/Icon/ArrowDownIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowDownIcon.js +4 -3
- package/dist/components/Icon/ArrowLeftIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowLeftIcon.js +4 -3
- package/dist/components/Icon/ArrowRightIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowRightIcon.js +4 -3
- package/dist/components/Icon/ArrowUpIcon.d.ts +1 -1
- package/dist/components/Icon/ArrowUpIcon.js +4 -3
- package/dist/components/Icon/AvatarAltIcon.d.ts +1 -1
- package/dist/components/Icon/AvatarAltIcon.js +4 -3
- package/dist/components/Icon/AvatarIcon.d.ts +1 -1
- package/dist/components/Icon/AvatarIcon.js +4 -3
- package/dist/components/Icon/BasketIcon.d.ts +1 -1
- package/dist/components/Icon/BasketIcon.js +4 -3
- package/dist/components/Icon/CalendarIcon.d.ts +1 -1
- package/dist/components/Icon/CalendarIcon.js +4 -3
- package/dist/components/Icon/ChevronDownIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronDownIcon.js +4 -3
- package/dist/components/Icon/ChevronLeftIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronLeftIcon.js +4 -3
- package/dist/components/Icon/ChevronRightIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronRightIcon.js +4 -3
- package/dist/components/Icon/ChevronUpIcon.d.ts +1 -1
- package/dist/components/Icon/ChevronUpIcon.js +4 -3
- package/dist/components/Icon/ClockIcon.d.ts +1 -1
- package/dist/components/Icon/ClockIcon.js +4 -3
- package/dist/components/Icon/CloseAltIcon.d.ts +1 -1
- package/dist/components/Icon/CloseAltIcon.js +4 -3
- package/dist/components/Icon/CloseIcon.d.ts +1 -1
- package/dist/components/Icon/CloseIcon.js +4 -3
- package/dist/components/Icon/CoopCardIcon.d.ts +1 -1
- package/dist/components/Icon/CoopCardIcon.js +4 -3
- package/dist/components/Icon/CoopIcon.d.ts +1 -1
- package/dist/components/Icon/CoopIcon.js +4 -3
- package/dist/components/Icon/CoopLocationIcon.d.ts +1 -1
- package/dist/components/Icon/CoopLocationIcon.js +4 -3
- package/dist/components/Icon/DownloadIcon.d.ts +1 -1
- package/dist/components/Icon/DownloadIcon.js +4 -3
- package/dist/components/Icon/HomeIcon.d.ts +1 -1
- package/dist/components/Icon/HomeIcon.js +4 -3
- package/dist/components/Icon/InformationIcon.d.ts +1 -1
- package/dist/components/Icon/InformationIcon.js +4 -3
- package/dist/components/Icon/LoadingIcon.d.ts +1 -1
- package/dist/components/Icon/LoadingIcon.js +4 -3
- package/dist/components/Icon/LocationIcon.d.ts +1 -1
- package/dist/components/Icon/LocationIcon.js +4 -3
- package/dist/components/Icon/MailIcon.d.ts +1 -1
- package/dist/components/Icon/MailIcon.js +4 -3
- package/dist/components/Icon/MenuIcon.d.ts +1 -1
- package/dist/components/Icon/MenuIcon.js +4 -3
- package/dist/components/Icon/MessageIcon.d.ts +1 -1
- package/dist/components/Icon/MessageIcon.js +4 -3
- package/dist/components/Icon/MinusIcon.d.ts +1 -1
- package/dist/components/Icon/MinusIcon.js +4 -3
- package/dist/components/Icon/OpenNewIcon.d.ts +1 -1
- package/dist/components/Icon/OpenNewIcon.js +4 -3
- package/dist/components/Icon/PencilIcon.d.ts +1 -1
- package/dist/components/Icon/PencilIcon.js +4 -3
- package/dist/components/Icon/PhoneIcon.d.ts +1 -1
- package/dist/components/Icon/PhoneIcon.js +4 -3
- package/dist/components/Icon/QuestionIcon.d.ts +1 -1
- package/dist/components/Icon/QuestionIcon.js +4 -3
- package/dist/components/Icon/ScooterIcon.d.ts +1 -1
- package/dist/components/Icon/ScooterIcon.js +4 -3
- package/dist/components/Icon/SearchIcon.d.ts +1 -1
- package/dist/components/Icon/SearchIcon.js +4 -3
- package/dist/components/Icon/SettingsIcon.d.ts +1 -1
- package/dist/components/Icon/SettingsIcon.js +4 -3
- package/dist/components/Icon/TickAltIcon.d.ts +1 -1
- package/dist/components/Icon/TickAltIcon.js +4 -3
- package/dist/components/Icon/TickIcon.d.ts +1 -1
- package/dist/components/Icon/TickIcon.js +4 -3
- package/dist/components/Icon/VanIcon.d.ts +1 -1
- package/dist/components/Icon/VanIcon.js +4 -3
- package/dist/components/Icon/WarningIcon.d.ts +1 -1
- package/dist/components/Icon/WarningIcon.js +4 -3
- package/dist/components/Icon/WriteIcon.d.ts +1 -1
- package/dist/components/Icon/WriteIcon.js +4 -3
- package/dist/components/Image/Image.d.ts +5 -5
- package/dist/components/Pill/Pill.d.ts +8 -8
- package/dist/components/Pill/Pill.js +1 -1
- package/dist/components/RootSVG/RootSVG.js +1 -1
- package/dist/components/SearchBox/SearchBox.d.ts +10 -10
- package/dist/components/SearchBox/SearchBox.js +2 -1
- package/dist/components/Signpost/Signpost.d.ts +6 -6
- package/dist/components/Signpost/Signpost.js +3 -2
- package/dist/components/SkipNav/SkipNav.d.ts +4 -6
- package/dist/components/SkipNav/SkipNav.js +3 -2
- package/dist/components/Squircle/Squircle.d.ts +4 -4
- package/dist/components/Squircle/Squircle.js +2 -1
- package/dist/components/Tag/Tag.d.ts +5 -5
- package/dist/components/Tag/Tag.js +1 -1
- package/package.json +3 -3
- package/src/components/AlertBanner/AlertBanner.tsx +7 -5
- package/src/components/Author/Author.tsx +8 -6
- package/src/components/Button/Button.tsx +13 -12
- package/src/components/Card/Card.tsx +17 -18
- package/src/components/Expandable/Expandable.tsx +12 -14
- package/src/components/Icon/AddIcon.tsx +6 -5
- package/src/components/Icon/ArrowDownIcon.tsx +6 -5
- package/src/components/Icon/ArrowLeftIcon.tsx +6 -5
- package/src/components/Icon/ArrowRightIcon.tsx +6 -5
- package/src/components/Icon/ArrowUpIcon.tsx +6 -5
- package/src/components/Icon/AvatarAltIcon.tsx +7 -6
- package/src/components/Icon/AvatarIcon.tsx +6 -5
- package/src/components/Icon/BasketIcon.tsx +6 -5
- package/src/components/Icon/CalendarIcon.tsx +6 -5
- package/src/components/Icon/ChevronDownIcon.tsx +5 -4
- package/src/components/Icon/ChevronLeftIcon.tsx +5 -4
- package/src/components/Icon/ChevronRightIcon.tsx +5 -4
- package/src/components/Icon/ChevronUpIcon.tsx +5 -4
- package/src/components/Icon/ClockIcon.tsx +6 -5
- package/src/components/Icon/CloseAltIcon.tsx +7 -6
- package/src/components/Icon/CloseIcon.tsx +6 -5
- package/src/components/Icon/CoopCardIcon.tsx +5 -4
- package/src/components/Icon/CoopIcon.tsx +5 -4
- package/src/components/Icon/CoopLocationIcon.tsx +7 -6
- package/src/components/Icon/DownloadIcon.tsx +10 -6
- package/src/components/Icon/HomeIcon.tsx +7 -6
- package/src/components/Icon/InformationIcon.tsx +6 -5
- package/src/components/Icon/LoadingIcon.tsx +5 -4
- package/src/components/Icon/LocationIcon.tsx +6 -5
- package/src/components/Icon/MailIcon.tsx +5 -4
- package/src/components/Icon/MenuIcon.tsx +5 -4
- package/src/components/Icon/MessageIcon.tsx +5 -4
- package/src/components/Icon/MinusIcon.tsx +5 -4
- package/src/components/Icon/OpenNewIcon.tsx +6 -5
- package/src/components/Icon/PencilIcon.tsx +5 -4
- package/src/components/Icon/PhoneIcon.tsx +5 -4
- package/src/components/Icon/QuestionIcon.tsx +6 -5
- package/src/components/Icon/ScooterIcon.tsx +7 -6
- package/src/components/Icon/SearchIcon.tsx +6 -5
- package/src/components/Icon/SettingsIcon.tsx +5 -4
- package/src/components/Icon/TickAltIcon.tsx +6 -5
- package/src/components/Icon/TickIcon.tsx +5 -4
- package/src/components/Icon/VanIcon.tsx +5 -4
- package/src/components/Icon/WarningIcon.tsx +6 -5
- package/src/components/Icon/WriteIcon.tsx +8 -7
- package/src/components/Image/Image.tsx +5 -5
- package/src/components/Pill/Pill.tsx +9 -9
- package/src/components/RootSVG/RootSVG.tsx +1 -1
- package/src/components/SearchBox/SearchBox.tsx +12 -11
- package/src/components/Signpost/Signpost.tsx +11 -11
- package/src/components/SkipNav/SkipNav.tsx +8 -8
- package/src/components/Squircle/Squircle.tsx +7 -5
- package/src/components/Tag/Tag.tsx +6 -6
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import type { HTMLAttributes, JSX, ReactNode } from "react"
|
|
2
2
|
|
|
3
|
+
import clsx from "clsx"
|
|
4
|
+
|
|
3
5
|
export interface AlertBannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
6
|
/** **(Optional)** Main content inside the banner. It can be any valid JSX or string. */
|
|
5
7
|
children?: string | ReactNode
|
|
6
|
-
/** **(Optional)**
|
|
8
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
7
9
|
className?: string
|
|
8
|
-
/**
|
|
10
|
+
/** Specify the main title of the banner, rendered as a `h2`. */
|
|
9
11
|
heading: string
|
|
10
|
-
/** **(Optional)** Specify
|
|
12
|
+
/** **(Optional)** Specify the AlertBanner variant. */
|
|
11
13
|
variant?: "black" | "default"
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export const AlertBanner = ({
|
|
15
17
|
children,
|
|
16
|
-
className
|
|
18
|
+
className,
|
|
17
19
|
heading,
|
|
18
20
|
variant = "default",
|
|
19
21
|
...props
|
|
20
22
|
}: AlertBannerProps): JSX.Element => {
|
|
21
23
|
const componentProps = {
|
|
22
|
-
className:
|
|
24
|
+
className: clsx("coop-alert-banner", className),
|
|
23
25
|
"data-variant": variant,
|
|
24
26
|
...props,
|
|
25
27
|
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import type { HTMLAttributes, JSX } from "react"
|
|
2
2
|
|
|
3
|
+
import clsx from "clsx"
|
|
4
|
+
|
|
3
5
|
import { Image, ImageProps } from "../Image"
|
|
4
6
|
|
|
5
7
|
export interface AuthorProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
/** **(Optional)** Specify the
|
|
8
|
+
/** **(Optional)** Specify the Author name. */
|
|
7
9
|
author?: string
|
|
8
|
-
/** **(Optional)**
|
|
10
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
9
11
|
className?: string
|
|
10
|
-
/** **(Optional)** Specify the date. Refer to Experience Library guidance on date formats. We advise using the following format (dd mmmm yyyy) eg: 1 January 2000.
|
|
12
|
+
/** **(Optional)** Specify the date. Refer to Experience Library guidance on date formats. We advise using the following format (dd mmmm yyyy) eg: 1 January 2000. */
|
|
11
13
|
date?: string
|
|
12
14
|
/** **(Optional)** Specify the text that will prefix the date, e.g. "Published". */
|
|
13
15
|
datePrefix?: string
|
|
14
|
-
/** **(Optional)** Specify
|
|
16
|
+
/** **(Optional)** Specify properties of the Author Image. */
|
|
15
17
|
image?: ImageProps
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export const Author = ({
|
|
19
21
|
author = "Co-op team",
|
|
20
|
-
className
|
|
22
|
+
className,
|
|
21
23
|
date,
|
|
22
24
|
datePrefix = "",
|
|
23
25
|
image = {
|
|
@@ -32,7 +34,7 @@ export const Author = ({
|
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
const componentProps = {
|
|
35
|
-
className:
|
|
37
|
+
className: clsx("coop-author", className),
|
|
36
38
|
...props,
|
|
37
39
|
}
|
|
38
40
|
return (
|
|
@@ -5,33 +5,34 @@ import type {
|
|
|
5
5
|
JSX,
|
|
6
6
|
} from "react"
|
|
7
7
|
|
|
8
|
+
import clsx from "clsx"
|
|
8
9
|
import React, { useCallback, useState } from "react"
|
|
9
10
|
|
|
10
11
|
import { LoadingIcon } from "../Icon"
|
|
11
12
|
|
|
12
13
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
|
-
/** **(Optional)**
|
|
14
|
+
/** **(Optional)** Specify a custom element to override default `a` or `button`. */
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
16
|
as?: React.FC<AnchorHTMLAttributes<HTMLElement>> | ForwardRefExoticComponent<any> | string
|
|
16
|
-
/** **(Optional)**
|
|
17
|
+
/** **(Optional)** Main content inside the component. It can be any valid JSX or string. */
|
|
17
18
|
children?: React.ReactNode
|
|
18
|
-
/** **(Optional)**
|
|
19
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
19
20
|
className?: string
|
|
20
|
-
/** **(Optional)**
|
|
21
|
+
/** **(Optional)** Specify the URL that the Button component will link to when clicked. */
|
|
21
22
|
href?: string
|
|
22
|
-
/** **(Optional)**
|
|
23
|
+
/** **(Optional)** Specify whether the Button should be disabled. This will not actually disable the button, just make it look disabled. Refer to Experience Library guidance on disabled buttons and accessibility. */
|
|
23
24
|
isDisabled?: boolean
|
|
24
|
-
/** **(Optional)**
|
|
25
|
+
/** **(Optional)** Specify whether the Button should be full width. Refer to Experience Library guidance on full width buttons. */
|
|
25
26
|
isFullWidth?: boolean
|
|
26
|
-
/** **(Optional)**
|
|
27
|
+
/** **(Optional)** Force the Button into a loading state. */
|
|
27
28
|
isLoading?: boolean
|
|
28
|
-
/** **(Optional)**
|
|
29
|
+
/** **(Optional)** Specify text to show when the Button is in a loading state. */
|
|
29
30
|
loadingText?: string
|
|
30
31
|
/** **(Optional)** Callback to run when the button is pressed. If this is an async function, it will be awaited and the button will be in a pending state until the promise is resolved. */
|
|
31
32
|
onClick?: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void
|
|
32
|
-
/** **(Optional)**
|
|
33
|
+
/** **(Optional)** Specify the Button size. */
|
|
33
34
|
size?: "sm" | "md" | "lg" | "xl"
|
|
34
|
-
/** **(Optional)**
|
|
35
|
+
/** **(Optional)** Specify the Button variant. */
|
|
35
36
|
variant?:
|
|
36
37
|
| "green"
|
|
37
38
|
| "blue"
|
|
@@ -51,7 +52,7 @@ type OnClickHandler =
|
|
|
51
52
|
export const Button = ({
|
|
52
53
|
as,
|
|
53
54
|
children,
|
|
54
|
-
className
|
|
55
|
+
className,
|
|
55
56
|
href,
|
|
56
57
|
isDisabled = false,
|
|
57
58
|
isFullWidth = false,
|
|
@@ -87,7 +88,7 @@ export const Button = ({
|
|
|
87
88
|
const componentProps = {
|
|
88
89
|
"aria-disabled": isDisabled ? true : undefined,
|
|
89
90
|
"aria-live": "assertive" as keyof ButtonHTMLAttributes<HTMLButtonElement>["aria-live"],
|
|
90
|
-
className:
|
|
91
|
+
className: clsx(variant == "text" ? "coop-link" : "coop-button", className),
|
|
91
92
|
"data-loading": isLoading || isPending ? true : undefined,
|
|
92
93
|
"data-size": size.length && size !== "md" ? size : undefined,
|
|
93
94
|
"data-variant": variant !== "text" ? variant : undefined,
|
|
@@ -5,40 +5,41 @@ import React from "react"
|
|
|
5
5
|
|
|
6
6
|
import { bgPropToClass } from "../../../src/utils"
|
|
7
7
|
import { Lights, Tints } from "../../types/colors"
|
|
8
|
+
import { ChevronRightIcon } from "../Icon"
|
|
8
9
|
import { Image, ImageProps } from "../Image"
|
|
9
10
|
|
|
10
11
|
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
12
|
//export interface CardProps {
|
|
12
|
-
/** **(Optional)**
|
|
13
|
+
/** **(Optional)** Specify a custom element to override default `a`. */
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
15
|
as?: React.FC<AnchorHTMLAttributes<HTMLElement>> | ForwardRefExoticComponent<any> | string
|
|
15
|
-
/** **(Optional)**
|
|
16
|
+
/** **(Optional)** Specify the Card background color. */
|
|
16
17
|
background?: Tints
|
|
17
|
-
/** **(Optional)**
|
|
18
|
+
/** **(Optional)** Specify text to display inside the badge. */
|
|
18
19
|
badge?: React.ReactNode
|
|
19
20
|
/** **(Optional)** Specify badge position relative to top right corner. */
|
|
20
21
|
badgePosition?: "inset" | "popout"
|
|
21
|
-
/** **(Optional)**
|
|
22
|
+
/** **(Optional)** Specify whether chevron is visible. */
|
|
22
23
|
chevron?: boolean
|
|
23
|
-
/** **(Optional)**
|
|
24
|
+
/** **(Optional)** Main content inside the component. It can be any valid JSX or string. */
|
|
24
25
|
children?: React.ReactNode
|
|
25
|
-
/** **(Optional)**
|
|
26
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
26
27
|
className?: string
|
|
27
|
-
/**
|
|
28
|
+
/** Specify the Card heading. */
|
|
28
29
|
heading: string
|
|
29
|
-
/** **(Optional)**
|
|
30
|
+
/** **(Optional)** Specify the level of the Card heading. */
|
|
30
31
|
headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6"
|
|
31
|
-
/** **(Optional)**
|
|
32
|
+
/** **(Optional)** Specify the URL that the Card component will link to when clicked. */
|
|
32
33
|
href?: string
|
|
33
|
-
/**
|
|
34
|
+
/** Specify properties of the Card Image. */
|
|
34
35
|
image: ImageProps
|
|
35
|
-
/** **(Optional)**
|
|
36
|
+
/** **(Optional)** Specify the position of the image in the Card. */
|
|
36
37
|
imagePosition?: "left" | "right"
|
|
37
|
-
/** **(Optional)**
|
|
38
|
+
/** **(Optional)** Specify the Card label. */
|
|
38
39
|
label?: string
|
|
39
|
-
/** **(Optional)**
|
|
40
|
+
/** **(Optional)** Specify the background color of the Card label. */
|
|
40
41
|
labelBackground?: Lights
|
|
41
|
-
/** **(Optional)**
|
|
42
|
+
/** **(Optional)** Specify the layout of the Card. */
|
|
42
43
|
layout?: "vertical" | "horizontal"
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -65,7 +66,7 @@ export const Card = ({
|
|
|
65
66
|
badgePosition = "inset",
|
|
66
67
|
chevron = false,
|
|
67
68
|
children,
|
|
68
|
-
className
|
|
69
|
+
className,
|
|
69
70
|
heading,
|
|
70
71
|
headingLevel = "h3",
|
|
71
72
|
href,
|
|
@@ -116,9 +117,7 @@ export const Card = ({
|
|
|
116
117
|
</div>
|
|
117
118
|
{chevron && (
|
|
118
119
|
<span aria-hidden="true" className="coop-card--icon" role="presentation">
|
|
119
|
-
<
|
|
120
|
-
<path d="M2 28.1a1.6 1.6 0 0 1-1.2-2.7l11-10.9-11-11A1.6 1.6 0 1 1 3 1.5l12 12a1.6 1.6 0 0 1 0 2.2l-12 12c-.3.4-.7.5-1 .5z" />
|
|
121
|
-
</svg>
|
|
120
|
+
<ChevronRightIcon />
|
|
122
121
|
</span>
|
|
123
122
|
)}
|
|
124
123
|
</div>
|
|
@@ -4,22 +4,23 @@ import { clsx } from "clsx"
|
|
|
4
4
|
|
|
5
5
|
import { bgPropToClass } from "../../../src/utils"
|
|
6
6
|
import { None, Tints, White } from "../../types/colors"
|
|
7
|
+
import { ChevronDownIcon } from "../Icon"
|
|
7
8
|
|
|
8
9
|
export interface ExpandableProps extends DetailsHTMLAttributes<HTMLDetailsElement> {
|
|
9
|
-
/** **(Optional)**
|
|
10
|
+
/** **(Optional)** Specify the Expandable background color. */
|
|
10
11
|
background?: Tints | White | None
|
|
11
|
-
/**
|
|
12
|
+
/** Main content inside the component, only visible when it is open. It can be any valid JSX or string. */
|
|
12
13
|
children: React.ReactNode
|
|
13
|
-
/** **(Optional)**
|
|
14
|
+
/** **(Optional)** Specify additional CSS classes to be applied to the component. */
|
|
14
15
|
className?: string
|
|
15
|
-
/**
|
|
16
|
+
/** Specify the summary text to show when the Expandable is not open. */
|
|
16
17
|
summary: React.ReactNode
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export const Expandable = ({
|
|
20
21
|
background = "tint-grey",
|
|
21
22
|
children,
|
|
22
|
-
className
|
|
23
|
+
className,
|
|
23
24
|
summary,
|
|
24
25
|
...props
|
|
25
26
|
}: ExpandableProps): JSX.Element => {
|
|
@@ -31,15 +32,12 @@ export const Expandable = ({
|
|
|
31
32
|
<details {...componentProps} style={{ "--background-color": `var(--color-${background})` }}>
|
|
32
33
|
<summary>
|
|
33
34
|
{summary}
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
strokeWidth="1.5"
|
|
41
|
-
/>
|
|
42
|
-
</svg>
|
|
35
|
+
<ChevronDownIcon
|
|
36
|
+
className="coop-expandable--icon"
|
|
37
|
+
stroke="currentColor"
|
|
38
|
+
strokeWidth={2}
|
|
39
|
+
width="12"
|
|
40
|
+
/>
|
|
43
41
|
</summary>
|
|
44
42
|
<div className="coop-expandable--content">{children}</div>
|
|
45
43
|
</details>
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const AddIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const AddIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "add",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -20,11 +21,11 @@ export const AddIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
22
|
<path
|
|
22
23
|
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"
|
|
23
|
-
fill="currentColor"
|
|
24
|
+
fill={fill ?? "currentColor"}
|
|
24
25
|
/>
|
|
25
26
|
<path
|
|
26
27
|
d="M16.72 24.7a1 1 0 0 1-.72.3 1 1 0 0 1-1-1V8a1 1 0 0 1 2 0v16a1 1 0 0 1-.28.7"
|
|
27
|
-
fill="currentColor"
|
|
28
|
+
fill={fill ?? "currentColor"}
|
|
28
29
|
/>
|
|
29
30
|
</svg>
|
|
30
31
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const ArrowDownIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const ArrowDownIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "arrow-down",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -18,10 +19,10 @@ export const ArrowDownIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
18
19
|
return (
|
|
19
20
|
<svg {...componentProps}>
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
|
-
<path d="M15 28.66V3a1 1 0 0 1 2 0v25.66a1 1 0 0 1-2 0" fill="currentColor" />
|
|
22
|
+
<path d="M15 28.66V3a1 1 0 0 1 2 0v25.66a1 1 0 0 1-2 0" fill={fill ?? "currentColor"} />
|
|
22
23
|
<path
|
|
23
24
|
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"
|
|
24
|
-
fill="currentColor"
|
|
25
|
+
fill={fill ?? "currentColor"}
|
|
25
26
|
/>
|
|
26
27
|
</svg>
|
|
27
28
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const ArrowLeftIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const ArrowLeftIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "arrow-left",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -18,10 +19,10 @@ export const ArrowLeftIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
18
19
|
return (
|
|
19
20
|
<svg {...componentProps}>
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
|
-
<path d="M3.34 17H29a1 1 0 0 0 0-2H3.34a1 1 0 0 0 0 2" fill="currentColor" />
|
|
22
|
+
<path d="M3.34 17H29a1 1 0 0 0 0-2H3.34a1 1 0 0 0 0 2" fill={fill ?? "currentColor"} />
|
|
22
23
|
<path
|
|
23
24
|
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"
|
|
24
|
-
fill="currentColor"
|
|
25
|
+
fill={fill ?? "currentColor"}
|
|
25
26
|
/>
|
|
26
27
|
</svg>
|
|
27
28
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const ArrowRightIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const ArrowRightIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "arrow-right",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -18,10 +19,10 @@ export const ArrowRightIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
18
19
|
return (
|
|
19
20
|
<svg {...componentProps}>
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
|
-
<path d="M28.7 15H3a1 1 0 0 0 0 2h25.7a1 1 0 0 0 0-2" fill="currentColor" />
|
|
22
|
+
<path d="M28.7 15H3a1 1 0 0 0 0 2h25.7a1 1 0 0 0 0-2" fill={fill ?? "currentColor"} />
|
|
22
23
|
<path
|
|
23
24
|
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"
|
|
24
|
-
fill="currentColor"
|
|
25
|
+
fill={fill ?? "currentColor"}
|
|
25
26
|
/>
|
|
26
27
|
</svg>
|
|
27
28
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const ArrowUpIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const ArrowUpIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "arrow-up",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -18,10 +19,10 @@ export const ArrowUpIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
18
19
|
return (
|
|
19
20
|
<svg {...componentProps}>
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
|
-
<path d="M17 3.34V29a1 1 0 0 1-2 0V3.34a1 1 0 0 1 2 0" fill="currentColor" />
|
|
22
|
+
<path d="M17 3.34V29a1 1 0 0 1-2 0V3.34a1 1 0 0 1 2 0" fill={fill ?? "currentColor"} />
|
|
22
23
|
<path
|
|
23
24
|
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"
|
|
24
|
-
fill="currentColor"
|
|
25
|
+
fill={fill ?? "currentColor"}
|
|
25
26
|
/>
|
|
26
27
|
</svg>
|
|
27
28
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const AvatarAltIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const AvatarAltIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "avatar-alt",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -20,15 +21,15 @@ export const AvatarAltIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
22
|
<path
|
|
22
23
|
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"
|
|
23
|
-
fill="currentColor"
|
|
24
|
+
fill={fill ?? "currentColor"}
|
|
24
25
|
/>
|
|
25
26
|
<path
|
|
26
27
|
d="M16 8a5 5 0 1 1-5 5 5 5 0 0 1 5-5m0-2a7 7 0 1 0 7 7 7 7 0 0 0-7-7"
|
|
27
|
-
fill="currentColor"
|
|
28
|
+
fill={fill ?? "currentColor"}
|
|
28
29
|
/>
|
|
29
30
|
<path
|
|
30
31
|
d="M5.64 27.85a.7.7 0 0 1-.19 0 1 1 0 0 1-.79-1.17A10.7 10.7 0 0 1 15.16 18h1.68a10.7 10.7 0 0 1 10.5 8.67 1 1 0 0 1-.79 1.17 1 1 0 0 1-1.17-.84 8.72 8.72 0 0 0-8.54-7h-1.68a8.72 8.72 0 0 0-8.54 7 1 1 0 0 1-.98.85"
|
|
31
|
-
fill="currentColor"
|
|
32
|
+
fill={fill ?? "currentColor"}
|
|
32
33
|
/>
|
|
33
34
|
</svg>
|
|
34
35
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const AvatarIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const AvatarIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "avatar",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -20,11 +21,11 @@ export const AvatarIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
22
|
<path
|
|
22
23
|
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"
|
|
23
|
-
fill="currentColor"
|
|
24
|
+
fill={fill ?? "currentColor"}
|
|
24
25
|
/>
|
|
25
26
|
<path
|
|
26
27
|
d="M15.94 3.33a5.77 5.77 0 1 1-5.72 5.77 5.75 5.75 0 0 1 5.72-5.77m0-2.31a8.08 8.08 0 1 0 8 8.08 8 8 0 0 0-8-8.08"
|
|
27
|
-
fill="currentColor"
|
|
28
|
+
fill={fill ?? "currentColor"}
|
|
28
29
|
/>
|
|
29
30
|
</svg>
|
|
30
31
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const BasketIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const BasketIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "basket",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -20,11 +21,11 @@ export const BasketIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
22
|
<path
|
|
22
23
|
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"
|
|
23
|
-
fill="currentColor"
|
|
24
|
+
fill={fill ?? "currentColor"}
|
|
24
25
|
/>
|
|
25
26
|
<path
|
|
26
27
|
d="M31 10.7h-3.11l-8.25-8.4a1 1 0 0 0-1.41 0 1 1 0 0 0 0 1.44l6.83 7H6.85l6.8-6.93a1 1 0 0 0 0-1.44 1 1 0 0 0-1.42 0l-8.14 8.25a1 1 0 0 0 0 .08H1a1 1 0 0 0-1 1v5.1a1 1 0 0 0 1 1h1.23l1.88 11.36a1 1 0 0 0 1 .84H27a1 1 0 0 0 1-.84l1.88-11.34H31a1 1 0 0 0 1-1v-5.1a1 1 0 0 0-1-1.02M26.15 28H5.94L4.28 18h23.53ZM30 15.79H2v-3.06h28Z"
|
|
27
|
-
fill="currentColor"
|
|
28
|
+
fill={fill ?? "currentColor"}
|
|
28
29
|
/>
|
|
29
30
|
</svg>
|
|
30
31
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const CalendarIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const CalendarIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "calendar",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -20,11 +21,11 @@ export const CalendarIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
22
|
<path
|
|
22
23
|
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"
|
|
23
|
-
fill="currentColor"
|
|
24
|
+
fill={fill ?? "currentColor"}
|
|
24
25
|
/>
|
|
25
26
|
<path
|
|
26
27
|
d="M6 23v2a1 1 0 0 0 2 0v-1h7v1a1 1 0 0 0 2 0v-1h7v1a1 1 0 0 0 2 0V15a1 1 0 0 0-2 0v1h-7v-1a1 1 0 0 0-2 0v1H8v-1a1 1 0 0 0-2 0v8m18-1h-7v-4h7Zm-9-4v4H8v-4Z"
|
|
27
|
-
fill="currentColor"
|
|
28
|
+
fill={fill ?? "currentColor"}
|
|
28
29
|
/>
|
|
29
30
|
</svg>
|
|
30
31
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const ChevronDownIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const ChevronDownIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "chevron-down",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -20,7 +21,7 @@ export const ChevronDownIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
22
|
<path
|
|
22
23
|
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"
|
|
23
|
-
fill="currentColor"
|
|
24
|
+
fill={fill ?? "currentColor"}
|
|
24
25
|
/>
|
|
25
26
|
</svg>
|
|
26
27
|
)
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import { type SVGProps, useId } from "react"
|
|
2
3
|
|
|
3
4
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
5
|
alt?: string
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
export const ChevronLeftIcon = ({ alt, className, ...props }: IconProps) => {
|
|
8
|
+
export const ChevronLeftIcon = ({ alt, className, fill, ...props }: IconProps) => {
|
|
8
9
|
const id = useId()
|
|
9
10
|
const componentProps = {
|
|
10
11
|
"aria-labelledby": alt ? id : undefined,
|
|
11
|
-
className:
|
|
12
|
+
className: clsx("coop-icon", className),
|
|
12
13
|
"data-icon": "chevron-left",
|
|
13
|
-
fill: "none",
|
|
14
|
+
fill: fill ?? "none",
|
|
14
15
|
role: alt ? "img" : undefined,
|
|
15
16
|
viewBox: "0 0 32 32",
|
|
16
17
|
...props,
|
|
@@ -20,7 +21,7 @@ export const ChevronLeftIcon = ({ alt, className, ...props }: IconProps) => {
|
|
|
20
21
|
{alt ? <title id={id}>{alt}</title> : null}
|
|
21
22
|
<path
|
|
22
23
|
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"
|
|
23
|
-
fill="currentColor"
|
|
24
|
+
fill={fill ?? "currentColor"}
|
|
24
25
|
/>
|
|
25
26
|
</svg>
|
|
26
27
|
)
|