@digigov/css 1.0.0-290a96e2 → 1.0.0-47312a12

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 (53) hide show
  1. package/defaultTheme/back-to-top.json +27 -0
  2. package/defaultTheme/index.js +1 -0
  3. package/dist/base/index.css +1 -3
  4. package/dist/base.js +1 -1
  5. package/dist/components.js +1 -1
  6. package/dist/digigov.css +3 -5
  7. package/dist/utilities/index.css +1 -1
  8. package/dist/utilities.js +1 -1
  9. package/index.js +1 -1
  10. package/package.json +9 -10
  11. package/postcss.config.js +15 -14
  12. package/src/base/index.css +4 -0
  13. package/src/base/postcss.config.js +23 -22
  14. package/src/base/tailwind.config.js +19 -15
  15. package/src/components/accordion.css +1 -1
  16. package/src/components/back-to-top.css +29 -0
  17. package/src/components/button.css +29 -6
  18. package/src/components/card.css +13 -1
  19. package/src/components/checkboxes.css +49 -11
  20. package/src/components/copy-to-clipboard.css +13 -5
  21. package/src/components/drawer.css +44 -4
  22. package/src/components/dropdown.css +91 -66
  23. package/src/components/footer.css +1 -0
  24. package/src/components/form.css +19 -1
  25. package/src/components/header.css +3 -5
  26. package/src/components/index.css +1 -1
  27. package/src/components/layout.css +38 -5
  28. package/src/components/misc.css +9 -1
  29. package/src/components/modal.css +7 -2
  30. package/src/components/nav.css +38 -13
  31. package/src/components/notification-banner.css +14 -3
  32. package/src/components/pagination.css +3 -0
  33. package/src/components/panel.css +1 -0
  34. package/src/components/postcss.config.js +15 -16
  35. package/src/components/radios.css +20 -1
  36. package/src/components/stepnav.css +12 -1
  37. package/src/components/svg-icons.css +2 -3
  38. package/src/components/tabs.css +33 -1
  39. package/src/components/tailwind.config.js +12 -6
  40. package/src/components/task-list.css +8 -0
  41. package/src/components/timeline.css +14 -6
  42. package/src/components/typography.css +24 -1
  43. package/src/components/warning-text.css +6 -2
  44. package/src/fonts.css +1 -1
  45. package/src/index.css +0 -2
  46. package/src/pages/dropdown.js +2 -2
  47. package/src/utilities/index.css +1 -1
  48. package/src/utilities/postcss.config.js +15 -16
  49. package/src/utilities/tailwind.config.js +10 -1
  50. package/src/utilities/utilities.css +10 -10
  51. package/tailwind.config.js +17 -30
  52. package/themes.plugin.js +94 -99
  53. package/src/components/accessibility-menu.css +0 -76
@@ -1,5 +1,15 @@
1
1
  .govgr-step-nav {
2
2
  @apply mb-8 md:mb-12;
3
+ &.govgr-step-nav--dense, .govgr-dense & {
4
+ @apply mb-4 md:mb-8;
5
+ .govgr-step-nav__circle {
6
+ margin-left: 0.1rem;
7
+ @apply md:w-8 md:h-8;
8
+ }
9
+ .govgr-step-nav__accordion__summary {
10
+ @apply py-3;
11
+ }
12
+ }
3
13
  }
4
14
  .govgr-step-nav__controls {
5
15
  @apply text-right;
@@ -14,7 +24,7 @@
14
24
  height: calc(100% - 2rem);
15
25
  }
16
26
  &:after {
17
- @apply absolute z-/1 w-0 h-full bg-base-100 left-0 top-8 border-2 border-base-400 border-r-0 border-t-0 border-b-0 md:border-l-3;
27
+ @apply absolute z-0 w-0 h-full bg-base-100 left-0 top-8 border-2 border-base-400 border-r-0 border-t-0 border-b-0 md:border-l-3;
18
28
  content: "";
19
29
  margin-left: calc(0.75rem + 1px);
20
30
  }
@@ -154,3 +164,4 @@
154
164
  @apply mb-0 mt-1;
155
165
  }
156
166
  }
167
+
@@ -46,13 +46,12 @@
46
46
  }
47
47
  .govgr-svg-icon--burger {
48
48
  fill: var(--color-base-content);
49
- /* @apply w-8 h-8 float-right cursor-pointer transition-all */
50
- @apply transition-all focus:bg-focus;
49
+ @apply transition-transform focus:bg-focus;
51
50
  @apply cursor-pointer;
52
51
  #govgr-svg-icon--burger__line-1,
53
52
  #govgr-svg-icon--burger__line-2,
54
53
  #govgr-svg-icon--burger__line-3 {
55
- @apply transition-all;
54
+ @apply transition-transform;
56
55
  }
