@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.
@@ -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 d from "../../assets/PhillipsLogo.svg.js";
5
- import { TextVariants as f } from "../Text/types.js";
6
- import c from "../Text/Text.js";
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": "header-logo", className: `${r}-header__logo`, children: /* @__PURE__ */ o("a", { href: "/", "aria-label": "logo", children: /* @__PURE__ */ o(d, {}) }) }),
16
- /* @__PURE__ */ o(c, { variant: f.body3, children: s })
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
- export interface GridProps extends React.HTMLAttributes<HTMLElement> {
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 t } from "react/jsx-runtime";
2
- import n from "../../node_modules/classnames/index.js";
3
- import { getCommonProps as c } from "../../utils/index.js";
4
- function p({ children: o, className: s, element: e = "section", ...m }) {
5
- const { className: r, ...a } = c(m, "Grid");
6
- return /* @__PURE__ */ t(e, { ...a, className: n(r, s), ...m, children: o });
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
- p as Grid,
10
- p as default
25
+ C as Grid,
26
+ C as default
11
27
  };
@@ -0,0 +1,2 @@
1
+ import { SpacingTokens } from '../../utils';
2
+ export declare const determineGridClassName: (baseClassName: string, columnGap: SpacingTokens, rowGap: SpacingTokens) => string;
@@ -0,0 +1,8 @@
1
+ import t from "../../node_modules/classnames/index.js";
2
+ const m = (r, o, n) => t(
3
+ `${r} ${r}--column-gap-${o}`,
4
+ `${r}--row-gap-${n}`
5
+ );
6
+ export {
7
+ m as determineGridClassName
8
+ };
@@ -7,8 +7,8 @@ import { GridItemAlign as N } from "./types.js";
7
7
  const A = ({
8
8
  children: p,
9
9
  xs: m = 2,
10
- sm: r = 4,
11
- md: t = 12,
10
+ sm: r = 2,
11
+ md: t = 6,
12
12
  lg: o = 12,
13
13
  align: s = N.center,
14
14
  element: c = "div",
@@ -1,6 +1,7 @@
1
1
  import LinkBlock, { type LinkBlockProps } from '../LinkBlock/LinkBlock';
2
2
  import React from 'react';
3
- export interface LinkListProps extends React.HTMLAttributes<HTMLUListElement> {
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.heading3, className: `${o}__header`, children: e }),
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, defaultYear as f, emailValidation as m, encodeURLSearchParams as p, findChildrenOfType as d, generatePaddingClassName as s, getCommonProps as u, noOp as l, px as i, useNormalizedInputProps as x } from "./utils/index.js";
2
- import { default as g } from "./pages/Page.js";
3
- import { default as S } from "./components/Button/Button.js";
4
- import { ButtonVariants as I } from "./components/Button/types.js";
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 k } from "./components/ErrorBoundary/ErrorBoundary.js";
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 b } from "./components/Grid/Grid.js";
9
- import { default as v } from "./components/Header/Header.js";
10
- import { default as C } from "./components/Navigation/Navigation.js";
11
- import { default as y } from "./components/Navigation/NavigationItem/NavigationItem.js";
12
- import { default as H } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
13
- import { default as O } from "./components/Navigation/NavigationList/NavigationList.js";
14
- import { default as U } from "./components/HeroBanner/HeroBanner.js";
15
- import { default as E } from "./components/Input/Input.js";
16
- import { default as Y } from "./components/Link/Link.js";
17
- import { LinkVariants as q } from "./components/Link/types.js";
18
- import { default as K } from "./components/LinkBlock/LinkBlock.js";
19
- import { default as W } from "./components/LinkList/LinkList.js";
20
- import { default as Z } from "./components/Row/Row.js";
21
- import { default as $ } from "./components/GridItem/GridItem.js";
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 te } from "./components/Search/Search.js";
24
- import { default as fe } from "./components/Select/Select.js";
25
- import { default as pe } from "./components/SplitPanel/SplitPanel.js";
26
- import { default as se } from "./components/Subscribe/Subscribe.js";
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 xe } from "./components/Social/Social.js";
29
- import { default as ge } from "./components/ViewingsList/ViewingsList.js";
30
- import { default as Se } from "./components/Modal/Modal.js";
31
- import { default as Ie } from "./components/Drawer/Drawer.js";
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 ke } from "./components/Text/types.js";
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 be } from "./components/Accordion/Accordion.js";
36
- import { default as ve } from "./components/Accordion/AccordionItem.js";
37
- import { default as Ce } from "./components/UserManagement/UserManagement.js";
38
- import { AuthState as ye } from "./components/UserManagement/types.js";
39
- import { SupportedLanguages as He } from "./types/commonTypes.js";
40
- import { default as Oe } from "./components/Breadcrumb/Breadcrumb.js";
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 Ue } from "./components/Dropdown/Dropdown.js";
44
- import { default as Ee } from "./components/Video/Video.js";
43
+ import { default as ze } from "./components/Dropdown/Dropdown.js";
44
+ import { default as Fe } from "./components/Video/Video.js";
45
45
  export {
46
- be as Accordion,
47
- ve as AccordionItem,
48
- ye as AuthState,
49
- Oe as Breadcrumb,
50
- S as Button,
51
- I as ButtonVariants,
52
- Ie as Drawer,
53
- Ue as Dropdown,
54
- k as ErrorBoundary,
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
- b as Grid,
57
- $ as GridItem,
56
+ h as Grid,
57
+ ee as GridItem,
58
58
  re as GridItemAlign,
59
- v as Header,
60
- U as HeroBanner,
59
+ A as Header,
60
+ z as HeroBanner,
61
61
  P as IconButton,
62
- E as Input,
63
- Y as Link,
64
- K as LinkBlock,
65
- W as LinkList,
66
- q as LinkVariants,
67
- Se as Modal,
68
- C as Navigation,
69
- y as NavigationItem,
70
- H as NavigationItemTrigger,
71
- O as NavigationList,
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
- g as Page,
74
- Z as Row,
75
- te as Search,
76
- fe as Select,
77
- xe as Social,
78
- pe as SplitPanel,
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
- se as Subscribe,
81
+ ue as Subscribe,
81
82
  le as SubscriptionState,
82
- He as SupportedLanguages,
83
+ Me as SupportedLanguages,
83
84
  we as Text,
84
- ke as TextVariants,
85
- Ce as UserManagement,
86
- Ee as Video,
87
- ge as ViewingsList,
88
- f as defaultYear,
89
- m as emailValidation,
90
- p as encodeURLSearchParams,
91
- d as findChildrenOfType,
92
- s as generatePaddingClassName,
93
- u as getCommonProps,
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
- i as px,
96
- x as useNormalizedInputProps
96
+ x as px,
97
+ n as useNormalizedInputProps
97
98
  };
