@phillips/seldon 1.31.2 → 1.33.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 (64) hide show
  1. package/dist/assets/lock.svg.js +4 -0
  2. package/dist/assets/minus.svg.js +4 -0
  3. package/dist/assets/plus.svg.js +4 -0
  4. package/dist/components/Accordion/Accordion.d.ts +26 -0
  5. package/dist/components/Accordion/Accordion.js +21 -0
  6. package/dist/components/Accordion/AccordionItem.d.ts +37 -0
  7. package/dist/components/Accordion/AccordionItem.js +114 -0
  8. package/dist/components/Accordion/index.d.ts +2 -0
  9. package/dist/components/Accordion/types.d.ts +44 -0
  10. package/dist/components/Button/Button.d.ts +1 -1
  11. package/dist/components/Button/Button.js +39 -34
  12. package/dist/components/Drawer/Drawer.d.ts +23 -0
  13. package/dist/components/Drawer/Drawer.js +46 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.js +44 -38
  16. package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  17. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +237 -0
  18. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +119 -0
  19. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
  20. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +14 -0
  21. package/dist/node_modules/@radix-ui/react-context/dist/index.js +67 -0
  22. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +260 -0
  23. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
  24. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
  25. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
  26. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
  27. package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
  28. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
  29. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +69 -0
  30. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
  31. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
  32. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
  33. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +32 -0
  34. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  35. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  36. package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  37. package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
  38. package/dist/node_modules/react-modal/lib/components/Modal.js +6 -6
  39. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
  40. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
  41. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
  42. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
  43. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +62 -0
  44. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  45. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  46. package/dist/node_modules/react-remove-scroll/node_modules/tslib/tslib.es6.js +27 -0
  47. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
  48. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
  49. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
  50. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
  51. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
  52. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
  53. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
  54. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
  55. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
  56. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  57. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
  58. package/dist/node_modules/use-sidecar/node_modules/tslib/tslib.es6.js +21 -0
  59. package/dist/scss/_vars.scss +2 -0
  60. package/dist/scss/components/Accordion/_accordion.scss +104 -0
  61. package/dist/scss/components/Drawer/_drawer.scss +66 -0
  62. package/dist/scss/components/Subscribe/_subscribe.scss +1 -0
  63. package/dist/scss/styles.scss +2 -0
  64. package/package.json +8 -6
