@digigov/css 0.29.7 → 0.29.8

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 (45) hide show
  1. package/color-vars.plugin.js +2 -1
  2. package/colors/color-values.dark.js +68 -0
  3. package/colors/color-values.light.js +69 -0
  4. package/colors/index.js +16 -9
  5. package/dist/base/index.css +3 -3
  6. package/dist/base.css +3 -3
  7. package/dist/base.js +1 -1
  8. package/dist/components.css +1 -1
  9. package/dist/components.js +1 -1
  10. package/dist/digigov.css +3 -3
  11. package/package.json +1 -1
  12. package/src/base/index.css +1 -1
  13. package/src/components/accordion.css +1 -1
  14. package/src/components/admin-footer.css +1 -1
  15. package/src/components/admin-form.css +1 -1
  16. package/src/components/admin-header.css +1 -1
  17. package/src/components/admin-layout.css +4 -3
  18. package/src/components/breadcrumbs.css +10 -0
  19. package/src/components/button.css +17 -6
  20. package/src/components/card.css +9 -3
  21. package/src/components/checkboxes.css +3 -0
  22. package/src/components/cookie.css +1 -1
  23. package/src/components/drawer.css +1 -1
  24. package/src/components/dropdown.css +1 -1
  25. package/src/components/fillable.css +2 -2
  26. package/src/components/filter.css +3 -3
  27. package/src/components/footer.css +7 -6
  28. package/src/components/form.css +18 -2
  29. package/src/components/header.css +7 -6
  30. package/src/components/layout.css +10 -4
  31. package/src/components/loader.css +10 -6
  32. package/src/components/misc.css +3 -1
  33. package/src/components/modal.css +1 -1
  34. package/src/components/notification-banner.css +6 -3
  35. package/src/components/panel.css +1 -1
  36. package/src/components/phase-banner.css +5 -3
  37. package/src/components/summary-list.css +42 -22
  38. package/src/components/svg-icons.css +9 -2
  39. package/src/components/table.css +52 -54
  40. package/src/components/tabs.css +3 -1
  41. package/src/components/task-list.css +3 -3
  42. package/src/components/timeline.css +2 -2
  43. package/src/components/typography.css +19 -3
  44. package/tailwind.config.js +54 -44
  45. package/colors/color-values.js +0 -66
@@ -2,6 +2,21 @@
2
2
  .example {
3
3
  @apply px-5 py-5;
4
4
  }
5
+ .govgr-table__caption {
6
+ @apply table-caption text-left font-bold;
7
+ }
8
+ .govgr-table__caption--s {
9
+ @apply md:text-2xl text-lg font-bold mx-0 md:mb-6 mb-4 antialiased;
10
+ }
11
+ .govgr-table__caption--m {
12
+ @apply md:text-3xl text-xl font-bold mx-0 md:mb-8 mb-6 antialiased;
13
+ }
14
+ .govgr-table__caption--l {
15
+ @apply md:text-4xl text-2xl font-bold mx-0 lg:mb-9 mb-7 antialiased;
16
+ }
17
+ .govgr-table__caption--xl {
18
+ @apply md:text-5xl md:leading-tight text-3xl leading-tight font-bold mx-0 lg:mb-10 mb-8 max-w-2xl antialiased;
19
+ }
5
20
  .govgr-table-container {
6
21
  @apply w-full overflow-x-auto md:mb-10 mb-6;
7
22
  .govgr-table {
@@ -9,22 +24,36 @@
9
24
  }
10
25
  }
11
26
  .govgr-table-container--border {
12
- @apply border border-gray50 p-2;
27
+ @apply border border-gray100 p-2;
13
28
  }
14
29
  .govgr-table {
15
30
  @apply w-full border-collapse table;
16
- @apply md:mb-10 mb-6 text-base-content md:text-lg text-base font-normal;
17
- -webkit-font-smoothing: antialiased;
18
- -moz-osx-font-smoothing: grayscale;
31
+ @apply md:mb-10 mb-6 text-base-content md:text-lg text-base font-normal antialiased;
19
32
  border-spacing: 0;
20
33
  }
