@phillips/seldon 1.138.0 → 1.140.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 (51) hide show
  1. package/dist/components/Countdown/Countdown.js +42 -38
  2. package/dist/components/Countdown/Countdown.stories.d.ts +14 -0
  3. package/dist/index.d.ts +42 -41
  4. package/dist/index.js +171 -169
  5. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +1 -1
  6. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +27 -27
  7. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +24 -9
  8. package/dist/node_modules/@radix-ui/react-context/dist/index.js +50 -34
  9. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +45 -45
  10. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +1 -1
  11. package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
  12. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +239 -0
  13. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +30 -25
  14. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +13 -13
  15. package/dist/node_modules/@radix-ui/react-select/dist/index.js +364 -338
  16. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +41 -40
  17. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +2 -2
  18. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
  19. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +1 -1
  20. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.d.ts +75 -0
  21. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +131 -0
  22. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +78 -0
  23. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.test.d.ts +1 -0
  24. package/dist/patterns/FavoritesCollectionTile/index.d.ts +1 -0
  25. package/dist/scss/_vars.scss +1 -0
  26. package/dist/scss/_vars.scss.js +1 -0
  27. package/dist/scss/componentStyles.scss +1 -0
  28. package/dist/scss/components/Countdown/_countdown.scss +10 -0
  29. package/dist/scss/components/Countdown/_duration.scss +0 -6
  30. package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +159 -0
  31. package/package.json +2 -1
  32. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +0 -9
  33. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
  34. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +0 -68
  35. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
  36. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
  37. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
  38. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
  39. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
  40. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +0 -35
  41. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +0 -47
  42. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
  43. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
  44. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
  45. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
  46. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -62
  47. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
  48. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
  49. package/dist/node_modules/@radix-ui/react-select/node_modules/tslib/tslib.es6.js +0 -27
  50. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +0 -53
  51. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