57
56
  #govgr-svg-icon--burger__line-1 {
58
57
  x: 2px;
@@ -15,7 +15,7 @@
15
15
  @apply md:float-left md:border md:border-base-300 md:bg-base-300 md:rounded-t-sm md:mr-2;
16
16
  @apply print:hidden;
17
17
  &.govgr-tabs__list-item-selected {
18
- @apply no-underline md:border-base-400 md:border bg-base-100 md:border-b-0 md:px-5 md:pb-4 md:-mt-1 md:pt-4;
18
+ @apply no-underline md:border-base-400 md:border bg-base-100 md:border-b-0 md:px-5 md:py-4 md:-mt-1;
19
19
  margin-bottom: -1px;
20
20
  &:hover {
21
21
  text-decoration-thickness: 2px;
@@ -46,4 +46,36 @@
46
46
  @apply block;
47
47
  }
48
48
  }
49
+ &.govgr-tabs--dense, .govgr-dense & {
50
+ .govgr-tabs__list {
51
+ .govgr-tabs__list-item {
52
+ @apply px-3 py-1;
53
+ &.govgr-tabs__list-item-selected {
54
+ @apply md:px-4 md:pb-3 md:pt-2;
55
+ }
56
+ }
57
+ }
58
+ .govgr-tabs__panel {
59
+ @apply pb-2 pt-3;
60
+ }
61
+ }
62
+ }
63
+
64
+ .govgr-tabs--vertical {
65
+ .govgr-tabs__panel {
66
+ @apply min-h-full pt-4 pl-6;
67
+ }
68
+ .govgr-tabs__list {
69
+ .govgr-tabs__list-item {
70
+ @apply w-full rounded-none mb-1 md:bg-base-200 border-base-200;
71
+ width: calc(100% - 0.25rem);
72
+ &.govgr-tabs__list-item-selected {
73
+ @apply md:border-b md:border-r-0 mb-1 mt-0 px-4 py-2;
74
+ /* margin-right: -1px; */
75
+ width: calc(100% + 1px);
76
+ /* margin-top: 0px; */
77
+ }
78
+ }
79
+ }
80
+
49
81
  }
@@ -1,10 +1,16 @@
1
- const plugin = require('tailwindcss/plugin')
2
- const tailwindConfig = require('../../tailwind.config.js');
1
+ const plugin = require("tailwindcss/plugin");
2
+ const tailwindConfig = require("../../tailwind.config");
3
+
4
+ /** @type {import('tailwindcss').Config} */
3
5
  module.exports = {
4
6
  ...tailwindConfig,
7
+ content: {
8
+ files: ["./*.css"],
9
+ relative: true,
10
+ },
5
11
  plugins: [
6
- plugin(function ({ addBase, addUtilities }) {
7
- addUtilities(require('../../dist/utilities'), { variants: ['responsive'] })
8
- })
12
+ plugin(function ({ addUtilities }) {
13
+ addUtilities(require("../../dist/utilities"));
14
+ }),
9
15
  ],
10
- }
16
+ };
@@ -31,6 +31,14 @@
31
31
 
32
32
  /* overrides */
33
33
 
