@phillips/seldon 1.171.1 → 1.172.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.
@@ -12,14 +12,33 @@ export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
12
12
  * The content of the drawer
13
13
  */
14
14
  children?: React.ReactNode;
15
+ /**
16
+ * A string to be displayed center at the top of the drawer, up with the close button.
17
+ * Its presence also triggers the horizontal rule below the header to be rendered.
18
+ */
19
+ headerText?: string;
20
+ /**
21
+ * Used as the accessibility label for the drawer, used for screen readers.
22
+ * Defaults to the headerText if that's provided, otherwise an empty string.
23
+ */
24
+ title?: string;
25
+ /**
26
+ * Used as the accessibility description for the drawer, used for screen readers.
27
+ * Defaults to the title if that's provided, otherwise an empty string.
28
+ */
29
+ description?: string;
15
30
  /**
16
31
  * Which side the drawer opens from: left, right, or bottom
17
32
  */
18
33
  drawerOpenSide?: 'left' | 'right' | 'bottom';
19
34
  /**
20
- * Optional label for the bottom content area
35
+ * Older designs for left/right drawers have more padding around the content.
36
+ * This value is in rem, and must be an integer under 3.
37
+ *
38
+ * Default is 2 if null or undefined, or 1 if headingText is supplied. This is silly
39
+ * but aligns with design and allows this prop to be left out most of the time.
21
40
  */
22
- bottomContentLabel?: string;
41
+ paddingLevel?: 0 | 1 | 2;
23
42
  }
24
43
  /**
25
44
  * ## Overview
@@ -27,5 +46,5 @@ export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
27
46
  * A component for displaying a drawer.
28
47
  *
29
48
  */
