@digigov/css 1.0.0-079f34f3d → 1.0.0-23c81d9f

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 (63) 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 +20 -13
  16. package/src/components/admin-header.css +26 -0
  17. package/src/components/autocomplete.css +12 -9
  18. package/src/components/back-to-top.css +29 -0
  19. package/src/components/bottom-info.css +2 -1
  20. package/src/components/button.css +81 -32
  21. package/src/components/card.css +30 -15
  22. package/src/components/checkboxes.css +55 -12
  23. package/src/components/chip.css +24 -9
  24. package/src/components/copy-to-clipboard.css +28 -13
  25. package/src/components/drawer.css +62 -10
  26. package/src/components/dropdown.css +102 -76
  27. package/src/components/filter.css +66 -37
  28. package/src/components/footer.css +13 -7
  29. package/src/components/form.css +63 -29
  30. package/src/components/header.css +56 -38
  31. package/src/components/index.css +3 -1
  32. package/src/components/layout.css +51 -18
  33. package/src/components/loader.css +5 -16
  34. package/src/components/masthead.css +78 -0
  35. package/src/components/misc.css +17 -41
  36. package/src/components/modal.css +10 -0
  37. package/src/components/nav.css +46 -19
  38. package/src/components/notification-banner.css +14 -3
  39. package/src/components/pagination.css +40 -23
  40. package/src/components/panel.css +1 -0
  41. package/src/components/phase-banner.css +0 -11
  42. package/src/components/postcss.config.js +15 -16
  43. package/src/components/radios.css +32 -19
  44. package/src/components/stepnav.css +24 -6
  45. package/src/components/summary-list.css +22 -15
  46. package/src/components/svg-icons.css +2 -62
  47. package/src/components/table.css +34 -37
  48. package/src/components/tabs.css +33 -1
  49. package/src/components/tailwind.config.js +12 -6
  50. package/src/components/task-list.css +28 -14
  51. package/src/components/timeline.css +21 -6
  52. package/src/components/typography.css +86 -68
  53. package/src/components/warning-text.css +23 -0
  54. package/src/fonts.css +1 -1
  55. package/src/index.css +0 -2
  56. package/src/pages/dropdown.js +2 -2
  57. package/src/utilities/index.css +121 -1
  58. package/src/utilities/postcss.config.js +15 -16
  59. package/src/utilities/tailwind.config.js +10 -1
  60. package/src/utilities/utilities.css +136 -13
  61. package/tailwind.config.js +17 -30
  62. package/themes.plugin.js +94 -99
  63. package/src/components/accessibility-menu.css +0 -71
@@ -1,13 +1,22 @@
1
- .govgr-radios {}
1
+ .govgr-radios {
2
+ &.govgr-radios--dense, govgr-dense & {
3
+ .govgr-radios__item {
4
+ @apply mb-2 pl-9 min-h-8;
5
+ }
6
+ .govgr-radios__input {
7
+ @apply left-0.5 top-0 w-8 h-8;
8
+ &:focus {
9
+ border-width: 3px;
10
+ }
11
+ }
12
+ }
13
+ }
2
14
  .govgr-radios__item {
3
15
  @apply block relative mb-4 pl-12;
4
16
  min-height: 40px;
5
17
  }
6
18
  .govgr-radios--horizontal {
7
19
  @apply inline-flex flex-wrap items-baseline gap-4 md:gap-6;
8
- .govgr-choice-divider-text {
9
- @apply min-w-max mx-2;
10
- }
11
20
  }
12
21
  .govgr-radios__item {
13
22
  @apply block relative mb-4 pl-12;
@@ -18,7 +27,7 @@
18
27
  @apply inline-block py-1 px-2 cursor-pointer;
19
28
  }
