@phillips/seldon 1.31.1 → 1.32.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.
- package/dist/assets/lock.svg.js +4 -0
- package/dist/assets/minus.svg.js +4 -0
- package/dist/assets/plus.svg.js +4 -0
- package/dist/components/Accordion/Accordion.d.ts +26 -0
- package/dist/components/Accordion/Accordion.js +21 -0
- package/dist/components/Accordion/AccordionItem.d.ts +37 -0
- package/dist/components/Accordion/AccordionItem.js +114 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/types.d.ts +44 -0
- package/dist/components/LinkList/LinkList.js +10 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -22
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +237 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-compose-refs/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-context/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-primitive/dist/index.js +31 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +32 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +119 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-compose-refs/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-context/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-presence/dist/index.js +69 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-primitive/dist/index.js +31 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +32 -0
- package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-compose-refs/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/node_modules/react-modal/lib/components/Modal.js +6 -6
- package/dist/scss/components/Accordion/_accordion.scss +104 -0
- package/dist/scss/styles.scss +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
function c(o, n) {
|
|
3
|
+
typeof o == "function" ? o(n) : o != null && (o.current = n);
|
|
4
|
+
}
|
|
5
|
+
function u(...o) {
|
|
6
|
+
return (n) => o.forEach((t) => c(t, n));
|
|
7
|
+
}
|
|
8
|
+
function i(...o) {
|
|
9
|
+
return e.useCallback(u(...o), o);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
u as composeRefs,
|
|
13
|
+
i as useComposedRefs
|
|
14
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
function P(t, x = []) {
|
|
4
|
+
let o = [];
|
|
5
|
+
function f(u, e) {
|
|
6
|
+
const n = i.createContext(e), r = o.length;
|
|
7
|
+
o = [...o, e];
|
|
8
|
+
function m(a) {
|
|
9
|
+
const { scope: c, children: C, ...p } = a, d = (c == null ? void 0 : c[t][r]) || n, v = i.useMemo(() => p, Object.values(p));
|
|
10
|
+
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
11
|
+
}
|
|
12
|
+
function S(a, c) {
|
|
13
|
+
const C = (c == null ? void 0 : c[t][r]) || n, p = i.useContext(C);
|
|
14
|
+
if (p) return p;
|
|
15
|
+
if (e !== void 0) return e;
|
|
16
|
+
throw new Error(`\`${a}\` must be used within \`${u}\``);
|
|
17
|
+
}
|
|
18
|
+
return m.displayName = u + "Provider", [m, S];
|
|
19
|
+
}
|
|
20
|
+
const s = () => {
|
|
21
|
+
const u = o.map((e) => i.createContext(e));
|
|
22
|
+
return function(n) {
|
|
23
|
+
const r = (n == null ? void 0 : n[t]) || u;
|
|
24
|
+
return i.useMemo(
|
|
25
|
+
() => ({ [`__scope${t}`]: { ...n, [t]: r } }),
|
|
26
|
+
[n, r]
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
return s.scopeName = t, [f, h(s, ...x)];
|
|
31
|
+
}
|
|
32
|
+
function h(...t) {
|
|
33
|
+
const x = t[0];
|
|
34
|
+
if (t.length === 1) return x;
|
|
35
|
+
const o = () => {
|
|
36
|
+
const f = t.map((s) => ({
|
|
37
|
+
useScope: s(),
|
|
38
|
+
scopeName: s.scopeName
|
|
39
|
+
}));
|
|
40
|
+
return function(u) {
|
|
41
|
+
const e = f.reduce((n, { useScope: r, scopeName: m }) => {
|
|
42
|
+
const a = r(u)[`__scope${m}`];
|
|
43
|
+
return { ...n, ...a };
|
|
44
|
+
}, {});
|
|
45
|
+
return i.useMemo(() => ({ [`__scope${x.scopeName}`]: e }), [e]);
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
return o.scopeName = x.scopeName, o;
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
P as createContextScope
|
|
52
|
+
};
|
package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { composeRefs as u } from "../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { jsx as c, Fragment as d } from "react/jsx-runtime";
|
|
4
|
+
var m = l.forwardRef((e, n) => {
|
|
5
|
+
const { children: r, ...t } = e, o = l.Children.toArray(r), i = o.find(y);
|
|
6
|
+
if (i) {
|
|
7
|
+
const s = i.props.children, a = o.map((p) => p === i ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : p);
|
|
8
|
+
return /* @__PURE__ */ c(f, { ...t, ref: n, children: l.isValidElement(s) ? l.cloneElement(s, void 0, a) : null });
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ c(f, { ...t, ref: n, children: r });
|
|
11
|
+
});
|
|
12
|
+
m.displayName = "Slot";
|
|
13
|
+
var f = l.forwardRef((e, n) => {
|
|
14
|
+
const { children: r, ...t } = e;
|
|
15
|
+
if (l.isValidElement(r)) {
|
|
16
|
+
const o = C(r);
|
|
17
|
+
return l.cloneElement(r, {
|
|
18
|
+
...h(t, r.props),
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
ref: n ? u(n, o) : o
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return l.Children.count(r) > 1 ? l.Children.only(null) : null;
|
|
24
|
+
});
|
|
25
|
+
f.displayName = "SlotClone";
|
|
26
|
+
var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
|
|
27
|
+
function y(e) {
|
|
28
|
+
return l.isValidElement(e) && e.type === g;
|
|
29
|
+
}
|
|
30
|
+
function h(e, n) {
|
|
31
|
+
const r = { ...n };
|
|
32
|
+
for (const t in n) {
|
|
33
|
+
const o = e[t], i = n[t];
|
|
34
|
+
/^on[A-Z]/.test(t) ? o && i ? r[t] = (...a) => {
|
|
35
|
+
i(...a), o(...a);
|
|
36
|
+
} : o && (r[t] = o) : t === "style" ? r[t] = { ...o, ...i } : t === "className" && (r[t] = [o, i].filter(Boolean).join(" "));
|
|
37
|
+
}
|
|
38
|
+
return { ...e, ...r };
|
|
39
|
+
}
|
|
40
|
+
function C(e) {
|
|
41
|
+
var t, o;
|
|
42
|
+
let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
43
|
+
return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
m as Slot,
|
|
47
|
+
g as Slottable
|
|
48
|
+
};
|
|
@@ -7,7 +7,7 @@ import "../helpers/ariaAppHider.js";
|
|
|
7
7
|
import "../helpers/safeHTMLElement.js";
|
|
8
8
|
import D from "../../../../_virtual/react-lifecycles-compat.es.js";
|
|
9
9
|
import { __exports as w } from "../../../../_virtual/safeHTMLElement.js";
|
|
10
|
-
import { __exports as
|
|
10
|
+
import { __exports as H } from "../../../../_virtual/ariaAppHider.js";
|
|
11
11
|
Object.defineProperty(d, "__esModule", {
|
|
12
12
|
value: !0
|
|
13
13
|
});
|
|
@@ -19,7 +19,7 @@ var g = Object.assign || function(r) {
|
|
|
19
19
|
Object.prototype.hasOwnProperty.call(o, a) && (r[a] = o[a]);
|
|
20
20
|
}
|
|
21
21
|
return r;
|
|
22
|
-
},
|
|
22
|
+
}, q = /* @__PURE__ */ function() {
|
|
23
23
|
function r(e, o) {
|
|
24
24
|
for (var a = 0; a < o.length; a++) {
|
|
25
25
|
var n = o[a];
|
|
@@ -29,7 +29,7 @@ var g = Object.assign || function(r) {
|
|
|
29
29
|
return function(e, o, a) {
|
|
30
30
|
return o && r(e.prototype, o), a && r(e, a), e;
|
|
31
31
|
};
|
|
32
|
-
}(), R = N, O = m(R), U = T, _ = m(U), L = x, t = m(L), k = A, C = m(k),
|
|
32
|
+
}(), R = N, O = m(R), U = T, _ = m(U), L = x, t = m(L), k = A, C = m(k), W = H, F = B(W), u = w, M = m(u), $ = D;
|
|
33
33
|
function B(r) {
|
|
34
34
|
if (r && r.__esModule)
|
|
35
35
|
return r;
|
|
@@ -82,7 +82,7 @@ var p = function(r) {
|
|
|
82
82
|
n.portalRef(S);
|
|
83
83
|
}, a), E(n, l);
|
|
84
84
|
}
|
|
85
|
-
return
|
|
85
|
+
return q(e, [{
|
|
86
86
|
key: "componentDidMount",
|
|
87
87
|
value: function() {
|
|
88
88
|
if (u.canUseDOM) {
|
|
@@ -130,7 +130,7 @@ var p = function(r) {
|
|
|
130
130
|
}], [{
|
|
131
131
|
key: "setAppElement",
|
|
132
132
|
value: function(a) {
|
|
133
|
-
|
|
133
|
+
F.setElement(a);
|
|
134
134
|
}
|
|
135
135
|
/* eslint-disable react/no-unused-prop-types */
|
|
136
136
|
/* eslint-enable react/no-unused-prop-types */
|
|
@@ -230,7 +230,7 @@ p.defaultStyles = {
|
|
|
230
230
|
padding: "20px"
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
(0,
|
|
233
|
+
(0, $.polyfill)(p);
|
|
234
234
|
process.env.NODE_ENV !== "production" && (p.setCreateHTMLElement = function(r) {
|
|
235
235
|
return b = r;
|
|
236
236
|
});
|
|
@@ -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
|
+
}
|
package/dist/scss/styles.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"prepare": "husky install"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
42
43
|
"change-case": "^5.4.4",
|
|
43
44
|
"classnames": "^2.5.1",
|
|
44
45
|
"flatpickr": "^4.6.13",
|