@phillips/seldon 1.250.0 → 1.252.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/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/components/Card/Card.d.ts +41 -0
- package/dist/components/Card/Card.js +80 -0
- package/dist/components/Card/Card.stories.d.ts +63 -0
- package/dist/components/Card/Card.test.d.ts +1 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/types.d.ts +4 -0
- package/dist/components/Card/types.js +4 -0
- package/dist/components/Input/utils.js +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +240 -236
- package/dist/node_modules/ics/dist/schema/index.js +1 -1
- package/dist/node_modules/ics/dist/utils/index.js +1 -1
- package/dist/patterns/FiltersInline/SubFilterDropdown.js +42 -42
- package/dist/patterns/FiltersInline/utils.d.ts +1 -1
- package/dist/patterns/FiltersInline/utils.js +17 -17
- package/dist/patterns/SaleCard/SaleCard.d.ts +3 -3
- package/dist/patterns/SaleCard/SaleCard.js +41 -42
- package/dist/patterns/SaleCard/SaleCard.stories.d.ts +1 -1
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Card/_card.scss +113 -0
- package/dist/scss/components/SeldonImage/_seldonImage.scss +16 -4
- package/dist/scss/patterns/SaleCard/_saleCard.scss +3 -66
- package/package.json +1 -1
package/dist/_virtual/index12.js
CHANGED
package/dist/_virtual/index13.js
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { Link } from '../Link';
|
|
3
|
+
import { SeldonImage } from '../SeldonImage';
|
|
4
|
+
import { Video } from '../Video';
|
|
5
|
+
import { Text } from '../Text';
|
|
6
|
+
import { CardVariants } from './types';
|
|
7
|
+
export interface CardRootProps extends ComponentProps<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Root element for the card shell. Defaults to `div`.
|
|
10
|
+
*/
|
|
11
|
+
element?: ElementType;
|
|
12
|
+
/**
|
|
13
|
+
* Layout variant for the card.
|
|
14
|
+
*/
|
|
15
|
+
variant?: CardVariants;
|
|
16
|
+
}
|
|
17
|
+
export type CardProps = CardRootProps;
|
|
18
|
+
export type CardImageProps = Omit<ComponentProps<typeof SeldonImage>, 'className'>;
|
|
19
|
+
export type CardVideoProps = ComponentProps<typeof Video>;
|
|
20
|
+
export type CardContentProps = ComponentProps<'div'>;
|
|
21
|
+
export type CardEyebrowProps = Omit<ComponentProps<typeof Text>, 'variant'>;
|
|
22
|
+
export type CardTitleProps = Omit<ComponentProps<typeof Text>, 'variant'>;
|
|
23
|
+
export type CardDescriptionProps = Omit<ComponentProps<typeof Text>, 'variant'>;
|
|
24
|
+
export type CardBadgeProps = Omit<ComponentProps<typeof Text>, 'variant'>;
|
|
25
|
+
export type CardMetaProps = ComponentProps<'div'>;
|
|
26
|
+
export type CardMetaItemProps = Omit<ComponentProps<typeof Text>, 'variant'>;
|
|
27
|
+
export type CardCtaProps = ComponentProps<typeof Link>;
|
|
28
|
+
declare const Card: import('react').ForwardRefExoticComponent<Omit<CardRootProps, "ref"> & import('react').RefAttributes<HTMLElement>> & {
|
|
29
|
+
Root: import('react').ForwardRefExoticComponent<Omit<CardRootProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
30
|
+
Image: import('react').ForwardRefExoticComponent<Omit<CardImageProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
31
|
+
Video: import('react').ForwardRefExoticComponent<Omit<Omit<import('../Video').VideoProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
32
|
+
Content: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
33
|
+
Eyebrow: import('react').ForwardRefExoticComponent<Omit<CardEyebrowProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
34
|
+
Title: import('react').ForwardRefExoticComponent<Omit<CardTitleProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
35
|
+
Description: import('react').ForwardRefExoticComponent<Omit<CardDescriptionProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
36
|
+
Badge: import('react').ForwardRefExoticComponent<Omit<CardBadgeProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
37
|
+
Meta: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
38
|
+
MetaItem: import('react').ForwardRefExoticComponent<Omit<CardMetaItemProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
39
|
+
Cta: import('react').ForwardRefExoticComponent<Omit<Omit<import('../Link').LinkProps, "ref"> & import('react').RefAttributes<HTMLAnchorElement>, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
40
|
+
};
|
|
41
|
+
export default Card;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "../../_virtual/index.js";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { getCommonProps as w, px as o } from "../../utils/index.js";
|
|
5
|
+
import { LinkVariants as x } from "../Link/types.js";
|
|
6
|
+
import T from "../Link/Link.js";
|
|
7
|
+
import R from "../SeldonImage/SeldonImage.js";
|
|
8
|
+
import k from "../Video/Video.js";
|
|
9
|
+
import { TextVariants as i } from "../Text/types.js";
|
|
10
|
+
import l from "../Text/Text.js";
|
|
11
|
+
import { CardVariants as u } from "./types.js";
|
|
12
|
+
const c = s(
|
|
13
|
+
({ element: e = "div", className: r, id: a, variant: d = u.default, ...n }, S) => {
|
|
14
|
+
const { className: C, ...V } = w({ id: a, ...n }, "Card"), M = m(C, r, {
|
|
15
|
+
[`${C}--${d}`]: d
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ t(e, { className: M, id: a, ref: S, ...V, ...n });
|
|
18
|
+
}
|
|
19
|
+
), p = s(({ aspectRatio: e = "16/9", ...r }, a) => /* @__PURE__ */ t(R, { ...r, aspectRatio: e, className: `${o}-card__image`, ref: a })), N = s(({ aspectRatio: e = 16 / 9, className: r, ...a }, d) => /* @__PURE__ */ t(k, { ...a, ref: d, aspectRatio: e, className: m(`${o}-card__video`, r) })), _ = s(({ className: e, ...r }, a) => /* @__PURE__ */ t("div", { ...r, className: m(`${o}-card__details`, e), ref: a })), y = s(({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
20
|
+
l,
|
|
21
|
+
{
|
|
22
|
+
...r,
|
|
23
|
+
className: m(`${o}-card__eyebrow`, e),
|
|
24
|
+
ref: a,
|
|
25
|
+
variant: i.labelSmall
|
|
26
|
+
}
|
|
27
|
+
)), f = s(({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
28
|
+
l,
|
|
29
|
+
{
|
|
30
|
+
...r,
|
|
31
|
+
className: m(`${o}-card__title`, e),
|
|
32
|
+
ref: a,
|
|
33
|
+
variant: i.headingSmall
|
|
34
|
+
}
|
|
35
|
+
)), g = s(({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
36
|
+
l,
|
|
37
|
+
{
|
|
38
|
+
...r,
|
|
39
|
+
className: m(`${o}-card__description`, e),
|
|
40
|
+
ref: a,
|
|
41
|
+
variant: i.bodySmall
|
|
42
|
+
}
|
|
43
|
+
)), $ = s(({ className: e, ...r }, a) => /* @__PURE__ */ t(l, { ...r, className: m(`${o}-card__badge`, e), ref: a, variant: i.badgeSmall })), b = s(({ className: e, ...r }, a) => /* @__PURE__ */ t("div", { ...r, className: m(`${o}-card__meta`, e), ref: a })), v = s(({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
44
|
+
l,
|
|
45
|
+
{
|
|
46
|
+
...r,
|
|
47
|
+
className: m(`${o}-card__meta-item`, e),
|
|
48
|
+
ref: a,
|
|
49
|
+
variant: i.labelSmall
|
|
50
|
+
}
|
|
51
|
+
)), I = s(
|
|
52
|
+
({ className: e, variant: r = x.linkSmall, ...a }, d) => /* @__PURE__ */ t(T, { ...a, ref: d, className: m(`${o}-card__cta`, e), variant: r })
|
|
53
|
+
);
|
|
54
|
+
c.displayName = "Card.Root";
|
|
55
|
+
p.displayName = "Card.Image";
|
|
56
|
+
N.displayName = "Card.Video";
|
|
57
|
+
_.displayName = "Card.Content";
|
|
58
|
+
y.displayName = "Card.Eyebrow";
|
|
59
|
+
f.displayName = "Card.Title";
|
|
60
|
+
g.displayName = "Card.Description";
|
|
61
|
+
$.displayName = "Card.Badge";
|
|
62
|
+
b.displayName = "Card.Meta";
|
|
63
|
+
v.displayName = "Card.MetaItem";
|
|
64
|
+
I.displayName = "Card.Cta";
|
|
65
|
+
const F = Object.assign(c, {
|
|
66
|
+
Root: c,
|
|
67
|
+
Image: p,
|
|
68
|
+
Video: N,
|
|
69
|
+
Content: _,
|
|
70
|
+
Eyebrow: y,
|
|
71
|
+
Title: f,
|
|
72
|
+
Description: g,
|
|
73
|
+
Badge: $,
|
|
74
|
+
Meta: b,
|
|
75
|
+
MetaItem: v,
|
|
76
|
+
Cta: I
|
|
77
|
+
});
|
|
78
|
+
export {
|
|
79
|
+
F as default
|
|
80
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CardRootProps } from './Card';
|
|
2
|
+
import { CardVariants } from './types';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<Omit<CardRootProps, "ref"> & import('react').RefAttributes<HTMLElement>> & {
|
|
6
|
+
Root: import('react').ForwardRefExoticComponent<Omit<CardRootProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
7
|
+
Image: import('react').ForwardRefExoticComponent<Omit<import('./Card').CardImageProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Video: import('react').ForwardRefExoticComponent<Omit<Omit<import('../Video').VideoProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Content: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Eyebrow: import('react').ForwardRefExoticComponent<Omit<import('./Card').CardEyebrowProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
11
|
+
Title: import('react').ForwardRefExoticComponent<Omit<import('./Card').CardTitleProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
12
|
+
Description: import('react').ForwardRefExoticComponent<Omit<import('./Card').CardDescriptionProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
13
|
+
Badge: import('react').ForwardRefExoticComponent<Omit<import('./Card').CardBadgeProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
14
|
+
Meta: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
MetaItem: import('react').ForwardRefExoticComponent<Omit<import('./Card').CardMetaItemProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
16
|
+
Cta: import('react').ForwardRefExoticComponent<Omit<Omit<import('../Link').LinkProps, "ref"> & import('react').RefAttributes<HTMLAnchorElement>, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
export declare const Playground: {
|
|
21
|
+
(props: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
args: {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
argTypes: {
|
|
26
|
+
element: {
|
|
27
|
+
control: boolean;
|
|
28
|
+
};
|
|
29
|
+
variant: {
|
|
30
|
+
options: CardVariants[];
|
|
31
|
+
control: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const ArticleCard: {
|
|
38
|
+
(props: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
args: {
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const ArticleCardWithCta: {
|
|
44
|
+
(props: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
storyName: string;
|
|
46
|
+
args: {
|
|
47
|
+
id: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export declare const MediaCard: {
|
|
51
|
+
(props: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
args: {
|
|
53
|
+
id: string;
|
|
54
|
+
variant: CardVariants;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export declare const CardWithImagePlaceholder: {
|
|
58
|
+
(props: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
storyName: string;
|
|
60
|
+
args: {
|
|
61
|
+
id: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { default as Card, type CardBadgeProps, type CardContentProps, type CardCtaProps, type CardDescriptionProps, type CardEyebrowProps, type CardImageProps, type CardMetaItemProps, type CardMetaProps, type CardProps, type CardRootProps, type CardTitleProps, type CardVideoProps, } from './Card';
|
|
2
|
+
export { CardVariants } from './types';
|
|
@@ -3,6 +3,7 @@ import "react/jsx-runtime";
|
|
|
3
3
|
import "../../providers/SeldonProvider/utils.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
|
+
import "../Card/Card.js";
|
|
6
7
|
import "../IconButton/IconButton.js";
|
|
7
8
|
import "../Accordion/Accordion.js";
|
|
8
9
|
import "../Accordion/AccordionItem.js";
|
|
@@ -94,7 +95,7 @@ import "../../patterns/CountryPicker/CountryPicker.js";
|
|
|
94
95
|
import "../../patterns/ProgressWizard/ProgressWizard.js";
|
|
95
96
|
import "../../patterns/ProgressWizard/types.js";
|
|
96
97
|
import "../../patterns/PhoneNumberInput/PhoneNumberInput.js";
|
|
97
|
-
const
|
|
98
|
+
const Pp = () => ({
|
|
98
99
|
adornment: `${p}-input__wrapper__adornment`,
|
|
99
100
|
emptyValidation: `${p}-input__empty-validation`,
|
|
100
101
|
input: `${p}-input__input`,
|
|
@@ -106,5 +107,5 @@ const Op = () => ({
|
|
|
106
107
|
wrapperInput: `${p}-input__wrapper__input`
|
|
107
108
|
});
|
|
108
109
|
export {
|
|
109
|
-
|
|
110
|
+
Pp as getInputClassNames
|
|
110
111
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './utils/hooks';
|
|
|
5
5
|
export * from './types/commonTypes';
|
|
6
6
|
export { default as Button, type ButtonProps } from './components/Button/Button';
|
|
7
7
|
export { ButtonVariants, ButtonSizes } from './components/Button/types';
|
|
8
|
+
export * from './components/Card';
|
|
8
9
|
export { default as IconButton } from './components/IconButton/IconButton';
|
|
9
10
|
export * from './components/Accordion';
|
|
10
11
|
export { Breadcrumb, type BreadcrumbProps } from './components/Breadcrumb';
|