@coopdigital/react 1.19.0 → 1.20.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.js +5 -2
- package/dist/components/Author/Author.js +5 -2
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Card/Card.d.ts +96 -49
- package/dist/components/Card/Card.js +61 -60
- package/dist/components/Card/index.d.ts +2 -2
- package/dist/components/Card/index.js +2 -2
- package/dist/components/Checkbox/Checkbox.js +5 -2
- package/dist/components/DatePicker/DatePicker.js +5 -4
- package/dist/components/DatePicker/datepicker-utils.js +12 -11
- package/dist/components/Dialog/Dialog.js +6 -3
- package/dist/components/Expandable/Expandable.js +6 -3
- package/dist/components/Field/Field.js +1 -1
- package/dist/components/FieldMarkers/Error.js +5 -2
- package/dist/components/FieldMarkers/Hint.js +5 -2
- package/dist/components/FieldMarkers/Label.js +5 -2
- package/dist/components/Fieldset/Fieldset.js +10 -4
- package/dist/components/Flourish/Flourish.js +6 -3
- package/dist/components/Form/Form.js +5 -2
- package/dist/components/Image/Image.d.ts +3 -5
- package/dist/components/Image/Image.js +10 -7
- package/dist/components/LoadingSpinner/LoadingSpinner.js +5 -2
- package/dist/components/Logo/Logo.js +5 -2
- package/dist/components/Picture/Picture.d.ts +15 -0
- package/dist/components/Picture/Picture.js +17 -0
- package/dist/components/Picture/index.d.ts +2 -0
- package/dist/components/Picture/index.js +5 -0
- package/dist/components/Prose/Prose.js +5 -2
- package/dist/components/Radio/Radio.js +5 -2
- package/dist/components/Searchbox/Searchbox.js +6 -6
- package/dist/components/Select/Select.js +5 -2
- package/dist/components/Signpost/Signpost.js +6 -6
- package/dist/components/SkipNav/SkipNav.js +5 -2
- package/dist/components/Squircle/Squircle.js +5 -2
- package/dist/components/ValidationSummary/ValidationSummary.js +5 -2
- package/dist/components/icons/AccountCircleFilledIcon.js +5 -2
- package/dist/components/icons/AccountCircleIcon.js +5 -2
- package/dist/components/icons/AccountFilledIcon.js +5 -2
- package/dist/components/icons/AccountIcon.js +5 -2
- package/dist/components/icons/AddIcon.js +5 -2
- package/dist/components/icons/AppsFilledIcon.js +5 -2
- package/dist/components/icons/AppsIcon.js +5 -2
- package/dist/components/icons/ArrowDownIcon.js +5 -2
- package/dist/components/icons/ArrowLeftIcon.js +5 -2
- package/dist/components/icons/ArrowRightIcon.js +5 -2
- package/dist/components/icons/ArrowUpIcon.js +5 -2
- package/dist/components/icons/BackspaceFilledIcon.js +5 -2
- package/dist/components/icons/BackspaceIcon.js +5 -2
- package/dist/components/icons/BasketFilledIcon.js +5 -2
- package/dist/components/icons/BasketIcon.js +5 -2
- package/dist/components/icons/BellFilledIcon.js +5 -2
- package/dist/components/icons/BellIcon.js +5 -2
- package/dist/components/icons/BroomIcon.js +5 -2
- package/dist/components/icons/CalendarFilledIcon.js +5 -2
- package/dist/components/icons/CalendarIcon.js +5 -2
- package/dist/components/icons/CashFilledIcon.js +5 -2
- package/dist/components/icons/CashIcon.js +5 -2
- package/dist/components/icons/ChevronDownIcon.js +5 -2
- package/dist/components/icons/ChevronLeftIcon.js +5 -2
- package/dist/components/icons/ChevronRightIcon.js +5 -2
- package/dist/components/icons/ChevronUpIcon.js +5 -2
- package/dist/components/icons/CircleBurgerFilledIcon.js +5 -2
- package/dist/components/icons/CircleBurgerIcon.js +5 -2
- package/dist/components/icons/ClipboardFilledIcon.js +5 -2
- package/dist/components/icons/ClipboardIcon.js +5 -2
- package/dist/components/icons/ClockFilledIcon.js +5 -2
- package/dist/components/icons/ClockIcon.js +5 -2
- package/dist/components/icons/CloseAltFilledIcon.js +5 -2
- package/dist/components/icons/CloseAltIcon.js +5 -2
- package/dist/components/icons/CogIcon.js +5 -2
- package/dist/components/icons/CommunityFilledIcon.js +5 -2
- package/dist/components/icons/CommunityIcon.js +5 -2
- package/dist/components/icons/ComputerIcon.js +5 -2
- package/dist/components/icons/ContactFilledIcon.js +5 -2
- package/dist/components/icons/ContactIcon.js +5 -2
- package/dist/components/icons/ContactlessFilledIcon.js +5 -2
- package/dist/components/icons/ContactlessIcon.js +5 -2
- package/dist/components/icons/CoopLiveIcon.js +5 -2
- package/dist/components/icons/CoopLocationFilledIcon.js +5 -2
- package/dist/components/icons/CoopLogoIcon.js +5 -2
- package/dist/components/icons/CoopMembershipCardFilledIcon.js +5 -2
- package/dist/components/icons/CreditCardFilledIcon.js +5 -2
- package/dist/components/icons/CreditCardIcon.js +5 -2
- package/dist/components/icons/CrossIcon.js +5 -2
- package/dist/components/icons/DocumentIcon.js +5 -2
- package/dist/components/icons/DownloadIcon.js +5 -2
- package/dist/components/icons/EnterStoreIcon.js +5 -2
- package/dist/components/icons/ExitStoreIcon.js +5 -2
- package/dist/components/icons/EyeFilledIcon.js +5 -2
- package/dist/components/icons/EyeIcon.js +5 -2
- package/dist/components/icons/EyeStrikeFilledIcon.js +5 -2
- package/dist/components/icons/EyeStrikeIcon.js +5 -2
- package/dist/components/icons/FeedbackFilledIcon.js +5 -2
- package/dist/components/icons/FeedbackIcon.js +5 -2
- package/dist/components/icons/FilterIcon.js +5 -2
- package/dist/components/icons/GiftCardFilledIcon.js +5 -2
- package/dist/components/icons/GiftCardIcon.js +5 -2
- package/dist/components/icons/GiftFilledIcon.js +5 -2
- package/dist/components/icons/GiftIcon.js +5 -2
- package/dist/components/icons/HelpFilledIcon.js +5 -2
- package/dist/components/icons/HelpIcon.js +5 -2
- package/dist/components/icons/HomeFilledIcon.js +5 -2
- package/dist/components/icons/HomeIcon.js +5 -2
- package/dist/components/icons/HowDoIAssistantIcon.js +5 -2
- package/dist/components/icons/InfoIcon.js +5 -2
- package/dist/components/icons/KebabIcon.js +5 -2
- package/dist/components/icons/LoadingIcon.js +5 -2
- package/dist/components/icons/LocationFilledIcon.js +5 -2
- package/dist/components/icons/LocationIcon.js +5 -2
- package/dist/components/icons/LogoutIcon.js +5 -2
- package/dist/components/icons/MailIcon.js +5 -2
- package/dist/components/icons/MenuIcon.js +5 -2
- package/dist/components/icons/MessageIcon.js +5 -2
- package/dist/components/icons/MinusIcon.js +5 -2
- package/dist/components/icons/NotesFilledIcon.js +5 -2
- package/dist/components/icons/NotesIcon.js +5 -2
- package/dist/components/icons/OpenNewIcon.js +5 -2
- package/dist/components/icons/OwnBagIcon.js +5 -2
- package/dist/components/icons/PadlockIcon.js +5 -2
- package/dist/components/icons/PencilIcon.js +5 -2
- package/dist/components/icons/PhoneIcon.js +5 -2
- package/dist/components/icons/PowerIcon.js +5 -2
- package/dist/components/icons/SaveFilledIcon.js +5 -2
- package/dist/components/icons/SaveIcon.js +5 -2
- package/dist/components/icons/ScooterIcon.js +5 -2
- package/dist/components/icons/SearchFilledIcon.js +5 -2
- package/dist/components/icons/SearchIcon.js +5 -2
- package/dist/components/icons/SendIcon.js +5 -2
- package/dist/components/icons/SpannerIcon.js +5 -2
- package/dist/components/icons/StarFilledIcon.js +5 -2
- package/dist/components/icons/StarIcon.js +5 -2
- package/dist/components/icons/TickAltFilledIcon.js +5 -2
- package/dist/components/icons/TickAltIcon.js +5 -2
- package/dist/components/icons/TickIcon.js +5 -2
- package/dist/components/icons/TruckIcon.js +5 -2
- package/dist/components/icons/UserWipeIcon.js +5 -2
- package/dist/components/icons/VoucherFilledIcon.js +5 -2
- package/dist/components/icons/VoucherIcon.js +5 -2
- package/dist/components/icons/WarningCircleFilledIcon.js +5 -2
- package/dist/components/icons/WarningCircleIcon.js +5 -2
- package/dist/components/icons/WarningFilledIcon.js +5 -2
- package/dist/components/icons/WarningIcon.js +5 -2
- package/dist/components/icons/WifiIcon.js +5 -2
- package/dist/components/icons/WriteIcon.js +5 -2
- package/dist/hooks/useSlots.js +4 -3
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -2
- package/package.json +11 -10
- package/src/components/Author/Author.tsx +1 -1
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Card/Card.tsx +149 -105
- package/src/components/Checkbox/Checkbox.tsx +2 -2
- package/src/components/DatePicker/DatePicker.tsx +8 -6
- package/src/components/Dialog/Dialog.tsx +2 -2
- package/src/components/Expandable/Expandable.tsx +3 -3
- package/src/components/Field/Field.tsx +7 -6
- package/src/components/FieldMarkers/Label.tsx +1 -1
- package/src/components/Fieldset/Fieldset.tsx +4 -4
- package/src/components/Flourish/Flourish.tsx +1 -1
- package/src/components/Image/Image.tsx +15 -22
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +1 -1
- package/src/components/PasswordInput/PasswordInput.tsx +3 -3
- package/src/components/Picture/Picture.tsx +36 -0
- package/src/components/Picture/index.ts +5 -0
- package/src/components/Pill/Pill.tsx +3 -3
- package/src/components/Popover/Popover.tsx +2 -2
- package/src/components/Prose/Prose.tsx +1 -1
- package/src/components/Radio/Radio.tsx +2 -2
- package/src/components/Searchbox/Searchbox.context.tsx +1 -1
- package/src/components/Searchbox/Searchbox.tsx +9 -10
- package/src/components/Select/Select.tsx +2 -2
- package/src/components/Signpost/Signpost.tsx +3 -3
- package/src/components/Squircle/Squircle.tsx +2 -1
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/TextInput/TextInput.tsx +2 -2
- package/src/components/Textarea/Textarea.tsx +3 -3
- package/src/components/ValidationSummary/ValidationSummary.tsx +5 -2
- package/src/components/icons/AccountCircleFilledIcon.tsx +1 -1
- package/src/components/icons/AccountCircleIcon.tsx +1 -1
- package/src/components/icons/AccountFilledIcon.tsx +1 -1
- package/src/components/icons/AccountIcon.tsx +1 -1
- package/src/components/icons/AddIcon.tsx +1 -1
- package/src/components/icons/AppsFilledIcon.tsx +1 -1
- package/src/components/icons/AppsIcon.tsx +1 -1
- package/src/components/icons/ArrowDownIcon.tsx +1 -1
- package/src/components/icons/ArrowLeftIcon.tsx +1 -1
- package/src/components/icons/ArrowRightIcon.tsx +1 -1
- package/src/components/icons/ArrowUpIcon.tsx +1 -1
- package/src/components/icons/BackspaceFilledIcon.tsx +1 -1
- package/src/components/icons/BackspaceIcon.tsx +1 -1
- package/src/components/icons/BasketFilledIcon.tsx +1 -1
- package/src/components/icons/BasketIcon.tsx +1 -1
- package/src/components/icons/BellFilledIcon.tsx +1 -1
- package/src/components/icons/BellIcon.tsx +1 -1
- package/src/components/icons/BroomIcon.tsx +1 -1
- package/src/components/icons/CalendarFilledIcon.tsx +1 -1
- package/src/components/icons/CalendarIcon.tsx +1 -1
- package/src/components/icons/CashFilledIcon.tsx +1 -1
- package/src/components/icons/CashIcon.tsx +1 -1
- package/src/components/icons/ChevronDownIcon.tsx +1 -1
- package/src/components/icons/ChevronLeftIcon.tsx +1 -1
- package/src/components/icons/ChevronRightIcon.tsx +1 -1
- package/src/components/icons/ChevronUpIcon.tsx +1 -1
- package/src/components/icons/CircleBurgerFilledIcon.tsx +1 -1
- package/src/components/icons/CircleBurgerIcon.tsx +1 -1
- package/src/components/icons/ClipboardFilledIcon.tsx +1 -1
- package/src/components/icons/ClipboardIcon.tsx +1 -1
- package/src/components/icons/ClockFilledIcon.tsx +1 -1
- package/src/components/icons/ClockIcon.tsx +1 -1
- package/src/components/icons/CloseAltFilledIcon.tsx +1 -1
- package/src/components/icons/CloseAltIcon.tsx +1 -1
- package/src/components/icons/CogIcon.tsx +1 -1
- package/src/components/icons/CommunityFilledIcon.tsx +1 -1
- package/src/components/icons/CommunityIcon.tsx +1 -1
- package/src/components/icons/ComputerIcon.tsx +1 -1
- package/src/components/icons/ContactFilledIcon.tsx +1 -1
- package/src/components/icons/ContactIcon.tsx +1 -1
- package/src/components/icons/ContactlessFilledIcon.tsx +1 -1
- package/src/components/icons/ContactlessIcon.tsx +1 -1
- package/src/components/icons/CoopLiveIcon.tsx +1 -1
- package/src/components/icons/CoopLocationFilledIcon.tsx +1 -1
- package/src/components/icons/CoopLogoIcon.tsx +1 -1
- package/src/components/icons/CoopMembershipCardFilledIcon.tsx +1 -1
- package/src/components/icons/CreditCardFilledIcon.tsx +1 -1
- package/src/components/icons/CreditCardIcon.tsx +1 -1
- package/src/components/icons/CrossIcon.tsx +1 -1
- package/src/components/icons/DocumentIcon.tsx +1 -1
- package/src/components/icons/DownloadIcon.tsx +1 -1
- package/src/components/icons/EnterStoreIcon.tsx +1 -1
- package/src/components/icons/ExitStoreIcon.tsx +1 -1
- package/src/components/icons/EyeFilledIcon.tsx +1 -1
- package/src/components/icons/EyeIcon.tsx +1 -1
- package/src/components/icons/EyeStrikeFilledIcon.tsx +1 -1
- package/src/components/icons/EyeStrikeIcon.tsx +1 -1
- package/src/components/icons/FeedbackFilledIcon.tsx +1 -1
- package/src/components/icons/FeedbackIcon.tsx +1 -1
- package/src/components/icons/FilterIcon.tsx +1 -1
- package/src/components/icons/GiftCardFilledIcon.tsx +1 -1
- package/src/components/icons/GiftCardIcon.tsx +1 -1
- package/src/components/icons/GiftFilledIcon.tsx +1 -1
- package/src/components/icons/GiftIcon.tsx +1 -1
- package/src/components/icons/HelpFilledIcon.tsx +1 -1
- package/src/components/icons/HelpIcon.tsx +1 -1
- package/src/components/icons/HomeFilledIcon.tsx +1 -1
- package/src/components/icons/HomeIcon.tsx +1 -1
- package/src/components/icons/HowDoIAssistantIcon.tsx +1 -1
- package/src/components/icons/InfoIcon.tsx +1 -1
- package/src/components/icons/KebabIcon.tsx +1 -1
- package/src/components/icons/LoadingIcon.tsx +1 -1
- package/src/components/icons/LocationFilledIcon.tsx +1 -1
- package/src/components/icons/LocationIcon.tsx +1 -1
- package/src/components/icons/LogoutIcon.tsx +1 -1
- package/src/components/icons/MailIcon.tsx +1 -1
- package/src/components/icons/MenuIcon.tsx +1 -1
- package/src/components/icons/MessageIcon.tsx +1 -1
- package/src/components/icons/MinusIcon.tsx +1 -1
- package/src/components/icons/NotesFilledIcon.tsx +1 -1
- package/src/components/icons/NotesIcon.tsx +1 -1
- package/src/components/icons/OpenNewIcon.tsx +1 -1
- package/src/components/icons/OwnBagIcon.tsx +1 -1
- package/src/components/icons/PadlockIcon.tsx +1 -1
- package/src/components/icons/PencilIcon.tsx +1 -1
- package/src/components/icons/PhoneIcon.tsx +1 -1
- package/src/components/icons/PowerIcon.tsx +1 -1
- package/src/components/icons/SaveFilledIcon.tsx +1 -1
- package/src/components/icons/SaveIcon.tsx +1 -1
- package/src/components/icons/ScooterIcon.tsx +1 -1
- package/src/components/icons/SearchFilledIcon.tsx +1 -1
- package/src/components/icons/SearchIcon.tsx +1 -1
- package/src/components/icons/SendIcon.tsx +1 -1
- package/src/components/icons/SpannerIcon.tsx +1 -1
- package/src/components/icons/StarFilledIcon.tsx +1 -1
- package/src/components/icons/StarIcon.tsx +1 -1
- package/src/components/icons/TickAltFilledIcon.tsx +1 -1
- package/src/components/icons/TickAltIcon.tsx +1 -1
- package/src/components/icons/TickIcon.tsx +1 -1
- package/src/components/icons/TruckIcon.tsx +1 -1
- package/src/components/icons/UserWipeIcon.tsx +1 -1
- package/src/components/icons/VoucherFilledIcon.tsx +1 -1
- package/src/components/icons/VoucherIcon.tsx +1 -1
- package/src/components/icons/WarningCircleFilledIcon.tsx +1 -1
- package/src/components/icons/WarningCircleIcon.tsx +1 -1
- package/src/components/icons/WarningFilledIcon.tsx +1 -1
- package/src/components/icons/WarningIcon.tsx +1 -1
- package/src/components/icons/WifiIcon.tsx +1 -1
- package/src/components/icons/WriteIcon.tsx +1 -1
- package/src/hooks/useSlots.ts +1 -1
- package/src/index.ts +1 -0
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/VoucherFilledIcon.tsx
|
|
5
5
|
const VoucherFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "voucher-filled",
|
|
@@ -12,7 +12,10 @@ const VoucherFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
21
|
id: uid + "__title",
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/VoucherIcon.tsx
|
|
5
5
|
const VoucherIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "voucher",
|
|
@@ -12,7 +12,10 @@ const VoucherIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
21
|
id: uid + "__title",
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/WarningCircleFilledIcon.tsx
|
|
5
5
|
const WarningCircleFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "warning-circle-filled",
|
|
@@ -12,7 +12,10 @@ const WarningCircleFilledIcon = ({ alt, className, fill, id, ref, ...props }) =>
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
21
|
id: uid + "__title",
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/WarningCircleIcon.tsx
|
|
5
5
|
const WarningCircleIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "warning-circle",
|
|
@@ -12,7 +12,10 @@ const WarningCircleIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [
|
|
18
21
|
alt ? /* @__PURE__ */ jsx("title", {
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/WarningFilledIcon.tsx
|
|
5
5
|
const WarningFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "warning-filled",
|
|
@@ -12,7 +12,10 @@ const WarningFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
21
|
id: uid + "__title",
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/WarningIcon.tsx
|
|
5
5
|
const WarningIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "warning",
|
|
@@ -12,7 +12,10 @@ const WarningIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
21
|
id: uid + "__title",
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/WifiIcon.tsx
|
|
5
5
|
const WifiIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "wifi",
|
|
@@ -12,7 +12,10 @@ const WifiIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
21
|
id: uid + "__title",
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/components/icons/WriteIcon.tsx
|
|
5
5
|
const WriteIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
6
|
const uid = useId(id);
|
|
7
|
-
|
|
7
|
+
const componentProps = {
|
|
8
8
|
"aria-labelledby": alt ? uid + "__title" : void 0,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "write",
|
|
@@ -12,7 +12,10 @@ const WriteIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : void 0,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
|
-
...props
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
...componentProps,
|
|
16
19
|
ref,
|
|
17
20
|
children: [alt ? /* @__PURE__ */ jsx("title", {
|
|
18
21
|
id: uid + "__title",
|
package/dist/hooks/useSlots.js
CHANGED
|
@@ -31,9 +31,10 @@ function getSlotName(node) {
|
|
|
31
31
|
function useSlots(componentSlots, children, options) {
|
|
32
32
|
return React.Children.toArray(children).reduce((slots, child) => {
|
|
33
33
|
const slotName = getSlotName(child);
|
|
34
|
-
if (child && slotName && isKey(componentSlots, slotName))
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
if (child && slotName && isKey(componentSlots, slotName)) {
|
|
35
|
+
if (options?.collect?.includes(slotName)) slots[slotName] = slots[slotName] ? [...[slots[slotName]].flat(), child] : [child];
|
|
36
|
+
else slots[slotName] = child;
|
|
37
|
+
} else if ("Children" in slots) slots.Children = slots.Children ? [...[slots.Children].flat(), child] : [child];
|
|
37
38
|
return slots;
|
|
38
39
|
}, { ...componentSlots });
|
|
39
40
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { AlertBanner, AlertBannerHeading, AlertBannerProps } from "./components/
|
|
|
2
2
|
import { Image, ImageProps } from "./components/Image/Image.js";
|
|
3
3
|
import { Author, AuthorProps } from "./components/Author/Author.js";
|
|
4
4
|
import { Button, ButtonProps } from "./components/Button/Button.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Picture, PictureProps } from "./components/Picture/Picture.js";
|
|
6
|
+
import "./components/Picture/index.js";
|
|
7
|
+
import { Card, CardBadge, CardContent, CardHeading, CardIcon, CardImage, CardLink, CardPicture, CardProps } from "./components/Card/Card.js";
|
|
6
8
|
import { Checkbox, CheckboxProps } from "./components/Checkbox/Checkbox.js";
|
|
7
9
|
import { DatePicker, DatePickerProps } from "./components/DatePicker/DatePicker.js";
|
|
8
10
|
import { Dialog, DialogBody, DialogHeader, DialogProps } from "./components/Dialog/Dialog.js";
|
|
@@ -27,4 +29,4 @@ import { Squircle, SquircleProps } from "./components/Squircle/Squircle.js";
|
|
|
27
29
|
import { Tag, TagProps } from "./components/Tag/Tag.js";
|
|
28
30
|
import { Textarea, TextareaProps } from "./components/Textarea/Textarea.js";
|
|
29
31
|
import { ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt, ValidationSummaryProps } from "./components/ValidationSummary/ValidationSummary.js";
|
|
30
|
-
export { AlertBanner, AlertBannerHeading, AlertBannerProps, Author, AuthorProps, Button, ButtonProps, Card, CardBadge,
|
|
32
|
+
export { AlertBanner, AlertBannerHeading, AlertBannerProps, Author, AuthorProps, Button, ButtonProps, Card, CardBadge, CardContent, CardHeading, CardIcon, CardImage, CardLink, CardPicture, CardProps, Checkbox, CheckboxProps, DatePicker, DatePickerProps, Dialog, DialogBody, DialogHeader, DialogProps, Expandable, ExpandableContent, ExpandableProps, ExpandableSummary, Field, FieldError, FieldHint, FieldLabel, Fieldset, FieldsetError, FieldsetFields, FieldsetHint, FieldsetLegend, FieldsetProps, Flourish, FlourishProps, Form, FormProps, Image, ImageProps, LoadingSpinner, LoadingSpinnerProps, Logo, LogoProps, PasswordInput, PasswordInputProps, Picture, PictureProps, Pill, PillBadge, PillProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverProps, PopoverTrigger, Radio, RadioProps, RootSVG, Searchbox, SearchboxButton, SearchboxInput, SearchboxProps, Select, SelectOption, SelectOptionGroup, SelectProps, Signpost, SignpostProps, SkipNav, SkipNavProps, Squircle, SquircleProps, Tag, TagProps, TextInput, TextInputProps, Textarea, TextareaProps, ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt, ValidationSummaryProps };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,8 @@ import { Image } from "./components/Image/Image.js";
|
|
|
3
3
|
import { Author } from "./components/Author/Author.js";
|
|
4
4
|
import { LoadingSpinner } from "./components/LoadingSpinner/LoadingSpinner.js";
|
|
5
5
|
import { Button } from "./components/Button/Button.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Picture } from "./components/Picture/Picture.js";
|
|
7
|
+
import { Card, CardBadge, CardContent, CardHeading, CardIcon, CardImage, CardLink, CardPicture } from "./components/Card/Card.js";
|
|
7
8
|
import { Checkbox } from "./components/Checkbox/Checkbox.js";
|
|
8
9
|
import { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger } from "./components/Popover/Popover.js";
|
|
9
10
|
import { TextInput } from "./components/TextInput/TextInput.js";
|
|
@@ -27,4 +28,4 @@ import { Squircle } from "./components/Squircle/Squircle.js";
|
|
|
27
28
|
import { Tag } from "./components/Tag/Tag.js";
|
|
28
29
|
import { Textarea } from "./components/Textarea/Textarea.js";
|
|
29
30
|
import { ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt } from "./components/ValidationSummary/ValidationSummary.js";
|
|
30
|
-
export { AlertBanner, AlertBannerHeading, Author, Button, Card, CardBadge,
|
|
31
|
+
export { AlertBanner, AlertBannerHeading, Author, Button, Card, CardBadge, CardContent, CardHeading, CardIcon, CardImage, CardLink, CardPicture, Checkbox, DatePicker, Dialog, DialogBody, DialogHeader, Expandable, ExpandableContent, ExpandableSummary, Field, FieldError, FieldHint, FieldLabel, Fieldset, FieldsetError, FieldsetFields, FieldsetHint, FieldsetLegend, Flourish, Form, Image, LoadingSpinner, Logo, PasswordInput, Picture, Pill, PillBadge, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Radio, RootSVG, Searchbox, SearchboxButton, SearchboxInput, Select, SelectOption, SelectOptionGroup, Signpost, SkipNav, Squircle, Tag, TextInput, Textarea, ValidationSummary, ValidationSummaryErrors, ValidationSummaryHeading, ValidationSummaryPrompt };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coopdigital/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.20.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"test:e2e:ci": "npx playwright test --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL",
|
|
50
50
|
"build": "tsx scripts build",
|
|
51
51
|
"build:docs": "tsx scripts build-docs",
|
|
52
|
+
"build:docs:all": "tsx scripts build-docs --all",
|
|
52
53
|
"build:icons": "tsx scripts build-icons",
|
|
53
54
|
"build:manifest": "tsx scripts build-manifest",
|
|
54
55
|
"build:storybook": "storybook build --disable-telemetry",
|
|
@@ -65,20 +66,20 @@
|
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@axe-core/playwright": "^4.13.0",
|
|
67
68
|
"@playwright/test": "^1.62.1",
|
|
68
|
-
"@storybook/addon-a11y": "^10.5.
|
|
69
|
-
"@storybook/addon-docs": "^10.5.
|
|
70
|
-
"@storybook/addon-onboarding": "^10.5.
|
|
71
|
-
"@storybook/react-vite": "^10.5.
|
|
69
|
+
"@storybook/addon-a11y": "^10.5.10",
|
|
70
|
+
"@storybook/addon-docs": "^10.5.10",
|
|
71
|
+
"@storybook/addon-onboarding": "^10.5.10",
|
|
72
|
+
"@storybook/react-vite": "^10.5.10",
|
|
72
73
|
"@testing-library/jest-dom": "^7.0.1",
|
|
73
|
-
"@testing-library/react": "^16.3.
|
|
74
|
+
"@testing-library/react": "^16.3.3",
|
|
74
75
|
"@types/react": "^19.2.18",
|
|
75
|
-
"@types/react-dom": "^19.2.
|
|
76
|
+
"@types/react-dom": "^19.2.5",
|
|
76
77
|
"@whitespace/storybook-addon-html": "^9.0.0",
|
|
77
78
|
"react": "^19.2.8",
|
|
78
79
|
"react-dom": "^19.2.8",
|
|
79
80
|
"resize-observer-polyfill": "^1.5.1",
|
|
80
81
|
"serve": "^14.2.6",
|
|
81
|
-
"storybook": "^10.5.
|
|
82
|
+
"storybook": "^10.5.10",
|
|
82
83
|
"storybook-addon-tag-badges": "^3.1.0"
|
|
83
84
|
},
|
|
84
85
|
"peerDependencies": {
|
|
@@ -102,12 +103,12 @@
|
|
|
102
103
|
"storybook": "$storybook"
|
|
103
104
|
},
|
|
104
105
|
"dependencies": {
|
|
105
|
-
"@coopdigital/styles": "^1.
|
|
106
|
+
"@coopdigital/styles": "^1.14.0",
|
|
106
107
|
"@radix-ui/react-popover": "^1.1.23",
|
|
107
108
|
"clsx": "^2.1.1",
|
|
108
109
|
"date-fns": "^4.4.0",
|
|
109
110
|
"merge-refs": "^2.0.0",
|
|
110
111
|
"react-day-picker": "^10.0.1"
|
|
111
112
|
},
|
|
112
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "ed9a9d2eea7a2455ebcefd75bd1bc19994be87ee"
|
|
113
114
|
}
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes, JSX, Ref } from "react"
|
|
|
2
2
|
|
|
3
3
|
import clsx from "clsx"
|
|
4
4
|
|
|
5
|
-
import { Image, ImageProps } from "
|
|
5
|
+
import { Image, ImageProps } from "@/components/Image"
|
|
6
6
|
|
|
7
7
|
export interface AuthorProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
/** **(Optional)** Specify the Author name. */
|
|
@@ -5,8 +5,8 @@ import type { ButtonHTMLAttributes, ForwardRefExoticComponent, JSX, Ref } from "
|
|
|
5
5
|
import clsx from "clsx"
|
|
6
6
|
import React, { useCallback, useState } from "react"
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { LoadingSpinner } from "@/components/LoadingSpinner"
|
|
9
|
+
import { hasUserBg } from "@/utils"
|
|
10
10
|
|
|
11
11
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
12
|
/** **(Optional)** Specify a custom element to override default `a` or `button`. */
|