20
29
  .govgr-radios__input {
21
- @apply absolute z-1 left-0.5 -top-1 m-0 rounded-3xl
30
+ @apply absolute z-1 left-0.5 -top-1 m-0
22
31
  w-10 h-10 opacity-100 cursor-pointer
23
32
  bg-base-100;
24
33
  appearance: none;
@@ -26,17 +35,10 @@
26
35
  height: 40px;
27
36
  border: 2px solid currentColor;
28
37
  border-radius: 50%;
29
- &::before {
30
- content: "";
31
- @apply absolute bg-base-100 opacity-0 w-0 h-0;
32
- top: 6px;
33
- left: 6px;
34
- border: 12px solid currentColor;
35
- border-radius: 50%;
36
- }
37
38
  &:checked {
38
- &::before {
39
- @apply opacity-100;
39
+ box-shadow: inset 0 0 0px 6px var(--color-base-100), inset 0 0 0 20px var(--color-base-content);
40
+ &:focus {
41
+ box-shadow: 0 0 0 4px var(--color-focus), inset 0 0 0px 4px var(--color-base-100), inset 0 0 0 20px var(--color-base-content);
40
42
  }
41
43
  }
42
44
  &:focus {
@@ -44,12 +46,23 @@
44
46
  outline-offset: 1px;
45
47
  box-shadow: 0 0 0 4px var(--color-focus);
46
48
  border-width: 4px;
47
- &::before {
48
- top: 4px;
49
- left: 4px;
50
- }
51
49
  }
52
50
  }
53
51
  .govgr-radios__conditional {
54
52
  @apply border-l-4 border-base-500 ml-4 pl-6;
55
53
  }
54
+
55
+ /* overrides */
56
+
57
+ .govgr-radios--horizontal {
58
+ .govgr-choice-divider-text {
59
+ @apply min-w-max mx-2;
60
+ }
61
+ }
62
+ .govgr-radios {
63
+ &.govgr-radios--dense, .govgr-dense & {
64
+ .govgr-field {
65
+ @apply mb-4 md:mb-6;
66
+ }
67
+ }
68
+ }
@@ -1,7 +1,14 @@
1
1
  .govgr-step-nav {
2
2
  @apply mb-8 md:mb-12;
3
- .govgr-link {
4
- @apply md:text-base text-sm;
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
+ }
5
12
  }
6
13
  }
7
14
  .govgr-step-nav__controls {
@@ -17,7 +24,7 @@
17
24
  height: calc(100% - 2rem);
18
25
  }
19
26
  &:after {
20
- @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;
21
28
  content: "";
22
29
  margin-left: calc(0.75rem + 1px);
23
30
  }
@@ -62,9 +69,6 @@
62
69
 
63
70
  .govgr-step-nav__accordion__summary {
64
71
  @apply list-none w-fit mb-0 py-4 pr-8 cursor-pointer;
65
- .govgr-hint {
66
- @apply mb-0 mt-1;
67
- }
68
72
  &::-webkit-details-marker {
69
73
  @apply hidden;
70
74
  }
@@ -147,3 +151,17 @@
147
151
  @apply mb-0;
148
152
  }
149
153
  }
154
+
155
+ /* overrides */
156
+
157
+ .govgr-step-nav {
158
+ .govgr-link {
159
+ @apply md:text-base text-sm;
160
+ }
161
+ }
162
+ .govgr-step-nav__accordion__summary {
163
+ .govgr-hint {
164
+ @apply mb-0 mt-1;
165
+ }
166
+ }
167
+
@@ -2,15 +2,6 @@
2
2
  font-size: var(--summary-list-font-size);
3
3
  @apply m-0 mb-6 sm:mb-8 w-full
4
4
  sm:table sm:w-full sm:table-fixed;
5
- .govgr-btn {
6
- @apply m-0 inline-flex;
7
- }
8
- .govgr-dropdown__content {
9
- @apply mt-2;
10
- }
11
- .govgr-btn-group {
12
- @apply mb-0 text-right sm:justify-end gap-y-2;
13
- }
14
5
  }
15
6
  .govgr-summary-list--no-border {
16
7
  .govgr-summary-list__key,
@@ -41,12 +32,6 @@
41
32
  }
42
33
  .govgr-summary-list__value {
43
34
  @apply sm:w-6/12;
44
- .govgr-link {
45
- @apply pl-4;
46
- }
47
- .govgr-btn {
48
- @apply ml-4;
49
- }
50
35
  }
51
36
  .govgr-summary-list__actions {
52
37
  @apply sm:w-3/12 sm:pr-0 sm:text-right;
@@ -76,3 +61,25 @@
76
61
  @apply m-0
77
62
  sm:table-cell sm:py-2 sm:pr-4 sm:border-b sm:border-solid sm:border-base-300;
78
63
  }
64
+
65
+ /* overrides */
66
+
67
+ .govgr-summary-list {
68
+ .govgr-dropdown__content {
69
+ @apply mt-2;
70
+ }
71
+ .govgr-btn {
72
+ @apply m-0 inline-flex;
73
+ }
74
+ .govgr-btn-group {
75
+ @apply mb-0 text-right sm:justify-end gap-y-2;
76
+ }
77
+ }
78
+ .govgr-summary-list__value {
79
+ .govgr-btn {
80
+ @apply ml-4;
81
+ }
82
+ .govgr-link {
83
+ @apply pl-4;
84
+ }
85
+ }
@@ -44,74 +44,14 @@
44
44
  .govgr-svg-icon--xl {
45
45
  @apply h-10 w-10 !important;
46
46
  }
