@digigov/css 2.0.0-cbc56209 → 2.0.0-daaf7bdf

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 (109) hide show
  1. package/defaultTheme/accordion.json +8 -0
  2. package/defaultTheme/brandConfig.json +14 -2
  3. package/defaultTheme/button.json +16 -3
  4. package/defaultTheme/card.json +16 -5
  5. package/defaultTheme/form.json +117 -0
  6. package/defaultTheme/globals.json +11 -1
  7. package/defaultTheme/index.js +1 -1
  8. package/defaultTheme/layout.json +55 -0
  9. package/defaultTheme/misc.json +20 -0
  10. package/defaultTheme/panel.json +5 -0
  11. package/defaultTheme/typography.json +4 -4
  12. package/dist/base/index.css +1 -1
  13. package/dist/base.js +1 -1
  14. package/dist/components.js +1 -1
  15. package/dist/digigov.css +3 -3
  16. package/dist/utilities/index.css +1 -1
  17. package/dist/utilities.js +1 -1
  18. package/package.json +6 -6
  19. package/postcss.config.js +1 -0
  20. package/src/components/accordion.css +5 -2
  21. package/src/components/admin-header.css +2 -19
  22. package/src/components/admin-layout.css +6 -15
  23. package/src/components/autocomplete.css +75 -29
  24. package/src/components/blockquote.common.css +14 -0
  25. package/src/components/blockquote.css +9 -0
  26. package/src/components/blockquote.native.css +11 -0
  27. package/src/components/breadcrumbs.css +8 -1
  28. package/src/components/button.common.css +62 -0
  29. package/src/components/button.css +23 -35
  30. package/src/components/button.native.css +56 -0
  31. package/src/components/card.common.css +33 -0
  32. package/src/components/card.css +19 -12
  33. package/src/components/card.native.css +29 -0
  34. package/src/components/checkboxes.common.css +16 -0
  35. package/src/components/checkboxes.css +6 -8
  36. package/src/components/checkboxes.native.css +28 -0
  37. package/src/components/chip.css +1 -1
  38. package/src/components/code.css +128 -0
  39. package/src/components/copy-to-clipboard.native.css +28 -0
  40. package/src/components/details.common.css +26 -0
  41. package/src/components/details.css +6 -9
  42. package/src/components/details.native.css +26 -0
  43. package/src/components/dropdown.common.css +23 -0
  44. package/src/components/dropdown.css +37 -28
  45. package/src/components/dropdown.native.css +28 -0
  46. package/src/components/filter.css +2 -5
  47. package/src/components/footer.css +15 -4
  48. package/src/components/form.common.css +82 -0
  49. package/src/components/form.css +63 -28
  50. package/src/components/form.native.css +133 -0
  51. package/src/components/header.common.css +36 -0
  52. package/src/components/header.css +41 -23
  53. package/src/components/header.native.css +34 -0
  54. package/src/components/hidden.css +11 -11
  55. package/src/components/index.css +34 -31
  56. package/src/components/layout.common.css +36 -0
  57. package/src/components/layout.css +12 -11
  58. package/src/components/layout.native.css +39 -0
  59. package/src/components/loader.css +2 -2
  60. package/src/components/masthead.css +1 -1
  61. package/src/components/misc.css +24 -0
  62. package/src/components/modal.css +12 -3
  63. package/src/components/nav.common.css +22 -0
  64. package/src/components/nav.css +8 -7
  65. package/src/components/nav.native.css +41 -0
  66. package/src/components/notification-banner.common.css +46 -0
  67. package/src/components/notification-banner.css +9 -6
  68. package/src/components/notification-banner.native.css +42 -0
  69. package/src/components/panel.common.css +30 -0
  70. package/src/components/panel.css +6 -14
  71. package/src/components/panel.native.css +20 -0
  72. package/src/components/phase-banner.common.css +23 -0
  73. package/src/components/phase-banner.css +7 -6
  74. package/src/components/phase-banner.native.css +31 -0
  75. package/src/components/radios.common.css +16 -0
  76. package/src/components/radios.css +5 -11
  77. package/src/components/radios.native.css +24 -0
  78. package/src/components/skeleton.css +85 -0
  79. package/src/components/summary-list.common.css +90 -0
  80. package/src/components/summary-list.css +86 -15
  81. package/src/components/summary-list.native.css +93 -0
  82. package/src/components/svg-icons.common.css +56 -0
  83. package/src/components/svg-icons.css +1 -1
  84. package/src/components/svg-icons.native.css +55 -0
  85. package/src/components/table.css +10 -8
  86. package/src/components/tabs.css +44 -61
  87. package/src/components/test.css +7 -0
  88. package/src/components/typography.common.css +140 -0
  89. package/src/components/typography.css +29 -91
  90. package/src/components/typography.native.css +97 -0
  91. package/src/components/warning-text.common.css +23 -0
  92. package/src/components/warning-text.css +1 -1
  93. package/src/components/warning-text.native.css +22 -0
  94. package/src/index.native.css +20 -0
  95. package/src/utilities/index.css +3 -1655
  96. package/src/utilities/index.native.css +2 -0
  97. package/src/utilities/layout.css +231 -0
  98. package/src/utilities/layout.native.css +278 -0
  99. package/src/utilities/print.css +11 -0
  100. package/src/utilities/spacing.css +2133 -0
  101. package/src/utilities/utilities.css +723 -6
  102. package/tailwind.config.js +2 -0
  103. package/defaultTheme/footer.json +0 -8
  104. package/src/pages/admin-filtering-data.js +0 -160
  105. package/src/pages/admin.js +0 -61
  106. package/src/pages/dropdown.js +0 -249
  107. package/src/pages/form.js +0 -400
  108. package/src/pages/pagination.js +0 -124
  109. package/src/pages/table.js +0 -308