@@ -70,7 +70,7 @@
70
70
  row-gap: $spacing-lg;
71
71
 
72
72
  @media (min-width: $breakpoint-md) {
73
- grid-template-columns: repeat(4, 1fr);
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-md {
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-lg {
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
  }
@@ -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.75rem;
109
- --quote-line-height: 2.25rem;
110
- --heading-size1: 1.75rem;
111
- --heading-line-height-size1: 2rem;
112
- --heading-size2: 1.75rem;
113
- --heading-line-height-size2: 2rem;
114
- --heading-size3: 1.5rem;
115
- --heading-line-height-size3: 1.75rem;
116
- --heading-size4: 1.25rem;
117
- --heading-line-height-size4: 1.5rem;
118
- --heading-size5: 1rem;
119
- --heading-line-height-size5: 1.25rem;
120
- --string-size1: 1.25rem;
121
- --string-line-height-size1: 1.5rem;
122
- --string-size2: 1rem;
123
- --string-line-height-size2: 1.25rem;
124
- --string-size3: 0.75rem;
125
- --string-line-height-size3: 1rem;
126
- --body-size1: 1.25rem;
127
- --body-line-height-size1: 1.75rem;
128
- --body-size2: 1rem;
129
- --body-line-height-size2: 1.5rem;
130
- --body-size3: 0.75rem;
131
- --body-line-height-size3: 1.25rem;
132
- --label-size1: 1.25rem;
133
- --label-size2: 1rem;
134
- --label-size3: 0.75rem;
135
- --link-label-size: 1rem;
136
- --link-label-line-height: 1rem;
137
- --button-label-size: 1rem;
138
- --button-label-line-height: 1.25rem;
139
- --badge-label-size: 0.75rem;
140
- --badge-label-line-height: 1rem;
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 (max-width: 960px) {
147
- --quote-size: 1.5rem;
148
- --quote-line-height: 2rem;
149
- --heading-size1: 1.5rem;
150
- --heading-line-height-size1: 1.75rem;
151
- --heading-size2: 1.5rem;
152
- --heading-line-height-size2: 1.75rem;
153
- --heading-size3: 1.25rem;
154
- --heading-line-height-size3: 1.5rem;
155
- --heading-size4: 1rem;
156
- --heading-line-height-size4: 1.25rem;
157
- --heading-size5: 0.75rem;
158
- --heading-line-height-size5: 1rem;
159
- --string-size1: 1rem;
160
- --string-line-height-size1: 1.25rem;
161
- --string-size2: 0.75rem;
162
- --string-line-height-size2: 1rem;
163
- --string-size3: 0.5rem;
164
- --string-line-height-size3: 0.75rem;
165
- --body-size1: 1rem;
166
- --body-line-height-size1: 1.5rem;
167
- --body-size2: 0.75rem;
168
- --body-line-height-size2: 1.25rem;
169
- --body-size3: 0.5rem;
170
- --body-line-height-size3: 1rem;
171
- --label-size1: 1rem;
172
- --label-size2: 0.75rem;
173
- --label-size3: 0.56rem;
174
- --link-label-size: 0.75rem;
175
- --link-label-line-height: 0.75rem;
176
- --button-label-size: 0.75rem;
177
- --button-label-line-height: 1rem;
178
- --badge-label-size: 0.5rem;
179
- --badge-label-line-height: 0.67rem;
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.75rem;
191
+ --snw-flyout-link-line-height: 1.875rem;
184
192
  }
185
193
 
186
- @media (min-width: 1801px) {
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: 1rem;
284
- --spacing-md: 2rem;
285
- --spacing-lg: 3rem;
286
- --spacing-xl: 4rem;
287
- --spacing-xxl: 5rem;
288
-
289
- @media (max-width: 960px) {
290
- --spacing-micro: 0.25;
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: 0.75rem;
293
- --spacing-md: 1.75rem;
294
- --spacing-lg: 2.75rem;
295
- --spacing-xl: 3.75rem;
296
- --spacing-xxl: 4.75rem;
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: 1801px) {
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-sm) {
20
- flex-direction: row;
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-sm) {
68
+ @include media($size-md) {
54
69
  display: block;
55
70
  }
56
71
  }
57
72
 
58
- @include media($size-sm) {
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-sm) {
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 4 {
30
+ @for $i from 1 through 2 {
31
31
  &--span-sm-#{$i} {
32
- @include gridItemColumnSpan($i, 4);
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 12 {
38
+ @for $i from 1 through 6 {
39
39
  &--span-md-#{$i} {
40
- @include gridItemColumnSpan($i, 12);
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 (max-width: $breakpoint-sm) {
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
- padding: 1.875rem 0.9375rem;
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 (max-width: $breakpoint-sm) {
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 (min-width: $breakpoint-sm) {
76
+ @include media($size-md) {
76
77
  font-size: 0.875rem;
77
78
  }
78
79
 
79
- @media (max-width: $breakpoint-sm) {
80
+ @include media($size-md, $type: 'max') {
80
81
  align-items: center;
81
82
  flex-direction: column;
82
83
  gap: 1rem;
@@ -6,6 +6,10 @@
6
6
  grid-column: span 2;
7
7
 
8
8
  @include media($size-md) {
9
+ grid-column: span 3;
10
+ }
11
+
12
+ @include media($size-lg) {
9
13
  grid-column: span 4;
10
14
  }
11
15
  }
@@ -8,19 +8,19 @@
8
8
  padding: 0;
9
9
  width: 100%;
10
10
 
11
- @include media($size-sm) {
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-sm) {
18
+ @include media($size-md) {
19
19
  margin-bottom: $spacing-sm;
20
20
  }
21
21
  }
22
22
 
23
- @include media($size-sm) {
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-sm) {
58
+ @include media($size-md) {
59
59
  gap: 0 1rem;
60
60
  justify-content: flex-start;
61
61
  margin: $spacing-sm 0 $spacing-md;
@@ -10,7 +10,7 @@
10
10
  flex: 1 1 0px;
11
11
  }
12
12
 
13
- @include media($size-sm) {
13
+ @include media($size-md) {
14
14
  align-items: stretch;
15
15
  flex-direction: row;
16
16
 
@@ -24,7 +24,7 @@
24
24
  margin: $spacing-sm 0 $spacing-md;
25
25
  width: 100%;
26
26
 
27
- @include media($size-sm) {
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-sm) {
39
+ @include media($size-md) {
40
40
  margin-top: $spacing-xl;
41
41
  }
42
42
  }
@@ -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
  /**
@@ -1,54 +1,55 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { kebabCase as d } from "../node_modules/change-case/dist/index.js";
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 s = "seldon", x = ({ id: e, ...n }, a) => {
5
- const t = d(a);
4
+ const o = "seldon", v = ({ id: e, ...r }, t) => {
5
+ const n = c(t);
6
6
  return {
7
- ...n,
8
- "data-testid": e ? `${t}-${e}` : `${t}`,
9
- className: `${s}-${t}`
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 v = () => {
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 g({
15
+ function w({
16
16
  disabled: e = !1,
17
- id: n,
18
- invalid: a = !1,
19
- invalidText: t = "invalid",
20
- readOnly: r = !1,
21
- type: i,
22
- warn: l = !1,
23
- warnText: c
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 o = {
26
- disabled: !r && e,
27
- invalid: !r && !e && a,
28
- invalidId: `${n}-error-msg`,
29
- type: i === "toggle" ? "checkbox" : i,
30
- warn: !r && !e && !a && l,
31
- warnId: `${n}-warn-msg`,
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 o.invalid && (o.validation = /* @__PURE__ */ m("div", { className: `${s}-input__validation ${s}-${i}-input--invalid`, id: o.invalidId, children: t })), o.warn && (o.validation = /* @__PURE__ */ m("div", { className: `${s}-input__validation ${s}-${i}-input--warn`, id: o.warnId, children: c })), o;
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 C = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, n = "end", a = "vertical") => `${s}-padding-${a}-${e}-${n}`, h = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), I = function(e, n, a = !1) {
37
- const t = u.Children.toArray(e).filter((r) => r && r.type === n && !a ? r : r && r.type !== n && a);
38
- return t.length > 0 ? t : null;
39
- }, N = (e) => {
40
- const n = e.split("?"), a = new URLSearchParams(n[1]), r = Array.from(a.entries()).map(([l, c]) => [l, encodeURIComponent(c)]).map(([l, c]) => `${l}=${c}`).join("&");
41
- return `${n[0]}?${r}`;
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
- $ as PaddingTokens,
45
- C as defaultYear,
46
- h as emailValidation,
47
- N as encodeURLSearchParams,
48
- I as findChildrenOfType,
49
- w as generatePaddingClassName,
50
- x as getCommonProps,
51
- v as noOp,
52
- s as px,
53
- g as useNormalizedInputProps
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.46.0",
3
+ "version": "1.47.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"