braid-design-system 32.9.2 → 32.11.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/CHANGELOG.md +61 -0
- package/dist/ToastContext.chunk.cjs +8 -8
- package/dist/ToastContext.chunk.mjs +8 -8
- package/dist/reset.d.ts +2 -1
- package/dist/styles/lib/components/TextLink/TextLink.css.cjs +15 -19
- package/dist/styles/lib/components/TextLink/TextLink.css.mjs +15 -19
- package/dist/styles/lib/components/private/Modal/Modal.css.cjs +34 -13
- package/dist/styles/lib/components/private/Modal/Modal.css.mjs +35 -14
- package/dist/styles/lib/components/private/Modal/ModalExternalGutter.cjs +5 -1
- package/dist/styles/lib/components/private/Modal/ModalExternalGutter.mjs +5 -1
- package/dist/styles/lib/themes/docs/tokens.cjs +6 -6
- package/dist/styles/lib/themes/docs/tokens.mjs +6 -6
- package/dist/styles/lib/themes/makeVanillaTheme.cjs +7 -1
- package/dist/styles/lib/themes/makeVanillaTheme.mjs +7 -1
- package/dist/styles/lib/themes/seekJobs/tokens.cjs +3 -3
- package/dist/styles/lib/themes/seekJobs/tokens.mjs +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 32.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Button, ButtonLink:** Provide `formAccent` as the name for undefined tone ([#1359](https://github.com/seek-oss/braid-design-system/pull/1359))
|
|
8
|
+
|
|
9
|
+
Formalise the name of the `undefined` tone as `formAccent`, making it more discoverable as an accent available for increased prominence.
|
|
10
|
+
|
|
11
|
+
Note: Consumers should only apply this tone where an action should be emphasized explicitly. The `undefined` value is still valid for buttons that should follow the default button style of the theme.
|
|
12
|
+
|
|
13
|
+
**EXAMPLE USAGE:**
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<Button tone="formAccent">...</Button>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 32.10.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- **seekJobs:** Change link colour to neutral ([#1347](https://github.com/seek-oss/braid-design-system/pull/1347))
|
|
24
|
+
|
|
25
|
+
Changing the `foregroundColor` token for `link` on the `seekJobs` theme to align with neutral text.
|
|
26
|
+
Our different approach to using colour has seen links dialled back to compete less with other messaging and CTAs.
|
|
27
|
+
|
|
28
|
+
This affects the following usages across the system:
|
|
29
|
+
|
|
30
|
+
- `vars.foregroundColor.link`
|
|
31
|
+
- `Text` (using `tone="link"`)
|
|
32
|
+
- `TextLink` and (`TextLinkButton`)
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- **TextLink, TextLinkButton:** Underline regular links in non-legacy themes ([#1347](https://github.com/seek-oss/braid-design-system/pull/1347))
|
|
37
|
+
|
|
38
|
+
To improve affordance beyond primarily being colour, a `TextLink` (and `TextLinkButton`) will now always be underlined, in line with [best practice accessibility guidelines].
|
|
39
|
+
|
|
40
|
+
Given this has not been the case previously, this decision has been applied to non-legacy themes only, as such only affecting consumers of `seekJobs`, `docs` and `wireframe`.
|
|
41
|
+
|
|
42
|
+
[best practice accessibility guidelines]: https://webaim.org/techniques/hypertext/link_text#appearance
|
|
43
|
+
|
|
44
|
+
- **TextLink, TextLinkButton:** Apply themed focus outline ([#1347](https://github.com/seek-oss/braid-design-system/pull/1347))
|
|
45
|
+
|
|
46
|
+
Apply a focus outline using the relevant focus attributes from the theme, bringing `TextLink` (and `TextLinkButton`) into line with the focus treatment applied to rest of the system.
|
|
47
|
+
|
|
48
|
+
- **TextLink, TextLinkButton:** Reduce `weak` links to `regular` font weight ([#1347](https://github.com/seek-oss/braid-design-system/pull/1347))
|
|
49
|
+
|
|
50
|
+
The font weight of a `weak` link is now reduced to `regular` weight, reducing the link's visual prominence in addition to following the neutral text colour.
|
|
51
|
+
|
|
52
|
+
- **docs:** Lighten soft background tokens ([#1347](https://github.com/seek-oss/braid-design-system/pull/1347))
|
|
53
|
+
|
|
54
|
+
Lighten the `brandAccentSoft` and `formAccentSoft` background tokens for the `docs` theme.
|
|
55
|
+
|
|
56
|
+
- **Dialog, Drawer:** Adapt max height to available viewport space ([#1352](https://github.com/seek-oss/braid-design-system/pull/1352))
|
|
57
|
+
|
|
58
|
+
Make use of the new [dynamic viewport units] for applying a max height to modal elements such as `Dialog` and `Drawer`. These new units take into account dynamic browser toolbars that expand and contract as the user scrolls, ensuring the browser interface never obscures the web site content.
|
|
59
|
+
|
|
60
|
+
Fix also incorporates fallback for older browsers to use regular viewport units.
|
|
61
|
+
|
|
62
|
+
[Dynamic Viewport units]: https://web.dev/viewport-units/
|
|
63
|
+
|
|
3
64
|
## 32.9.2
|
|
4
65
|
|
|
5
66
|
### Patch Changes
|
|
@@ -1294,7 +1294,7 @@ const buttonVariants = [
|
|
|
1294
1294
|
];
|
|
1295
1295
|
const variants = {
|
|
1296
1296
|
solid: {
|
|
1297
|
-
|
|
1297
|
+
formAccent: {
|
|
1298
1298
|
textTone: void 0,
|
|
1299
1299
|
background: "formAccent",
|
|
1300
1300
|
backgroundHover: "formAccentHover",
|
|
@@ -1324,7 +1324,7 @@ const variants = {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
},
|
|
1326
1326
|
soft: {
|
|
1327
|
-
|
|
1327
|
+
formAccent: {
|
|
1328
1328
|
textTone: "formAccent",
|
|
1329
1329
|
background: { light: "formAccentSoft", dark: "customDark" },
|
|
1330
1330
|
backgroundHover: "formAccentSoftHover",
|
|
@@ -1354,7 +1354,7 @@ const variants = {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
},
|
|
1356
1356
|
transparent: {
|
|
1357
|
-
|
|
1357
|
+
formAccent: {
|
|
1358
1358
|
textTone: "formAccent",
|
|
1359
1359
|
background: void 0,
|
|
1360
1360
|
backgroundHover: "formAccentSoftHover",
|
|
@@ -1384,7 +1384,7 @@ const variants = {
|
|
|
1384
1384
|
}
|
|
1385
1385
|
},
|
|
1386
1386
|
ghost: {
|
|
1387
|
-
|
|
1387
|
+
formAccent: {
|
|
1388
1388
|
textTone: "formAccent",
|
|
1389
1389
|
background: void 0,
|
|
1390
1390
|
backgroundHover: "formAccentSoftHover",
|
|
@@ -1428,7 +1428,7 @@ const ButtonOverlays = ({
|
|
|
1428
1428
|
forceActive = false,
|
|
1429
1429
|
radius = buttonRadius
|
|
1430
1430
|
}) => {
|
|
1431
|
-
const stylesForVariant = variants[variant][tone ?? "
|
|
1431
|
+
const stylesForVariant = variants[variant][tone ?? "formAccent"];
|
|
1432
1432
|
const colorContrast = useColorContrast();
|
|
1433
1433
|
const lightness = useBackgroundLightness();
|
|
1434
1434
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1493,7 +1493,7 @@ const ButtonText = ({
|
|
|
1493
1493
|
const actionsContext = React.useContext(ActionsContext);
|
|
1494
1494
|
const isLegacyTheme = sideEffects_lib_components_BraidProvider_BraidProvider_cjs.useBraidTheme().legacy;
|
|
1495
1495
|
const size = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
|
|
1496
|
-
const stylesForVariant = variants[variant][tone ?? "
|
|
1496
|
+
const stylesForVariant = variants[variant][tone ?? "formAccent"];
|
|
1497
1497
|
const shouldReducePaddingX = size === "small" || variant === "transparent";
|
|
1498
1498
|
const labelPaddingXForTheme = isLegacyTheme ? "medium" : "gutter";
|
|
1499
1499
|
const labelPaddingX = shouldReducePaddingX ? transparentPaddingX : labelPaddingXForTheme;
|
|
@@ -1561,7 +1561,7 @@ const useButtonStyles = ({
|
|
|
1561
1561
|
}) => {
|
|
1562
1562
|
const actionsContext = React.useContext(ActionsContext);
|
|
1563
1563
|
const size = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
|
|
1564
|
-
const stylesForVariant = variants[variant][tone ?? "
|
|
1564
|
+
const stylesForVariant = variants[variant][tone ?? "formAccent"];
|
|
1565
1565
|
const colorConstrast = useColorContrast();
|
|
1566
1566
|
const lightness = useBackgroundLightness();
|
|
1567
1567
|
return {
|
|
@@ -2025,7 +2025,7 @@ const useLinkStyles = ({
|
|
|
2025
2025
|
return clsx__default.default(
|
|
2026
2026
|
styles_lib_components_TextLink_TextLink_css_cjs.base,
|
|
2027
2027
|
linkStyles,
|
|
2028
|
-
styles_lib_css_typography_css_cjs.fontWeight.medium,
|
|
2028
|
+
weight !== "weak" ? styles_lib_css_typography_css_cjs.fontWeight.medium : void 0,
|
|
2029
2029
|
showVisited ? [
|
|
2030
2030
|
styles_lib_components_TextLink_TextLink_css_cjs.visitedLightMode[backgroundLightness.lightMode],
|
|
2031
2031
|
styles_lib_components_TextLink_TextLink_css_cjs.visitedDarkMode[backgroundLightness.darkMode]
|
|
@@ -1287,7 +1287,7 @@ const buttonVariants = [
|
|
|
1287
1287
|
];
|
|
1288
1288
|
const variants = {
|
|
1289
1289
|
solid: {
|
|
1290
|
-
|
|
1290
|
+
formAccent: {
|
|
1291
1291
|
textTone: void 0,
|
|
1292
1292
|
background: "formAccent",
|
|
1293
1293
|
backgroundHover: "formAccentHover",
|
|
@@ -1317,7 +1317,7 @@ const variants = {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
},
|
|
1319
1319
|
soft: {
|
|
1320
|
-
|
|
1320
|
+
formAccent: {
|
|
1321
1321
|
textTone: "formAccent",
|
|
1322
1322
|
background: { light: "formAccentSoft", dark: "customDark" },
|
|
1323
1323
|
backgroundHover: "formAccentSoftHover",
|
|
@@ -1347,7 +1347,7 @@ const variants = {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
},
|
|
1349
1349
|
transparent: {
|
|
1350
|
-
|
|
1350
|
+
formAccent: {
|
|
1351
1351
|
textTone: "formAccent",
|
|
1352
1352
|
background: void 0,
|
|
1353
1353
|
backgroundHover: "formAccentSoftHover",
|
|
@@ -1377,7 +1377,7 @@ const variants = {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
},
|
|
1379
1379
|
ghost: {
|
|
1380
|
-
|
|
1380
|
+
formAccent: {
|
|
1381
1381
|
textTone: "formAccent",
|
|
1382
1382
|
background: void 0,
|
|
1383
1383
|
backgroundHover: "formAccentSoftHover",
|
|
@@ -1421,7 +1421,7 @@ const ButtonOverlays = ({
|
|
|
1421
1421
|
forceActive: forceActive$1 = false,
|
|
1422
1422
|
radius = buttonRadius
|
|
1423
1423
|
}) => {
|
|
1424
|
-
const stylesForVariant = variants[variant][tone2 ?? "
|
|
1424
|
+
const stylesForVariant = variants[variant][tone2 ?? "formAccent"];
|
|
1425
1425
|
const colorContrast = useColorContrast();
|
|
1426
1426
|
const lightness = useBackgroundLightness();
|
|
1427
1427
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1486,7 +1486,7 @@ const ButtonText = ({
|
|
|
1486
1486
|
const actionsContext = useContext(ActionsContext);
|
|
1487
1487
|
const isLegacyTheme = useBraidTheme().legacy;
|
|
1488
1488
|
const size2 = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
|
|
1489
|
-
const stylesForVariant = variants[variant][tone2 ?? "
|
|
1489
|
+
const stylesForVariant = variants[variant][tone2 ?? "formAccent"];
|
|
1490
1490
|
const shouldReducePaddingX = size2 === "small" || variant === "transparent";
|
|
1491
1491
|
const labelPaddingXForTheme = isLegacyTheme ? "medium" : "gutter";
|
|
1492
1492
|
const labelPaddingX = shouldReducePaddingX ? transparentPaddingX : labelPaddingXForTheme;
|
|
@@ -1554,7 +1554,7 @@ const useButtonStyles = ({
|
|
|
1554
1554
|
}) => {
|
|
1555
1555
|
const actionsContext = useContext(ActionsContext);
|
|
1556
1556
|
const size2 = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
|
|
1557
|
-
const stylesForVariant = variants[variant][tone2 ?? "
|
|
1557
|
+
const stylesForVariant = variants[variant][tone2 ?? "formAccent"];
|
|
1558
1558
|
const colorConstrast = useColorContrast();
|
|
1559
1559
|
const lightness = useBackgroundLightness();
|
|
1560
1560
|
return {
|
|
@@ -2018,7 +2018,7 @@ const useLinkStyles = ({
|
|
|
2018
2018
|
return clsx(
|
|
2019
2019
|
base$3,
|
|
2020
2020
|
linkStyles,
|
|
2021
|
-
fontWeight.medium,
|
|
2021
|
+
weight !== "weak" ? fontWeight.medium : void 0,
|
|
2022
2022
|
showVisited ? [
|
|
2023
2023
|
visitedLightMode[backgroundLightness.lightMode],
|
|
2024
2024
|
visitedDarkMode[backgroundLightness.darkMode]
|
package/dist/reset.d.ts
CHANGED
|
@@ -2623,6 +2623,7 @@ declare const vars$1: {
|
|
|
2623
2623
|
readonly weak: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
2624
2624
|
readonly regular: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
2625
2625
|
};
|
|
2626
|
+
readonly linkDecoration: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
2626
2627
|
readonly inlineFieldSize: {
|
|
2627
2628
|
readonly standard: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
2628
2629
|
readonly small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -2830,7 +2831,7 @@ declare const Inline$1: ({ space, align, alignY, collapseBelow, reverse, compone
|
|
|
2830
2831
|
|
|
2831
2832
|
declare const buttonVariants: readonly ["solid", "ghost", "soft", "transparent"];
|
|
2832
2833
|
type ButtonSize = 'standard' | 'small';
|
|
2833
|
-
type ButtonTone = 'brandAccent' | 'critical' | 'neutral';
|
|
2834
|
+
type ButtonTone = 'formAccent' | 'brandAccent' | 'critical' | 'neutral';
|
|
2834
2835
|
type ButtonVariant = (typeof buttonVariants)[number];
|
|
2835
2836
|
interface ButtonStyleProps {
|
|
2836
2837
|
size?: ButtonSize;
|
|
@@ -6,36 +6,28 @@ const styles_lib_themes_vars_css_cjs = require("../../themes/vars.css.cjs");
|
|
|
6
6
|
fileScope.setFileScope("src/lib/components/TextLink/TextLink.css.ts?used", "braid-design-system");
|
|
7
7
|
const textLinkVars = css.createThemeContract({
|
|
8
8
|
color: null,
|
|
9
|
-
colorHover: null
|
|
10
|
-
textDecoration: null,
|
|
11
|
-
textDecorationHover: null
|
|
9
|
+
colorHover: null
|
|
12
10
|
});
|
|
13
11
|
const lightModeRegularLinkVars = css.assignVars(textLinkVars, {
|
|
14
12
|
color: styles_lib_themes_vars_css_cjs.vars.foregroundColor.link,
|
|
15
|
-
colorHover: styles_lib_themes_vars_css_cjs.vars.foregroundColor.linkHover
|
|
16
|
-
textDecoration: "none",
|
|
17
|
-
textDecorationHover: "underline"
|
|
13
|
+
colorHover: styles_lib_themes_vars_css_cjs.vars.foregroundColor.linkHover
|
|
18
14
|
});
|
|
19
15
|
const darkModeRegularLinkVars = css.assignVars(textLinkVars, {
|
|
20
16
|
color: styles_lib_themes_vars_css_cjs.vars.foregroundColor.linkLight,
|
|
21
|
-
colorHover: styles_lib_themes_vars_css_cjs.vars.foregroundColor.linkLight
|
|
22
|
-
textDecoration: "none",
|
|
23
|
-
textDecorationHover: "underline"
|
|
17
|
+
colorHover: styles_lib_themes_vars_css_cjs.vars.foregroundColor.linkLight
|
|
24
18
|
});
|
|
25
19
|
const weakLinkVars = css.assignVars(textLinkVars, {
|
|
26
20
|
color: "inherit",
|
|
27
|
-
colorHover: "inherit"
|
|
28
|
-
textDecoration: "underline",
|
|
29
|
-
textDecorationHover: "underline"
|
|
21
|
+
colorHover: "inherit"
|
|
30
22
|
});
|
|
31
23
|
const base = css.style({
|
|
32
24
|
color: textLinkVars.color,
|
|
33
|
-
textDecoration:
|
|
34
|
-
textDecorationThickness: "0.
|
|
25
|
+
textDecoration: styles_lib_themes_vars_css_cjs.vars.linkDecoration,
|
|
26
|
+
textDecorationThickness: "0.08em",
|
|
35
27
|
textUnderlineOffset: 3,
|
|
36
28
|
":hover": {
|
|
37
29
|
color: textLinkVars.colorHover,
|
|
38
|
-
textDecoration:
|
|
30
|
+
textDecoration: "underline",
|
|
39
31
|
/*
|
|
40
32
|
Duplicating the thickness rule due to inconsistent support
|
|
41
33
|
for shorthand properties of `text-decoration`. Without this,
|
|
@@ -45,14 +37,18 @@ const base = css.style({
|
|
|
45
37
|
We also cannot use the long-form `text-decoration-line` due
|
|
46
38
|
to browser support policy of Edge 16+.
|
|
47
39
|
*/
|
|
48
|
-
textDecorationThickness: "0.
|
|
40
|
+
textDecorationThickness: "0.08em"
|
|
49
41
|
},
|
|
50
|
-
":focus": {
|
|
51
|
-
color: textLinkVars.colorHover
|
|
42
|
+
":focus-visible": {
|
|
43
|
+
color: textLinkVars.colorHover,
|
|
44
|
+
outline: `${styles_lib_themes_vars_css_cjs.vars.focusRingSize} solid ${styles_lib_themes_vars_css_cjs.vars.borderColor.focus}`,
|
|
45
|
+
outlineOffset: "0.2em",
|
|
46
|
+
borderRadius: styles_lib_themes_vars_css_cjs.vars.borderRadius.small
|
|
52
47
|
}
|
|
53
48
|
}, "base");
|
|
54
49
|
const weakLink = css.style({
|
|
55
|
-
vars: weakLinkVars
|
|
50
|
+
vars: weakLinkVars,
|
|
51
|
+
textDecoration: "underline"
|
|
56
52
|
}, "weakLink");
|
|
57
53
|
const regularLinkLightMode = css.styleVariants({
|
|
58
54
|
light: {
|
|
@@ -5,36 +5,28 @@ import { vars } from "../../themes/vars.css.mjs";
|
|
|
5
5
|
setFileScope("src/lib/components/TextLink/TextLink.css.ts?used", "braid-design-system");
|
|
6
6
|
const textLinkVars = createThemeContract({
|
|
7
7
|
color: null,
|
|
8
|
-
colorHover: null
|
|
9
|
-
textDecoration: null,
|
|
10
|
-
textDecorationHover: null
|
|
8
|
+
colorHover: null
|
|
11
9
|
});
|
|
12
10
|
const lightModeRegularLinkVars = assignVars(textLinkVars, {
|
|
13
11
|
color: vars.foregroundColor.link,
|
|
14
|
-
colorHover: vars.foregroundColor.linkHover
|
|
15
|
-
textDecoration: "none",
|
|
16
|
-
textDecorationHover: "underline"
|
|
12
|
+
colorHover: vars.foregroundColor.linkHover
|
|
17
13
|
});
|
|
18
14
|
const darkModeRegularLinkVars = assignVars(textLinkVars, {
|
|
19
15
|
color: vars.foregroundColor.linkLight,
|
|
20
|
-
colorHover: vars.foregroundColor.linkLight
|
|
21
|
-
textDecoration: "none",
|
|
22
|
-
textDecorationHover: "underline"
|
|
16
|
+
colorHover: vars.foregroundColor.linkLight
|
|
23
17
|
});
|
|
24
18
|
const weakLinkVars = assignVars(textLinkVars, {
|
|
25
19
|
color: "inherit",
|
|
26
|
-
colorHover: "inherit"
|
|
27
|
-
textDecoration: "underline",
|
|
28
|
-
textDecorationHover: "underline"
|
|
20
|
+
colorHover: "inherit"
|
|
29
21
|
});
|
|
30
22
|
const base = style({
|
|
31
23
|
color: textLinkVars.color,
|
|
32
|
-
textDecoration:
|
|
33
|
-
textDecorationThickness: "0.
|
|
24
|
+
textDecoration: vars.linkDecoration,
|
|
25
|
+
textDecorationThickness: "0.08em",
|
|
34
26
|
textUnderlineOffset: 3,
|
|
35
27
|
":hover": {
|
|
36
28
|
color: textLinkVars.colorHover,
|
|
37
|
-
textDecoration:
|
|
29
|
+
textDecoration: "underline",
|
|
38
30
|
/*
|
|
39
31
|
Duplicating the thickness rule due to inconsistent support
|
|
40
32
|
for shorthand properties of `text-decoration`. Without this,
|
|
@@ -44,14 +36,18 @@ const base = style({
|
|
|
44
36
|
We also cannot use the long-form `text-decoration-line` due
|
|
45
37
|
to browser support policy of Edge 16+.
|
|
46
38
|
*/
|
|
47
|
-
textDecorationThickness: "0.
|
|
39
|
+
textDecorationThickness: "0.08em"
|
|
48
40
|
},
|
|
49
|
-
":focus": {
|
|
50
|
-
color: textLinkVars.colorHover
|
|
41
|
+
":focus-visible": {
|
|
42
|
+
color: textLinkVars.colorHover,
|
|
43
|
+
outline: `${vars.focusRingSize} solid ${vars.borderColor.focus}`,
|
|
44
|
+
outlineOffset: "0.2em",
|
|
45
|
+
borderRadius: vars.borderRadius.small
|
|
51
46
|
}
|
|
52
47
|
}, "base");
|
|
53
48
|
const weakLink = style({
|
|
54
|
-
vars: weakLinkVars
|
|
49
|
+
vars: weakLinkVars,
|
|
50
|
+
textDecoration: "underline"
|
|
55
51
|
}, "weakLink");
|
|
56
52
|
const regularLinkLightMode = styleVariants({
|
|
57
53
|
light: {
|
|
@@ -89,34 +89,55 @@ const horiztontalTransition = css.style(styles_lib_css_responsiveStyle_cjs.respo
|
|
|
89
89
|
transition: `transform .175s ${easeOut}, opacity .175s ${easeOut}`
|
|
90
90
|
}
|
|
91
91
|
}), "horiztontalTransition");
|
|
92
|
-
const modalContainer = css.style({
|
|
93
|
-
maxHeight: "100vh",
|
|
94
|
-
maxWidth: "100vw"
|
|
95
|
-
}, "modalContainer");
|
|
96
92
|
const pointerEventsAll = css.style({
|
|
97
93
|
pointerEvents: "all"
|
|
98
94
|
}, "pointerEventsAll");
|
|
95
|
+
const gutterSizeVar = css.createVar("gutterSizeVar");
|
|
96
|
+
const fullHeightVar = css.createVar("fullHeightVar");
|
|
97
|
+
const fullWidthVar = css.createVar("fullWidthVar");
|
|
99
98
|
const viewportHeight = css.style({
|
|
100
|
-
maxHeight:
|
|
99
|
+
maxHeight: fullHeightVar
|
|
101
100
|
}, "viewportHeight");
|
|
102
101
|
const maxSize = {
|
|
103
|
-
center: css.style(
|
|
102
|
+
center: css.style([{
|
|
103
|
+
maxHeight: cssUtils.calc.subtract(fullHeightVar, cssUtils.calc.multiply(gutterSizeVar, 2)),
|
|
104
|
+
maxWidth: cssUtils.calc.subtract(fullWidthVar, cssUtils.calc.multiply(gutterSizeVar, 2))
|
|
105
|
+
}, styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
104
106
|
mobile: {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
vars: {
|
|
108
|
+
[gutterSizeVar]: styles_lib_themes_vars_css_cjs.vars.space[styles_lib_components_private_Modal_ModalExternalGutter_cjs.externalGutter.mobile]
|
|
109
|
+
}
|
|
107
110
|
},
|
|
108
111
|
tablet: {
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
vars: {
|
|
113
|
+
[gutterSizeVar]: styles_lib_themes_vars_css_cjs.vars.space[styles_lib_components_private_Modal_ModalExternalGutter_cjs.externalGutter.tablet]
|
|
114
|
+
}
|
|
111
115
|
},
|
|
112
116
|
desktop: {
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
vars: {
|
|
118
|
+
[gutterSizeVar]: styles_lib_themes_vars_css_cjs.vars.space[styles_lib_components_private_Modal_ModalExternalGutter_cjs.externalGutter.desktop]
|
|
119
|
+
}
|
|
115
120
|
}
|
|
116
|
-
}), "maxSize_center"),
|
|
121
|
+
})], "maxSize_center"),
|
|
117
122
|
right: viewportHeight,
|
|
118
123
|
left: viewportHeight
|
|
119
124
|
};
|
|
125
|
+
const modalContainer = css.style({
|
|
126
|
+
vars: {
|
|
127
|
+
[fullHeightVar]: "100vh",
|
|
128
|
+
[fullWidthVar]: "100vw"
|
|
129
|
+
},
|
|
130
|
+
"@supports": {
|
|
131
|
+
"(height: 1dvh)": {
|
|
132
|
+
vars: {
|
|
133
|
+
[fullHeightVar]: "100dvh",
|
|
134
|
+
[fullWidthVar]: "100dvw"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
maxHeight: fullHeightVar,
|
|
139
|
+
maxWidth: fullWidthVar
|
|
140
|
+
}, "modalContainer");
|
|
120
141
|
const headingRoot = css.style({
|
|
121
142
|
overflowWrap: "break-word"
|
|
122
143
|
}, "headingRoot");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style } from "@vanilla-extract/css";
|
|
2
|
+
import { style, createVar } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
4
|
import { externalGutter } from "./ModalExternalGutter.mjs";
|
|
5
5
|
import { responsiveStyle } from "../../../css/responsiveStyle.mjs";
|
|
@@ -88,34 +88,55 @@ const horiztontalTransition = style(responsiveStyle({
|
|
|
88
88
|
transition: `transform .175s ${easeOut}, opacity .175s ${easeOut}`
|
|
89
89
|
}
|
|
90
90
|
}), "horiztontalTransition");
|
|
91
|
-
const modalContainer = style({
|
|
92
|
-
maxHeight: "100vh",
|
|
93
|
-
maxWidth: "100vw"
|
|
94
|
-
}, "modalContainer");
|
|
95
91
|
const pointerEventsAll = style({
|
|
96
92
|
pointerEvents: "all"
|
|
97
93
|
}, "pointerEventsAll");
|
|
94
|
+
const gutterSizeVar = createVar("gutterSizeVar");
|
|
95
|
+
const fullHeightVar = createVar("fullHeightVar");
|
|
96
|
+
const fullWidthVar = createVar("fullWidthVar");
|
|
98
97
|
const viewportHeight = style({
|
|
99
|
-
maxHeight:
|
|
98
|
+
maxHeight: fullHeightVar
|
|
100
99
|
}, "viewportHeight");
|
|
101
100
|
const maxSize = {
|
|
102
|
-
center: style(
|
|
101
|
+
center: style([{
|
|
102
|
+
maxHeight: calc.subtract(fullHeightVar, calc.multiply(gutterSizeVar, 2)),
|
|
103
|
+
maxWidth: calc.subtract(fullWidthVar, calc.multiply(gutterSizeVar, 2))
|
|
104
|
+
}, responsiveStyle({
|
|
103
105
|
mobile: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
vars: {
|
|
107
|
+
[gutterSizeVar]: vars.space[externalGutter.mobile]
|
|
108
|
+
}
|
|
106
109
|
},
|
|
107
110
|
tablet: {
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
vars: {
|
|
112
|
+
[gutterSizeVar]: vars.space[externalGutter.tablet]
|
|
113
|
+
}
|
|
110
114
|
},
|
|
111
115
|
desktop: {
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
vars: {
|
|
117
|
+
[gutterSizeVar]: vars.space[externalGutter.desktop]
|
|
118
|
+
}
|
|
114
119
|
}
|
|
115
|
-
}), "maxSize_center"),
|
|
120
|
+
})], "maxSize_center"),
|
|
116
121
|
right: viewportHeight,
|
|
117
122
|
left: viewportHeight
|
|
118
123
|
};
|
|
124
|
+
const modalContainer = style({
|
|
125
|
+
vars: {
|
|
126
|
+
[fullHeightVar]: "100vh",
|
|
127
|
+
[fullWidthVar]: "100vw"
|
|
128
|
+
},
|
|
129
|
+
"@supports": {
|
|
130
|
+
"(height: 1dvh)": {
|
|
131
|
+
vars: {
|
|
132
|
+
[fullHeightVar]: "100dvh",
|
|
133
|
+
[fullWidthVar]: "100dvw"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
maxHeight: fullHeightVar,
|
|
138
|
+
maxWidth: fullWidthVar
|
|
139
|
+
}, "modalContainer");
|
|
119
140
|
const headingRoot = style({
|
|
120
141
|
overflowWrap: "break-word"
|
|
121
142
|
}, "headingRoot");
|
|
@@ -216,9 +216,9 @@ const tokens = {
|
|
|
216
216
|
brandAccent,
|
|
217
217
|
brandAccentActive: brandAccent,
|
|
218
218
|
brandAccentHover: sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["700"],
|
|
219
|
-
brandAccentSoft: sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["
|
|
220
|
-
brandAccentSoftActive: polished.darken(0.025, sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["
|
|
221
|
-
brandAccentSoftHover: polished.darken(0.05, sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["
|
|
219
|
+
brandAccentSoft: sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["100"],
|
|
220
|
+
brandAccentSoftActive: polished.darken(0.025, sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["100"]),
|
|
221
|
+
brandAccentSoftHover: polished.darken(0.05, sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["100"]),
|
|
222
222
|
caution: sideEffects_lib_themes_baseTokens_apac_cjs.palette.yellow["500"],
|
|
223
223
|
cautionLight: sideEffects_lib_themes_baseTokens_apac_cjs.palette.yellow["100"],
|
|
224
224
|
critical: sideEffects_lib_themes_baseTokens_apac_cjs.palette.red["600"],
|
|
@@ -231,9 +231,9 @@ const tokens = {
|
|
|
231
231
|
formAccent,
|
|
232
232
|
formAccentActive: sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["700"],
|
|
233
233
|
formAccentHover: polished.darken(0.05, sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["600"]),
|
|
234
|
-
formAccentSoft: sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["
|
|
235
|
-
formAccentSoftActive: polished.darken(0.05, sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["
|
|
236
|
-
formAccentSoftHover: polished.darken(0.025, sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["
|
|
234
|
+
formAccentSoft: sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["50"],
|
|
235
|
+
formAccentSoftActive: polished.darken(0.05, sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["50"]),
|
|
236
|
+
formAccentSoftHover: polished.darken(0.025, sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["50"]),
|
|
237
237
|
info: sideEffects_lib_themes_baseTokens_apac_cjs.palette.blue["600"],
|
|
238
238
|
infoLight: sideEffects_lib_themes_baseTokens_apac_cjs.palette.blue["100"],
|
|
239
239
|
neutral: sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["800"],
|
|
@@ -213,9 +213,9 @@ const tokens = {
|
|
|
213
213
|
brandAccent,
|
|
214
214
|
brandAccentActive: brandAccent,
|
|
215
215
|
brandAccentHover: palette.grey["700"],
|
|
216
|
-
brandAccentSoft: palette.grey["
|
|
217
|
-
brandAccentSoftActive: darken(0.025, palette.grey["
|
|
218
|
-
brandAccentSoftHover: darken(0.05, palette.grey["
|
|
216
|
+
brandAccentSoft: palette.grey["100"],
|
|
217
|
+
brandAccentSoftActive: darken(0.025, palette.grey["100"]),
|
|
218
|
+
brandAccentSoftHover: darken(0.05, palette.grey["100"]),
|
|
219
219
|
caution: palette.yellow["500"],
|
|
220
220
|
cautionLight: palette.yellow["100"],
|
|
221
221
|
critical: palette.red["600"],
|
|
@@ -228,9 +228,9 @@ const tokens = {
|
|
|
228
228
|
formAccent,
|
|
229
229
|
formAccentActive: palette.indigo["700"],
|
|
230
230
|
formAccentHover: darken(0.05, palette.indigo["600"]),
|
|
231
|
-
formAccentSoft: palette.indigo["
|
|
232
|
-
formAccentSoftActive: darken(0.05, palette.indigo["
|
|
233
|
-
formAccentSoftHover: darken(0.025, palette.indigo["
|
|
231
|
+
formAccentSoft: palette.indigo["50"],
|
|
232
|
+
formAccentSoftActive: darken(0.05, palette.indigo["50"]),
|
|
233
|
+
formAccentSoftHover: darken(0.025, palette.indigo["50"]),
|
|
234
234
|
info: palette.blue["600"],
|
|
235
235
|
infoLight: palette.blue["100"],
|
|
236
236
|
neutral: palette.grey["800"],
|
|
@@ -65,7 +65,7 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
const makeVanillaTheme = (braidTokens) => {
|
|
68
|
-
const { name, displayName, ...tokens } = braidTokens;
|
|
68
|
+
const { name, displayName, legacy, ...tokens } = braidTokens;
|
|
69
69
|
const { webFont, ...typography } = tokens.typography;
|
|
70
70
|
const { foreground, background } = tokens.color;
|
|
71
71
|
const textSize = mapValues__default.default(
|
|
@@ -103,6 +103,12 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
103
103
|
tokens.typography.fontWeight[tokens.typography.heading.weight.regular]
|
|
104
104
|
)
|
|
105
105
|
},
|
|
106
|
+
/*
|
|
107
|
+
Going forward, all links variants should be underlined as an accessibility
|
|
108
|
+
best practice. However, to maintain existing behaviour we are sunsetting
|
|
109
|
+
the old style based on the `legacy` theme flag, e.g. `apac`.
|
|
110
|
+
*/
|
|
111
|
+
linkDecoration: legacy ? "none" : "underline",
|
|
106
112
|
inlineFieldSize: {
|
|
107
113
|
standard: getInlineFieldSize("standard"),
|
|
108
114
|
small: getInlineFieldSize("small")
|
|
@@ -62,7 +62,7 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
const makeVanillaTheme = (braidTokens) => {
|
|
65
|
-
const { name, displayName, ...tokens } = braidTokens;
|
|
65
|
+
const { name, displayName, legacy, ...tokens } = braidTokens;
|
|
66
66
|
const { webFont, ...typography } = tokens.typography;
|
|
67
67
|
const { foreground, background } = tokens.color;
|
|
68
68
|
const textSize = mapValues(
|
|
@@ -100,6 +100,12 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
100
100
|
tokens.typography.fontWeight[tokens.typography.heading.weight.regular]
|
|
101
101
|
)
|
|
102
102
|
},
|
|
103
|
+
/*
|
|
104
|
+
Going forward, all links variants should be underlined as an accessibility
|
|
105
|
+
best practice. However, to maintain existing behaviour we are sunsetting
|
|
106
|
+
the old style based on the `legacy` theme flag, e.g. `apac`.
|
|
107
|
+
*/
|
|
108
|
+
linkDecoration: legacy ? "none" : "underline",
|
|
103
109
|
inlineFieldSize: {
|
|
104
110
|
standard: getInlineFieldSize("standard"),
|
|
105
111
|
small: getInlineFieldSize("small")
|
|
@@ -159,9 +159,9 @@ const tokens = sideEffects_lib_themes_baseTokens_apac_cjs.makeTokens({
|
|
|
159
159
|
foreground: {
|
|
160
160
|
formAccent: sideEffects_lib_themes_baseTokens_apac_cjs.palette.violet["500"],
|
|
161
161
|
formAccentLight: sideEffects_lib_themes_baseTokens_apac_cjs.palette.violet["300"],
|
|
162
|
-
link: sideEffects_lib_themes_baseTokens_apac_cjs.palette.
|
|
163
|
-
linkHover: sideEffects_lib_themes_baseTokens_apac_cjs.palette.
|
|
164
|
-
linkLight:
|
|
162
|
+
link: sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["700"],
|
|
163
|
+
linkHover: sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["700"],
|
|
164
|
+
linkLight: "#fff",
|
|
165
165
|
linkVisited: sideEffects_lib_themes_baseTokens_apac_cjs.palette.purple["800"],
|
|
166
166
|
linkLightVisited: sideEffects_lib_themes_baseTokens_apac_cjs.palette.purple["200"],
|
|
167
167
|
promote: sideEffects_lib_themes_baseTokens_apac_cjs.palette.purple["700"],
|
|
@@ -158,9 +158,9 @@ const tokens = makeTokens({
|
|
|
158
158
|
foreground: {
|
|
159
159
|
formAccent: palette.violet["500"],
|
|
160
160
|
formAccentLight: palette.violet["300"],
|
|
161
|
-
link: palette.
|
|
162
|
-
linkHover: palette.
|
|
163
|
-
linkLight:
|
|
161
|
+
link: palette.grey["700"],
|
|
162
|
+
linkHover: palette.grey["700"],
|
|
163
|
+
linkLight: "#fff",
|
|
164
164
|
linkVisited: palette.purple["800"],
|
|
165
165
|
linkLightVisited: palette.purple["200"],
|
|
166
166
|
promote: palette.purple["700"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-design-system",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.11.0",
|
|
4
4
|
"description": "Themeable design system for the SEEK Group",
|
|
5
5
|
"homepage": "https://seek-oss.github.io/braid-design-system/",
|
|
6
6
|
"bugs": {
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"babel-plugin-transform-remove-imports": "^1.7.0",
|
|
180
180
|
"change-case": "^4.1.2",
|
|
181
181
|
"cheerio": "1.0.0-rc.11",
|
|
182
|
-
"chromatic": "^
|
|
182
|
+
"chromatic": "^6.24.1",
|
|
183
183
|
"fast-glob": "^3.2.12",
|
|
184
184
|
"fs-extra": "^10.1.0",
|
|
185
185
|
"html-validate": "^7.1.1",
|