braid-design-system 32.1.1 → 32.3.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 +214 -0
- package/codemod/dist/wrapper.js +1315 -21130
- package/dist/ToastContext.chunk.cjs +71 -99
- package/dist/ToastContext.chunk.mjs +117 -145
- package/dist/Toggle.chunk.cjs +70 -49
- package/dist/Toggle.chunk.mjs +80 -59
- package/dist/reset.d.ts +212 -95
- package/dist/side-effects/lib/themes/baseTokens/apac.cjs +7 -8
- package/dist/side-effects/lib/themes/baseTokens/apac.mjs +6 -8
- package/dist/side-effects/lib/themes/makeRuntimeTokens.cjs +3 -9
- package/dist/side-effects/lib/themes/makeRuntimeTokens.mjs +3 -8
- package/dist/side-effects/lib/themes/tokenType.cjs +15 -0
- package/dist/side-effects/lib/themes/tokenType.mjs +16 -0
- package/dist/styles/lib/components/Button/Button.css.cjs +24 -23
- package/dist/styles/lib/components/Button/Button.css.mjs +25 -24
- package/dist/styles/lib/components/Stepper/Stepper.css.cjs +8 -7
- package/dist/styles/lib/components/Stepper/Stepper.css.mjs +8 -7
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.cjs +34 -3
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +34 -3
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -9
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +1 -9
- package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
- package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +5 -1
- package/dist/styles/lib/css/atoms/atomicProperties.cjs +2 -0
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +2 -0
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +1 -6
- package/dist/styles/lib/css/typography.css.cjs +1 -16
- package/dist/styles/lib/css/typography.css.mjs +1 -16
- package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
- package/dist/styles/lib/themes/docs/tokens.mjs +6 -8
- package/dist/styles/lib/themes/makeVanillaTheme.cjs +22 -9
- package/dist/styles/lib/themes/makeVanillaTheme.mjs +22 -9
- package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
- package/dist/styles/lib/themes/wireframe/tokens.mjs +23 -29
- package/package.json +4 -3
- package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
- package/dist/styles/lib/components/Badge/Badge.css.mjs +0 -28
|
@@ -157,21 +157,6 @@ const touchableText = styleVariants(vars.textSize, (textDefinition) => responsiv
|
|
|
157
157
|
tablet: makeTouchableSpacing(vars.touchableSize, textDefinition.tablet.lineHeight)
|
|
158
158
|
}), "touchableText");
|
|
159
159
|
endFileScope();
|
|
160
|
-
const styles = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
161
|
-
__proto__: null,
|
|
162
|
-
darkModeNeutralOverride,
|
|
163
|
-
darkModeTone,
|
|
164
|
-
fontFamily,
|
|
165
|
-
fontWeight,
|
|
166
|
-
heading,
|
|
167
|
-
headingWeight,
|
|
168
|
-
lightModeNeutralOverride,
|
|
169
|
-
lightModeTone,
|
|
170
|
-
textSizeTrimmed,
|
|
171
|
-
textSizeUntrimmed,
|
|
172
|
-
tone,
|
|
173
|
-
touchableText
|
|
174
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
175
160
|
export {
|
|
176
161
|
darkModeNeutralOverride,
|
|
177
162
|
darkModeTone,
|
|
@@ -181,7 +166,7 @@ export {
|
|
|
181
166
|
headingWeight,
|
|
182
167
|
lightModeNeutralOverride,
|
|
183
168
|
lightModeTone,
|
|
184
|
-
|
|
169
|
+
textSizeTrimmed,
|
|
185
170
|
textSizeUntrimmed,
|
|
186
171
|
tone,
|
|
187
172
|
touchableText
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const appleSystemMetrics = require("@capsizecss/metrics/appleSystem.js");
|
|
2
3
|
const polished = require("polished");
|
|
3
4
|
const sideEffects_lib_themes_baseTokens_apac_cjs = require("../../../../side-effects/lib/themes/baseTokens/apac.cjs");
|
|
5
|
+
const sideEffects_lib_themes_tokenType_cjs = require("../../../../side-effects/lib/themes/tokenType.cjs");
|
|
6
|
+
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
7
|
+
const appleSystemMetrics__default = /* @__PURE__ */ _interopDefaultCompat(appleSystemMetrics);
|
|
4
8
|
const brandAccent = sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["900"];
|
|
5
9
|
const formAccent = sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["600"];
|
|
6
10
|
const focus = polished.rgba("#1e90ff", 0.7);
|
|
@@ -15,13 +19,7 @@ const tokens = {
|
|
|
15
19
|
typography: {
|
|
16
20
|
fontFamily: '-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
17
21
|
webFont: null,
|
|
18
|
-
fontMetrics:
|
|
19
|
-
capHeight: 1443,
|
|
20
|
-
ascent: 1950,
|
|
21
|
-
descent: -494,
|
|
22
|
-
lineGap: 0,
|
|
23
|
-
unitsPerEm: 2048
|
|
24
|
-
},
|
|
22
|
+
fontMetrics: sideEffects_lib_themes_tokenType_cjs.extractFontMetricsForTheme(appleSystemMetrics__default.default),
|
|
25
23
|
fontWeight: {
|
|
26
24
|
regular: 400,
|
|
27
25
|
medium: 500,
|
|
@@ -134,7 +132,8 @@ const tokens = {
|
|
|
134
132
|
medium: 5,
|
|
135
133
|
large: 8,
|
|
136
134
|
xlarge: 11,
|
|
137
|
-
xxlarge: 15
|
|
135
|
+
xxlarge: 15,
|
|
136
|
+
xxxlarge: 20
|
|
138
137
|
},
|
|
139
138
|
transforms: {
|
|
140
139
|
touchable: "scale(0.97)"
|
|
@@ -145,6 +144,7 @@ const tokens = {
|
|
|
145
144
|
},
|
|
146
145
|
border: {
|
|
147
146
|
radius: {
|
|
147
|
+
small: "4px",
|
|
148
148
|
standard: "6px",
|
|
149
149
|
large: "8px",
|
|
150
150
|
xlarge: "12px"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import appleSystemMetrics from "@capsizecss/metrics/appleSystem.js";
|
|
1
2
|
import { rgba, darken, lighten } from "polished";
|
|
2
3
|
import { palette } from "../../../../side-effects/lib/themes/baseTokens/apac.mjs";
|
|
4
|
+
import { extractFontMetricsForTheme } from "../../../../side-effects/lib/themes/tokenType.mjs";
|
|
3
5
|
const brandAccent = palette.grey["900"];
|
|
4
6
|
const formAccent = palette.indigo["600"];
|
|
5
7
|
const focus = rgba("#1e90ff", 0.7);
|
|
@@ -14,13 +16,7 @@ const tokens = {
|
|
|
14
16
|
typography: {
|
|
15
17
|
fontFamily: '-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
16
18
|
webFont: null,
|
|
17
|
-
fontMetrics:
|
|
18
|
-
capHeight: 1443,
|
|
19
|
-
ascent: 1950,
|
|
20
|
-
descent: -494,
|
|
21
|
-
lineGap: 0,
|
|
22
|
-
unitsPerEm: 2048
|
|
23
|
-
},
|
|
19
|
+
fontMetrics: extractFontMetricsForTheme(appleSystemMetrics),
|
|
24
20
|
fontWeight: {
|
|
25
21
|
regular: 400,
|
|
26
22
|
medium: 500,
|
|
@@ -133,7 +129,8 @@ const tokens = {
|
|
|
133
129
|
medium: 5,
|
|
134
130
|
large: 8,
|
|
135
131
|
xlarge: 11,
|
|
136
|
-
xxlarge: 15
|
|
132
|
+
xxlarge: 15,
|
|
133
|
+
xxxlarge: 20
|
|
137
134
|
},
|
|
138
135
|
transforms: {
|
|
139
136
|
touchable: "scale(0.97)"
|
|
@@ -144,6 +141,7 @@ const tokens = {
|
|
|
144
141
|
},
|
|
145
142
|
border: {
|
|
146
143
|
radius: {
|
|
144
|
+
small: "4px",
|
|
147
145
|
standard: "6px",
|
|
148
146
|
large: "8px",
|
|
149
147
|
xlarge: "12px"
|
|
@@ -15,13 +15,26 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
15
15
|
fontSize: tablet.fontSize,
|
|
16
16
|
fontMetrics
|
|
17
17
|
});
|
|
18
|
+
const mobileConfig = "lineGap" in mobile ? {
|
|
19
|
+
fontSize: mobile.fontSize,
|
|
20
|
+
lineGap: mobile.lineGap
|
|
21
|
+
} : {
|
|
22
|
+
fontSize: mobile.fontSize,
|
|
23
|
+
leading: mobile.rows * grid
|
|
24
|
+
};
|
|
25
|
+
const tabletConfig = "lineGap" in tablet ? {
|
|
26
|
+
fontSize: tablet.fontSize,
|
|
27
|
+
lineGap: tablet.lineGap
|
|
28
|
+
} : {
|
|
29
|
+
fontSize: tablet.fontSize,
|
|
30
|
+
leading: tablet.rows * grid
|
|
31
|
+
};
|
|
18
32
|
const {
|
|
19
33
|
fontSize: mobileFontSize,
|
|
20
34
|
lineHeight: mobileLineHeight,
|
|
21
35
|
...mobileTrims
|
|
22
36
|
} = vanillaExtract.precomputeValues({
|
|
23
|
-
|
|
24
|
-
leading: mobile.rows * grid,
|
|
37
|
+
...mobileConfig,
|
|
25
38
|
fontMetrics
|
|
26
39
|
});
|
|
27
40
|
const {
|
|
@@ -29,8 +42,7 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
29
42
|
lineHeight: tabletLineHeight,
|
|
30
43
|
...tabletTrims
|
|
31
44
|
} = vanillaExtract.precomputeValues({
|
|
32
|
-
|
|
33
|
-
leading: tablet.rows * grid,
|
|
45
|
+
...tabletConfig,
|
|
34
46
|
fontMetrics
|
|
35
47
|
});
|
|
36
48
|
return {
|
|
@@ -56,8 +68,12 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
56
68
|
const { name, displayName, ...tokens } = braidTokens;
|
|
57
69
|
const { webFont, ...typography } = tokens.typography;
|
|
58
70
|
const { foreground, background } = tokens.color;
|
|
71
|
+
const textSize = mapValues__default.default(
|
|
72
|
+
tokens.typography.text,
|
|
73
|
+
(definition) => fontSizeToCapHeight(tokens.grid, definition, typography.fontMetrics)
|
|
74
|
+
);
|
|
59
75
|
const getInlineFieldSize = (size) => {
|
|
60
|
-
const scale =
|
|
76
|
+
const scale = parseInt(textSize[size].mobile.lineHeight, 10) / 42;
|
|
61
77
|
return px(tokens.grid * Math.round(tokens.touchableSize * scale));
|
|
62
78
|
};
|
|
63
79
|
const resolvedTokens = {
|
|
@@ -73,10 +89,7 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
73
89
|
backgroundColor: background,
|
|
74
90
|
fontFamily: typography.fontFamily,
|
|
75
91
|
fontMetrics: mapValues__default.default(typography.fontMetrics, String),
|
|
76
|
-
textSize
|
|
77
|
-
tokens.typography.text,
|
|
78
|
-
(definition) => fontSizeToCapHeight(tokens.grid, definition, typography.fontMetrics)
|
|
79
|
-
),
|
|
92
|
+
textSize,
|
|
80
93
|
textWeight: mapValues__default.default(typography.fontWeight, String),
|
|
81
94
|
headingLevel: mapValues__default.default(
|
|
82
95
|
tokens.typography.heading.level,
|
|
@@ -12,13 +12,26 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
12
12
|
fontSize: tablet.fontSize,
|
|
13
13
|
fontMetrics
|
|
14
14
|
});
|
|
15
|
+
const mobileConfig = "lineGap" in mobile ? {
|
|
16
|
+
fontSize: mobile.fontSize,
|
|
17
|
+
lineGap: mobile.lineGap
|
|
18
|
+
} : {
|
|
19
|
+
fontSize: mobile.fontSize,
|
|
20
|
+
leading: mobile.rows * grid
|
|
21
|
+
};
|
|
22
|
+
const tabletConfig = "lineGap" in tablet ? {
|
|
23
|
+
fontSize: tablet.fontSize,
|
|
24
|
+
lineGap: tablet.lineGap
|
|
25
|
+
} : {
|
|
26
|
+
fontSize: tablet.fontSize,
|
|
27
|
+
leading: tablet.rows * grid
|
|
28
|
+
};
|
|
15
29
|
const {
|
|
16
30
|
fontSize: mobileFontSize,
|
|
17
31
|
lineHeight: mobileLineHeight,
|
|
18
32
|
...mobileTrims
|
|
19
33
|
} = precomputeValues({
|
|
20
|
-
|
|
21
|
-
leading: mobile.rows * grid,
|
|
34
|
+
...mobileConfig,
|
|
22
35
|
fontMetrics
|
|
23
36
|
});
|
|
24
37
|
const {
|
|
@@ -26,8 +39,7 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
26
39
|
lineHeight: tabletLineHeight,
|
|
27
40
|
...tabletTrims
|
|
28
41
|
} = precomputeValues({
|
|
29
|
-
|
|
30
|
-
leading: tablet.rows * grid,
|
|
42
|
+
...tabletConfig,
|
|
31
43
|
fontMetrics
|
|
32
44
|
});
|
|
33
45
|
return {
|
|
@@ -53,8 +65,12 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
53
65
|
const { name, displayName, ...tokens } = braidTokens;
|
|
54
66
|
const { webFont, ...typography } = tokens.typography;
|
|
55
67
|
const { foreground, background } = tokens.color;
|
|
68
|
+
const textSize = mapValues(
|
|
69
|
+
tokens.typography.text,
|
|
70
|
+
(definition) => fontSizeToCapHeight(tokens.grid, definition, typography.fontMetrics)
|
|
71
|
+
);
|
|
56
72
|
const getInlineFieldSize = (size) => {
|
|
57
|
-
const scale =
|
|
73
|
+
const scale = parseInt(textSize[size].mobile.lineHeight, 10) / 42;
|
|
58
74
|
return px(tokens.grid * Math.round(tokens.touchableSize * scale));
|
|
59
75
|
};
|
|
60
76
|
const resolvedTokens = {
|
|
@@ -70,10 +86,7 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
70
86
|
backgroundColor: background,
|
|
71
87
|
fontFamily: typography.fontFamily,
|
|
72
88
|
fontMetrics: mapValues(typography.fontMetrics, String),
|
|
73
|
-
textSize
|
|
74
|
-
tokens.typography.text,
|
|
75
|
-
(definition) => fontSizeToCapHeight(tokens.grid, definition, typography.fontMetrics)
|
|
76
|
-
),
|
|
89
|
+
textSize,
|
|
77
90
|
textWeight: mapValues(typography.fontWeight, String),
|
|
78
91
|
headingLevel: mapValues(
|
|
79
92
|
tokens.typography.heading.level,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const courierNewMetrics = require("@capsizecss/metrics/courierNew.js");
|
|
2
3
|
const polished = require("polished");
|
|
4
|
+
const sideEffects_lib_themes_tokenType_cjs = require("../../../../side-effects/lib/themes/tokenType.cjs");
|
|
3
5
|
const styles_lib_utils_index_cjs = require("../../utils/index.cjs");
|
|
6
|
+
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
7
|
+
const courierNewMetrics__default = /* @__PURE__ */ _interopDefaultCompat(courierNewMetrics);
|
|
4
8
|
const formAccent = "#767676";
|
|
5
9
|
const critical = "#ef3e4a";
|
|
6
10
|
const criticalLightBackground = "#fbe9eb";
|
|
@@ -38,19 +42,9 @@ const tokens = {
|
|
|
38
42
|
name: "wireframe",
|
|
39
43
|
displayName: "Wireframe",
|
|
40
44
|
typography: {
|
|
41
|
-
fontFamily: "Courier, monospace
|
|
45
|
+
fontFamily: '"Courier New", monospace',
|
|
42
46
|
webFont: null,
|
|
43
|
-
fontMetrics:
|
|
44
|
-
capHeight: 1186,
|
|
45
|
-
// 1544 from fontkit, but should be 1186 according to fontforge
|
|
46
|
-
ascent: 1638,
|
|
47
|
-
// 1544 from fontkit, but should be 1638 according to general metrics table
|
|
48
|
-
descent: -410,
|
|
49
|
-
// -504 from fontkit, but should be -410 according to general metrics table
|
|
50
|
-
lineGap: 184,
|
|
51
|
-
// 0 from fontkit, but should be 184 according to os/2 metrics table
|
|
52
|
-
unitsPerEm: 2048
|
|
53
|
-
},
|
|
47
|
+
fontMetrics: sideEffects_lib_themes_tokenType_cjs.extractFontMetricsForTheme(courierNewMetrics__default.default),
|
|
54
48
|
fontWeight: {
|
|
55
49
|
regular: 400,
|
|
56
50
|
medium: 500,
|
|
@@ -65,41 +59,41 @@ const tokens = {
|
|
|
65
59
|
"1": {
|
|
66
60
|
mobile: {
|
|
67
61
|
fontSize: 28,
|
|
68
|
-
|
|
62
|
+
lineGap: 22
|
|
69
63
|
},
|
|
70
64
|
tablet: {
|
|
71
65
|
fontSize: 42,
|
|
72
|
-
|
|
66
|
+
lineGap: 22
|
|
73
67
|
}
|
|
74
68
|
},
|
|
75
69
|
"2": {
|
|
76
70
|
mobile: {
|
|
77
71
|
fontSize: 21,
|
|
78
|
-
|
|
72
|
+
lineGap: 20
|
|
79
73
|
},
|
|
80
74
|
tablet: {
|
|
81
75
|
fontSize: 28,
|
|
82
|
-
|
|
76
|
+
lineGap: 20
|
|
83
77
|
}
|
|
84
78
|
},
|
|
85
79
|
"3": {
|
|
86
80
|
mobile: {
|
|
87
81
|
fontSize: 21,
|
|
88
|
-
|
|
82
|
+
lineGap: 18
|
|
89
83
|
},
|
|
90
84
|
tablet: {
|
|
91
85
|
fontSize: 21,
|
|
92
|
-
|
|
86
|
+
lineGap: 18
|
|
93
87
|
}
|
|
94
88
|
},
|
|
95
89
|
"4": {
|
|
96
90
|
mobile: {
|
|
97
91
|
fontSize: 18,
|
|
98
|
-
|
|
92
|
+
lineGap: 16
|
|
99
93
|
},
|
|
100
94
|
tablet: {
|
|
101
95
|
fontSize: 18,
|
|
102
|
-
|
|
96
|
+
lineGap: 16
|
|
103
97
|
}
|
|
104
98
|
}
|
|
105
99
|
}
|
|
@@ -108,41 +102,41 @@ const tokens = {
|
|
|
108
102
|
xsmall: {
|
|
109
103
|
mobile: {
|
|
110
104
|
fontSize: 12,
|
|
111
|
-
|
|
105
|
+
lineGap: 11
|
|
112
106
|
},
|
|
113
107
|
tablet: {
|
|
114
108
|
fontSize: 12,
|
|
115
|
-
|
|
109
|
+
lineGap: 11
|
|
116
110
|
}
|
|
117
111
|
},
|
|
118
112
|
small: {
|
|
119
113
|
mobile: {
|
|
120
114
|
fontSize: 14,
|
|
121
|
-
|
|
115
|
+
lineGap: 12
|
|
122
116
|
},
|
|
123
117
|
tablet: {
|
|
124
118
|
fontSize: 14,
|
|
125
|
-
|
|
119
|
+
lineGap: 12
|
|
126
120
|
}
|
|
127
121
|
},
|
|
128
122
|
standard: {
|
|
129
123
|
mobile: {
|
|
130
124
|
fontSize: 16,
|
|
131
|
-
|
|
125
|
+
lineGap: 14
|
|
132
126
|
},
|
|
133
127
|
tablet: {
|
|
134
128
|
fontSize: 16,
|
|
135
|
-
|
|
129
|
+
lineGap: 14
|
|
136
130
|
}
|
|
137
131
|
},
|
|
138
132
|
large: {
|
|
139
133
|
mobile: {
|
|
140
134
|
fontSize: 18,
|
|
141
|
-
|
|
135
|
+
lineGap: 16
|
|
142
136
|
},
|
|
143
137
|
tablet: {
|
|
144
138
|
fontSize: 18,
|
|
145
|
-
|
|
139
|
+
lineGap: 16
|
|
146
140
|
}
|
|
147
141
|
}
|
|
148
142
|
}
|
|
@@ -163,7 +157,8 @@ const tokens = {
|
|
|
163
157
|
medium: 5,
|
|
164
158
|
large: 8,
|
|
165
159
|
xlarge: 12,
|
|
166
|
-
xxlarge: 24
|
|
160
|
+
xxlarge: 24,
|
|
161
|
+
xxxlarge: 30
|
|
167
162
|
},
|
|
168
163
|
transforms: {
|
|
169
164
|
touchable: "scale(0.97)"
|
|
@@ -174,6 +169,7 @@ const tokens = {
|
|
|
174
169
|
},
|
|
175
170
|
border: {
|
|
176
171
|
radius: {
|
|
172
|
+
small: "4px",
|
|
177
173
|
standard: "6px",
|
|
178
174
|
large: "8px",
|
|
179
175
|
xlarge: "10px"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import courierNewMetrics from "@capsizecss/metrics/courierNew.js";
|
|
1
2
|
import { lighten, tint, darken } from "polished";
|
|
3
|
+
import { extractFontMetricsForTheme } from "../../../../side-effects/lib/themes/tokenType.mjs";
|
|
2
4
|
import { getLightVariant, findClosestAccessibleLighterColor, getAccessibleVariant, isLight } from "../../utils/index.mjs";
|
|
3
5
|
const formAccent = "#767676";
|
|
4
6
|
const critical = "#ef3e4a";
|
|
@@ -37,19 +39,9 @@ const tokens = {
|
|
|
37
39
|
name: "wireframe",
|
|
38
40
|
displayName: "Wireframe",
|
|
39
41
|
typography: {
|
|
40
|
-
fontFamily: "Courier, monospace
|
|
42
|
+
fontFamily: '"Courier New", monospace',
|
|
41
43
|
webFont: null,
|
|
42
|
-
fontMetrics:
|
|
43
|
-
capHeight: 1186,
|
|
44
|
-
// 1544 from fontkit, but should be 1186 according to fontforge
|
|
45
|
-
ascent: 1638,
|
|
46
|
-
// 1544 from fontkit, but should be 1638 according to general metrics table
|
|
47
|
-
descent: -410,
|
|
48
|
-
// -504 from fontkit, but should be -410 according to general metrics table
|
|
49
|
-
lineGap: 184,
|
|
50
|
-
// 0 from fontkit, but should be 184 according to os/2 metrics table
|
|
51
|
-
unitsPerEm: 2048
|
|
52
|
-
},
|
|
44
|
+
fontMetrics: extractFontMetricsForTheme(courierNewMetrics),
|
|
53
45
|
fontWeight: {
|
|
54
46
|
regular: 400,
|
|
55
47
|
medium: 500,
|
|
@@ -64,41 +56,41 @@ const tokens = {
|
|
|
64
56
|
"1": {
|
|
65
57
|
mobile: {
|
|
66
58
|
fontSize: 28,
|
|
67
|
-
|
|
59
|
+
lineGap: 22
|
|
68
60
|
},
|
|
69
61
|
tablet: {
|
|
70
62
|
fontSize: 42,
|
|
71
|
-
|
|
63
|
+
lineGap: 22
|
|
72
64
|
}
|
|
73
65
|
},
|
|
74
66
|
"2": {
|
|
75
67
|
mobile: {
|
|
76
68
|
fontSize: 21,
|
|
77
|
-
|
|
69
|
+
lineGap: 20
|
|
78
70
|
},
|
|
79
71
|
tablet: {
|
|
80
72
|
fontSize: 28,
|
|
81
|
-
|
|
73
|
+
lineGap: 20
|
|
82
74
|
}
|
|
83
75
|
},
|
|
84
76
|
"3": {
|
|
85
77
|
mobile: {
|
|
86
78
|
fontSize: 21,
|
|
87
|
-
|
|
79
|
+
lineGap: 18
|
|
88
80
|
},
|
|
89
81
|
tablet: {
|
|
90
82
|
fontSize: 21,
|
|
91
|
-
|
|
83
|
+
lineGap: 18
|
|
92
84
|
}
|
|
93
85
|
},
|
|
94
86
|
"4": {
|
|
95
87
|
mobile: {
|
|
96
88
|
fontSize: 18,
|
|
97
|
-
|
|
89
|
+
lineGap: 16
|
|
98
90
|
},
|
|
99
91
|
tablet: {
|
|
100
92
|
fontSize: 18,
|
|
101
|
-
|
|
93
|
+
lineGap: 16
|
|
102
94
|
}
|
|
103
95
|
}
|
|
104
96
|
}
|
|
@@ -107,41 +99,41 @@ const tokens = {
|
|
|
107
99
|
xsmall: {
|
|
108
100
|
mobile: {
|
|
109
101
|
fontSize: 12,
|
|
110
|
-
|
|
102
|
+
lineGap: 11
|
|
111
103
|
},
|
|
112
104
|
tablet: {
|
|
113
105
|
fontSize: 12,
|
|
114
|
-
|
|
106
|
+
lineGap: 11
|
|
115
107
|
}
|
|
116
108
|
},
|
|
117
109
|
small: {
|
|
118
110
|
mobile: {
|
|
119
111
|
fontSize: 14,
|
|
120
|
-
|
|
112
|
+
lineGap: 12
|
|
121
113
|
},
|
|
122
114
|
tablet: {
|
|
123
115
|
fontSize: 14,
|
|
124
|
-
|
|
116
|
+
lineGap: 12
|
|
125
117
|
}
|
|
126
118
|
},
|
|
127
119
|
standard: {
|
|
128
120
|
mobile: {
|
|
129
121
|
fontSize: 16,
|
|
130
|
-
|
|
122
|
+
lineGap: 14
|
|
131
123
|
},
|
|
132
124
|
tablet: {
|
|
133
125
|
fontSize: 16,
|
|
134
|
-
|
|
126
|
+
lineGap: 14
|
|
135
127
|
}
|
|
136
128
|
},
|
|
137
129
|
large: {
|
|
138
130
|
mobile: {
|
|
139
131
|
fontSize: 18,
|
|
140
|
-
|
|
132
|
+
lineGap: 16
|
|
141
133
|
},
|
|
142
134
|
tablet: {
|
|
143
135
|
fontSize: 18,
|
|
144
|
-
|
|
136
|
+
lineGap: 16
|
|
145
137
|
}
|
|
146
138
|
}
|
|
147
139
|
}
|
|
@@ -162,7 +154,8 @@ const tokens = {
|
|
|
162
154
|
medium: 5,
|
|
163
155
|
large: 8,
|
|
164
156
|
xlarge: 12,
|
|
165
|
-
xxlarge: 24
|
|
157
|
+
xxlarge: 24,
|
|
158
|
+
xxxlarge: 30
|
|
166
159
|
},
|
|
167
160
|
transforms: {
|
|
168
161
|
touchable: "scale(0.97)"
|
|
@@ -173,6 +166,7 @@ const tokens = {
|
|
|
173
166
|
},
|
|
174
167
|
border: {
|
|
175
168
|
radius: {
|
|
169
|
+
small: "4px",
|
|
176
170
|
standard: "6px",
|
|
177
171
|
large: "8px",
|
|
178
172
|
xlarge: "10px"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-design-system",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.3.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": {
|
|
@@ -119,7 +119,8 @@
|
|
|
119
119
|
"themes/wireframe"
|
|
120
120
|
],
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@capsizecss/core": "^3.
|
|
122
|
+
"@capsizecss/core": "^3.1.0",
|
|
123
|
+
"@capsizecss/metrics": "^1.1.1",
|
|
123
124
|
"@capsizecss/vanilla-extract": "^1.0.0",
|
|
124
125
|
"@types/autosuggest-highlight": "^3.1.1",
|
|
125
126
|
"@types/dedent": "^0.7.0",
|
|
@@ -182,7 +183,7 @@
|
|
|
182
183
|
"react-dom": "^18.2.0",
|
|
183
184
|
"react-router-dom": "^6.3.0",
|
|
184
185
|
"sanitize-html": "^2.7.0",
|
|
185
|
-
"sku": "11.
|
|
186
|
+
"sku": "11.8.1",
|
|
186
187
|
"svgo": "^2.8.0",
|
|
187
188
|
"title-case": "^3.0.3"
|
|
188
189
|
},
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
const css = require("@vanilla-extract/css");
|
|
4
|
-
const cssUtils = require("@vanilla-extract/css-utils");
|
|
5
|
-
const styles_lib_css_responsiveStyle_cjs = require("../../css/responsiveStyle.cjs");
|
|
6
|
-
const styles_lib_themes_vars_css_cjs = require("../../themes/vars.css.cjs");
|
|
7
|
-
fileScope.setFileScope("src/lib/components/Badge/Badge.css.ts?used", "braid-design-system");
|
|
8
|
-
const constants = {
|
|
9
|
-
textSize: "xsmall"
|
|
10
|
-
};
|
|
11
|
-
const stylesForBreakpoint = (breakpoint) => {
|
|
12
|
-
const {
|
|
13
|
-
lineHeight,
|
|
14
|
-
capHeight
|
|
15
|
-
} = styles_lib_themes_vars_css_cjs.vars.textSize[constants.textSize][breakpoint];
|
|
16
|
-
const padding = cssUtils.calc.subtract(lineHeight, capHeight);
|
|
17
|
-
return {
|
|
18
|
-
margin: `${cssUtils.calc(padding).divide(2).negate()} 0`
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
const bleedY = css.style(styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
22
|
-
mobile: stylesForBreakpoint("mobile"),
|
|
23
|
-
tablet: stylesForBreakpoint("tablet")
|
|
24
|
-
}), "bleedY");
|
|
25
|
-
fileScope.endFileScope();
|
|
26
|
-
exports.bleedY = bleedY;
|
|
27
|
-
exports.constants = constants;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import { calc } from "@vanilla-extract/css-utils";
|
|
4
|
-
import { responsiveStyle } from "../../css/responsiveStyle.mjs";
|
|
5
|
-
import { vars } from "../../themes/vars.css.mjs";
|
|
6
|
-
setFileScope("src/lib/components/Badge/Badge.css.ts?used", "braid-design-system");
|
|
7
|
-
const constants = {
|
|
8
|
-
textSize: "xsmall"
|
|
9
|
-
};
|
|
10
|
-
const stylesForBreakpoint = (breakpoint) => {
|
|
11
|
-
const {
|
|
12
|
-
lineHeight,
|
|
13
|
-
capHeight
|
|
14
|
-
} = vars.textSize[constants.textSize][breakpoint];
|
|
15
|
-
const padding = calc.subtract(lineHeight, capHeight);
|
|
16
|
-
return {
|
|
17
|
-
margin: `${calc(padding).divide(2).negate()} 0`
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
const bleedY = style(responsiveStyle({
|
|
21
|
-
mobile: stylesForBreakpoint("mobile"),
|
|
22
|
-
tablet: stylesForBreakpoint("tablet")
|
|
23
|
-
}), "bleedY");
|
|
24
|
-
endFileScope();
|
|
25
|
-
export {
|
|
26
|
-
bleedY,
|
|
27
|
-
constants
|
|
28
|
-
};
|