47
- .govgr-btn-primary,
48
- .govgr-btn-warning {
49
- .govgr-svg-icon {
50
- fill: var(--color-white);
51
- }
52
- .govgr-svg-icon--more-vert {
53
- @apply h-6 w-6 md:h-8 md:w-8;
54
- }
55
- }
56
- .govgr-btn-secondary {
57
- .govgr-svg-icon {
58
- fill: var(--color-base-content);
59
- }
60
- .govgr-svg-icon--more-vert {
61
- @apply h-6 w-6;
62
- }
63
- }
64
- @media print {
65
- .govgr-btn-primary,
66
- .govgr-btn-warning,
67
- .govgr-btn-secondary {
68
- .govgr-svg-icon {
69
- fill: var(--color-base-content);
70
- }
71
- }
72
- }
73
- .govgr-link {
74
- .govgr-svg-icon {
75
- fill: var(--color-link);
76
- }
77
- &:hover {
78
- .govgr-svg-icon {
79
- fill: var(--color-link-hover);
80
- }
81
- }
82
- &:focus {
83
- .govgr-svg-icon {
84
- fill: var(--color-link-active);
85
- }
86
- }
87
- }
88
- .govgr-header,
89
- .govgr-admin-header {
90
- .govgr-link {
91
- .govgr-svg-icon {
92
- fill: var(--color-white);
93
- }
94
- &:hover {
95
- .govgr-svg-icon {
96
- fill: var(--color-white);
97
- }
98
- }
99
- &:focus {
100
- .govgr-svg-icon {
101
- fill: var(--color-link-active);
102
- }
103
- }
104
- }
105
- }
106
47
  .govgr-svg-icon--burger {
107
48
  fill: var(--color-base-content);
108
- /* @apply w-8 h-8 float-right cursor-pointer transition-all */
109
- @apply transition-all focus:bg-focus;
49
+ @apply transition-transform focus:bg-focus;
110
50
  @apply cursor-pointer;
111
51
  #govgr-svg-icon--burger__line-1,
112
52
  #govgr-svg-icon--burger__line-2,
113
53
  #govgr-svg-icon--burger__line-3 {
114
- @apply transition-all;
54
+ @apply transition-transform;
115
55
  }
116
56
  #govgr-svg-icon--burger__line-1 {
117
57
  x: 2px;
@@ -26,12 +26,6 @@
26
26
  @apply w-full border-collapse table;
27
27
  @apply md:mb-10 mb-6 text-base-content md:text-lg text-base font-normal antialiased;
28
28
  border-spacing: 0;
29
- .govgr-dropdown__content {
30
- @apply mt-0;
31
- }
32
- .govgr-dropdown__button {
33
- @apply mb-0;
34
- }
35
29
  }
36
30
  .govgr-table-sort__icons-container {
37
31
  @apply flex flex-col;
@@ -76,14 +70,6 @@
76
70
  @apply pl-2;
77
71
  }
78
72
  }
79
- .govgr-table__cell {
80
- .govgr-btn {
81
- @apply mb-0;
82
- }
83
- .govgr-btn-group {
84
- @apply mb-0;
85
- }
86
- }
87
73
  .govgr-table--dark,
88
74
  .govgr-table--zebra {
89
75
  .govgr-table__header,
@@ -235,29 +221,6 @@
235
221
  .govgr-table__row {
236
222
  @apply bg-base-100;
237
223
  }
238
- .govgr-table__header {
239
- .govgr-dropdown__button:not(:focus) {
240
- @apply no-underline font-bold text-base-content !important;
241
- }
242
- .govgr-dropdown__button--underline:not(:focus) {
243
- @apply underline !important;
244
- text-decoration-thickness: 2px !important;
245
- }
246
- .govgr-dropdown__content {
247
- @apply py-0;
248
- }
249
- .govgr-nav__list-item-link, .govgr-nav__list-item-btn {
250
- @apply flex no-underline;
251
- }
252
- }
253
- .govgr-table__cell {
254
- .govgr-btn {
255
- @apply mb-0;
256
- }
257
- .govgr-btn-group {
258
- @apply mb-0;
259
- }
260
- }
261
224
  .govgr-table__header,
262
225
  .govgr-table__cell {
263
226
  @apply pr-5 py-2.5 pl-0 border-b border-solid border-base-300 text-left align-middle;
@@ -297,3 +260,37 @@
297
260
  backdrop-filter: blur(0.6px);
298
261
  }
299
262
  }