@@ -1,86 +1,54 @@
1
+ @import './typography.common.css';
2
+
1
3
  .ds-heading-xl {
2
- @apply mx-0 max-w-2xl;
3
- font-size: var(--heading-xl-font-size);
4
- line-height: var(--heading-xl-line-height);
5
- margin-bottom: var(--heading-xl-margin-bottom);
6
- font-weight: var(--heading-xl-font-weight);
4
+ @apply util-heading-xl util-heading-xl-text;
7
5
  letter-spacing: var(--heading-xl-letter-spacing);
6
+ margin-bottom: var(--heading-xl-margin-bottom);
8
7
  }
9
8
  .ds-heading-lg {
10
- @apply mx-0;
11
- font-size: var(--heading-lg-font-size);
12
- line-height: var(--heading-lg-line-height);
13
- margin-bottom: var(--heading-lg-margin-bottom);
14
- font-weight: var(--heading-lg-font-weight);
9
+ @apply util-heading-lg-text mx-0;
15
10
  letter-spacing: var(--heading-lg-letter-spacing);
11
+ margin-bottom: var(--heading-lg-margin-bottom);
16
12
  }
17
13
  .ds-heading-md {
18
- @apply mx-0;
19
- font-size: var(--heading-md-font-size);
20
- line-height: var(--heading-md-line-height);
14
+ @apply util-heading-md-text mx-0;
15
+ letter-spacing: var(--heading-lg-letter-spacing);
21
16
  margin-bottom: var(--heading-md-margin-bottom);
22
- font-weight: var(--heading-md-font-weight);
23
- letter-spacing: var(--heading-md-letter-spacing);
24
17
  }
25
18
  .ds-heading-sm {
26
- @apply mx-0;
27
- font-size: var(--heading-sm-font-size);
28
- line-height: var(--heading-sm-line-height);
19
+ @apply util-heading-sm-text mx-0;
20
+ letter-spacing: var(--heading-lg-letter-spacing);
29
21
  margin-bottom: var(--heading-sm-margin-bottom);
30
- font-weight: var(--heading-sm-font-weight);
31
- letter-spacing: var(--heading-sm-letter-spacing);
32
22
  }
33
23
  .ds-heading-xs {
34
- @apply mx-0;
35
- font-size: var(--heading-xs-font-size);
36
- line-height: var(--heading-xs-line-height);
24
+ @apply util-heading-xs-text mx-0;
25
+ letter-spacing: var(--heading-lg-letter-spacing);
37
26
  margin-bottom: var(--heading-xs-margin-bottom);
38
- font-weight: var(--heading-xs-font-weight);
39
- letter-spacing: var(--heading-xs-letter-spacing);
40
27
  }
