@digigov/css 0.35.0 → 0.36.0
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.
- package/defaultTheme/brandConfig.json +135 -0
- package/defaultTheme/button.json +3 -3
- package/defaultTheme/index.js +7 -66
- package/defaultTheme/typography.json +4 -4
- package/dist/base/index.css +3 -3
- package/dist/base.js +1 -1
- package/dist/components.js +1 -1
- package/dist/digigov.css +4 -4
- package/package.json +4 -2
- package/src/base/index.css +1 -1
- package/src/components/accessibility-menu.css +6 -6
- package/src/components/accordion.css +2 -2
- package/src/components/admin-footer.css +1 -1
- package/src/components/admin-form.css +1 -1
- package/src/components/admin-header.css +1 -1
- package/src/components/autocomplete.css +7 -7
- package/src/components/bottom-info.css +1 -1
- package/src/components/button.css +5 -5
- package/src/components/card.css +3 -3
- package/src/components/checkboxes.css +2 -2
- package/src/components/cookie.css +1 -1
- package/src/components/details.css +1 -1
- package/src/components/drawer.css +17 -8
- package/src/components/dropdown.css +10 -7
- package/src/components/fillable.css +2 -2
- package/src/components/filter.css +6 -6
- package/src/components/footer.css +3 -3
- package/src/components/form.css +3 -3
- package/src/components/full-page-background.css +1 -1
- package/src/components/header.css +9 -9
- package/src/components/kitchensink.css +1 -4
- package/src/components/layout.css +1 -1
- package/src/components/misc.css +4 -4
- package/src/components/modal.css +3 -3
- package/src/components/nav.css +7 -5
- package/src/components/notification-banner.css +4 -4
- package/src/components/pagination.css +2 -2
- package/src/components/phase-banner.css +4 -4
- package/src/components/radios.css +2 -2
- package/src/components/stepnav.css +4 -4
- package/src/components/summary-list.css +2 -2
- package/src/components/svg-icons.css +3 -3
- package/src/components/table.css +28 -9
- package/src/components/tabs.css +3 -3
- package/src/components/task-list.css +5 -5
- package/src/components/typography.css +6 -6
- package/tailwind.config.js +34 -31
- package/themes.plugin.js +26 -23
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
}
|
|
25
25
|
.govgr-pagination__item--inactive {
|
|
26
26
|
.govgr-link {
|
|
27
|
-
@apply flex text-
|
|
27
|
+
@apply flex text-base-800 cursor-not-allowed no-underline font-normal;
|
|
28
28
|
}
|
|
29
29
|
.govgr-arrow--left, .govgr-arrow--right {
|
|
30
|
-
fill:var(--color-
|
|
30
|
+
fill:var(--color-base-800);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
@apply py-2 mb-4;
|
|
3
3
|
}
|
|
4
4
|
.govgr-phase-banner__underline {
|
|
5
|
-
@apply border-
|
|
5
|
+
@apply border-base-500 border-b;
|
|
6
6
|
}
|
|
7
7
|
.govgr-phase-banner__content {
|
|
8
8
|
font-size: var(--phase-banner__content-font-size);
|
|
9
9
|
@apply table;
|
|
10
10
|
}
|
|
11
11
|
.govgr-phase-banner__content__tag {
|
|
12
|
-
@apply px-2 py-1 mr-2 inline-block bg-
|
|
13
|
-
print:bg-white print:border-2 print:border-
|
|
12
|
+
@apply px-2 py-1 mr-2 inline-block bg-info font-sans text-white text-sm uppercase tracking-widest
|
|
13
|
+
print:bg-white print:border-2 print:border-info print:text-info print:mr-4;
|
|
14
14
|
}
|
|
15
15
|
.govgr-phase-banner__text {
|
|
16
16
|
@apply table-cell text-base-content;
|
|
17
17
|
}
|
|
18
18
|
.govgr-header .govgr-phase-banner__text, .govgr-masthead--primary .govgr-phase-banner__text {
|
|
19
|
-
@apply text-
|
|
19
|
+
@apply text-white print:text-base-content;
|
|
20
20
|
}
|
|
21
21
|
.govgr-phase-banner_header {
|
|
22
22
|
@apply bg-focus top-0 z-30
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
.govgr-radios__input {
|
|
20
20
|
@apply absolute z-1 left-0.5 -top-1 m-0 rounded-3xl
|
|
21
21
|
w-10 h-10 opacity-100 cursor-pointer
|
|
22
|
-
bg-
|
|
22
|
+
bg-base-100 m-0;
|
|
23
23
|
appearance: none;
|
|
24
24
|
width: 40px;
|
|
25
25
|
height: 40px;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
border-radius: 50%;
|
|
28
28
|
&::before {
|
|
29
29
|
content: "";
|
|
30
|
-
@apply absolute bg-
|
|
30
|
+
@apply absolute bg-base-100 opacity-0 w-0 h-0;
|
|
31
31
|
top: 6px;
|
|
32
32
|
left: 6px;
|
|
33
33
|
border: 12px solid currentColor;
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
height: calc(100% - 2rem);
|
|
19
19
|
}
|
|
20
20
|
&:after {
|
|
21
|
-
@apply absolute z-/1 w-0 h-full bg-
|
|
21
|
+
@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;
|
|
22
22
|
content: "";
|
|
23
23
|
margin-left: calc(0.75rem + 1px);
|
|
24
24
|
}
|
|
25
25
|
&:last-child:before {
|
|
26
|
-
@apply absolute z-1 left-0 h-0 bottom-0 ml-2 w-3 border border-
|
|
26
|
+
@apply absolute z-1 left-0 h-0 bottom-0 ml-2 w-3 border border-base-400;
|
|
27
27
|
@apply md:border-t-2 md:ml-2 md:w-5;
|
|
28
28
|
content: "";
|
|
29
29
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
text-shadow: 0 -0.1em 0 var(--color-white), 0.1em 0 0 var(--color-white), 0 0.1em 0 var(--color-white), -0.1em 0 0 var(--color-white);
|
|
47
47
|
}
|
|
48
48
|
.govgr-step-nav__circle--number {
|
|
49
|
-
@apply border-2 border-
|
|
49
|
+
@apply border-2 border-base-400;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.govgr-step-nav__circle--number {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
@apply md:border-0 border-0;
|
|
61
61
|
}
|
|
62
62
|
.govgr-step-nav__accordion {
|
|
63
|
-
@apply border-
|
|
63
|
+
@apply border-base-400;
|
|
64
64
|
|
|
65
65
|
&:first-child {
|
|
66
66
|
@apply border-t-2;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
.govgr-summary-list__row {
|
|
17
17
|
@apply block sm:flex
|
|
18
|
-
pb-4 mb-4 border-b border-solid border-
|
|
18
|
+
pb-4 mb-4 border-b border-solid border-base-300
|
|
19
19
|
sm:pb-0 sm:mb-0 sm:border-0 print:flex print:flex-row print:flex-nowrap;
|
|
20
20
|
}
|
|
21
21
|
.govgr-summary-list--no-border .govgr-summary-list__row {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
.govgr-summary-list__value,
|
|
68
68
|
.govgr-summary-list__actions {
|
|
69
69
|
@apply m-0
|
|
70
|
-
sm:table-cell sm:py-2 sm:pr-4 sm:border-b sm:border-solid sm:border-
|
|
70
|
+
sm:table-cell sm:py-2 sm:pr-4 sm:border-b sm:border-solid sm:border-base-300;
|
|
71
71
|
}
|
|
72
72
|
.govgr-summary-list--no-border {
|
|
73
73
|
.govgr-summary-list__key,
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
.govgr-header, .govgr-admin-header {
|
|
44
44
|
.govgr-link {
|
|
45
45
|
.govgr-svg-icon {
|
|
46
|
-
fill:var(--color-
|
|
46
|
+
fill:var(--color-white);
|
|
47
47
|
}
|
|
48
48
|
&:hover {
|
|
49
49
|
.govgr-svg-icon {
|
|
50
|
-
fill:var(--color-
|
|
50
|
+
fill:var(--color-white);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
&:focus {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
fill: var(--color-white) !important;
|
|
65
65
|
}
|
|
66
66
|
.govgr-svg-icon--gray {
|
|
67
|
-
fill: var(--color-
|
|
67
|
+
fill: var(--color-base-400) !important;
|
|
68
68
|
}
|
|
69
69
|
.govgr-svg-icon--primary {
|
|
70
70
|
fill: var(--color-primary) !important;
|
package/src/components/table.css
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
.govgr-table-container--border {
|
|
27
|
-
@apply border border-
|
|
27
|
+
@apply border border-base-300 p-2;
|
|
28
28
|
}
|
|
29
29
|
.govgr-table {
|
|
30
30
|
@apply w-full border-collapse table;
|
|
@@ -33,10 +33,29 @@
|
|
|
33
33
|
}
|
|
34
34
|
.govgr-table--with-vertical-lines {
|
|
35
35
|
.govgr-table__cell, .govgr-table__header {
|
|
36
|
-
@apply border-l border-r border-solid border-
|
|
36
|
+
@apply border-l border-r border-solid border-base-300 px-4;
|
|
37
37
|
}
|
|
38
38
|
.govgr-table__head {
|
|
39
|
-
@apply border-t border-
|
|
39
|
+
@apply border-t border-base-300 text-base-content !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.govgr-table__header {
|
|
43
|
+
.govgr-dropdown__button {
|
|
44
|
+
@apply no-underline font-bold text-base-content !important;
|
|
45
|
+
}
|
|
46
|
+
.govgr-dropdown__button--underline:not(:focus){
|
|
47
|
+
@apply underline !important;
|
|
48
|
+
text-decoration-thickness: 2px !important;
|
|
49
|
+
}
|
|
50
|
+
.govgr-dropdown__content{
|
|
51
|
+
@apply py-0;
|
|
52
|
+
}
|
|
53
|
+
.govgr-vertical-nav__item {
|
|
54
|
+
@apply flex font-normal no-underline;
|
|
55
|
+
|
|
56
|
+
}
|
|
57
|
+
.govgr-vertical-nav__item--active:not(:focus){
|
|
58
|
+
@apply bg-base-200 font-normal !important
|
|
40
59
|
}
|
|
41
60
|
}
|
|
42
61
|
.govgr-table__body {
|
|
@@ -52,19 +71,19 @@
|
|
|
52
71
|
@apply border-t;
|
|
53
72
|
@apply border-r-0 !important;
|
|
54
73
|
&:last-child {
|
|
55
|
-
@apply border-r border-solid border-
|
|
74
|
+
@apply border-r border-solid border-base-300 px-4 !important;
|
|
56
75
|
}
|
|
57
76
|
}
|
|
58
77
|
.govgr-table__cell {
|
|
59
78
|
@apply border-r-0 !important;
|
|
60
79
|
&:last-child {
|
|
61
|
-
@apply border-r border-solid border-
|
|
80
|
+
@apply border-r border-solid border-base-300 px-4 !important;
|
|
62
81
|
}
|
|
63
82
|
}
|
|
64
83
|
}
|
|
65
84
|
}
|
|
66
85
|
.govgr-table__row {
|
|
67
|
-
@apply bg-
|
|
86
|
+
@apply bg-base-100;
|
|
68
87
|
}
|
|
69
88
|
.govgr-table__row--warning {
|
|
70
89
|
@apply border-l-4 border-warning;
|
|
@@ -87,7 +106,7 @@
|
|
|
87
106
|
}
|
|
88
107
|
.govgr-table--with-vertical-lines.govgr-table--light {
|
|
89
108
|
.govgr-table__body .govgr-table__header {
|
|
90
|
-
@apply border-l border-solid border-
|
|
109
|
+
@apply border-l border-solid border-base-300 !important;
|
|
91
110
|
}
|
|
92
111
|
}
|
|
93
112
|
.govgr-table--with-vertical-lines.govgr-table--dark{
|
|
@@ -105,7 +124,7 @@
|
|
|
105
124
|
.govgr-table--zebra {
|
|
106
125
|
.govgr-table__body {
|
|
107
126
|
.govgr-table__row:nth-child(even) {
|
|
108
|
-
@apply bg-
|
|
127
|
+
@apply bg-base-200 print:bg-white;
|
|
109
128
|
}
|
|
110
129
|
}
|
|
111
130
|
}
|
|
@@ -117,7 +136,7 @@
|
|
|
117
136
|
}
|
|
118
137
|
}
|
|
119
138
|
.govgr-table__header, .govgr-table__cell {
|
|
120
|
-
@apply pr-5 py-2.5 pl-0 border-b border-solid border-
|
|
139
|
+
@apply pr-5 py-2.5 pl-0 border-b border-solid border-base-300 text-left align-middle;
|
|
121
140
|
&:last-child {
|
|
122
141
|
@apply pr-0;
|
|
123
142
|
}
|
package/src/components/tabs.css
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
}
|
|
13
13
|
.govgr-tabs__list-item {
|
|
14
14
|
@apply relative px-4 py-2 m-0 shadow-none cursor-pointer;
|
|
15
|
-
@apply md:float-left md:border md:border-
|
|
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-
|
|
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;
|
|
19
19
|
margin-bottom: -1px;
|
|
20
20
|
&:hover {
|
|
21
21
|
text-decoration-thickness: 2px;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
.govgr-tabs__panel {
|
|
48
|
-
@apply bg-
|
|
48
|
+
@apply bg-base-100 md:hidden block md:px-4 py-4 pt-8 md:border md:border-base-400 mb-0
|
|
49
49
|
print:block print:border-0 print:py-3;
|
|
50
50
|
&.govgr-tabs__panel-visible {
|
|
51
51
|
@apply block;
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
}
|
|
21
21
|
.govgr-summary-list__row:first-child {
|
|
22
22
|
&>dt {
|
|
23
|
-
@apply border-t-2 border-
|
|
23
|
+
@apply border-t-2 border-base-400;
|
|
24
24
|
}
|
|
25
25
|
&>dd {
|
|
26
|
-
@apply sm:border-t-2 sm:border-
|
|
26
|
+
@apply sm:border-t-2 sm:border-base-400;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
.govgr-summary-list__key {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
@apply px-2 py-1 mr-2 inline-block font-sans text-sm uppercase tracking-widest;
|
|
35
35
|
}
|
|
36
36
|
.govgr-tag__primary {
|
|
37
|
-
@apply bg-
|
|
37
|
+
@apply bg-info text-white print:border-2 print:bg-white print:border-info-hover print:text-info-hover print:mr-4;
|
|
38
38
|
}
|
|
39
39
|
.govgr-tag__secondary {
|
|
40
|
-
@apply bg-
|
|
40
|
+
@apply bg-secondary text-base-content print:border-2 print:bg-white print:border-info print:text-info print:mr-4;
|
|
41
41
|
}
|
|
42
42
|
.govgr-tag__gray {
|
|
43
|
-
@apply bg-
|
|
43
|
+
@apply bg-base-300 print:border-2 print:bg-white print:border-base-800 print:text-base-800 print:mr-4;
|
|
44
44
|
}
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
line-height: var(--body-s-line-height);
|
|
141
141
|
}
|
|
142
142
|
.govgr-hint-l {
|
|
143
|
-
@apply mb-4 lg:text-2xl text-lg text-
|
|
143
|
+
@apply mb-4 lg:text-2xl text-lg text-base-800;
|
|
144
144
|
}
|
|
145
145
|
.govgr-hint {
|
|
146
146
|
font-size: var(--hint-font-size);
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
letter-spacing: var(--hint-letter-spacing);
|
|
151
151
|
}
|
|
152
152
|
.govgr-hint-s {
|
|
153
|
-
@apply mb-4 lg:text-base text-sm text-
|
|
153
|
+
@apply mb-4 lg:text-base text-sm text-base-800;
|
|
154
154
|
}
|
|
155
155
|
.govgr-background-dark, .govgr-masthead--primary {
|
|
156
156
|
.govgr-hint {
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
font-size: var(--link-font-size);
|
|
172
172
|
line-height: var(--link-line-height);
|
|
173
173
|
letter-spacing: var(--link-letter-spacing);
|
|
174
|
-
&:hover {
|
|
174
|
+
&:hover:not(:focus) {
|
|
175
175
|
text-decoration-thickness: 2px;
|
|
176
176
|
color: var(--link-color-hover);
|
|
177
177
|
}
|
|
@@ -184,10 +184,10 @@
|
|
|
184
184
|
}
|
|
185
185
|
.govgr-header {
|
|
186
186
|
.govgr-header__container > .govgr-link {
|
|
187
|
-
@apply text-
|
|
187
|
+
@apply text-white focus:text-link-active print:text-base-content;
|
|
188
188
|
}
|
|
189
189
|
.govgr-header__content > .govgr-link {
|
|
190
|
-
@apply text-
|
|
190
|
+
@apply text-white focus:text-link-active print:text-base-content;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
.govgr-link--no-underline {
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
}
|
|
238
238
|
&.dark {
|
|
239
239
|
.govgr-link {
|
|
240
|
-
@apply bg-
|
|
240
|
+
@apply bg-base-300;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
}
|
package/tailwind.config.js
CHANGED
|
@@ -6,34 +6,36 @@ const allColors = [
|
|
|
6
6
|
"transparent",
|
|
7
7
|
"current",
|
|
8
8
|
"primary",
|
|
9
|
-
"primary-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"secondary200",
|
|
9
|
+
"primary-100",
|
|
10
|
+
"primary-200",
|
|
11
|
+
"primary-300",
|
|
13
12
|
"secondary",
|
|
14
|
-
"secondary-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
13
|
+
"secondary-100",
|
|
14
|
+
"secondary-200",
|
|
15
|
+
"secondary-300",
|
|
16
|
+
"tertiary",
|
|
17
|
+
"tertiary-100",
|
|
18
|
+
"tertiary-200",
|
|
19
|
+
"tertiary-300",
|
|
21
20
|
"accent",
|
|
22
21
|
"accent-focus",
|
|
23
22
|
"accent-content",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
23
|
+
"base-100",
|
|
24
|
+
"base-200",
|
|
25
|
+
"base-300",
|
|
26
|
+
"base-400",
|
|
27
|
+
"base-500",
|
|
28
|
+
"base-600",
|
|
29
|
+
"base-700",
|
|
30
|
+
"base-800",
|
|
31
|
+
"base-900",
|
|
32
|
+
"base-1000",
|
|
33
|
+
"base-11000",
|
|
33
34
|
"base-content",
|
|
34
35
|
"base-content-secondary",
|
|
35
36
|
"base-content-invert",
|
|
36
37
|
"info",
|
|
38
|
+
"info-hover",
|
|
37
39
|
"success",
|
|
38
40
|
"success-hover",
|
|
39
41
|
"warning",
|
|
@@ -45,17 +47,18 @@ const allColors = [
|
|
|
45
47
|
"link-visited",
|
|
46
48
|
"link-active",
|
|
47
49
|
"white",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
50
|
+
"gray-100",
|
|
51
|
+
"gray-200",
|
|
52
|
+
"gray-300",
|
|
53
|
+
"gray-400",
|
|
54
|
+
"gray-500",
|
|
55
|
+
"gray-600",
|
|
56
|
+
"gray-700",
|
|
57
|
+
"gray-800",
|
|
58
|
+
"gray-900",
|
|
59
|
+
"gray-1000",
|
|
60
|
+
"gray-1100",
|
|
61
|
+
"gray-1200",
|
|
59
62
|
"black",
|
|
60
63
|
"shadow200",
|
|
61
64
|
"shadow600",
|
package/themes.plugin.js
CHANGED
|
@@ -28,19 +28,21 @@ function addThemes({ addBase, addComponents, theme, config }) {
|
|
|
28
28
|
}
|
|
29
29
|
hasRun = true;
|
|
30
30
|
function extractColorVars(colorObj, colorGroup = "") {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
return Object.keys(colorObj).reduce((vars, colorKey) => {
|
|
32
|
+
const value = colorObj[colorKey];
|
|
33
|
+
const colorName =
|
|
34
|
+
colorKey == "default"
|
|
35
|
+
? `--color${colorGroup}`
|
|
36
|
+
: `--color${colorGroup}-${colorKey}`;
|
|
37
|
+
const newVars =
|
|
38
|
+
typeof value === "string"
|
|
39
|
+
? {
|
|
40
|
+
[colorName]: value,
|
|
41
|
+
[`${colorName}-rgb`]: hexToRGB(value),
|
|
42
|
+
}
|
|
43
|
+
: extractColorVars(value, `-${colorKey}`);
|
|
44
|
+
return { ...vars, ...newVars };
|
|
45
|
+
}, {});
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
function extractMediaQueriesFromComponentVars(componentObj, customTheme) {
|
|
@@ -55,21 +57,23 @@ function addThemes({ addBase, addComponents, theme, config }) {
|
|
|
55
57
|
const newAttr = { [newAttrKey]: newAttrValue };
|
|
56
58
|
const newClass = `.${prefix}-${componentClass}`;
|
|
57
59
|
const newMedia = mediaQueriesMapping[componentMedia];
|
|
58
|
-
const newTheme =
|
|
59
|
-
|
|
60
|
+
const newTheme =
|
|
61
|
+
customTheme === defaultTheme ? "" : `.${customTheme}`;
|
|
62
|
+
|
|
60
63
|
if (mediaObj[newMedia]) {
|
|
61
64
|
if (mediaObj[newMedia][newTheme][newClass]) {
|
|
62
|
-
mediaObj[newMedia][newTheme][newClass][newAttrKey] =
|
|
65
|
+
mediaObj[newMedia][newTheme][newClass][newAttrKey] =
|
|
66
|
+
newAttrValue;
|
|
63
67
|
} else {
|
|
64
68
|
mediaObj[newMedia][newTheme][newClass] = newAttr;
|
|
65
69
|
}
|
|
66
70
|
} else {
|
|
67
|
-
mediaObj[newMedia] = { [newTheme]: { [newClass]: newAttr }};
|
|
68
|
-
}
|
|
71
|
+
mediaObj[newMedia] = { [newTheme]: { [newClass]: newAttr } };
|
|
72
|
+
}
|
|
69
73
|
}
|
|
70
|
-
|
|
71
|
-
});
|
|
74
|
+
);
|
|
72
75
|
});
|
|
76
|
+
});
|
|
73
77
|
return mediaObj;
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -136,13 +140,12 @@ function addThemes({ addBase, addComponents, theme, config }) {
|
|
|
136
140
|
);
|
|
137
141
|
Object.keys(extractedVariables).forEach((key) => {
|
|
138
142
|
if (base[key]) {
|
|
139
|
-
base[key] = {...base[key], ...extractedVariables[key]}
|
|
143
|
+
base[key] = { ...base[key], ...extractedVariables[key] };
|
|
140
144
|
} else {
|
|
141
145
|
base[key] = extractedVariables[key];
|
|
142
146
|
}
|
|
143
|
-
});
|
|
147
|
+
});
|
|
144
148
|
}
|
|
145
|
-
|
|
146
149
|
}
|
|
147
150
|
addBase(base);
|
|
148
151
|
}
|