@@ -0,0 +1,30 @@
1
+ import { getNonce as o } from "../../../get-nonce/dist/es2015/index.js";
2
+ function r() {
3
+ if (!document)
4
+ return null;
5
+ var t = document.createElement("style");
6
+ t.type = "text/css";
7
+ var e = o();
8
+ return e && t.setAttribute("nonce", e), t;
9
+ }
10
+ function l(t, e) {
11
+ t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
12
+ }
13
+ function a(t) {
14
+ var e = document.head || document.getElementsByTagName("head")[0];
15
+ e.appendChild(t);
16
+ }
17
+ var c = function() {
18
+ var t = 0, e = null;
19
+ return {
20
+ add: function(n) {
21
+ t == 0 && (e = r()) && (l(e, n), a(e)), t++;
22
+ },
23
+ remove: function() {
24
+ t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
25
+ }
26
+ };
27
+ };
28
+ export {
29
+ c as stylesheetSingleton
30
+ };
@@ -0,0 +1,6 @@
1
+ function i(n, t) {
2
+ return typeof n == "function" ? n(t) : n && (n.current = t), n;
3
+ }
4
+ export {
5
+ i as assignRef
6
+ };
@@ -0,0 +1,26 @@
1
+ import * as f from "react";
2
+ import { assignRef as o } from "./assignRef.js";
3
+ import { useCallbackRef as l } from "./useRef.js";
4
+ var s = typeof window != "undefined" ? f.useLayoutEffect : f.useEffect, c = /* @__PURE__ */ new WeakMap();
5
+ function v(e, m) {
6
+ var t = l(null, function(n) {
7
+ return e.forEach(function(u) {
8
+ return o(u, n);
9
+ });
10
+ });
11
+ return s(function() {
12
+ var n = c.get(t);
13
+ if (n) {
14
+ var u = new Set(n), r = new Set(e), i = t.current;
15
+ u.forEach(function(a) {
16
+ r.has(a) || o(a, null);
17
+ }), r.forEach(function(a) {
18
+ u.has(a) || o(a, i);
19
+ });
20
+ }
21
+ c.set(t, e);
22
+ }, [e]), t;
23
+ }
24
+ export {
25
+ v as useMergeRefs
26
+ };
@@ -0,0 +1,25 @@
1
+ import { useState as u } from "react";
2
+ function n(c, r) {
3
+ var e = u(function() {
4
+ return {
5
+ // value
6
+ value: c,
7
+ // last callback
8
+ callback: r,
9
+ // "memoized" public interface
10
+ facade: {
11
+ get current() {
12
+ return e.value;
13
+ },
14
+ set current(a) {
15
+ var t = e.value;
16
+ t !== a && (e.value = a, e.callback(a, t));
17
+ }
18
+ }
19
+ };
20
+ })[0];
21
+ return e.callback = r, e.facade;
22
+ }
23
+ export {
24
+ n as useCallbackRef
25
+ };
@@ -0,0 +1,18 @@
1
+ import { __rest as o, __assign as d } from "../../node_modules/tslib/tslib.es6.js";
2
+ import * as n from "react";
3
+ var i = function(r) {
4
+ var e = r.sideCar, a = o(r, ["sideCar"]);
5
+ if (!e)
6
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
7
+ var t = e.read();
8
+ if (!t)
9
+ throw new Error("Sidecar medium not found");
10
+ return n.createElement(t, d({}, a));
11
+ };
12
+ i.isSideCarExport = !0;
13
+ function p(r, e) {
14
+ return r.useMedium(e), i;
15
+ }
16
+ export {
17
+ p as exportSidecar
18
+ };
@@ -0,0 +1,67 @@
1
+ import { __assign as d } from "../../node_modules/tslib/tslib.es6.js";
2
+ function l(r) {
3
+ return r;
4
+ }
5
+ function h(r, t) {
6
+ t === void 0 && (t = l);
7
+ var e = [], o = !1, c = {
8
+ read: function() {
9
+ if (o)
10
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
11
+ return e.length ? e[e.length - 1] : r;
12
+ },
13
+ useMedium: function(u) {
14
+ var n = t(u, o);
15
+ return e.push(n), function() {
16
+ e = e.filter(function(i) {
17
+ return i !== n;
18
+ });
19
+ };
20
+ },
21
+ assignSyncMedium: function(u) {
22
+ for (o = !0; e.length; ) {
23
+ var n = e;
24
+ e = [], n.forEach(u);
25
+ }
26
+ e = {
27
+ push: function(i) {
28
+ return u(i);
29
+ },
30
+ filter: function() {
31
+ return e;
32
+ }
33
+ };
34
+ },
35
+ assignMedium: function(u) {
36
+ o = !0;
37
+ var n = [];
38
+ if (e.length) {
39
+ var i = e;
40
+ e = [], i.forEach(u), n = e;
41
+ }
42
+ var s = function() {
43
+ var f = n;
44
+ n = [], f.forEach(u);
45
+ }, a = function() {
46
+ return Promise.resolve().then(s);
47
+ };
48
+ a(), e = {
49
+ push: function(f) {
50
+ n.push(f), a();
51
+ },
52
+ filter: function(f) {
53
+ return n = n.filter(f), e;
54
+ }
55
+ };
56
+ }
57
+ };
58
+ return c;
59
+ }
60
+ function v(r) {
61
+ r === void 0 && (r = {});
62
+ var t = h(null);
63
+ return t.options = d({ async: !0, ssr: !1 }, r), t;
64
+ }
65
+ export {
66
+ v as createSidecarMedium
67
+ };
@@ -0,0 +1,21 @@
1
+ var p = function() {
2
+ return p = Object.assign || function(o) {
3
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
4
+ t = arguments[r];
5
+ for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (o[a] = t[a]);
6
+ }
7
+ return o;
8
+ }, p.apply(this, arguments);
9
+ };
10
+ function u(e, o) {
11
+ var t = {};
12
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && o.indexOf(r) < 0 && (t[r] = e[r]);
13
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
14
+ for (var n = 0, r = Object.getOwnPropertySymbols(e); n < r.length; n++)
15
+ o.indexOf(r[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[n]) && (t[r[n]] = e[r[n]]);
16
+ return t;
17
+ }
18
+ export {
19
+ p as __assign,
20
+ u as __rest
21
+ };
@@ -42,6 +42,7 @@ $clock-widget-red: $widget-red;
42
42
  $articker-red: #fc1e2b;
43
43
  $articker-orange: #ff8201;
44
44
  $articker-red-orange-gradient: linear-gradient(90deg, #fc1e2b, #ff8201);
45
+ $overlay-black: rgba(0, 0, 0, 80%);
45
46
 
46
47
  // Legacy mapping
47
48
  $pure-white: $white;
@@ -242,3 +243,4 @@ $size-sm: 'sm';
242
243
  $size-md: 'md';
243
244
  $size-lg: 'lg';
244
245
  $size-xl: 'xl';
246
+ $default-transition: 150ms cubic-bezier(0.16, 1, 0.3, 1);
@@ -0,0 +1,104 @@
1
+ @import '../../_vars';
2
+
3
+ .#{$px}-accordion {
4
+ border-bottom: 1px solid $keyline-gray;
5
+ border-top: 1px solid $keyline-gray;
6
+ margin-bottom: 10px;
7
+ width: 100%;
8
+ }
9
+
10
+ .#{$px}-accordion-item {
11
+ padding: $spacing-sm;
12
+
13
+ &__border-bottom {
14
+ border-bottom: 1px solid $keyline-gray;
15
+ }
16
+
17
+ &--expanded {
18
+ display: block;
19
+ font-weight: 400;
20
+ height: auto;
21
+ margin: 10px 0;
22
+ }
23
+
24
+ &__content--lg {
25
+ @include text($body2);
26
+
27
+ margin: 1.25rem 0;
28
+ }
29
+
30
+ &--transition {
31
+ overflow: hidden;
32
+ }
33
+
34
+ &--transition[data-state='open'] {
35
+ animation: slide-down 250ms ease-out;
36
+ }
37
+
38
+ &--transition[data-state='closed'] {
39
+ animation: slide-up 250ms end;
40
+ }
41
+
42
+ @keyframes slide-down {
43
+ from {
44
+ height: 0;
45
+ }
46
+
47
+ to {
48
+ height: var(--radix-accordion-content-height);
49
+ }
50
+ }
51
+
52
+ @keyframes slide-up {
53
+ from {
54
+ height: var(--radix-accordion-content-height);
55
+ opacity: 1;
56
+ }
57
+
58
+ to {
59
+ height: 0;
60
+ opacity: 0;
61
+ }
62
+ }
63
+ }
64
+
65
+ .#{$px}-accordion-item-label {
66
+ display: flex;
67
+ flex-direction: row;
68
+ opacity: 0.75;
69
+
70
+ &--hoverable {
71
+ cursor: pointer;
72
+
73
+ &:hover {
74
+ opacity: 1;
75
+ }
76
+ }
77
+
78
+ &__text {
79
+ flex: auto;
80
+
81
+ @include text($body1);
82
+ @include DistinctDisplay;
83
+ }
84
+
85
+ &__text--lg {
86
+ @include text($heading3);
87
+ }
88
+
89
+ &__icon {
90
+ flex: initial;
91
+ height: 1.5rem;
92
+ width: 1.5rem;
93
+ }
94
+
95
+ &__icon--lg {
96
+ height: 2rem;
97
+ width: 2rem;
98
+ }
99
+
100
+ &--blue-fill {
101
+ filter: brightness(0) saturate(100%) invert(51%) sepia(72%) saturate(1698%) hue-rotate(191deg) brightness(95%)
102
+ contrast(86%);
103
+ }
104
+ }
@@ -0,0 +1,66 @@
1
+ @import '../../_vars';
2
+
3
+ .#{$px}-drawer {
4
+ align-items: center;
5
+ animation: content-show $default-transition;
6
+ background-color: $white;
7
+ display: flex;
8
+ flex-direction: column;
9
+ height: 100vh;
10
+ max-width: 600px;
11
+ padding: $padding-md;
12
+ position: fixed;
13
+ right: 0;
14
+ top: 0;
15
+ width: 100%;
16
+ z-index: 10;
17
+
18
+ &:focus {
19
+ outline: none;
20
+ }
21
+
22
+ @media (max-width: $breakpoint-sm) {
23
+ max-width: 100%;
24
+ }
25
+
26
+ &__overlay {
27
+ animation: overlay-show $default-transition;
28
+ background-color: $overlay-black;
29
+ inset: 0;
30
+ position: fixed;
31
+ z-index: 10;
32
+ }
33
+
34
+ &__close {
35
+ align-items: center;
36
+ border-radius: 100%;
37
+ color: $pure-black;
38
+ display: inline-flex;
39
+ justify-content: center;
40
+ position: absolute;
41
+ right: 10px;
42
+ top: 10px;
43
+ }
44
+
45
+ @keyframes overlay-show {
46
+ from {
47
+ opacity: 0;
48
+ }
49
+
50
+ to {
51
+ opacity: 1;
52
+ }
53
+ }
54
+
55
+ @keyframes content-show {
56
+ from {
57
+ opacity: 0;
58
+ transform: translateX(12rem);
59
+ }
60
+
61
+ to {
62
+ opacity: 1;
63
+ transform: translateX(0);
64
+ }
65
+ }
66
+ }
@@ -5,6 +5,7 @@
5
5
 