34
+ .govgr-task-list--dense{
35
+ .govgr-task-list__item {
36
+ @apply mb-4 md:mb-6;
37
+ .govgr-summary-list{
38
+ @apply mb-4 md:mb-6;
39
+ }
40
+ }
41
+ }
34
42
  .govgr-task-list__content {
35
43
  .govgr-body {
36
44
  @apply mb-2 md:mb-3;
@@ -1,13 +1,22 @@
1
1
  .govgr-timeline {
2
2
  @apply mb-4 pl-6 pb-2 border-l-4 border-secondary;
3
- }
4
- .govgr-timeline--spaced {
5
- .govgr-timeline__item {
6
- @apply mb-10 md:mb-12;
3
+ &.govgr-timeline--dense, .govgr-dense & {
4
+ @apply pb-0 border-l-3;
5
+ .govgr-timeline__item {
6
+ @apply mb-4 md:mb-6;
7
+ }
8
+ .govgr-timeline__heading {
9
+ @apply mb-2;
10
+ &::before {
11
+ content: "";
12
+ @apply border-b-3;
13
+ }
14
+ }
7
15
  }
8
16
  }
17
+
9
18
  .govgr-timeline__item {
10
- @apply mb-8 md:mb-10;
19
+ @apply mb-10 md:mb-12;
11
20
  }
12
21
  .govgr-timeline__heading {
13
22
  @apply md:text-3xl text-2xl font-bold mx-0 md:mb-4 mb-2 relative;
@@ -37,7 +46,6 @@
37
46
  }
38
47
 
39
48
  /* overrides */
40
-
41
49
  .govgr-timeline__content {
42
50
  .govgr-hint,
43
51
  .govgr-body {
@@ -38,6 +38,9 @@
38
38
  font-weight: var(--heading-xs-font-weight);
39
39
  letter-spacing: var(--heading-xs-letter-spacing);
40
40
  }
41
+ .govgr-heading--break-words {
42
+ @apply break-words;
43
+ }
41
44
  .govgr-caption-xl {
42
45
  @apply block mx-0 font-normal;
43
46
  color: var(--caption-xl-color);
@@ -151,9 +154,12 @@
151
154
  @apply md:mb-8 mb-4 text-base-content;
152
155
  }
153
156
  .govgr-blockquote {
154
- @apply lg:mb-8 mb-4 mt-8 md:mb-8 p-4 border-l-8 border-base-500 text-base-content;
157
+ @apply mb-4 mt-8 md:mb-8 p-4 border-l-8 border-base-500 text-base-content;
155
158
  font-size: var(--blockquote-font-size);
156
159
  line-height: var(--blockquote-line-height);
160
+ &.govgr-blockquote--dense, .govgr-dense & {
161
+ @apply mt-3 md:mb-6 p-3 border-l-6;
162
+ }
157
163
  }
158
164
  .govgr-body {
159
165
  font-size: var(--body-font-size);
@@ -177,6 +183,9 @@
177
183
  color: var(--hint-color);
178
184
  letter-spacing: var(--hint-letter-spacing);
179
185
  }
186
+ .govgr-hint--break-words {
187
+ @apply break-words;
188
+ }
180
189
 
181
190
  .govgr-\!-font-weight-regular {
182
191
  @apply font-normal !important;
@@ -204,6 +213,15 @@
204
213
  text-decoration: none !important;
205
214
  outline: none;
206
215
  }
216
+ .govgr-heading-xl & ,
217
+ .govgr-heading-lg & ,
218
+ .govgr-heading-md & ,
219
+ .govgr-heading-sm & ,
220
+ .govgr-body &,
221
+ .govgr-hint &
222
+ {
223
+ font-size: inherit;
224
+ }
207
225
  }
208
226
  .govgr-link--no-underline {
209
227
  @apply no-underline hover:underline;
@@ -278,6 +296,11 @@
278
296
  }
279
297
  }
280
298
  }
299
+ button.govgr-link {
300
+ .govgr-svg-icon {
301
+ @apply ml-1;
302
+ }
303
+ }
281
304
  .govgr-back-link {
282
305
  .govgr-svg-icon--caret {
283
306
  fill: var(--color-base-content);
@@ -1,7 +1,6 @@
1
1
  .govgr-warning-text {
2
2
  font-size: var(--warning-text-font-size);
3
- @apply p-4;
4
- @apply flex pt-4 pb-4 pl-0 pr-0;
3
+ @apply flex py-4 px-0;
5
4
  .govgr-warning-text__icon {
6
5
  @apply text-base-content-invert font-bold bg-base-content text-3xl leading-10 text-center
7
6
  rounded-3xl md:min-h-10 min-w-10 h-fit mr-6 mt-1
@@ -16,4 +15,9 @@
16
15
  -webkit-clip-path: inset(50%) !important;
17
16
  clip-path: inset(50%) !important;
18
17
  }
18
+ &.govgr-warning-text--dense, .govgr-dense & {
19
+ .govgr-warning-text__icon {
20
+ @apply mr-4 md:mr-5;
21
+ }
22
+ }
19
23
  }
package/src/fonts.css CHANGED
@@ -1 +1 @@
1
- @import "@fontsource/roboto/index.css";
1
+ @import "@fontsource/roboto/index.css";
package/src/index.css CHANGED
@@ -1,5 +1,3 @@
1
1
  @import "./utilities/utilities.css";
2
2
  @import "./components/components.css";
3
3
  @import "./base/base.css";
4
-
5
-
@@ -75,7 +75,7 @@ export default function Dropdown() {
75
75
  </p>
76
76
 
77
77
  <details className="govgr-dropdown">
78
- <summary className="govgr-dropdown__button govgr-btn govgr-btn-secondary govgr-dropdown__button--arrow">
78
+ <summary className="govgr-dropdown__button govgr-btn govgr-btn-secondary govgr-dropdown__button--chevron">
79
79
  Ενέργειες
80
80
  <svg aria-hidden="true" className="govgr-svg-icon govgr-svg-icon--arrow--down" focusable="false" viewBox="0 0 24 24">
81
81
  <path d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z" />
@@ -143,7 +143,7 @@ export default function Dropdown() {
143
143
  </details>
144
144
 
145
145
  <details className="govgr-dropdown govgr-dropdown--left govgr-dropdown--up">
146
- <summary className="govgr-dropdown__button govgr-link govgr-dropdown__button--arrow">
146
+ <summary className="govgr-dropdown__button govgr-link govgr-dropdown__button--chevron">
147
147
  Ενέργειες
148
148
  <svg aria-hidden="true" className="govgr-svg-icon govgr-svg-icon--arrow--down" focusable="false" viewBox="0 0 24 24">
149
149
  <path d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z" />
@@ -582,4 +582,4 @@
582
582
  }
583
583
  .govgr-gap-xl-12 {
584
584
  @apply xl:gap-12;
585
- }
585
+ }
@@ -1,20 +1,19 @@
1
- module.exports = {
1
+ /** @type {import('postcss-load-config').Config} */
2
+ const config = {
2
3
  plugins: [
3
- require('postcss-import'),
4
- require('tailwindcss')('./src/utilities/tailwind.config.js'),
5
- require('postcss-nested')({
6
- "bubble": [
7
- "screen"
8
- ]
9
- }),
10
- require('autoprefixer'),
11
- require('cssnano')({
12
- "preset": [
4
+ require("postcss-import"),
5
+ require("tailwindcss/nesting"),
6
+ require("tailwindcss")("./src/utilities/tailwind.config.js"),
7
+ require("autoprefixer"),
8
+ require("cssnano")({
9
+ preset: [
13
10
  "default",
14
11
  {
15
- "mergeRules": false
16
- }
17
- ]
12
+ mergeRules: false,
13
+ },
14
+ ],
18
15
  }),
19
- ]
20
- }
16
+ ],
17
+ };
18
+
19
+ module.exports = config;
@@ -1 +1,10 @@
1
- module.exports = require('../../tailwind.config.js');
1
+ const tailwindConfig = require("../../tailwind.config");
2
+
3
+ /** @type {import('tailwindcss').Config} */
4
+ module.exports = {
5
+ ...tailwindConfig,
6
+ content: {
7
+ files: ["./*.css"],
8
+ relative: true,
9
+ },
10
+ };
@@ -2,7 +2,7 @@
2
2
  @layer utilities {
3
3
  .govgr-m-0 {
4
4
  @apply m-0 !important;
5
- }
5
+ }
6
6
  .govgr-m-1 {
7
7
  @apply m-1 !important;
8
8
  }
@@ -41,7 +41,7 @@
41
41
  }
42
42
  .govgr-mt-0 {
43
43
  @apply mt-0 !important;
44
- }
44
+ }
45
45
  .govgr-mt-1 {
46
46
  @apply mt-1 !important;
47
47
  }
@@ -80,7 +80,7 @@
80
80
  }
