@digigov/css 1.1.1 → 1.2.0-mobile

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 (124) 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 +15 -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 +26 -6
  12. package/dist/base/index.css +3 -3
  13. package/dist/base.js +1 -1
  14. package/dist/components.js +1 -1
  15. package/dist/digigov.css +5 -5
  16. package/dist/utilities/index.css +1 -1
  17. package/dist/utilities.js +1 -1
  18. package/package.json +19 -14
  19. package/postcss.config.js +1 -0
  20. package/src/base/base.css +1 -1
  21. package/src/base/index.css +5 -5
  22. package/src/components/accordion.css +76 -73
  23. package/src/components/admin-header.css +7 -24
  24. package/src/components/admin-layout.css +13 -22
  25. package/src/components/autocomplete.css +106 -64
  26. package/src/components/back-to-top.css +7 -8
  27. package/src/components/blockquote.common.css +14 -0
  28. package/src/components/blockquote.css +9 -0
  29. package/src/components/blockquote.native.css +11 -0
  30. package/src/components/bottom-info.css +3 -2
  31. package/src/components/breadcrumbs.css +21 -12
  32. package/src/components/button.common.css +64 -0
  33. package/src/components/button.css +81 -94
  34. package/src/components/button.native.css +42 -0
  35. package/src/components/card.common.css +33 -0
  36. package/src/components/card.css +77 -64
  37. package/src/components/card.native.css +29 -0
  38. package/src/components/checkboxes.css +34 -37
  39. package/src/components/chip.css +36 -37
  40. package/src/components/components.css +2 -2
  41. package/src/components/copy-to-clipboard.css +39 -38
  42. package/src/components/details.common.css +26 -0
  43. package/src/components/details.css +17 -18
  44. package/src/components/details.native.css +26 -0
  45. package/src/components/dev-theme.css +3 -4
  46. package/src/components/drawer.css +58 -59
  47. package/src/components/dropdown.common.css +58 -0
  48. package/src/components/dropdown.css +81 -68
  49. package/src/components/dropdown.native.css +58 -0
  50. package/src/components/experimental.css +18 -18
  51. package/src/components/fillable.css +6 -6
  52. package/src/components/filter.css +58 -63
  53. package/src/components/footer.css +53 -39
  54. package/src/components/form.common.css +49 -0
  55. package/src/components/form.css +125 -113
  56. package/src/components/form.native.css +58 -0
  57. package/src/components/full-page-background.css +2 -2
  58. package/src/components/header.common.css +36 -0
  59. package/src/components/header.css +78 -77
  60. package/src/components/header.native.css +34 -0
  61. package/src/components/hidden.css +23 -23
  62. package/src/components/index.css +48 -47
  63. package/src/components/kitchensink.css +41 -41
  64. package/src/components/layout.common.css +8 -0
  65. package/src/components/layout.css +56 -56
  66. package/src/components/layout.native.css +5 -0
  67. package/src/components/loader.css +31 -31
  68. package/src/components/masthead.css +60 -59
  69. package/src/components/misc.css +43 -21
  70. package/src/components/modal.css +28 -21
  71. package/src/components/nav.common.css +25 -0
  72. package/src/components/nav.css +96 -89
  73. package/src/components/nav.native.css +38 -0
  74. package/src/components/notification-banner.common.css +46 -0
  75. package/src/components/notification-banner.css +32 -28
  76. package/src/components/notification-banner.native.css +42 -0
  77. package/src/components/pagination.css +40 -41
  78. package/src/components/panel.common.css +30 -0
  79. package/src/components/panel.css +12 -20
  80. package/src/components/panel.native.css +20 -0
  81. package/src/components/phase-banner.common.css +23 -0
  82. package/src/components/phase-banner.css +15 -14
  83. package/src/components/phase-banner.native.css +31 -0
  84. package/src/components/radios.css +33 -30
  85. package/src/components/skeleton.css +85 -0
  86. package/src/components/skiplink.css +3 -3
  87. package/src/components/stack.css +64 -64
  88. package/src/components/stepnav.css +68 -64
  89. package/src/components/summary-list.common.css +25 -0
  90. package/src/components/summary-list.css +59 -47
  91. package/src/components/summary-list.native.css +27 -0
  92. package/src/components/svg-icons.common.css +56 -0
  93. package/src/components/svg-icons.css +79 -75
  94. package/src/components/svg-icons.native.css +55 -0
  95. package/src/components/table.css +189 -208
  96. package/src/components/tabs.css +52 -68
  97. package/src/components/task-list.css +31 -31
  98. package/src/components/test.css +7 -0
  99. package/src/components/timeline.css +19 -18
  100. package/src/components/typography.common.css +137 -0
  101. package/src/components/typography.css +159 -218
  102. package/src/components/typography.native.css +93 -0
  103. package/src/components/warning-text.common.css +23 -0
  104. package/src/components/warning-text.css +11 -11
  105. package/src/components/warning-text.native.css +22 -0
  106. package/src/index.native.css +17 -0
  107. package/src/pages/headings/service-heading.js +9 -9
  108. package/src/pages/index.js +201 -201
  109. package/src/utilities/grid.css +221 -0
  110. package/src/utilities/grid.native.css +274 -0
  111. package/src/utilities/index.css +3 -585
  112. package/src/utilities/index.native.css +2 -0
  113. package/src/utilities/print.css +11 -0
  114. package/src/utilities/spacing.css +2133 -0
  115. package/src/utilities/utilities.css +1647 -531
  116. package/tailwind.config.js +2 -2
  117. package/themes.plugin.js +1 -1
  118. package/defaultTheme/footer.json +0 -8
  119. package/src/pages/admin-filtering-data.js +0 -160
  120. package/src/pages/admin.js +0 -61
  121. package/src/pages/dropdown.js +0 -249
  122. package/src/pages/form.js +0 -400
  123. package/src/pages/pagination.js +0 -124
  124. package/src/pages/table.js +0 -308