263
+
264
+ /* overrides */
265
+
266
+ .govgr-table {
267
+ .govgr-dropdown__content {
268
+ @apply mt-0;
269
+ }
270
+ .govgr-dropdown__button {
271
+ @apply mb-0;
272
+ }
273
+ }
274
+ .govgr-table__cell {
275
+ .govgr-btn {
276
+ @apply mb-0;
277
+ }
278
+ .govgr-btn-group {
279
+ @apply mb-0;
280
+ }
281
+ }
282
+ .govgr-table__header {
283
+ .govgr-dropdown__content {
284
+ @apply py-0;
285
+ }
286
+ .govgr-dropdown__button:not(:focus) {
287
+ @apply no-underline font-bold text-base-content !important;
288
+ }
289
+ .govgr-dropdown__button--underline:not(:focus) {
290
+ @apply underline !important;
291
+ text-decoration-thickness: 2px !important;
292
+ }
293
+ .govgr-nav__list-item-link, .govgr-nav__list-item-btn {
294
+ @apply flex no-underline;
295
+ }
296
+ }
@@ -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
+ };
@@ -15,14 +15,40 @@
15
15
  }
16
16
  .govgr-task-list__content {
17
17
  @apply mb-4;
18
+ }
19
+ .govgr-task-list__content__tag {
20
+ @apply px-2 py-1 mr-2 inline-block font-sans text-sm uppercase tracking-widest print:border-2 print:bg-white print:mr-4;
21
+ }
22
+ .govgr-task-list__content__tag--info {
23
+ @apply bg-info text-white print:border-info-hover print:text-info-hover;
24
+ }
25
+ .govgr-task-list__content__tag--primary {
26
+ @apply bg-secondary text-base-content print:border-info print:text-info;
27
+ }
28
+ .govgr-task-list__content__tag--secondary {
29
+ @apply bg-base-300 print:border-base-800 print:text-base-800;
30
+ }
31
+
32
+ /* overrides */
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
+ }
42
+ .govgr-task-list__content {
18
43
  .govgr-body {
19
44
  @apply mb-2 md:mb-3;
20
45
  }
21
46
  .govgr-summary-list__row:first-child {
22
- & > dt {
47
+ & > .govgr-summary-list__key {
23
48
  @apply border-t-2 border-base-400;
24
49
  }
25
- & > dd {
50
+ & > .govgr-summary-list__value,
51
+ & > .govgr-summary-list__actions {
26
52
  @apply sm:border-t-2 sm:border-base-400;
27
53
  }
28
54
  }
@@ -30,15 +56,3 @@
30
56
  @apply font-normal sm:mb-0 mb-2 pt-2;
31
57
  }
32
58
  }
33
- .govgr-task-list__content__tag {
34
- @apply px-2 py-1 mr-2 inline-block font-sans text-sm uppercase tracking-widest;
35
- }
36
- .govgr-task-list__content__tag--info {
37
- @apply bg-info text-white print:border-2 print:bg-white print:border-info-hover print:text-info-hover print:mr-4;
38
- }
39
- .govgr-task-list__content__tag--primary {
40
- @apply bg-secondary text-base-content print:border-2 print:bg-white print:border-info print:text-info print:mr-4;
41
- }
42
- .govgr-task-list__content__tag--secondary {
43
- @apply bg-base-300 print:border-2 print:bg-white print:border-base-800 print:text-base-800 print:mr-4;
44
- }
@@ -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;
@@ -31,13 +40,19 @@
31
40
  }
32
41
  .govgr-timeline__content {
33
42
  @apply mb-4;
43
+ }
44
+ .govgr-timeline__actions {
45
+ @apply flex flex-wrap items-center gap-4 mb-6;
46
+ }
47
+
48
+ /* overrides */
49
+ .govgr-timeline__content {
34
50
  .govgr-hint,
35
51
  .govgr-body {
36
52
  @apply mb-2 md:mb-3;
37
53
  }
38
54
  }
39
55
  .govgr-timeline__actions {
40
- @apply flex flex-wrap items-center gap-4 mb-6;
41
56
  .govgr-btn,
42
57
  .govgr-link {
43
58
  @apply mb-0;