81
81
  .govgr-mb-0 {
82
82
  @apply mb-0 !important;
83
- }
83
+ }
84
84
  .govgr-mb-1 {
85
85
  @apply mb-1 !important;
86
86
  }
@@ -119,7 +119,7 @@
119
119
  }
120
120
  .govgr-ml-0 {
121
121
  @apply ml-0 !important;
122
- }
122
+ }
123
123
  .govgr-ml-1 {
124
124
  @apply ml-1 !important;
125
125
  }
@@ -158,7 +158,7 @@
158
158
  }
159
159
  .govgr-mr-0 {
160
160
  @apply mr-0 !important;
161
- }
161
+ }
162
162
  .govgr-mr-1 {
163
163
  @apply mr-1 !important;
164
164
  }
@@ -197,7 +197,7 @@
197
197
  }
198
198
  .govgr-p-0 {
199
199
  @apply p-0 !important;
200
- }
200
+ }
201
201
  .govgr-p-1 {
202
202
  @apply p-1 !important;
203
203
  }
@@ -236,7 +236,7 @@
236
236
  }
237
237
  .govgr-pt-0 {
238
238
  @apply pt-0 !important;
239
- }
239
+ }
240
240
  .govgr-pt-1 {
241
241
  @apply pt-1 !important;
242
242
  }
@@ -275,7 +275,7 @@
275
275
  }
