@coopdigital/react 1.7.3 → 1.8.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.
@@ -0,0 +1,17 @@
1
+ import type { SVGProps } from "react";
2
+ export interface LogoProps extends SVGProps<SVGSVGElement> {
3
+ /** **(Optional)** Specify the Logo alternative text. */
4
+ alt?: string;
5
+ /** **(Optional)** Specify additional CSS classes to be applied to the component. */
6
+ className?: string;
7
+ /** **(Optional)** Specify the Logo fill color.
8
+ *
9
+ * Default: brand-blue. */
10
+ fill?: "white" | "black" | "brand-blue";
11
+ /** **(Optional)** Specify the Logo height. */
12
+ height?: number;
13
+ /** **(Optional)** Specify the Logo width. */
14
+ width?: number;
15
+ }
16
+ export declare const Logo: ({ alt, className, fill, height, id, ref, width, ...props }: LogoProps) => import("react").JSX.Element;
17
+ export default Logo;
@@ -0,0 +1,4 @@
1
+ import Logo from "./Logo";
2
+ export default Logo;
3
+ export { Logo };
4
+ export * from "./Logo";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coopdigital/react",
3
3
  "type": "module",
4
- "version": "1.7.3",
4
+ "version": "1.8.0",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -100,11 +100,11 @@
100
100
  "storybook": "$storybook"
101
101
  },
102
102
  "dependencies": {
103
- "@coopdigital/styles": "^1.4.0",
103
+ "@coopdigital/styles": "^1.5.0",
104
104
  "@radix-ui/react-popover": "^1.1.17",
105
105
  "clsx": "^2.1.1",
106
106
  "merge-refs": "^2.0.0",
107
107
  "react-day-picker": "^10.0.1"
108
108
  },
109
- "gitHead": "3d1fc1ce73f079f93eeeb66292fb5d6534cdd27a"
109
+ "gitHead": "6a99f896553ea4541e8337bfa290d1838853a242"
110
110
  }
@@ -0,0 +1,49 @@
1
+ import type { SVGProps } from "react"
2
+
3
+ import clsx from "clsx"
4
+ export interface LogoProps extends SVGProps<SVGSVGElement> {
5
+ /** **(Optional)** Specify the Logo alternative text. */
6
+ alt?: string
7
+ /** **(Optional)** Specify additional CSS classes to be applied to the component. */
8
+ className?: string
9
+ /** **(Optional)** Specify the Logo fill color.
10
+ *
11
+ * Default: brand-blue. */
12
+ fill?: "white" | "black" | "brand-blue"
13
+ /** **(Optional)** Specify the Logo height. */
14
+ height?: number
15
+ /** **(Optional)** Specify the Logo width. */
16
+ width?: number
17
+ }
18
+
19
+ export const Logo = ({
20
+ alt = "Co-op",
21
+ className,
22
+ fill = "brand-blue",
23
+ height,
24
+ id,
25
+ ref,
26
+ width,
27
+ ...props
28
+ }: LogoProps) => {
29
+ const componentProps = {
30
+ alt,
31
+ className: clsx("coop-logo", className),
32
+ fill: fill === "brand-blue" ? undefined : `var(--color-${fill})`,
33
+ height,
34
+ id,
35
+ role: "img",
36
+ viewBox: "0 0 38 40",
37
+ width,
38
+ ...props,
39
+ }
40
+
41
+ return (
42
+ <svg {...componentProps} ref={ref}>
43
+ <title>{alt}</title>
44
+ <path d="M37.8 8.8c0-1.4-.2-2.8-.6-4.2-.5-1.7-1.8-3-3.4-3.7a14.9 14.9 0 0 0-10.2 0c-1.7.6-2.9 2-3.4 3.7-.8 2.8-.8 5.7 0 8.5.5 1.7 1.8 3 3.4 3.7 1.6.6 3.4.9 5.1.8 1.7 0 3.5-.3 5.1-.8 1.7-.6 2.9-2 3.4-3.7.4-1.5.6-2.9.6-4.3zm-5.5 0c0 .7-.1 1.4-.3 2-.3.9-1 1.6-2 1.8-.9.2-1.8.2-2.6 0-.9-.2-1.7-.8-2-1.8-.4-1.3-.4-2.8 0-4.1.3-.9 1-1.6 2-1.8.9-.2 1.8-.2 2.6 0 .9.2 1.7.8 2 1.8.2.7.3 1.4.3 2.1m-14.6 23c.8-2.8.8-5.7 0-8.5-.5-1.7-1.8-3-3.4-3.7a14.9 14.9 0 0 0-10.2 0c-1.7.6-2.9 2-3.4 3.7-.8 2.8-.8 5.7 0 8.5.5 1.7 1.8 3 3.4 3.7 3.3 1.2 6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