@phillips/seldon 1.46.0 → 1.47.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/Footer/Footer.js +5 -5
- package/dist/components/Grid/Grid.d.ts +12 -3
- package/dist/components/Grid/Grid.js +24 -8
- package/dist/components/Grid/utils.d.ts +2 -0
- package/dist/components/Grid/utils.js +8 -0
- package/dist/components/GridItem/GridItem.js +2 -2
- package/dist/components/LinkList/LinkList.d.ts +2 -1
- package/dist/components/Social/Social.js +1 -1
- package/dist/index.js +80 -79
- package/dist/scss/_utils.scss +21 -6
- package/dist/scss/_vars.scss +92 -91
- package/dist/scss/components/Footer/_footer.scss +20 -5
- package/dist/scss/components/Grid/_grid.scss +11 -0
- package/dist/scss/components/GridItem/_gridItem.scss +4 -4
- package/dist/scss/components/HeroBanner/_heroBanner.scss +6 -5
- package/dist/scss/components/LinkList/_linkList.scss +4 -0
- package/dist/scss/components/Social/_social.scss +4 -4
- package/dist/scss/components/SplitPanel/_splitPanel.scss +1 -1
- package/dist/scss/components/Subscribe/_subscribe.scss +2 -2
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +42 -41
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import l from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { px as r, defaultYear as m } from "../../utils/index.js";
|
|
4
|
-
import
|
|
5
|
-
import { TextVariants as
|
|
6
|
-
import
|
|
4
|
+
import f from "../../assets/PhillipsLogo.svg.js";
|
|
5
|
+
import { TextVariants as c } from "../Text/types.js";
|
|
6
|
+
import d from "../Text/Text.js";
|
|
7
7
|
const $ = ({
|
|
8
8
|
children: a,
|
|
9
9
|
className: i,
|
|
@@ -12,8 +12,8 @@ const $ = ({
|
|
|
12
12
|
}) => /* @__PURE__ */ t("footer", { "data-testid": e || "footer", id: e, className: l(`${r}-footer`, { className: i }), children: [
|
|
13
13
|
/* @__PURE__ */ o("div", { className: `${r}-footer__links`, children: a }),
|
|
14
14
|
/* @__PURE__ */ t("div", { className: `${r}-footer__copyright`, children: [
|
|
15
|
-
/* @__PURE__ */ o("h3", { "data-testid": "
|
|
16
|
-
/* @__PURE__ */ o(
|
|
15
|
+
/* @__PURE__ */ o("h3", { "data-testid": "footer-logo", className: `${r}-footer__logo`, children: /* @__PURE__ */ o("a", { href: "/", "aria-label": "logo", children: /* @__PURE__ */ o(f, {}) }) }),
|
|
16
|
+
/* @__PURE__ */ o(d, { variant: c.body3, children: s })
|
|
17
17
|
] })
|
|
18
18
|
] });
|
|
19
19
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { SpacingTokens } from '../../utils';
|
|
2
|
+
export interface GridProps<ElementType = HTMLElement> extends React.HTMLAttributes<ElementType> {
|
|
2
3
|
/**
|
|
3
4
|
* A Grid must have children
|
|
4
5
|
*/
|
|
@@ -6,7 +7,15 @@ export interface GridProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
6
7
|
/**
|
|
7
8
|
* Optional element to render as the top-level component e.g. 'div', 'span', CustomComponent, etc. Defaults to 'section'.
|
|
8
9
|
*/
|
|
9
|
-
element?: React.ElementType<GridProps
|
|
10
|
+
element?: React.ElementType<GridProps<ElementType>>;
|
|
11
|
+
/**
|
|
12
|
+
* The gap between the rows in the grid. Defaults to 'md'.
|
|
13
|
+
*/
|
|
14
|
+
columnGap?: SpacingTokens;
|
|
15
|
+
/**
|
|
16
|
+
* The gap between the columns in the grid. Defaults to 'lg'.
|
|
17
|
+
*/
|
|
18
|
+
rowGap?: SpacingTokens;
|
|
10
19
|
}
|
|
11
20
|
/**
|
|
12
21
|
* ## Overview
|
|
@@ -17,5 +26,5 @@ export interface GridProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
17
26
|
*
|
|
18
27
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-layouts-grid--overview)
|
|
19
28
|
*/
|
|
20
|
-
export declare function Grid({ children, className, element: Element, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function Grid({ children, className, element: Element, columnGap, rowGap, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
21
30
|
export default Grid;
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as d, SpacingTokens as e } from "../../utils/index.js";
|
|
4
|
+
import { determineGridClassName as f } from "./utils.js";
|
|
5
|
+
function C({
|
|
6
|
+
children: o,
|
|
7
|
+
className: s,
|
|
8
|
+
element: r = "section",
|
|
9
|
+
columnGap: a = e.md,
|
|
10
|
+
rowGap: t = e.lg,
|
|
11
|
+
...m
|
|
12
|
+
}) {
|
|
13
|
+
const { className: n, ...i } = d(m, "Grid");
|
|
14
|
+
return /* @__PURE__ */ c(
|
|
15
|
+
r,
|
|
16
|
+
{
|
|
17
|
+
...i,
|
|
18
|
+
className: l(f(n, a, t), s),
|
|
19
|
+
...m,
|
|
20
|
+
children: o
|
|
21
|
+
}
|
|
22
|
+
);
|
|
7
23
|
}
|
|
8
24
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
25
|
+
C as Grid,
|
|
26
|
+
C as default
|
|
11
27
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LinkBlock, { type LinkBlockProps } from '../LinkBlock/LinkBlock';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
3
|
+
import { GridProps } from '../Grid/Grid';
|
|
4
|
+
export interface LinkListProps extends GridProps<HTMLUListElement> {
|
|
4
5
|
/** These children should be an array of LinkBlock components */
|
|
5
6
|
children: React.ReactElement<LinkBlockProps, typeof LinkBlock>[];
|
|
6
7
|
}
|
|
@@ -15,7 +15,7 @@ const S = ({
|
|
|
15
15
|
}) => {
|
|
16
16
|
const { className: o, ...n } = f(r, "Social");
|
|
17
17
|
return /* @__PURE__ */ c("div", { ...n, className: l(o, s), ...r, children: [
|
|
18
|
-
/* @__PURE__ */ t(N, { variant: u.
|
|
18
|
+
/* @__PURE__ */ t(N, { variant: u.heading4, className: `${o}__header`, children: e }),
|
|
19
19
|
/* @__PURE__ */ t(p, { onClick: i, variant: d.ghost, className: `${o}__button`, children: m }),
|
|
20
20
|
a
|
|
21
21
|
] });
|
package/dist/index.js
CHANGED
|
@@ -1,97 +1,98 @@
|
|
|
1
|
-
import { PaddingTokens as a,
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { ButtonVariants as
|
|
1
|
+
import { PaddingTokens as a, SpacingTokens as f, defaultYear as m, emailValidation as p, encodeURLSearchParams as d, findChildrenOfType as s, generatePaddingClassName as u, getCommonProps as i, noOp as l, px as x, useNormalizedInputProps as n } from "./utils/index.js";
|
|
2
|
+
import { default as c } from "./pages/Page.js";
|
|
3
|
+
import { default as L } from "./components/Button/Button.js";
|
|
4
|
+
import { ButtonVariants as k } from "./components/Button/types.js";
|
|
5
5
|
import { default as P } from "./components/IconButton/IconButton.js";
|
|
6
|
-
import { default as
|
|
6
|
+
import { default as N } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
7
7
|
import { default as w } from "./components/Footer/Footer.js";
|
|
8
|
-
import { Grid as
|
|
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 { default as
|
|
17
|
-
import { LinkVariants as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
8
|
+
import { Grid as h } from "./components/Grid/Grid.js";
|
|
9
|
+
import { default as A } from "./components/Header/Header.js";
|
|
10
|
+
import { default as G } from "./components/Navigation/Navigation.js";
|
|
11
|
+
import { default as D } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
12
|
+
import { default as M } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
13
|
+
import { default as R } from "./components/Navigation/NavigationList/NavigationList.js";
|
|
14
|
+
import { default as z } from "./components/HeroBanner/HeroBanner.js";
|
|
15
|
+
import { default as F } from "./components/Input/Input.js";
|
|
16
|
+
import { default as j } from "./components/Link/Link.js";
|
|
17
|
+
import { LinkVariants as J } from "./components/Link/types.js";
|
|
18
|
+
import { default as Q } from "./components/LinkBlock/LinkBlock.js";
|
|
19
|
+
import { default as X } from "./components/LinkList/LinkList.js";
|
|
20
|
+
import { default as _ } from "./components/Row/Row.js";
|
|
21
|
+
import { default as ee } from "./components/GridItem/GridItem.js";
|
|
22
22
|
import { GridItemAlign as re } from "./components/GridItem/types.js";
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
23
|
+
import { default as ae } from "./components/Search/Search.js";
|
|
24
|
+
import { default as me } from "./components/Select/Select.js";
|
|
25
|
+
import { default as de } from "./components/SplitPanel/SplitPanel.js";
|
|
26
|
+
import { default as ue } from "./components/Subscribe/Subscribe.js";
|
|
27
27
|
import { SubscriptionState as le } from "./components/Subscribe/types.js";
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
28
|
+
import { default as ne } from "./components/Social/Social.js";
|
|
29
|
+
import { default as ce } from "./components/ViewingsList/ViewingsList.js";
|
|
30
|
+
import { default as Le } from "./components/Modal/Modal.js";
|
|
31
|
+
import { default as ke } from "./components/Drawer/Drawer.js";
|
|
32
32
|
import { default as Pe } from "./components/ViewingsList/StatefulViewingsList.js";
|
|
33
|
-
import { TextVariants as
|
|
33
|
+
import { TextVariants as Ne } from "./components/Text/types.js";
|
|
34
34
|
import { default as we } from "./components/Text/Text.js";
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { AuthState as
|
|
39
|
-
import { SupportedLanguages as
|
|
40
|
-
import { default as
|
|
35
|
+
import { default as he } from "./components/Accordion/Accordion.js";
|
|
36
|
+
import { default as Ae } from "./components/Accordion/AccordionItem.js";
|
|
37
|
+
import { default as Ge } from "./components/UserManagement/UserManagement.js";
|
|
38
|
+
import { AuthState as De } from "./components/UserManagement/types.js";
|
|
39
|
+
import { SupportedLanguages as Me } from "./types/commonTypes.js";
|
|
40
|
+
import { default as Re } from "./components/Breadcrumb/Breadcrumb.js";
|
|
41
41
|
import "react/jsx-runtime";
|
|
42
42
|
import "./node_modules/classnames/index.js";
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
43
|
+
import { default as ze } from "./components/Dropdown/Dropdown.js";
|
|
44
|
+
import { default as Fe } from "./components/Video/Video.js";
|
|
45
45
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
he as Accordion,
|
|
47
|
+
Ae as AccordionItem,
|
|
48
|
+
De as AuthState,
|
|
49
|
+
Re as Breadcrumb,
|
|
50
|
+
L as Button,
|
|
51
|
+
k as ButtonVariants,
|
|
52
|
+
ke as Drawer,
|
|
53
|
+
ze as Dropdown,
|
|
54
|
+
N as ErrorBoundary,
|
|
55
55
|
w as Footer,
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
h as Grid,
|
|
57
|
+
ee as GridItem,
|
|
58
58
|
re as GridItemAlign,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
A as Header,
|
|
60
|
+
z as HeroBanner,
|
|
61
61
|
P as IconButton,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
F as Input,
|
|
63
|
+
j as Link,
|
|
64
|
+
Q as LinkBlock,
|
|
65
|
+
X as LinkList,
|
|
66
|
+
J as LinkVariants,
|
|
67
|
+
Le as Modal,
|
|
68
|
+
G as Navigation,
|
|
69
|
+
D as NavigationItem,
|
|
70
|
+
M as NavigationItemTrigger,
|
|
71
|
+
R as NavigationList,
|
|
72
72
|
a as PaddingTokens,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
c as Page,
|
|
74
|
+
_ as Row,
|
|
75
|
+
ae as Search,
|
|
76
|
+
me as Select,
|
|
77
|
+
ne as Social,
|
|
78
|
+
f as SpacingTokens,
|
|
79
|
+
de as SplitPanel,
|
|
79
80
|
Pe as StatefulViewingsList,
|
|
80
|
-
|
|
81
|
+
ue as Subscribe,
|
|
81
82
|
le as SubscriptionState,
|
|
82
|
-
|
|
83
|
+
Me as SupportedLanguages,
|
|
83
84
|
we as Text,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
Ne as TextVariants,
|
|
86
|
+
Ge as UserManagement,
|
|
87
|
+
Fe as Video,
|
|
88
|
+
ce as ViewingsList,
|
|
89
|
+
m as defaultYear,
|
|
90
|
+
p as emailValidation,
|
|
91
|
+
d as encodeURLSearchParams,
|
|
92
|
+
s as findChildrenOfType,
|
|
93
|
+
u as generatePaddingClassName,
|
|
94
|
+
i as getCommonProps,
|
|
94
95
|
l as noOp,
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
x as px,
|
|
97
|
+
n as useNormalizedInputProps
|
|
97
98
|
};
|
package/dist/scss/_utils.scss
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
row-gap: $spacing-lg;
|
|
71
71
|
|
|
72
72
|
@media (min-width: $breakpoint-md) {
|
|
73
|
-
grid-template-columns: repeat(
|
|
73
|
+
grid-template-columns: repeat(6, 1fr);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
@media (min-width: $breakpoint-lg) {
|
|
@@ -84,6 +84,21 @@
|
|
|
84
84
|
|
|
85
85
|
@mixin media($breakpoint, $type: 'min') {
|
|
86
86
|
@if $breakpoint == $size-sm {
|
|
87
|
+
// $breakpoint-sm: 360px;
|
|
88
|
+
@if $type == 'min' {
|
|
89
|
+
@media (min-width: $breakpoint-sm) {
|
|
90
|
+
@content;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@if $type == 'max' {
|
|
95
|
+
@media (max-width: calc($breakpoint-sm - 1px)) {
|
|
96
|
+
@content;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@if $breakpoint == $size-md {
|
|
87
102
|
// $breakpoint-md: 961px;
|
|
88
103
|
@if $type == 'min' {
|
|
89
104
|
@media (min-width: $breakpoint-md) {
|
|
@@ -92,13 +107,13 @@
|
|
|
92
107
|
}
|
|
93
108
|
|
|
94
109
|
@if $type == 'max' {
|
|
95
|
-
@media (max-width: $breakpoint-md) {
|
|
110
|
+
@media (max-width: calc($breakpoint-md - 1px)) {
|
|
96
111
|
@content;
|
|
97
112
|
}
|
|
98
113
|
}
|
|
99
114
|
}
|
|
100
115
|
|
|
101
|
-
@if $breakpoint == $size-
|
|
116
|
+
@if $breakpoint == $size-lg {
|
|
102
117
|
// $breakpoint-lg: 1401px;
|
|
103
118
|
|
|
104
119
|
@if $type == 'min' {
|
|
@@ -108,13 +123,13 @@
|
|
|
108
123
|
}
|
|
109
124
|
|
|
110
125
|
@if type == 'max' {
|
|
111
|
-
@media (max-width: $breakpoint-lg) {
|
|
126
|
+
@media (max-width: calc($breakpoint-lg - 1px)) {
|
|
112
127
|
@content;
|
|
113
128
|
}
|
|
114
129
|
}
|
|
115
130
|
}
|
|
116
131
|
|
|
117
|
-
@if $breakpoint == $size-
|
|
132
|
+
@if $breakpoint == $size-xl {
|
|
118
133
|
// $breakpoint-xl: 1801px;
|
|
119
134
|
@if type == 'min' {
|
|
120
135
|
@media (min-width: $breakpoint-xl) {
|
|
@@ -123,7 +138,7 @@
|
|
|
123
138
|
}
|
|
124
139
|
|
|
125
140
|
@if type == 'max' {
|
|
126
|
-
@media (max-width: $breakpoint-xl) {
|
|
141
|
+
@media (max-width: calc($breakpoint-xl - 1px)) {
|
|
127
142
|
@content;
|
|
128
143
|
}
|
|
129
144
|
}
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -99,91 +99,99 @@ $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $h
|
|
|
99
99
|
$title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
|
|
100
100
|
$snwHeaderLink;
|
|
101
101
|
|
|
102
|
+
////////////////////////
|
|
103
|
+
/// Breakpoint TOKENS to be used for min-width comparisons
|
|
104
|
+
///////////////////////
|
|
105
|
+
$breakpoint-sm: 361px;
|
|
106
|
+
$breakpoint-md: 961px;
|
|
107
|
+
$breakpoint-lg: 1401px;
|
|
108
|
+
$breakpoint-xl: 1801px;
|
|
109
|
+
|
|
102
110
|
////////////////////////
|
|
103
111
|
/// FONT SIZE TOKENS:
|
|
104
112
|
///////////////////////
|
|
105
113
|
|
|
106
114
|
:root {
|
|
107
115
|
--desktop-max-width: 120rem;
|
|
108
|
-
--quote-size: 1.
|
|
109
|
-
--quote-line-height:
|
|
110
|
-
--heading-size1: 1.
|
|
111
|
-
--heading-line-height-size1:
|
|
112
|
-
--heading-size2: 1.
|
|
113
|
-
--heading-line-height-size2:
|
|
114
|
-
--heading-size3: 1.
|
|
115
|
-
--heading-line-height-size3: 1.
|
|
116
|
-
--heading-size4:
|
|
117
|
-
--heading-line-height-size4: 1.
|
|
118
|
-
--heading-size5:
|
|
119
|
-
--heading-line-height-size5:
|
|
120
|
-
--string-size1:
|
|
121
|
-
--string-line-height-size1: 1.
|
|
122
|
-
--string-size2:
|
|
123
|
-
--string-line-height-size2:
|
|
124
|
-
--string-size3: 0.
|
|
125
|
-
--string-line-height-size3:
|
|
126
|
-
--body-size1:
|
|
127
|
-
--body-line-height-size1: 1.
|
|
128
|
-
--body-size2:
|
|
129
|
-
--body-line-height-size2: 1.
|
|
130
|
-
--body-size3: 0.
|
|
131
|
-
--body-line-height-size3:
|
|
132
|
-
--label-size1:
|
|
133
|
-
--label-size2:
|
|
134
|
-
--label-size3: 0.
|
|
135
|
-
--link-label-size:
|
|
136
|
-
--link-label-line-height:
|
|
137
|
-
--button-label-size:
|
|
138
|
-
--button-label-line-height:
|
|
139
|
-
--badge-label-size: 0.
|
|
140
|
-
--badge-label-line-height:
|
|
116
|
+
--quote-size: 1.5rem;
|
|
117
|
+
--quote-line-height: 2rem;
|
|
118
|
+
--heading-size1: 1.5rem;
|
|
119
|
+
--heading-line-height-size1: 1.75rem;
|
|
120
|
+
--heading-size2: 1.5rem;
|
|
121
|
+
--heading-line-height-size2: 1.75rem;
|
|
122
|
+
--heading-size3: 1.25rem;
|
|
123
|
+
--heading-line-height-size3: 1.5rem;
|
|
124
|
+
--heading-size4: 1rem;
|
|
125
|
+
--heading-line-height-size4: 1.25rem;
|
|
126
|
+
--heading-size5: 0.75rem;
|
|
127
|
+
--heading-line-height-size5: 1rem;
|
|
128
|
+
--string-size1: 1rem;
|
|
129
|
+
--string-line-height-size1: 1.25rem;
|
|
130
|
+
--string-size2: 0.75rem;
|
|
131
|
+
--string-line-height-size2: 1rem;
|
|
132
|
+
--string-size3: 0.5rem;
|
|
133
|
+
--string-line-height-size3: 0.75rem;
|
|
134
|
+
--body-size1: 1rem;
|
|
135
|
+
--body-line-height-size1: 1.5rem;
|
|
136
|
+
--body-size2: 0.75rem;
|
|
137
|
+
--body-line-height-size2: 1.25rem;
|
|
138
|
+
--body-size3: 0.5rem;
|
|
139
|
+
--body-line-height-size3: 1rem;
|
|
140
|
+
--label-size1: 1rem;
|
|
141
|
+
--label-size2: 0.75rem;
|
|
142
|
+
--label-size3: 0.56rem;
|
|
143
|
+
--link-label-size: 0.75rem;
|
|
144
|
+
--link-label-line-height: 0.75rem;
|
|
145
|
+
--button-label-size: 0.75rem;
|
|
146
|
+
--button-label-line-height: 1rem;
|
|
147
|
+
--badge-label-size: 0.5rem;
|
|
148
|
+
--badge-label-line-height: 0.67rem;
|
|
141
149
|
--snw-header-link-size: 1rem;
|
|
142
150
|
--snw-header-link-line-height: 1.5rem;
|
|
143
151
|
--snw-flyout-link-size: 1rem;
|
|
144
152
|
--snw-flyout-link-line-height: 1.75rem;
|
|
145
153
|
|
|
146
|
-
@media (
|
|
147
|
-
--quote-size: 1.
|
|
148
|
-
--quote-line-height:
|
|
149
|
-
--heading-size1: 1.
|
|
150
|
-
--heading-line-height-size1:
|
|
151
|
-
--heading-size2: 1.
|
|
152
|
-
--heading-line-height-size2:
|
|
153
|
-
--heading-size3: 1.
|
|
154
|
-
--heading-line-height-size3: 1.
|
|
155
|
-
--heading-size4:
|
|
156
|
-
--heading-line-height-size4: 1.
|
|
157
|
-
--heading-size5:
|
|
158
|
-
--heading-line-height-size5:
|
|
159
|
-
--string-size1:
|
|
160
|
-
--string-line-height-size1: 1.
|
|
161
|
-
--string-size2:
|
|
162
|
-
--string-line-height-size2:
|
|
163
|
-
--string-size3: 0.
|
|
164
|
-
--string-line-height-size3:
|
|
165
|
-
--body-size1:
|
|
166
|
-
--body-line-height-size1: 1.
|
|
167
|
-
--body-size2:
|
|
168
|
-
--body-line-height-size2: 1.
|
|
169
|
-
--body-size3: 0.
|
|
170
|
-
--body-line-height-size3:
|
|
171
|
-
--label-size1:
|
|
172
|
-
--label-size2:
|
|
173
|
-
--label-size3: 0.
|
|
174
|
-
--link-label-size:
|
|
175
|
-
--link-label-line-height:
|
|
176
|
-
--button-label-size:
|
|
177
|
-
--button-label-line-height:
|
|
178
|
-
--badge-label-size: 0.
|
|
179
|
-
--badge-label-line-height:
|
|
154
|
+
@media (min-width: $breakpoint-md) {
|
|
155
|
+
--quote-size: 1.75rem;
|
|
156
|
+
--quote-line-height: 2.25rem;
|
|
157
|
+
--heading-size1: 1.75rem;
|
|
158
|
+
--heading-line-height-size1: 2rem;
|
|
159
|
+
--heading-size2: 1.75rem;
|
|
160
|
+
--heading-line-height-size2: 2rem;
|
|
161
|
+
--heading-size3: 1.5rem;
|
|
162
|
+
--heading-line-height-size3: 1.75rem;
|
|
163
|
+
--heading-size4: 1.25rem;
|
|
164
|
+
--heading-line-height-size4: 1.5rem;
|
|
165
|
+
--heading-size5: 1rem;
|
|
166
|
+
--heading-line-height-size5: 1.25rem;
|
|
167
|
+
--string-size1: 1.25rem;
|
|
168
|
+
--string-line-height-size1: 1.5rem;
|
|
169
|
+
--string-size2: 1rem;
|
|
170
|
+
--string-line-height-size2: 1.25rem;
|
|
171
|
+
--string-size3: 0.75rem;
|
|
172
|
+
--string-line-height-size3: 1rem;
|
|
173
|
+
--body-size1: 1.25rem;
|
|
174
|
+
--body-line-height-size1: 1.75rem;
|
|
175
|
+
--body-size2: 1rem;
|
|
176
|
+
--body-line-height-size2: 1.5rem;
|
|
177
|
+
--body-size3: 0.75rem;
|
|
178
|
+
--body-line-height-size3: 1.25rem;
|
|
179
|
+
--label-size1: 1.25rem;
|
|
180
|
+
--label-size2: 1rem;
|
|
181
|
+
--label-size3: 0.75rem;
|
|
182
|
+
--link-label-size: 1rem;
|
|
183
|
+
--link-label-line-height: 1rem;
|
|
184
|
+
--button-label-size: 1rem;
|
|
185
|
+
--button-label-line-height: 1.25rem;
|
|
186
|
+
--badge-label-size: 0.75rem;
|
|
187
|
+
--badge-label-line-height: 1rem;
|
|
180
188
|
--snw-header-link-size: 1rem;
|
|
181
189
|
--snw-header-link-line-height: 1.5rem;
|
|
182
190
|
--snw-flyout-link-size: 1rem;
|
|
183
|
-
--snw-flyout-link-line-height: 1.
|
|
191
|
+
--snw-flyout-link-line-height: 1.875rem;
|
|
184
192
|
}
|
|
185
193
|
|
|
186
|
-
@media (min-width:
|
|
194
|
+
@media (min-width: $breakpoint-xl) {
|
|
187
195
|
--quote-size: 2rem;
|
|
188
196
|
--quote-line-height: 2.5rem;
|
|
189
197
|
--heading-size1: 2rem;
|
|
@@ -280,23 +288,23 @@ $snw-flyout-link-line-height: var(--snw-flyout-link-line-height);
|
|
|
280
288
|
:root {
|
|
281
289
|
--spacing-micro: 0.25rem;
|
|
282
290
|
--spacing-xsm: 0.5rem;
|
|
283
|
-
--spacing-sm:
|
|
284
|
-
--spacing-md:
|
|
285
|
-
--spacing-lg:
|
|
286
|
-
--spacing-xl:
|
|
287
|
-
--spacing-xxl:
|
|
288
|
-
|
|
289
|
-
@media (
|
|
290
|
-
--spacing-micro: 0.
|
|
291
|
+
--spacing-sm: 0.75rem;
|
|
292
|
+
--spacing-md: 1.75rem;
|
|
293
|
+
--spacing-lg: 2.75rem;
|
|
294
|
+
--spacing-xl: 3.75rem;
|
|
295
|
+
--spacing-xxl: 4.75rem;
|
|
296
|
+
|
|
297
|
+
@media (min-width: $breakpoint-md) {
|
|
298
|
+
--spacing-micro: 0.25rem;
|
|
291
299
|
--spacing-xsm: 0.5rem;
|
|
292
|
-
--spacing-sm:
|
|
293
|
-
--spacing-md:
|
|
294
|
-
--spacing-lg:
|
|
295
|
-
--spacing-xl:
|
|
296
|
-
--spacing-xxl:
|
|
300
|
+
--spacing-sm: 1rem;
|
|
301
|
+
--spacing-md: 2rem;
|
|
302
|
+
--spacing-lg: 3rem;
|
|
303
|
+
--spacing-xl: 4rem;
|
|
304
|
+
--spacing-xxl: 5rem;
|
|
297
305
|
}
|
|
298
306
|
|
|
299
|
-
@media (min-width:
|
|
307
|
+
@media (min-width: $breakpoint-xl) {
|
|
300
308
|
--spacing-micro: 0.5rem;
|
|
301
309
|
--spacing-xsm: 0.75rem;
|
|
302
310
|
--spacing-sm: 1.25rem;
|
|
@@ -314,6 +322,7 @@ $spacing-md: var(--spacing-md);
|
|
|
314
322
|
$spacing-lg: var(--spacing-lg);
|
|
315
323
|
$spacing-xl: var(--spacing-xl);
|
|
316
324
|
$spacing-xxl: var(--spacing-xl);
|
|
325
|
+
$spacing-sizes: micro, xsm, sm, md, lg, xl, xxl;
|
|
317
326
|
|
|
318
327
|
// PADDING
|
|
319
328
|
$padding-micro: var(--spacing-micro);
|
|
@@ -334,14 +343,6 @@ $margin-lg: var(--spacing-lg);
|
|
|
334
343
|
$margin-xl: var(--spacing-xl);
|
|
335
344
|
$margin-xxl: var(--spacing-xxl);
|
|
336
345
|
|
|
337
|
-
////////////////////////
|
|
338
|
-
/// Breakpoint TOKENS that map to minimum pixels
|
|
339
|
-
///////////////////////
|
|
340
|
-
$breakpoint-sm: 461px;
|
|
341
|
-
$breakpoint-md: 1301px;
|
|
342
|
-
$breakpoint-lg: 1401px;
|
|
343
|
-
$breakpoint-xl: 1801px;
|
|
344
|
-
|
|
345
346
|
////////////////////////
|
|
346
347
|
/// max-site-width TOKEN:
|
|
347
348
|
///////////////////////
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
margin: $spacing-lg 0 0;
|
|
9
9
|
max-width: 100%;
|
|
10
10
|
|
|
11
|
+
&__logo svg {
|
|
12
|
+
height: 10px;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
&__links {
|
|
12
16
|
display: flex;
|
|
13
17
|
flex-direction: column;
|
|
@@ -16,10 +20,21 @@
|
|
|
16
20
|
padding: $spacing-lg $spacing-md $spacing-md $spacing-md;
|
|
17
21
|
width: 100%;
|
|
18
22
|
|
|
19
|
-
@include media($size-
|
|
20
|
-
flex-
|
|
23
|
+
@include media($size-md) {
|
|
24
|
+
flex-flow: row wrap;
|
|
25
|
+
gap: $spacing-lg;
|
|
21
26
|
max-width: $desktop-max-width;
|
|
22
27
|
padding: $spacing-lg $spacing-md $spacing-lg $spacing-md;
|
|
28
|
+
|
|
29
|
+
.#{$px}-social {
|
|
30
|
+
flex-basis: 100%; // force this to wrap
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@include media($size-lg) {
|
|
35
|
+
.#{$px}-social {
|
|
36
|
+
flex-basis: 0;
|
|
37
|
+
}
|
|
23
38
|
}
|
|
24
39
|
|
|
25
40
|
div {
|
|
@@ -50,12 +65,12 @@
|
|
|
50
65
|
&-desktop {
|
|
51
66
|
display: none;
|
|
52
67
|
|
|
53
|
-
@include media($size-
|
|
68
|
+
@include media($size-md) {
|
|
54
69
|
display: block;
|
|
55
70
|
}
|
|
56
71
|
}
|
|
57
72
|
|
|
58
|
-
@include media($size-
|
|
73
|
+
@include media($size-md) {
|
|
59
74
|
&-mobile {
|
|
60
75
|
display: none;
|
|
61
76
|
}
|
|
@@ -84,7 +99,7 @@
|
|
|
84
99
|
opacity: 1;
|
|
85
100
|
padding: $spacing-sm 0;
|
|
86
101
|
|
|
87
|
-
@include media($size-
|
|
102
|
+
@include media($size-md) {
|
|
88
103
|
cursor: unset;
|
|
89
104
|
}
|
|
90
105
|
|
|
@@ -14,4 +14,15 @@
|
|
|
14
14
|
margin: 0 $spacing-xl;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
// Generate unique classes for column and row gaps with all spacings
|
|
19
|
+
@each $spacing-size in $spacing-sizes {
|
|
20
|
+
&--column-gap-#{$spacing-size} {
|
|
21
|
+
column-gap: var(--spacing-#{$spacing-size});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--row-gap-#{$spacing-size} {
|
|
25
|
+
row-gap: var(--spacing-#{$spacing-size});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
17
28
|
}
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@include media($size-sm) {
|
|
30
|
-
@for $i from 1 through
|
|
30
|
+
@for $i from 1 through 2 {
|
|
31
31
|
&--span-sm-#{$i} {
|
|
32
|
-
@include gridItemColumnSpan($i,
|
|
32
|
+
@include gridItemColumnSpan($i, 2);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@include media($size-md) {
|
|
38
|
-
@for $i from 1 through
|
|
38
|
+
@for $i from 1 through 6 {
|
|
39
39
|
&--span-md-#{$i} {
|
|
40
|
-
@include gridItemColumnSpan($i,
|
|
40
|
+
@include gridItemColumnSpan($i, 6);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
padding: 1rem;
|
|
14
14
|
width: 100%;
|
|
15
15
|
|
|
16
|
-
@media
|
|
16
|
+
@include media($size-md, $type: 'max') {
|
|
17
17
|
align-items: center;
|
|
18
18
|
align-self: stretch;
|
|
19
19
|
background: transparent;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
gap: 1.875rem;
|
|
22
|
-
|
|
22
|
+
min-height: unset;
|
|
23
|
+
padding: 1.875rem 0 0;
|
|
23
24
|
|
|
24
25
|
&::after {
|
|
25
26
|
background: var(--background);
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
color: $pure-white;
|
|
48
49
|
text-align: center;
|
|
49
50
|
|
|
50
|
-
@media
|
|
51
|
+
@include media($size-md, $type: 'max') {
|
|
51
52
|
color: $pure-black;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -72,11 +73,11 @@
|
|
|
72
73
|
font-size: 0.75rem;
|
|
73
74
|
gap: 1.875rem;
|
|
74
75
|
|
|
75
|
-
@media
|
|
76
|
+
@include media($size-md) {
|
|
76
77
|
font-size: 0.875rem;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
@media
|
|
80
|
+
@include media($size-md, $type: 'max') {
|
|
80
81
|
align-items: center;
|
|
81
82
|
flex-direction: column;
|
|
82
83
|
gap: 1rem;
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
padding: 0;
|
|
9
9
|
width: 100%;
|
|
10
10
|
|
|
11
|
-
@include media($size-
|
|
11
|
+
@include media($size-md) {
|
|
12
12
|
margin-top: 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.#{$px}-text {
|
|
16
16
|
margin-bottom: $spacing-sm;
|
|
17
17
|
|
|
18
|
-
@include media($size-
|
|
18
|
+
@include media($size-md) {
|
|
19
19
|
margin-bottom: $spacing-sm;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@include media($size-
|
|
23
|
+
@include media($size-md) {
|
|
24
24
|
align-items: flex-start;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
padding: $spacing-sm 0 0;
|
|
56
56
|
width: 100%;
|
|
57
57
|
|
|
58
|
-
@include media($size-
|
|
58
|
+
@include media($size-md) {
|
|
59
59
|
gap: 0 1rem;
|
|
60
60
|
justify-content: flex-start;
|
|
61
61
|
margin: $spacing-sm 0 $spacing-md;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
margin: $spacing-sm 0 $spacing-md;
|
|
25
25
|
width: 100%;
|
|
26
26
|
|
|
27
|
-
@include media($size-
|
|
27
|
+
@include media($size-md) {
|
|
28
28
|
width: 240px;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
font-size: 0.75rem;
|
|
37
37
|
margin-top: $spacing-sm;
|
|
38
38
|
|
|
39
|
-
@include media($size-
|
|
39
|
+
@include media($size-md) {
|
|
40
40
|
margin-top: $spacing-xl;
|
|
41
41
|
}
|
|
42
42
|
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -17,6 +17,15 @@ export declare enum PaddingTokens {
|
|
|
17
17
|
xl = "xl",
|
|
18
18
|
xxl = "xxl"
|
|
19
19
|
}
|
|
20
|
+
export declare enum SpacingTokens {
|
|
21
|
+
micro = "micro",
|
|
22
|
+
xs = "xs",
|
|
23
|
+
sm = "sm",
|
|
24
|
+
md = "md",
|
|
25
|
+
lg = "lg",
|
|
26
|
+
xl = "xl",
|
|
27
|
+
xxl = "xxl"
|
|
28
|
+
}
|
|
20
29
|
export declare const noOp: () => void;
|
|
21
30
|
export interface InputProps {
|
|
22
31
|
/**
|
package/dist/utils/index.js
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { kebabCase as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { kebabCase as c } from "../node_modules/change-case/dist/index.js";
|
|
3
3
|
import * as u from "react";
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const o = "seldon", v = ({ id: e, ...r }, t) => {
|
|
5
|
+
const n = c(t);
|
|
6
6
|
return {
|
|
7
|
-
...
|
|
8
|
-
"data-testid": e ? `${
|
|
9
|
-
className: `${
|
|
7
|
+
...r,
|
|
8
|
+
"data-testid": e ? `${n}-${e}` : `${n}`,
|
|
9
|
+
className: `${o}-${n}`
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
var $ = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))($ || {});
|
|
13
|
-
const
|
|
12
|
+
var x = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))(x || {}), $ = /* @__PURE__ */ ((e) => (e.micro = "micro", e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))($ || {});
|
|
13
|
+
const C = () => {
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function w({
|
|
16
16
|
disabled: e = !1,
|
|
17
|
-
id:
|
|
18
|
-
invalid:
|
|
19
|
-
invalidText:
|
|
20
|
-
readOnly:
|
|
21
|
-
type:
|
|
22
|
-
warn:
|
|
23
|
-
warnText:
|
|
17
|
+
id: r,
|
|
18
|
+
invalid: t = !1,
|
|
19
|
+
invalidText: n = "invalid",
|
|
20
|
+
readOnly: a = !1,
|
|
21
|
+
type: s,
|
|
22
|
+
warn: i = !1,
|
|
23
|
+
warnText: m
|
|
24
24
|
}) {
|
|
25
|
-
const
|
|
26
|
-
disabled: !
|
|
27
|
-
invalid: !
|
|
28
|
-
invalidId: `${
|
|
29
|
-
type:
|
|
30
|
-
warn: !
|
|
31
|
-
warnId: `${
|
|
25
|
+
const l = {
|
|
26
|
+
disabled: !a && e,
|
|
27
|
+
invalid: !a && !e && t,
|
|
28
|
+
invalidId: `${r}-error-msg`,
|
|
29
|
+
type: s === "toggle" ? "checkbox" : s,
|
|
30
|
+
warn: !a && !e && !t && i,
|
|
31
|
+
warnId: `${r}-warn-msg`,
|
|
32
32
|
validation: null
|
|
33
33
|
};
|
|
34
|
-
return
|
|
34
|
+
return l.invalid && (l.validation = /* @__PURE__ */ d("div", { className: `${o}-input__validation ${o}-${s}-input--invalid`, id: l.invalidId, children: n })), l.warn && (l.validation = /* @__PURE__ */ d("div", { className: `${o}-input__validation ${o}-${s}-input--warn`, id: l.warnId, children: m })), l;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
},
|
|
40
|
-
const
|
|
41
|
-
return `${
|
|
36
|
+
const g = (/* @__PURE__ */ new Date()).getFullYear(), h = (e, r = "end", t = "vertical") => `${o}-padding-${t}-${e}-${r}`, I = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), N = function(e, r, t = !1) {
|
|
37
|
+
const n = u.Children.toArray(e).filter((a) => a && a.type === r && !t ? a : a && a.type !== r && t);
|
|
38
|
+
return n.length > 0 ? n : null;
|
|
39
|
+
}, R = (e) => {
|
|
40
|
+
const r = e.split("?"), t = new URLSearchParams(r[1]), a = Array.from(t.entries()).map(([i, m]) => [i, encodeURIComponent(m)]).map(([i, m]) => `${i}=${m}`).join("&");
|
|
41
|
+
return `${r[0]}?${a}`;
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
v as
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
x as PaddingTokens,
|
|
45
|
+
$ as SpacingTokens,
|
|
46
|
+
g as defaultYear,
|
|
47
|
+
I as emailValidation,
|
|
48
|
+
R as encodeURLSearchParams,
|
|
49
|
+
N as findChildrenOfType,
|
|
50
|
+
h as generatePaddingClassName,
|
|
51
|
+
v as getCommonProps,
|
|
52
|
+
C as noOp,
|
|
53
|
+
o as px,
|
|
54
|
+
w as useNormalizedInputProps
|
|
54
55
|
};
|