@phillips/seldon 1.38.1 → 1.38.3
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/README.md +3 -2
- package/dist/assets/lock.svg.js +2 -2
- package/dist/components/Accordion/Accordion.d.ts +1 -14
- package/dist/components/Accordion/Accordion.js +11 -12
- package/dist/components/Accordion/AccordionItem.d.ts +1 -9
- package/dist/components/Accordion/AccordionItem.js +70 -78
- package/dist/components/Accordion/types.d.ts +0 -1
- package/dist/scss/_allPartials.scss +5 -0
- package/dist/scss/_sharedClasses.scss +2 -1
- package/dist/scss/_type.scss +1 -1
- package/dist/scss/_typography.scss +1 -1
- package/dist/scss/_utils.scss +1 -1
- package/dist/scss/componentStyles.scss +35 -0
- package/dist/scss/components/Accordion/_accordion.scss +1 -1
- package/dist/scss/components/Breadcrumb/_breadcrumb.scss +1 -1
- package/dist/scss/components/Button/_button.scss +1 -3
- package/dist/scss/components/DatePicker/_datePicker.scss +1 -2
- package/dist/scss/components/Footer/_footer.scss +1 -4
- package/dist/scss/components/Grid/_grid.scss +1 -2
- package/dist/scss/components/GridItem/_gridItem.scss +1 -1
- package/dist/scss/components/HTMLParser/_htmlParser.scss +2 -0
- package/dist/scss/components/Header/_header.scss +1 -2
- package/dist/scss/components/HeroBanner/_heroBanner.scss +1 -1
- package/dist/scss/components/IconButton/_iconButton.scss +2 -0
- package/dist/scss/components/Input/_input.scss +1 -2
- package/dist/scss/components/Link/_link.scss +1 -1
- package/dist/scss/components/LinkBlock/_linkBlock.scss +1 -2
- package/dist/scss/components/LinkList/_linkList.scss +1 -1
- package/dist/scss/components/Modal/_modal.scss +1 -2
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +1 -3
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +1 -1
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +1 -2
- package/dist/scss/components/Navigation/_navigation.scss +1 -2
- package/dist/scss/components/Row/_row.scss +1 -1
- package/dist/scss/components/Search/_search.scss +1 -3
- package/dist/scss/components/Social/_social.scss +1 -3
- package/dist/scss/components/SplitPanel/_splitPanel.scss +1 -2
- package/dist/scss/components/SplitPanel/_splitPanel.stories.scss +1 -1
- package/dist/scss/components/Subscribe/_subscribe.scss +1 -4
- package/dist/scss/components/Text/_text.scss +1 -1
- package/dist/scss/components/Toggle/_toggle.scss +1 -2
- package/dist/scss/components/UserManagement/_userManagement.scss +1 -2
- package/dist/scss/components/ViewingsList/_viewingsList.scss +1 -3
- package/package.json +1 -1
- package/dist/scss/styles.scss +0 -42
package/README.md
CHANGED
|
@@ -20,10 +20,11 @@ yarn add @phillips/seldon
|
|
|
20
20
|
|
|
21
21
|
### Styling
|
|
22
22
|
|
|
23
|
-
The project contains a `scss` folder. Here you will find the main export of our sass styles.
|
|
23
|
+
The project contains a `scss` folder. Here you will find the main export of our sass styles for our components. There's also a scss export that contains our mixins, tokens, and other utilities.
|
|
24
24
|
|
|
25
25
|
```scss
|
|
26
|
-
@use '@phillips/seldon/dist/scss/
|
|
26
|
+
@use '@phillips/seldon/dist/scss/componentStyles'; // our component tyles
|
|
27
|
+
@use '@phillips/seldon/dist/scss/allPartials'; // our scss utilities
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
If you wish to only import specific component styles you can find them in their respective directories inside the `scss` folder.
|
package/dist/assets/lock.svg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16%2018C14.8954%2018%2014%2018.8954%2014%2020V21.6754C14%2021.8904%2014.0347%2022.104%2014.1026%2022.3079C14.7104%2024.1313%2017.2896%2024.1313%2017.8974%2022.3079C17.9653%2022.104%2018%2021.8904%2018%2021.6754V20C18%2018.8954%2017.1046%2018%2016%2018Z'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.00004%209.00002L9.00001%2013.126C7.27478%2013.5701%206%2015.1362%206%2017V25C6%2027.2091%207.79086%2029%2010%2029H22C24.2091%2029%2026%2027.2091%2026%2025V17C26%2015.1362%2024.7252%2013.5701%2023%2013.126V9C23%205.8561%2020.1684%203%2016%203C11.8317%203%209%205.85611%209.00004%209.00002ZM16%205C12.7436%205%2011%207.1439%2011%208.99998L11%2013H21V9C21%207.1439%2019.2564%205%2016%205ZM22%2015H10C8.89543%2015%208%2015.8954%208%2017V25C8%2026.1046%208.89543%2027%2010%2027H22C23.1046%2027%2024%2026.1046%2024%2025V17C24%2015.8954%2023.1046%2015%2022%2015Z'%20fill='black'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
l as default
|
|
4
4
|
};
|
|
@@ -4,23 +4,10 @@ export interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
* Unique id for component testing
|
|
5
5
|
*/
|
|
6
6
|
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Determines whether one or multiple items can be opened at the same time. Default as single.
|
|
9
|
-
*/
|
|
10
|
-
type?: 'single' | 'multiple';
|
|
11
7
|
/**
|
|
12
8
|
* Child element pass in to display as item content.
|
|
13
9
|
*/
|
|
14
10
|
children?: React.ReactNode;
|
|
15
11
|
}
|
|
16
|
-
|
|
17
|
-
* ## Overview
|
|
18
|
-
*
|
|
19
|
-
* Overview of this component
|
|
20
|
-
*
|
|
21
|
-
* [Figma Link](https://www.figma.com/design/xMuOXOAKVt5HC7hgYjF3ot/Components-v2.0?node-id=4433-163013&t=lhB2YjBptvQ97UWF-0)
|
|
22
|
-
*
|
|
23
|
-
* [Storybook Link](Point back to yourself here)
|
|
24
|
-
*/
|
|
25
|
-
declare const AccordionComponent: ({ className, type, children, ...props }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const AccordionComponent: ({ className, children, ...props }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
13
|
export default AccordionComponent;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import { Root as
|
|
5
|
-
const C = ({ className: m,
|
|
6
|
-
const { className: a, ...
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import s from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as n } from "../../utils/index.js";
|
|
4
|
+
import { Root as r } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
5
|
+
const i = "multiple", C = ({ className: m, children: t, ...o }) => {
|
|
6
|
+
const { className: a, ...c } = n(o, "Accordion");
|
|
7
|
+
return /* @__PURE__ */ e(
|
|
8
|
+
r,
|
|
9
9
|
{
|
|
10
|
-
className:
|
|
11
|
-
type:
|
|
12
|
-
...
|
|
10
|
+
className: s(`${a}`, m),
|
|
11
|
+
type: i,
|
|
12
|
+
...c,
|
|
13
13
|
id: o == null ? void 0 : o.id,
|
|
14
|
-
collapsible: !0,
|
|
15
14
|
children: t
|
|
16
15
|
}
|
|
17
16
|
);
|
|
@@ -8,10 +8,6 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
8
8
|
* When true, prevents the user from interacting with the item.
|
|
9
9
|
*/
|
|
10
10
|
isLocked: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* When true applied the lock variation icon.
|
|
13
|
-
*/
|
|
14
|
-
isLockedVariation?: boolean;
|
|
15
11
|
/**
|
|
16
12
|
* Determines whether the variation on text style is large or small.
|
|
17
13
|
*/
|
|
@@ -24,10 +20,6 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
24
20
|
* Child element pass in to display as item content.
|
|
25
21
|
*/
|
|
26
22
|
children?: React.ReactNode;
|
|
27
|
-
/**
|
|
28
|
-
* Determines whether one or multiple items can be opened at the same time. Default as single.
|
|
29
|
-
*/
|
|
30
|
-
type?: 'single' | 'multiple';
|
|
31
23
|
/**
|
|
32
24
|
* When true applied the transition keyframe animation on item expand. Default as false.
|
|
33
25
|
*/
|
|
@@ -37,5 +29,5 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
37
29
|
*/
|
|
38
30
|
isControlled?: boolean;
|
|
39
31
|
}
|
|
40
|
-
declare const AccordionItem: ({ isLocked,
|
|
32
|
+
declare const AccordionItem: ({ isLocked, variation, label, isLastItem, hasTransition, children, isControlled, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
33
|
export default AccordionItem;
|
|
@@ -1,40 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Item as
|
|
9
|
-
const
|
|
10
|
-
children:
|
|
11
|
-
className:
|
|
1
|
+
import { jsxs as I, jsx as e, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f } from "react";
|
|
3
|
+
import { getCommonProps as h, noOp as C } from "../../utils/index.js";
|
|
4
|
+
import p from "../../assets/plus.svg.js";
|
|
5
|
+
import x from "../../assets/minus.svg.js";
|
|
6
|
+
import v from "../../assets/lock.svg.js";
|
|
7
|
+
import d from "../../node_modules/classnames/index.js";
|
|
8
|
+
import { Item as A, Trigger as N, Content as T } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
9
|
+
const j = ({
|
|
10
|
+
children: o,
|
|
11
|
+
className: r,
|
|
12
12
|
baseClassName: t,
|
|
13
|
-
disable:
|
|
14
|
-
isCollapsed:
|
|
15
|
-
setIsCollapsed:
|
|
16
|
-
isLargeVariation:
|
|
17
|
-
|
|
18
|
-
id: a
|
|
13
|
+
disable: n,
|
|
14
|
+
isCollapsed: i,
|
|
15
|
+
setIsCollapsed: a,
|
|
16
|
+
isLargeVariation: s,
|
|
17
|
+
id: c
|
|
19
18
|
}) => {
|
|
20
|
-
const
|
|
19
|
+
const m = () => !n && a((l) => !l), g = n ? v : i ? p : x, $ = `${c}-` + (n ? "lockedIcon" : i ? "plusIcon" : "minusIcon");
|
|
21
20
|
return /* @__PURE__ */ e(
|
|
22
|
-
|
|
21
|
+
N,
|
|
23
22
|
{
|
|
24
|
-
"data-disabled":
|
|
23
|
+
"data-disabled": n,
|
|
25
24
|
asChild: !0,
|
|
26
|
-
className:
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */ e("div", { className:
|
|
25
|
+
className: d(t, { [`${t}--hoverable`]: !n }, r),
|
|
26
|
+
children: /* @__PURE__ */ I("div", { onClick: m, "data-testid": `${c}-trigger`, children: [
|
|
27
|
+
/* @__PURE__ */ e("div", { className: d(`${t}__text`, { [`${t}__text--lg`]: s }), children: o }),
|
|
29
28
|
/* @__PURE__ */ e(
|
|
30
29
|
"img",
|
|
31
30
|
{
|
|
32
|
-
className: s
|
|
33
|
-
|
|
34
|
-
{ [`${t}__icon--lg`]: i },
|
|
35
|
-
m && `${t}--blue-fill`
|
|
36
|
-
),
|
|
37
|
-
src: u,
|
|
31
|
+
className: d(`${t}__icon`, { [`${t}__icon--lg`]: s }),
|
|
32
|
+
src: g,
|
|
38
33
|
"data-testid": $,
|
|
39
34
|
"aria-hidden": !0
|
|
40
35
|
}
|
|
@@ -42,68 +37,65 @@ const B = ({
|
|
|
42
37
|
] })
|
|
43
38
|
}
|
|
44
39
|
);
|
|
45
|
-
},
|
|
46
|
-
children:
|
|
47
|
-
baseClassName:
|
|
40
|
+
}, k = ({
|
|
41
|
+
children: o,
|
|
42
|
+
baseClassName: r,
|
|
48
43
|
disable: t,
|
|
49
|
-
hasTransition:
|
|
50
|
-
isLargeVariation:
|
|
51
|
-
isCollapsed:
|
|
52
|
-
className:
|
|
53
|
-
}) => /* @__PURE__ */ e(
|
|
54
|
-
|
|
44
|
+
hasTransition: n,
|
|
45
|
+
isLargeVariation: i,
|
|
46
|
+
isCollapsed: a,
|
|
47
|
+
className: s
|
|
48
|
+
}) => /* @__PURE__ */ e(_, { children: t && o ? /* @__PURE__ */ e("div", { children: o }) : /* @__PURE__ */ e(
|
|
49
|
+
T,
|
|
55
50
|
{
|
|
56
51
|
asChild: !0,
|
|
57
|
-
className:
|
|
58
|
-
{ [`${
|
|
59
|
-
{ [`${
|
|
60
|
-
{ [`${
|
|
61
|
-
|
|
52
|
+
className: d(
|
|
53
|
+
{ [`${r}__content--lg`]: i },
|
|
54
|
+
{ [`${r}--transition`]: n },
|
|
55
|
+
{ [`${r}--expanded`]: !a },
|
|
56
|
+
s
|
|
62
57
|
),
|
|
63
|
-
children:
|
|
58
|
+
children: o
|
|
64
59
|
}
|
|
65
|
-
) }),
|
|
66
|
-
isLocked:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
isControlled: a = !0,
|
|
75
|
-
...l
|
|
60
|
+
) }), z = ({
|
|
61
|
+
isLocked: o,
|
|
62
|
+
variation: r,
|
|
63
|
+
label: t,
|
|
64
|
+
isLastItem: n,
|
|
65
|
+
hasTransition: i = !1,
|
|
66
|
+
children: a,
|
|
67
|
+
isControlled: s = !0,
|
|
68
|
+
...c
|
|
76
69
|
}) => {
|
|
77
|
-
const [
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
|
|
70
|
+
const [m, g] = f(!0), { className: $ } = h(c, "Accordion"), l = r === "lg", u = `${$}-item`;
|
|
71
|
+
return /* @__PURE__ */ I(
|
|
72
|
+
A,
|
|
80
73
|
{
|
|
81
|
-
disabled:
|
|
82
|
-
value:
|
|
83
|
-
className:
|
|
74
|
+
disabled: o,
|
|
75
|
+
value: t,
|
|
76
|
+
className: d(u, { [`${u}__border-bottom`]: !n }),
|
|
84
77
|
children: [
|
|
85
78
|
/* @__PURE__ */ e(
|
|
86
|
-
|
|
79
|
+
j,
|
|
87
80
|
{
|
|
88
|
-
disable:
|
|
89
|
-
isLargeVariation:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
children: o
|
|
81
|
+
disable: o,
|
|
82
|
+
isLargeVariation: l,
|
|
83
|
+
isCollapsed: m,
|
|
84
|
+
setIsCollapsed: s ? g : C,
|
|
85
|
+
id: c == null ? void 0 : c.id,
|
|
86
|
+
baseClassName: `${u}-label`,
|
|
87
|
+
children: t
|
|
96
88
|
}
|
|
97
89
|
),
|
|
98
90
|
/* @__PURE__ */ e(
|
|
99
|
-
|
|
91
|
+
k,
|
|
100
92
|
{
|
|
101
|
-
disable:
|
|
102
|
-
hasTransition:
|
|
103
|
-
isLargeVariation:
|
|
104
|
-
isCollapsed:
|
|
105
|
-
baseClassName:
|
|
106
|
-
children:
|
|
93
|
+
disable: o,
|
|
94
|
+
hasTransition: i,
|
|
95
|
+
isLargeVariation: l,
|
|
96
|
+
isCollapsed: m,
|
|
97
|
+
baseClassName: u,
|
|
98
|
+
children: a
|
|
107
99
|
}
|
|
108
100
|
)
|
|
109
101
|
]
|
|
@@ -111,5 +103,5 @@ const B = ({
|
|
|
111
103
|
);
|
|
112
104
|
};
|
|
113
105
|
export {
|
|
114
|
-
|
|
106
|
+
z as default
|
|
115
107
|
};
|
package/dist/scss/_type.scss
CHANGED
package/dist/scss/_utils.scss
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// 🌎 Globals
|
|
2
|
+
|
|
3
|
+
// @TODO: reset styles when we can do a site wide regressions QA in phillips-public
|
|
4
|
+
// @use 'reset';
|
|
5
|
+
|
|
6
|
+
// ⚛️ Components
|
|
7
|
+
@use 'components/Button/button';
|
|
8
|
+
@use 'components/IconButton/iconButton';
|
|
9
|
+
@use 'components/Footer/footer';
|
|
10
|
+
@use 'components/Grid/grid';
|
|
11
|
+
@use 'components/Header/header';
|
|
12
|
+
@use 'components/HeroBanner/heroBanner';
|
|
13
|
+
@use 'components/Navigation/navigation';
|
|
14
|
+
@use 'components/Navigation/NavigationItem/navigationItem';
|
|
15
|
+
@use 'components/Navigation/NavigationItemTrigger/navigationItemTrigger';
|
|
16
|
+
@use 'components/Navigation/NavigationList/navigationList';
|
|
17
|
+
@use 'components/Input/input';
|
|
18
|
+
@use 'components/Row/row';
|
|
19
|
+
@use 'components/GridItem/gridItem';
|
|
20
|
+
@use 'components/Search/search';
|
|
21
|
+
@use 'components/Social/social';
|
|
22
|
+
@use 'components/SplitPanel/splitPanel';
|
|
23
|
+
@use 'components/Subscribe/subscribe';
|
|
24
|
+
@use 'components/Toggle/toggle';
|
|
25
|
+
@use 'components/UserManagement/userManagement';
|
|
26
|
+
@use 'components/ViewingsList/viewingsList';
|
|
27
|
+
@use 'components/Link/link';
|
|
28
|
+
@use 'components/LinkBlock/linkBlock';
|
|
29
|
+
@use 'components/LinkList/linkList';
|
|
30
|
+
@use 'components/Text/text';
|
|
31
|
+
@use 'components/Modal/modal';
|
|
32
|
+
@use 'components/Accordion/accordion';
|
|
33
|
+
@use 'components/Breadcrumb/breadcrumb';
|
|
34
|
+
@use 'components/Drawer/drawer';
|
|
35
|
+
@use 'components/HTMLParser/htmlParser';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../../allPartials' as *;
|
package/package.json
CHANGED
package/dist/scss/styles.scss
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// 🌎 Globals
|
|
2
|
-
@import './vars';
|
|
3
|
-
|
|
4
|
-
// @TODO: add styles when we can do a site wide regressions QA
|
|
5
|
-
|
|
6
|
-
// @use 'reset';
|
|
7
|
-
@import './typography';
|
|
8
|
-
@import './sharedClasses';
|
|
9
|
-
|
|
10
|
-
// 📑 Pages
|
|
11
|
-
@import 'pages/page';
|
|
12
|
-
|
|
13
|
-
// ⚛️ Components
|
|
14
|
-
@import 'components/Button/button';
|
|
15
|
-
@import 'components/IconButton/iconButton';
|
|
16
|
-
@import 'components/Footer/footer';
|
|
17
|
-
@import 'components/Grid/grid';
|
|
18
|
-
@import 'components/Header/header';
|
|
19
|
-
@import 'components/HeroBanner/heroBanner';
|
|
20
|
-
@import 'components/Navigation/navigation';
|
|
21
|
-
@import 'components/Navigation/NavigationItem/navigationItem';
|
|
22
|
-
@import 'components/Navigation/NavigationItemTrigger/navigationItemTrigger';
|
|
23
|
-
@import 'components/Navigation/NavigationList/navigationList';
|
|
24
|
-
@import 'components/Input/input';
|
|
25
|
-
@import 'components/Row/row';
|
|
26
|
-
@import 'components/GridItem/gridItem';
|
|
27
|
-
@import 'components/Search/search';
|
|
28
|
-
@import 'components/Social/social';
|
|
29
|
-
@import 'components/SplitPanel/splitPanel';
|
|
30
|
-
@import 'components/Subscribe/subscribe';
|
|
31
|
-
@import 'components/Toggle/toggle';
|
|
32
|
-
@import 'components/UserManagement/userManagement';
|
|
33
|
-
@import 'components/ViewingsList/viewingsList';
|
|
34
|
-
@import 'components/Link/link';
|
|
35
|
-
@import 'components/LinkBlock/linkBlock';
|
|
36
|
-
@import 'components/LinkList/linkList';
|
|
37
|
-
@import 'components/Text/text';
|
|
38
|
-
@import 'components/Modal/modal';
|
|
39
|
-
@import 'components/Accordion/accordion';
|
|
40
|
-
@import 'components/Breadcrumb/breadcrumb';
|
|
41
|
-
@import 'components/Drawer/drawer';
|
|
42
|
-
@import 'components/HTMLParser/htmlParser';
|