@gitlab/ui 66.9.0 → 66.10.1
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 +16 -0
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/dist/utils/charts/theme.js +2 -2
- package/package.json +20 -20
- package/scss_to_js/scss_variables.js +15 -19
- package/scss_to_js/scss_variables.json +140 -76
- package/src/components/base/daterange_picker/daterange_picker.stories.js +3 -3
- package/src/scss/mixins.scss +46 -0
- package/src/scss/storybook_dark_mode.scss +8 -2
- package/src/scss/variables.scss +48 -28
- package/src/utils/charts/theme.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [66.10.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.10.0...v66.10.1) (2023-09-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* adjust dark mode preview text color ([2196116](https://gitlab.com/gitlab-org/gitlab-ui/commit/2196116088f4d5100ae8095f4716f04417eac75f))
|
|
7
|
+
* use CSS variables instead of JS literals for axis color ([6bc13ca](https://gitlab.com/gitlab-org/gitlab-ui/commit/6bc13ca9eb0d901feb71a263a4b6107cf3f82e15))
|
|
8
|
+
* **GlChart:** make chart legend text visible in dark mode ([0ec9e7c](https://gitlab.com/gitlab-org/gitlab-ui/commit/0ec9e7cfbc387d5bcdbf490ebd3e51ff6fa666ef))
|
|
9
|
+
|
|
10
|
+
# [66.10.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.9.0...v66.10.0) (2023-09-19)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **Typography:** Add font-size variable map and heading mixins ([c412fe8](https://gitlab.com/gitlab-org/gitlab-ui/commit/c412fe834011683df677d78dbd793cdd65339783))
|
|
16
|
+
|
|
1
17
|
# [66.9.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.8.0...v66.9.0) (2023-09-13)
|
|
2
18
|
|
|
3
19
|
|
package/dist/tokens/js/tokens.js
CHANGED
|
@@ -24,7 +24,7 @@ const axes = {
|
|
|
24
24
|
axisLabel: {
|
|
25
25
|
margin: 8,
|
|
26
26
|
show: true,
|
|
27
|
-
color: GRAY_600
|
|
27
|
+
color: `var(--gray-600, ${GRAY_600})`,
|
|
28
28
|
hideOverlap: true
|
|
29
29
|
},
|
|
30
30
|
axisLine: {
|
|
@@ -69,7 +69,7 @@ const createTheme = function () {
|
|
|
69
69
|
color: colorPaletteDefault,
|
|
70
70
|
backgroundColor: 'transparent',
|
|
71
71
|
textStyle: {
|
|
72
|
-
color: GRAY_900
|
|
72
|
+
color: `var(--gl-text-color, ${GRAY_900})`
|
|
73
73
|
},
|
|
74
74
|
markLine: {
|
|
75
75
|
silent: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "66.
|
|
3
|
+
"version": "66.10.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -88,28 +88,28 @@
|
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@arkweid/lefthook": "0.7.7",
|
|
91
|
-
"@babel/core": "^7.22.
|
|
91
|
+
"@babel/core": "^7.22.19",
|
|
92
92
|
"@babel/preset-env": "^7.22.15",
|
|
93
93
|
"@babel/preset-react": "^7.22.15",
|
|
94
94
|
"@gitlab/eslint-plugin": "19.0.0",
|
|
95
95
|
"@gitlab/fonts": "^1.2.0",
|
|
96
96
|
"@gitlab/stylelint-config": "5.0.0",
|
|
97
|
-
"@gitlab/svgs": "3.
|
|
97
|
+
"@gitlab/svgs": "3.62.0",
|
|
98
98
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
99
99
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
100
100
|
"@rollup/plugin-replace": "^2.3.2",
|
|
101
|
-
"@storybook/addon-a11y": "7.4.
|
|
102
|
-
"@storybook/addon-docs": "7.4.
|
|
103
|
-
"@storybook/addon-essentials": "7.4.
|
|
104
|
-
"@storybook/addon-storyshots": "7.4.
|
|
105
|
-
"@storybook/addon-storyshots-puppeteer": "7.4.
|
|
106
|
-
"@storybook/addon-viewport": "7.4.
|
|
107
|
-
"@storybook/builder-webpack5": "7.4.
|
|
108
|
-
"@storybook/theming": "7.4.
|
|
109
|
-
"@storybook/vue": "7.4.
|
|
110
|
-
"@storybook/vue-webpack5": "7.4.
|
|
111
|
-
"@storybook/vue3": "7.4.
|
|
112
|
-
"@storybook/vue3-webpack5": "7.4.
|
|
101
|
+
"@storybook/addon-a11y": "7.4.2",
|
|
102
|
+
"@storybook/addon-docs": "7.4.2",
|
|
103
|
+
"@storybook/addon-essentials": "7.4.2",
|
|
104
|
+
"@storybook/addon-storyshots": "7.4.2",
|
|
105
|
+
"@storybook/addon-storyshots-puppeteer": "7.4.2",
|
|
106
|
+
"@storybook/addon-viewport": "7.4.2",
|
|
107
|
+
"@storybook/builder-webpack5": "7.4.2",
|
|
108
|
+
"@storybook/theming": "7.4.2",
|
|
109
|
+
"@storybook/vue": "7.4.2",
|
|
110
|
+
"@storybook/vue-webpack5": "7.4.2",
|
|
111
|
+
"@storybook/vue3": "7.4.2",
|
|
112
|
+
"@storybook/vue3-webpack5": "7.4.2",
|
|
113
113
|
"@vue/compat": "^3.2.40",
|
|
114
114
|
"@vue/compiler-sfc": "^3.2.40",
|
|
115
115
|
"@vue/test-utils": "1.3.0",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"babel-loader": "^8.0.5",
|
|
123
123
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
124
124
|
"bootstrap": "4.6.2",
|
|
125
|
-
"cypress": "13.
|
|
125
|
+
"cypress": "13.2.0",
|
|
126
126
|
"cypress-axe": "^1.4.0",
|
|
127
127
|
"dompurify": "^3.0.0",
|
|
128
128
|
"emoji-regex": "^10.0.0",
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
"glob": "10.3.3",
|
|
134
134
|
"identity-obj-proxy": "^3.0.0",
|
|
135
135
|
"inquirer-select-directory": "^1.2.0",
|
|
136
|
-
"jest": "^29.
|
|
137
|
-
"jest-circus": "29.
|
|
138
|
-
"jest-environment-jsdom": "29.
|
|
136
|
+
"jest": "^29.7.0",
|
|
137
|
+
"jest-circus": "29.7.0",
|
|
138
|
+
"jest-environment-jsdom": "29.7.0",
|
|
139
139
|
"markdownlint-cli": "^0.29.0",
|
|
140
140
|
"mockdate": "^2.0.5",
|
|
141
141
|
"module-alias": "^2.2.2",
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"sass-loader": "^10.2.0",
|
|
161
161
|
"sass-true": "^6.1.0",
|
|
162
162
|
"start-server-and-test": "^1.10.6",
|
|
163
|
-
"storybook": "7.4.
|
|
163
|
+
"storybook": "7.4.2",
|
|
164
164
|
"storybook-dark-mode": "3.0.1",
|
|
165
165
|
"style-dictionary": "^3.8.0",
|
|
166
166
|
"stylelint": "15.10.2",
|
|
@@ -263,22 +263,21 @@ export const glLineHeight36 = '2.25rem'
|
|
|
263
263
|
export const glLineHeight42 = '2.625rem'
|
|
264
264
|
export const glLineHeight44 = '2.75rem'
|
|
265
265
|
export const glLineHeight52 = '3.25rem'
|
|
266
|
-
export const
|
|
267
|
-
export const
|
|
268
|
-
export const
|
|
269
|
-
export const
|
|
270
|
-
export const
|
|
271
|
-
export const
|
|
272
|
-
export const
|
|
273
|
-
export const
|
|
274
|
-
export const
|
|
275
|
-
export const
|
|
276
|
-
export const
|
|
277
|
-
export const
|
|
278
|
-
export const
|
|
279
|
-
export const
|
|
280
|
-
export const
|
|
281
|
-
export const glFontSize800 = 'clamp(1.75rem, calc(0.8611111111rem + 1.8518518519vw), 2.25rem)'
|
|
266
|
+
export const glMonospaceFont = ''
|
|
267
|
+
export const glRegularFont = 'GitLab Sans ", -apple-system, BlinkMacSystemFont, " Segoe UI ", Roboto, " Noto Sans ", Ubuntu, Cantarell, " Helvetica Neue ", sans-serif, " Apple Color Emoji ", " Segoe UI Emoji ", " Segoe UI Symbol ", " Noto Color Emoji'
|
|
268
|
+
export const glFonts = '("monospace": ("GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace), "regular": ("GitLab Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"))'
|
|
269
|
+
export const glFontSizesFixed = '(100: 0.75rem, 200: 0.8125rem, 300: 0.875rem, 400: 1rem, 500: 1.125rem, 600: 1.3125rem, 700: 1.5rem, 800: 1.75rem)'
|
|
270
|
+
export const glFontSizes = '(100: 0.75rem, 200: 0.8125rem, 300: 0.875rem, 400: 1rem, 500: clamp(1.125rem, calc(0.9027777778rem + 0.462962963vw), 1.25rem), 600: clamp(1.3125rem, calc(0.8680555556rem + 0.9259259259vw), 1.5625rem), 700: clamp(1.5rem, calc(0.8333333333rem + 1.3888888889vw), 1.875rem), 800: clamp(1.75rem, calc(0.8611111111rem + 1.8518518519vw), 2.25rem))'
|
|
271
|
+
export const glFontHeading = '"GitLab Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", Noto Color Emoji'
|
|
272
|
+
export const glFontWeightHeading = '600'
|
|
273
|
+
export const glLetterSpacingHeading = 'inherit'
|
|
274
|
+
export const glLetterSpacingHeadingReduced = '-0.01em'
|
|
275
|
+
export const glLineHeightHeading = '1.25'
|
|
276
|
+
export const glLineHeightHeadingDisplay = '1.125'
|
|
277
|
+
export const glMbHeading = '1rem'
|
|
278
|
+
export const glMbHeadingDisplay = '1.5rem'
|
|
279
|
+
export const glTextColorHeading = '#333238'
|
|
280
|
+
export const glTextWrapHeading = 'pretty'
|
|
282
281
|
export const glFontSize = '0.875rem'
|
|
283
282
|
export const glFontSizeXs = '0.625rem'
|
|
284
283
|
export const glFontSizeSm = '0.75rem'
|
|
@@ -306,9 +305,6 @@ export const glFontSizeMarkdownH3Xl = '1.4375rem'
|
|
|
306
305
|
export const glFontSizeCompactMarkdownH1 = '1.1875rem'
|
|
307
306
|
export const glFontSizeCompactMarkdownH1Md = '1.25rem'
|
|
308
307
|
export const glFontSizeCompactMarkdownH1Xl = '1.4375rem'
|
|
309
|
-
export const glMonospaceFont = ''
|
|
310
|
-
export const glRegularFont = 'GitLab Sans ", -apple-system, BlinkMacSystemFont, " Segoe UI ", Roboto, " Noto Sans ", Ubuntu, Cantarell, " Helvetica Neue ", sans-serif, " Apple Color Emoji ", " Segoe UI Emoji ", " Segoe UI Symbol ", " Noto Color Emoji'
|
|
311
|
-
export const glFonts = '("monospace": ("GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace), "regular": ("GitLab Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"))'
|
|
312
308
|
export const borderColor = '#dcdcde'
|
|
313
309
|
export const glBorderSize1 = '1px'
|
|
314
310
|
export const glBorderSize2 = '2px'
|
|
@@ -1365,84 +1365,175 @@
|
|
|
1365
1365
|
"compiledValue": "3.25rem"
|
|
1366
1366
|
},
|
|
1367
1367
|
{
|
|
1368
|
-
"name": "$gl-font
|
|
1369
|
-
"value": "
|
|
1370
|
-
"compiledValue": "
|
|
1368
|
+
"name": "$gl-monospace-font",
|
|
1369
|
+
"value": "'GitLab Mono', 'JetBrains Mono', 'Menlo', 'DejaVu Sans Mono', 'Liberation Mono', 'Consolas', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace",
|
|
1370
|
+
"compiledValue": ""
|
|
1371
1371
|
},
|
|
1372
1372
|
{
|
|
1373
|
-
"name": "$gl-font
|
|
1374
|
-
"value": "
|
|
1375
|
-
"compiledValue": "
|
|
1373
|
+
"name": "$gl-regular-font",
|
|
1374
|
+
"value": "GitLab Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji",
|
|
1375
|
+
"compiledValue": "GitLab Sans \", -apple-system, BlinkMacSystemFont, \" Segoe UI \", Roboto, \" Noto Sans \", Ubuntu, Cantarell, \" Helvetica Neue \", sans-serif, \" Apple Color Emoji \", \" Segoe UI Emoji \", \" Segoe UI Symbol \", \" Noto Color Emoji"
|
|
1376
1376
|
},
|
|
1377
1377
|
{
|
|
1378
|
-
"name": "$gl-
|
|
1379
|
-
"value": "
|
|
1380
|
-
"
|
|
1378
|
+
"name": "$gl-fonts",
|
|
1379
|
+
"value": "( 'monospace': $gl-monospace-font, 'regular': $gl-regular-font, )",
|
|
1380
|
+
"mapValue": [
|
|
1381
|
+
{
|
|
1382
|
+
"name": "monospace",
|
|
1383
|
+
"value": "$gl-monospace-font",
|
|
1384
|
+
"compiledValue": "\"GitLab Mono\", \"JetBrains Mono\", \"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"name": "regular",
|
|
1388
|
+
"value": "$gl-regular-font",
|
|
1389
|
+
"compiledValue": "\"GitLab Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Noto Sans\", Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", Noto Color Emoji"
|
|
1390
|
+
}
|
|
1391
|
+
],
|
|
1392
|
+
"compiledValue": "(\"monospace\": (\"GitLab Mono\", \"JetBrains Mono\", \"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace), \"regular\": (\"GitLab Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Noto Sans\", Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"))"
|
|
1381
1393
|
},
|
|
1382
1394
|
{
|
|
1383
|
-
"name": "$gl-font-
|
|
1384
|
-
"value": "px-to-rem(16px)",
|
|
1385
|
-
"
|
|
1395
|
+
"name": "$gl-font-sizes-fixed",
|
|
1396
|
+
"value": "( 100: px-to-rem(12px), 200: px-to-rem(13px), 300: px-to-rem(14px), 400: px-to-rem(16px), 500: px-to-rem(18px), 600: px-to-rem(21px), 700: px-to-rem(24px), 800: px-to-rem(28px), )",
|
|
1397
|
+
"mapValue": [
|
|
1398
|
+
{
|
|
1399
|
+
"name": "100",
|
|
1400
|
+
"value": "px-to-rem(12px)",
|
|
1401
|
+
"compiledValue": "0.75rem"
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"name": "200",
|
|
1405
|
+
"value": "px-to-rem(13px)",
|
|
1406
|
+
"compiledValue": "0.8125rem"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"name": "300",
|
|
1410
|
+
"value": "px-to-rem(14px)",
|
|
1411
|
+
"compiledValue": "0.875rem"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"name": "400",
|
|
1415
|
+
"value": "px-to-rem(16px)",
|
|
1416
|
+
"compiledValue": "1rem"
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"name": "500",
|
|
1420
|
+
"value": "px-to-rem(18px)",
|
|
1421
|
+
"compiledValue": "1.125rem"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"name": "600",
|
|
1425
|
+
"value": "px-to-rem(21px)",
|
|
1426
|
+
"compiledValue": "1.3125rem"
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
"name": "700",
|
|
1430
|
+
"value": "px-to-rem(24px)",
|
|
1431
|
+
"compiledValue": "1.5rem"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"name": "800",
|
|
1435
|
+
"value": "px-to-rem(28px)",
|
|
1436
|
+
"compiledValue": "1.75rem"
|
|
1437
|
+
}
|
|
1438
|
+
],
|
|
1439
|
+
"compiledValue": "(100: 0.75rem, 200: 0.8125rem, 300: 0.875rem, 400: 1rem, 500: 1.125rem, 600: 1.3125rem, 700: 1.5rem, 800: 1.75rem)"
|
|
1386
1440
|
},
|
|
1387
1441
|
{
|
|
1388
|
-
"name": "$gl-font-
|
|
1389
|
-
"value": "px-to-rem(
|
|
1390
|
-
"
|
|
1442
|
+
"name": "$gl-font-sizes",
|
|
1443
|
+
"value": "( 100: map-get($gl-font-sizes-fixed, 100), 200: map-get($gl-font-sizes-fixed, 200), 300: map-get($gl-font-sizes-fixed, 300), 400: map-get($gl-font-sizes-fixed, 400), 500: clamp-between(map-get($gl-font-sizes-fixed, 500), px-to-rem(20px)), 600: clamp-between(map-get($gl-font-sizes-fixed, 600), px-to-rem(25px)), 700: clamp-between(map-get($gl-font-sizes-fixed, 700), px-to-rem(30px)), 800: clamp-between(map-get($gl-font-sizes-fixed, 800), px-to-rem(36px)), )",
|
|
1444
|
+
"mapValue": [
|
|
1445
|
+
{
|
|
1446
|
+
"name": "100",
|
|
1447
|
+
"value": "map-get($gl-font-sizes-fixed, 100)",
|
|
1448
|
+
"compiledValue": "0.75rem"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"name": "200",
|
|
1452
|
+
"value": "map-get($gl-font-sizes-fixed, 200)",
|
|
1453
|
+
"compiledValue": "0.8125rem"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"name": "300",
|
|
1457
|
+
"value": "map-get($gl-font-sizes-fixed, 300)",
|
|
1458
|
+
"compiledValue": "0.875rem"
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"name": "400",
|
|
1462
|
+
"value": "map-get($gl-font-sizes-fixed, 400)",
|
|
1463
|
+
"compiledValue": "1rem"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"name": "500",
|
|
1467
|
+
"value": "clamp-between(map-get($gl-font-sizes-fixed, 500)",
|
|
1468
|
+
"compiledValue": ""
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"name": "600",
|
|
1472
|
+
"value": "clamp-between(map-get($gl-font-sizes-fixed, 600)",
|
|
1473
|
+
"compiledValue": ""
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
"name": "700",
|
|
1477
|
+
"value": "clamp-between(map-get($gl-font-sizes-fixed, 700)",
|
|
1478
|
+
"compiledValue": ""
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"name": "800",
|
|
1482
|
+
"value": "clamp-between(map-get($gl-font-sizes-fixed, 800)",
|
|
1483
|
+
"compiledValue": ""
|
|
1484
|
+
}
|
|
1485
|
+
],
|
|
1486
|
+
"compiledValue": "(100: 0.75rem, 200: 0.8125rem, 300: 0.875rem, 400: 1rem, 500: clamp(1.125rem, calc(0.9027777778rem + 0.462962963vw), 1.25rem), 600: clamp(1.3125rem, calc(0.8680555556rem + 0.9259259259vw), 1.5625rem), 700: clamp(1.5rem, calc(0.8333333333rem + 1.3888888889vw), 1.875rem), 800: clamp(1.75rem, calc(0.8611111111rem + 1.8518518519vw), 2.25rem))"
|
|
1391
1487
|
},
|
|
1392
1488
|
{
|
|
1393
|
-
"name": "$gl-font-
|
|
1394
|
-
"value": "
|
|
1395
|
-
"compiledValue": "
|
|
1489
|
+
"name": "$gl-font-heading",
|
|
1490
|
+
"value": "$gl-regular-font",
|
|
1491
|
+
"compiledValue": "\"GitLab Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Noto Sans\", Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", Noto Color Emoji"
|
|
1396
1492
|
},
|
|
1397
1493
|
{
|
|
1398
|
-
"name": "$gl-font-
|
|
1399
|
-
"value": "
|
|
1400
|
-
"compiledValue": "
|
|
1494
|
+
"name": "$gl-font-weight-heading",
|
|
1495
|
+
"value": "600",
|
|
1496
|
+
"compiledValue": "600"
|
|
1401
1497
|
},
|
|
1402
1498
|
{
|
|
1403
|
-
"name": "$gl-
|
|
1404
|
-
"value": "
|
|
1405
|
-
"compiledValue": "
|
|
1499
|
+
"name": "$gl-letter-spacing-heading",
|
|
1500
|
+
"value": "inherit",
|
|
1501
|
+
"compiledValue": "inherit"
|
|
1406
1502
|
},
|
|
1407
1503
|
{
|
|
1408
|
-
"name": "$gl-
|
|
1409
|
-
"value": "
|
|
1410
|
-
"compiledValue": "0.
|
|
1504
|
+
"name": "$gl-letter-spacing-heading-reduced",
|
|
1505
|
+
"value": "-0.01em",
|
|
1506
|
+
"compiledValue": "-0.01em"
|
|
1411
1507
|
},
|
|
1412
1508
|
{
|
|
1413
|
-
"name": "$gl-
|
|
1414
|
-
"value": "
|
|
1415
|
-
"compiledValue": "
|
|
1509
|
+
"name": "$gl-line-height-heading",
|
|
1510
|
+
"value": "1.25",
|
|
1511
|
+
"compiledValue": "1.25"
|
|
1416
1512
|
},
|
|
1417
1513
|
{
|
|
1418
|
-
"name": "$gl-
|
|
1419
|
-
"value": "
|
|
1420
|
-
"compiledValue": "
|
|
1514
|
+
"name": "$gl-line-height-heading-display",
|
|
1515
|
+
"value": "1.125",
|
|
1516
|
+
"compiledValue": "1.125"
|
|
1421
1517
|
},
|
|
1422
1518
|
{
|
|
1423
|
-
"name": "$gl-
|
|
1424
|
-
"value": "$gl-
|
|
1519
|
+
"name": "$gl-mb-heading",
|
|
1520
|
+
"value": "$gl-spacing-scale-5",
|
|
1425
1521
|
"compiledValue": "1rem"
|
|
1426
1522
|
},
|
|
1427
1523
|
{
|
|
1428
|
-
"name": "$gl-
|
|
1429
|
-
"value": "
|
|
1430
|
-
"compiledValue": "
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
"name": "$gl-font-size-600",
|
|
1434
|
-
"value": "#{clamp-between($gl-font-size-600-fixed, px-to-rem(25px))}",
|
|
1435
|
-
"compiledValue": "clamp(1.3125rem, calc(0.8680555556rem + 0.9259259259vw), 1.5625rem)"
|
|
1524
|
+
"name": "$gl-mb-heading-display",
|
|
1525
|
+
"value": "$gl-spacing-scale-6",
|
|
1526
|
+
"compiledValue": "1.5rem"
|
|
1436
1527
|
},
|
|
1437
1528
|
{
|
|
1438
|
-
"name": "$gl-
|
|
1439
|
-
"value": "
|
|
1440
|
-
"compiledValue": "
|
|
1529
|
+
"name": "$gl-text-color-heading",
|
|
1530
|
+
"value": "$gl-text-color",
|
|
1531
|
+
"compiledValue": "#333238"
|
|
1441
1532
|
},
|
|
1442
1533
|
{
|
|
1443
|
-
"name": "$gl-
|
|
1444
|
-
"value": "
|
|
1445
|
-
"compiledValue": "
|
|
1534
|
+
"name": "$gl-text-wrap-heading",
|
|
1535
|
+
"value": "pretty",
|
|
1536
|
+
"compiledValue": "pretty"
|
|
1446
1537
|
},
|
|
1447
1538
|
{
|
|
1448
1539
|
"name": "$gl-font-size",
|
|
@@ -1579,33 +1670,6 @@
|
|
|
1579
1670
|
"value": "px-to-rem(23px)",
|
|
1580
1671
|
"compiledValue": "1.4375rem"
|
|
1581
1672
|
},
|
|
1582
|
-
{
|
|
1583
|
-
"name": "$gl-monospace-font",
|
|
1584
|
-
"value": "'GitLab Mono', 'JetBrains Mono', 'Menlo', 'DejaVu Sans Mono', 'Liberation Mono', 'Consolas', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace",
|
|
1585
|
-
"compiledValue": ""
|
|
1586
|
-
},
|
|
1587
|
-
{
|
|
1588
|
-
"name": "$gl-regular-font",
|
|
1589
|
-
"value": "GitLab Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji",
|
|
1590
|
-
"compiledValue": "GitLab Sans \", -apple-system, BlinkMacSystemFont, \" Segoe UI \", Roboto, \" Noto Sans \", Ubuntu, Cantarell, \" Helvetica Neue \", sans-serif, \" Apple Color Emoji \", \" Segoe UI Emoji \", \" Segoe UI Symbol \", \" Noto Color Emoji"
|
|
1591
|
-
},
|
|
1592
|
-
{
|
|
1593
|
-
"name": "$gl-fonts",
|
|
1594
|
-
"value": "( 'monospace': $gl-monospace-font, 'regular': $gl-regular-font, )",
|
|
1595
|
-
"mapValue": [
|
|
1596
|
-
{
|
|
1597
|
-
"name": "monospace",
|
|
1598
|
-
"value": "$gl-monospace-font",
|
|
1599
|
-
"compiledValue": "\"GitLab Mono\", \"JetBrains Mono\", \"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace"
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
"name": "regular",
|
|
1603
|
-
"value": "$gl-regular-font",
|
|
1604
|
-
"compiledValue": "\"GitLab Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Noto Sans\", Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", Noto Color Emoji"
|
|
1605
|
-
}
|
|
1606
|
-
],
|
|
1607
|
-
"compiledValue": "(\"monospace\": (\"GitLab Mono\", \"JetBrains Mono\", \"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace), \"regular\": (\"GitLab Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Noto Sans\", Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"))"
|
|
1608
|
-
},
|
|
1609
1673
|
{
|
|
1610
1674
|
"name": "$border-color",
|
|
1611
1675
|
"value": "$gray-100",
|
|
@@ -21,9 +21,9 @@ const generateProps = ({
|
|
|
21
21
|
maxDateRange = 0,
|
|
22
22
|
sameDaySelection = false,
|
|
23
23
|
tooltip = '',
|
|
24
|
-
startPickerClass
|
|
25
|
-
endPickerClass
|
|
26
|
-
labelClass
|
|
24
|
+
startPickerClass,
|
|
25
|
+
endPickerClass,
|
|
26
|
+
labelClass,
|
|
27
27
|
theme = defaultValue('theme'),
|
|
28
28
|
} = {}) => ({
|
|
29
29
|
defaultMinDate: new Date(defaultMinDate),
|
package/src/scss/mixins.scss
CHANGED
|
@@ -122,3 +122,49 @@
|
|
|
122
122
|
@content;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
|
|
126
|
+
// Helper functions to aid maintenance of heading styles
|
|
127
|
+
|
|
128
|
+
// Because we can't interpolate into a variable name we have to do some stuff
|
|
129
|
+
@function get-font-size-variable($size, $fixed) {
|
|
130
|
+
@if $fixed == true {
|
|
131
|
+
@if map-has-key($gl-font-sizes-fixed, $size) {
|
|
132
|
+
@return map-get($gl-font-sizes-fixed, $size);
|
|
133
|
+
} @else {
|
|
134
|
+
@error "#{$size} is not a valid fixed font size property";
|
|
135
|
+
@return null;
|
|
136
|
+
}
|
|
137
|
+
} @else {
|
|
138
|
+
@if map-has-key($gl-font-sizes, $size) {
|
|
139
|
+
@return map-get($gl-font-sizes, $size);
|
|
140
|
+
} @else {
|
|
141
|
+
@error "#{$size} is not a valid font size property";
|
|
142
|
+
@return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Set fixed as false by default, matching desired usage in the product
|
|
148
|
+
// Headings do not have margin included, margin is determined by the context
|
|
149
|
+
@mixin gl-heading($size, $fixed: false) {
|
|
150
|
+
// These settings apply to all headings
|
|
151
|
+
font-weight: $gl-font-weight-heading;
|
|
152
|
+
margin-top: 0; // override bootstrap reset in GitLab
|
|
153
|
+
|
|
154
|
+
// Because we can't interpolate into a variable name we have to do some stuff
|
|
155
|
+
font-size: get-font-size-variable($size, $fixed);
|
|
156
|
+
|
|
157
|
+
// Larger headings have less letter spacing
|
|
158
|
+
@if ($size <= 500) {
|
|
159
|
+
letter-spacing: $gl-letter-spacing-heading;
|
|
160
|
+
} @else {
|
|
161
|
+
letter-spacing: $gl-letter-spacing-heading-reduced;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Display heading has different line height
|
|
165
|
+
@if ($size == 800) {
|
|
166
|
+
line-height: $gl-line-height-heading-display;
|
|
167
|
+
} @else {
|
|
168
|
+
line-height: $gl-line-height-heading;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'variables';
|
|
2
|
+
|
|
1
3
|
// conditional overrides for dark mode for use in storybook.
|
|
2
4
|
// Because we only use application.css from gitlab (and not
|
|
3
5
|
// application_dark), we need to override some base rules so
|
|
@@ -9,7 +11,11 @@
|
|
|
9
11
|
|
|
10
12
|
.gl-dark {
|
|
11
13
|
--color-body-bg: #1f1f1f;
|
|
12
|
-
|
|
14
|
+
|
|
15
|
+
// Note that we are assigning variables with different values due to the way GitLab inverts variables in dark mode.
|
|
16
|
+
// e.g. text color is usually $gray-900, but in dark mode $gray-900 variable gets inverted to $gray-50
|
|
17
|
+
--gl-text-color: #{$gray-50};
|
|
18
|
+
--gray-600: #{$gray-300};
|
|
13
19
|
|
|
14
20
|
color-scheme: dark;
|
|
15
21
|
|
|
@@ -18,6 +24,6 @@
|
|
|
18
24
|
// We can delete these once $body-bg and $body-color
|
|
19
25
|
// variables in variables.scss are updated to use CSS custom properties
|
|
20
26
|
background-color: var(--color-body-bg);
|
|
21
|
-
color: var(--
|
|
27
|
+
color: var(--gl-text-color);
|
|
22
28
|
}
|
|
23
29
|
}
|
package/src/scss/variables.scss
CHANGED
|
@@ -338,6 +338,18 @@ $gl-line-height-42: px-to-rem(42px);
|
|
|
338
338
|
$gl-line-height-44: px-to-rem(44px);
|
|
339
339
|
$gl-line-height-52: px-to-rem(52px);
|
|
340
340
|
|
|
341
|
+
// Fonts
|
|
342
|
+
$gl-monospace-font: 'GitLab Mono', 'JetBrains Mono', 'Menlo', 'DejaVu Sans Mono', 'Liberation Mono',
|
|
343
|
+
'Consolas', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace !default;
|
|
344
|
+
$gl-regular-font: 'GitLab Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans',
|
|
345
|
+
Ubuntu, Cantarell, 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
|
346
|
+
'Segoe UI Symbol', 'Noto Color Emoji' !default;
|
|
347
|
+
|
|
348
|
+
$gl-fonts: (
|
|
349
|
+
'monospace': $gl-monospace-font,
|
|
350
|
+
'regular': $gl-regular-font,
|
|
351
|
+
);
|
|
352
|
+
|
|
341
353
|
// New UI type scale
|
|
342
354
|
// Implements the type scale from https://gitlab.com/groups/gitlab-org/gitlab-services/-/epics/15
|
|
343
355
|
// Old variables and styles need to be removed after intergration
|
|
@@ -345,24 +357,44 @@ $gl-line-height-52: px-to-rem(52px);
|
|
|
345
357
|
// Font size scale
|
|
346
358
|
|
|
347
359
|
// fixed scale (compact markdown)
|
|
348
|
-
$gl-font-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
360
|
+
$gl-font-sizes-fixed: (
|
|
361
|
+
100: px-to-rem(12px),
|
|
362
|
+
200: px-to-rem(13px),
|
|
363
|
+
300: px-to-rem(14px),
|
|
364
|
+
400: px-to-rem(16px),
|
|
365
|
+
500: px-to-rem(18px),
|
|
366
|
+
600: px-to-rem(21px),
|
|
367
|
+
700: px-to-rem(24px),
|
|
368
|
+
800: px-to-rem(28px),
|
|
369
|
+
);
|
|
356
370
|
|
|
357
371
|
// dynamic scale (default) resizes based on viewport width
|
|
358
|
-
$gl-font-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
372
|
+
$gl-font-sizes: (
|
|
373
|
+
100: map-get($gl-font-sizes-fixed, 100),
|
|
374
|
+
200: map-get($gl-font-sizes-fixed, 200),
|
|
375
|
+
300: map-get($gl-font-sizes-fixed, 300),
|
|
376
|
+
400: map-get($gl-font-sizes-fixed, 400),
|
|
377
|
+
500: clamp-between(map-get($gl-font-sizes-fixed, 500), px-to-rem(20px)),
|
|
378
|
+
600: clamp-between(map-get($gl-font-sizes-fixed, 600), px-to-rem(25px)),
|
|
379
|
+
700: clamp-between(map-get($gl-font-sizes-fixed, 700), px-to-rem(30px)),
|
|
380
|
+
800: clamp-between(map-get($gl-font-sizes-fixed, 800), px-to-rem(36px)),
|
|
381
|
+
);
|
|
382
|
+
|
|
383
|
+
// Heading variables
|
|
384
|
+
// Not all are currently used, but documented here to capture intent
|
|
385
|
+
$gl-font-heading: $gl-regular-font;
|
|
386
|
+
$gl-font-weight-heading: 600;
|
|
387
|
+
$gl-letter-spacing-heading: inherit;
|
|
388
|
+
$gl-letter-spacing-heading-reduced: -0.01em;
|
|
389
|
+
$gl-line-height-heading: 1.25;
|
|
390
|
+
$gl-line-height-heading-display: 1.125;
|
|
391
|
+
$gl-mb-heading: $gl-spacing-scale-5;
|
|
392
|
+
$gl-mb-heading-display: $gl-spacing-scale-6;
|
|
393
|
+
$gl-text-color-heading: $gl-text-color;
|
|
394
|
+
// Not yet supported, but we'll be ready
|
|
395
|
+
$gl-text-wrap-heading: pretty;
|
|
396
|
+
|
|
397
|
+
// END New UI type scale
|
|
366
398
|
|
|
367
399
|
// UI typescale
|
|
368
400
|
|
|
@@ -417,18 +449,6 @@ $gl-font-size-compact-markdown-h1-md: px-to-rem(20px);
|
|
|
417
449
|
// media xl (min-width: 1200px)
|
|
418
450
|
$gl-font-size-compact-markdown-h1-xl: px-to-rem(23px);
|
|
419
451
|
|
|
420
|
-
// Fonts
|
|
421
|
-
$gl-monospace-font: 'GitLab Mono', 'JetBrains Mono', 'Menlo', 'DejaVu Sans Mono', 'Liberation Mono',
|
|
422
|
-
'Consolas', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace !default;
|
|
423
|
-
$gl-regular-font: 'GitLab Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans',
|
|
424
|
-
Ubuntu, Cantarell, 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
|
425
|
-
'Segoe UI Symbol', 'Noto Color Emoji' !default;
|
|
426
|
-
|
|
427
|
-
$gl-fonts: (
|
|
428
|
-
'monospace': $gl-monospace-font,
|
|
429
|
-
'regular': $gl-regular-font,
|
|
430
|
-
);
|
|
431
|
-
|
|
432
452
|
$border-color: $gray-100 !default;
|
|
433
453
|
|
|
434
454
|
// use px for borders rather than rem
|
|
@@ -162,7 +162,7 @@ const axes = {
|
|
|
162
162
|
axisLabel: {
|
|
163
163
|
margin: 8,
|
|
164
164
|
show: true,
|
|
165
|
-
color: GRAY_600
|
|
165
|
+
color: `var(--gray-600, ${GRAY_600})`,
|
|
166
166
|
hideOverlap: true,
|
|
167
167
|
},
|
|
168
168
|
axisLine: {
|
|
@@ -209,7 +209,7 @@ export const createTheme = (options = {}) => ({
|
|
|
209
209
|
color: colorPaletteDefault,
|
|
210
210
|
backgroundColor: 'transparent',
|
|
211
211
|
textStyle: {
|
|
212
|
-
color: GRAY_900
|
|
212
|
+
color: `var(--gl-text-color, ${GRAY_900})`,
|
|
213
213
|
},
|
|
214
214
|
markLine: {
|
|
215
215
|
silent: true,
|