@gitlab/ui 43.4.0 → 43.7.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.
@@ -1,6 +1,5 @@
1
1
  import { POSITION } from '../components/utilities/truncate/constants';
2
2
 
3
- const glThemes$1 = 'indigo , blue , light-blue , green , red , light-red';
4
3
  const glIconSizes = '8 12 14 16 24 32 48 72';
5
4
 
6
5
  function appendDefaultOption(options) {
@@ -10,7 +9,7 @@ function appendDefaultOption(options) {
10
9
  }
11
10
 
12
11
  const COMMA = ',';
13
- const glThemes = glThemes$1.split(COMMA).map(glTheme => glTheme.trim());
12
+ const glThemes = ['indigo', 'blue', 'light-blue', 'green', 'red', 'light-red'];
14
13
  const variantOptions = {
15
14
  primary: 'primary',
16
15
  secondary: 'secondary',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "43.4.0",
3
+ "version": "43.7.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -73,15 +73,13 @@
73
73
  },
74
74
  "resolutions": {
75
75
  "chokidar": "^3.5.2",
76
- "node-gyp": "^9.0.0",
77
- "node-sass": "^6.0.0",
78
76
  "sane": "^5.0.1"
79
77
  },
80
78
  "devDependencies": {
81
79
  "@arkweid/lefthook": "0.7.7",
82
80
  "@babel/core": "^7.18.10",
83
81
  "@babel/preset-env": "^7.18.10",
84
- "@gitlab/eslint-plugin": "15.0.0",
82
+ "@gitlab/eslint-plugin": "16.0.0",
85
83
  "@gitlab/stylelint-config": "4.1.0",
86
84
  "@gitlab/svgs": "3.0.0",
87
85
  "@rollup/plugin-commonjs": "^11.1.0",
@@ -106,10 +104,10 @@
106
104
  "bootstrap": "4.5.3",
107
105
  "cypress": "^6.6.0",
108
106
  "emoji-regex": "^10.0.0",
109
- "eslint": "8.21.0",
107
+ "eslint": "8.22.0",
110
108
  "eslint-import-resolver-jest": "3.0.2",
111
109
  "eslint-plugin-cypress": "2.12.1",
112
- "eslint-plugin-storybook": "0.6.3",
110
+ "eslint-plugin-storybook": "0.6.4",
113
111
  "file-loader": "^4.2.0",
114
112
  "glob": "^7.2.0",
115
113
  "identity-obj-proxy": "^3.0.0",
@@ -121,7 +119,6 @@
121
119
  "jest-serializer-vue": "^2.0.2",
122
120
  "markdownlint-cli": "^0.29.0",
123
121
  "mockdate": "^2.0.5",
124
- "node-sass": "^6.0.0",
125
122
  "npm-run-all": "^4.1.5",
126
123
  "pikaday": "^1.8.0",
127
124
  "plop": "^2.5.4",
@@ -138,9 +135,9 @@
138
135
  "rollup-plugin-svg": "^2.0.0",
139
136
  "rollup-plugin-vue": "^5.1.6",
140
137
  "sass": "^1.49.9",
141
- "sass-export": "^1.0.3",
138
+ "sass-export": "^2.1.2",
142
139
  "sass-loader": "^10.2.0",
143
- "sass-true": "^5.0.0",
140
+ "sass-true": "^6.1.0",
144
141
  "start-server-and-test": "^1.10.6",
145
142
  "storybook-dark-mode": "^1.0.8",
146
143
  "stylelint": "14.9.1",
@@ -101,7 +101,6 @@ export const gray700 = '#525252'
101
101
  export const gray800 = '#404040'
102
102
  export const gray900 = '#303030'
103
103
  export const gray950 = '#1f1f1f'
104
- export const glThemes = 'indigo , blue , light-blue , green , red , light-red'
105
104
  export const themeIndigo50 = '#f1f1ff'
106
105
  export const themeIndigo100 = '#dbdbf8'
107
106
  export const themeIndigo200 = '#c7c7f2'
@@ -276,9 +275,9 @@ export const glFontSizeCompactMarkdownH1Xl = '1.4375rem'
276
275
  export const glFontSizeMonospace = '0.8125rem'
277
276
  export const glFontSizeMonospaceLg = '0.9375rem'
278
277
  export const glFontSizeMonospaceSm = '0.6875rem'
279
- export const glMonospaceFont = 'Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace'
280
- export const glRegularFont = '-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'
281
- export const glFonts = '("monospace": "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace, "regular": -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")'
278
+ export const glMonospaceFont = ''
279
+ export const glRegularFont = ''
280
+ export const glFonts = '("monospace": ("Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace), "regular": (-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"))'
282
281
  export const borderColor = '#dbdbdb'
283
282
  export const glBorderSize1 = '1px'
284
283
  export const glBorderSize2 = '2px'
@@ -297,18 +296,21 @@ export const glTransitionDurationMedium = '0.2s'
297
296
  export const outlineOffset = '1px'
298
297
  export const outlineWidth = '2px'
299
298
  export const outline = '3px'
300
- export const focusRing = '0 0 0 1px #fff, 0 0 0 3px #428fdc'
301
- export const focusRingInset = 'inset 0 0 0 3px #fff, inset 0 0 0 1px #fff'
302
- export const focusRingDark = '0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9'
299
+ export const focusRing = ''
300
+ export const focusRingInset = ''
301
+ export const focusRingDark = ''
303
302
  export const focusRingOutline = '2px solid #428fdc'
304
303
  export const toastMaxWidth = '36.625rem'
305
304
  export const toastPaddingRight = '2.625rem'
306
305
  export const toastBackgroundColor = '#303030'
307
306
  export const chartTooltipMaxWidth = '32rem'
308
- export const glIconChevronLeft = '#{'data:image/svg+xml}'
309
- export const glIconChevronRight = '#{'data:image/svg+xml}'
310
- export const glIconChevronDown = '#{'data:image/svg+xml}'
311
- export const glIconSelectChevronDown = 'data'
307
+ export const glIconChevronLeft = ''
308
+ export const glIconChevronRight = ''
309
+ export const glIconChevronDown = ''
310
+ export const glIconSelectChevronDown = ''
311
+ export const glIconCheck = ''
312
+ export const glIconIndeterminate = ''
313
+ export const glIconRadio = ''
312
314
  export const defaultIconSize = '1rem'
