@coopdigital/react 0.19.3 → 0.19.5

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/README.md CHANGED
@@ -6,15 +6,11 @@
6
6
 
7
7
  # Experience Kit for React
8
8
 
9
- <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
10
- [all_contributors_badge]: https://img.shields.io/badge/all_contributors-17-C08A00.svg ''
11
- <!-- ALL-CONTRIBUTORS-BADGE:END -->
12
-
13
9
  <a href="https://www.npmjs.com/package/@coopdigital/react"><img src="https://img.shields.io/npm/v/%40coopdigital%2Freact?color=E85A00" alt="npm version" /></a>
14
10
  <img alt="NPM Last Update" src="https://img.shields.io/npm/last-update/%40coopdigital%2Freact?label=published&color=6762F9">
15
11
  <img alt="NPM Downloads" src="https://img.shields.io/npm/d18m/%40coopdigital%2Freact?color=819C00">
16
12
  <a href="https://static.coop.co.uk/experience-kit-storybook-react"><img src="https://img.shields.io/badge/storybook-react-F85792" alt="storybook" /></a>
17
- [![All Contributors][all_contributors_badge]](#contributors)
13
+
18
14
 
19
15
  > React components for the Experience Library design system.
20
16
 
@@ -43,115 +39,6 @@ Alternatively if your project uses SASS you can import the source stylesheets:
43
39
  @use "@coopdigital/styles/src/components/Pill.scss"
44
40
  ```
45
41
 
46
- ## Contributors ✨
47
-
48
- Thanks goes to these wonderful people:
49
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
50
- <!-- prettier-ignore-start -->
51
- <!-- markdownlint-disable -->
52
- <table>
53
- <tbody>
54
- <tr>
55
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/aaronrleslie">
56
- <div><img src="https://ca.slack-edge.com/T0C9E3ZF0-UKMP0F917-34a22da610d8-150" width="200px;" alt=""/></div>
57
- <small>Aaron Leslie</small>
58
- <div><a href="#infra-aaronrleslie" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></div>
59
- </a></td>
60
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/catia.costa1">
61
- <div><img src="https://gitlab.com/uploads/-/system/user/avatar/25728410/avatar.png" width="200px;" alt=""/></div>
62
- <small>Catia Costa</small>
63
- <div><a href="#a11y-catia.costa1" title="Accessibility">️️️️♿️</a> <a href="#code-catia.costa1" title="Code">💻</a> <a href="#doc-catia.costa1" title="Documentation">📖</a> <a href="#test-catia.costa1" title="Tests">⚠️</a></div>
64
- </a></td>
65
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/chris.latimer">
66
- <div><img src="https://gitlab.com/uploads/-/system/user/avatar/10570471/avatar.png" width="200px;" alt=""/></div>
67
- <small>Chris Latimer</small>
68
- <div><a href="#infra-chris.latimer" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#code-chris.latimer" title="Code">💻</a></div>
69
- </a></td>
70
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/craig.mckay">
71
- <div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
72
- <small>Craig Mckay</small>
73
- <div><a href="#projectManagement-craig.mckay" title="Project Management">📆</a></div>
74
- </a></td>
75
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/daniel.lippross">
76
- <div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
77
- <small>Daniel Lippross</small>
78
- <div><a href="#platform-daniel.lippross" title="Packaging/porting to new platform">📦</a></div>
79
- </a></td>
80
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/emalin.matthews">
81
- <div><img src="https://ca.slack-edge.com/T0C9E3ZF0-UMGDXU8JH-ade541a7f09e-150" width="200px;" alt=""/></div>
82
- <small>Emalin Matthews</small>
83
- <div><a href="#a11y-emalin.matthews" title="Accessibility">️️️️♿️</a> <a href="#code-emalin.matthews" title="Code">💻</a> <a href="#doc-emalin.matthews" title="Documentation">📖</a> <a href="#test-emalin.matthews" title="Tests">⚠️</a></div>
84
- </a></td>
85
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/jelena.milosevic">
86
- <div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
87
- <small>Jelena Milosevic</small>
88
- <div><a href="#infra-jelena.milosevic" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></div>
89
- </a></td>
90
- </tr><br />
91
- <tr>
92
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/kamini.pagare">
93
- <div><img src="https://gitlab.com/uploads/-/system/user/avatar/23337489/avatar.png" width="200px;" alt=""/></div>
94
- <small>Kamini Pagare</small>
95
- <div><a href="#a11y-kamini.pagare" title="Accessibility">️️️️♿️</a> <a href="#code-kamini.pagare" title="Code">💻</a> <a href="#doc-kamini.pagare" title="Documentation">📖</a> <a href="#test-kamini.pagare" title="Tests">⚠️</a></div>
96
- </a></td>
97
- <td align="center" valign="top" width="14.28%"><a href="">
98
- <div><img src="https://ca.slack-edge.com/T0C9E3ZF0-U3AJ40BGS-ec515dc443cb-150" width="200px;" alt=""/></div>
99
- <small>Lee Connolly</small>
100
- <div><a href="#projectManagement-lee.connolly" title="Project Management">📆</a></div>
101
- </a></td>
102
- <td align="center" valign="top" width="14.28%"><a href="">
103
- <div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
104
- <small>Liam Hall</small>
105
- <div><a href="#projectManagement-liam.hall" title="Project Management">📆</a></div>
106
- </a></td>
107
- <td align="center" valign="top" width="14.28%"><a href="">
108
- <div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/meg.jpg" width="200px;" alt=""/></div>
109
- <small>Meg White</small>
110
- <div><a href="#projectManagement-meg.white" title="Project Management">📆</a></div>
111
- </a></td>
112
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/omid.kashan">
113
- <div><img src="https://secure.gravatar.com/avatar/faf90b70d749cf9460eb603fa1700add94fd7d3a32645b4be6fa12eb45c4ffa3?s=80&d=identicon" width="200px;" alt=""/></div>
114
- <small>Omid Kashan</small>
115
- <div><a href="#a11y-omid.kashan" title="Accessibility">️️️️♿️</a> <a href="#code-omid.kashan" title="Code">💻</a> <a href="#doc-omid.kashan" title="Documentation">📖</a> <a href="#test-omid.kashan" title="Tests">⚠️</a></div>
116
- </a></td>
117
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/phil.wolstenholme">
118
- <div><img src="https://gitlab.com/uploads/-/system/user/avatar/25900363/avatar.png" width="200px;" alt=""/></div>
119
- <small>Phil Wolstenholme</small>
120
- <div><a href="#a11y-phil.wolstenholme" title="Accessibility">️️️️♿️</a></div>
121
- </a></td>
122
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/romain.chen">
123
- <div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
124
- <small>Romain Chen</small>
125
- <div><a href="#design-romain.chen" title="Design">🎨</a></div>
126
- </a></td>
127
- </tr><br />
128
- <tr>
129
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/sam.harden">
130
- <div><img src="https://ca.slack-edge.com/T0C9E3ZF0-U03NT7D39L6-2fc82e7f7c6e-150" width="200px;" alt=""/></div>
131
- <small>Sam Harden</small>
132
- <div><a href="#a11y-sam.harden" title="Accessibility">️️️️♿️</a> <a href="#code-sam.harden" title="Code">💻</a> <a href="#doc-sam.harden" title="Documentation">📖</a> <a href="#test-sam.harden" title="Tests">⚠️</a></div>
133
- </a></td>
134
- <td align="center" valign="top" width="14.28%"><a href="">
135
- <div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
136
- <small>Shweta Jaju</small>
137
- <div><a href="#userTesting-shweta.jaju" title="User Testing">📓</a></div>
138
- </a></td>
139
- <td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/theodore.kouzelis">
140
- <div><img src="https://secure.gravatar.com/avatar/3988f940029d9053174ac68e7f5bfa8fd61f184872d46281f44e2e698711d37d?s=80&d=identicon" width="200px;" alt=""/></div>
141
- <small>Theo Kouzelis</small>
142
- <div><a href="#a11y-theodore.kouzelis" title="Accessibility">️️️️♿️</a> <a href="#code-theodore.kouzelis" title="Code">💻</a> <a href="#doc-theodore.kouzelis" title="Documentation">📖</a> <a href="#test-theodore.kouzelis" title="Tests">⚠️</a></div>
143
- </a></td>
144
- </tr>
145
- </tbody></table>
146
-
147
-
148
- <!-- markdownlint-restore -->
149
- <!-- prettier-ignore-end -->
150
-
151
- <!-- ALL-CONTRIBUTORS-LIST:END -->
152
-
153
- This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
154
-
155
42
  ## License
156
43
 
157
44
  MIT License
@@ -1,6 +1,6 @@
1
1
  import type { AnchorHTMLAttributes, ForwardRefExoticComponent, HTMLAttributes, JSX } from "react";
2
2
  import React from "react";
3
- import { Darks, OffersRed, Tints } from "../../types/colors";
3
+ import { Darks, OfferRed, Tints } from "../../types/colors";
4
4
  export interface PillProps extends HTMLAttributes<HTMLAnchorElement> {
5
5
  /** **(Optional)** Specifies the custom element to override default `a` or `span`. */
6
6
  as?: React.FC<AnchorHTMLAttributes<HTMLElement>> | ForwardRefExoticComponent<any> | string;
@@ -9,7 +9,7 @@ export interface PillProps extends HTMLAttributes<HTMLAnchorElement> {
9
9
  /** **(Optional)** Specifies what text Pill should display on the badge. */
10
10
  badge?: string;
11
11
  /** **(Optional)** Specifies the badge background color from the available options. */
12
- badgeBackground?: Darks | OffersRed;
12
+ badgeBackground?: Darks | OfferRed;
13
13
  /** **(Optional)** Represents the content inside the Pill component. It can be any valid JSX or string. */
14
14
  children?: React.ReactNode;
15
15
  /** **(Optional)** Receives any className to be applied to Pill component. */
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  import { bgPropToClass } from '../../utils/index.js';
6
6
 
7
7
  const Pill = (_a) => {
8
- var { as, background = "tint-grey", badge, badgeBackground = "offers-red", children, className = "", href, size = "md" } = _a, props = __rest(_a, ["as", "background", "badge", "badgeBackground", "children", "className", "href", "size"]);
8
+ var { as, background = "tint-grey", badge, badgeBackground = "offer-red", children, className = "", href, size = "md" } = _a, props = __rest(_a, ["as", "background", "badge", "badgeBackground", "children", "className", "href", "size"]);
9
9
  let element = href ? "a" : "span";
10
10
  if (as) {
11
11
  element = as;
@@ -1,8 +1,8 @@
1
1
  import type { HTMLAttributes, JSX } from "react";
2
- import { CoopBlue, Green, OffersRed } from "../../types/colors";
2
+ import { BrandBlue, Green, OfferRed } from "../../types/colors";
3
3
  export interface SquircleProps extends HTMLAttributes<HTMLDivElement> {
4
4
  /** **(Optional)** Specifies the background color of the Squircle. */
5
- background?: OffersRed | CoopBlue | Green;
5
+ background?: OfferRed | BrandBlue | Green;
6
6
  /** **(Optional)** Represents the content inside the Squircle component. It can be any valid JSX or string. */
7
7
  children?: React.ReactNode;
8
8
  /** **(Optional)** Receives any className to be applied to Squircle component. */
@@ -3,7 +3,7 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { bgPropToClass } from '../../utils/index.js';
4
4
 
5
5
  const Squircle = (_a) => {
6
- var { background = "offers-red", children, className, size = "lg" } = _a, props = __rest(_a, ["background", "children", "className", "size"]);
6
+ var { background = "offer-red", children, className, size = "lg" } = _a, props = __rest(_a, ["background", "children", "className", "size"]);
7
7
  const componentProps = Object.assign({ className: `coop-squircle ${bgPropToClass(background, className)} ${className !== null && className !== void 0 ? className : ""}`, "data-size": size.length && size !== "lg" ? size : undefined }, props);
8
8
  return (jsx("figure", Object.assign({}, componentProps, { children: jsx("figcaption", { children: children }) })));
9
9
  };
@@ -5,7 +5,7 @@ export type Greys = "dark-grey" | "mid-dark-grey" | "mid-grey" | "mid-light-grey
5
5
  export type White = "white";
6
6
  export type Black = "black";
7
7
  export type None = "none";
8
- export type CoopBlue = "coop-blue";
9
- export type OffersRed = "offers-red";
8
+ export type BrandBlue = "brand-blue";
9
+ export type OfferRed = "offer-red";
10
10
  export type Green = "green";
11
11
  export type Blue = "blue";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coopdigital/react",
3
3
  "type": "module",
4
- "version": "0.19.3",
4
+ "version": "0.19.5",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -50,7 +50,7 @@
50
50
  "description": "",
51
51
  "devDependencies": {
52
52
  "@axe-core/playwright": "^4.10.1",
53
- "@coopdigital/styles": "^0.16.3",
53
+ "@coopdigital/styles": "^0.16.5",
54
54
  "@playwright/test": "^1.52.0",
55
55
  "@storybook/addon-a11y": "^8.6.12",
56
56
  "@storybook/addon-essentials": "^8.6.12",
@@ -75,5 +75,5 @@
75
75
  "dependencies": {
76
76
  "clsx": "^2.1.1"
77
77
  },
78
- "gitHead": "4b0b52bb134f10067e1c87b0ba9afab3504f5368"
78
+ "gitHead": "75fa676ceb3961f9de1052ebf2b80af2ab8a1663"
79
79
  }
@@ -4,7 +4,7 @@ import clsx from "clsx"
4
4
  import React from "react"
5
5
 
6
6
  import { bgPropToClass } from "../../../src/utils"
7
- import { Darks, OffersRed, Tints } from "../../types/colors"
7
+ import { Darks, OfferRed, Tints } from "../../types/colors"
8
8
 
9
9
  export interface PillProps extends HTMLAttributes<HTMLAnchorElement> {
10
10
  /** **(Optional)** Specifies the custom element to override default `a` or `span`. */
@@ -15,7 +15,7 @@ export interface PillProps extends HTMLAttributes<HTMLAnchorElement> {
15
15
  /** **(Optional)** Specifies what text Pill should display on the badge. */
16
16
  badge?: string
17
17
  /** **(Optional)** Specifies the badge background color from the available options. */
18
- badgeBackground?: Darks | OffersRed
18
+ badgeBackground?: Darks | OfferRed
19
19
  /** **(Optional)** Represents the content inside the Pill component. It can be any valid JSX or string. */
20
20
  children?: React.ReactNode
21
21
  /** **(Optional)** Receives any className to be applied to Pill component. */
@@ -30,7 +30,7 @@ export const Pill = ({
30
30
  as,
31
31
  background = "tint-grey",
32
32
  badge,
33
- badgeBackground = "offers-red",
33
+ badgeBackground = "offer-red",
34
34
  children,
35
35
  className = "",
36
36
  href,
@@ -1,11 +1,11 @@
1
1
  import type { HTMLAttributes, JSX } from "react"
2
2
 
3
3
  import { bgPropToClass } from "../../../src/utils"
4
- import { CoopBlue, Green, OffersRed } from "../../types/colors"
4
+ import { BrandBlue, Green, OfferRed } from "../../types/colors"
5
5
 
6
6
  export interface SquircleProps extends HTMLAttributes<HTMLDivElement> {
7
7
  /** **(Optional)** Specifies the background color of the Squircle. */
8
- background?: OffersRed | CoopBlue | Green
8
+ background?: OfferRed | BrandBlue | Green
9
9
  /** **(Optional)** Represents the content inside the Squircle component. It can be any valid JSX or string. */
10
10
  children?: React.ReactNode
11
11
  /** **(Optional)** Receives any className to be applied to Squircle component. */
@@ -15,7 +15,7 @@ export interface SquircleProps extends HTMLAttributes<HTMLDivElement> {
15
15
  }
16
16
 
17
17
  export const Squircle = ({
18
- background = "offers-red",
18
+ background = "offer-red",
19
19
  children,
20
20
  className,
21
21
  size = "lg",
@@ -35,7 +35,7 @@ export type Greys = "dark-grey" | "mid-dark-grey" | "mid-grey" | "mid-light-grey
35
35
  export type White = "white"
36
36
  export type Black = "black"
37
37
  export type None = "none"
38
- export type CoopBlue = "coop-blue"
39
- export type OffersRed = "offers-red"
38
+ export type BrandBlue = "brand-blue"
39
+ export type OfferRed = "offer-red"
40
40
  export type Green = "green"
41
41
  export type Blue = "blue"