@@ -1,31 +0,0 @@
1
- import { __rest as k, __assign as r } from "../../../tslib/tslib.es6.js";
2
- import * as a from "react";
3
- import { fullWidthClassName as E, zeroRightClassName as I } from "../../../../../../react-remove-scroll-bar/dist/es2015/constants.js";
4
- import { effectCar as Z } from "./medium.js";
5
- import { useMergeRefs as W } from "../../../../../../use-callback-ref/dist/es2015/useMergeRef.js";
6
- var o = function() {
7
- }, m = a.forwardRef(function(e, d) {
8
- var l = a.useRef(null), n = a.useState({
9
- onScrollCapture: o,
10
- onWheelCapture: o,
11
- onTouchMoveCapture: o
12
- }), f = n[0], h = n[1], u = e.forwardProps, t = e.children, v = e.className, C = e.removeScrollBar, g = e.enabled, P = e.shards, R = e.sideCar, S = e.noIsolation, b = e.inert, w = e.allowPinchZoom, s = e.as, N = s === void 0 ? "div" : s, M = e.gapMode, _ = k(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), B = R, i = W([l, d]), c = r(r({}, _), f);
13
- return a.createElement(
14
- a.Fragment,
15
- null,
16
- g && a.createElement(B, { sideCar: Z, removeScrollBar: C, shards: P, noIsolation: S, inert: b, setCallbacks: h, allowPinchZoom: !!w, lockRef: l, gapMode: M }),
17
- u ? a.cloneElement(a.Children.only(t), r(r({}, c), { ref: i })) : a.createElement(N, r({}, c, { className: v, ref: i }), t)
18
- );
19
- });
20
- m.defaultProps = {
21
- enabled: !0,
22
- removeScrollBar: !0,
23
- inert: !1
24
- };
25
- m.classNames = {
26
- fullWidth: E,
27
- zeroRight: I
28
- };
29
- export {
30
- m as RemoveScroll
31
- };
@@ -1,16 +0,0 @@
1
- var r = !1;
2
- if (typeof window < "u")
3
- try {
4
- var e = Object.defineProperty({}, "passive", {
5
- get: function() {
6
- return r = !0, !0;
7
- }
8
- });
9
- window.addEventListener("test", e, e), window.removeEventListener("test", e, e);
10
- } catch {
11
- r = !1;
12
- }
13
- var a = r ? { passive: !1 } : !1;
14
- export {
15
- a as nonPassive
16
- };
@@ -1,62 +0,0 @@
1
- var p = function(r) {
2
- return r.tagName === "TEXTAREA";
3
- }, w = function(r, e) {
4
- var o = window.getComputedStyle(r);
5
- return (
6
- // not-not-scrollable
7
- o[e] !== "hidden" && // contains scroll inside self
8
- !(o.overflowY === o.overflowX && !p(r) && o[e] === "visible")
9
- );
10
- }, y = function(r) {
11
- return w(r, "overflowY");
12
- }, H = function(r) {
13
- return w(r, "overflowX");
14
- }, R = function(r, e) {
15
- var o = e.ownerDocument, t = e;
16
- do {
17
- typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
18
- var a = g(r, t);
19
- if (a) {
20
- var n = b(r, t), i = n[1], l = n[2];
21
- if (i > l)
22
- return !0;
23
- }
24
- t = t.parentNode;
25
- } while (t && t !== o.body);
26
- return !1;
27
- }, B = function(r) {
28
- var e = r.scrollTop, o = r.scrollHeight, t = r.clientHeight;
29
- return [
30
- e,
31
- o,
32
- t
33
- ];
34
- }, V = function(r) {
35
- var e = r.scrollLeft, o = r.scrollWidth, t = r.clientWidth;
36
- return [
37
- e,
38
- o,
39
- t
40
- ];
41
- }, g = function(r, e) {
42
- return r === "v" ? y(e) : H(e);
43
- }, b = function(r, e) {
44
- return r === "v" ? B(e) : V(e);
45
- }, D = function(r, e) {
46
- return r === "h" && e === "rtl" ? -1 : 1;
47
- }, W = function(r, e, o, t, a) {
48
- var n = D(r, window.getComputedStyle(e).direction), i = n * t, l = o.target, f = e.contains(l), c = !1, d = i > 0, s = 0, h = 0;
49
- do {
50
- var u = b(r, l), v = u[0], m = u[1], C = u[2], S = m - C - n * v;
51
- (v || S) && g(r, l) && (s += S, h += v), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
52
- } while (
53
- // portaled content
54
- !f && l !== document.body || // self content
55
- f && (e.contains(l) || e === l)
56
- );
57
- return (d && (Math.abs(s) < 1 || !a) || !d && (Math.abs(h) < 1 || !a)) && (c = !0), c;
58
- };
59
- export {
60
- W as handleScroll,
61
- R as locationCouldBeScrolled
62
- };
@@ -1,5 +0,0 @@
1
- import { createSidecarMedium as e } from "../../../../../../use-sidecar/dist/es2015/medium.js";
2
- var a = e();
3
- export {
4
- a as effectCar
5
- };
@@ -1,7 +0,0 @@
1
- import { RemoveScrollSideCar as r } from "./SideEffect.js";
2
- import { effectCar as o } from "./medium.js";
3
- import { exportSidecar as e } from "../../../../../../use-sidecar/dist/es2015/exports.js";
4
- const f = e(o, r);
5
- export {
6
- f as default
7
- };
@@ -1,27 +0,0 @@
1
- var p = function() {
2
- return p = Object.assign || function(e) {
3
- for (var n, r = 1, o = arguments.length; r < o; r++) {
4
- n = arguments[r];
5
- for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
6
- }
7
- return e;
8
- }, p.apply(this, arguments);
9
- };
10
- function c(t, e) {
11
- var n = {};
12
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
13
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
14
- for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
15
- e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
16
- return n;
17
- }
18
- function l(t, e, n) {
19
- if (n || arguments.length === 2) for (var r = 0, o = e.length, a; r < o; r++)
20
- (a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
21
- return t.concat(a || Array.prototype.slice.call(e));
22
- }
23
- export {
24
- p as __assign,
25
- c as __rest,
26
- l as __spreadArray
27
- };
@@ -1,53 +0,0 @@
1
- import * as u from "react";
2
- import { jsx as _ } from "react/jsx-runtime";
3
- function P(e, p = []) {
4
- let n = [];
5
- function m(s, t) {
6
- const o = u.createContext(t), c = n.length;
7
- n = [...n, t];
8
- const a = (i) => {
9
- const { scope: f, children: C, ...x } = i, d = f?.[e]?.[c] || o, v = u.useMemo(() => x, Object.values(x));
10
- return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
11
- };
12
- a.displayName = s + "Provider";
13
- function S(i, f) {
14
- const C = f?.[e]?.[c] || o, x = u.useContext(C);
15
- if (x) return x;
16
- if (t !== void 0) return t;
17
- throw new Error(`\`${i}\` must be used within \`${s}\``);
18
- }
19
- return [a, S];
20
- }
21
- const r = () => {
22
- const s = n.map((t) => u.createContext(t));
23
- return function(o) {
24
- const c = o?.[e] || s;
25
- return u.useMemo(
26
- () => ({ [`__scope${e}`]: { ...o, [e]: c } }),
27
- [o, c]
28
- );
29
- };
30
- };
31
- return r.scopeName = e, [m, h(r, ...p)];
32
- }
33
- function h(...e) {
34
- const p = e[0];
35
- if (e.length === 1) return p;
36
- const n = () => {
37
- const m = e.map((r) => ({
38
- useScope: r(),
39
- scopeName: r.scopeName
40
- }));
41
- return function(s) {
42
- const t = m.reduce((o, { useScope: c, scopeName: a }) => {
43
- const i = c(s)[`__scope${a}`];
44
- return { ...o, ...i };
45
- }, {});
46
- return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
47
- };
48
- };
49
- return n.scopeName = p.scopeName, n;
50
- }
51
- export {
52
- P as createContextScope
53
- };
@@ -1,70 +0,0 @@
1
- import * as i from "react";
2
- import { useComposedRefs as O } from "../../../../../react-compose-refs/dist/index.js";
3
- import { useLayoutEffect as A } from "../../../../../react-use-layout-effect/dist/index.js";
4
- function E(n, e) {
5
- return i.useReducer((t, r) => e[t][r] ?? t, n);
6
- }
7
- var T = (n) => {
8
- const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
9
- return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
10
- };
11
- T.displayName = "Presence";
12
- function R(n) {
13
- const [e, t] = i.useState(), r = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
14
- mounted: {
15
- UNMOUNT: "unmounted",
16
- ANIMATION_OUT: "unmountSuspended"
17
- },
18
- unmountSuspended: {
19
- MOUNT: "mounted",
20
- ANIMATION_END: "unmounted"
21
- },
22
- unmounted: {
23
- MOUNT: "mounted"
24
- }
25
- });
26
- return i.useEffect(() => {
27
- const o = l(r.current);
28
- c.current = N === "mounted" ? o : "none";
29
- }, [N]), A(() => {
30
- const o = r.current, m = a.current;
31
- if (m !== n) {
32
- const f = c.current, u = l(o);
33
- n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
34
- }
35
- }, [n, s]), A(() => {
36
- if (e) {
37
- let o;
38
- const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
- const g = l(r.current).includes(u.animationName);
40
- if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
41
- const y = e.style.animationFillMode;
42
- e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
- e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
44
- });
45
- }
46
- }, f = (u) => {
47
- u.target === e && (c.current = l(r.current));
48
- };
49
- return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
- m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
- };
52
- } else
53
- s("ANIMATION_END");
54
- }, [e, s]), {
55
- isPresent: ["mounted", "unmountSuspended"].includes(N),
56
- ref: i.useCallback((o) => {
57
- o && (r.current = getComputedStyle(o)), t(o);
58
- }, [])
59
- };
60
- }
61
- function l(n) {
62
- return n?.animationName || "none";
63
- }
64
- function v(n) {
65
- let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
66
- return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
67
- }
68
- export {
69
- T as Presence
70
- };