@phillips/seldon 1.171.1 → 1.173.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/components/Drawer/Drawer.d.ts +22 -3
- package/dist/components/Drawer/Drawer.js +80 -73
- package/dist/components/Drawer/Drawer.stories.d.ts +97 -2
- package/dist/components/Drawer/DrawerHeader.d.ts +12 -0
- package/dist/components/Drawer/DrawerHeader.js +34 -0
- package/dist/components/Drawer/DrawerHeader.test.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +8 -0
- package/dist/components/Input/Input.js +88 -74
- package/dist/components/Input/Input.stories.d.ts +142 -0
- package/dist/patterns/FiltersInline/MainFilterDropdown.js +23 -22
- package/dist/patterns/FiltersInline/SubFilterDropdown.js +67 -66
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Drawer/_drawer.scss +43 -16
- package/dist/scss/components/Drawer/_drawerHeader.scss +45 -0
- package/dist/scss/components/Input/_input.scss +61 -4
- package/dist/scss/components/Toggle/_toggle.scss +2 -1
- package/package.json +1 -1
|
@@ -12,14 +12,33 @@ export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
* The content of the drawer
|
|
13
13
|
*/
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* A string to be displayed center at the top of the drawer, up with the close button.
|
|
17
|
+
* Its presence also triggers the horizontal rule below the header to be rendered.
|
|
18
|
+
*/
|
|
19
|
+
headerText?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Used as the accessibility label for the drawer, used for screen readers.
|
|
22
|
+
* Defaults to the headerText if that's provided, otherwise an empty string.
|
|
23
|
+
*/
|
|
24
|
+
title?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Used as the accessibility description for the drawer, used for screen readers.
|
|
27
|
+
* Defaults to the title if that's provided, otherwise an empty string.
|
|
28
|
+
*/
|
|
29
|
+
description?: string;
|
|
15
30
|
/**
|
|
16
31
|
* Which side the drawer opens from: left, right, or bottom
|
|
17
32
|
*/
|
|
18
33
|
drawerOpenSide?: 'left' | 'right' | 'bottom';
|
|
19
34
|
/**
|
|
20
|
-
*
|
|
35
|
+
* Older designs for left/right drawers have more padding around the content.
|
|
36
|
+
* This value is in rem, and must be an integer under 3.
|
|
37
|
+
*
|
|
38
|
+
* Default is 2 if null or undefined, or 1 if headingText is supplied. This is silly
|
|
39
|
+
* but aligns with design and allows this prop to be left out most of the time.
|
|
21
40
|
*/
|
|
22
|
-
|
|
41
|
+
paddingLevel?: 0 | 1 | 2;
|
|
23
42
|
}
|
|
24
43
|
/**
|
|
25
44
|
* ## Overview
|
|
@@ -27,5 +46,5 @@ export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
27
46
|
* A component for displaying a drawer.
|
|
28
47
|
*
|
|
29
48
|
*/
|
|
30
|
-
declare const Drawer:
|
|
49
|
+
declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
50
|
export default Drawer;
|
|
@@ -1,80 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import s from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { Root as $, Portal as w, Overlay as D, Content as b, Title as v, Description as B, Close as P } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
5
|
+
import { VisuallyHidden as n } from "../../node_modules/@radix-ui/react-visually-hidden/dist/index.js";
|
|
6
|
+
import { getCommonProps as j, noOp as k } from "../../utils/index.js";
|
|
7
|
+
import H from "./DrawerHeader.js";
|
|
8
|
+
import I from "../IconButton/IconButton.js";
|
|
9
|
+
import { ButtonVariants as R } from "../Button/types.js";
|
|
10
|
+
import V from "../Icon/Icon.js";
|
|
11
|
+
const g = y(
|
|
12
|
+
({
|
|
13
|
+
isOpen: d,
|
|
14
|
+
onClose: t = k,
|
|
15
|
+
headerText: a,
|
|
16
|
+
title: m,
|
|
17
|
+
description: f = m,
|
|
18
|
+
drawerOpenSide: e = "right",
|
|
19
|
+
paddingLevel: i,
|
|
20
|
+
className: h,
|
|
21
|
+
children: p,
|
|
22
|
+
...l
|
|
23
|
+
}, C) => {
|
|
24
|
+
const { className: o, ...u } = j(l, "Drawer"), N = e === "bottom";
|
|
25
|
+
return i ?? (i = a ? 1 : 2), /* @__PURE__ */ r(
|
|
26
|
+
$,
|
|
27
|
+
{
|
|
28
|
+
open: d,
|
|
29
|
+
onOpenChange: (_) => {
|
|
30
|
+
_ || t();
|
|
31
|
+
},
|
|
32
|
+
children: /* @__PURE__ */ c(w, { children: [
|
|
33
|
+
/* @__PURE__ */ r(D, { onClick: t, className: `${o}__overlay`, "data-testid": "drawer-overlay" }),
|
|
34
|
+
/* @__PURE__ */ c(
|
|
35
|
+
b,
|
|
36
|
+
{
|
|
37
|
+
className: s(o, h, {
|
|
38
|
+
[`${o}--bottom`]: N
|
|
39
|
+
}),
|
|
40
|
+
"data-side": e,
|
|
41
|
+
id: l.id,
|
|
42
|
+
ref: C,
|
|
43
|
+
...u,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ r(n, { asChild: !0, children: /* @__PURE__ */ r(v, { children: m }) }),
|
|
46
|
+
/* @__PURE__ */ r(n, { asChild: !0, children: /* @__PURE__ */ r(B, { children: f }) }),
|
|
47
|
+
a ? /* @__PURE__ */ r(
|
|
48
|
+
H,
|
|
49
49
|
{
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
baseClassName: o,
|
|
51
|
+
headerText: a,
|
|
52
|
+
onClose: t,
|
|
53
|
+
drawerOpenSide: e
|
|
54
|
+
}
|
|
55
|
+
) : /* @__PURE__ */ r(P, { asChild: !0, children: /* @__PURE__ */ r(
|
|
56
|
+
I,
|
|
57
|
+
{
|
|
58
|
+
onClick: t,
|
|
59
|
+
className: s(`${o}__close`),
|
|
52
60
|
"aria-label": "Close",
|
|
53
61
|
"data-testid": "drawer-close",
|
|
54
|
-
variant:
|
|
55
|
-
children: /* @__PURE__ */
|
|
62
|
+
variant: R.tertiary,
|
|
63
|
+
children: /* @__PURE__ */ r(V, { icon: "CloseX", color: "currentColor" })
|
|
56
64
|
}
|
|
57
65
|
) }),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
};
|
|
66
|
+
/* @__PURE__ */ r(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: s(
|
|
70
|
+
`${o}__content`,
|
|
71
|
+
i < 3 && `${o}__content--ep${i}`
|
|
72
|
+
),
|
|
73
|
+
children: p
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
g.displayName = "Drawer";
|
|
78
85
|
export {
|
|
79
|
-
|
|
86
|
+
g as default
|
|
80
87
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DrawerProps } from './Drawer';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<DrawerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
5
|
};
|
|
6
6
|
export default meta;
|
|
7
7
|
export declare const Playground: {
|
|
@@ -9,6 +9,101 @@ export declare const Playground: {
|
|
|
9
9
|
args: {
|
|
10
10
|
children: string;
|
|
11
11
|
isOpen: boolean;
|
|
12
|
+
headerText: string;
|
|
13
|
+
title: undefined;
|
|
14
|
+
drawerOpenSide: string;
|
|
15
|
+
paddingLevel: number;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
isOpen: {
|
|
19
|
+
control: string;
|
|
20
|
+
description: string;
|
|
21
|
+
defaultValue: boolean;
|
|
22
|
+
table: {
|
|
23
|
+
type: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
onClose: {
|
|
29
|
+
action: string;
|
|
30
|
+
description: string;
|
|
31
|
+
table: {
|
|
32
|
+
type: {
|
|
33
|
+
summary: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
children: {
|
|
38
|
+
control: string;
|
|
39
|
+
description: string;
|
|
40
|
+
table: {
|
|
41
|
+
type: {
|
|
42
|
+
summary: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
headerText: {
|
|
47
|
+
control: string;
|
|
48
|
+
description: string;
|
|
49
|
+
table: {
|
|
50
|
+
type: {
|
|
51
|
+
summary: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
title: {
|
|
56
|
+
control: string;
|
|
57
|
+
description: string;
|
|
58
|
+
table: {
|
|
59
|
+
type: {
|
|
60
|
+
summary: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
drawerOpenSide: {
|
|
65
|
+
control: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
options: string[];
|
|
69
|
+
description: string;
|
|
70
|
+
defaultValue: string;
|
|
71
|
+
table: {
|
|
72
|
+
type: {
|
|
73
|
+
summary: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
paddingLevel: {
|
|
78
|
+
control: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
options: (number | undefined)[];
|
|
82
|
+
description: string;
|
|
83
|
+
defaultValue: undefined;
|
|
84
|
+
table: {
|
|
85
|
+
type: {
|
|
86
|
+
summary: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
className: {
|
|
91
|
+
control: string;
|
|
92
|
+
description: string;
|
|
93
|
+
table: {
|
|
94
|
+
type: {
|
|
95
|
+
summary: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
id: {
|
|
100
|
+
control: string;
|
|
101
|
+
description: string;
|
|
102
|
+
table: {
|
|
103
|
+
type: {
|
|
104
|
+
summary: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
12
108
|
};
|
|
13
|
-
argTypes: {};
|
|
14
109
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { DrawerProps } from './Drawer';
|
|
3
|
+
type CommonProps = ComponentProps<'div'> & {
|
|
4
|
+
baseClassName: string;
|
|
5
|
+
drawerOpenSide: DrawerProps['drawerOpenSide'];
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type DrawerHeaderProps = CommonProps & {
|
|
9
|
+
headerText?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const DrawerHeader: import('react').ForwardRefExoticComponent<Omit<DrawerHeaderProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export default DrawerHeader;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as i, Fragment as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { Close as d } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
|
+
import f from "../IconButton/IconButton.js";
|
|
5
|
+
import { ButtonVariants as h } from "../Button/types.js";
|
|
6
|
+
import b from "../Icon/Icon.js";
|
|
7
|
+
const n = ({ baseClassName: a, drawerOpenSide: t, onClose: l, bookendSide: e, ...s }) => {
|
|
8
|
+
const r = t === "bottom" && e === "left" || t !== "bottom" && e === "right";
|
|
9
|
+
return /* @__PURE__ */ o("div", { className: `${a}__bookend ${a}__bookend-${e}`, ...s, children: r && /* @__PURE__ */ o(d, { asChild: !0, children: /* @__PURE__ */ o(f, { onClick: l, "aria-label": "Close", "data-testid": "drawer-close", variant: h.tertiary, children: /* @__PURE__ */ o(b, { icon: "CloseX", color: "currentColor" }) }) }) });
|
|
10
|
+
}, _ = m(
|
|
11
|
+
({ baseClassName: a, headerText: t, drawerOpenSide: l, onClose: e }, s) => {
|
|
12
|
+
const r = `${a}-header`;
|
|
13
|
+
return /* @__PURE__ */ i(c, { children: [
|
|
14
|
+
/* @__PURE__ */ i("div", { className: r, children: [
|
|
15
|
+
/* @__PURE__ */ o(n, { baseClassName: r, onClose: e, drawerOpenSide: l, bookendSide: "left" }),
|
|
16
|
+
/* @__PURE__ */ o("h3", { className: `${r}__title`, children: t }),
|
|
17
|
+
/* @__PURE__ */ o(
|
|
18
|
+
n,
|
|
19
|
+
{
|
|
20
|
+
baseClassName: r,
|
|
21
|
+
onClose: e,
|
|
22
|
+
drawerOpenSide: l,
|
|
23
|
+
bookendSide: "right"
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
] }),
|
|
27
|
+
t && /* @__PURE__ */ o("div", { className: `${r}__hr` })
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
_.displayName = "DrawerHeader";
|
|
32
|
+
export {
|
|
33
|
+
_ as default
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,14 @@ export interface InputProps extends Omit<React.ComponentProps<'input'>, 'size'>
|
|
|
4
4
|
* Optional className to be applied to the `<input>` node
|
|
5
5
|
*/
|
|
6
6
|
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional adornment to be displayed before the input value
|
|
9
|
+
*/
|
|
10
|
+
inputAdornment?: string | React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Optional position to place the adornment. Defaults to 'start'
|
|
13
|
+
*/
|
|
14
|
+
adornmentPosition?: 'start' | 'end';
|
|
7
15
|
/**
|
|
8
16
|
* Optionally provide the default value of the `<input>`. Should not be passed into controlled input!
|
|
9
17
|
*/
|
|
@@ -1,85 +1,99 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { px as t, useNormalizedInputProps as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as z from "react";
|
|
3
|
+
import p from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { px as t, useNormalizedInputProps as F } from "../../utils/index.js";
|
|
5
|
+
const q = z.forwardRef(
|
|
6
6
|
({
|
|
7
|
-
className:
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
[`${t}-input--
|
|
41
|
-
[`${t}-input--
|
|
42
|
-
[`${t}-input--
|
|
43
|
-
[`${
|
|
44
|
-
[`${t}-input--
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
7
|
+
className: s,
|
|
8
|
+
inputAdornment: i,
|
|
9
|
+
adornmentPosition: l = "start",
|
|
10
|
+
defaultValue: _,
|
|
11
|
+
disabled: h,
|
|
12
|
+
hideLabel: w,
|
|
13
|
+
id: e,
|
|
14
|
+
inline: b,
|
|
15
|
+
invalid: N,
|
|
16
|
+
invalidText: f,
|
|
17
|
+
labelText: v,
|
|
18
|
+
onChange: x,
|
|
19
|
+
onClick: y,
|
|
20
|
+
placeholder: I,
|
|
21
|
+
readOnly: d,
|
|
22
|
+
size: T = "md",
|
|
23
|
+
type: u = "text",
|
|
24
|
+
value: C,
|
|
25
|
+
warn: P,
|
|
26
|
+
warnText: j,
|
|
27
|
+
isSkeletonLoading: r,
|
|
28
|
+
...o
|
|
29
|
+
}, k) => {
|
|
30
|
+
const a = F({
|
|
31
|
+
disabled: h,
|
|
32
|
+
id: e,
|
|
33
|
+
invalid: N,
|
|
34
|
+
invalidText: f,
|
|
35
|
+
readOnly: d,
|
|
36
|
+
type: u,
|
|
37
|
+
warn: P,
|
|
38
|
+
warnText: j
|
|
39
|
+
}), R = p(`${t}-${u}-input`, `${t}-input`, `${t}-input--${T}`, {
|
|
40
|
+
[`${t}-input--inline`]: b,
|
|
41
|
+
[`${t}-input--readonly`]: d,
|
|
42
|
+
[`${t}-input--disabled`]: a.disabled,
|
|
43
|
+
[`${t}-input--invalid`]: a.invalid,
|
|
44
|
+
[`${t}-input--warn`]: a.warn,
|
|
45
|
+
[`${s}__wrapper`]: s,
|
|
46
|
+
[`${t}-input--hidden`]: o.hidden
|
|
47
|
+
}), m = [
|
|
48
|
+
"text",
|
|
49
|
+
"number",
|
|
50
|
+
"password",
|
|
51
|
+
"email",
|
|
52
|
+
"tel",
|
|
53
|
+
"url",
|
|
54
|
+
"search",
|
|
55
|
+
"date",
|
|
56
|
+
"datetime-local",
|
|
57
|
+
"month",
|
|
58
|
+
"time",
|
|
59
|
+
"week"
|
|
60
|
+
].includes(a.type ?? ""), $ = {
|
|
61
|
+
className: i && m ? p(`${t}-input__wrapper__input`, s, { [`${t}-skeleton`]: r }) : p(`${t}-input__input`, s, { [`${t}-skeleton`]: r }),
|
|
62
|
+
"data-testid": e,
|
|
63
|
+
disabled: a.disabled,
|
|
64
|
+
id: e,
|
|
65
|
+
onChange: x,
|
|
66
|
+
onClick: y,
|
|
67
|
+
placeholder: r ? "" : I,
|
|
68
|
+
readOnly: d,
|
|
69
|
+
ref: k,
|
|
70
|
+
type: a.type,
|
|
71
|
+
...a.type !== "checkbox" && a.type !== "radio" ? { value: C, defaultValue: _ } : {},
|
|
72
|
+
...o
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ c("div", { className: R, children: [
|
|
75
|
+
/* @__PURE__ */ n(
|
|
48
76
|
"label",
|
|
49
77
|
{
|
|
50
|
-
"data-testid": `label-${
|
|
51
|
-
htmlFor:
|
|
52
|
-
className:
|
|
53
|
-
[`${t}-input__label--hidden`]:
|
|
54
|
-
[`${t}-skeleton`]:
|
|
78
|
+
"data-testid": `label-${e}`,
|
|
79
|
+
htmlFor: e,
|
|
80
|
+
className: p(`${t}-input__label`, {
|
|
81
|
+
[`${t}-input__label--hidden`]: w,
|
|
82
|
+
[`${t}-skeleton`]: r
|
|
55
83
|
}),
|
|
56
|
-
children:
|
|
84
|
+
children: v
|
|
57
85
|
}
|
|
58
86
|
),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
"
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"data-testid": a,
|
|
66
|
-
disabled: i.disabled,
|
|
67
|
-
id: a,
|
|
68
|
-
onChange: h,
|
|
69
|
-
onClick: f,
|
|
70
|
-
placeholder: l ? "" : v,
|
|
71
|
-
readOnly: e,
|
|
72
|
-
ref: I,
|
|
73
|
-
type: i.type,
|
|
74
|
-
...i.type !== "checkbox" && i.type !== "radio" ? { value: w, defaultValue: o } : {},
|
|
75
|
-
...r
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
i.validation ? i.validation : /* @__PURE__ */ d("p", { className: n(`${t}-input__validation`), children: " " })
|
|
87
|
+
i && m ? /* @__PURE__ */ c("div", { className: `${t}-input__wrapper`, "data-testid": `wrapper-${e}`, children: [
|
|
88
|
+
l === "start" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${e}`, children: i }),
|
|
89
|
+
/* @__PURE__ */ n("input", { ...$ }),
|
|
90
|
+
l === "end" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${e}`, children: i })
|
|
91
|
+
] }) : /* @__PURE__ */ n("input", { ...$ }),
|
|
92
|
+
a.validation ? a.validation : /* @__PURE__ */ n("p", { className: p(`${t}-input__validation`), children: " " })
|
|
79
93
|
] });
|
|
80
94
|
}
|
|
81
95
|
);
|
|
82
|
-
|
|
96
|
+
q.displayName = "Input";
|
|
83
97
|
export {
|
|
84
|
-
|
|
98
|
+
q as default
|
|
85
99
|
};
|
|
@@ -80,6 +80,17 @@ export declare const CheckboxInput: {
|
|
|
80
80
|
type: string;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
inputAdornment: {
|
|
84
|
+
control: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
adornmentPosition: {
|
|
89
|
+
options: string[];
|
|
90
|
+
control: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
83
94
|
labelText: {
|
|
84
95
|
control: {
|
|
85
96
|
type: string;
|
|
@@ -177,6 +188,17 @@ export declare const RangeInput: {
|
|
|
177
188
|
type: string;
|
|
178
189
|
};
|
|
179
190
|
};
|
|
191
|
+
inputAdornment: {
|
|
192
|
+
control: {
|
|
193
|
+
type: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
adornmentPosition: {
|
|
197
|
+
options: string[];
|
|
198
|
+
control: {
|
|
199
|
+
type: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
180
202
|
labelText: {
|
|
181
203
|
control: {
|
|
182
204
|
type: string;
|
|
@@ -270,6 +292,17 @@ export declare const ControlledInput: {
|
|
|
270
292
|
type: string;
|
|
271
293
|
};
|
|
272
294
|
};
|
|
295
|
+
inputAdornment: {
|
|
296
|
+
control: {
|
|
297
|
+
type: string;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
adornmentPosition: {
|
|
301
|
+
options: string[];
|
|
302
|
+
control: {
|
|
303
|
+
type: string;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
273
306
|
labelText: {
|
|
274
307
|
control: {
|
|
275
308
|
type: string;
|
|
@@ -329,6 +362,104 @@ export declare const CustomLabel: {
|
|
|
329
362
|
};
|
|
330
363
|
argTypes: {};
|
|
331
364
|
};
|
|
365
|
+
export declare const InputWithAdornment: {
|
|
366
|
+
({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
367
|
+
args: {
|
|
368
|
+
labelText: string;
|
|
369
|
+
playgroundWidth: number;
|
|
370
|
+
size: string;
|
|
371
|
+
inputAdornment: import("react/jsx-runtime").JSX.Element;
|
|
372
|
+
adornmentPosition: string;
|
|
373
|
+
};
|
|
374
|
+
argTypes: {
|
|
375
|
+
className: {
|
|
376
|
+
control: {
|
|
377
|
+
type: string;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
defaultValue: {
|
|
381
|
+
control: {
|
|
382
|
+
type: string;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
disabled: {
|
|
386
|
+
control: {
|
|
387
|
+
type: string;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
invalid: {
|
|
391
|
+
control: {
|
|
392
|
+
type: string;
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
invalidText: {
|
|
396
|
+
control: {
|
|
397
|
+
type: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
inputAdornment: {
|
|
401
|
+
control: {
|
|
402
|
+
type: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
adornmentPosition: {
|
|
406
|
+
options: string[];
|
|
407
|
+
control: {
|
|
408
|
+
type: string;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
labelText: {
|
|
412
|
+
control: {
|
|
413
|
+
type: string;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
onChange: {
|
|
417
|
+
action: string;
|
|
418
|
+
};
|
|
419
|
+
onClick: {
|
|
420
|
+
action: string;
|
|
421
|
+
};
|
|
422
|
+
placeholder: {
|
|
423
|
+
control: {
|
|
424
|
+
type: string;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
playgroundWidth: {
|
|
428
|
+
control: {
|
|
429
|
+
type: string;
|
|
430
|
+
min: number;
|
|
431
|
+
max: number;
|
|
432
|
+
step: number;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
size: {
|
|
436
|
+
options: string[];
|
|
437
|
+
control: {
|
|
438
|
+
type: string;
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
type: {
|
|
442
|
+
control: {
|
|
443
|
+
type: string;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
value: {
|
|
447
|
+
control: {
|
|
448
|
+
type: string;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
warn: {
|
|
452
|
+
control: {
|
|
453
|
+
type: string;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
warnText: {
|
|
457
|
+
control: {
|
|
458
|
+
type: string;
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
};
|
|
332
463
|
export declare const Playground: {
|
|
333
464
|
({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
334
465
|
args: {
|
|
@@ -369,6 +500,17 @@ export declare const Playground: {
|
|
|
369
500
|
type: string;
|
|
370
501
|
};
|
|
371
502
|
};
|
|
503
|
+
inputAdornment: {
|
|
504
|
+
control: {
|
|
505
|
+
type: string;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
adornmentPosition: {
|
|
509
|
+
options: string[];
|
|
510
|
+
control: {
|
|
511
|
+
type: string;
|
|
512
|
+
};
|
|
513
|
+
};
|
|
372
514
|
labelText: {
|
|
373
515
|
control: {
|
|
374
516
|
type: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as A, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import N from "../../node_modules/classnames/index.js";
|
|
3
|
-
import
|
|
3
|
+
import g from "react";
|
|
4
4
|
import c from "../../components/Button/Button.js";
|
|
5
|
-
import { ButtonVariants as
|
|
5
|
+
import { ButtonVariants as x } from "../../components/Button/types.js";
|
|
6
6
|
import k from "../../components/Drawer/Drawer.js";
|
|
7
7
|
import B from "../../components/Filter/Filter.js";
|
|
8
8
|
import D from "../../components/Filter/FilterHeader.js";
|
|
@@ -12,7 +12,7 @@ import j from "../FilterMenu/FilterMenu.js";
|
|
|
12
12
|
import { FilterButton as H } from "./FilterButton.js";
|
|
13
13
|
import { FilterButtonIconType as I } from "./types.js";
|
|
14
14
|
import { countActiveFilters as O, getFilterButtonClickHandler as R, resetAllFilters as S } from "./utils.js";
|
|
15
|
-
const T =
|
|
15
|
+
const T = g.forwardRef(
|
|
16
16
|
({
|
|
17
17
|
className: f,
|
|
18
18
|
filterButtonLabel: n,
|
|
@@ -24,22 +24,22 @@ const T = x.forwardRef(
|
|
|
24
24
|
onClickClear: w,
|
|
25
25
|
resultsCount: F,
|
|
26
26
|
dropdownMenuTranslation: d,
|
|
27
|
-
ariaLabels:
|
|
27
|
+
ariaLabels: p = {},
|
|
28
28
|
id: h
|
|
29
29
|
}, _) => {
|
|
30
|
-
const
|
|
30
|
+
const s = i?.[0] ?? !1, { totalCount: y, filterCount: C } = O(m, n);
|
|
31
31
|
return /* @__PURE__ */ l(A, { children: [
|
|
32
32
|
/* @__PURE__ */ o(
|
|
33
33
|
H,
|
|
34
34
|
{
|
|
35
35
|
ref: _,
|
|
36
36
|
className: f,
|
|
37
|
-
isSelected:
|
|
37
|
+
isSelected: s,
|
|
38
38
|
count: C,
|
|
39
39
|
label: n,
|
|
40
40
|
totalCount: y,
|
|
41
41
|
id: h,
|
|
42
|
-
ariaLabel:
|
|
42
|
+
ariaLabel: p.button || `${n} button`,
|
|
43
43
|
onClick: R(i, a, 0),
|
|
44
44
|
isMobile: !1,
|
|
45
45
|
type: I.Filter
|
|
@@ -48,28 +48,29 @@ const T = x.forwardRef(
|
|
|
48
48
|
/* @__PURE__ */ l(
|
|
49
49
|
k,
|
|
50
50
|
{
|
|
51
|
-
isOpen:
|
|
51
|
+
isOpen: s,
|
|
52
52
|
drawerOpenSide: "left",
|
|
53
53
|
onClose: () => S(i, a),
|
|
54
54
|
className: `${t}-filter-drawer`,
|
|
55
|
-
"aria-label":
|
|
55
|
+
"aria-label": p.drawer || "Filter drawer",
|
|
56
|
+
paddingLevel: 0,
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */ o(j, { className: `${t}-filter-drawer-menu`, children: m?.map((
|
|
58
|
-
/* @__PURE__ */ o(D, { heading:
|
|
59
|
-
Array.from(
|
|
58
|
+
/* @__PURE__ */ o(j, { className: `${t}-filter-drawer-menu`, children: m?.map((e) => /* @__PURE__ */ l(B, { name: e.label, children: [
|
|
59
|
+
/* @__PURE__ */ o(D, { heading: e.label }),
|
|
60
|
+
Array.from(e.filterDimensions).map((r) => /* @__PURE__ */ o(
|
|
60
61
|
M,
|
|
61
62
|
{
|
|
62
|
-
id:
|
|
63
|
-
labelText:
|
|
64
|
-
onChange: ($) => u?.($,
|
|
65
|
-
type:
|
|
66
|
-
disabled:
|
|
67
|
-
name:
|
|
68
|
-
checked:
|
|
63
|
+
id: r.label,
|
|
64
|
+
labelText: r.label,
|
|
65
|
+
onChange: ($) => u?.($, e.buttonType),
|
|
66
|
+
type: e.type,
|
|
67
|
+
disabled: r?.disabled,
|
|
68
|
+
name: r.label,
|
|
69
|
+
checked: r.active
|
|
69
70
|
},
|
|
70
|
-
|
|
71
|
+
r.label
|
|
71
72
|
))
|
|
72
|
-
] },
|
|
73
|
+
] }, e.id)) }),
|
|
73
74
|
/* @__PURE__ */ l(
|
|
74
75
|
"div",
|
|
75
76
|
{
|
|
@@ -82,7 +83,7 @@ const T = x.forwardRef(
|
|
|
82
83
|
c,
|
|
83
84
|
{
|
|
84
85
|
className: `${t}-filter-dropdown-menu__button`,
|
|
85
|
-
variant:
|
|
86
|
+
variant: x.secondary,
|
|
86
87
|
onClick: () => w?.("all"),
|
|
87
88
|
children: d?.clearAll || "Clear all"
|
|
88
89
|
}
|
|
@@ -1,103 +1,104 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as S, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Root as f, Trigger as
|
|
2
|
+
import { Root as f, Trigger as v, Portal as j, Content as P } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
3
|
import _ from "react";
|
|
4
4
|
import q from "../../components/Drawer/Drawer.js";
|
|
5
|
-
import { SSRMediaQuery as
|
|
5
|
+
import { SSRMediaQuery as O } from "../../providers/SeldonProvider/utils.js";
|
|
6
6
|
import { px as E } from "../../utils/index.js";
|
|
7
|
-
import { FilterButton as
|
|
7
|
+
import { FilterButton as C } from "./FilterButton.js";
|
|
8
8
|
import { FilterDropdownMenuDesktop as H } from "./FilterDropdownMenuDesktop.js";
|
|
9
9
|
import { FilterDropdownMenuMobile as N } from "./FilterDropdownMenuMobile.js";
|
|
10
10
|
import { FilterButtonType as Q } from "./types.js";
|
|
11
|
-
import { countActiveFilters as k, getFilterButtonClickHandler as
|
|
11
|
+
import { countActiveFilters as k, getFilterButtonClickHandler as l, getFilterButtonLabel as z } from "./utils.js";
|
|
12
12
|
const A = _.forwardRef(
|
|
13
13
|
({
|
|
14
14
|
filterId: e = 0,
|
|
15
|
-
className:
|
|
15
|
+
className: h,
|
|
16
16
|
filterButtonLabel: r,
|
|
17
|
-
buttonType:
|
|
17
|
+
buttonType: i,
|
|
18
18
|
handleClick: m,
|
|
19
19
|
filtersListState: a,
|
|
20
|
-
filters:
|
|
21
|
-
onSelectFilter:
|
|
22
|
-
onApplyFilter:
|
|
23
|
-
onClickClear:
|
|
24
|
-
resultsCount:
|
|
25
|
-
filterButtonLabelTranslated:
|
|
26
|
-
dropdownMenuTranslation:
|
|
27
|
-
ariaLabels:
|
|
20
|
+
filters: t,
|
|
21
|
+
onSelectFilter: w,
|
|
22
|
+
onApplyFilter: F,
|
|
23
|
+
onClickClear: $,
|
|
24
|
+
resultsCount: b,
|
|
25
|
+
filterButtonLabelTranslated: p,
|
|
26
|
+
dropdownMenuTranslation: x,
|
|
27
|
+
ariaLabels: n = {},
|
|
28
28
|
hideDesktopSortButton: R,
|
|
29
|
-
id:
|
|
30
|
-
},
|
|
31
|
-
const
|
|
32
|
-
return R &&
|
|
33
|
-
/* @__PURE__ */ g(
|
|
29
|
+
id: c
|
|
30
|
+
}, M) => {
|
|
31
|
+
const d = a?.[e] ?? !1, { totalCount: D, filterCount: s } = k(t, i), u = z(r, s, p || null);
|
|
32
|
+
return R && i === Q.Sort ? null : /* @__PURE__ */ g(S, { children: [
|
|
33
|
+
/* @__PURE__ */ g(O.Media, { lessThan: "md", children: [
|
|
34
34
|
/* @__PURE__ */ o(
|
|
35
|
-
|
|
35
|
+
C,
|
|
36
36
|
{
|
|
37
|
-
ref:
|
|
38
|
-
className:
|
|
39
|
-
isSelected:
|
|
37
|
+
ref: M,
|
|
38
|
+
className: h,
|
|
39
|
+
isSelected: d,
|
|
40
40
|
count: s,
|
|
41
41
|
label: u,
|
|
42
|
-
id:
|
|
43
|
-
totalCount:
|
|
44
|
-
ariaLabel:
|
|
45
|
-
onClick:
|
|
42
|
+
id: c,
|
|
43
|
+
totalCount: D,
|
|
44
|
+
ariaLabel: n.button || `${r} button`,
|
|
45
|
+
onClick: l(a, m, e),
|
|
46
46
|
isMobile: !0,
|
|
47
|
-
type:
|
|
47
|
+
type: i
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ o(
|
|
51
51
|
q,
|
|
52
52
|
{
|
|
53
53
|
drawerOpenSide: "bottom",
|
|
54
|
-
isOpen:
|
|
55
|
-
onClose:
|
|
56
|
-
"aria-label":
|
|
54
|
+
isOpen: d,
|
|
55
|
+
onClose: l(a, m, e),
|
|
56
|
+
"aria-label": n.drawer || `${r} drawer`,
|
|
57
57
|
className: `${E}-filter-drawer-mobile`,
|
|
58
|
-
|
|
58
|
+
headerText: `${u} Filter`,
|
|
59
|
+
paddingLevel: 0,
|
|
59
60
|
children: /* @__PURE__ */ o(
|
|
60
61
|
N,
|
|
61
62
|
{
|
|
62
|
-
buttonType:
|
|
63
|
-
filters:
|
|
63
|
+
buttonType: i,
|
|
64
|
+
filters: t,
|
|
64
65
|
filterIndex: e,
|
|
65
|
-
onSelectFilter:
|
|
66
|
-
onApplyFilter:
|
|
67
|
-
onClickClear:
|
|
68
|
-
resultsCount:
|
|
69
|
-
ariaLabels:
|
|
66
|
+
onSelectFilter: w,
|
|
67
|
+
onApplyFilter: F,
|
|
68
|
+
onClickClear: $,
|
|
69
|
+
resultsCount: b,
|
|
70
|
+
ariaLabels: n?.ariaLabel,
|
|
70
71
|
filterButtonLabel: r,
|
|
71
|
-
filterButtonLabelTranslated:
|
|
72
|
-
dropdownMenuTranslation:
|
|
72
|
+
filterButtonLabelTranslated: p,
|
|
73
|
+
dropdownMenuTranslation: x
|
|
73
74
|
}
|
|
74
75
|
)
|
|
75
76
|
}
|
|
76
77
|
)
|
|
77
78
|
] }),
|
|
78
|
-
/* @__PURE__ */ o(
|
|
79
|
+
/* @__PURE__ */ o(O.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ g(
|
|
79
80
|
f,
|
|
80
81
|
{
|
|
81
|
-
open:
|
|
82
|
-
onOpenChange:
|
|
82
|
+
open: d,
|
|
83
|
+
onOpenChange: l(a, m, e),
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */ o(
|
|
85
|
-
|
|
85
|
+
/* @__PURE__ */ o(v, { asChild: !0, children: /* @__PURE__ */ o(
|
|
86
|
+
C,
|
|
86
87
|
{
|
|
87
|
-
ref:
|
|
88
|
-
className:
|
|
89
|
-
isSelected:
|
|
88
|
+
ref: M,
|
|
89
|
+
className: h,
|
|
90
|
+
isSelected: d,
|
|
90
91
|
count: s,
|
|
91
92
|
label: u,
|
|
92
|
-
totalCount:
|
|
93
|
-
id:
|
|
94
|
-
ariaLabel:
|
|
95
|
-
onClick:
|
|
93
|
+
totalCount: D,
|
|
94
|
+
id: c,
|
|
95
|
+
ariaLabel: n.ariaLabel || `${r} button`,
|
|
96
|
+
onClick: l(a, m, e),
|
|
96
97
|
isMobile: !1,
|
|
97
|
-
type:
|
|
98
|
+
type: i
|
|
98
99
|
}
|
|
99
100
|
) }),
|
|
100
|
-
/* @__PURE__ */ o(
|
|
101
|
+
/* @__PURE__ */ o(j, { children: /* @__PURE__ */ o(
|
|
101
102
|
P,
|
|
102
103
|
{
|
|
103
104
|
avoidCollisions: !0,
|
|
@@ -105,28 +106,28 @@ const A = _.forwardRef(
|
|
|
105
106
|
sideOffset: 5,
|
|
106
107
|
align: "start",
|
|
107
108
|
alignOffset: 5,
|
|
108
|
-
"aria-label":
|
|
109
|
+
"aria-label": n.ariaLabel || `${r} dropdown`,
|
|
109
110
|
children: /* @__PURE__ */ o(
|
|
110
111
|
H,
|
|
111
112
|
{
|
|
112
|
-
buttonType:
|
|
113
|
-
filters:
|
|
113
|
+
buttonType: i,
|
|
114
|
+
filters: t,
|
|
114
115
|
filterIndex: e,
|
|
115
|
-
onSelectFilter:
|
|
116
|
-
onApplyFilter:
|
|
117
|
-
onClickClear:
|
|
118
|
-
resultsCount:
|
|
119
|
-
ariaLabels:
|
|
116
|
+
onSelectFilter: w,
|
|
117
|
+
onApplyFilter: F,
|
|
118
|
+
onClickClear: $,
|
|
119
|
+
resultsCount: b,
|
|
120
|
+
ariaLabels: n?.ariaLabel,
|
|
120
121
|
filterButtonLabel: r,
|
|
121
|
-
filterButtonLabelTranslated:
|
|
122
|
-
dropdownMenuTranslation:
|
|
122
|
+
filterButtonLabelTranslated: p,
|
|
123
|
+
dropdownMenuTranslation: x
|
|
123
124
|
}
|
|
124
125
|
)
|
|
125
126
|
}
|
|
126
127
|
) })
|
|
127
128
|
]
|
|
128
129
|
},
|
|
129
|
-
`${
|
|
130
|
+
`${c}-${r}-button`
|
|
130
131
|
) })
|
|
131
132
|
] });
|
|
132
133
|
}
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
@use 'components/Accordion/accordion';
|
|
33
33
|
@use 'components/Breadcrumb/breadcrumb';
|
|
34
34
|
@use 'components/Drawer/drawer';
|
|
35
|
+
@use 'components/Drawer/drawerHeader';
|
|
35
36
|
@use 'components/Dropdown/dropdown';
|
|
36
37
|
@use 'components/Video/video';
|
|
37
38
|
@use 'components/Select/select';
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
height: 100dvh;
|
|
9
9
|
max-width: 480px;
|
|
10
|
-
padding: $padding-xl $padding-md $padding-md;
|
|
11
10
|
position: fixed;
|
|
12
11
|
right: 0;
|
|
13
12
|
top: 0;
|
|
@@ -18,10 +17,6 @@
|
|
|
18
17
|
outline: none;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
.#{$px}-icon-close-x:hover {
|
|
22
|
-
color: $white;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
20
|
@media (max-width: $breakpoint-sm) {
|
|
26
21
|
max-width: 100%;
|
|
27
22
|
}
|
|
@@ -30,13 +25,6 @@
|
|
|
30
25
|
padding-bottom: $padding-sm;
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
&__overlay {
|
|
34
|
-
background-color: $overlay-black;
|
|
35
|
-
inset: 0;
|
|
36
|
-
position: fixed;
|
|
37
|
-
z-index: 10;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
28
|
&__close {
|
|
41
29
|
align-items: center;
|
|
42
30
|
border-radius: 100%;
|
|
@@ -46,11 +34,13 @@
|
|
|
46
34
|
position: absolute;
|
|
47
35
|
right: 10px;
|
|
48
36
|
top: 10px;
|
|
37
|
+
}
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
&__overlay {
|
|
40
|
+
background-color: $overlay-black;
|
|
41
|
+
inset: 0;
|
|
42
|
+
position: fixed;
|
|
43
|
+
z-index: 10;
|
|
54
44
|
}
|
|
55
45
|
|
|
56
46
|
// Bottom sheet modifier
|
|
@@ -84,6 +74,43 @@
|
|
|
84
74
|
width: fit-content;
|
|
85
75
|
}
|
|
86
76
|
}
|
|
77
|
+
|
|
78
|
+
&__content {
|
|
79
|
+
align-items: center;
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
height: 100%;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
overflow-y: auto;
|
|
85
|
+
padding-top: $snowflake-menu-padding;
|
|
86
|
+
width: 100%;
|
|
87
|
+
|
|
88
|
+
// different designs require different padding (ep = extra padding). more info in the component.
|
|
89
|
+
|
|
90
|
+
&--ep0 {
|
|
91
|
+
padding-top: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&--ep1 {
|
|
95
|
+
padding: 1rem;
|
|
96
|
+
padding-top: $snowflake-menu-padding;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&--ep2 {
|
|
100
|
+
padding: 2rem;
|
|
101
|
+
padding-top: $spacing-xl;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&--ep3 {
|
|
105
|
+
padding: 3rem;
|
|
106
|
+
padding-top: $snowflake-menu-padding;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// make the children scroll in their little children box
|
|
110
|
+
> * {
|
|
111
|
+
overflow-y: auto;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
87
114
|
}
|
|
88
115
|
|
|
89
116
|
// Drawer open/close animations
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use '../../allPartials' as *;
|
|
2
|
+
|
|
3
|
+
.#{$px}-drawer-header {
|
|
4
|
+
align-items: center;
|
|
5
|
+
display: flex;
|
|
6
|
+
padding: $margin-sm $margin-xsm;
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
&__bookend {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex: 1 1 0;
|
|
12
|
+
|
|
13
|
+
&-right {
|
|
14
|
+
justify-content: flex-end;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-left {
|
|
18
|
+
justify-content: flex-start;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__hr {
|
|
23
|
+
border-bottom: 2px solid $light-gray;
|
|
24
|
+
margin-bottom: $spacing-sm;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__title {
|
|
29
|
+
@include DistinctDisplay;
|
|
30
|
+
|
|
31
|
+
color: $primary-black;
|
|
32
|
+
font-size: $heading-size4;
|
|
33
|
+
font-variation-settings: 'wght' 600;
|
|
34
|
+
line-height: $body-line-height-size1;
|
|
35
|
+
margin-top: 4px; // better visual align with the close icon
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
text-align: center;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.#{$px}-icon-close-x:hover {
|
|
43
|
+
color: $white;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -27,6 +27,53 @@ $lg: #{$px}-input--lg;
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
&__wrapper {
|
|
31
|
+
@include text($string2);
|
|
32
|
+
|
|
33
|
+
accent-color: $soft-black;
|
|
34
|
+
align-items: center;
|
|
35
|
+
border: 1px solid $keyline-gray;
|
|
36
|
+
border-radius: 0.1875rem;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
font-variation-settings: 'wght' 600;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
margin-bottom: 0.25rem;
|
|
41
|
+
padding: $padding-xsm;
|
|
42
|
+
position: relative;
|
|
43
|
+
|
|
44
|
+
&::placeholder {
|
|
45
|
+
font-variation-settings: 'wght' 400;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:focus-visible,
|
|
49
|
+
&:focus-within {
|
|
50
|
+
outline: 1px solid $pure-black;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$px}-input__wrapper__input,
|
|
54
|
+
.#{$px}-input__input {
|
|
55
|
+
border: none;
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: 0;
|
|
58
|
+
width: 100%;
|
|
59
|
+
|
|
60
|
+
&:focus-visible {
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__adornment {
|
|
66
|
+
align-items: center;
|
|
67
|
+
display: flex;
|
|
68
|
+
margin-right: 0.25rem;
|
|
69
|
+
user-select: none;
|
|
70
|
+
user-select: none;
|
|
71
|
+
user-select: none;
|
|
72
|
+
user-select: none;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
30
77
|
&__input {
|
|
31
78
|
@include text($string2);
|
|
32
79
|
|
|
@@ -60,7 +107,8 @@ $lg: #{$px}-input--lg;
|
|
|
60
107
|
flex-flow: row wrap;
|
|
61
108
|
gap: 1rem;
|
|
62
109
|
|
|
63
|
-
.#{$px}-input__input
|
|
110
|
+
.#{$px}-input__input,
|
|
111
|
+
.#{$px}-input__wrapper {
|
|
64
112
|
align-self: center;
|
|
65
113
|
width: unset;
|
|
66
114
|
}
|
|
@@ -72,7 +120,8 @@ $lg: #{$px}-input--lg;
|
|
|
72
120
|
cursor: default;
|
|
73
121
|
|
|
74
122
|
.#{$px}-input__label,
|
|
75
|
-
.#{$px}-input__input
|
|
123
|
+
.#{$px}-input__input,
|
|
124
|
+
.#{$px}-input__wrapper {
|
|
76
125
|
color: inherit;
|
|
77
126
|
}
|
|
78
127
|
.#{$px}-input__label:hover,
|
|
@@ -86,7 +135,8 @@ $lg: #{$px}-input--lg;
|
|
|
86
135
|
pointer-events: none;
|
|
87
136
|
|
|
88
137
|
.#{$px}-input__label,
|
|
89
|
-
.#{$px}-input__input
|
|
138
|
+
.#{$px}-input__input,
|
|
139
|
+
.#{$px}-input__wrapper {
|
|
90
140
|
cursor: default;
|
|
91
141
|
}
|
|
92
142
|
|
|
@@ -109,7 +159,8 @@ $lg: #{$px}-input--lg;
|
|
|
109
159
|
color: $pure-black;
|
|
110
160
|
}
|
|
111
161
|
|
|
112
|
-
.#{$px}-input__input
|
|
162
|
+
.#{$px}-input__input,
|
|
163
|
+
.#{$px}-input__wrapper {
|
|
113
164
|
border: 1px solid $error-red;
|
|
114
165
|
box-shadow: inset 0 0 3px 3px $error-pink;
|
|
115
166
|
|
|
@@ -117,6 +168,12 @@ $lg: #{$px}-input--lg;
|
|
|
117
168
|
outline: 1px solid $error-red;
|
|
118
169
|
}
|
|
119
170
|
}
|
|
171
|
+
|
|
172
|
+
.#{$px}-input__wrapper .#{$px}-input__input {
|
|
173
|
+
border: none;
|
|
174
|
+
box-shadow: none;
|
|
175
|
+
outline: none;
|
|
176
|
+
}
|
|
120
177
|
}
|
|
121
178
|
|
|
122
179
|
// warn
|