@phillips/seldon 1.244.0 → 1.246.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.
Files changed (28) hide show
  1. package/dist/components/Accordion/Accordion.stories.d.ts +0 -1
  2. package/dist/components/Accordion/AccordionItem.d.ts +0 -5
  3. package/dist/components/Accordion/AccordionItem.js +66 -94
  4. package/dist/components/Accordion/index.d.ts +1 -1
  5. package/dist/components/Accordion/types.d.ts +0 -12
  6. package/dist/components/Accordion/types.js +1 -2
  7. package/dist/components/Accordion/utils.d.ts +2 -3
  8. package/dist/components/Accordion/utils.js +7 -9
  9. package/dist/index.js +222 -223
  10. package/dist/providers/SeldonProvider/utils.d.ts +1 -1
  11. package/dist/scss/_utils.scss +0 -19
  12. package/dist/scss/_vars.scss +1 -27
  13. package/dist/scss/_vars.scss.js +1 -27
  14. package/dist/scss/componentStyles.scss +1 -118
  15. package/dist/scss/components/Accordion/_accordion.scss +0 -26
  16. package/dist/scss/components/Breadcrumb/_breadcrumb.scss +0 -7
  17. package/dist/scss/components/PageContentWrapper/_pageContentWrapper.scss +0 -4
  18. package/dist/scss/components/Select/_select.scss +0 -10
  19. package/dist/scss/components/Tags/_tags.scss +0 -8
  20. package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +0 -4
  21. package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +0 -4
  22. package/dist/scss/patterns/FiltersInline/_filtersInline.scss +0 -4
  23. package/dist/scss/patterns/PhoneNumberInput/_phoneNumberInput.scss +1 -1
  24. package/dist/scss/patterns/SaleCard/_saleCard.scss +0 -4
  25. package/dist/scss/site-furniture/Header/_header.scss +0 -4
  26. package/dist/utils/constants.d.ts +0 -1
  27. package/dist/utils/constants.js +0 -1
  28. package/package.json +1 -1
@@ -15,7 +15,6 @@ declare const meta: {
15
15
  };
16
16
  export default meta;