313
315
  export const glIconSizes = '8 12 14 16 24 32 48 72'
314
316
  export const glDropdownWidth = '15rem'
@@ -331,8 +333,8 @@ export const info = '#1f75cb'
331
333
  export const warning = '#ab6100'
332
334
  export const danger = '#dd2b0e'
333
335
  export const fontWeightBold = '600'
334
- export const fontFamilySansSerif = '-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'
335
- export const fontFamilyMonospace = 'Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace'
336
+ export const fontFamilySansSerif = '-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'
337
+ export const fontFamilyMonospace = '"Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace'
336
338
  export const h1FontSize = '2.1875rem'
337
339
  export const h2FontSize = '1.75rem'
338
340
  export const h3FontSize = '1.53125rem'
@@ -542,11 +542,6 @@
542
542
  "value": "#1f1f1f",
543
543
  "compiledValue": "#1f1f1f"
544
544
  },
545
- {
546
- "name": "$gl-themes",
547
- "value": "indigo', 'blue', 'light-blue', 'green', 'red', 'light-red",
548
- "compiledValue": "indigo , blue , light-blue , green , red , light-red"
549
- },
550
545
  {
551
546
  "name": "$theme-indigo-50",
552
547
  "value": "#f1f1ff",
@@ -1432,12 +1427,12 @@
1432
1427
  {
1433
1428
  "name": "$gl-monospace-font",
1434
1429
  "value": "'Menlo', 'DejaVu Sans Mono', 'Liberation Mono', 'Consolas', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace",
1435
- "compiledValue": "Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace"
1430
+ "compiledValue": ""
1436
1431
  },
1437
1432
  {
1438
1433
  "name": "$gl-regular-font",
1439
1434
  "value": "-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'",
1440
- "compiledValue": "-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"
1435
+ "compiledValue": ""
1441
1436
  },
1442
1437
  {
1443
1438
  "name": "$gl-fonts",
@@ -1446,15 +1441,15 @@
1446
1441
  {
1447
1442
  "name": "monospace",
1448
1443
  "value": "$gl-monospace-font",
1449
- "compiledValue": "Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace"
1444
+ "compiledValue": "\"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace"
1450
1445
  },
1451
1446
  {
1452
1447
  "name": "regular",
1453
1448
  "value": "$gl-regular-font",
1454
- "compiledValue": "-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"
1449
+ "compiledValue": "-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"
1455
1450
  }
1456
1451
  ],
1457
- "compiledValue": "(\"monospace\": \"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace, \"regular\": -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\")"
1452
+ "compiledValue": "(\"monospace\": (\"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace), \"regular\": (-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\"))"
1458
1453
  },
