@phillips/seldon 1.176.0 → 1.176.1

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.
@@ -1,62 +1,62 @@
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";
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { forwardRef as _ } from "react";
3
+ import i from "../../node_modules/classnames/index.js";
4
+ import { Root as $, Portal as b, Overlay as v, Content as w, Title as D, Description as P, Close as B } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
5
+ import { VisuallyHidden as c } from "../../node_modules/@radix-ui/react-visually-hidden/dist/index.js";
6
6
  import { getCommonProps as j, noOp as k } from "../../utils/index.js";
7
7
  import H from "./DrawerHeader.js";
8
8
  import I from "../IconButton/IconButton.js";
9
9
  import { ButtonVariants as R } from "../Button/types.js";
10
10
  import V from "../Icon/Icon.js";
11
- const g = y(
11
+ const g = _(
12
12
  ({
13
13
  isOpen: d,
14
14
  onClose: t = k,
15
- headerText: a,
15
+ headerText: e,
16
16
  title: m,
17
- description: f = m,
18
- drawerOpenSide: e = "right",
19
- paddingLevel: i,
20
- className: h,
21
- children: p,
17
+ description: p = m,
18
+ drawerOpenSide: a = "right",
19
+ paddingLevel: s,
20
+ className: f,
21
+ children: h,
22
22
  ...l
23
- }, C) => {
24
- const { className: o, ...u } = j(l, "Drawer"), N = e === "bottom";
25
- return i ?? (i = a ? 1 : 2), /* @__PURE__ */ r(
23
+ }, u) => {
24
+ const { className: o, ...C } = j(l, "Drawer"), y = a === "bottom";
25
+ return s ?? (s = e ? 1 : 2), /* @__PURE__ */ r(
26
26
  $,
27
27
  {
28
28
  open: d,
29
- onOpenChange: (_) => {
30
- _ || t();
29
+ onOpenChange: (N) => {
30
+ N || (document.body.style.removeProperty("pointer-events"), t());
31
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,
32
+ children: /* @__PURE__ */ n(b, { children: [
33
+ /* @__PURE__ */ r(v, { onClick: t, className: `${o}__overlay`, "data-testid": "drawer-overlay" }),
34
+ /* @__PURE__ */ n(
35
+ w,
36
36
  {
37
- className: s(o, h, {
38
- [`${o}--bottom`]: N
37
+ className: i(o, f, {
38
+ [`${o}--bottom`]: y
39
39
  }),
40
- "data-side": e,
40
+ "data-side": a,
41
41
  id: l.id,
42
- ref: C,
43
- ...u,
42
+ ref: u,
43
+ ...C,
44
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(
45
+ /* @__PURE__ */ r(c, { asChild: !0, children: /* @__PURE__ */ r(D, { children: m }) }),
46
+ /* @__PURE__ */ r(c, { asChild: !0, children: /* @__PURE__ */ r(P, { children: p }) }),
47
+ e ? /* @__PURE__ */ r(
48
48
  H,
49
49
  {
50
50
  baseClassName: o,
51
- headerText: a,
51
+ headerText: e,
52
52
  onClose: t,
53
- drawerOpenSide: e
53
+ drawerOpenSide: a
54
54
  }
55
- ) : /* @__PURE__ */ r(P, { asChild: !0, children: /* @__PURE__ */ r(
55
+ ) : /* @__PURE__ */ r(B, { asChild: !0, children: /* @__PURE__ */ r(
56
56
  I,
57
57
  {
58
58
  onClick: t,
59
- className: s(`${o}__close`),
59
+ className: i(`${o}__close`),
60
60
  "aria-label": "Close",
61
61
  "data-testid": "drawer-close",
62
62
  variant: R.tertiary,
@@ -66,11 +66,11 @@ const g = y(
66
66
  /* @__PURE__ */ r(
67
67
  "div",
68
68
  {
69
- className: s(
69
+ className: i(
70
70
  `${o}__content`,
71
- i < 3 && `${o}__content--ep${i}`
71
+ s < 3 && `${o}__content--ep${s}`
72
72
  ),
73
- children: p
73
+ children: h
74
74
  }
75
75
  )
76
76
  ]
@@ -1,64 +1,64 @@
1
- import { jsx as o, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
2
  import t from "../../node_modules/classnames/index.js";
3
- import { getCommonProps as N, noOp as _ } from "../../utils/index.js";
4
- import M from "../Icon/Icon.js";
5
- import g from "../IconButton/IconButton.js";
6
- import { ButtonVariants as v } from "../Button/types.js";
7
- import { Root as b, Portal as x, Overlay as I, Content as O, Title as P, Description as $, Close as j } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
3
+ import { getCommonProps as v, noOp as N } from "../../utils/index.js";
4
+ import _ from "../Icon/Icon.js";
5
+ import M from "../IconButton/IconButton.js";
6
+ import { ButtonVariants as b } from "../Button/types.js";
7
+ import { Root as g, Portal as P, Overlay as x, Content as I, Title as O, Description as $, Close as j } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
8
8
  import { VisuallyHidden as w } from "../../node_modules/@radix-ui/react-visually-hidden/dist/index.js";
9
9
  import { forwardRef as B } from "react";
10
10
  const R = B(
11
11
  ({
12
12
  children: l,
13
- className: i,
14
- overlayClassName: s,
13
+ className: s,
14
+ overlayClassName: i,
15
15
  isOpen: m = !1,
16
- onClose: d = _,
17
- style: n,
16
+ onClose: n = N,
17
+ style: d,
18
18
  contentLabel: c,
19
- closeIcon: f = /* @__PURE__ */ o(M, { icon: "CloseX", height: 32, width: 32, color: "currentColor" }),
20
- closeIconPosition: p = "right",
21
- ...e
19
+ closeIcon: p = /* @__PURE__ */ o(_, { icon: "CloseX", height: 32, width: 32, color: "currentColor" }),
20
+ closeIconPosition: f = "right",
21
+ ...r
22
22
  }, h) => {
23
- const { className: a, "data-testid": u, ...C } = N(e, "Modal");
23
+ const { className: e, "data-testid": u, ...C } = v(r, "Modal");
24
24
  return /* @__PURE__ */ o(
25
- b,
25
+ g,
26
26
  {
27
27
  open: m,
28
28
  onOpenChange: (y) => {
29
- y || d();
29
+ y || (document.body.style.removeProperty("pointer-events"), n());
30
30
  },
31
- children: /* @__PURE__ */ r(x, { children: [
31
+ children: /* @__PURE__ */ a(P, { children: [
32
32
  /* @__PURE__ */ o(
33
- I,
33
+ x,
34
34
  {
35
- className: t(`${a}__overlay`, s),
35
+ className: t(`${e}__overlay`, i),
36
36
  "data-testid": "modal-overlay"
37
37
  }
38
38
  ),
39
- /* @__PURE__ */ r(
40
- O,
39
+ /* @__PURE__ */ a(
40
+ I,
41
41
  {
42
42
  ref: h,
43
- className: t(a, i),
43
+ className: t(e, s),
44
44
  "data-testid": u,
45
45
  "aria-modal": "true",
46
- style: n,
46
+ style: d,
47
47
  ...C,
48
- ...e,
48
+ ...r,
49
49
  children: [
50
- /* @__PURE__ */ o(w, { asChild: !0, children: /* @__PURE__ */ o(P, { children: c ?? "Modal" }) }),
50
+ /* @__PURE__ */ o(w, { asChild: !0, children: /* @__PURE__ */ o(O, { children: c ?? "Modal" }) }),
51
51
  /* @__PURE__ */ o($, {}),
52
52
  /* @__PURE__ */ o(j, { asChild: !0, children: /* @__PURE__ */ o(
53
- g,
53
+ M,
54
54
  {
55
55
  id: "modal-close-button",
56
56
  "aria-label": "Close Modal",
57
- className: t(`${a}__close`, {
58
- [`${a}__close--left`]: p === "left"
57
+ className: t(`${e}__close`, {
58
+ [`${e}__close--left`]: f === "left"
59
59
  }),
60
- variant: v.tertiary,
61
- children: f
60
+ variant: b.tertiary,
61
+ children: p
62
62
  }
63
63
  ) }),
64
64
  l
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.176.0",
3
+ "version": "1.176.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"