28
+
41
29
  .ds-heading--break-words {
42
30
  @apply break-words;
43
31
  }
44
32
  .ds-caption-xl {
45
- @apply block mx-0 font-normal;
46
- color: var(--caption-xl-color);
47
- font-size: var(--caption-xl-font-size);
48
- line-height: var(--caption-xl-line-height);
49
- margin-bottom: var(--caption-xl-margin-bottom);
50
- font-weight: var(--caption-xl-font-weight);
33
+ @apply util-caption-xl util-caption-xl-text block;
51
34
  letter-spacing: var(--heading-xl-letter-spacing);
52
35
  }
53
36
  .ds-caption-lg {
54
- @apply block mx-0 font-normal;
55
- color: var(--caption-lg-color);
56
- font-size: var(--caption-lg-font-size);
57
- line-height: var(--caption-lg-line-height);
58
- margin-bottom: var(--caption-lg-margin-bottom);
59
- font-weight: var(--caption-lg-font-weight);
60
- letter-spacing: var(--caption-lg-letter-spacing);
37
+ @apply util-caption-lg util-caption-lg-text block;
38
+ letter-spacing: var(--heading-lg-letter-spacing);
61
39
  }
62
40
  .ds-caption-md {
63
- @apply block mx-0 font-normal;
64
- color: var(--caption-md-color);
65
- font-size: var(--caption-md-font-size);
66
- line-height: var(--caption-md-line-height);
67
- margin-bottom: var(--caption-md-margin-bottom);
68
- font-weight: var(--caption-md-font-weight);
69
- letter-spacing: var(--caption-md-letter-spacing);
41
+ @apply util-caption-md util-caption-md-text block;
42
+ letter-spacing: var(--heading-md-letter-spacing);
70
43
  }
71
44
  .ds-hint {
72
- font-size: var(--hint-font-size);
73
- line-height: var(--hint-line-height);
74
- margin-bottom: var(--hint-margin-bottom);
75
- color: var(--hint-color);
45
+ @apply util-hint util-hint-text;
76
46
  letter-spacing: var(--hint-letter-spacing);
77
47
  &.ds-hint--lg {
78
- font-size: var(--hint-lg-font-size);
79
- line-height: var(--hint--lg-line-height);
48
+ @apply util-hint-lg-text;
80
49
  }
81
50
  &.ds-hint--sm {
82
- font-size: var(--hint--sm-font-size);
83
- line-height: var(--hint--sm-line-height);
51
+ @apply util-hint-sm-text;
84
52
  }
85
53
  &.ds-hint--break-words {
86
54
  @apply break-words;
@@ -135,14 +103,13 @@
135
103
  @apply font-normal !important;
136
104
  }
137
105
  .ds-\!-font-weight-bold {
138
- @apply font-bold !important;
106
+ @apply util-font-weight-bold-text;
139
107
  }
140
108
  .ds-list {
141
109
  @apply list-none list-outside mt-4;
142
110
  @apply md:mb-8 mb-4 text-base-content;
143
111
  font-size: var(--list-font-size);
144
112
  line-height: var(--list-line-height);
145
- letter-spacing: var(--list-letter-spacing);
146
113
  &.ds-list--bullet {
147
114
  @apply list-disc list-outside pl-4;
148
115
  }
@@ -193,51 +160,32 @@
193
160
  column-count: 2;
194
161
  }
195
162
  }
196
- .ds-blockquote {
197
- @apply mb-4 mt-8 md:mb-8 p-4 border-l-8 border-base-500 text-base-content;
198
- font-size: var(--blockquote-font-size);
199
- line-height: var(--blockquote-line-height);
200
- &.ds-blockquote--dense,
201
- .ds-dense & {
202
- @apply mt-3 md:mb-6 p-3 border-l-6;
203
- }
204
- }
205
163
  .ds-body {
206
- font-size: var(--body-font-size);
207
- line-height: var(--body-line-height);
208
- margin-bottom: var(--body-margin-bottom);
209
- color: var(--body-color);
164
+ @apply util-body-text;
210
165
  letter-spacing: var(--body-letter-spacing);
211
166
  &.ds-body--lg {
212
- font-size: var(--body--lg-font-size);
213
- line-height: var(--body--lg-line-height);
167
+ @apply util-body-lg-text;
214
168
  }
215
169
  &.ds-body--sm {
216
- font-size: var(--body--sm-font-size);
217
- line-height: var(--body--sm-line-height);
170
+ @apply util-body-sm-text;
218
171
  }
219
172
  .ds-code {
220
- @apply p-2 bg-base-200;
173
+ @apply p-1 bg-base-200;
221
174
  }
222
175
  }
