@digiko-npm/designsystem 0.9.37 → 0.9.39
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/designsystem.css +76 -27
- package/dist/designsystem.min.css +2 -2
- package/package.json +1 -1
- package/src/components/toggle.css +49 -20
- package/src/tokens/colors.css +20 -6
package/package.json
CHANGED
|
@@ -26,14 +26,16 @@
|
|
|
26
26
|
.ds-toggle {
|
|
27
27
|
display: inline-flex;
|
|
28
28
|
position: relative;
|
|
29
|
-
width:
|
|
30
|
-
height:
|
|
31
|
-
padding:
|
|
29
|
+
width: 4.5rem;
|
|
30
|
+
height: 2rem;
|
|
31
|
+
padding: 3px;
|
|
32
32
|
border: none;
|
|
33
33
|
border-radius: var(--ds-radius-full);
|
|
34
34
|
background-color: var(--ds-color-bg-muted);
|
|
35
|
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
|
|
35
36
|
cursor: pointer;
|
|
36
|
-
transition: background-color var(--ds-duration-normal) var(--ds-ease-out)
|
|
37
|
+
transition: background-color var(--ds-duration-normal) var(--ds-ease-out),
|
|
38
|
+
box-shadow var(--ds-duration-normal) var(--ds-ease-out);
|
|
37
39
|
-webkit-appearance: none;
|
|
38
40
|
appearance: none;
|
|
39
41
|
flex-shrink: 0;
|
|
@@ -45,13 +47,15 @@
|
|
|
45
47
|
&::after {
|
|
46
48
|
content: "";
|
|
47
49
|
position: absolute;
|
|
48
|
-
inset-inline-start:
|
|
50
|
+
inset-inline-start: 3px;
|
|
49
51
|
inset-block-start: 50%;
|
|
50
|
-
width:
|
|
51
|
-
height: 1.
|
|
52
|
+
width: 2.625rem;
|
|
53
|
+
height: 1.625rem;
|
|
52
54
|
border-radius: var(--ds-radius-full);
|
|
53
|
-
background-color
|
|
54
|
-
box-shadow:
|
|
55
|
+
background: linear-gradient(to bottom, var(--ds-color-static-white), var(--ds-color-surface));
|
|
56
|
+
box-shadow:
|
|
57
|
+
0 1px 3px rgba(0, 0, 0, 0.15),
|
|
58
|
+
0 0 0 0.5px rgba(0, 0, 0, 0.04);
|
|
55
59
|
transform: translateY(-50%);
|
|
56
60
|
transition: transform var(--ds-duration-normal) var(--ds-ease-out);
|
|
57
61
|
}
|
|
@@ -62,25 +66,27 @@
|
|
|
62
66
|
|
|
63
67
|
&[aria-checked="true"],
|
|
64
68
|
&--checked {
|
|
65
|
-
background-color: var(--ds-color-
|
|
69
|
+
background-color: var(--ds-color-brand);
|
|
70
|
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
&[aria-checked="true"]::after,
|
|
69
74
|
&--checked::after {
|
|
70
|
-
transform: translateX(1.
|
|
75
|
+
transform: translateX(1.5rem) translateY(-50%);
|
|
71
76
|
}
|
|
72
77
|
|
|
78
|
+
|
|
73
79
|
/* ---------------------------------------------------------------------------
|
|
74
80
|
Hover
|
|
75
81
|
--------------------------------------------------------------------------- */
|
|
76
82
|
|
|
77
83
|
&:hover {
|
|
78
|
-
background-color: var(--ds-color-
|
|
84
|
+
background-color: var(--ds-color-bg-muted-hover);
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
&[aria-checked="true"]:hover,
|
|
82
88
|
&--checked:hover {
|
|
83
|
-
background-color: var(--ds-color-
|
|
89
|
+
background-color: var(--ds-color-brand-hover);
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
/* ---------------------------------------------------------------------------
|
|
@@ -89,7 +95,8 @@
|
|
|
89
95
|
|
|
90
96
|
&:focus-visible {
|
|
91
97
|
outline: none;
|
|
92
|
-
box-shadow: 0 0 0
|
|
98
|
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12),
|
|
99
|
+
0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
93
100
|
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
94
101
|
}
|
|
95
102
|
|
|
@@ -109,18 +116,40 @@
|
|
|
109
116
|
--------------------------------------------------------------------------- */
|
|
110
117
|
|
|
111
118
|
&--sm {
|
|
112
|
-
width:
|
|
113
|
-
height: 1.
|
|
114
|
-
|
|
119
|
+
width: 3.375rem;
|
|
120
|
+
height: 1.5rem;
|
|
121
|
+
padding: 2px;
|
|
122
|
+
|
|
123
|
+
&::after {
|
|
124
|
+
inset-inline-start: 2px;
|
|
125
|
+
width: 2rem;
|
|
126
|
+
height: 1.25rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[aria-checked="true"]::after,
|
|
130
|
+
&.ds-toggle--checked::after {
|
|
131
|
+
transform: translateX(1.125rem) translateY(-50%);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* ---------------------------------------------------------------------------
|
|
136
|
+
Size: Large
|
|
137
|
+
--------------------------------------------------------------------------- */
|
|
138
|
+
|
|
139
|
+
&--lg {
|
|
140
|
+
width: 5.5rem;
|
|
141
|
+
height: 2.5rem;
|
|
142
|
+
padding: 4px;
|
|
115
143
|
|
|
116
144
|
&::after {
|
|
117
|
-
|
|
118
|
-
|
|
145
|
+
inset-inline-start: 4px;
|
|
146
|
+
width: 3.25rem;
|
|
147
|
+
height: 2rem;
|
|
119
148
|
}
|
|
120
149
|
|
|
121
150
|
&[aria-checked="true"]::after,
|
|
122
151
|
&.ds-toggle--checked::after {
|
|
123
|
-
transform: translateX(
|
|
152
|
+
transform: translateX(1.875rem) translateY(-50%);
|
|
124
153
|
}
|
|
125
154
|
}
|
|
126
155
|
}
|
package/src/tokens/colors.css
CHANGED
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
--ds-color-on-inverted: #fafafa;
|
|
38
38
|
|
|
39
39
|
/* --- Borders — solid zinc --- */
|
|
40
|
-
--ds-color-border: #
|
|
41
|
-
--ds-color-border-hover: #
|
|
42
|
-
--ds-color-border-active: #
|
|
40
|
+
--ds-color-border: #e4e4e7;
|
|
41
|
+
--ds-color-border-hover: #d4d4d8;
|
|
42
|
+
--ds-color-border-active: #a1a1aa;
|
|
43
43
|
--ds-color-border-subtle: #f4f4f5;
|
|
44
44
|
|
|
45
45
|
/* --- Interactive --- */
|
|
@@ -48,6 +48,13 @@
|
|
|
48
48
|
--ds-color-interactive-subtle: rgba(63, 63, 70, 0.1);
|
|
49
49
|
--ds-color-interactive-border: rgba(63, 63, 70, 0.2);
|
|
50
50
|
|
|
51
|
+
/* --- Brand (override per-project to match your identity) --- */
|
|
52
|
+
--ds-color-brand: #2563eb;
|
|
53
|
+
--ds-color-brand-hover: #1d4ed8;
|
|
54
|
+
--ds-color-brand-subtle: rgba(37, 99, 235, 0.1);
|
|
55
|
+
--ds-color-brand-border: rgba(37, 99, 235, 0.2);
|
|
56
|
+
--ds-color-on-brand: #ffffff;
|
|
57
|
+
|
|
51
58
|
/* --- Overlays --- */
|
|
52
59
|
--ds-color-overlay: rgba(0, 0, 0, 0.5);
|
|
53
60
|
--ds-color-overlay-subtle: rgba(0, 0, 0, 0.02);
|
|
@@ -106,9 +113,9 @@
|
|
|
106
113
|
--ds-color-on-inverted: #09090b;
|
|
107
114
|
|
|
108
115
|
/* --- Borders --- */
|
|
109
|
-
--ds-color-border: #
|
|
110
|
-
--ds-color-border-hover: #
|
|
111
|
-
--ds-color-border-active: #
|
|
116
|
+
--ds-color-border: #27272a;
|
|
117
|
+
--ds-color-border-hover: #3f3f46;
|
|
118
|
+
--ds-color-border-active: #52525b;
|
|
112
119
|
--ds-color-border-subtle: #18181b;
|
|
113
120
|
|
|
114
121
|
/* --- Interactive --- */
|
|
@@ -117,6 +124,13 @@
|
|
|
117
124
|
--ds-color-interactive-subtle: rgba(212, 212, 216, 0.1);
|
|
118
125
|
--ds-color-interactive-border: rgba(212, 212, 216, 0.2);
|
|
119
126
|
|
|
127
|
+
/* --- Brand --- */
|
|
128
|
+
--ds-color-brand: #3b82f6;
|
|
129
|
+
--ds-color-brand-hover: #60a5fa;
|
|
130
|
+
--ds-color-brand-subtle: rgba(59, 130, 246, 0.1);
|
|
131
|
+
--ds-color-brand-border: rgba(59, 130, 246, 0.2);
|
|
132
|
+
--ds-color-on-brand: #ffffff;
|
|
133
|
+
|
|
120
134
|
/* --- Overlays --- */
|
|
121
135
|
--ds-color-overlay: rgba(0, 0, 0, 0.7);
|
|
122
136
|
--ds-color-overlay-subtle: rgba(255, 255, 255, 0.03);
|