@gitlab/ui 66.8.0 → 66.10.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 +14 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- 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/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- 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/components/base/skeleton_loader/skeleton_loader.md +23 -0
- package/src/scss/mixins.scss +46 -0
- package/src/scss/utilities.scss +71 -0
- package/src/scss/utility-mixins/animation.scss +77 -0
- package/src/scss/utility-mixins/sizing.scss +8 -0
- package/src/scss/variables.scss +48 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "66.
|
|
3
|
+
"version": "66.10.0",
|
|
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),
|
|
@@ -9,6 +9,29 @@ loading animation. Any skeleton state components should be created with
|
|
|
9
9
|
`<gl-skeleton-loader></gl-skeleton-loader>`. If no shape is passed via the slot the default skeleton
|
|
10
10
|
will be used. See "Default" and "Default With Custom Props" examples.
|
|
11
11
|
|
|
12
|
+
**NOTE:** Skeleton loaders can also be composed with a `.gl-animate-skeleton-loader`
|
|
13
|
+
CSS class. This CSS-based approach is easier to make responsive and match mocked elements.
|
|
14
|
+
Feel free to use this approach if it suits your use case and please leave your
|
|
15
|
+
feedback in this [Feedback for css-based skeleton loading
|
|
16
|
+
indicator](https://gitlab.com/gitlab-org/gitlab-ui/-/issues/2319) issue.
|
|
17
|
+
To improve developer experience and simplify matching Pajamas styles we're considering
|
|
18
|
+
several improvements in the future, including adding more CSS util classes for
|
|
19
|
+
this animation, or creating a dedicated component. Here is an example of how
|
|
20
|
+
you could replicate the default `<gl-skeleton-loader />` behavior with the
|
|
21
|
+
CSS-based approach:
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<div>
|
|
25
|
+
<div class="gl-animate-skeleton-loader gl-h-4 gl-rounded-base gl-my-3 gl-max-w-20!"></div>
|
|
26
|
+
<div class="gl-animate-skeleton-loader gl-h-4 gl-rounded-base gl-my-3 gl-max-w-30!"></div>
|
|
27
|
+
<div class="gl-animate-skeleton-loader gl-h-4 gl-rounded-base gl-my-3 gl-max-w-26!"></div>
|
|
28
|
+
</div>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
See
|
|
32
|
+
[animation.scss](https://gitlab.com/gitlab-org/gitlab-ui/-/blob/main/src/scss/utility-mixins/animation.scss#L17)
|
|
33
|
+
to learn more.
|
|
34
|
+
|
|
12
35
|
## Progressive Loading
|
|
13
36
|
|
|
14
37
|
Determine if progressive loading is available, if it is break apart the skeleton to load data as it
|
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
|
+
}
|
package/src/scss/utilities.scss
CHANGED
|
@@ -60,6 +60,19 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
$gl-animate-skeleton-loader-max-width: 64 * $grid-size;
|
|
64
|
+
|
|
65
|
+
@keyframes gl-keyframes-skeleton-loader {
|
|
66
|
+
|
|
67
|
+
0% {
|
|
68
|
+
background-position-x: -$gl-animate-skeleton-loader-max-width;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
100% {
|
|
72
|
+
background-position-x: $gl-animate-skeleton-loader-max-width;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
63
76
|
.gl-spin {
|
|
64
77
|
animation: gl-spinner-rotate 2s infinite linear;
|
|
65
78
|
}
|
|
@@ -67,6 +80,48 @@
|
|
|
67
80
|
.gl-spin\! {
|
|
68
81
|
animation: gl-spinner-rotate 2s infinite linear !important;
|
|
69
82
|
}
|
|
83
|
+
|
|
84
|
+
.gl-animate-skeleton-loader {
|
|
85
|
+
$max-width: $gl-animate-skeleton-loader-max-width;
|
|
86
|
+
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
max-width: $max-width;
|
|
89
|
+
background-size: $max-width 100%;
|
|
90
|
+
background-position: -$max-width 0;
|
|
91
|
+
background-color: $gray-100;
|
|
92
|
+
background-image: linear-gradient(to right,
|
|
93
|
+
$gray-100 0,
|
|
94
|
+
$gray-50 23%,
|
|
95
|
+
$gray-50 27%,
|
|
96
|
+
$gray-100 50%);
|
|
97
|
+
background-repeat: no-repeat;
|
|
98
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
99
|
+
animation: gl-keyframes-skeleton-loader 2.5s linear;
|
|
100
|
+
animation-delay: inherit;
|
|
101
|
+
animation-iteration-count: 3;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.gl-animate-skeleton-loader\! {
|
|
106
|
+
$max-width: $gl-animate-skeleton-loader-max-width !important;
|
|
107
|
+
|
|
108
|
+
overflow: hidden !important;
|
|
109
|
+
max-width: $max-width !important;
|
|
110
|
+
background-size: $max-width 100% !important;
|
|
111
|
+
background-position: -$max-width 0 !important;
|
|
112
|
+
background-color: $gray-100 !important;
|
|
113
|
+
background-image: linear-gradient(to right,
|
|
114
|
+
$gray-100 0,
|
|
115
|
+
$gray-50 23%,
|
|
116
|
+
$gray-50 27%,
|
|
117
|
+
$gray-100 50%) !important;
|
|
118
|
+
background-repeat: no-repeat !important;
|
|
119
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
120
|
+
animation: gl-keyframes-skeleton-loader 2.5s linear !important;
|
|
121
|
+
animation-delay: inherit !important;
|
|
122
|
+
animation-iteration-count: 3 !important;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
70
125
|
.gl-appearance-none {
|
|
71
126
|
appearance: none;
|
|
72
127
|
-moz-appearance: none;
|
|
@@ -5396,6 +5451,14 @@
|
|
|
5396
5451
|
max-width: $gl-spacing-scale-15 !important;
|
|
5397
5452
|
}
|
|
5398
5453
|
|
|
5454
|
+
.gl-max-w-20 {
|
|
5455
|
+
max-width: $gl-spacing-scale-20;
|
|
5456
|
+
}
|
|
5457
|
+
|
|
5458
|
+
.gl-max-w-20\! {
|
|
5459
|
+
max-width: $gl-spacing-scale-20 !important;
|
|
5460
|
+
}
|
|
5461
|
+
|
|
5399
5462
|
.gl-max-w-26 {
|
|
5400
5463
|
max-width: $gl-spacing-scale-26;
|
|
5401
5464
|
}
|
|
@@ -5404,6 +5467,14 @@
|
|
|
5404
5467
|
max-width: $gl-spacing-scale-26 !important;
|
|
5405
5468
|
}
|
|
5406
5469
|
|
|
5470
|
+
.gl-max-w-30 {
|
|
5471
|
+
max-width: $gl-spacing-scale-30;
|
|
5472
|
+
}
|
|
5473
|
+
|
|
5474
|
+
.gl-max-w-30\! {
|
|
5475
|
+
max-width: $gl-spacing-scale-30 !important;
|
|
5476
|
+
}
|
|
5477
|
+
|
|
5407
5478
|
.gl-max-w-34 {
|
|
5408
5479
|
max-width: $gl-spacing-scale-34;
|
|
5409
5480
|
}
|