276
276
  .govgr-pb-0 {
277
277
  @apply pb-0 !important;
278
- }
278
+ }
279
279
  .govgr-pb-1 {
280
280
  @apply pb-1 !important;
281
281
  }
@@ -314,7 +314,7 @@
314
314
  }
315
315
  .govgr-pl-0 {
316
316
  @apply pl-0 !important;
317
- }
317
+ }
318
318
  .govgr-pl-1 {
319
319
  @apply pl-1 !important;
320
320
  }
@@ -353,7 +353,7 @@
353
353
  }
354
354
  .govgr-pr-0 {
355
355
  @apply pr-0 !important;
356
- }
356
+ }
357
357
  .govgr-pr-1 {
358
358
  @apply pr-1 !important;
359
359
  }
@@ -64,14 +64,8 @@ const allColors = [
64
64
  "shadow600",
65
65
  ];
66
66
 
67
- const buildOnly = !process.env["DIGIGOV_CSS_BUILD"]
68
- ? {
69
- mode: "jit",
70
- }
71
- : {};
72
-
73
67
  const colorVariables = allColors.reduce((colorVars, color) => {
74
- if (['transparent', 'currentColor'].includes(color)) {
68
+ if (["transparent", "currentColor"].includes(color)) {
75
69
  colorVars[color] = color;
76
70
  } else {
77
71
  colorVars[color] = ({ opacityVariable, opacityValue }) => {
@@ -87,13 +81,17 @@ const colorVariables = allColors.reduce((colorVars, color) => {
87
81
  return colorVars;
88
82
  }, {});
89
83
 
84
+ /** @type {import('tailwindcss').Config} */
90
85
  module.exports = {
91
- ...buildOnly,
92
- darkMode: 'class',
86
+ darkMode: "class",
87
+ content: {
88
+ files: ["./src/*.css"],
89
+ relative: true,
90
+ },
93
91
  themes: {
94
- light: require.resolve('./defaultTheme'),
92
+ light: require.resolve("./defaultTheme"),
95
93
  },
96
- defaultTheme: 'light',
94
+ defaultTheme: "light",
97
95
  theme: {
98
96
  colors: colorVariables,
99
97
  container: {
@@ -111,11 +109,11 @@ module.exports = {
111
109
  xl: "1280px",
112
110
  "2xl": "1280px",
113
111
  print: { raw: "print" },
114
- xsOnly: { 'min': '0px', 'max': '639.98px' },
115
- smOnly: { 'min': '640px', 'max': '767.98px' },
116
- mdOnly: { 'min': '768px', 'max': '1023.98px' },
117
- lgOnly: { 'min': '1024px', 'max': '1279.98px' },
118
- xlOnly: { 'min': '1280px', 'max': '1535.98px' },
112
+ xsOnly: { min: "0px", max: "639.98px" },
113
+ smOnly: { min: "640px", max: "767.98px" },
114
+ mdOnly: { min: "768px", max: "1023.98px" },
115
+ lgOnly: { min: "1024px", max: "1279.98px" },
116
+ xlOnly: { min: "1280px", max: "1535.98px" },
119
117
  },
120
118
  fontFamily: {
121
119
  sans: ["Roboto", ...defaultTheme.fontFamily.sans],
@@ -126,8 +124,8 @@ module.exports = {
126
124
  },
127
125
  width: {
128
126
  fit: "fit-content",
129
- '2xl': '42rem',
130
- '4xl': '56rem',
127
+ "2xl": "42rem",
128
+ "4xl": "56rem",
131
129
  },
132
130
  maxWidth: {
133
131
  fit: "fit-content",
@@ -158,6 +156,7 @@ module.exports = {
158
156
  1: 1,
159
157
  2: 2,
160
158
  3: 3,
159
+ 5: 5,
161
160
  },
162
161
  opacity: {
163
162
  85: "0.85",
@@ -168,18 +167,6 @@ module.exports = {
168
167
  boxShadow: {
169
168
  thick: "0 0 30px rgba(0, 0, 0, 0.6)",
170
169
  },
171
- borderColor: {
172
- // TODO: fix this invalid value in the future
173
- // Read more: https://gitlab.grnet.gr/devs/digigov/digigov-sdk/-/merge_requests/818
174
- DEFAULT: 'reset',
175
- }
176
- },
177
- },
178
- variants: {
179
- extend: {
180
- textDecoration: ["active"],
181
- backgroundColor: ["active"],
182
- borderColor: ["active"],
183
170
  },
184
171
  },
185
172
  plugins: [plugin(themesPlugin)],