30
- declare const Drawer: ({ className, isOpen, onClose, children, drawerOpenSide, bottomContentLabel, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
49
+ declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
31
50
  export default Drawer;
@@ -1,80 +1,87 @@
1
- import { jsx as o, jsxs as e } from "react/jsx-runtime";
2
- import { Root as u, Portal as N, Overlay as v, Content as $, Title as x, Description as y, Close as n } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
3
- import a from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as g, noOp as w } from "../../utils/index.js";
5
- import { ButtonVariants as c } from "../Button/types.js";
6
- import m from "../Icon/Icon.js";
7
- import d from "../IconButton/IconButton.js";
8
- import k from "../Text/Text.js";
9
- import { TextVariants as B } from "../Text/types.js";
10
- const q = ({
11
- className: h,
12
- isOpen: p = !1,
13
- onClose: r = w,
14
- children: C,
15
- drawerOpenSide: i = "right",
16
- bottomContentLabel: f,
17
- ...l
18
- }) => {
19
- const { className: t, ..._ } = g(l, "Drawer"), s = i === "bottom";
20
- return /* @__PURE__ */ o(
21
- u,
22
- {
23
- open: p,
24
- onOpenChange: (b) => {
25
- b || r();
26
- },
27
- children: /* @__PURE__ */ e(N, { children: [
28
- /* @__PURE__ */ o(
29
- v,
30
- {
31
- onClick: r,
32
- className: a(`${t}__overlay`),
33
- "data-testid": "drawer-overlay"
34
- }
35
- ),
36
- /* @__PURE__ */ e(
37
- $,
38
- {
39
- className: a(t, h, { [`${t}--bottom`]: s }),
40
- "data-side": i,
41
- id: l.id,
42
- ..._,
43
- children: [
44
- /* @__PURE__ */ o(x, {}),
45
- /* @__PURE__ */ o(y, {}),
46
- s ? /* @__PURE__ */ e("div", { className: `${t}__bottom-content`, children: [
47
- /* @__PURE__ */ o(n, { asChild: !0, children: /* @__PURE__ */ o(
48
- d,
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import { forwardRef as y } from "react";
3
+ import s from "../../node_modules/classnames/index.js";
4
+ import { Root as $, Portal as w, Overlay as D, Content as b, Title as v, Description as B, Close as P } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
5
+ import { VisuallyHidden as n } from "../../node_modules/@radix-ui/react-visually-hidden/dist/index.js";
6
+ import { getCommonProps as j, noOp as k } from "../../utils/index.js";
7
+ import H from "./DrawerHeader.js";
8
+ import I from "../IconButton/IconButton.js";
9
+ import { ButtonVariants as R } from "../Button/types.js";
10
+ import V from "../Icon/Icon.js";
11
+ const g = y(
12
+ ({
13
+ isOpen: d,
14
+ onClose: t = k,
15
+ headerText: a,
16
+ title: m,
17
+ description: f = m,
18
+ drawerOpenSide: e = "right",
19
+ paddingLevel: i,
20
+ className: h,
21
+ children: p,
22
+ ...l
23
+ }, C) => {
24
+ const { className: o, ...u } = j(l, "Drawer"), N = e === "bottom";
25
+ return i ?? (i = a ? 1 : 2), /* @__PURE__ */ r(
26
+ $,
27
+ {
28
+ open: d,
29
+ onOpenChange: (_) => {
30
+ _ || t();
31
+ },
32
+ children: /* @__PURE__ */ c(w, { children: [
33
+ /* @__PURE__ */ r(D, { onClick: t, className: `${o}__overlay`, "data-testid": "drawer-overlay" }),
34
+ /* @__PURE__ */ c(
35
+ b,
36
+ {
37
+ className: s(o, h, {
38
+ [`${o}--bottom`]: N
39
+ }),
40
+ "data-side": e,
41
+ id: l.id,
42
+ ref: C,
43
+ ...u,
44
+ children: [
45
+ /* @__PURE__ */ r(n, { asChild: !0, children: /* @__PURE__ */ r(v, { children: m }) }),
46
+ /* @__PURE__ */ r(n, { asChild: !0, children: /* @__PURE__ */ r(B, { children: f }) }),
47
+ a ? /* @__PURE__ */ r(
48
+ H,
49
49
  {
50
- onClick: r,
51
- className: a(`${t}__close--bottom`),
50
+ baseClassName: o,
51
+ headerText: a,
52
+ onClose: t,
53
+ drawerOpenSide: e
54
+ }
55
+ ) : /* @__PURE__ */ r(P, { asChild: !0, children: /* @__PURE__ */ r(
56
+ I,
57
+ {
58
+ onClick: t,
59
+ className: s(`${o}__close`),
52
60
  "aria-label": "Close",
53
61
  "data-testid": "drawer-close",
54
- variant: c.tertiary,
55
- children: /* @__PURE__ */ o(m, { icon: "CloseX", color: "currentColor" })
62
+ variant: R.tertiary,
63
+ children: /* @__PURE__ */ r(V, { icon: "CloseX", color: "currentColor" })
56
64
  }
57
65
  ) }),
58
- /* @__PURE__ */ o(k, { variant: B.string1, className: `${t}__bottom-content--label`, children: f })
59
- ] }) : /* @__PURE__ */ o(n, { asChild: !0, children: /* @__PURE__ */ o(
60
- d,
61
- {
62
- onClick: r,
63
- className: a(`${t}__close`),
64
- "aria-label": "Close",
65
- "data-testid": "drawer-close",
66
- variant: c.tertiary,
67
- children: /* @__PURE__ */ o(m, { icon: "CloseX", color: "currentColor" })
68
- }
69
- ) }),
70
- C
71
- ]
72
- }
73
- )
74
- ] })
75
- }
76
- );
77
- };
66
+ /* @__PURE__ */ r(
67
+ "div",
68
+ {
69
+ className: s(
70
+ `${o}__content`,
71
+ i < 3 && `${o}__content--ep${i}`
72
+ ),
73
+ children: p
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ )
79
+ ] })
80
+ }
81
+ );
82
+ }
83
+ );
84
+ g.displayName = "Drawer";
78
85
  export {
79
- q as default
86
+ g as default
80
87
  };
@@ -1,7 +1,7 @@
1
1
  import { DrawerProps } from './Drawer';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ className, isOpen, onClose, children, drawerOpenSide, bottomContentLabel, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: import('react').ForwardRefExoticComponent<DrawerProps & import('react').RefAttributes<HTMLDivElement>>;
5
5
  };
6
6
  export default meta;
7
7
  export declare const Playground: {
@@ -9,6 +9,101 @@ export declare const Playground: {
9
9
  args: {
10
10
  children: string;
11
11
  isOpen: boolean;
12
+ headerText: string;
13
+ title: undefined;
14
+ drawerOpenSide: string;
15
+ paddingLevel: number;
16
+ };
17
+ argTypes: {
18
+ isOpen: {
19
+ control: string;
20
+ description: string;
21
+ defaultValue: boolean;
22
+ table: {
23
+ type: {
24
+ summary: string;
25
+ };
26
+ };
27
+ };
28
+ onClose: {
29
+ action: string;
30
+ description: string;
31
+ table: {
32
+ type: {
33
+ summary: string;
34
+ };
35
+ };
36
+ };
37
+ children: {
38
+ control: string;
39
+ description: string;
40
+ table: {
41
+ type: {
42
+ summary: string;
43
+ };
44
+ };
45
+ };
46
+ headerText: {
47
+ control: string;
48
+ description: string;
49
+ table: {
50
+ type: {
51
+ summary: string;
52
+ };
53
+ };
54
+ };
55
+ title: {
56
+ control: string;
57
+ description: string;
58
+ table: {
59
+ type: {
60
+ summary: string;
61
+ };
62
+ };
63
+ };
64
+ drawerOpenSide: {
65
+ control: {
66
+ type: string;
67
+ };
68
+ options: string[];
69
+ description: string;
70
+ defaultValue: string;
71
+ table: {
72
+ type: {
73
+ summary: string;
74
+ };
75
+ };
76
+ };
77
+ paddingLevel: {
78
+ control: {
79
+ type: string;
80
+ };
81
+ options: (number | undefined)[];
82
+ description: string;
83
+ defaultValue: undefined;
84
+ table: {
85
+ type: {
86
+ summary: string;
87
+ };
88
+ };
89
+ };
90
+ className: {
91
+ control: string;
92
+ description: string;
93
+ table: {
94
+ type: {
95
+ summary: string;
96
+ };
97
+ };
98
+ };
99
+ id: {
100
+ control: string;
101
+ description: string;
102
+ table: {
103
+ type: {
104
+ summary: string;
105
+ };
106
+ };
107
+ };
12
108
  };
13
- argTypes: {};
14
109
  };
@@ -0,0 +1,12 @@
1
+ import { ComponentProps } from 'react';
2
+ import { DrawerProps } from './Drawer';
3
+ type CommonProps = ComponentProps<'div'> & {
4
+ baseClassName: string;
5
+ drawerOpenSide: DrawerProps['drawerOpenSide'];
6
+ onClose: () => void;
7
+ };
8
+ export type DrawerHeaderProps = CommonProps & {
9
+ headerText?: string;
10
+ };
11
+ declare const DrawerHeader: import('react').ForwardRefExoticComponent<Omit<DrawerHeaderProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
12
+ export default DrawerHeader;
@@ -0,0 +1,34 @@
1
+ import { jsxs as i, Fragment as c, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ import { Close as d } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
4
+ import f from "../IconButton/IconButton.js";
5
+ import { ButtonVariants as h } from "../Button/types.js";
6
+ import b from "../Icon/Icon.js";
7
+ const n = ({ baseClassName: a, drawerOpenSide: t, onClose: l, bookendSide: e, ...s }) => {
8
+ const r = t === "bottom" && e === "left" || t !== "bottom" && e === "right";
9
+ return /* @__PURE__ */ o("div", { className: `${a}__bookend ${a}__bookend-${e}`, ...s, children: r && /* @__PURE__ */ o(d, { asChild: !0, children: /* @__PURE__ */ o(f, { onClick: l, "aria-label": "Close", "data-testid": "drawer-close", variant: h.tertiary, children: /* @__PURE__ */ o(b, { icon: "CloseX", color: "currentColor" }) }) }) });
10
+ }, _ = m(
11
+ ({ baseClassName: a, headerText: t, drawerOpenSide: l, onClose: e }, s) => {
12
+ const r = `${a}-header`;
13
+ return /* @__PURE__ */ i(c, { children: [
14
+ /* @__PURE__ */ i("div", { className: r, children: [
15
+ /* @__PURE__ */ o(n, { baseClassName: r, onClose: e, drawerOpenSide: l, bookendSide: "left" }),
16
+ /* @__PURE__ */ o("h3", { className: `${r}__title`, children: t }),
17
+ /* @__PURE__ */ o(
18
+ n,
19
+ {
20
+ baseClassName: r,
21
+ onClose: e,
22
+ drawerOpenSide: l,
23
+ bookendSide: "right"
24
+ }
25
+ )
26
+ ] }),
27
+ t && /* @__PURE__ */ o("div", { className: `${r}__hr` })
28
+ ] });
29
+ }
30
+ );
31
+ _.displayName = "DrawerHeader";
32
+ export {
33
+ _ as default
34
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { jsxs as l, Fragment as A, jsx as o } from "react/jsx-runtime";
2
2
  import N from "../../node_modules/classnames/index.js";
3
- import x from "react";
3
+ import g from "react";
4
4
  import c from "../../components/Button/Button.js";
5
- import { ButtonVariants as g } from "../../components/Button/types.js";
5
+ import { ButtonVariants as x } from "../../components/Button/types.js";
6
6
  import k from "../../components/Drawer/Drawer.js";
7
7
  import B from "../../components/Filter/Filter.js";
8
8
  import D from "../../components/Filter/FilterHeader.js";
@@ -12,7 +12,7 @@ import j from "../FilterMenu/FilterMenu.js";
12
12
  import { FilterButton as H } from "./FilterButton.js";
13
13
  import { FilterButtonIconType as I } from "./types.js";
14
14
  import { countActiveFilters as O, getFilterButtonClickHandler as R, resetAllFilters as S } from "./utils.js";
15
- const T = x.forwardRef(
15
+ const T = g.forwardRef(
16
16
  ({
17
17
  className: f,
18
18
  filterButtonLabel: n,
@@ -24,22 +24,22 @@ const T = x.forwardRef(
24
24
  onClickClear: w,
25
25
  resultsCount: F,
26
26
  dropdownMenuTranslation: d,
27
- ariaLabels: s = {},
27
+ ariaLabels: p = {},
28
28
  id: h
29
29
  }, _) => {
30
- const p = i?.[0] ?? !1, { totalCount: y, filterCount: C } = O(m, n);
30
+ const s = i?.[0] ?? !1, { totalCount: y, filterCount: C } = O(m, n);
31
31
  return /* @__PURE__ */ l(A, { children: [
32
32
  /* @__PURE__ */ o(
33
33
  H,
34
34
  {
35
35
  ref: _,
36
36
  className: f,
37
- isSelected: p,
37
+ isSelected: s,
38
38
  count: C,
39
39
  label: n,
40
40
  totalCount: y,
41
41
  id: h,
42
- ariaLabel: s.button || `${n} button`,
42
+ ariaLabel: p.button || `${n} button`,
43
43
  onClick: R(i, a, 0),
44
44
  isMobile: !1,
45
45
  type: I.Filter
@@ -48,28 +48,29 @@ const T = x.forwardRef(
48
48
  /* @__PURE__ */ l(
49
49
  k,
50
50
  {
51
- isOpen: p,
51
+ isOpen: s,
52
52
  drawerOpenSide: "left",
53
53
  onClose: () => S(i, a),
54
54
  className: `${t}-filter-drawer`,
55
- "aria-label": s.drawer || "Filter drawer",
55
+ "aria-label": p.drawer || "Filter drawer",
56
+ paddingLevel: 0,
56
57
  children: [
57
- /* @__PURE__ */ o(j, { className: `${t}-filter-drawer-menu`, children: m?.map((r) => /* @__PURE__ */ l(B, { name: r.label, children: [
58
- /* @__PURE__ */ o(D, { heading: r.label }),
59
- Array.from(r.filterDimensions).map((e) => /* @__PURE__ */ o(
58
+ /* @__PURE__ */ o(j, { className: `${t}-filter-drawer-menu`, children: m?.map((e) => /* @__PURE__ */ l(B, { name: e.label, children: [
59
+ /* @__PURE__ */ o(D, { heading: e.label }),
60
+ Array.from(e.filterDimensions).map((r) => /* @__PURE__ */ o(
60
61
  M,
61
62
  {
62
- id: e.label,
63
- labelText: e.label,
64
- onChange: ($) => u?.($, r.buttonType),
65
- type: r.type,
66
- disabled: e?.disabled,
67
- name: e.label,
68
- checked: e.active
63
+ id: r.label,
64
+ labelText: r.label,
65
+ onChange: ($) => u?.($, e.buttonType),
66
+ type: e.type,
67
+ disabled: r?.disabled,
68
+ name: r.label,
69
+ checked: r.active
69
70
  },
70
- e.label
71
+ r.label
71
72
  ))
72
- ] }, r.id)) }),
73
+ ] }, e.id)) }),
73
74
  /* @__PURE__ */ l(
74
75
  "div",
75
76
  {
@@ -82,7 +83,7 @@ const T = x.forwardRef(
82
83
  c,
83
84
  {
84
85
  className: `${t}-filter-dropdown-menu__button`,
85
- variant: g.secondary,
86
+ variant: x.secondary,
86
87
  onClick: () => w?.("all"),
87
88
  children: d?.clearAll || "Clear all"
88
89
  }
@@ -1,103 +1,104 @@
1
1
  import { jsxs as g, Fragment as S, jsx as o } from "react/jsx-runtime";
2
- import { Root as f, Trigger as j, Portal as v, Content as P } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
2
+ import { Root as f, Trigger as v, Portal as j, Content as P } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
3
3
  import _ from "react";
4
4
  import q from "../../components/Drawer/Drawer.js";
5
- import { SSRMediaQuery as D } from "../../providers/SeldonProvider/utils.js";
5
+ import { SSRMediaQuery as O } from "../../providers/SeldonProvider/utils.js";
6
6
  import { px as E } from "../../utils/index.js";
7
- import { FilterButton as O } from "./FilterButton.js";
7
+ import { FilterButton as C } from "./FilterButton.js";
8
8
  import { FilterDropdownMenuDesktop as H } from "./FilterDropdownMenuDesktop.js";
9
9
  import { FilterDropdownMenuMobile as N } from "./FilterDropdownMenuMobile.js";
10
10
  import { FilterButtonType as Q } from "./types.js";
11
- import { countActiveFilters as k, getFilterButtonClickHandler as d, getFilterButtonLabel as z } from "./utils.js";
11
+ import { countActiveFilters as k, getFilterButtonClickHandler as l, getFilterButtonLabel as z } from "./utils.js";
12
12
  const A = _.forwardRef(
13
13
  ({
14
14
  filterId: e = 0,
15
- className: w,
15
+ className: h,
16
16
  filterButtonLabel: r,
17
- buttonType: n,
17
+ buttonType: i,
18
18
  handleClick: m,
19
19
  filtersListState: a,
20
- filters: l,
21
- onSelectFilter: b,
22
- onApplyFilter: h,
23
- onClickClear: F,
24
- resultsCount: $,
25
- filterButtonLabelTranslated: c,
26
- dropdownMenuTranslation: M,
27
- ariaLabels: i = {},
20
+ filters: t,
21
+ onSelectFilter: w,
22
+ onApplyFilter: F,
23
+ onClickClear: $,
24
+ resultsCount: b,
25
+ filterButtonLabelTranslated: p,
26
+ dropdownMenuTranslation: x,
27
+ ariaLabels: n = {},
28
28
  hideDesktopSortButton: R,
29
- id: p
30
- }, x) => {
31
- const t = a?.[e] ?? !1, { totalCount: C, filterCount: s } = k(l, n), u = z(r, s, c || null);
32
- return R && n === Q.Sort ? null : /* @__PURE__ */ g(S, { children: [
33
- /* @__PURE__ */ g(D.Media, { lessThan: "md", children: [
29
+ id: c
30
+ }, M) => {
31
+ const d = a?.[e] ?? !1, { totalCount: D, filterCount: s } = k(t, i), u = z(r, s, p || null);
32
+ return R && i === Q.Sort ? null : /* @__PURE__ */ g(S, { children: [
33
+ /* @__PURE__ */ g(O.Media, { lessThan: "md", children: [
34
34
  /* @__PURE__ */ o(
35
- O,
35
+ C,
36
36
  {
37
- ref: x,
38
- className: w,
39
- isSelected: t,
37
+ ref: M,
38
+ className: h,
39
+ isSelected: d,
40
40
  count: s,
41
41
  label: u,
42
- id: p,
43
- totalCount: C,
44
- ariaLabel: i.button || `${r} button`,
45
- onClick: d(a, m, e),
42
+ id: c,
43
+ totalCount: D,
44
+ ariaLabel: n.button || `${r} button`,
45
+ onClick: l(a, m, e),
46
46
  isMobile: !0,
47
- type: n
47
+ type: i
48
48
  }
49
49
  ),
50
50
  /* @__PURE__ */ o(
51
51
  q,
52
52
  {
53
53
  drawerOpenSide: "bottom",
54
- isOpen: t,
55
- onClose: d(a, m, e),
56
- "aria-label": i.drawer || `${r} drawer`,
54
+ isOpen: d,
55
+ onClose: l(a, m, e),
56
+ "aria-label": n.drawer || `${r} drawer`,
57
57
  className: `${E}-filter-drawer-mobile`,
58
- bottomContentLabel: `${u} Filter`,
58
+ headerText: `${u} Filter`,
59
+ paddingLevel: 0,
59
60
  children: /* @__PURE__ */ o(
60
61
  N,
61
62
  {
62
- buttonType: n,
63
- filters: l,
63
+ buttonType: i,
64
+ filters: t,
64
65
  filterIndex: e,
65
- onSelectFilter: b,
66
- onApplyFilter: h,
67
- onClickClear: F,
68
- resultsCount: $,
69
- ariaLabels: i?.ariaLabel,
66
+ onSelectFilter: w,
67
+ onApplyFilter: F,
68
+ onClickClear: $,
69
+ resultsCount: b,
70
+ ariaLabels: n?.ariaLabel,
70
71
  filterButtonLabel: r,
71
- filterButtonLabelTranslated: c,
72
- dropdownMenuTranslation: M
72
+ filterButtonLabelTranslated: p,
73
+ dropdownMenuTranslation: x
73
74
  }
74
75
  )
75
76
  }
76
77
  )
77
78
  ] }),
78
- /* @__PURE__ */ o(D.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ g(
79
+ /* @__PURE__ */ o(O.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ g(
79
80
  f,
80
81
  {
81
- open: t,
82
- onOpenChange: d(a, m, e),
82
+ open: d,
83
+ onOpenChange: l(a, m, e),
83
84
  children: [
84
- /* @__PURE__ */ o(j, { asChild: !0, children: /* @__PURE__ */ o(
85
- O,
85
+ /* @__PURE__ */ o(v, { asChild: !0, children: /* @__PURE__ */ o(
86
+ C,
86
87
  {
87
- ref: x,
88
- className: w,
89
- isSelected: t,
88
+ ref: M,
89
+ className: h,
90
+ isSelected: d,
90
91
  count: s,
91
92
  label: u,
92
- totalCount: C,
93
- id: p,
94
- ariaLabel: i.ariaLabel || `${r} button`,
95
- onClick: d(a, m, e),
93
+ totalCount: D,
94
+ id: c,
95
+ ariaLabel: n.ariaLabel || `${r} button`,
96
+ onClick: l(a, m, e),
96
97
  isMobile: !1,
97
- type: n
98
+ type: i
98
99
  }
99
100
  ) }),
100
- /* @__PURE__ */ o(v, { children: /* @__PURE__ */ o(
101
+ /* @__PURE__ */ o(j, { children: /* @__PURE__ */ o(
101
102
  P,
102
103
  {
103
104
  avoidCollisions: !0,
@@ -105,28 +106,28 @@ const A = _.forwardRef(
105
106
  sideOffset: 5,
106
107
  align: "start",
107
108
  alignOffset: 5,
108
- "aria-label": i.ariaLabel || `${r} dropdown`,
109
+ "aria-label": n.ariaLabel || `${r} dropdown`,
109
110
  children: /* @__PURE__ */ o(
110
111
  H,
111
112
  {
112
- buttonType: n,
113
- filters: l,
113
+ buttonType: i,
114
+ filters: t,
114
115
  filterIndex: e,
115
- onSelectFilter: b,
116
- onApplyFilter: h,
117
- onClickClear: F,
118
- resultsCount: $,
119
- ariaLabels: i?.ariaLabel,
116
+ onSelectFilter: w,
117
+ onApplyFilter: F,
118
+ onClickClear: $,
119
+ resultsCount: b,
120
+ ariaLabels: n?.ariaLabel,
120
121
  filterButtonLabel: r,
121
- filterButtonLabelTranslated: c,
122
- dropdownMenuTranslation: M
122
+ filterButtonLabelTranslated: p,
123
+ dropdownMenuTranslation: x
123
124
  }
124
125
  )
125
126
  }
126
127
  ) })
127
128
  ]
128
129
  },
129
- `${p}-${r}-button`
130
+ `${c}-${r}-button`
130
131
  ) })
131
132
  ] });
132
133
  }
@@ -32,6 +32,7 @@
32
32
  @use 'components/Accordion/accordion';
33
33
  @use 'components/Breadcrumb/breadcrumb';
34
34
  @use 'components/Drawer/drawer';
35
+ @use 'components/Drawer/drawerHeader';
35
36
  @use 'components/Dropdown/dropdown';
36
37
  @use 'components/Video/video';
37
38
  @use 'components/Select/select';
@@ -7,7 +7,6 @@
7
7
  flex-direction: column;
8
8
  height: 100dvh;
9
9
  max-width: 480px;
10
- padding: $padding-xl $padding-md $padding-md;
11
10
  position: fixed;
12
11
  right: 0;
13
12
  top: 0;
@@ -18,10 +17,6 @@
18
17
  outline: none;
19
18
  }
20
19
 
21
- .#{$px}-icon-close-x:hover {
22
- color: $white;
23
- }
24
-
25
20
  @media (max-width: $breakpoint-sm) {
26
21
  max-width: 100%;
27
22
  }
@@ -30,13 +25,6 @@
30
25
  padding-bottom: $padding-sm;
31
26
  }
32
27
 
33
- &__overlay {
34
- background-color: $overlay-black;
35
- inset: 0;
36
- position: fixed;
37
- z-index: 10;
38
- }
39
-
40
28
  &__close {
41
29
  align-items: center;
42
30
  border-radius: 100%;
@@ -46,11 +34,13 @@
46
34
  position: absolute;
47
35
  right: 10px;
48
36
  top: 10px;
37
+ }
49
38
 
50
- &--bottom {
51
- align-self: flex-start;
52
- margin: $spacing-md;
53
- }
39
+ &__overlay {
40
+ background-color: $overlay-black;
41
+ inset: 0;
42
+ position: fixed;
43
+ z-index: 10;
54
44
  }
55
45
 
56
46
  // Bottom sheet modifier
@@ -84,6 +74,43 @@
84
74
  width: fit-content;
85
75
  }
86
76
  }
77
+
78
+ &__content {
79
+ align-items: center;
80
+ display: flex;
81
+ flex-direction: column;
82
+ height: 100%;
83
+ overflow: hidden;
84
+ overflow-y: auto;
85
+ padding-top: $snowflake-menu-padding;
86
+ width: 100%;
87
+
88
+ // different designs require different padding (ep = extra padding). more info in the component.
89
+
90
+ &--ep0 {
91
+ padding-top: 0;
92
+ }
93
+
94
+ &--ep1 {
95
+ padding: 1rem;
96
+ padding-top: $snowflake-menu-padding;
97
+ }
98
+
99
+ &--ep2 {
100
+ padding: 2rem;
101
+ padding-top: $spacing-xl;
102
+ }
103
+
104
+ &--ep3 {
105
+ padding: 3rem;
106
+ padding-top: $snowflake-menu-padding;
107
+ }
108
+
109
+ // make the children scroll in their little children box
110
+ > * {
111
+ overflow-y: auto;
112
+ }
113
+ }
87
114
  }
88
115
 
89
116
  // Drawer open/close animations
@@ -0,0 +1,45 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-drawer-header {
4
+ align-items: center;
5
+ display: flex;
6
+ padding: $margin-sm $margin-xsm;
7
+ width: 100%;
8
+
9
+ &__bookend {
10
+ display: flex;
11
+ flex: 1 1 0;
12
+
13
+ &-right {
14
+ justify-content: flex-end;
15
+ }
16
+
17
+ &-left {
18
+ justify-content: flex-start;
19
+ }
20
+ }
21
+
22
+ &__hr {
23
+ border-bottom: 2px solid $light-gray;
24
+ margin-bottom: $spacing-sm;
25
+ width: 100%;
26
+ }
27
+
28
+ &__title {
29
+ @include DistinctDisplay;
30
+
31
+ color: $primary-black;
32
+ font-size: $heading-size4;
33
+ font-variation-settings: 'wght' 600;
34
+ line-height: $body-line-height-size1;
35
+ margin-top: 4px; // better visual align with the close icon
36
+ overflow: hidden;
37
+ text-align: center;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap;
40
+ }
41
+
42
+ .#{$px}-icon-close-x:hover {
43
+ color: $white;
44
+ }
45
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.171.1",
3
+ "version": "1.172.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"