@phillips/seldon 1.155.0 → 1.157.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 (49) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index3.js +2 -2
  3. package/dist/_virtual/index4.js +2 -2
  4. package/dist/_virtual/index5.js +2 -2
  5. package/dist/_virtual/index8.js +2 -2
  6. package/dist/_virtual/index9.js +2 -2
  7. package/dist/components/Modal/Modal.d.ts +8 -8
  8. package/dist/components/Modal/Modal.js +59 -50
  9. package/dist/components/Modal/Modal.stories.d.ts +2 -1
  10. package/dist/node_modules/ics/dist/index.js +2 -2
  11. package/dist/node_modules/ics/dist/pipeline/format.js +1 -1
  12. package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
  13. package/dist/node_modules/ics/dist/pipeline/validate.js +1 -1
  14. package/dist/node_modules/ics/dist/schema/index.js +1 -1
  15. package/dist/node_modules/ics/dist/utils/index.js +1 -1
  16. package/dist/node_modules/prop-types/index.js +8 -9
  17. package/dist/node_modules/runes2/dist/index.js +1 -1
  18. package/dist/node_modules/toposort/index.js +1 -1
  19. package/dist/scss/components/ContentPeek/_contentPeek.scss +1 -1
  20. package/dist/scss/components/Modal/_modal.scss +6 -8
  21. package/dist/scss/components/Modal/_modal.stories.scss +11 -0
  22. package/package.json +1 -3
  23. package/dist/_virtual/Modal.js +0 -4
  24. package/dist/_virtual/ModalPortal.js +0 -4
  25. package/dist/_virtual/ariaAppHider.js +0 -4
  26. package/dist/_virtual/bodyTrap.js +0 -4
  27. package/dist/_virtual/classList.js +0 -4
  28. package/dist/_virtual/focusManager.js +0 -4
  29. package/dist/_virtual/index11.js +0 -4
  30. package/dist/_virtual/index12.js +0 -4
  31. package/dist/_virtual/portalOpenInstances.js +0 -4
  32. package/dist/_virtual/react-lifecycles-compat.es.js +0 -6
  33. package/dist/_virtual/safeHTMLElement.js +0 -4
  34. package/dist/_virtual/scopeTab.js +0 -4
  35. package/dist/_virtual/tabbable.js +0 -4
  36. package/dist/node_modules/exenv/index.js +0 -21
  37. package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +0 -63
  38. package/dist/node_modules/react-modal/lib/components/Modal.js +0 -237
  39. package/dist/node_modules/react-modal/lib/components/ModalPortal.js +0 -249
  40. package/dist/node_modules/react-modal/lib/helpers/ariaAppHider.js +0 -91
  41. package/dist/node_modules/react-modal/lib/helpers/bodyTrap.js +0 -42
  42. package/dist/node_modules/react-modal/lib/helpers/classList.js +0 -62
  43. package/dist/node_modules/react-modal/lib/helpers/focusManager.js +0 -67
  44. package/dist/node_modules/react-modal/lib/helpers/portalOpenInstances.js +0 -46
  45. package/dist/node_modules/react-modal/lib/helpers/safeHTMLElement.js +0 -15
  46. package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +0 -45
  47. package/dist/node_modules/react-modal/lib/helpers/tabbable.js +0 -60
  48. package/dist/node_modules/react-modal/lib/index.js +0 -19
  49. package/dist/node_modules/warning/warning.js +0 -33
