@eqtylab/equality 4.11.0 → 4.12.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.
@@ -12,18 +12,18 @@
12
12
  border-color: color-mix(in oklch, var(--color-text-primary) 22%, transparent);
13
13
  }
14
14
  }
15
- display: flex;
16
- border-radius: var(--radius-md, 0.375rem);
17
- width: max-content;
18
- overflow: hidden;
19
- background-color: var(--color-button-tertiary-fill, color(display-p3 1 1 1));
20
- position: relative;
21
15
  --tw-inset-shadow: inset 0 1px 2px var(--tw-inset-shadow-color, rgb(0 0 0 / 0.08));
22
16
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
23
17
  &:where(html[data-equality-theme=dark], html[data-equality-theme=dark] *, [data-equality-theme=dark] .root, [data-equality-theme=dark] .root *) {
24
18
  --tw-inset-shadow: inset 0 1px 2px var(--tw-inset-shadow-color, rgb(0 0 0 / 0.35));
25
19
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
26
20
  }
21
+ overflow: hidden;
22
+ border-radius: var(--radius-md, 0.375rem);
23
+ display: flex;
24
+ width: max-content;
25
+ background-color: var(--color-button-tertiary-fill, color(display-p3 1 1 1));
26
+ position: relative;
27
27
  }
28
28
  .segment {
29
29
  border-radius: 0 !important;
@@ -57,39 +57,44 @@
57
57
  @media (prefers-reduced-motion: reduce) {
58
58
  transition-property: none;
59
59
  }
60
- }
61
- .segment::before,
62
- .segment::after {
63
- content: '';
64
- pointer-events: none;
65
- position: absolute;
66
- }
67
- .segment::before {
68
- inset: 2px;
69
- z-index: calc(10 * -1);
70
- border-radius: 3px;
71
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
72
- transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
73
- transition-duration: var(--tw-duration, 150ms);
74
- --tw-duration: 250ms;
75
- transition-duration: 250ms;
76
- --tw-ease: cubic-bezier(0.32, 0.72, 0, 1);
77
- transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
78
- @media (prefers-reduced-motion: reduce) {
79
- transition-property: none;
60
+ &::before {
61
+ content: '';
62
+ pointer-events: none;
63
+ position: absolute;
64
+ inset: 2px;
65
+ z-index: -1;
66
+ border-radius: 3px;
67
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
68
+ transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
69
+ transition-duration: var(--tw-duration, 150ms);
70
+ --tw-duration: 250ms;
71
+ transition-duration: 250ms;
72
+ --tw-ease: cubic-bezier(0.32, 0.72, 0, 1);
73
+ transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
74
+ @media (prefers-reduced-motion: reduce) {
75
+ transition-property: none;
76
+ }
80
77
  }
81
- }
82
- .segment--inactive:hover::before {
83
- background-color: color-mix(in srgb, color(display-p3 0 0 0) 8%, transparent);
84
- @supports (color: color-mix(in lab, red, red)) {
85
- background-color: color-mix(in oklab, var(--color-text-primary, color(display-p3 0 0 0)) 8%, transparent);
78
+ &:focus-visible::after {
79
+ content: '';
80
+ pointer-events: none;
81
+ position: absolute;
82
+ inset: calc(0.25rem * 0);
83
+ border-radius: 5px;
84
+ box-shadow: inset 0 0 0 2px var(--color-focus-ring), inset 0 0 0 4px var(--color-background);
86
85
  }
87
86
  }
88
- .segment:focus-visible::after {
89
- inset: calc(0.25rem * 0);
90
- border-radius: 5px;
91
- box-shadow: inset 0 0 0 2px var(--color-focus-ring),
92
- inset 0 0 0 2px var(--color-background);
87
+ .segment--inactive {
88
+ &:hover {
89
+ @media (hover: hover) {
90
+ &::before {
91
+ background-color: color-mix(in srgb, color(display-p3 0 0 0) 8%, transparent);
92
+ @supports (color: color-mix(in lab, red, red)) {
93
+ background-color: color-mix(in oklab, var(--color-text-primary, color(display-p3 0 0 0)) 8%, transparent);
94
+ }
95
+ }
96
+ }
97
+ }
93
98
  }
94
99
  .segment--icon-only {
95
100
  display: flex;
@@ -148,9 +153,15 @@
148
153
  .segment--inactive .segment-icon {
149
154
  color: var(--color-text-secondary, color(display-p3 0.1792 0.1792 0.1792));
150
155
  }
151
- .segment--inactive:hover,
152
- .segment--inactive:hover .segment-icon {
153
- color: var(--color-text-primary, color(display-p3 0 0 0));
156
+ .segment--inactive {
157
+ &:hover {
158
+ @media (hover: hover) {
159
+ &,
160
+ & .segment-icon {
161
+ color: var(--color-text-primary, color(display-p3 0 0 0));
162
+ }
163
+ }
164
+ }
154
165
  }
155
166
  .segment-icon,
156
167
  .segment-suffix {
@@ -177,8 +188,6 @@
177
188
  left: 2px;
178
189
  width: calc(var(--indicator-width) - 4px);
179
190
  border-radius: 3px;
180
- --mix-color: var(--segment-active-fill);
181
- background-color: var(--mix-color);
182
191
  --tw-shadow: 0 1px 2px var(--tw-shadow-color, rgb(0 0 0 / 0.18)), 0 2px 6px -2px var(--tw-shadow-color, var(--mix-color, transparent)), inset 0 1px 0 var(--tw-shadow-color, rgb(255 255 255 / 0.25));
183
192
  @supports (color: color-mix(in lab, red, red)) {
184
193
  --tw-shadow: 0 1px 2px var(--tw-shadow-color, rgb(0 0 0 / 0.18)), 0 2px 6px -2px var(--tw-shadow-color, color-mix(in oklch, var(--mix-color, transparent) 25%, transparent)), inset 0 1px 0 var(--tw-shadow-color, rgb(255 255 255 / 0.25));
@@ -188,6 +197,8 @@
188
197
  --tw-shadow: 0 1px 2px var(--tw-shadow-color, rgb(0 0 0 / 0.45)), inset 0 1px 0 var(--tw-shadow-color, rgb(255 255 255 / 0.25));
189
198
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
190
199
  }
200
+ --mix-color: var(--segment-active-fill);
201
+ background-color: var(--mix-color);
191
202
  }
192
203
  .active-segment-indicator--animated {
193
204
  transition-property: transform,width,background-color;
@@ -9,10 +9,18 @@
9
9
  .tabs-trigger {
10
10
  position: relative;
11
11
  z-index: 10;
12
+ cursor: pointer;
12
13
  white-space: nowrap;
13
- transition-property: all;
14
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
14
15
  transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
15
16
  transition-duration: var(--tw-duration, 150ms);
17
+ --tw-duration: 250ms;
18
+ transition-duration: 250ms;
19
+ --tw-ease: cubic-bezier(0.32, 0.72, 0, 1);
20
+ transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
21
+ @media (prefers-reduced-motion: reduce) {
22
+ transition-property: none;
23
+ }
16
24
  padding-inline: calc(0.25rem * 3);
17
25
  padding-block: calc(0.25rem * 1.5);
18
26
  font-size: 1.125rem;
@@ -65,6 +73,14 @@
65
73
  outline-style: none;
66
74
  }
67
75
  }
76
+ @property --tw-duration {
77
+ syntax: "*";
78
+ inherits: false;
79
+ }
80
+ @property --tw-ease {
81
+ syntax: "*";
82
+ inherits: false;
83
+ }
68
84
  @property --tw-font-weight {
69
85
  syntax: "*";
70
86
  inherits: false;
@@ -12,17 +12,63 @@
12
12
  border-color: var(--color-border, color(display-p3 0.7432 0.7432 0.7432));
13
13
  }
14
14
  .tabs-list--filled {
15
- background-color: var(--color-background-sunken, color(display-p3 0.8648 0.8708 0.8779));
16
- --tw-inset-shadow: inset 0 1px 1px var(--tw-inset-shadow-color, rgb(0 0 0 / 0.05));
15
+ border-style: var(--tw-border-style);
16
+ border-width: 1px;
17
+ border-color: color-mix(in srgb, color(display-p3 0 0 0) 16%, transparent);
18
+ @supports (color: color-mix(in lab, red, red)) {
19
+ border-color: color-mix(in oklch, var(--color-text-primary) 16%, transparent);
20
+ }
21
+ &:where(html[data-equality-theme=dark], html[data-equality-theme=dark] *, [data-equality-theme=dark] .root, [data-equality-theme=dark] .root *) {
22
+ border-color: color-mix(in srgb, color(display-p3 0 0 0) 22%, transparent);
23
+ @supports (color: color-mix(in lab, red, red)) {
24
+ border-color: color-mix(in oklch, var(--color-text-primary) 22%, transparent);
25
+ }
26
+ }
27
+ --tw-inset-shadow: inset 0 1px 2px var(--tw-inset-shadow-color, rgb(0 0 0 / 0.08));
17
28
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
29
+ &:where(html[data-equality-theme=dark], html[data-equality-theme=dark] *, [data-equality-theme=dark] .root, [data-equality-theme=dark] .root *) {
30
+ --tw-inset-shadow: inset 0 1px 2px var(--tw-inset-shadow-color, rgb(0 0 0 / 0.35));
31
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
32
+ }
18
33
  overflow: hidden;
19
34
  border-radius: var(--radius-md, 0.375rem);
35
+ background-color: var(--color-background-sunken, color(display-p3 0.8648 0.8708 0.8779));
36
+ }
37
+ .tabs-trigger--filled,
38
+ .tabs-trigger--transparent {
39
+ align-self: stretch;
20
40
  }
21
41
  .tabs-trigger--filled {
22
42
  width: 100%;
23
43
  padding-inline: calc(0.25rem * 3);
24
44
  padding-block: calc(0.25rem * 1.5);
25
45
  color: var(--color-text-secondary, color(display-p3 0.1792 0.1792 0.1792));
46
+ &::before {
47
+ content: '';
48
+ pointer-events: none;
49
+ position: absolute;
50
+ inset: 2px;
51
+ z-index: -1;
52
+ border-radius: 3px;
53
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
54
+ transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
55
+ transition-duration: var(--tw-duration, 150ms);
56
+ --tw-duration: 250ms;
57
+ transition-duration: 250ms;
58
+ --tw-ease: cubic-bezier(0.32, 0.72, 0, 1);
59
+ transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
60
+ @media (prefers-reduced-motion: reduce) {
61
+ transition-property: none;
62
+ }
63
+ }
64
+ &:focus-visible::after {
65
+ content: '';
66
+ pointer-events: none;
67
+ position: absolute;
68
+ inset: calc(0.25rem * 0);
69
+ border-radius: 5px;
70
+ box-shadow: inset 0 0 0 2px var(--color-focus-ring), inset 0 0 0 4px var(--color-background);
71
+ }
26
72
  }
27
73
  .tabs-icon {
28
74
  color: inherit;
@@ -37,6 +83,47 @@
37
83
  color: var(--color-text-primary, color(display-p3 0 0 0));
38
84
  }
39
85
  }
86
+ .tabs-trigger--transparent::before {
87
+ content: '';
88
+ pointer-events: none;
89
+ position: absolute;
90
+ z-index: -1;
91
+ right: calc(0.25rem * 0);
92
+ bottom: calc(0.25rem * 0);
93
+ left: calc(0.25rem * 0);
94
+ height: calc(0.25rem * 0.5);
95
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
96
+ transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
97
+ transition-duration: var(--tw-duration, 150ms);
98
+ --tw-duration: 250ms;
99
+ transition-duration: 250ms;
100
+ --tw-ease: cubic-bezier(0.32, 0.72, 0, 1);
101
+ transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
102
+ @media (prefers-reduced-motion: reduce) {
103
+ transition-property: none;
104
+ }
105
+ }
106
+ .tabs-trigger--filled[data-state='inactive'],
107
+ .tabs-trigger--transparent[data-state='inactive'] {
108
+ &:hover {
109
+ @media (hover: hover) {
110
+ &::before {
111
+ background-color: color-mix(in srgb, color(display-p3 0 0 0) 8%, transparent);
112
+ @supports (color: color-mix(in lab, red, red)) {
113
+ background-color: color-mix(in oklab, var(--color-text-primary, color(display-p3 0 0 0)) 8%, transparent);
114
+ }
115
+ }
116
+ }
117
+ }
118
+ &:hover {
119
+ @media (hover: hover) {
120
+ color: var(--color-text-primary, color(display-p3 0 0 0));
121
+ }
122
+ }
123
+ }
124
+ .tabs-list .tabs-trigger--filled:focus-visible {
125
+ box-shadow: none;
126
+ }
40
127
  .active-tab-indicator {
41
128
  position: absolute;
42
129
  z-index: -1;
@@ -44,9 +131,19 @@
44
131
  background-color: var(--color-button-primary-fill, color(display-p3 0.5242 0.2903 0.7705));
45
132
  }
46
133
  .active-tab-indicator--filled {
47
- inset: calc(0.25rem * 0);
48
- height: 100%;
49
- border-radius: 0.25rem;
134
+ inset: 2px;
135
+ width: auto;
136
+ border-radius: 3px;
137
+ --tw-shadow: 0 1px 2px var(--tw-shadow-color, rgb(0 0 0 / 0.18)), 0 2px 6px -2px var(--tw-shadow-color, var(--mix-color, transparent)), inset 0 1px 0 var(--tw-shadow-color, rgb(255 255 255 / 0.25));
138
+ @supports (color: color-mix(in lab, red, red)) {
139
+ --tw-shadow: 0 1px 2px var(--tw-shadow-color, rgb(0 0 0 / 0.18)), 0 2px 6px -2px var(--tw-shadow-color, color-mix(in oklch, var(--mix-color, transparent) 25%, transparent)), inset 0 1px 0 var(--tw-shadow-color, rgb(255 255 255 / 0.25));
140
+ }
141
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
142
+ &:where(html[data-equality-theme=dark], html[data-equality-theme=dark] *, [data-equality-theme=dark] .root, [data-equality-theme=dark] .root *) {
143
+ --tw-shadow: 0 1px 2px var(--tw-shadow-color, rgb(0 0 0 / 0.45)), inset 0 1px 0 var(--tw-shadow-color, rgb(255 255 255 / 0.25));
144
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
145
+ }
146
+ --mix-color: var(--color-button-primary-fill);
50
147
  }
51
148
  .active-tab-indicator--transparent {
52
149
  height: calc(0.25rem * 0.5);
@@ -54,6 +151,28 @@
54
151
  bottom: calc(0.25rem * 0);
55
152
  left: calc(0.25rem * 0);
56
153
  }
154
+ .active-tab-indicator--shared {
155
+ right: auto;
156
+ z-index: auto;
157
+ }
158
+ .active-tab-indicator--filled.active-tab-indicator--shared {
159
+ width: calc(var(--indicator-width) - 4px);
160
+ }
161
+ .active-tab-indicator--transparent.active-tab-indicator--shared {
162
+ width: var(--indicator-width);
163
+ }
164
+ .active-tab-indicator--animated {
165
+ transition-property: transform,width;
166
+ transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
167
+ transition-duration: var(--tw-duration, 150ms);
168
+ --tw-duration: var(--indicator-duration);
169
+ transition-duration: var(--indicator-duration);
170
+ --tw-ease: cubic-bezier(0.32, 0.72, 0, 1);
171
+ transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
172
+ @media (prefers-reduced-motion: reduce) {
173
+ transition-property: none;
174
+ }
175
+ }
57
176
  .content {
58
177
  margin-top: calc(0.25rem * 5);
59
178
  :where(& > :not(:last-child)) {
@@ -138,6 +257,14 @@
138
257
  inherits: false;
139
258
  initial-value: 0 0 #0000;
140
259
  }
260
+ @property --tw-duration {
261
+ syntax: "*";
262
+ inherits: false;
263
+ }
264
+ @property --tw-ease {
265
+ syntax: "*";
266
+ inherits: false;
267
+ }
141
268
  @property --tw-space-y-reverse {
142
269
  syntax: "*";
143
270
  inherits: false;
@@ -6,6 +6,45 @@
6
6
  @apply focus-visible:outline-none;
7
7
  }
8
8
 
9
+ @utility control-track {
10
+ @apply border-control-edge dark:border-control-edge-dark border;
11
+ @apply inset-shadow-control-sunken dark:inset-shadow-control-sunken-dark;
12
+ @apply overflow-hidden rounded-md;
13
+ }
14
+
15
+ @utility control-segment-fill {
16
+ &::before {
17
+ content: '';
18
+ @apply z-behind pointer-events-none absolute inset-[2px] rounded-[3px];
19
+ @apply ease-control duration-250 transition-colors;
20
+ @apply motion-reduce:transition-none;
21
+ }
22
+ }
23
+
24
+ @utility control-segment-hover {
25
+ @variant hover {
26
+ &::before {
27
+ @apply bg-text-primary/8;
28
+ }
29
+ }
30
+ }
31
+
32
+ /* The inner band keeps the ring visible against the indicator, which shares its colour in light mode */
33
+ @utility control-segment-focus-ring {
34
+ &:focus-visible::after {
35
+ content: '';
36
+ @apply pointer-events-none absolute inset-0 rounded-[5px];
37
+ box-shadow:
38
+ inset 0 0 0 2px var(--color-focus-ring),
39
+ inset 0 0 0 4px var(--color-background);
40
+ }
41
+ }
42
+
43
+ @utility control-segment-indicator {
44
+ @apply rounded-[3px];
45
+ @apply shadow-control-raised dark:shadow-control-raised-dark;
46
+ }
47
+
9
48
  @utility overlay-background {
10
49
  @apply bg-black/80;
11
50
  }
@@ -401,10 +401,17 @@
401
401
  line-height: var(--tw-leading, calc(1 / 0.75));
402
402
  color: var(--color-text-secondary);
403
403
  }
404
+ .underline {
405
+ text-decoration-line: underline;
406
+ }
404
407
  .shadow {
405
408
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
406
409
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
407
410
  }
411
+ .ring {
412
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
413
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
414
+ }
408
415
  .outline {
409
416
  outline-style: var(--tw-outline-style);
410
417
  outline-width: 1px;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/eqtylab/equality.git",
8
8
  "directory": "packages/ui"
9
9
  },
10
- "version": "4.11.0",
10
+ "version": "4.12.0",
11
11
  "license": "Apache-2.0",
12
12
  "keywords": [
13
13
  "component library",