@@ -1,103 +1,145 @@
1
- .govgr-autocomplete__wrapper {
1
+ .ds-autocomplete__container {
2
2
  @apply relative;
3
3
  }
4
- .govgr-autocomplete__status {}
5
- .govgr-autocomplete__status__wrapper {
6
- @apply border-0 h-px overflow-hidden absolute whitespace-nowrap p-0 w-px;
4
+ .ds-autocomplete__status {
5
+ }
6
+ .ds-autocomplete__status__container {
7
+ @apply border-0 h-px overflow-hidden absolute whitespace-nowrap p-0 w-px -mb-px -mr-px;
7
8
  clip: "rect(0 0 0 0)";
8
- margin-bottom: "-1px";
9
- margin-right: "-1px";
10
9
  }
11
- .govgr-autocomplete__hint {
10
+ .ds-autocomplete__hint {
12
11
  @apply absolute text-base-400;
13
12
  }
14
- .govgr-autocomplete__hint,
15
- .govgr-autocomplete__input {
13
+ .ds-autocomplete__hint,
14
+ .ds-autocomplete__input {
16
15
  @apply md:text-lg text-base p-2 w-full border-2 border-base-content;
17
16
  appearance: none;
18
- -webkit-appearance: none;
19
17
  box-sizing: border-box;
20
- -moz-box-sizing: border-box;
21
- -webkit-box-sizing: border-box;
22
- }
23
- .govgr-autocomplete__input {
24
- @apply relative bg-transparent;
25
- }
26
- .govgr-autocomplete__input--default {
27
- @apply p-2;
28
- }
29
- .govgr-autocomplete__input--focused {
30
- outline: 4px solid var(--color-focus);
31
- outline-offset: 0;
32
- -webkit-box-shadow: inset 0 0 0 2px;
33
- box-shadow: inset 0 0 0 2px;
34
18
  }
35
- .govgr-autocomplete__input--show-all-values {
36
- @apply cursor-pointer;
19
+ .ds-autocomplete__input {
20
+ @apply relative bg-transparent cursor-pointer pr-8;
21
+ &.ds-autocomplete__input--focused {
22
+ outline: 4px solid var(--color-focus);
23
+ outline-offset: 0;
24
+ -webkit-box-shadow: inset 0 0 0 2px;
25
+ box-shadow: inset 0 0 0 2px;
26
+ }
37
27
  }
38
- .govgr-autocomplete__dropdown-arrow-down {
39
- @apply inline-block absolute right-2 top-4 w-6 h-6;
40
- z-index: -1;
28
+ .ds-autocomplete__container > .ds-svg-icon {
29
+ @apply inline-block absolute right-2 top-3;
30
+ pointer-events: none;
41
31
  }
42
- .govgr-autocomplete__menu {
43
- @apply bg-base-100 m-0 max-h-96 overflow-x-hidden w-full p-0 border-2 border-t-0 border-base-content /* border-t-0 border-x-2 border-l-2 border-base-content */;
32
+ .ds-autocomplete__multi-input-container > .ds-link {
33
+ @apply inline-block absolute right-2 top-4;
34
+ .ds-svg-icon {
35
+ @apply ml-0 fill-base-content;
36
+ }
44
37
  }
45
- .govgr-autocomplete__menu--inline {
46
- @apply relative;
38
+ .ds-autocomplete__multi-input-container {
39
+ @apply w-full p-2 pr-8 border-2 border-base-content bg-base-100
40
+ flex gap-2 flex-wrap items-center;
41
+ min-height: 52px;
42
+ text-indent: 2px;
43
+ &:focus,
44
+ &.ds-autocomplete__multi-input-container--focused {
45
+ outline: 4px solid var(--color-focus);
46
+ outline-offset: 0;
47
+ -webkit-box-shadow: inset 0 0 0 2px;
48
+ box-shadow: inset 0 0 0 2px;
49
+ }
50
+ &:not(.ds-autocomplete__multi-input-container--focused) {
51
+ &.ds-autocomplete__multi-input-container--1 {
52
+ .ds-chip + .ds-chip {
53
+ @apply hidden;
54
+ }
55
+ }
56
+ &.ds-autocomplete__multi-input-container--2 {
57
+ .ds-chip + .ds-chip + .ds-chip {
58
+ @apply hidden;
59
+ }
60
+ }
61
+ &.ds-autocomplete__multi-input-container--3 {
62
+ .ds-chip + .ds-chip + .ds-chip + .ds-chip {
63
+ @apply hidden;
64
+ }
65
+ }
66
+ }
47
67
  }
48
- .govgr-autocomplete__menu--overlay {
49
- @apply absolute w-full left-0 top-full z-50 shadow-xl;
68
+ .ds-autocomplete__multi-input {
69
+ @apply flex-1 w-full focus:border-0 focus:outline-0 bg-base-100;
50
70
  }
51
- .govgr-autocomplete__menu--visible {
52
- @apply block;
71
+ .ds-autocomplete__multi-btn {
72
+ @apply absolute bottom-0 right-0 m-2;
73
+ margin: 4px 2px;
74
+ height: 44px;
75
+ .ds-svg-icon {
76
+ @apply mx-2 !important;
77
+ }
53
78
  }
54
- .govgr-autocomplete__menu--hidden {
55
- @apply hidden;
79
+
80
+ .ds-autocomplete__menu {
81
+ @apply block max-h-64 md:max-h-96 w-full m-0 p-0 overflow-x-hidden
82
+ border-2 border-t-0 border-base-content bg-base-100
83
+ absolute left-0 top-full z-50 shadow-xl;
84
+ &.ds-autocomplete__menu--hidden {
85
+ @apply hidden;
86
+ }
56
87
  }
57
- .govgr-autocomplete__option {
58
- @apply cursor-pointer block relative p-2;
59
- border-bottom: solid var(--color-base-400);
88
+ .ds-autocomplete__option {
89
+ @apply cursor-pointer block relative p-2 border-b-base-400;
60
90
  border-width: 1px 0;
91
+ &.ds-autocomplete__option--odd {
92
+ @apply bg-base-300;
93
+ }
94
+ &.ds-autocomplete__option--focused,
95
+ &.ds-autocomplete__option:hover {
96
+ @apply bg-info text-white outline-none border-tertiary;
97
+ }
98
+ &.ds-autocomplete__option--no-results {
99
+ @apply text-current cursor-not-allowed;
100
+ }
101
+ &.ds-autocomplete__option--empty {
102
+ @apply cursor-default;
103
+ @apply bg-base-100 text-base-content !important;
104
+ &:hover {
105
+ border-color: var(--color-base-400);
106
+ }
107
+ }
61
108
  }
62
- .govgr-autocomplete__option > * {
109
+ .ds-autocomplete__option > * {
63
110
  @apply pointer-events-none;
111
+ &:first-of-type,
112
+ &:last-of-type {
113
+ @apply border-t-0;
114
+ }
64
115
  }
65
- .govgr-autocomplete__option:first-of-type {
66
- @apply border-t-0;
67
- }
68
- .govgr-autocomplete__option:last-of-type {
69
- @apply border-t-0;
70
- }
71
- .govgr-autocomplete__option--odd {
116
+ .ds-autocomplete__option--odd {
72
117
  @apply bg-base-300;
73
118
  }
74
- .govgr-autocomplete__option--focused,
75
- .govgr-autocomplete__option:hover {
119
+ .ds-autocomplete__option--focused,
120
+ .ds-autocomplete__option:hover {
76
121
  @apply bg-info text-white outline-none border-tertiary;
77
122
  }
78
- .govgr-autocomplete__option--no-results {
123
+ .ds-autocomplete__option--no-results {
79
124
  @apply text-current cursor-not-allowed;
80
125
  }
81
- .govgr-autocomplete__option--empty {
82
- @apply cursor-default;
126
+ .ds-autocomplete__option--empty {
127
+ @apply cursor-default hover:border-base-400;
83
128
  @apply bg-base-100 text-base-content !important;
84
- &:hover {
85
- border-color: var(--color-base-400);
86
- }
87
129
  }
88
- .govgr-autocomplete__hint,
89
- .govgr-autocomplete__option {
130
+ .ds-autocomplete__hint,
131
+ .ds-autocomplete__option {
90
132
  @apply p-2;
91
133
  }
92
- .govgr-autocomplete__assistive-hint {
134
+ .ds-autocomplete__assistive-hint {
93
135
  @apply hidden;
94
136
  }
95
137
 
96
138
  /* overrides */
97
139
 
98
- .govgr-autocomplete__option--focused,
99
- .govgr-autocomplete__option:hover {
100
- .govgr-hint {
140
+ .ds-autocomplete__option--focused,
141
+ .ds-autocomplete__option:hover {
142
+ .ds-hint {
101
143
  @apply text-base-300;
102
144
  }
103
145
  }
@@ -1,12 +1,11 @@
1
- .govgr-back-to-top-content {
2
-
1
+ .ds-back-to-top-content {
3
2
  }
4
-
5
- .govgr-back-to-top-link {
3
+
4
+ .ds-back-to-top-link {
5
+ @apply w-fit underline flex mb-4 cursor-pointer items-baseline;
6
6
  font-size: var(--back-to-top-link-font-size);
7
7
  letter-spacing: var(--back-to-top-link-letter-spacing);
8
8
  color: var(--back-to-top-link-color);
9
- @apply w-fit underline flex mb-4 cursor-pointer items-baseline;
10
9
  &:hover {
11
10
  text-decoration-thickness: 2px;
12
11
  }
@@ -22,8 +21,8 @@
22
21
 
23
22
  /* overrides */
24
23
 
25
- .govgr-back-to-top-link {
26
- .govgr-svg-icon {
24
+ .ds-back-to-top-link {
25
+ .ds-svg-icon {
27
26
  fill: var(--back-to-top-link-color);
28
27
  }
29
- }
28
+ }
@@ -0,0 +1,14 @@
1
+ @tailwind utilities;
2
+
3
+ @layer utilities {
4
+ .util-blockquote {
5
+ @apply mb-4 mt-8 md:mb-8 p-4 border-l-8 border-base-500 text-base-content;
6
+ }
7
+ .util-blockquote-text {
8
+ font-size: var(--blockquote-font-size);
9
+ line-height: var(--blockquote-line-height);
10
+ }
11
+ .util-blockquote--dense {
12
+ @apply mt-3 md:mb-6 p-3 border-l-6;
13
+ }
14
+ }
@@ -0,0 +1,9 @@
1
+ @import './blockquote.common.css';
2
+
3
+ .ds-blockquote {
4
+ @apply util-blockquote util-blockquote-text;
5
+ &.ds-blockquote--dense,
6
+ .ds-dense & {
7
+ @apply util-blockquote--dense;
8
+ }
9
+ }
@@ -0,0 +1,11 @@
1
+ @import './blockquote.common.css';
2
+
3
+ .ds-blockquote {
4
+ @apply util-blockquote;
5
+ }
6
+ .ds-blockquote__text {
7
+ @apply util-blockquote-text;
8
+ }
9
+ .ds-blockquote--dense {
10
+ @apply util-blockquote--dense;
11
+ }
@@ -1,5 +1,6 @@
1
- .govgr-bottom-info {
1
+ .ds-bottom-info {
2
2
  @apply w-full bg-base-200 border-t border-base-400;
3
3
  @apply md:py-6 !important;
4
4
  }
5
- .govgr-bottom-info__content {}
5
+ .ds-bottom-info__content {
6
+ }
@@ -1,20 +1,24 @@
1
- .govgr-breadcrumbs {
1
+ .ds-breadcrumbs {
2
2
  @apply block font-normal text-base-content mt-4 mb-2;
3
3
  }
4
- .govgr-breadcrumbs__list {
4
+ .ds-breadcrumbs__list {
5
5
  @apply block m-0 p-0 list-none;
6
- &:after {
7
- content: "";
6
+ &::after {
7
+ content: '';
8
8
  display: block;
9
9
  clear: both;
10
10
  }
11
11
  }
12
- .govgr-breadcrumbs__list-item {
13
- font-size: var(--breadcrumbs__list-item-font-size);
12
+ .ds-breadcrumbs__list-item {
14
13
  @apply inline-block relative mb-1 ml-2 pl-4 float-left;
14
+ font-size: var(--breadcrumbs__list-item-font-size);
15
+ &[aria-current='page'] {
16
+ @apply font-semibold;
17
+ }
15
18
  &::before {
16
- content: "";
17
- @apply block absolute top-2 bottom-0 left-0 md:w-3 md:h-3 w-2 h-2 mx-auto my-0 bg-contain bg-no-repeat bg-center;
19
+ @apply block absolute top-2 bottom-0 left-0 md:w-3 md:h-3 w-2 h-2 mx-auto my-0
20
+ bg-contain bg-no-repeat bg-center;
21
+ content: '';
18
22
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-hidden='true'> <path d='M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z' /> </svg>");
19
23
  }
20
24
  &:first-child {
@@ -25,24 +29,29 @@
25
29
  }
26
30
  }
27
31
  @media print {
28
- .govgr-breadcrumbs__list-item {
32
+ .ds-breadcrumbs__list-item {
29
33
  &::before {
30
34
  background-image: none;
31
35
  top: 2px;
32
- left: 0px;
36
+ left: 0;
33
37
  content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-hidden='true'> <path d='M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z' /> </svg>");
34
38
  }
35
39
  }
36
40
  }
37
- .govgr-breadcrumbs__link {
41
+ .ds-breadcrumbs__link {
38
42
  @apply underline;
39
43
  &:hover {
40
44
  text-decoration-thickness: 2px;
41
45
  }
42
46
  &:focus {
43
47
  background-color: var(--color-focus);
44
- box-shadow: 0 -2px var(--color-focus), 0 4px var(--color-base-content);
48
+ box-shadow:
49
+ 0 -2px var(--color-focus),
50
+ 0 4px var(--color-base-content);
45
51
  text-decoration: none;
46
52
  outline: none;
47
53
  }
54
+ &.ds-breadcrumbs__link--inactive {
55
+ @apply no-underline;
56
+ }
48
57
  }
@@ -0,0 +1,64 @@
1
+ /* stylelint-disable declaration-block-no-redundant-longhand-properties */
2
+ /* stylelint-disable digigov/nest-related-rules */
3
+ /* stylelint-disable digigov/enforce-class-selector-namespace */
4
+ @tailwind utilities;
5
+
6
+ @layer utilities {
7
+ .util-btn {
8
+ @apply m-0 mb-8 flex items-center;
9
+ border-radius: var(--btn-border-radius);
10
+ }
11
+ .util-btn-text {
12
+ @apply text-white font-medium no-underline;
13
+ font-size: var(--btn-font-size);
14
+ letter-spacing: var(--letter-spacing-wide);
15
+ color: var(--color-base-100);
16
+ padding-right: var(--btn-padding-x);
17
+ padding-left: var(--btn-padding-x);
18
+ padding-top: var(--btn-padding-y);
19
+ padding-bottom: var(--btn-padding-y);
20
+ }
21
+ .util-btn-primary {
22
+ /* @apply print:border-2 print:border-success print:shadow-none; */
23
+ box-shadow: var(--btn-primary-box-shadow);
24
+ background-color: var(--btn-primary-background-color);
25
+ }
26
+ .util-btn-primary-text {
27
+ @apply hover:no-underline;
28
+ color: var(--btn-primary-color);
29
+ }
30
+ .util-btn-secondary {
31
+ /* @apply print:border-2 print:border-base-700 print:shadow-none; */
32
+ box-shadow: var(--btn-secondary-box-shadow);
33
+ background-color: var(--btn-secondary-background-color);
34
+ }
35
+ .util-btn-secondary-text {
36
+ @apply hover:no-underline;
37
+ color: var(--btn-secondary-color) !important;
38
+ }
39
+ .util-btn-warning {
40
+ /* @apply print:border-2 print:border-error print:shadow-none; */
41
+ box-shadow: var(--btn-warning-box-shadow);
42
+ background-color: var(--btn-warning-background-color);
43
+ }
44
+ .util-btn-warning-text {
45
+ @apply hover:no-underline;
46
+ color: var(--btn-warning-color);
47
+ }
48
+
49
+ .util-btn--dense {
50
+ @apply min-h-6;
51
+ }
52
+ .util-btn--dense-text {
53
+ --btn-padding-y: 0.375rem;
54
+ --btn-padding-x: 0.75rem;
55
+ @apply min-h-6;
56
+ }
57
+
58
+ .util-btn--disabled {
59
+ opacity: 0.5;
60
+ }
61
+ .util-btn--disabled-text {
62
+ @apply print:text-base-400;
63
+ }
64
+ }
@@ -1,45 +1,35 @@
1
- .govgr-btn,
2
- .govgr-btn[type=submit],
3
- .govgr-btn[type=button],
4
- .govgr-btn[type=reset] {
5
- @apply no-underline font-medium cursor-pointer
6
- m-0 mb-8 w-max min-h-10 md:min-h-12
7
- flex gap-x-3 items-center;
8
- border-radius: var(--btn-border-radius);
9
- padding: var(--btn-padding);
10
- letter-spacing: var(--btn-letter-spacing);
11
- font-size: var(--btn-font-size);
1
+ @import './button.common.css';
2
+ .ds-btn,
3
+ .ds-btn[type='submit'],
4
+ .ds-btn[type='button'],
5
+ .ds-btn[type='reset'] {
6
+ @apply util-btn util-btn-text min-h-10 md:min-h-12 w-max cursor-pointer gap-x-3;
12
7
  &:focus {
13
- -webkit-box-shadow: 0 0 0 2px var(--color-white),
14
- 0 0 0 6px var(--color-base-content), 0 0 0 10px var(--color-focus);
15
- box-shadow: 0 0 0 2px var(--color-white),
16
- 0 0 0 6px var(--color-base-content), 0 0 0 10px var(--color-focus);
8
+ box-shadow:
9
+ 0 0 0 2px var(--color-white),
10
+ 0 0 0 6px var(--color-base-content),
11
+ 0 0 0 10px var(--color-focus);
17
12
  }
18
13
  &:focus-within {
19
14
  @apply outline-none;
20
15
  }
21
- &.govgr-btn--dense,
22
- .govgr-dense & {
23
- --btn-padding: 0.375rem 0.75rem;
24
- @apply min-h-8;
16
+
17
+ &.ds-btn--dense,
18
+ .ds-dense & {
19
+ @apply util-btn--dense;
25
20
  &:focus {
26
- -webkit-box-shadow: 0 0 0 2px var(--color-white),
27
- 0 0 0 5px var(--color-base-content), 0 0 0 8px var(--color-focus);
28
- box-shadow: 0 0 0 2px var(--color-white),
29
- 0 0 0 5px var(--color-base-content), 0 0 0 8px var(--color-focus);
21
+ box-shadow:
22
+ 0 0 0 2px var(--color-white),
23
+ 0 0 0 5px var(--color-base-content),
24
+ 0 0 0 8px var(--color-focus);
30
25
  }
31
26
  }
32
27
  }
33
- .govgr-btn-primary,
34
- .govgr-btn-primary[type="submit"],
35
- .govgr-btn-primary[type="button"],
36
- .govgr-btn-primary[type="reset"] {
37
- -webkit-box-shadow: 0 2px 0 var(--color-base-content);
38
- box-shadow: 0 2px 0 var(--color-base-content);
39
- background-color: var(--btn-primary-background-color);
40
- color: var(--btn-primary-color);
41
- @apply hover:no-underline
42
- print:border-2 print:border-success print:shadow-none;
28
+ .ds-btn-primary,
29
+ .ds-btn-primary[type='submit'],
30
+ .ds-btn-primary[type='button'],
31
+ .ds-btn-primary[type='reset'] {
32
+ @apply util-btn-primary util-btn-primary-text;
43
33
  &:hover {
44
34
  background-color: var(--btn-primary-background-color-hover);
45
35
  color: var(--btn-primary-color-hover);
@@ -48,20 +38,19 @@
48
38
  background-color: var(--btn-primary-background-color-active);
49
39
  }
50
40
  }
51
- .govgr-btn-cta {
41
+ .ds-btn-cta {
52
42
  @apply py-4 print:pr-2;
53
43
  font-size: var(--btn-cta-font-size);
44
+ &.ds-btn--dense,
45
+ .ds-dense & {
46
+ @apply py-3 px-4;
47
+ }
54
48
  }
55
- .govgr-btn-secondary,
56
- .govgr-btn-secondary[type="submit"],
57
- .govgr-btn-secondary[type="button"],
58
- .govgr-btn-secondary[type="reset"] {
59
- -webkit-box-shadow: 0 2px 0 var(--color-base-500);
60
- box-shadow: 0 2px 0 var(--color-base-500);
61
- @apply hover:no-underline
62
- print:border-2 print:border-base-700 print:shadow-none;
63
- background-color: var(--btn-secondary-background-color);
64
- color: var(--btn-secondary-color);
49
+ .ds-btn-secondary,
50
+ .ds-btn-secondary[type='submit'],
51
+ .ds-btn-secondary[type='button'],
52
+ .ds-btn-secondary[type='reset'] {
53
+ @apply util-btn-secondary util-btn-secondary-text;
65
54
  &:hover {
66
55
  background-color: var(--btn-secondary-background-color-hover);
67
56
  color: var(--btn-secondary-color-hover);
@@ -70,16 +59,11 @@
70
59
  background-color: var(--btn-secondary-background-color-active);
71
60
  }
72
61
  }
73
- .govgr-btn-warning,
74
- .govgr-btn-warning[type="submit"],
75
- .govgr-btn-warning[type="button"],
76
- .govgr-btn-warning[type="reset"] {
77
- -webkit-box-shadow: 0 2px 0 var(--color-base-content);
78
- box-shadow: 0 2px 0 var(--color-base-content);
79
- @apply hover:no-underline
80
- print:border-2 print:border-error print:shadow-none;
81
- background-color: var(--btn-warning-background-color);
82
- color: var(--btn-warning-color);
62
+ .ds-btn-warning,
63
+ .ds-btn-warning[type='submit'],
64
+ .ds-btn-warning[type='button'],
65
+ .ds-btn-warning[type='reset'] {
66
+ @apply util-btn-warning util-btn-warning-text;
83
67
  &:hover {
84
68
  background-color: var(--btn-warning-background-color-hover);
85
69
  color: var(--btn-warning-color-hover);
@@ -89,85 +73,88 @@
89
73
  background-color: var(--btn-warning-background-color-active);
90
74
  }
91
75
  }
92
- .govgr-btn--disabled {
93
- @apply opacity-50 hover:bg-opacity-50
94
- print:text-base-400 print:border-opacity-50;
76
+ .ds-btn--disabled {
95
77
  @apply cursor-not-allowed !important;
78
+ @apply util-btn--disabled util-btn--disabled-text;
96
79
  }
97
- .govgr-svg-icon--caret {
98
- fill: var(--color-base-content);
99
- @apply w-4 h-4 inline-block;
100
- }
101
- .govgr-close-btn {
80
+ .ds-close-btn {
102
81
  @apply flex flex-nowrap text-right w-max float-right items-center;
103
82
  }
104
83
 
105
84
  /* overrides */
106
85
 
107
- .govgr-btn {
108
- .govgr-svg-icon {
86
+ .ds-btn {
87
+ .ds-svg-icon {
109
88
  @apply h-4 w-4 inline transition-all;
110
89
  }
111
90
  }
112
- .govgr-btn-primary,
113
- .govgr-btn-warning {
114
- .govgr-svg-icon {
115
- fill: var(--color-white);
91
+ .ds-btn-primary {
92
+ .ds-svg-icon {
93
+ fill: var(--btn-primary-color);
116
94
  }
117
- .govgr-svg-icon--more-vert {
95
+ /* stylelint-disable-next-line digigov/nest-related-rules */
96
+ .ds-svg-icon--more-vert {
118
97
  @apply h-6 w-6 md:h-8 md:w-8;
119
98
  }
120
99
  }
121
- .govgr-btn-cta {
122
- .govgr-svg-icon--chevron {
123
- @apply w-5 h-5 inline-block ml-2 mr-2 transition-all;
100
+ .ds-btn-warning {
101
+ .ds-svg-icon {
102
+ fill: var(--color-white);
103
+ &.ds-svg-icon--more-vert {
104
+ @apply h-6 w-6 md:h-8 md:w-8;
105
+ }
124
106
  }
107
+ }
108
+ .ds-btn-cta {
125
109
  &:hover {
126
- .govgr-svg-icon--chevron {
110
+ .ds-svg-icon {
127
111
  @apply ml-4 mr-0;
128
112
  }
129
113
  }
114
+ .ds-svg-icon {
115
+ @apply w-5 h-5 inline-block ml-2 mr-2 transition-all;
116
+ }
130
117
  }
131
- .govgr-btn-secondary {
132
- .govgr-svg-icon {
118
+ .ds-btn-secondary {
119
+ .ds-svg-icon {
133
120
  fill: var(--color-base-content);
134
- }
135
- .govgr-svg-icon--more-vert {
136
- @apply h-6 w-6;
121
+ &.ds-svg-icon--more-vert {
122
+ @apply h-6 w-6;
123
+ }
137
124
  }
138
125
  }
139
- .govgr-close-btn {
140
- .govgr-svg-icon--close {
141
- @apply w-5 h-5 float-right;
142
- @apply ml-1 !important;
143
- fill: var(--color-link);
144
- }
126
+ .ds-close-btn {
145
127
  &:focus {
146
- .govgr-svg-icon--close {
128
+ .ds-svg-icon--close {
147
129
  fill: var(--color-link-active);
148
130
  }
149
131
  }
150
132
  &:hover {
151
- .govgr-svg-icon--close {
133
+ .ds-svg-icon--close {
152
134
  fill: var(--color-link-hover);
153
135
  }
154
136
  }
137
+ .ds-svg-icon--close {
138
+ @apply w-5 h-5 float-right;
139
+ @apply ml-1 !important;
140
+ fill: var(--color-link);
141
+ }
155
142
  }
156
143
  @media print {
157
- .govgr-btn {
158
- .govgr-circular-progress--secondary {
159
- .govgr-circular-progress__circle--1,
160
- .govgr-circular-progress__circle--2 {
144
+ .ds-btn {
145
+ .ds-circular-progress--secondary {
146
+ .ds-circular-progress__circle--1,
147
+ .ds-circular-progress__circle--2 {
161
148
  stroke: var(--color-base-content);
162
149
  }
163
150
  }
164
151
  }
165
152
  }
166
153
  @media print {
167
- .govgr-btn-primary,
168
- .govgr-btn-warning,
169
- .govgr-btn-secondary {
170
- .govgr-svg-icon {
154
+ .ds-btn-primary,
155
+ .ds-btn-warning,
156
+ .ds-btn-secondary {
157
+ .ds-svg-icon {
171
158
  fill: var(--color-base-content);
172
159
  }
173
160
  }