21
34
  .govgr-table--with-vertical-lines {
22
- .govgr-table__cell {
23
- @apply border-l border-r border-solid border-gray50 !important;
35
+ .govgr-table__cell, .govgr-table__header {
36
+ @apply border-l border-r border-solid border-gray100 px-4;
24
37
  }
38
+ .govgr-table__head {
39
+ @apply border-t border-gray100 ;
40
+ }
25
41
  }
26
42
  .govgr-table__body {
27
- @apply relative;
43
+ @apply relative z-/1;
44
+ }
45
+
46
+ @supports (-moz-appearance:none) {
47
+ @media print {
48
+ .govgr-table {
49
+ border-collapse: unset;
50
+ }
51
+ .govgr-table--with-vertical-lines {
52
+ .govgr-table__header {
53
+ @apply border-t;
54
+ }
55
+ }
56
+ }
28
57
  }
29
58
  .govgr-table__row {
30
59
  @apply bg-white;
@@ -37,75 +66,44 @@
37
66
  @apply mb-0;
38
67
  }
39
68
  }
40
- .govgr-table--with-vertical-lines.govgr-table--light {
41
- th, td {
42
- @apply px-4 !important;
43
- }
44
- }
45
69
  .govgr-table--dark, .govgr-table--zebra {
46
- th, td {
70
+ .govgr-table__header, .govgr-table__cell {
47
71
  @apply px-4 !important;
48
72
  }
49
73
  }
50
- .govgr-table--with-vertical-lines.govgr-table--light .govgr-table__body .govgr-table__header {
51
- @apply border-l border-solid border-gray50 !important;
52
- }
53
- .govgr-table--with-vertical-lines.govgr-table--dense.govgr-table--dark {
54
- .govgr-table__head .govgr-table__row .govgr-table__header:first-child {
55
- @apply border-b-0 border-l border-solid border-primary !important;
56
- }
74
+ .govgr-table--with-vertical-lines.govgr-table--light {
75
+ .govgr-table__body .govgr-table__header {
76
+ @apply border-l border-solid border-gray100 !important;
77
+ }
57
78
  }
58
79
  .govgr-table--with-vertical-lines.govgr-table--dark{
59
- .govgr-table__head .govgr-table__row .govgr-table__header:last-child {
60
- @apply border-b-0 border-r border-solid border-primary !important;
61
- }
80
+ .govgr-table__header {
81
+ @apply border-0;
82
+ @apply print:border;
83
+ }
62
84
  }
63
85
  .govgr-table--dark {
64
- th {
65
- @apply border-none bg-primary text-white;
66
- }
67
- .govgr-table__head .govgr-table__row .govgr-table__header {
68
- @apply py-3 !important;
69
- }
70
- .govgr-table__body .govgr-table__row .govgr-table__header {
71
- @apply border-r border-solid border-gray50 !important;
86
+ .govgr-table__header {
87
+ @apply border-0 bg-primary text-white;
88
+ @apply print:border-b print:bg-white print:text-base-content;
72
89
  }
73
90
  }
74
91
  .govgr-table--zebra {
75
92
  .govgr-table__body {
76
93
  .govgr-table__row:nth-child(even) {
77
- @apply bg-base100;
94
+ @apply bg-base100 print:bg-white;
78
95
  }
79
96
  }
80
97
  }
81
98
  .govgr-table--dense {
82
99
  &.govgr-table {
83
- tr, th, td {
100
+ .govgr-table__row, .govgr-table__header, .govgr-table__cell {
84
101
  @apply text-sm py-2;
85
102
  }
86
103
  }
87
104
  }
88
- .govgr-table__caption {
89
- @apply table-caption text-left font-bold;
90
- }
91
- .govgr-table__caption--s {
92
- @apply md:text-2xl text-lg font-bold mx-0 md:mb-6 mb-4;
93
- -webkit-font-smoothing: antialiased;
94
- }
95
- .govgr-table__caption--m {
96
- @apply md:text-3xl text-xl font-bold mx-0 md:mb-8 mb-6;
97
- -webkit-font-smoothing: antialiased;
98
- }
99
- .govgr-table__caption--l {
100
- @apply md:text-4xl text-2xl font-bold mx-0 lg:mb-9 mb-7;
101
- -webkit-font-smoothing: antialiased;
102
- }
103
- .govgr-table__caption--xl {
104
- @apply md:text-5xl md:leading-tight text-3xl leading-tight font-bold mx-0 lg:mb-10 mb-8 max-w-2xl;
105
- -webkit-font-smoothing: antialiased;
106
- }
107
105
  .govgr-table__header, .govgr-table__cell {
108
- @apply pr-5 py-2.5 pl-0 border-b border-solid border-gray50 text-left align-middle;
106
+ @apply pr-5 py-2.5 pl-0 border-b border-solid border-gray100 text-left align-middle;
109
107
  &:last-child {
110
108
  @apply pr-0;
111
109
  }
@@ -123,7 +121,7 @@
123
121
  }
124
122
  .govgr-table__loading{
125
123
  @apply h-full w-full absolute right-0 left-0 flex items-center justify-center
126
- bg-white bg-opacity-50;
124
+ bg-white bg-opacity-50 print:hidden;
127
125
  }
128
126
 
129
127
  @supports ((-webkit-backdrop-filter: blur(0.6px)) or (backdrop-filter: blur(0.6px))) {
@@ -13,6 +13,7 @@
13
13
  .govgr-tabs__list-item {
14
14
  @apply relative px-4 py-2 m-0 shadow-none cursor-pointer;
15
15
  @apply md:float-left md:border md:border-base100 md:bg-base100 md:rounded-t-sm md:mr-2 ;
16
+ @apply print:hidden;
16
17
  &.govgr-tabs__list-item-selected {
17
18
  @apply no-underline md:border-gray200 md:border bg-white md:border-b-0 md:px-5 md:pb-4 md:-mt-1 md:pt-4;
18
19
  margin-bottom: -1px;
@@ -44,7 +45,8 @@
44
45
  }
45
46
  }
46
47
  .govgr-tabs__panel {
47
- @apply bg-white md:hidden block md:px-4 py-4 pt-8 md:border md:border-base150 mb-0;
48
+ @apply bg-white md:hidden block md:px-4 py-4 pt-8 md:border md:border-base150 mb-0
49
+ print:block print:border-0 print:py-3;
48
50
  &.govgr-tabs__panel-visible {
49
51
  @apply block;
50
52
  }
@@ -34,11 +34,11 @@
34
34
  @apply px-2 py-1 mr-2 inline-block font-sans text-sm uppercase tracking-widest;
35
35
  }
36
36
  .govgr-tag__primary {
37
- @apply bg-secondary600 text-white;
37
+ @apply bg-secondary600 text-white print:border-2 print:bg-white print:border-secondary800 print:text-secondary800 print:mr-4;
38
38
  }
39
39
  .govgr-tag__secondary {
40
- @apply bg-secondary50 text-primary;
40
+ @apply bg-secondary50 text-primary print:border-2 print:bg-white print:border-secondary600 print:text-secondary600 print:mr-4;
41
41
  }
42
42
  .govgr-tag__gray {
43
- @apply bg-base100;
43
+ @apply bg-base100 print:border-2 print:bg-white print:border-base300 print:text-base300 print:mr-4;
44
44
  }
@@ -13,8 +13,8 @@
13
13
  @apply md:text-3xl text-2xl font-bold mx-0 md:mb-4 mb-2 relative;
14
14
  &::before {
15
15
  content: "";
16
- @apply block absolute top-4 -left-6
17
- w-4 h-1 bg-secondary;
16
+ @apply block absolute top-4 -left-6 w-4
17
+ border-b-4 border-secondary;
18
18
  }
19
19
  }
20
20
  .govgr-timeline__heading-m {
@@ -93,7 +93,7 @@
93
93
  }
94
94
  .govgr-background-dark, .govgr-masthead {
95
95
  .govgr-hint {
96
- @apply opacity-70 text-white;
96
+ @apply opacity-70 text-white print:text-base-content;
97
97
  }
98
98
  }
99
99
  .govgr-\!-font-weight-regular {
@@ -116,10 +116,10 @@
116
116
  }
117
117
  .govgr-header {
118
118
  .govgr-header__container > .govgr-link {
119
- @apply text-gray100 focus:text-link-active print:text-base-content;
119
+ @apply text-gray50 focus:text-link-active print:text-base-content;
120
120
  }
121
121
  .govgr-header__content > .govgr-link {
122
- @apply text-gray100 focus:text-link-active print:text-base-content;
122
+ @apply text-gray50 focus:text-link-active print:text-base-content;
123
123
  }
124
124
  }
125
125
  .govgr-link--no-underline {
@@ -161,3 +161,19 @@
161
161
  @apply text-white print:text-base-content;
162
162
  }
163
163
  }
164
+
165
+ @media print {
166
+ .govgr-body .govgr-link[href^="#"]:after {
167
+ display: none;
168
+ }
169
+ .govgr-link[href^="http://"]:after, .govgr-link[href^="https://"]:after {
170
+ content: " (" attr(href) ")";
171
+ font-size: 80%;
172
+ }
173
+ .govgr-body .govgr-link {
174
+ word-wrap: break-word;
175
+ }
176
+ .govgr-link {
177
+ @apply text-base-content;
178
+ }
179
+ }
@@ -1,84 +1,94 @@
1
- const plugin = require('tailwindcss/plugin')
2
- const defaultTheme = require('tailwindcss/defaultTheme')
3
- const colors = require('./colors');
4
- const colorVarsPlugin = require('./color-vars.plugin')
1
+ const plugin = require("tailwindcss/plugin");
2
+ const defaultTheme = require("tailwindcss/defaultTheme");
3
+ const colors = require("./colors");
4
+ const colorVarsPlugin = require("./color-vars.plugin");
5
5
 
6
- const buildOnly = !process.env['DIGIGOV_CSS_BUILD'] ? {
7
- mode: 'jit',
8
- } : {}
6
+ const buildOnly = !process.env["DIGIGOV_CSS_BUILD"]
7
+ ? {
8
+ mode: "jit",
9
+ }
10
+ : {};
11
+ const colorVariables = Object.keys(colors.light).reduce((allColors, color) => {
12
+ allColors[color] = `var(--color-${color})`;
13
+ return allColors;
14
+ }, {});
9
15
  module.exports = {
10
16
  ...buildOnly,
17
+ darkMode: 'class',
11
18
  theme: {
12
- colors,
19
+ colors: colors.light,
20
+ themes: colors,
13
21
  container: {
14
22
  center: true,
15
23
  },
16
24
  fontSize: {
17
25
  ...defaultTheme.fontSize,
18
- 'lg': '1.1875rem',
26
+ lg: "1.1875rem",
19
27
  },
20
28
  screens: {
21
- xs: '0px',
22
- sm: '640px',
23
- md: '768px',
24
- lg: '1024px',
25
- xl: '1280px',
26
- '2xl': '1280px',
27
- 'print': {'raw': 'print'},
29
+ xs: "0px",
30
+ sm: "640px",
31
+ md: "768px",
32
+ lg: "1024px",
33
+ xl: "1280px",
34
+ "2xl": "1280px",
35
+ print: { raw: "print" },
28
36
  },
29
37
  fontFamily: {
30
- sans: ['Roboto', ...defaultTheme.fontFamily.sans]
38
+ sans: ["Roboto", ...defaultTheme.fontFamily.sans],
31
39
  },
40
+ borderColor: colorVariables,
41
+ backgroundColor: colorVariables,
42
+ textColor: colorVariables,
32
43
  extend: {
33
44
  height: {
34
- 'fit': 'fit-content',
45
+ fit: "fit-content",
35
46
  },
36
47
  width: {
37
- 'fit': 'fit-content',
48
+ fit: "fit-content",
38
49
  },
39
50
  minWidth: {
40
- '10': '2.5rem',
41
- '52': '13rem',
51
+ 10: "2.5rem",
52
+ 32: "8rem",
53
+ 52: "13rem",
42
54
  },
43
55
  minHeight: {
44
- '4': '1rem',
45
- '6': '1.5rem',
46
- '8': '2rem',
47
- '10': '2.5rem',
48
- '12': '3rem',
49
- '14': '3.5rem',
56
+ 4: "1rem",
57
+ 6: "1.5rem",
58
+ 8: "2rem",
59
+ 10: "2.5rem",
60
+ 12: "3rem",
61
+ 14: "3.5rem",
50
62
  },
51
63
  borderWidth: {
52
- '3': '3px',
53
- '5': '5px',
54
- '6': '6px',
64
+ 3: "3px",
65
+ 5: "5px",
66
+ 6: "6px",
55
67
  },
56
68
  flexGrow: {
57
- '2': '2',
69
+ 2: "2",
58
70
  },
59
71
  zIndex: {
60
- '/1': -1,
61
- '1': 1,
72
+ "/1": -1,
73
+ 1: 1,
62
74
  },
63
75
  opacity: {
64
- '85': '0.85',
76
+ 85: "0.85",
65
77
  },
66
78
  margin: {
67
- '15': '3.75rem',
79
+ 15: "3.75rem",
68
80
  },
69
81
  boxShadow: {
70
- 'thick': '0 0 30px rgba(0, 0, 0, 0.6)',
71
- }
82
+ thick: "0 0 30px rgba(0, 0, 0, 0.6)",
83
+ },
72
84
  },
73
85
  },
74
86
  variants: {
75
87
  extend: {
76
- textDecoration: ['active'],
77
- backgroundColor: ['active'],
78
- borderColor: ['active']
79
- }
88
+ textDecoration: ["active"],
89
+ backgroundColor: ["active"],
90
+ borderColor: ["active"],
91
+ },
80
92
  },
81
- plugins: [
82
- plugin(colorVarsPlugin)
83
- ],
93
+ plugins: [plugin(colorVarsPlugin)],
84
94
  };
@@ -1,66 +0,0 @@
1
- module.exports = {
2
-
3
- "primary": "#003375",
4
- "primary-focus": "#004594",
5
- "primary200": "#002152",
6
-
7
- "secondary50": "#4dd5ff",
8
- "secondary200": "#00b0f0",
9
- "secondary": "#00b0f0",
10
- "secondary-focus": "#0081d6",
11
- "secondary400": "#0081d6",
12
- "secondary600": "#0065b3",
13
- "secondary800": "#004594",
14
-
15
- "content-dark": "#fff",
16
- "content": "#212930",
17
- "content-secondary":"#56565d",
18
-
19
- "accent": "#212930", /* Accent sets the color for user-interface controls generated by some elements (checkbox, radio, range input, progress tag).*/
20
- "accent-focus": "#2aa79b",
21
- "accent-content": "#fff",
22
- "neutral": "#43454c",
23
- "neutral-focus": "#31363f",
24
- "neutral-content": "#fff",
25
-
26
- "base100": "#ebebeb",
27
- "base150": "#b3b2b3",
28
- "base200": "#99989a",
29
- "base300": "#56565d",
30
- "base300-content": "#fff",
31
- "base-content": "#212930",
32
- "base-content-secondary": "#56565d",
33
- "base-content-invert": "#fff",
34
-
35
- "info": "#00b0f0",
36
- "success": "#006636",
37
- "success-hover": "#004D29",
38
- "warning": "#f90",
39
- "error": "#B60202",
40
- "error-hover": "#880202",
41
- "focus": "#fd0",
42
- "link": "#0149A7",
43
- "link-hover": "#003375",
44
- "link-visited": "#4c2b91",
45
- "link-active": "#002152",
46
-
47
- "white": "#fff",
48
- "gray50": "#ccc",
49
- "gray100": "#ebebeb",
50
- "gray200": "#b3b2b3",
51
- "base-bg": "#b3b2b3",
52
- "gray300": "#99989a",
53
- "gray400": "#828085",
54
- "gray500": "#6c6a71",
55
- "gray600": "#56565d",
56
- "gray700": "#43454c",
57
- "gray800": "#31363f",
58
- "gray900": "#212930",
59
- "black": "#000",
60
-
61
- "shadow200" : "#21293033",
62
- "shadow600" :"#21293099",
63
-
64
- }
65
-
66
-