@arbeidstilsynet/design-css 0.11.0 → 0.11.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.
- package/dist/src/button.css +16 -22
- package/dist/src/index.css +16 -22
- package/package.json +1 -1
package/dist/src/button.css
CHANGED
|
@@ -7,33 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
/** Background ("Fill") */
|
|
9
9
|
--dsc-button-background: transparent;
|
|
10
|
-
--dsc-button-background--active: var(--ds-color-surface-
|
|
11
|
-
--dsc-button-background--hover: var(--ds-color-surface-
|
|
10
|
+
--dsc-button-background--active: var(--ds-color-surface-active);
|
|
11
|
+
--dsc-button-background--hover: var(--ds-color-surface-hover);
|
|
12
12
|
|
|
13
13
|
/** Border ("Stroke") */
|
|
14
14
|
--dsc-button-border-color: var(--ds-color-text-default);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.ds-button[data-variant="secondary"][data-color="neutral"] {
|
|
18
|
-
/** Background ("Fill") */
|
|
19
|
-
--dsc-button-background--active: var(--ds-color-background-tinted);
|
|
20
|
-
--dsc-button-background--hover: var(--ds-color-background-tinted);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ds-button[data-variant="secondary"][data-color="danger"] {
|
|
24
|
-
/** Background ("Fill") */
|
|
25
|
-
--dsc-button-background--active: var(--ds-color-surface-active);
|
|
26
|
-
--dsc-button-background--hover: var(--ds-color-surface-hover);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
17
|
.ds-button[data-variant="tertiary"]:not(
|
|
30
|
-
/* Don't apply when inside
|
|
31
|
-
|
|
32
|
-
or keeping it as tertiary (returned from usePagination). If this is changed upstream we can simplify this selector.
|
|
33
|
-
|
|
34
|
-
Also don't apply when inside ToggleGroup, which uses <label class="ds-button" data-variant="tertiary">
|
|
35
|
-
*/
|
|
36
|
-
:is(.ds-pagination, .ds-toggle-group) .ds-button[data-variant="tertiary"]
|
|
18
|
+
/* Don't apply when inside ToggleGroup, which uses <label class="ds-button" data-variant="tertiary"> */
|
|
19
|
+
.ds-toggle-group .ds-button[data-variant="tertiary"]
|
|
37
20
|
) {
|
|
38
21
|
/** Text **/
|
|
39
22
|
--dsc-button-color: var(--ds-color-text-default);
|
|
@@ -43,6 +26,17 @@
|
|
|
43
26
|
--dsc-button-background: transparent;
|
|
44
27
|
--dsc-button-background--active: transparent;
|
|
45
28
|
--dsc-button-background--hover: transparent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ds-button[data-variant="tertiary"][data-icon="true"]:not(.ds-toggle-group .ds-button[data-variant="tertiary"]) {
|
|
32
|
+
--dsc-button-background--active: var(--ds-color-surface-active);
|
|
33
|
+
--dsc-button-background--hover: var(--ds-color-surface-hover);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ds-button[data-variant="tertiary"]:not(
|
|
37
|
+
/* Don't apply when inside ToggleGroup, which uses <label class="ds-button" data-variant="tertiary"> */
|
|
38
|
+
.ds-toggle-group .ds-button[data-variant="tertiary"]
|
|
39
|
+
) {
|
|
46
40
|
|
|
47
41
|
/** Border ("Stroke") */
|
|
48
42
|
--dsc-button-border-color: transparent;
|
|
@@ -50,7 +44,7 @@
|
|
|
50
44
|
text-decoration: none;
|
|
51
45
|
}
|
|
52
46
|
|
|
53
|
-
.ds-button[data-variant="tertiary"]:not(
|
|
47
|
+
.ds-button[data-variant="tertiary"]:not(.ds-toggle-group .ds-button[data-variant="tertiary"]):hover:not([disabled]),.ds-button[data-variant="tertiary"]:not(.ds-toggle-group .ds-button[data-variant="tertiary"]):active:not([disabled]) {
|
|
54
48
|
-webkit-text-decoration: underline 2px;
|
|
55
49
|
text-decoration: underline 2px;
|
|
56
50
|
text-underline-offset: 6px; /** Hack to prevent us from having to create our own button component just to support underline on hover. */
|
package/dist/src/index.css
CHANGED
|
@@ -49,33 +49,16 @@
|
|
|
49
49
|
|
|
50
50
|
/** Background ("Fill") */
|
|
51
51
|
--dsc-button-background: transparent;
|
|
52
|
-
--dsc-button-background--active: var(--ds-color-surface-
|
|
53
|
-
--dsc-button-background--hover: var(--ds-color-surface-
|
|
52
|
+
--dsc-button-background--active: var(--ds-color-surface-active);
|
|
53
|
+
--dsc-button-background--hover: var(--ds-color-surface-hover);
|
|
54
54
|
|
|
55
55
|
/** Border ("Stroke") */
|
|
56
56
|
--dsc-button-border-color: var(--ds-color-text-default);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.ds-button[data-variant="secondary"][data-color="neutral"] {
|
|
60
|
-
/** Background ("Fill") */
|
|
61
|
-
--dsc-button-background--active: var(--ds-color-background-tinted);
|
|
62
|
-
--dsc-button-background--hover: var(--ds-color-background-tinted);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.ds-button[data-variant="secondary"][data-color="danger"] {
|
|
66
|
-
/** Background ("Fill") */
|
|
67
|
-
--dsc-button-background--active: var(--ds-color-surface-active);
|
|
68
|
-
--dsc-button-background--hover: var(--ds-color-surface-hover);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
59
|
.ds-button[data-variant="tertiary"]:not(
|
|
72
|
-
/* Don't apply when inside
|
|
73
|
-
|
|
74
|
-
or keeping it as tertiary (returned from usePagination). If this is changed upstream we can simplify this selector.
|
|
75
|
-
|
|
76
|
-
Also don't apply when inside ToggleGroup, which uses <label class="ds-button" data-variant="tertiary">
|
|
77
|
-
*/
|
|
78
|
-
:is(.ds-pagination, .ds-toggle-group) .ds-button[data-variant="tertiary"]
|
|
60
|
+
/* Don't apply when inside ToggleGroup, which uses <label class="ds-button" data-variant="tertiary"> */
|
|
61
|
+
.ds-toggle-group .ds-button[data-variant="tertiary"]
|
|
79
62
|
) {
|
|
80
63
|
/** Text **/
|
|
81
64
|
--dsc-button-color: var(--ds-color-text-default);
|
|
@@ -85,6 +68,17 @@
|
|
|
85
68
|
--dsc-button-background: transparent;
|
|
86
69
|
--dsc-button-background--active: transparent;
|
|
87
70
|
--dsc-button-background--hover: transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ds-button[data-variant="tertiary"][data-icon="true"]:not(.ds-toggle-group .ds-button[data-variant="tertiary"]) {
|
|
74
|
+
--dsc-button-background--active: var(--ds-color-surface-active);
|
|
75
|
+
--dsc-button-background--hover: var(--ds-color-surface-hover);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ds-button[data-variant="tertiary"]:not(
|
|
79
|
+
/* Don't apply when inside ToggleGroup, which uses <label class="ds-button" data-variant="tertiary"> */
|
|
80
|
+
.ds-toggle-group .ds-button[data-variant="tertiary"]
|
|
81
|
+
) {
|
|
88
82
|
|
|
89
83
|
/** Border ("Stroke") */
|
|
90
84
|
--dsc-button-border-color: transparent;
|
|
@@ -92,7 +86,7 @@
|
|
|
92
86
|
text-decoration: none;
|
|
93
87
|
}
|
|
94
88
|
|
|
95
|
-
.ds-button[data-variant="tertiary"]:not(
|
|
89
|
+
.ds-button[data-variant="tertiary"]:not(.ds-toggle-group .ds-button[data-variant="tertiary"]):hover:not([disabled]),.ds-button[data-variant="tertiary"]:not(.ds-toggle-group .ds-button[data-variant="tertiary"]):active:not([disabled]) {
|
|
96
90
|
-webkit-text-decoration: underline 2px;
|
|
97
91
|
text-decoration: underline 2px;
|
|
98
92
|
text-underline-offset: 6px; /** Hack to prevent us from having to create our own button component just to support underline on hover. */
|