17
17
  export declare const Default: ({ transitionTimeInMs, ...props }: AccordionProps & AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
18
- export declare const AccordionSmall: ({ transitionTimeInMs, ...props }: AccordionProps & AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
19
18
  export declare const AccordionSubmenu: ({ transitionTimeInMs, ...props }: AccordionProps & AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
20
19
  export declare const ControlledAccordion: ({ items, ...props }: AccordionProps & {
21
20
  items: AccordionItemProps[];
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
- import { AccordionItemVariant } from './types';
3
2
  export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
4
3
  /**
5
4
  * When true, prevents border bottom style from being applied to the item.
@@ -9,10 +8,6 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
9
8
  * When true, prevents the user from interacting with the item.
10
9
  */
11
10
  isLocked?: boolean;
12
- /**
13
- * Determines whether the variant on text style is large or small.
14
- */
15
- variant?: AccordionItemVariant;
16
11
  /**
17
12
  * Uniqueid for the Accordion Item.
18
13
  */
@@ -1,140 +1,112 @@
1
- import { jsxs as N, jsx as t } from "react/jsx-runtime";
2
- import { Item as A, Trigger as _, Content as k } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
3
- import C from "../../_virtual/index.js";
4
- import { forwardRef as v, useRef as w, useCallback as y } from "react";
5
- import I from "../Icon/Icon.js";
6
- import { getCommonProps as T, px as R } from "../../utils/index.js";
7
- import { AccordionItemVariant as d } from "./types.js";
8
- import { getIconClasses as $ } from "./utils.js";
9
- import { TextVariants as h } from "../Text/types.js";
10
- import x from "../Text/Text.js";
11
- const S = ({
12
- children: e,
13
- className: n,
14
- baseClassName: o,
15
- disable: r,
16
- id: c,
17
- variant: i = d.md,
18
- onOpen: l,
19
- onClose: m
20
- }) => {
21
- const u = w(null), s = r, p = i === d.md ? h.labelMedium : h.labelSmall, f = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
22
- I,
1
+ import { jsxs as b, jsx as t } from "react/jsx-runtime";
2
+ import { Item as C, Trigger as N, Content as x } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
3
+ import $ from "../../_virtual/index.js";
4
+ import { forwardRef as _, useRef as A, useCallback as k } from "react";
5
+ import f from "../Icon/Icon.js";
6
+ import { getCommonProps as w, px as T } from "../../utils/index.js";
7
+ import { getIconClasses as g } from "./utils.js";
8
+ import { TextVariants as I } from "../Text/types.js";
9
+ import v from "../Text/Text.js";
10
+ const y = ({ children: e, className: o, baseClassName: n, disable: a, id: i, onOpen: s, onClose: d }) => {
11
+ const l = A(null), r = a, m = I.labelMedium, u = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
12
+ f,
23
13
  {
24
14
  icon: "Lock",
25
15
  height: 24,
26
16
  width: 24,
27
- className: $(o, i, "lock"),
28
- "data-testid": `${c}-lockedIcon`,
17
+ className: g(n, "lock"),
18
+ "data-testid": `${i}-lockedIcon`,
29
19
  "aria-hidden": !0
30
20
  }
31
- ) }), g = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
32
- I,
21
+ ) }), h = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
22
+ f,
33
23
  {
34
24
  icon: "Add",
35
25
  height: 24,
36
26
  width: 24,
37
- className: $(o, i, "plus"),
38
- "data-testid": `${c}-plusIcon`,
27
+ className: g(n, "plus"),
28
+ "data-testid": `${i}-plusIcon`,
39
29
  "aria-hidden": !0
40
30
  }
41
- ) }), b = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
42
- I,
31
+ ) }), p = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
32
+ f,
43
33
  {
44
34
  icon: "Subtract",
45
35
  height: 24,
46
36
  width: 24,
47
- className: $(o, i, "minus"),
48
- "data-testid": `${c}-minusIcon`,
37
+ className: g(n, "minus"),
38
+ "data-testid": `${i}-minusIcon`,
49
39
  "aria-hidden": !0
50
40
  }
