@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.
- 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/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +39 -34
- package/dist/components/Drawer/Drawer.d.ts +23 -0
- package/dist/components/Drawer/Drawer.js +46 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +44 -38
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +237 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +119 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +67 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +260 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +69 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +32 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/react-modal/lib/components/Modal.js +6 -6
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +62 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/react-remove-scroll/node_modules/tslib/tslib.es6.js +27 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
- package/dist/node_modules/use-sidecar/node_modules/tslib/tslib.es6.js +21 -0
- package/dist/scss/_vars.scss +2 -0
- package/dist/scss/components/Accordion/_accordion.scss +104 -0
- package/dist/scss/components/Drawer/_drawer.scss +66 -0
- package/dist/scss/components/Subscribe/_subscribe.scss +1 -0
- package/dist/scss/styles.scss +2 -0
- package/package.json +8 -6
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const C = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.4%209.7H15.6571V8.21429C15.6571%206.164%2013.9931%204.5%2011.9429%204.5C9.89257%204.5%208.22857%206.164%208.22857%208.21429V9.7H7.48571C6.66857%209.7%206%2010.3686%206%2011.1857V18.6143C6%2019.4314%206.66857%2020.1%207.48571%2020.1H16.4C17.2171%2020.1%2017.8857%2019.4314%2017.8857%2018.6143V11.1857C17.8857%2010.3686%2017.2171%209.7%2016.4%209.7ZM12%2017.175C11.1829%2017.175%2010.5%2014.9921%2010.5%2014.175C10.5%2013.3579%2011.1829%2013.05%2012%2013.05C12.8171%2013.05%2013.5%2013.3579%2013.5%2014.175C13.5%2014.9921%2012.8171%2017.175%2012%2017.175ZM9.375%209.7V7.8C9.375%206.56685%2010.7669%205.55%2012%205.55C13.2331%205.55%2014.625%206.56685%2014.625%207.8V9.7H9.375Z'%20fill='%23545454'/%3e%3c/svg%3e";
|
|
2
|
+
export {
|
|
3
|
+
C as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.5%2011.8929C4.5%2011.4195%204.83579%2011.0357%205.25%2011.0357L18.75%2011.0357C19.1642%2011.0357%2019.5%2011.4195%2019.5%2011.8929C19.5%2012.3662%2019.1642%2012.75%2018.75%2012.75L5.25%2012.75C4.83579%2012.75%204.5%2012.3662%204.5%2011.8929Z'%20fill='%23323232'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.5%2011.8929C4.5%2011.4195%204.83579%2011.0357%205.25%2011.0357L18.75%2011.0357C19.1642%2011.0357%2019.5%2011.4195%2019.5%2011.8929C19.5%2012.3662%2019.1642%2012.75%2018.75%2012.75L5.25%2012.75C4.83579%2012.75%204.5%2012.3662%204.5%2011.8929Z'%20fill='%23323232'/%3e%3c/svg%3e";
|
|
2
|
+
export {
|
|
3
|
+
e as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.5%2011.8929C4.5%2011.4195%204.83579%2011.0357%205.25%2011.0357L18.75%2011.0357C19.1642%2011.0357%2019.5%2011.4195%2019.5%2011.8929C19.5%2012.3662%2019.1642%2012.75%2018.75%2012.75L5.25%2012.75C4.83579%2012.75%204.5%2012.3662%204.5%2011.8929Z'%20fill='%23323232'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.1071%204.5C12.5805%204.5%2012.9643%204.83579%2012.9643%205.25L12.9643%2018.75C12.9643%2019.1642%2012.5805%2019.5%2012.1071%2019.5C11.6338%2019.5%2011.25%2019.1642%2011.25%2018.75L11.25%205.25C11.25%204.83579%2011.6338%204.5%2012.1071%204.5Z'%20fill='%23323232'/%3e%3c/svg%3e";
|
|
2
|
+
export {
|
|
3
|
+
e as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Unique id for component testing
|
|
5
|
+
*/
|
|
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
|
+
/**
|
|
12
|
+
* Child element pass in to display as item content.
|
|
13
|
+
*/
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
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;
|
|
26
|
+
export default AccordionComponent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import n from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as r } from "../../utils/index.js";
|
|
4
|
+
import { Root as i } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
5
|
+
const C = ({ className: m, type: s = "single", children: t, ...o }) => {
|
|
6
|
+
const { className: a, ...e } = r(o, "Accordion");
|
|
7
|
+
return /* @__PURE__ */ c(
|
|
8
|
+
i,
|
|
9
|
+
{
|
|
10
|
+
className: n(`${a}`, m),
|
|
11
|
+
type: s,
|
|
12
|
+
...e,
|
|
13
|
+
id: o == null ? void 0 : o.id,
|
|
14
|
+
collapsible: !0,
|
|
15
|
+
children: t
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
C as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* When true, prevents border bottom style from being applied to the item.
|
|
5
|
+
*/
|
|
6
|
+
isLastItem?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* When true, prevents the user from interacting with the item.
|
|
9
|
+
*/
|
|
10
|
+
isLocked: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* When true applied the lock variation icon.
|
|
13
|
+
*/
|
|
14
|
+
isLockedVariation?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Determines whether the variation on text style is large or small.
|
|
17
|
+
*/
|
|
18
|
+
variation: string;
|
|
19
|
+
/**
|
|
20
|
+
* Text string for the Accordion header for label.
|
|
21
|
+
*/
|
|
22
|
+
label: string;
|
|
23
|
+
/**
|
|
24
|
+
* Child element pass in to display as item content.
|
|
25
|
+
*/
|
|
26
|
+
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
|
+
/**
|
|
32
|
+
* When true applied the transition keyframe animation on item expand. Default as false.
|
|
33
|
+
*/
|
|
34
|
+
hasTransition?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare const AccordionItem: ({ isLocked, isLockedVariation, variation, label, isLastItem, hasTransition, children, type, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export default AccordionItem;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsxs as f, jsx as e, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v } from "react";
|
|
3
|
+
import { getCommonProps as x } from "../../utils/index.js";
|
|
4
|
+
import p from "../../assets/plus.svg.js";
|
|
5
|
+
import C from "../../assets/minus.svg.js";
|
|
6
|
+
import A from "../../assets/lock.svg.js";
|
|
7
|
+
import m from "../../node_modules/classnames/index.js";
|
|
8
|
+
import { Item as T, Trigger as j, Content as k } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
9
|
+
const N = ({
|
|
10
|
+
children: o,
|
|
11
|
+
className: c,
|
|
12
|
+
baseClassName: t,
|
|
13
|
+
disable: n,
|
|
14
|
+
isCollapsed: i,
|
|
15
|
+
setIsCollapsed: d,
|
|
16
|
+
isLargeVariation: l,
|
|
17
|
+
isLockedVariation: s,
|
|
18
|
+
id: r
|
|
19
|
+
}) => {
|
|
20
|
+
const a = () => !n && d((I) => !I), u = n ? A : i ? p : C, $ = `${r}-` + (n ? "lockedIcon" : s ? "lockBlueIcon" : i ? "plusIcon" : "minusIcon");
|
|
21
|
+
return /* @__PURE__ */ e(
|
|
22
|
+
j,
|
|
23
|
+
{
|
|
24
|
+
"data-disabled": n,
|
|
25
|
+
asChild: !0,
|
|
26
|
+
className: m(t, { [`${t}--hoverable`]: !n }, c),
|
|
27
|
+
children: /* @__PURE__ */ f("div", { onClick: a, "data-testid": `${r}-trigger`, children: [
|
|
28
|
+
/* @__PURE__ */ e("div", { className: m(`${t}__text`, { [`${t}__text--lg`]: l }), children: o }),
|
|
29
|
+
/* @__PURE__ */ e(
|
|
30
|
+
"img",
|
|
31
|
+
{
|
|
32
|
+
className: m(
|
|
33
|
+
`${t}__icon`,
|
|
34
|
+
{ [`${t}__icon--lg`]: l },
|
|
35
|
+
s && `${t}--blue-fill`
|
|
36
|
+
),
|
|
37
|
+
src: u,
|
|
38
|
+
"data-testid": $,
|
|
39
|
+
"aria-hidden": !0
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] })
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}, P = ({
|
|
46
|
+
children: o,
|
|
47
|
+
baseClassName: c,
|
|
48
|
+
disable: t,
|
|
49
|
+
hasTransition: n,
|
|
50
|
+
isLargeVariation: i,
|
|
51
|
+
isCollapsed: d,
|
|
52
|
+
className: l
|
|
53
|
+
}) => /* @__PURE__ */ e(h, { children: t && o ? /* @__PURE__ */ e("div", { children: o }) : /* @__PURE__ */ e(
|
|
54
|
+
k,
|
|
55
|
+
{
|
|
56
|
+
asChild: !0,
|
|
57
|
+
className: m(
|
|
58
|
+
{ [`${c}__content--lg`]: i },
|
|
59
|
+
{ [`${c}--transition`]: n },
|
|
60
|
+
{ [`${c}--expanded`]: !d },
|
|
61
|
+
l
|
|
62
|
+
),
|
|
63
|
+
children: o
|
|
64
|
+
}
|
|
65
|
+
) }), z = ({
|
|
66
|
+
isLocked: o,
|
|
67
|
+
isLockedVariation: c,
|
|
68
|
+
variation: t,
|
|
69
|
+
label: n,
|
|
70
|
+
isLastItem: i,
|
|
71
|
+
hasTransition: d = !1,
|
|
72
|
+
children: l,
|
|
73
|
+
type: s = "single",
|
|
74
|
+
...r
|
|
75
|
+
}) => {
|
|
76
|
+
const [a, u] = v(!0), { className: $, ...I } = x(r, "Accordion"), _ = t === "lg", g = `${$}-item`;
|
|
77
|
+
return /* @__PURE__ */ f(
|
|
78
|
+
T,
|
|
79
|
+
{
|
|
80
|
+
disabled: o,
|
|
81
|
+
value: I["data-testid"],
|
|
82
|
+
className: m(g, { [`${g}__border-bottom`]: !i }),
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ e(
|
|
85
|
+
N,
|
|
86
|
+
{
|
|
87
|
+
disable: o,
|
|
88
|
+
isLargeVariation: _,
|
|
89
|
+
isLockedVariation: c,
|
|
90
|
+
isCollapsed: a,
|
|
91
|
+
setIsCollapsed: u,
|
|
92
|
+
id: s === "single" ? r == null ? void 0 : r.id : void 0,
|
|
93
|
+
baseClassName: `${g}-label`,
|
|
94
|
+
children: n
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ e(
|
|
98
|
+
P,
|
|
99
|
+
{
|
|
100
|
+
disable: o,
|
|
101
|
+
hasTransition: d,
|
|
102
|
+
isLargeVariation: _,
|
|
103
|
+
isCollapsed: a,
|
|
104
|
+
baseClassName: g,
|
|
105
|
+
children: l
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
z as default
|
|
114
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface AccordionHeaderType {
|
|
2
|
+
/**
|
|
3
|
+
* Child element pass in to display as header label.
|
|
4
|
+
*/
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Option class user may set to header.
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Base class for header component.
|
|
12
|
+
*/
|
|
13
|
+
baseClassName: string;
|
|
14
|
+
disable: boolean;
|
|
15
|
+
isCollapsed: boolean;
|
|
16
|
+
setIsCollapsed: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
|
+
isLargeVariation: boolean;
|
|
18
|
+
isLockedVariation?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Unique id for icon component testing
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface AccordionContentType {
|
|
25
|
+
/**
|
|
26
|
+
* Child element pass in to display as content.
|
|
27
|
+
*/
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Option class user may set to header.
|
|
31
|
+
*/
|
|
32
|
+
className?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Base class for content component.
|
|
35
|
+
*/
|
|
36
|
+
baseClassName: string;
|
|
37
|
+
disable: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* When true applied the transition keyframe animation on item expand. Default as false.
|
|
40
|
+
*/
|
|
41
|
+
hasTransition?: boolean;
|
|
42
|
+
isLargeVariation: boolean;
|
|
43
|
+
isCollapsed: boolean;
|
|
44
|
+
}
|
|
@@ -37,5 +37,5 @@ export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
37
37
|
*
|
|
38
38
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-button--overview)
|
|
39
39
|
*/
|
|
40
|
-
declare const Button: (
|
|
40
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
41
|
export default Button;
|
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import p from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { getCommonProps as u } from "../../utils/index.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
4
|
+
import { forwardRef as d } from "react";
|
|
5
|
+
const $ = d(
|
|
6
|
+
({
|
|
7
|
+
buttonType: t = "primary",
|
|
8
|
+
size: a = "md",
|
|
9
|
+
children: m,
|
|
10
|
+
className: r,
|
|
11
|
+
isIconLast: e = !1,
|
|
12
|
+
type: n = "button",
|
|
13
|
+
isDisabled: l = !1,
|
|
14
|
+
...s
|
|
15
|
+
}, f) => {
|
|
16
|
+
const { className: o, ...i } = u(s, "Button");
|
|
17
|
+
return /* @__PURE__ */ c(
|
|
18
|
+
"button",
|
|
19
|
+
{
|
|
20
|
+
...i,
|
|
21
|
+
ref: f,
|
|
22
|
+
type: n,
|
|
23
|
+
className: p(
|
|
24
|
+
`${o}`,
|
|
25
|
+
`${o}--${a}`,
|
|
26
|
+
`${o}--${t}`,
|
|
27
|
+
{
|
|
28
|
+
[`${o}--icon-last`]: e
|
|
29
|
+
},
|
|
30
|
+
r
|
|
31
|
+
),
|
|
32
|
+
disabled: l,
|
|
33
|
+
...s,
|
|
34
|
+
children: m
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
$.displayName = "Button";
|
|
35
40
|
export {
|
|
36
|
-
|
|
41
|
+
$ as default
|
|
37
42
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the drawer is open or not
|
|
5
|
+
*/
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Callback when the drawer is closed
|
|
9
|
+
*/
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* The content of the drawer
|
|
13
|
+
*/
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* ## Overview
|
|
18
|
+
*
|
|
19
|
+
* A component for displaying a drawer.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
declare const Drawer: ({ className, isOpen, onClose, children, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Drawer;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as d, noOp as p } from "../../utils/index.js";
|
|
3
|
+
import a from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { Root as f, Portal as C, Overlay as h, Content as N, Title as u, Description as v, Close as w } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
5
|
+
import _ from "../../assets/close.svg.js";
|
|
6
|
+
import g from "../IconButton/IconButton.js";
|
|
7
|
+
const j = ({ className: l, isOpen: i = !1, onClose: r = p, children: m, ...s }) => {
|
|
8
|
+
const { className: o, ...n } = d(s, "Drawer");
|
|
9
|
+
return /* @__PURE__ */ e(
|
|
10
|
+
f,
|
|
11
|
+
{
|
|
12
|
+
open: i,
|
|
13
|
+
onOpenChange: (c) => {
|
|
14
|
+
c || r();
|
|
15
|
+
},
|
|
16
|
+
children: /* @__PURE__ */ t(C, { children: [
|
|
17
|
+
/* @__PURE__ */ e(
|
|
18
|
+
h,
|
|
19
|
+
{
|
|
20
|
+
onClick: r,
|
|
21
|
+
className: a(`${o}__overlay`),
|
|
22
|
+
"data-testid": "drawer-overlay"
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ t(N, { className: a(o, l), id: s.id, ...n, children: [
|
|
26
|
+
/* @__PURE__ */ e(u, {}),
|
|
27
|
+
/* @__PURE__ */ e(v, {}),
|
|
28
|
+
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
|
|
29
|
+
g,
|
|
30
|
+
{
|
|
31
|
+
onClick: r,
|
|
32
|
+
className: a(`${o}__close`),
|
|
33
|
+
"aria-label": "Close",
|
|
34
|
+
"data-testid": "drawer-close",
|
|
35
|
+
children: /* @__PURE__ */ e(_, {})
|
|
36
|
+
}
|
|
37
|
+
) }),
|
|
38
|
+
m
|
|
39
|
+
] })
|
|
40
|
+
] })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
j as default
|
|
46
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -27,8 +27,10 @@ export { SubscriptionState } from './components/Subscribe/types';
|
|
|
27
27
|
export { default as Social, type SocialProps } from './components/Social/Social';
|
|
28
28
|
export { default as ViewingsList, type ViewingsListProps } from './components/ViewingsList/ViewingsList';
|
|
29
29
|
export { default as Modal, type ModalProps } from './components/Modal/Modal';
|
|
30
|
+
export { default as Drawer } from './components/Drawer/Drawer';
|
|
30
31
|
export { default as StatefulViewingsList, type StatefulViewingsListProps, } from './components/ViewingsList/StatefulViewingsList';
|
|
31
32
|
export * from './components/Text';
|
|
33
|
+
export * from './components/Accordion';
|
|
32
34
|
export { default as UserManagement, type UserManagementProps } from './components/UserManagement/UserManagement';
|
|
33
35
|
export * from './types/commonTypes';
|
|
34
36
|
export { Breadcrumb, type BreadcrumbProps } from './components/Breadcrumb';
|
package/dist/index.js
CHANGED
|
@@ -1,75 +1,81 @@
|
|
|
1
1
|
import { PaddingTokens as a, defaultYear as f, emailValidation as m, generatePaddingClassName as p, getCommonProps as s, noOp as d, px as l, useNormalizedInputProps as u } from "./utils/index.js";
|
|
2
2
|
import { default as x } from "./pages/Page.js";
|
|
3
3
|
import { default as g } from "./components/Button/Button.js";
|
|
4
|
-
import { default as
|
|
4
|
+
import { default as L } from "./components/IconButton/IconButton.js";
|
|
5
5
|
import { default as I } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
6
6
|
import { default as B } from "./components/Footer/Footer.js";
|
|
7
7
|
import { Grid as P } from "./components/Grid/Grid.js";
|
|
8
8
|
import { default as b } from "./components/Header/Header.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { LinkVariants as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
9
|
+
import { default as w } from "./components/Navigation/Navigation.js";
|
|
10
|
+
import { default as A } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
11
|
+
import { default as C } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
12
|
+
import { default as M } from "./components/Navigation/NavigationList/NavigationList.js";
|
|
13
|
+
import { default as y } from "./components/HeroBanner/HeroBanner.js";
|
|
14
|
+
import { default as D } from "./components/Input/Input.js";
|
|
15
|
+
import { default as F } from "./components/Link/Link.js";
|
|
16
|
+
import { LinkVariants as R } from "./components/Link/utils.js";
|
|
17
|
+
import { default as Y } from "./components/LinkBlock/LinkBlock.js";
|
|
18
|
+
import { default as q } from "./components/LinkList/LinkList.js";
|
|
19
19
|
import { default as K } from "./components/Row/Row.js";
|
|
20
20
|
import { default as W } from "./components/GridItem/GridItem.js";
|
|
21
21
|
import { GridItemAlign as Z } from "./components/GridItem/types.js";
|
|
22
22
|
import { default as $ } from "./components/Search/Search.js";
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
23
|
+
import { default as re } from "./components/Select/Select.js";
|
|
24
|
+
import { default as te } from "./components/SplitPanel/SplitPanel.js";
|
|
25
25
|
import { default as fe } from "./components/Subscribe/Subscribe.js";
|
|
26
26
|
import { SubscriptionState as pe } from "./components/Subscribe/types.js";
|
|
27
27
|
import { default as de } from "./components/Social/Social.js";
|
|
28
28
|
import { default as ue } from "./components/ViewingsList/ViewingsList.js";
|
|
29
29
|
import { default as xe } from "./components/Modal/Modal.js";
|
|
30
|
-
import { default as ge } from "./components/
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { default as Be } from "./components/
|
|
34
|
-
import {
|
|
35
|
-
import { default as be } from "./components/
|
|
30
|
+
import { default as ge } from "./components/Drawer/Drawer.js";
|
|
31
|
+
import { default as Le } from "./components/ViewingsList/StatefulViewingsList.js";
|
|
32
|
+
import { TextVariants as Ie } from "./components/Text/types.js";
|
|
33
|
+
import { default as Be } from "./components/Text/Text.js";
|
|
34
|
+
import { default as Pe } from "./components/Accordion/Accordion.js";
|
|
35
|
+
import { default as be } from "./components/Accordion/AccordionItem.js";
|
|
36
|
+
import { default as we } from "./components/UserManagement/UserManagement.js";
|
|
37
|
+
import { SupportedLanguages as Ae } from "./types/commonTypes.js";
|
|
38
|
+
import { default as Ce } from "./components/Breadcrumb/Breadcrumb.js";
|
|
36
39
|
import "react/jsx-runtime";
|
|
37
40
|
import "./node_modules/classnames/index.js";
|
|
38
41
|
export {
|
|
39
|
-
|
|
42
|
+
Pe as Accordion,
|
|
43
|
+
be as AccordionItem,
|
|
44
|
+
Ce as Breadcrumb,
|
|
40
45
|
g as Button,
|
|
46
|
+
ge as Drawer,
|
|
41
47
|
I as ErrorBoundary,
|
|
42
48
|
B as Footer,
|
|
43
49
|
P as Grid,
|
|
44
50
|
W as GridItem,
|
|
45
51
|
Z as GridItemAlign,
|
|
46
52
|
b as Header,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
y as HeroBanner,
|
|
54
|
+
L as IconButton,
|
|
55
|
+
D as Input,
|
|
56
|
+
F as Link,
|
|
57
|
+
Y as LinkBlock,
|
|
58
|
+
q as LinkList,
|
|
59
|
+
R as LinkVariants,
|
|
54
60
|
xe as Modal,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
w as Navigation,
|
|
62
|
+
A as NavigationItem,
|
|
63
|
+
C as NavigationItemTrigger,
|
|
64
|
+
M as NavigationList,
|
|
59
65
|
a as PaddingTokens,
|
|
60
66
|
x as Page,
|
|
61
67
|
K as Row,
|
|
62
68
|
$ as Search,
|
|
63
|
-
|
|
69
|
+
re as Select,
|
|
64
70
|
de as Social,
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
te as SplitPanel,
|
|
72
|
+
Le as StatefulViewingsList,
|
|
67
73
|
fe as Subscribe,
|
|
68
74
|
pe as SubscriptionState,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
Ae as SupportedLanguages,
|
|
76
|
+
Be as Text,
|
|
77
|
+
Ie as TextVariants,
|
|
78
|
+
we as UserManagement,
|
|
73
79
|
ue as ViewingsList,
|
|
74
80
|
f as defaultYear,
|
|
75
81
|
m as emailValidation,
|