1459
1454
  {
1460
1455
  "name": "$border-color",
@@ -1549,17 +1544,17 @@
1549
1544
  {
1550
1545
  "name": "$focus-ring",
1551
1546
  "value": "0 0 0 $outline-offset $white, 0 0 0 #{$outline-offset + $outline-width} $blue-400",
1552
- "compiledValue": "0 0 0 1px #fff, 0 0 0 3px #428fdc"
1547
+ "compiledValue": ""
1553
1548
  },
1554
1549
  {
1555
1550
  "name": "$focus-ring-inset",
1556
1551
  "value": "inset 0 0 0 #{$outline-width + $outline-offset} $white, inset 0 0 0 $outline-offset $white",
1557
- "compiledValue": "inset 0 0 0 3px #fff, inset 0 0 0 1px #fff"
1552
+ "compiledValue": ""
1558
1553
  },
1559
1554
  {
1560
1555
  "name": "$focus-ring-dark",
1561
1556
  "value": "0 0 0 $outline-offset rgba($black, 0.6), 0 0 0 #{$outline-offset + $outline-width} $blue-300",
1562
- "compiledValue": "0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9"
1557
+ "compiledValue": ""
1563
1558
  },
1564
1559
  {
1565
1560
  "name": "$focus-ring-outline",
@@ -1596,7 +1591,7 @@
1596
1591
  "compiledValue": "image"
1597
1592
  }
1598
1593
  ],
1599
- "compiledValue": "#{'data:image/svg+xml}"
1594
+ "compiledValue": ""
1600
1595
  },
1601
1596
  {
1602
1597
  "name": "$gl-icon-chevron-right",
@@ -1608,7 +1603,7 @@
1608
1603
  "compiledValue": "image"
1609
1604
  }
1610
1605
  ],
1611
- "compiledValue": "#{'data:image/svg+xml}"
1606
+ "compiledValue": ""
1612
1607
  },
1613
1608
  {
1614
1609
  "name": "$gl-icon-chevron-down",
@@ -1620,7 +1615,7 @@
1620
1615
  "compiledValue": "image"
1621
1616
  }
1622
1617
  ],
1623
- "compiledValue": "#{'data:image/svg+xml}"
1618
+ "compiledValue": ""
1624
1619
  },
1625
1620
  {
1626
1621
  "name": "$gl-icon-select-chevron-down",
@@ -1632,7 +1627,43 @@
1632
1627
  "compiledValue": "image"
1633
1628
  }
1634
1629
  ],
