@digigov/css 1.0.0-rc → 1.0.0-rc.1

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 (69) hide show
  1. package/defaultTheme/footer.json +5 -5
  2. package/defaultTheme/typography.json +22 -2
  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 +6 -7
  11. package/postcss.config.js +15 -14
  12. package/src/base/index.css +3 -0
  13. package/src/base/postcss.config.js +23 -22
  14. package/src/base/tailwind.config.js +19 -15
  15. package/src/components/accessibility-menu.css +8 -3
  16. package/src/components/accordion.css +67 -13
  17. package/src/components/admin-header.css +27 -1
  18. package/src/components/admin-layout.css +6 -0
  19. package/src/components/autocomplete.css +12 -9
  20. package/src/components/bottom-info.css +2 -1
  21. package/src/components/button.css +86 -27
  22. package/src/components/card.css +30 -15
  23. package/src/components/checkboxes.css +56 -10
  24. package/src/components/chip.css +35 -15
  25. package/src/components/copy-to-clipboard.css +52 -30
  26. package/src/components/drawer.css +17 -26
  27. package/src/components/dropdown.css +52 -52
  28. package/src/components/filter.css +71 -63
  29. package/src/components/footer.css +29 -23
  30. package/src/components/form.css +70 -47
  31. package/src/components/header.css +86 -32
  32. package/src/components/hidden.css +3 -0
  33. package/src/components/index.css +3 -0
  34. package/src/components/kitchensink.css +2 -2
  35. package/src/components/layout.css +21 -22
  36. package/src/components/loader.css +11 -22
  37. package/src/components/masthead.css +78 -0
  38. package/src/components/misc.css +17 -41
  39. package/src/components/modal.css +10 -3
  40. package/src/components/nav.css +93 -126
  41. package/src/components/notification-banner.css +32 -10
  42. package/src/components/pagination.css +38 -24
  43. package/src/components/panel.css +4 -4
  44. package/src/components/phase-banner.css +1 -7
  45. package/src/components/postcss.config.js +15 -16
  46. package/src/components/radios.css +34 -25
  47. package/src/components/stack.css +66 -0
  48. package/src/components/stepnav.css +34 -10
  49. package/src/components/summary-list.css +22 -15
  50. package/src/components/svg-icons.css +2 -62
  51. package/src/components/table.css +75 -56
  52. package/src/components/tabs.css +19 -0
  53. package/src/components/tailwind.config.js +12 -6
  54. package/src/components/task-list.css +28 -15
  55. package/src/components/timeline.css +21 -6
  56. package/src/components/typography.css +104 -63
  57. package/src/components/warning-text.css +23 -0
  58. package/src/fonts.css +1 -1
  59. package/src/index.css +0 -2
  60. package/src/pages/admin-filtering-data.js +1 -1
  61. package/src/pages/dropdown.js +2 -2
  62. package/src/pages/form.js +1 -1
  63. package/src/pages/index.js +12 -10
  64. package/src/utilities/index.css +142 -22
  65. package/src/utilities/postcss.config.js +15 -16
  66. package/src/utilities/tailwind.config.js +10 -1
  67. package/src/utilities/utilities.css +158 -34
  68. package/tailwind.config.js +20 -27
  69. package/themes.plugin.js +95 -100
@@ -3,31 +3,16 @@
3
3
  .govgr-pagination__label {
4
4
  @apply md:text-lg text-base;
5
5
  }
6
- .govgr-label {
7
- @apply text-base-content md:leading-normal flex-row items-center gap-2 md:text-lg text-base;
8
- }
9
6
  .govgr-pagination__item--current {
10
7
  @apply md:text-lg text-base;
11
8
  }
12
- .govgr-select {
13
- text-indent: 0px;
14
- @apply flex text-base-content md:leading-normal border md:text-lg text-base;
15
- &:focus {
16
- -webkit-box-shadow: inset 0 0 0 1px;
17
- box-shadow: inset 0 0 0 1px;
18
- }
19
- }
20
9
  }
21
- .govgr-pagination--size-sm {
22
- .govgr-pagination__label, .govgr-label, .govgr-select, .govgr-pagination__item--current {
23
- @apply md:text-base text-sm;
24
- }
25
- .govgr-pagination__list {
26
- .govgr-link{
27
- @apply md:text-base text-sm !important;
28
- }
10
+ .govgr-pagination--sm {
11
+ .govgr-pagination__label,
12
+ .govgr-pagination__item--current {
13
+ @apply md:text-base text-sm;
29
14
  }
30
- }
15
+ }
31
16
  .govgr-pagination__label {
32
17
  @apply text-base-content md:leading-normal;
33
18
  }
@@ -35,9 +20,6 @@
35
20
  @apply flex items-center;
36
21
  }
