@eqtylab/equality 4.4.2 → 4.5.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/dist/index.cjs +58 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +58 -39
- package/dist/index.js.map +1 -1
- package/dist/segmented-controls.module.module.css.module.css +175 -11
- package/dist/theme.module.module.css.module.css +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
|
|
2
2
|
.segmented-controls {
|
|
3
|
+
--segment-transition-duration: 250ms;
|
|
4
|
+
--segment-transition-easing: cubic-bezier(0.32, 0.72, 0, 1);
|
|
3
5
|
border-style: var(--tw-border-style);
|
|
4
6
|
border-width: 1px;
|
|
5
7
|
border-color: var(--color-button-tertiary-border, color(display-p3 0.7432 0.7432 0.7432));
|
|
@@ -9,6 +11,12 @@
|
|
|
9
11
|
overflow: hidden;
|
|
10
12
|
background-color: var(--color-button-tertiary-fill, color(display-p3 1 1 1));
|
|
11
13
|
position: relative;
|
|
14
|
+
--tw-shadow: inset 0 1px 2px var(--tw-shadow-color, rgb(0 0 0/0.08));
|
|
15
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
16
|
+
&:where(html[data-equality-theme=dark], html[data-equality-theme=dark] *, [data-equality-theme=dark] .root, [data-equality-theme=dark] .root *) {
|
|
17
|
+
--tw-shadow: inset 0 1px 2px var(--tw-shadow-color, rgb(0 0 0/0.35));
|
|
18
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
19
|
+
}
|
|
12
20
|
}
|
|
13
21
|
.segment {
|
|
14
22
|
border-radius: 0 !important;
|
|
@@ -19,7 +27,7 @@
|
|
|
19
27
|
display: flex;
|
|
20
28
|
align-items: center;
|
|
21
29
|
gap: calc(0.25rem * 1.5);
|
|
22
|
-
height:
|
|
30
|
+
height: 100%;
|
|
23
31
|
padding-inline: calc(0.25rem * 3);
|
|
24
32
|
font-size: 0.875rem;
|
|
25
33
|
line-height: var(--tw-leading, calc(1.25 / 0.875));
|
|
@@ -28,16 +36,83 @@
|
|
|
28
36
|
white-space: nowrap;
|
|
29
37
|
cursor: pointer;
|
|
30
38
|
background-color: transparent;
|
|
39
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
40
|
+
transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
|
|
41
|
+
transition-duration: var(--tw-duration, 150ms);
|
|
42
|
+
--tw-duration: var(--segment-transition-duration);
|
|
43
|
+
transition-duration: var(--segment-transition-duration);
|
|
44
|
+
--tw-ease: var(--segment-transition-easing);
|
|
45
|
+
transition-timing-function: var(--segment-transition-easing);
|
|
46
|
+
&:focus-visible {
|
|
47
|
+
--tw-outline-style: none;
|
|
48
|
+
outline-style: none;
|
|
49
|
+
}
|
|
50
|
+
@media (prefers-reduced-motion: reduce) {
|
|
51
|
+
transition-property: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.segment::before,
|
|
55
|
+
.segment::after {
|
|
56
|
+
content: '';
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
position: absolute;
|
|
59
|
+
}
|
|
60
|
+
.segment::before {
|
|
61
|
+
inset: 2px;
|
|
62
|
+
z-index: calc(10 * -1);
|
|
63
|
+
border-radius: 3px;
|
|
64
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
65
|
+
transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
|
|
66
|
+
transition-duration: var(--tw-duration, 150ms);
|
|
67
|
+
--tw-duration: var(--segment-transition-duration);
|
|
68
|
+
transition-duration: var(--segment-transition-duration);
|
|
69
|
+
--tw-ease: var(--segment-transition-easing);
|
|
70
|
+
transition-timing-function: var(--segment-transition-easing);
|
|
71
|
+
@media (prefers-reduced-motion: reduce) {
|
|
72
|
+
transition-property: none;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.segment--inactive:hover::before {
|
|
76
|
+
background-color: color-mix(in srgb, color(display-p3 0 0 0) 8%, transparent);
|
|
77
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
78
|
+
background-color: color-mix(in oklab, var(--color-text-primary, color(display-p3 0 0 0)) 8%, transparent);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.segment:focus-visible::after {
|
|
82
|
+
inset: calc(0.25rem * 0);
|
|
83
|
+
border-radius: 5px;
|
|
84
|
+
box-shadow: inset 0 0 0 2px var(--color-focus-ring),
|
|
85
|
+
inset 0 0 0 2px var(--color-background);
|
|
31
86
|
}
|
|
32
87
|
.segment--icon-only {
|
|
33
88
|
display: flex;
|
|
34
89
|
align-items: center;
|
|
35
90
|
justify-content: center;
|
|
36
|
-
|
|
37
|
-
height:
|
|
91
|
+
aspect-ratio: 1 / 1;
|
|
92
|
+
height: 100%;
|
|
38
93
|
gap: calc(0.25rem * 0);
|
|
39
94
|
padding-inline: calc(0.25rem * 0);
|
|
40
95
|
}
|
|
96
|
+
.size--sm {
|
|
97
|
+
height: calc(0.25rem * 7);
|
|
98
|
+
}
|
|
99
|
+
.size--sm .segment {
|
|
100
|
+
padding-inline: calc(0.25rem * 2);
|
|
101
|
+
font-size: 0.75rem;
|
|
102
|
+
line-height: var(--tw-leading, calc(1 / 0.75));
|
|
103
|
+
}
|
|
104
|
+
.size--sm .segment--icon-only {
|
|
105
|
+
padding-inline: calc(0.25rem * 0);
|
|
106
|
+
}
|
|
107
|
+
.size--md {
|
|
108
|
+
height: calc(0.25rem * 10);
|
|
109
|
+
}
|
|
110
|
+
.size--lg {
|
|
111
|
+
height: calc(0.25rem * 11);
|
|
112
|
+
}
|
|
113
|
+
.size--lg .segment:not(.segment--icon-only) {
|
|
114
|
+
padding-inline: calc(0.25rem * 4);
|
|
115
|
+
}
|
|
41
116
|
.segment--active,
|
|
42
117
|
.segment--active .segment-icon {
|
|
43
118
|
color: var(--color-button-primary-text, color(display-p3 1 1 1));
|
|
@@ -45,11 +120,6 @@
|
|
|
45
120
|
.segment--inactive,
|
|
46
121
|
.segment--inactive .segment-icon {
|
|
47
122
|
color: var(--color-text-secondary, color(display-p3 0.1792 0.1792 0.1792));
|
|
48
|
-
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
49
|
-
transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
|
|
50
|
-
transition-duration: var(--tw-duration, 150ms);
|
|
51
|
-
--tw-duration: 300ms;
|
|
52
|
-
transition-duration: 300ms;
|
|
53
123
|
}
|
|
54
124
|
.segment--inactive:hover,
|
|
55
125
|
.segment--inactive:hover .segment-icon {
|
|
@@ -61,21 +131,111 @@
|
|
|
61
131
|
align-items: center;
|
|
62
132
|
justify-content: center;
|
|
63
133
|
}
|
|
134
|
+
.segment-icon {
|
|
135
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
136
|
+
transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
|
|
137
|
+
transition-duration: var(--tw-duration, 150ms);
|
|
138
|
+
--tw-duration: var(--segment-transition-duration);
|
|
139
|
+
transition-duration: var(--segment-transition-duration);
|
|
140
|
+
--tw-ease: var(--segment-transition-easing);
|
|
141
|
+
transition-timing-function: var(--segment-transition-easing);
|
|
142
|
+
@media (prefers-reduced-motion: reduce) {
|
|
143
|
+
transition-property: none;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
64
146
|
.active-segment-indicator {
|
|
65
147
|
position: absolute;
|
|
66
|
-
top:
|
|
67
|
-
bottom:
|
|
68
|
-
left:
|
|
148
|
+
top: 2px;
|
|
149
|
+
bottom: 2px;
|
|
150
|
+
left: 2px;
|
|
151
|
+
width: calc(var(--indicator-width) - 4px);
|
|
152
|
+
border-radius: 3px;
|
|
69
153
|
background-color: var(--color-button-primary-fill, color(display-p3 0.5242 0.2903 0.7705));
|
|
154
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 0.2),
|
|
155
|
+
inset 0 1px 0px rgb(255 255 255 / 0.25);
|
|
156
|
+
}
|
|
157
|
+
.active-segment-indicator--animated {
|
|
70
158
|
transition-property: transform,width;
|
|
71
159
|
transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
|
|
72
160
|
transition-duration: var(--tw-duration, 150ms);
|
|
161
|
+
--tw-duration: var(--segment-transition-duration);
|
|
162
|
+
transition-duration: var(--segment-transition-duration);
|
|
163
|
+
--tw-ease: var(--segment-transition-easing);
|
|
164
|
+
transition-timing-function: var(--segment-transition-easing);
|
|
165
|
+
@media (prefers-reduced-motion: reduce) {
|
|
166
|
+
transition-property: none;
|
|
167
|
+
}
|
|
73
168
|
}
|
|
74
169
|
@property --tw-border-style {
|
|
75
170
|
syntax: "*";
|
|
76
171
|
inherits: false;
|
|
77
172
|
initial-value: solid;
|
|
78
173
|
}
|
|
174
|
+
@property --tw-shadow {
|
|
175
|
+
syntax: "*";
|
|
176
|
+
inherits: false;
|
|
177
|
+
initial-value: 0 0 #0000;
|
|
178
|
+
}
|
|
179
|
+
@property --tw-shadow-color {
|
|
180
|
+
syntax: "*";
|
|
181
|
+
inherits: false;
|
|
182
|
+
}
|
|
183
|
+
@property --tw-shadow-alpha {
|
|
184
|
+
syntax: "<percentage>";
|
|
185
|
+
inherits: false;
|
|
186
|
+
initial-value: 100%;
|
|
187
|
+
}
|
|
188
|
+
@property --tw-inset-shadow {
|
|
189
|
+
syntax: "*";
|
|
190
|
+
inherits: false;
|
|
191
|
+
initial-value: 0 0 #0000;
|
|
192
|
+
}
|
|
193
|
+
@property --tw-inset-shadow-color {
|
|
194
|
+
syntax: "*";
|
|
195
|
+
inherits: false;
|
|
196
|
+
}
|
|
197
|
+
@property --tw-inset-shadow-alpha {
|
|
198
|
+
syntax: "<percentage>";
|
|
199
|
+
inherits: false;
|
|
200
|
+
initial-value: 100%;
|
|
201
|
+
}
|
|
202
|
+
@property --tw-ring-color {
|
|
203
|
+
syntax: "*";
|
|
204
|
+
inherits: false;
|
|
205
|
+
}
|
|
206
|
+
@property --tw-ring-shadow {
|
|
207
|
+
syntax: "*";
|
|
208
|
+
inherits: false;
|
|
209
|
+
initial-value: 0 0 #0000;
|
|
210
|
+
}
|
|
211
|
+
@property --tw-inset-ring-color {
|
|
212
|
+
syntax: "*";
|
|
213
|
+
inherits: false;
|
|
214
|
+
}
|
|
215
|
+
@property --tw-inset-ring-shadow {
|
|
216
|
+
syntax: "*";
|
|
217
|
+
inherits: false;
|
|
218
|
+
initial-value: 0 0 #0000;
|
|
219
|
+
}
|
|
220
|
+
@property --tw-ring-inset {
|
|
221
|
+
syntax: "*";
|
|
222
|
+
inherits: false;
|
|
223
|
+
}
|
|
224
|
+
@property --tw-ring-offset-width {
|
|
225
|
+
syntax: "<length>";
|
|
226
|
+
inherits: false;
|
|
227
|
+
initial-value: 0px;
|
|
228
|
+
}
|
|
229
|
+
@property --tw-ring-offset-color {
|
|
230
|
+
syntax: "*";
|
|
231
|
+
inherits: false;
|
|
232
|
+
initial-value: #fff;
|
|
233
|
+
}
|
|
234
|
+
@property --tw-ring-offset-shadow {
|
|
235
|
+
syntax: "*";
|
|
236
|
+
inherits: false;
|
|
237
|
+
initial-value: 0 0 #0000;
|
|
238
|
+
}
|
|
79
239
|
@property --tw-font-weight {
|
|
80
240
|
syntax: "*";
|
|
81
241
|
inherits: false;
|
|
@@ -84,3 +244,7 @@
|
|
|
84
244
|
syntax: "*";
|
|
85
245
|
inherits: false;
|
|
86
246
|
}
|
|
247
|
+
@property --tw-ease {
|
|
248
|
+
syntax: "*";
|
|
249
|
+
inherits: false;
|
|
250
|
+
}
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
--color-button-secondary-fill: color(display-p3 0.0861 0.0861 0.0861);
|
|
58
58
|
--color-button-tertiary-fill: color(display-p3 1 1 1);
|
|
59
59
|
--color-button-warning-fill: color(display-p3 0.8263 0.6154 0.2247);
|
|
60
|
+
--color-focus-ring: color(display-p3 0.5242 0.2903 0.7705);
|
|
60
61
|
--color-lilac-100: color(display-p3 0.9492 0.917 0.9935);
|
|
61
62
|
--color-lilac-300: color(display-p3 0.7319 0.6108 0.8873);
|
|
62
63
|
--color-lilac-600: color(display-p3 0.4045 0.2306 0.6077);
|