@@ -1,4 +1,4 @@
1
- var a = {};
1
+ var o = { exports: {} };
2
2
  export {
3
- a as __exports
3
+ o as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- e as __module
3
+ p as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- p as __module
3
+ r as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var e = {};
2
2
  export {
3
- e as __module
3
+ e as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = {};
1
+ var a = {};
2
2
  export {
3
- e as __exports
3
+ a as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var r = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ e as __module
4
4
  };
@@ -1,5 +1,5 @@
1
- import { default as ReactModal } from 'react-modal';
2
- export interface ModalProps extends ReactModal.Props {
1
+ import * as Dialog from '@radix-ui/react-dialog';
2
+ export interface ModalProps extends React.HTMLAttributes<HTMLDivElement>, Dialog.DialogProps {
3
3
  /**
4
4
  * Boolean to determine if the modal is open
5
5
  */
@@ -8,10 +8,6 @@ export interface ModalProps extends ReactModal.Props {
8
8
  * Function to close the modal
9
9
  */
10
10
  onClose?: () => void;
11
- /**
12
- * The selector for aria-hide
13
- */
14
- appElementSelector?: string;
15
11
  /**
16
12
  * The children of the modal
17
13
  */
@@ -27,7 +23,11 @@ export interface ModalProps extends ReactModal.Props {
27
23
  /**
28
24
  * style for the modal
29
25
  */
30
- style?: ReactModal.Props['style'];
26
+ style?: React.CSSProperties;
27
+ /**
28
+ * Content label for accessibility
29
+ */
30
+ contentLabel?: string;
31
31
  }
32
32
  /**
33
33
  * ## Overview
@@ -35,5 +35,5 @@ export interface ModalProps extends ReactModal.Props {
35
35
  * A component for displaying a modal.
36
36
  *
37
37
  */
38
- declare const Modal: ({ children, className, overlayClassName, isOpen, onClose, appElementSelector, style, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
38
+ declare const Modal: import('react').ForwardRefExoticComponent<ModalProps & import('react').RefAttributes<HTMLDivElement>>;
39
39
  export default Modal;
@@ -1,54 +1,63 @@
1
- import { jsxs as u, jsx as l } from "react/jsx-runtime";
2
- import t from "../../node_modules/classnames/index.js";
1
+ import { jsx as o, jsxs as e } from "react/jsx-runtime";
2
+ import r from "../../node_modules/classnames/index.js";
3
3
  import { getCommonProps as C, noOp as y } from "../../utils/index.js";
4
- import h from "../Icon/Icon.js";
5
- import s from "../../node_modules/react-modal/lib/index.js";
6
- import b from "../IconButton/IconButton.js";
4
+ import N from "../Icon/Icon.js";
5
+ import M from "../IconButton/IconButton.js";
7
6
  import { ButtonVariants as v } from "../Button/types.js";
8
- const g = ({
9
- children: m,
10
- className: n,
11
- overlayClassName: i,
12
- isOpen: o = !1,
13
- onClose: r = y,
14
- appElementSelector: d = "main",
15
- style: c,
16
- ...a
17
- }) => {
18
- if (!o)
19
- return null;
20
- const { className: e, "data-testid": f, ...p } = C(a, "Modal");
21
- return s.setAppElement(d), /* @__PURE__ */ u(
22
- s,
23
- {
24
- ...p,
25
- ...a,
26
- isOpen: o,
27
- onRequestClose: r,
28
- className: t(e, n),
29
- overlayClassName: t(`${e}__overlay`, i),
30
- ariaHideApp: o,
31
- testId: f,
32
- style: c,
33
- onAfterOpen: () => document.body.style.overflow = "hidden",
34
- onAfterClose: () => document.body.style.overflow = "unset",
35
- children: [
36
- /* @__PURE__ */ l(
37
- b,
38
- {
39
- id: "modal-button",
40
- onClick: r,
41
- "aria-label": "Close Modal",
42
- className: t(`${e}__close`),
43
- variant: v.tertiary,
44
- children: /* @__PURE__ */ l(h, { icon: "CloseX", height: 32, width: 32, color: "currentColor" })
45
- }
46
- ),
47
- m
48
- ]
49
- }
50
- );
51
- };
7
+ import { Root as _, Portal as b, Overlay as g, Content as x, Title as I, Description as O, Close as P } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
8
+ import { VisuallyHidden as j } from "../../node_modules/@radix-ui/react-visually-hidden/dist/index.js";
9
+ import { forwardRef as w } from "react";
10
+ const B = w(
11
+ ({ children: l, className: i, overlayClassName: s, isOpen: m = !1, onClose: d = y, style: n, contentLabel: c, ...t }, p) => {
12
+ const { className: a, "data-testid": f, ...h } = C(t, "Modal");
13
+ return /* @__PURE__ */ o(
14
+ _,
15
+ {
16
+ open: m,
17
+ onOpenChange: (u) => {
18
+ u || d();
19
+ },
20
+ children: /* @__PURE__ */ e(b, { children: [
21
+ /* @__PURE__ */ o(
22
+ g,
23
+ {
24
+ className: r(`${a}__overlay`, s),
25
+ "data-testid": "modal-overlay"
26
+ }
27
+ ),
28
+ /* @__PURE__ */ e(
29
+ x,
30
+ {
31
+ ref: p,
32
+ className: r(a, i),
33
+ "data-testid": f,
34
+ "aria-modal": "true",
35
+ style: n,
36
+ ...h,
37
+ ...t,
38
+ children: [
39
+ /* @__PURE__ */ o(j, { asChild: !0, children: /* @__PURE__ */ o(I, { children: c ?? "Modal" }) }),
40
+ /* @__PURE__ */ o(O, {}),
41
+ /* @__PURE__ */ o(P, { asChild: !0, children: /* @__PURE__ */ o(
42
+ M,
43
+ {
44
+ id: "modal-close-button",
45
+ "aria-label": "Close Modal",
46
+ className: r(`${a}__close`),
47
+ variant: v.tertiary,
48
+ children: /* @__PURE__ */ o(N, { icon: "CloseX", height: 32, width: 32, color: "currentColor" })
49
+ }
50
+ ) }),
51
+ l
52
+ ]
53
+ }
54
+ )
55
+ ] })
56
+ }
57
+ );
58
+ }
59
+ );
60
+ B.displayName = "Modal";
52
61
  export {
53
- g as default
62
+ B as default
54
63
  };
@@ -1,6 +1,6 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: ({ children, className, overlayClassName, isOpen, onClose, appElementSelector, style, ...props }: import('./Modal').ModalProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ component: import('react').ForwardRefExoticComponent<import('./Modal').ModalProps & import('react').RefAttributes<HTMLDivElement>>;
4
4
  };
5
5
  export default meta;
6
6
  export declare const Playground: {
@@ -9,3 +9,4 @@ export declare const Playground: {
9
9
  id: string;
10
10
  };
11
11
  };
12
+ export declare const ModalFromDrawer: () => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { __exports as l } from "../../../_virtual/index7.js";
1
+ import { __exports as l } from "../../../_virtual/index4.js";
2
2
  import "./pipeline/index.js";
3
- import { __exports as _ } from "../../../_virtual/index8.js";
3
+ import { __exports as _ } from "../../../_virtual/index5.js";
4
4
  Object.defineProperty(l, "__esModule", {
5
5
  value: !0
6
6
  });
@@ -1,7 +1,7 @@
1
1
  import { __exports as d } from "../../../../_virtual/format.js";
2
2
  import "../utils/index.js";
3
3
  import "../utils/encode-new-lines.js";
4
- import { __exports as x } from "../../../../_virtual/index9.js";
4
+ import { __exports as x } from "../../../../_virtual/index7.js";
5
5
  import { __exports as F } from "../../../../_virtual/encode-new-lines.js";
6
6
  Object.defineProperty(d, "__esModule", {
7
7
  value: !0
@@ -1,4 +1,4 @@
1
- import { __exports as u } from "../../../../_virtual/index8.js";
1
+ import { __exports as u } from "../../../../_virtual/index5.js";
2
2
  import "./build.js";
3
3
  import "./format.js";
4
4
  import "./validate.js";
@@ -1,6 +1,6 @@
1
1
  import { __exports as n } from "../../../../_virtual/validate.js";
2
2
  import "../schema/index.js";
3
- import { __exports as u } from "../../../../_virtual/index10.js";
3
+ import { __exports as u } from "../../../../_virtual/index8.js";
4
4
  (function(r) {
5
5
  Object.defineProperty(r, "__esModule", {
6
6
  value: !0
@@ -1,4 +1,4 @@
1
- import { __exports as f } from "../../../../_virtual/index10.js";
1
+ import { __exports as f } from "../../../../_virtual/index8.js";
2
2
  import b from "../../../../_virtual/index.esm.js";
3
3
  Object.defineProperty(f, "__esModule", {
4
4
  value: !0
@@ -1,4 +1,4 @@
1
- import { __exports as _ } from "../../../../_virtual/index9.js";
1
+ import { __exports as _ } from "../../../../_virtual/index7.js";
2
2
  import "./format-date.js";
3
3
  import "./set-geolocation.js";
4
4
  import "./set-contact.js";
@@ -1,16 +1,15 @@
1
1
  import { getDefaultExportFromCjs as e } from "../../_virtual/_commonjsHelpers.js";
2
- import { __module as r } from "../../_virtual/index4.js";
2
+ import { __module as r } from "../../_virtual/index3.js";
3
3
  import { __require as o } from "./node_modules/react-is/index.js";
4
- import { __require as p } from "./factoryWithTypeCheckers.js";
5
- import { __require as t } from "./factoryWithThrowingShims.js";
4
+ import { __require as t } from "./factoryWithTypeCheckers.js";
5
+ import { __require as p } from "./factoryWithThrowingShims.js";
6
6
  if (process.env.NODE_ENV !== "production") {
7
7
  var s = o(), i = !0;
8
- r.exports = p()(s.isElement, i);
8
+ r.exports = t()(s.isElement, i);
9
9
  } else
10
- r.exports = t()();
11
- var a = r.exports;
12
- const q = /* @__PURE__ */ e(a);
10
+ r.exports = p()();
11
+ var m = r.exports;
12
+ const q = /* @__PURE__ */ e(m);
13
13
  export {
14
- q as default,
15
- a as p
14
+ q as default
16
15
  };
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../_virtual/index11.js";
1
+ import { __module as e } from "../../../_virtual/index9.js";
2
2
  import { __require as r } from "./index.cjs.development.js";
3
3
  import { __require as o } from "./index.cjs.production.min.js";
4
4
  typeof process < "u" && process.env.NODE_ENV !== "production" ? e.exports = r() : e.exports = o();
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as d } from "../../_virtual/_commonjsHelpers.js";
2
- import { __module as v } from "../../_virtual/index12.js";
2
+ import { __module as v } from "../../_virtual/index10.js";
3
3
  v.exports = function(n) {
4
4
  return g(m(n), n);
5
5
  };
@@ -10,7 +10,7 @@
10
10
  overflow: hidden;
11
11
 
12
12
  &[data-state='closed'] {
13
- max-height: var(--content-peek-max-height);
13
+ max-height: var(--content-peek-max-height, none);
14
14
  }
15
15
  }
16
16
 
@@ -1,24 +1,22 @@
1
1
  @use '../../allPartials' as *;
2
2
 
3
3
  .#{$px}-modal {
4
- background-color: white;
4
+ background-color: $white;
5
5
  left: 50%;
6
6
  max-height: 100%;
7
7
  max-width: 100%;
8
8
  overflow: auto;
9
9
  padding: $padding-md;
10
- position: absolute;
10
+ position: fixed;
11
11
  top: 50%;
12
12
  transform: translate(-50%, -50%);
13
+ z-index: 30;
13
14
 
14
15
  &__overlay {
15
- background-color: rgba(0, 0, 0, 75%);
16
- height: 100dvh;
17
- left: 0;
16
+ background-color: $overlay-black;
17
+ inset: 0;
18
18
  position: fixed;
19
- top: 0;
20
- width: 100%;
21
- z-index: $modal-z-index;
19
+ z-index: 15;
22
20
  }
23
21
 
24
22
  &__close {
@@ -2,4 +2,15 @@
2
2
  &__button {
3
3
  margin-bottom: 16px;
4
4
  }
5
+
6
+ &__drawer,
7
+ &__modal {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: 24px;
11
+
12
+ &-heading.seldon-text {
13
+ margin-bottom: 0;
14
+ }
15
+ }
5
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.155.0",
3
+ "version": "1.157.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -66,7 +66,6 @@
66
66
  "ics": "^3.8.1",
67
67
  "libphonenumber-js": "^1.12.6",
68
68
  "react-intersection-observer": "^9.13.1",
69
- "react-modal": "^3.16.1",
70
69
  "react-remove-scroll": "^2.6.3",
71
70
  "react-transition-group": "^4.4.5",
72
71
  "react-zoom-pan-pinch": "^3.6.1",
@@ -104,7 +103,6 @@
104
103
  "@types/node": "^22.12.0",
105
104
  "@types/react": "^18.3.3",
106
105
  "@types/react-dom": "^18.0.11",
107
- "@types/react-modal": "^3.16.3",
108
106
  "@types/react-transition-group": "^4.4.11",
109
107
  "@types/uuid": "^10.0.0",
110
108
  "@typescript-eslint/eslint-plugin": "^5.62.0",
@@ -1,4 +0,0 @@
1
- var a = {};
2
- export {
3
- a as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var o = { exports: {} };
2
- export {
3
- o as __module
4
- };
@@ -1,4 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var s = {};
2
- export {
3
- s as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var a = {};
2
- export {
3
- a as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };
@@ -1,4 +0,0 @@
1
- var o = { exports: {} };
2
- export {
3
- o as __module
4
- };
@@ -1,4 +0,0 @@
1
- var a = {};
2
- export {
3
- a as __exports
4
- };
@@ -1,6 +0,0 @@
1
- import { getAugmentedNamespace as e } from "./_commonjsHelpers.js";
2
- import * as t from "../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js";
3
- const a = /* @__PURE__ */ e(t);
4
- export {
5
- a as default
6
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };
@@ -1,4 +0,0 @@
1
- var a = { exports: {} };
2
- export {
3
- a as __module
4
- };
@@ -1,21 +0,0 @@
1
- import { __module as t } from "../../_virtual/index5.js";
2
- /*!
3
- Copyright (c) 2015 Jed Watson.
4
- Based on code that is Copyright 2013-2015, Facebook, Inc.
5
- All rights reserved.
6
- */
7
- (function(n) {
8
- (function() {
9
- var e = !!(typeof window < "u" && window.document && window.document.createElement), o = {
10
- canUseDOM: e,
11
- canUseWorkers: typeof Worker < "u",
12
- canUseEventListeners: e && !!(window.addEventListener || window.attachEvent),
13
- canUseViewport: e && !!window.screen
14
- };
15
- n.exports ? n.exports = o : window.ExecutionEnvironment = o;
16
- })();
17
- })(t);
18
- var i = t.exports;
19
- export {
20
- i as e
21
- };
@@ -1,63 +0,0 @@
1
- function l() {
2
- var t = this.constructor.getDerivedStateFromProps(this.props, this.state);
3
- t != null && this.setState(t);
4
- }
5
- function p(t) {
6
- function e(o) {
7
- var n = this.constructor.getDerivedStateFromProps(t, o);
8
- return n ?? null;
9
- }
10
- this.setState(e.bind(this));
11
- }
12
- function r(t, e) {
13
- try {
14
- var o = this.props, n = this.state;
15
- this.props = t, this.state = e, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
16
- o,
17
- n
18
- );
19
- } finally {
20
- this.props = o, this.state = n;
21
- }
22
- }
23
- l.__suppressDeprecationWarning = !0;
24
- p.__suppressDeprecationWarning = !0;
25
- r.__suppressDeprecationWarning = !0;
26
- function y(t) {
27
- var e = t.prototype;
28
- if (!e || !e.isReactComponent)
29
- throw new Error("Can only polyfill class components");
30
- if (typeof t.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function")
31
- return t;
32
- var o = null, n = null, i = null;
33
- if (typeof e.componentWillMount == "function" ? o = "componentWillMount" : typeof e.UNSAFE_componentWillMount == "function" && (o = "UNSAFE_componentWillMount"), typeof e.componentWillReceiveProps == "function" ? n = "componentWillReceiveProps" : typeof e.UNSAFE_componentWillReceiveProps == "function" && (n = "UNSAFE_componentWillReceiveProps"), typeof e.componentWillUpdate == "function" ? i = "componentWillUpdate" : typeof e.UNSAFE_componentWillUpdate == "function" && (i = "UNSAFE_componentWillUpdate"), o !== null || n !== null || i !== null) {
34
- var a = t.displayName || t.name, s = typeof t.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
35
- throw Error(
36
- `Unsafe legacy lifecycles will not be called for components using new component APIs.
37
-
38
- ` + a + " uses " + s + " but also contains the following legacy lifecycles:" + (o !== null ? `
39
- ` + o : "") + (n !== null ? `
40
- ` + n : "") + (i !== null ? `
41
- ` + i : "") + `
42
-
43
- The above lifecycles should be removed. Learn more about this warning here:
44
- https://fb.me/react-async-component-lifecycle-hooks`
45
- );
46
- }
47
- if (typeof t.getDerivedStateFromProps == "function" && (e.componentWillMount = l, e.componentWillReceiveProps = p), typeof e.getSnapshotBeforeUpdate == "function") {
48
- if (typeof e.componentDidUpdate != "function")
49
- throw new Error(
50
- "Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"
51
- );
52
- e.componentWillUpdate = r;
53
- var c = e.componentDidUpdate;
54
- e.componentDidUpdate = function(f, u, d) {
55
- var h = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : d;
56
- c.call(this, f, u, h);
57
- };
58
- }
59
- return t;
60
- }
61
- export {
62
- y as polyfill
63
- };