braid-design-system 32.1.1 → 32.2.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/codemod/dist/wrapper.js +102 -104
  3. package/dist/ToastContext.chunk.cjs +21 -21
  4. package/dist/ToastContext.chunk.mjs +41 -41
  5. package/dist/Toggle.chunk.cjs +19 -29
  6. package/dist/Toggle.chunk.mjs +24 -34
  7. package/dist/reset.d.ts +190 -91
  8. package/dist/side-effects/lib/themes/baseTokens/apac.cjs +7 -8
  9. package/dist/side-effects/lib/themes/baseTokens/apac.mjs +6 -8
  10. package/dist/side-effects/lib/themes/makeRuntimeTokens.cjs +3 -9
  11. package/dist/side-effects/lib/themes/makeRuntimeTokens.mjs +3 -8
  12. package/dist/side-effects/lib/themes/tokenType.cjs +15 -0
  13. package/dist/side-effects/lib/themes/tokenType.mjs +16 -0
  14. package/dist/styles/lib/components/Button/Button.css.cjs +24 -23
  15. package/dist/styles/lib/components/Button/Button.css.mjs +25 -24
  16. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -5
  17. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +1 -5
  18. package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
  19. package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +5 -1
  20. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
  21. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +1 -6
  22. package/dist/styles/lib/css/typography.css.cjs +1 -16
  23. package/dist/styles/lib/css/typography.css.mjs +1 -16
  24. package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
  25. package/dist/styles/lib/themes/docs/tokens.mjs +6 -8
  26. package/dist/styles/lib/themes/makeVanillaTheme.cjs +22 -9
  27. package/dist/styles/lib/themes/makeVanillaTheme.mjs +22 -9
  28. package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
  29. package/dist/styles/lib/themes/wireframe/tokens.mjs +23 -29
  30. package/package.json +3 -2
  31. package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
  32. package/dist/styles/lib/components/Badge/Badge.css.mjs +0 -28
@@ -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
- rows: 9
62
+ lineGap: 22
69
63
  },
70
64
  tablet: {
71
65
  fontSize: 42,
72
- rows: 11
66
+ lineGap: 22
73
67
  }
74
68
  },
75
69
  "2": {
76
70
  mobile: {
77
71
  fontSize: 21,
78
- rows: 8
72
+ lineGap: 20
79
73
  },
80
74
  tablet: {
81
75
  fontSize: 28,
82
- rows: 9
76
+ lineGap: 20
83
77
  }
84
78
  },
85
79
  "3": {
86
80
  mobile: {
87
81
  fontSize: 21,
88
- rows: 7
82
+ lineGap: 18
89
83
  },
90
84
  tablet: {
91
85
  fontSize: 21,
92
- rows: 7
86
+ lineGap: 18
93
87
  }
94
88
  },
95
89
  "4": {
96
90
  mobile: {
97
91
  fontSize: 18,
98
- rows: 7
92
+ lineGap: 16
99
93
  },
100
94
  tablet: {
101
95
  fontSize: 18,
102
- rows: 7
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
- rows: 5
105
+ lineGap: 11
112
106
  },
113
107
  tablet: {
114
108
  fontSize: 12,
115
- rows: 5
109
+ lineGap: 11
116
110
  }
117
111
  },
118
112
  small: {
119
113
  mobile: {
120
114
  fontSize: 14,
121
- rows: 5
115
+ lineGap: 12
122
116
  },
123
117
  tablet: {
124
118
  fontSize: 14,
125
- rows: 5
119
+ lineGap: 12
126
120
  }
127
121
  },
128
122
  standard: {
129
123
  mobile: {
130
124
  fontSize: 16,
131
- rows: 7
125
+ lineGap: 14
132
126
  },
133
127
  tablet: {
134
128
  fontSize: 16,
135
- rows: 7
129
+ lineGap: 14
136
130
  }
137
131
  },
138
132
  large: {
139
133
  mobile: {
140
134
  fontSize: 18,
141
- rows: 8
135
+ lineGap: 16
142
136
  },
143
137
  tablet: {
144
138
  fontSize: 18,
145
- rows: 8
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
- rows: 9
59
+ lineGap: 22
68
60
  },
69
61
  tablet: {
70
62
  fontSize: 42,
71
- rows: 11
63
+ lineGap: 22
72
64
  }
73
65
  },
74
66
  "2": {
75
67
  mobile: {
76
68
  fontSize: 21,
77
- rows: 8
69
+ lineGap: 20
78
70
  },
79
71
  tablet: {
80
72
  fontSize: 28,
81
- rows: 9
73
+ lineGap: 20
82
74
  }
83
75
  },
84
76
  "3": {
85
77
  mobile: {
86
78
  fontSize: 21,
87
- rows: 7
79
+ lineGap: 18
88
80
  },
89
81
  tablet: {
90
82
  fontSize: 21,
91
- rows: 7
83
+ lineGap: 18
92
84
  }
93
85
  },
94
86
  "4": {
95
87
  mobile: {
96
88
  fontSize: 18,
97
- rows: 7
89
+ lineGap: 16
98
90
  },
99
91
  tablet: {
100
92
  fontSize: 18,
101
- rows: 7
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
- rows: 5
102
+ lineGap: 11
111
103
  },
112
104
  tablet: {
113
105
  fontSize: 12,
114
- rows: 5
106
+ lineGap: 11
115
107
  }
116
108
  },
117
109
  small: {
118
110
  mobile: {
119
111
  fontSize: 14,
120
- rows: 5
112
+ lineGap: 12
121
113
  },
122
114
  tablet: {
123
115
  fontSize: 14,
124
- rows: 5
116
+ lineGap: 12
125
117
  }
126
118
  },
127
119
  standard: {
128
120
  mobile: {
129
121
  fontSize: 16,
130
- rows: 7
122
+ lineGap: 14
131
123
  },
132
124
  tablet: {
133
125
  fontSize: 16,
134
- rows: 7
126
+ lineGap: 14
135
127
  }
136
128
  },
137
129
  large: {
138
130
  mobile: {
139
131
  fontSize: 18,
140
- rows: 8
132
+ lineGap: 16
141
133
  },
142
134
  tablet: {
143
135
  fontSize: 18,
144
- rows: 8
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.1.1",
3
+ "version": "32.2.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.0.0",
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",
@@ -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
- };