37
22
  .govgr-pagination__item {
38
- .govgr-link{
39
- @apply flex items-center no-underline;
40
- }
41
23
  @apply inline-block p-2 m-0;
42
24
  &:first-child {
43
25
  @apply pl-0;
@@ -50,9 +32,41 @@
50
32
  .govgr-pagination__item--dots {
51
33
  @apply font-bold;
52
34
  }
35
+
36
+ /* overrides */
37
+
38
+ .govgr-pagination {
39
+ .govgr-label {
40
+ @apply text-base-content md:leading-normal flex-row items-center gap-2 md:text-lg text-base;
41
+ }
42
+ .govgr-select {
43
+ text-indent: 0px;
44
+ @apply flex text-base-content md:leading-normal border md:text-lg text-base;
45
+ &:focus {
46
+ -webkit-box-shadow: inset 0 0 0 1px;
47
+ box-shadow: inset 0 0 0 1px;
48
+ }
49
+ }
50
+ }
51
+ .govgr-pagination--sm {
52
+ .govgr-label,
53
+ .govgr-select {
54
+ @apply md:text-base text-sm;
55
+ }
56
+ .govgr-pagination__list {
57
+ .govgr-link {
58
+ @apply md:text-base text-sm !important;
59
+ }
60
+ }
61
+ }
62
+ .govgr-pagination__item {
63
+ .govgr-link {
64
+ @apply flex items-center no-underline;
65
+ }
66
+ }
53
67
  .govgr-pagination__item--inactive {
54
68
  .govgr-link {
55
69
  pointer-events: none;
56
70
  @apply text-base-800;
57
71
  }
58
- }
72
+ }
@@ -1,10 +1,10 @@
1
1
  .govgr-panel {
2
2
  @apply box-border mb-4 p-8 border-5 border-transparent text-center
3
- print:p-4;
3
+ print:p-4 text-white
4
+ print:border-4 print:text-base-content print:bg-white;
4
5
  }
5
- .govgr-panel--confirmation {
6
- @apply bg-success text-white
7
- print:border-4 print:border-success print:text-base-content print:bg-white;
6
+ .govgr-panel--success {
7
+ @apply bg-success print:border-success;
8
8
  }
9
9
  .govgr-panel__title {
10
10
  @apply mx-auto mt-0;
@@ -1,4 +1,4 @@
1
- .govgr-phase-banner_header {
1
+ .govgr-phase-banner__header {
2
2
  @apply bg-focus top-0 z-30
3
3
  print:bg-white print:border-focus print:border-2 print:px-4;
4
4
  .govgr-phase-banner {
@@ -22,9 +22,3 @@
22
22
  .govgr-phase-banner__text {
23
23
  @apply table-cell text-base-content;
24
24
  }
25
- .govgr-header,
26
- .govgr-masthead--primary {
27
- .govgr-phase-banner__text {
28
- @apply text-white print:text-base-content;
29
- }
30
- }
@@ -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/components/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/components/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,17 +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
- .govgr-radios--inline {
7
- .govgr-radios__item {
8
- @apply sm:mr-6 sm:float-left sm:clear-none;
9
- }
10
- &::after {
11
- content: "";
12
- display: block;
13
- clear: both;
14
- }
18
+ .govgr-radios--horizontal {
19
+ @apply inline-flex flex-wrap items-baseline gap-4 md:gap-6;
15
20
  }
16
21
  .govgr-radios__item {
17
22
  @apply block relative mb-4 pl-12;
@@ -22,7 +27,7 @@
22
27
  @apply inline-block py-1 px-2 cursor-pointer;
23
28
  }
24
29
  .govgr-radios__input {
25
- @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
26
31
  w-10 h-10 opacity-100 cursor-pointer
27
32
  bg-base-100;
28
33
  appearance: none;
@@ -30,17 +35,10 @@
30
35
  height: 40px;
31
36
  border: 2px solid currentColor;
32
37
  border-radius: 50%;
33
- &::before {
34
- content: "";
35
- @apply absolute bg-base-100 opacity-0 w-0 h-0;
36
- top: 6px;
37
- left: 6px;
38
- border: 12px solid currentColor;
39
- border-radius: 50%;
40
- }
41
38
  &:checked {
42
- &::before {
43
- @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);
44
42
  }
45
43
  }
46
44
  &:focus {
@@ -48,12 +46,23 @@
48
46
  outline-offset: 1px;
49
47
  box-shadow: 0 0 0 4px var(--color-focus);
50
48
  border-width: 4px;
51
- &::before {
52
- top: 4px;
53
- left: 4px;
54
- }
55
49
  }
56
50
  }
57
51
  .govgr-radios__conditional {
58
52
  @apply border-l-4 border-base-500 ml-4 pl-6;
59
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
+ }
@@ -0,0 +1,66 @@
1
+ .govgr-stack {
2
+ @apply flex flex-col flex-wrap;
3
+ }
4
+ .govgr-stack--row {
5
+ @apply flex-row;
6
+ }
7
+ .govgr-stack--reverse-row {
8
+ @apply flex-row-reverse;
9
+ }
10
+ .govgr-stack--col-reverse {
11
+ @apply flex-col-reverse;
12
+ }
13
+ .govgr-stack--nowrap {
14
+ @apply flex-nowrap;
15
+ }
16
+ .govgr-stack--justify-flex-start {
17
+ @apply justify-start;
18
+ }
19
+ .govgr-stack--justify-flex-end {
20
+ @apply justify-end;
21
+ }
22
+ .govgr-stack--justify-center {
23
+ @apply justify-center;
24
+ }
25
+ .govgr-stack--justify-space-between {
26
+ @apply justify-between;
27
+ }
28
+ .govgr-stack--justify-space-around {
29
+ @apply justify-around;
30
+ }
31
+ .govgr-stack--justify-space-evenly {
32
+ @apply justify-evenly;
33
+ }
34
+ .govgr-stack--align-stretch {
35
+ @apply items-stretch;
36
+ }
37
+ .govgr-stack--align-flex-start {
38
+ @apply items-start;
39
+ }
40
+ .govgr-stack--align-flex-end {
41
+ @apply items-end;
42
+ }
43
+ .govgr-stack--align-center {
44
+ @apply items-center;
45
+ }
46
+ .govgr-stack--align-baseline {
47
+ @apply items-baseline;
48
+ }
49
+ .govgr-stack--content-flex-start {
50
+ @apply content-start;
51
+ }
52
+ .govgr-stack--content-flex-end {
53
+ @apply content-end;
54
+ }
55
+ .govgr-stack--content-center {
56
+ @apply content-center;
57
+ }
58
+ .govgr-stack--content-space-between {
59
+ @apply content-between;
60
+ }
61
+ .govgr-stack--content-space-around {
62
+ @apply content-around;
63
+ }
64
+ .govgr-stack--content-space-evenly {
65
+ @apply content-evenly;
66
+ }
@@ -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
  }
@@ -39,6 +46,14 @@
39
46
  &:first-child {
40
47
  @apply border-t-2;
41
48
  }
49
+ .govgr-step-nav__accordion__opened {
50
+ visibility: hidden;
51
+ display: none;
52
+ }
53
+ .govgr-step-nav__accordion__closed {
54
+ visibility: visible;
55
+ display: block;
56
+ }
42
57
  }
43
58
  .govgr-step-nav__accordion[open] {
44
59
 
@@ -50,15 +65,10 @@
50
65
  visibility: hidden;
51
66
  display: none;
52
67
  }
53
- .govgr-nav-step__accordion__content {
54
- @apply block;
55
- }
56
68
  }
69
+
57
70
  .govgr-step-nav__accordion__summary {
58
71
  @apply list-none w-fit mb-0 py-4 pr-8 cursor-pointer;
59
- .govgr-hint {
60
- @apply mb-0 mt-1;
61
- }
62
72
  &::-webkit-details-marker {
63
73
  @apply hidden;
64
74
  }
@@ -136,8 +146,22 @@
136
146
  0 0.1em 0 var(--color-white), -0.1em 0 0 var(--color-white);
137
147
  }
138
148
  .govgr-nav-step__accordion__content {
139
- @apply hidden md:pt-2 mb-6 pt-1 mx-0;
149
+ @apply md:pt-2 mb-6 pt-1 mx-0;
140
150
  > *:last-child {
141
151
  @apply mb-0;
142
152
  }
143
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;