223
176
 
224
177
  .ds-link {
225
- @apply focus:text-link-active underline cursor-pointer;
226
- color: var(--link-color);
227
- padding: var(--link-padding);
228
- font-size: var(--link-font-size);
229
- line-height: var(--link-line-height);
178
+ @apply focus:text-link-active util-link util-link-text cursor-pointer;
230
179
  letter-spacing: var(--link-letter-spacing);
231
180
  &:hover {
232
181
  text-decoration-thickness: 2px;
233
182
  color: var(--link-color-hover);
234
183
  }
235
184
  &:focus {
236
- color: var(--link-color-active);
237
- background-color: var(--color-focus);
238
185
  box-shadow:
239
186
  0 -2px var(--color-focus),
240
187
  0 4px var(--color-base-content);
188
+
241
189
  text-decoration: none !important;
242
190
  outline: none;
243
191
  }
@@ -309,6 +257,7 @@
309
257
  }
310
258
 
311
259
  /* overrides */
260
+
312
261
  .ds-hint {
313
262
  .ds-svg-icon {
314
263
  fill: var(--hint-color);
@@ -340,19 +289,8 @@ button.ds-link {
340
289
  fill: var(--color-base-content);
341
290
  }
342
291
  }
343
- .ds-code-block__container {
344
- @apply p-4 bg-base-200 border border-base-300 w-full;
345
- & > pre {
346
- @apply bg-transparent p-0 m-0;
347
- font: inherit;
348
- color: inherit;
349
- }
350
- }
351
292
  .ds-table__cell {
352
293
  & > code {
353
294
  @apply border-none;
354
295
  }
355
296
  }
356
- .ds-code-block__content {
357
- @apply text-sm sm:text-base;
358
- }
@@ -0,0 +1,97 @@
1
+ /* stylelint-disable digigov/nest-related-rules */
2
+ @import './typography.common.css';
3
+
4
+ .ds-\!-font-weight-bold__text {
5
+ @apply util-font-weight-bold-text;
6
+ }
7
+
8
+ /* Heading */
9
+ .ds-heading-xl {
10
+ @apply util-heading-xl;
11
+ }
12
+ .ds-heading-xl__text {
13
+ @apply util-heading-xl-text;
14
+ margin-bottom: var(--heading-xl-margin-bottom);
15
+ }
16
+ .ds-heading-lg__text {
17
+ @apply util-heading-lg-text;
18
+ margin-bottom: var(--heading-lg-margin-bottom);
19
+ }
20
+ .ds-heading-md__text {
21
+ @apply util-heading-md-text;
22
+ margin-bottom: var(--heading-md-margin-bottom);
23
+ }
24
+ .ds-heading-sm__text {
25
+ @apply util-heading-sm-text;
26
+ margin-bottom: var(--heading-sm-margin-bottom);
27
+ }
28
+ .ds-heading-xs__text {
29
+ @apply util-heading-xs-text;
30
+ margin-bottom: var(--heading-xs-margin-bottom);
31
+ }
32
+
33
+ /* Paragraph */
34
+ .ds-body__text {
35
+ @apply util-body-text;
36
+ }
37
+ .ds-body--lg__text {
38
+ @apply util-body-lg-text;
39
+ }
40
+ .ds-body--sm__text {
41
+ @apply util-body-sm-text;
42
+ }
43
+
44
+ /* Hint */
45
+ .ds-hint {
46
+ @apply util-hint flex flex-row;
47
+ }
48
+ .ds-hint__text {
49
+ @apply util-hint-text;
50
+ }
51
+ .ds-hint--lg__text {
52
+ @apply util-hint-lg-text;
53
+ }
54
+ .ds-hint--sm__text {
55
+ @apply util-hint-sm-text;
56
+ }
57
+
58
+ /* Link */
59
+ .ds-link {
60
+ @apply util-link focus:border-b-4 border-b-base-content;
61
+ }
62
+ .ds-link__text {
63
+ @apply util-link-text;
64
+ }
65
+
66
+ /* HeadingCaption */
67
+ .ds-caption-xl {
68
+ @apply util-caption-xl;
69
+ }
70
+ .ds-caption-xl__text {
71
+ @apply util-caption-xl-text;
72
+ }
73
+ .ds-caption-lg {
74
+ @apply util-caption-lg;
75
+ }
76
+ .ds-caption-lg__text {
77
+ @apply util-caption-lg-text;
78
+ }
79
+ .ds-caption-md {
80
+ @apply util-caption-md;
81
+ }
82
+ .ds-caption-md__text {
83
+ @apply util-caption-md-text;
84
+ }
85
+
86
+ .ds-list {
87
+ @apply util-list;
88
+ }
89
+ .ds-list__item {
90
+ @apply util-list-item;
91
+ }
92
+ .ds-list--bullet {
93
+ @apply util-list-bullet;
94
+ }
95
+ .ds-list--number {
96
+ @apply util-list-number;
97
+ }
@@ -0,0 +1,23 @@
1
+ /* stylelint-disable digigov/enforce-class-selector-namespace */
2
+
3
+ @tailwind utilities;
4
+
5
+ @layer utilities {
6
+ .util-warning-text {
7
+ @apply flex pb-0;
8
+ }
9
+ .util-warning-text-text {
10
+ font-size: var(--warning-text-font-size);
11
+ }
12
+ .util-warning-text__icon {
13
+ @apply md:min-h-10 w-10 h-10 rounded-3xl bg-base-content
14
+ print:bg-white print:border-2 print:border-base-content;
15
+ }
16
+ .util-warning-text__icon-text {
17
+ @apply text-base-content-invert font-bold leading-10 text-center
18
+ print:text-base-content;
19
+ }
20
+ .util-warning-text__assistive {
21
+ @apply absolute w-px h-px m-0 p-0 border-0 overflow-hidden !important;
22
+ }
23
+ }
@@ -12,7 +12,7 @@
12
12
  rounded-3xl md:min-h-10 min-w-10 h-fit mr-6 mt-1
13
13
  print:bg-white print:border-2 print:border-base-content print:text-base-content;
14
14
  }