1635
- "compiledValue": "data"
1630
+ "compiledValue": ""
1631
+ },
1632
+ {
1633
+ "name": "$gl-icon-check",
1634
+ "value": "data:image/svg+xml,%3Csvg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M1 3.05299L2.99123 5L7 1\" stroke=\"white\" stroke-width=\"2\"/%3E%3C/svg%3E%0A",
1635
+ "mapValue": [
1636
+ {
1637
+ "name": "data",
1638
+ "value": "image",
1639
+ "compiledValue": "image"
1640
+ }
1641
+ ],
1642
+ "compiledValue": ""
1643
+ },
1644
+ {
1645
+ "name": "$gl-icon-indeterminate",
1646
+ "value": "data:image/svg+xml,%3Csvg width=\"8\" height=\"2\" viewBox=\"0 0 8 2\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M0 1L8 1\" stroke=\"white\" stroke-width=\"2\"/%3E%3C/svg%3E%0A",
1647
+ "mapValue": [
1648
+ {
1649
+ "name": "data",
1650
+ "value": "image",
1651
+ "compiledValue": "image"
1652
+ }
1653
+ ],
1654
+ "compiledValue": ""
1655
+ },
1656
+ {
1657
+ "name": "$gl-icon-radio",
1658
+ "value": "data:image/svg+xml,%3Csvg width=\"6\" height=\"6\" viewBox=\"0 0 6 6\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Ccircle cx=\"3\" cy=\"3\" r=\"3\" fill=\"white\"/%3E%3C/svg%3E%0A",
1659
+ "mapValue": [
1660
+ {
1661
+ "name": "data",
1662
+ "value": "image",
1663
+ "compiledValue": "image"
1664
+ }
1665
+ ],
1666
+ "compiledValue": ""
1636
1667
  },