51
- ) }), a = y(() => {
52
- u.current?.getAttribute("data-state") === "closed" ? l?.() : m?.();
53
- }, [l, m]);
41
+ ) }), c = k(() => {
42
+ l.current?.getAttribute("data-state") === "closed" ? s?.() : d?.();
43
+ }, [s, d]);
54
44
  return /* @__PURE__ */ t(
55
- _,
45
+ N,
56
46
  {
57
- "data-disabled": r,
47
+ "data-disabled": a,
58
48
  asChild: !0,
59
- className: C(o, { [`${o}--hoverable`]: !r }, n),
60
- ref: u,
61
- onClick: a,
62
- children: /* @__PURE__ */ N("button", { type: "button", "data-testid": `${c}-trigger`, children: [
63
- /* @__PURE__ */ t(x, { className: `${R}-accordion-item-label__text`, variant: p, children: e }),
64
- s && f,
65
- !s && g,
66
- !s && b
49
+ className: $(n, { [`${n}--hoverable`]: !a }, o),
50
+ ref: l,
51
+ onClick: c,
52
+ children: /* @__PURE__ */ b("button", { type: "button", "data-testid": `${i}-trigger`, children: [
53
+ /* @__PURE__ */ t(v, { className: `${T}-accordion-item-label__text`, variant: m, children: e }),
54
+ r && u,
55
+ !r && h,
56
+ !r && p
67
57
  ] })
68
58
  }
69
59
  );
70
- }, V = ({
71
- children: e,
72
- baseClassName: n,
73
- disable: o,
74
- hasTransition: r,
75
- className: c,
76
- variant: i = d.md
77
- }) => o && e ? /* @__PURE__ */ t("div", { className: `${n}__content--locked`, children: e }) : /* @__PURE__ */ t(
78
- k,
60
+ }, R = ({ children: e, baseClassName: o, disable: n, hasTransition: a, className: i }) => n && e ? /* @__PURE__ */ t("div", { className: `${o}__content--locked`, children: e }) : /* @__PURE__ */ t(
61
+ x,
79
62
  {
80
63
  asChild: !0,
81
- className: C(
82
- `${n}__content`,
83
- { [`${n}--transition`]: r },
84
- c
64
+ className: $(
65
+ `${o}__content`,
66
+ { [`${o}--transition`]: a },
67
+ i
85
68
  ),
86
- children: /* @__PURE__ */ t(x, { variant: i === d.md ? h.bodyMedium : h.bodySmall, children: e })
69
+ children: /* @__PURE__ */ t(v, { variant: I.bodyMedium, children: e })
87
70
  }
88
- ), j = v(
71
+ ), j = _(
89
72
  ({
90
73
  isLocked: e = !1,
91
- variant: n = d.md,
92
74
  id: o,
93
- label: r,
94
- isLastItem: c,
75
+ label: n,
76
+ isLastItem: a,
95
77
  hasTransition: i = !1,
96
- children: l,
97
- className: m,
98
- transitionTimeInMs: u = 250,
99
- onOpen: s,
100
- onClose: p,
101
- ...f
102
- }, g) => {
103
- const { className: b } = T({ id: o }, "Accordion"), a = `${b}-item`;
104
- return /* @__PURE__ */ N(
105
- A,
78
+ children: s,
79
+ className: d,
80
+ transitionTimeInMs: l = 250,
81
+ onOpen: r,
82
+ onClose: m,
83
+ ...u
84
+ }, h) => {
85
+ const { className: p } = w({ id: o }, "Accordion"), c = `${p}-item`;
86
+ return /* @__PURE__ */ b(
87
+ C,
106
88
  {
107
89
  disabled: e,
108
90
  value: o,
109
- style: { "--seldon-accordion-transition-time": `${u}ms` },
110
- className: C(a, m, {
111
- [`${a}__border-bottom`]: !c
91
+ style: { "--seldon-accordion-transition-time": `${l}ms` },
92
+ className: $(c, d, {
93
+ [`${c}__border-bottom`]: !a
112
94
  }),
113
- ref: g,
114
- ...f,
95
+ ref: h,
96
+ ...u,
115
97
  children: [
116
98
  /* @__PURE__ */ t(
117
- S,
99
+ y,
118
100
  {
119
- variant: n,
120
101
  disable: e,
121
102
  id: o,
122
- baseClassName: `${a}-label`,
123
- onOpen: s,
124
- onClose: p,
125
- children: r
103
+ baseClassName: `${c}-label`,
104
+ onOpen: r,
105
+ onClose: m,
106
+ children: n
126
107
  }
127
108
  ),
128
- /* @__PURE__ */ t(
129
- V,
130
- {
131
- disable: e,
132
- hasTransition: i,
133
- variant: n,
134
- baseClassName: a,
135
- children: /* @__PURE__ */ t("div", { className: "radix-accordion-content", children: l })
136
- }
137
- )
109
+ /* @__PURE__ */ t(R, { disable: e, hasTransition: i, baseClassName: c, children: /* @__PURE__ */ t("div", { className: "radix-accordion-content", children: s }) })
138
110
  ]
139
111
  }
140
112
  );
@@ -1,3 +1,3 @@
1
1
  export { default as Accordion, type AccordionProps } from './Accordion';
2
2
  export { default as AccordionItem, type AccordionItemProps } from './AccordionItem';
3
- export { AccordionItemVariant, AccordionVariants } from './types';
3
+ export { AccordionVariants } from './types';
@@ -25,10 +25,6 @@ export interface AccordionHeaderType {
25
25
  * Callback function that is called when the header is closed.
26
26
  */
27
27
  onClose?: () => void;
28
- /**
29
- * Determines whether the variant on text style is large or small.
30
- */
31
- variant?: AccordionItemVariant;
32
28
  }
33
29
  export interface AccordionContentType {
34
30
  /**
@@ -48,10 +44,6 @@ export interface AccordionContentType {
48
44
  * When true applied the transition keyframe animation on item expand. Default as false.
49
45
  */
50
46
  hasTransition?: boolean;
51
- /**
52
- * Determines whether the variant on text style is larger or smaller.
53
- */
54
- variant?: AccordionItemVariant;
55
47
  }
56
48
  export declare enum AccordionVariants {
57
49
  multiple = "multiple",
@@ -70,7 +62,3 @@ export interface AccordionVariantProps {
70
62
  */
71
63
  collapsible?: boolean;
72
64
  }
73
- export declare enum AccordionItemVariant {
74
- md = "md",
75
- sm = "sm"
76
- }
@@ -1,5 +1,4 @@
1
- var e = /* @__PURE__ */ ((l) => (l.multiple = "multiple", l.singleCollapsible = "singleCollapsible", l.singleNonCollapsible = "singleNonCollapsible", l))(e || {}), s = /* @__PURE__ */ ((l) => (l.md = "md", l.sm = "sm", l))(s || {});
1
+ var e = /* @__PURE__ */ ((l) => (l.multiple = "multiple", l.singleCollapsible = "singleCollapsible", l.singleNonCollapsible = "singleNonCollapsible", l))(e || {});
2
2
  export {
3
- s as AccordionItemVariant,
4
3
  e as AccordionVariants
5
4
  };
@@ -1,4 +1,4 @@
1
- import { AccordionVariantKey, AccordionItemVariant } from './types';
1
+ import { AccordionVariantKey } from './types';
2
2
  import { AccordionMultipleProps, AccordionSingleProps } from '@radix-ui/react-accordion';
3
3
  /**
4
4
  * Sets the type and collapsible props based on the variant prop
@@ -8,8 +8,7 @@ export declare const getAccordionVariantProps: (variant?: AccordionVariantKey, v
8
8
  /**
9
9
  * A helper for getting the classes of the Accordion icons
10
10
  * @param className - The className of the component
11
- * @param variant - The size variant of the accordion item
12
11
  * @param iconName - The name of the icon to be displayed
13
12
  * @returns the classes that should be applied for the icon
14
13
  */
15
- export declare const getIconClasses: (className: string, variant: AccordionItemVariant | undefined, iconName: string) => string;
14
+ export declare const getIconClasses: (className: string, iconName: string) => string;
@@ -1,12 +1,10 @@
1
- import s from "../../_virtual/index.js";
2
- import { AccordionVariants as n, AccordionItemVariant as i } from "./types.js";
3
- const p = (o, e) => {
1
+ import l from "../../_virtual/index.js";
2
+ import { AccordionVariants as e } from "./types.js";
3
+ const t = (o, n) => {
4
4
  const r = { type: "multiple" };
5
- return (o === n.singleCollapsible || o === n.singleNonCollapsible) && Array.isArray(e) && console.error("The value prop should not be an array when using a single variant"), o === n.singleCollapsible ? { type: "single" } : o === n.singleNonCollapsible ? { type: "single" } : r;
6
- }, a = (o, e = i.md, r) => s(`${o}__icon`, `${o}-${r}__icon`, {
7
- [`${o}__icon--sm`]: e === i.sm
8
- });
5
+ return (o === e.singleCollapsible || o === e.singleNonCollapsible) && Array.isArray(n) && console.error("The value prop should not be an array when using a single variant"), o === e.singleCollapsible ? { type: "single" } : o === e.singleNonCollapsible ? { type: "single" } : r;
6
+ }, p = (o, n) => l(`${o}__icon`, `${o}-${n}__icon`);
9
7
  export {
10
- p as getAccordionVariantProps,
11
- a as getIconClasses
8
+ t as getAccordionVariantProps,
9
+ p as getIconClasses
12
10
  };