15
- .ds-warning-text__text {
15
+ .ds-warning-text__content {
16
16
  @apply flex items-center;
17
17
  }
18
18
  .ds-warning-text__assistive {
@@ -0,0 +1,22 @@
1
+ @import './warning-text.common.css';
2
+
3
+ .ds-warning-text {
4
+ @apply util-warning-text flex-row items-center mb-4;
5
+ }
6
+ .ds-warning-text__content {
7
+ @apply flex-1 flex;
8
+ }
9
+ .ds-warning-text__content__text {
10
+ /* @apply util-warning-text-text font-bold text-base-content flex-1; */
11
+ @apply text-base-content font-bold p-0 m-0;
12
+ font-size: var(--warning-text-font-size);
13
+ }
14
+ .ds-warning-text__icon {
15
+ @apply util-warning-text__icon mr-4;
16
+ }
17
+ .ds-warning-text__icon__text {
18
+ @apply util-warning-text__icon-text text-2xl;
19
+ }
20
+ .ds-warning-text__assistive {
21
+ @apply util-warning-text__assistive;
22
+ }
@@ -0,0 +1,20 @@
1
+ @import './utilities/index.native';
2
+ @import './components/button.native';
3
+ @import './components/copy-to-clipboard.native';
4
+ @import './components/layout.native';
5
+ @import './components/header.native';
6
+ @import './components/typography.native';
7
+ @import './components/card.native';
8
+ @import './components/blockquote.native';
9
+ @import './components/summary-list.native';
10
+ @import './components/details.native';
11
+ @import './components/dropdown.native';
12
+ @import './components/notification-banner.native';
13
+ @import './components/nav.native';
14
+ @import './components/phase-banner.native';
15
+ @import './components/svg-icons.native';
16
+ @import './components/panel.native';
17
+ @import './components/warning-text.native';
18
+ @import './components/form.native';
19
+ @import './components/checkboxes.native';
20
+ @import './components/radios.native';