6
6
  .#{$px}-subscribe {
7
7
  max-width: 30rem;
8
+ width: 100%;
8
9
 
9
10
  &__title {
10
11
  @include text($heading3);
@@ -36,4 +36,6 @@
36
36
  @import 'components/LinkList/linkList';
37
37
  @import 'components/Text/text';
38
38
  @import 'components/Modal/modal';
39
+ @import 'components/Accordion/accordion';
39
40
  @import 'components/Breadcrumb/breadcrumb';
41
+ @import 'components/Drawer/drawer';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.31.2",
3
+ "version": "1.33.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -39,6 +39,8 @@
39
39
  "prepare": "husky install"
40
40
  },
41
41
  "dependencies": {
42
+ "@radix-ui/react-accordion": "^1.2.0",
43
+ "@radix-ui/react-dialog": "^1.1.1",
42
44
  "change-case": "^5.4.4",
43
45
  "classnames": "^2.5.1",
44
46
  "flatpickr": "^4.6.13",
@@ -76,10 +78,10 @@
76
78
  "eslint": "^8.57.0",
77
79
  "eslint-plugin-react": "^7.34.3",
78
80
  "eslint-plugin-react-hooks": "^4.6.2",
79
- "eslint-plugin-react-refresh": "^0.4.8",
81
+ "eslint-plugin-react-refresh": "^0.4.9",
80
82
  "eslint-plugin-storybook": "^0.8.0",
81
- "husky": "^9.1.2",
82
- "prettier": "3.3.2",
83
+ "husky": "^9.1.4",
84
+ "prettier": "3.3.3",
83
85
  "react": "^18.3.1",
84
86
  "react-docgen-typescript": "^2.2.2",
85
87
  "react-dom": "^18.2.0",
@@ -89,14 +91,14 @@
89
91
  "sass": "^1.77.8",
90
92
  "semantic-release": "^23.1.1",
91
93
  "storybook": "^8.1.4",
92
- "stylelint": "^16.6.1",
94
+ "stylelint": "^16.8.1",
93
95
  "stylelint-config-standard": "^36.0.1",
94
96
  "stylelint-config-standard-scss": "^13.1.0",
95
97
  "stylelint-order": "^6.0.4",
96
98
  "stylelint-scss": "^6.4.1",
97
99
  "ts-node": "^10.9.2",
98
100
  "typescript": "^5.5.4",
99
- "vite": "^5.3.3",
101
+ "vite": "^5.3.5",
100
102
  "vite-plugin-dts": "^2.3.0",
101
103
  "vite-plugin-svgr": "^4.2.0",
102
104
  "vite-tsconfig-paths": "^4.3.2",