1637
1668
  {
1638
1669
  "name": "$default-icon-size",
@@ -1747,12 +1778,12 @@
1747
1778
  {
1748
1779
  "name": "$font-family-sans-serif",
1749
1780
  "value": "$gl-regular-font",
1750
- "compiledValue": "-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"
1781
+ "compiledValue": "-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"
1751
1782
  },
1752
1783
  {
1753
1784
  "name": "$font-family-monospace",
1754
1785
  "value": "$gl-monospace-font",
1755
- "compiledValue": "Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace"
1786
+ "compiledValue": "\"Menlo\", \"DejaVu Sans Mono\", \"Liberation Mono\", \"Consolas\", \"Ubuntu Mono\", \"Courier New\", \"andale mono\", \"lucida console\", monospace"
1756
1787
  },
1757
1788
  {
1758
1789
  "name": "$h1-font-size",
@@ -1792,6 +1823,53 @@
1792
1823
  {
1793
1824
  "name": "$spacers",
1794
1825
  "value": "( 1: $gl-spacing-scale-2, 2: $gl-spacing-scale-3, 3: $gl-spacing-scale-5, 4: $gl-spacing-scale-6, 5: $gl-spacing-scale-7, 6: $gl-spacing-scale-8, 7: $gl-spacing-scale-9, 8: $gl-spacing-scale-10, 9: $gl-spacing-scale-11, )",
1826
+ "mapValue": [
1827
+ {
1828
+ "name": "1",
1829
+ "value": "$gl-spacing-scale-2",
1830
+ "compiledValue": "0.25rem"
1831
+ },
1832
+ {
1833
+ "name": "2",
1834
+ "value": "$gl-spacing-scale-3",
1835
+ "compiledValue": "0.5rem"
1836
+ },
1837
+ {
1838
+ "name": "3",
1839
+ "value": "$gl-spacing-scale-5",
1840
+ "compiledValue": "1rem"
1841
+ },
1842
+ {
1843
+ "name": "4",
1844
+ "value": "$gl-spacing-scale-6",
1845
+ "compiledValue": "1.5rem"
1846
+ },
1847
+ {
1848
+ "name": "5",
1849
+ "value": "$gl-spacing-scale-7",
1850
+ "compiledValue": "2rem"
1851
+ },
1852
+ {
1853
+ "name": "6",
1854
+ "value": "$gl-spacing-scale-8",
1855
+ "compiledValue": "2.5rem"
1856
+ },
1857
+ {
1858
+ "name": "7",
1859
+ "value": "$gl-spacing-scale-9",
1860
+ "compiledValue": "3rem"
1861
+ },
1862
+ {
1863
+ "name": "8",
1864
+ "value": "$gl-spacing-scale-10",
1865
+ "compiledValue": "3.5rem"
1866
+ },
1867
+ {
1868
+ "name": "9",
1869
+ "value": "$gl-spacing-scale-11",
1870
+ "compiledValue": "4rem"
1871
+ }
1872
+ ],
1795
1873
  "compiledValue": "(1: 0.25rem, 2: 0.5rem, 3: 1rem, 4: 1.5rem, 5: 2rem, 6: 2.5rem, 7: 3rem, 8: 3.5rem, 9: 4rem)"
1796
1874
  },
1797
1875
  {
@@ -54,15 +54,15 @@ describe('GlAccordionItem', () => {
54
54
  it('renders the appropriate header element', () => {
55
55
  createComponent({}, { defaultHeaderLevel: 3 });
56
56
 
57
- expect(wrapper.find('h3.gl-accordion-item-header').exists()).toBeTruthy();
58
- expect(wrapper.find('h4.gl-accordion-item-header').exists()).toBeFalsy();
57
+ expect(wrapper.find('h3.gl-accordion-item-header').exists()).toBe(true);
58
+ expect(wrapper.find('h4.gl-accordion-item-header').exists()).toBe(false);
59
59
  });
60
60
 
61
61
  it('renders the appropriate header element when overridden', () => {
62
62
  createComponent({ headerLevel: 4 }, { defaultHeaderLevel: 3 });
63
63
 
64
- expect(wrapper.find('h3.gl-accordion-item-header').exists()).toBeFalsy();
65
- expect(wrapper.find('h4.gl-accordion-item-header').exists()).toBeTruthy();
64
+ expect(wrapper.find('h3.gl-accordion-item-header').exists()).toBe(false);
65
+ expect(wrapper.find('h4.gl-accordion-item-header').exists()).toBe(true);
66
66
  });
67
67
 
68
68
  it.each(['custom-header-class', ['custom-header-class'], { 'custom-header-class': true }])(
@@ -463,7 +463,7 @@
463
463
  &[disabled]:active,
464
464
  &[disabled].selected {
465
465
  @include gl-bg-gray-10;
466
- @include gl-text-gray-400;
466
+ @include gl-text-gray-500;
467
467
  @include gl-inset-border-1-gray-100;
468
468
  @include gl-opacity-10;
469
469
  cursor: not-allowed !important;
@@ -79,6 +79,29 @@
79
79
  }
80
80
  }
81
81
 
82
+ .custom-control-input[type='checkbox']:checked ~ .custom-control-label,
83
+ .custom-control-input[type='checkbox']:indeterminate ~ .custom-control-label,
84
+ .custom-control-input[type='radio']:checked ~ .custom-control-label {
85
+ &::after {
86
+ @include gl-bg-none;
87
+ @include gl-bg-white;
88
+ mask-repeat: no-repeat;
89
+ mask-position: center center;
90
+ }
91
+ }
92
+
93
+ .custom-control-input[type='checkbox']:checked ~ .custom-control-label::after {
94
+ mask-image: url($gl-icon-check);
95
+ }
96
+
97
+ .custom-control-input[type='checkbox']:indeterminate ~ .custom-control-label::after {
98
+ mask-image: url($gl-icon-indeterminate);
99
+ }
100
+
101
+ .custom-control-input[type='radio']:checked ~ .custom-control-label::after {
102
+ mask-image: url($gl-icon-radio);
103
+ }
104
+
82
105
  .custom-control-input:not(:disabled):checked ~ .custom-control-label:hover,
83
106
  .custom-control-input:not(:disabled):focus:checked ~ .custom-control-label {
84
107
  &::before {
@@ -88,19 +111,15 @@
88
111
  }
89
112
 
90
113
  &.custom-checkbox {
91
- .custom-control-input:indeterminate ~ .custom-control-label {
92
- &::before {
93
- @include gl-bg-blue-500;
94
- @include gl-border-blue-500;
95
- }
114
+ .custom-control-input:indeterminate ~ .custom-control-label::before {
115
+ @include gl-bg-blue-500;
116
+ @include gl-border-blue-500;
96
117
  }
97
118
 
98
- .custom-control-input:not(:disabled):indeterminate ~ .custom-control-label:hover,
99
- .custom-control-input:not(:disabled):focus:indeterminate ~ .custom-control-label {
100
- &::before {
101
- @include gl-bg-blue-700;
102
- @include gl-border-blue-700;
103
- }
119
+ .custom-control-input:not(:disabled):indeterminate ~ .custom-control-label:hover::before,
120
+ .custom-control-input:not(:disabled):focus:indeterminate ~ .custom-control-label::before {
121
+ @include gl-bg-blue-700;
122
+ @include gl-border-blue-700;
104
123
  }
105
124
  }
106
125
 
@@ -108,10 +127,23 @@
108
127
  @include gl-cursor-not-allowed;
109
128
 
110
129
  &::before {
111
- @include gl-opacity-5;
130
+ @include gl-bg-gray-50;
131
+ @include gl-border-gray-100;
112
132
  @include gl-pointer-events-auto;
113
133
  }
114
134
  }
135
+
136
+ .custom-control-input:checked:disabled ~ .custom-control-label,
137
+ .custom-control-input:indeterminate:disabled ~ .custom-control-label {
138
+ &::before {
139
+ @include gl-bg-gray-100;
140
+ @include gl-border-gray-100;
141
+ }
142
+
143
+ &::after {
144
+ @include gl-bg-gray-500;
145
+ }
146
+ }
115
147
  }
116
148
 
117
149
  .help-text {
@@ -21,7 +21,7 @@
21
21
 
22
22
  &:disabled {
23
23
  @include gl-cursor-not-allowed;
24
- @include gl-text-gray-400;
24
+ @include gl-text-gray-500;
25
25
  }
26
26
 
27
27
  &:not(.form-control-plaintext):focus {
@@ -32,7 +32,7 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
32
32
  &:disabled {
33
33
  @include gl-bg-gray-10;
34
34
  @include gl-inset-border-1-gray-100;
35
- @include gl-text-gray-400;
35
+ @include gl-text-gray-500;
36
36
  @include gl-cursor-not-allowed;
37
37
  }
38
38
 
@@ -27,6 +27,7 @@ const generateTemplate = ({ props = {}, slots = {} } = {}) => {
27
27
  :action-cancel="{text: 'Cancel'}"
28
28
  :visible="$options.viewMode !== 'docs'"
29
29
  :scrollable="scrollable"
30
+ :no-focus-on-show="noFocusOnShow"
30
31
  modal-id="test-modal-id"
31
32
  title="Example title"
32
33
  no-fade
@@ -54,6 +55,7 @@ const generateProps = ({
54
55
  variant = variantOptionsWithNoDefault.default,
55
56
  contentPagraphs = 1,
56
57
  scrollable = false,
58
+ noFocusOnShow = false,
57
59
  } = {}) => ({
58
60
  headerBgVariant: variant,
59
61
  headerBorderVariant: variant,
@@ -65,6 +67,7 @@ const generateProps = ({
65
67
  footerTextVariant: variant,
66
68
  contentParagraphs: contentPagraphs,
67
69
  scrollable,
70
+ noFocusOnShow,
68
71
  });
69
72
 
70
73
  export const Default = Template.bind({});
@@ -100,6 +103,11 @@ export const WithoutAFooter = (args, { argTypes, viewMode }) => ({
100
103
  });
101
104
  WithoutAFooter.args = generateProps();
102
105
 
106
+ export const WithoutFocus = Template.bind({});
107
+ WithoutFocus.args = generateProps({
108
+ noFocusOnShow: true,
109
+ });
110
+
103
111
  export default {
104
112
  title: 'base/modal',
105
113
  component: GlModal,
@@ -85,6 +85,11 @@ export default {
85
85
  required: false,
86
86
  default: '',
87
87
  },
88
+ noFocusOnShow: {
89
+ type: Boolean,
90
+ required: false,
91
+ default: false,
92
+ },
88
93
  },
89
94
  computed: {
90
95
  shouldRenderModalOk() {
@@ -151,6 +156,8 @@ export default {
151
156
  return prop.attributes;
152
157
  },
153
158
  setFocus() {
159
+ if (this.noFocusOnShow) return;
160
+
154
161
  const btnElts = [...this.$refs.modal.$refs.modal.querySelectorAll('button')];
155
162
  const modalElts = [
156
163
  ...this.$refs.modal.$refs.body.querySelectorAll(focusableTags.join(COMMA)),
@@ -171,10 +178,10 @@ export default {
171
178
  </script>
172
179
 
173
180
  <template>
174
- <!--
181
+ <!--
175
182
  Emitted when the modal visibility changes
176
183
  @event change
177
- -->
184
+ -->
178
185
  <b-modal
179
186
  :id="modalId"
180
187
  ref="modal"
@@ -217,7 +224,7 @@ export default {
217
224
  <!--
218
225
  Emitted when clicked on modal-action-cancel
219
226
  @event canceled
220
- -->
227
+ -->
221
228
  <gl-button
222
229
  v-if="actionCancel"
223
230
  class="js-modal-action-cancel"
@@ -229,7 +236,7 @@ export default {
229
236
  <!--
230
237
  Emitted when clicked on modal-action-secondary
231
238
  @event secondary
232
- -->
239
+ -->
233
240
  <gl-button
234
241
  v-if="actionSecondary"
235
242
  class="js-modal-action-secondary"
@@ -241,7 +248,7 @@ export default {
241
248
  <!--
242
249
  Emitted when clicked on modal-action-primary
243
250
  @event primary
244
- -->
251
+ -->
245
252
  <gl-button
246
253
  v-if="actionPrimary"
247
254
  class="js-modal-action-primary"
@@ -10,7 +10,7 @@
10
10
  }
11
11
  @include expect {
12
12
  // prettier-ignore
13
- font-size: clamp(2rem, calc(#{-0.66667rem} + #{5.55556vw}), 3.5rem);
13
+ font-size: clamp(2rem, #{calc(#{-0.6666666667rem} + #{5.5555555556vw})}, 3.5rem);
14
14
  }
15
15
  }
16
16
  }
@@ -24,7 +24,7 @@
24
24
  }
25
25
  @include expect {
26
26
  // prettier-ignore
27
- line-height: clamp(2rem, calc(#{-0.66667rem} + #{5.55556vw}), 3.5rem);
27
+ line-height: clamp(2rem, #{calc(#{-0.6666666667rem} + #{5.5555555556vw})}, 3.5rem);
28
28
  }
29
29
  }
30
30
  }
@@ -1,3 +1,11 @@
1
+ /**
2
+ * @jest-environment node
3
+ *
4
+ * sassTrue.runSass cannot find the file when testEnvironment is set to `test`
5
+ * only with dart-sass.
6
+ * See https://github.com/oddbird/true/issues/156
7
+ */
8
+
1
9
  const fs = require('fs');
2
10
  const path = require('path');
3
11
  const sassTrue = require('sass-true');
@@ -3136,6 +3136,18 @@
3136
3136
  }
3137
3137
  }
3138
3138
 
3139
+ .gl-sm-align-items-flex-start {
3140
+ @include gl-media-breakpoint-up(sm) {
3141
+ align-items: flex-start;
3142
+ }
3143
+ }
3144
+
3145
+ .gl-sm-align-items-flex-start\! {
3146
+ @include gl-media-breakpoint-up(sm) {
3147
+ align-items: flex-start !important;
3148
+ }
3149
+ }
3150
+
3139
3151
  .gl-sm-align-items-flex-end {
3140
3152
  @include gl-media-breakpoint-up(sm) {
3141
3153
  align-items: flex-end;
@@ -45,6 +45,12 @@
45
45
  }
46
46
  }
47
47
 
48
+ @mixin gl-sm-align-items-flex-start {
49
+ @include gl-media-breakpoint-up(sm) {
50
+ @include gl-align-items-flex-start;
51
+ }
52
+ }
53
+
48
54
  @mixin gl-sm-align-items-flex-end {
49
55
  @include gl-media-breakpoint-up(sm) {
50
56
  @include gl-align-items-flex-end;
@@ -149,10 +149,6 @@ $gray-800: #404040 !default;
149
149
  $gray-900: #303030 !default;
150
150
  $gray-950: #1f1f1f !default;
151
151
 
152
- // GitLab themes
153
-
154
- $gl-themes: 'indigo', 'blue', 'light-blue', 'green', 'red', 'light-red';
155
-
156
152
  // The indigo light and indigo dark use $theme-indigo variables.
157
153
  $theme-indigo-50: #f1f1ff !default;
158
154
  $theme-indigo-100: #dbdbf8 !default;
@@ -442,6 +438,9 @@ $gl-icon-chevron-left: 'data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="
442
438
  $gl-icon-chevron-right: 'data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path fill-rule="evenodd" d="M10.707 7.293a1 1 0 0 1 0 1.414l-3 3a1 1 0 0 1-1.414-1.414L8.586 8 6.293 5.707a1 1 0 0 1 1.414-1.414l3 3z"/></svg>';
443
439
  $gl-icon-chevron-down: 'data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path fill-rule="evenodd" d="M7.293 10.707a1 1 0 0 0 1.414 0l3-3a1 1 0 0 0-1.414-1.414L8 8.586 5.707 6.293a1 1 0 0 0-1.414 1.414l3 3z"/></svg>';
444
440
  $gl-icon-select-chevron-down: 'data:image/svg+xml,%3Csvg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M0.21967 0.21967C0.512563 -0.0732232 0.987437 -0.0732232 1.28033 0.21967L4 2.93934L6.71967 0.21967C7.01256 -0.073223 7.48744 -0.0732229 7.78033 0.21967C8.07322 0.512563 8.07322 0.987437 7.78033 1.28033L4.53033 4.53033C4.23744 4.82322 3.76256 4.82322 3.46967 4.53033L0.21967 1.28033C-0.0732233 0.987437 -0.0732233 0.512563 0.21967 0.21967Z" fill="%23666666"/%3E%3C/svg%3E%0A';
441
+ $gl-icon-check: 'data:image/svg+xml,%3Csvg width="8" height="7" viewBox="0 0 8 7" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M1 3.05299L2.99123 5L7 1" stroke="white" stroke-width="2"/%3E%3C/svg%3E%0A';
442
+ $gl-icon-indeterminate: 'data:image/svg+xml,%3Csvg width="8" height="2" viewBox="0 0 8 2" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 1L8 1" stroke="white" stroke-width="2"/%3E%3C/svg%3E%0A';
443
+ $gl-icon-radio: 'data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="3" cy="3" r="3" fill="white"/%3E%3C/svg%3E%0A';
445
444
 
446
445
  // Icons
447
446
  $default-icon-size: px-to-rem(16px);