@eqtylab/equality 4.7.0 → 4.8.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/CHANGELOG.md +13 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/radio-group.module.module.css.module.css +11 -2
- package/dist/switch.module.module.css.module.css +53 -37
- package/dist/textarea.module.module.css.module.css +1 -2
- package/dist/theme.module.module.css.module.css +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to Equality are recorded here, following [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
4
4
|
|
|
5
|
+
## 4.8.0 - 2026-10-01
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- `Switch`'s off track is a lighter grey in both themes and clears 3:1 against the page in each,
|
|
10
|
+
as WCAG 1.4.11 asks of a control's state. In dark mode it was 2.07:1. An off `danger` switch is
|
|
11
|
+
grey like any other off switch rather than dark red, so it no longer reads as on. Hover darkens
|
|
12
|
+
the track in light mode and lightens it in dark mode, and the track and thumb move with the
|
|
13
|
+
same 250ms easing as `SegmentedControls` and respect reduced motion.
|
|
14
|
+
- A checked `RadioGroupItem` uses the primary fill a checked `Checkbox` uses, instead of a black
|
|
15
|
+
dot.
|
|
16
|
+
- `Textarea` has the same 8px padding as `Input`, so their text lines up in a form.
|
|
17
|
+
|
|
5
18
|
## 4.7.0 - 2026-09-28
|
|
6
19
|
|
|
7
20
|
### Added
|
package/dist/index.d.cts
CHANGED
|
@@ -45,14 +45,14 @@ declare const AlertDialogFooter: {
|
|
|
45
45
|
declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
46
46
|
declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
47
47
|
declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
48
|
-
variant?: "primary" | "danger" | "warning" | "secondary" | "tertiary" | "
|
|
48
|
+
variant?: "link" | "primary" | "danger" | "warning" | "secondary" | "tertiary" | "navigation" | null | undefined;
|
|
49
49
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
50
50
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
51
51
|
prefix?: React$1.ReactNode;
|
|
52
52
|
suffix?: React$1.ReactNode;
|
|
53
53
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
54
54
|
declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
55
|
-
variant?: "primary" | "danger" | "warning" | "secondary" | "tertiary" | "
|
|
55
|
+
variant?: "link" | "primary" | "danger" | "warning" | "secondary" | "tertiary" | "navigation" | null | undefined;
|
|
56
56
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
57
57
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
58
58
|
prefix?: React$1.ReactNode;
|
|
@@ -225,7 +225,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
225
225
|
}) => react_jsx_runtime.JSX.Element;
|
|
226
226
|
|
|
227
227
|
declare const buttonVariants: (props?: ({
|
|
228
|
-
variant?: "primary" | "danger" | "warning" | "secondary" | "tertiary" | "
|
|
228
|
+
variant?: "link" | "primary" | "danger" | "warning" | "secondary" | "tertiary" | "navigation" | null | undefined;
|
|
229
229
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
230
230
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
231
231
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -45,14 +45,14 @@ declare const AlertDialogFooter: {
|
|
|
45
45
|
declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
46
46
|
declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
47
47
|
declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
48
|
-
variant?: "primary" | "danger" | "warning" | "secondary" | "tertiary" | "
|
|
48
|
+
variant?: "link" | "primary" | "danger" | "warning" | "secondary" | "tertiary" | "navigation" | null | undefined;
|
|
49
49
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
50
50
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
51
51
|
prefix?: React$1.ReactNode;
|
|
52
52
|
suffix?: React$1.ReactNode;
|
|
53
53
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
54
54
|
declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
55
|
-
variant?: "primary" | "danger" | "warning" | "secondary" | "tertiary" | "
|
|
55
|
+
variant?: "link" | "primary" | "danger" | "warning" | "secondary" | "tertiary" | "navigation" | null | undefined;
|
|
56
56
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
57
57
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
58
58
|
prefix?: React$1.ReactNode;
|
|
@@ -225,7 +225,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
225
225
|
}) => react_jsx_runtime.JSX.Element;
|
|
226
226
|
|
|
227
227
|
declare const buttonVariants: (props?: ({
|
|
228
|
-
variant?: "primary" | "danger" | "warning" | "secondary" | "tertiary" | "
|
|
228
|
+
variant?: "link" | "primary" | "danger" | "warning" | "secondary" | "tertiary" | "navigation" | null | undefined;
|
|
229
229
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
230
230
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
231
231
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
border-width: 1px;
|
|
9
9
|
border-color: var(--color-text-primary, color(display-p3 0 0 0));
|
|
10
10
|
color: var(--color-text-primary, color(display-p3 0 0 0));
|
|
11
|
+
&[data-state="checked"] {
|
|
12
|
+
border-color: var(--color-button-primary-border, color(display-p3 0.5242 0.2903 0.7705));
|
|
13
|
+
}
|
|
14
|
+
&[data-state="checked"] {
|
|
15
|
+
background-color: var(--color-button-primary-fill, color(display-p3 0.5242 0.2903 0.7705));
|
|
16
|
+
}
|
|
17
|
+
&[data-state="checked"] {
|
|
18
|
+
color: var(--color-button-primary-text, color(display-p3 1 1 1));
|
|
19
|
+
}
|
|
11
20
|
aspect-ratio: 1 / 1;
|
|
12
21
|
width: calc(0.25rem * 4);
|
|
13
22
|
height: calc(0.25rem * 4);
|
|
@@ -41,8 +50,8 @@
|
|
|
41
50
|
justify-content: center;
|
|
42
51
|
}
|
|
43
52
|
.indicator-icon {
|
|
44
|
-
width: calc(0.25rem * 2
|
|
45
|
-
height: calc(0.25rem * 2
|
|
53
|
+
width: calc(0.25rem * 2);
|
|
54
|
+
height: calc(0.25rem * 2);
|
|
46
55
|
fill: currentcolor;
|
|
47
56
|
color: currentcolor;
|
|
48
57
|
}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
|
|
2
2
|
.switch {
|
|
3
|
+
--switch-transition-duration: 250ms;
|
|
4
|
+
--switch-transition-easing: cubic-bezier(0.32, 0.72, 0, 1);
|
|
5
|
+
--switch-off-fill: var(--color-greyscale-500);
|
|
6
|
+
--switch-off-hover-fill: var(--color-greyscale-600);
|
|
7
|
+
--switch-on-hover-fill: var(--mix-color);
|
|
8
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
9
|
+
--switch-on-hover-fill: color-mix(in oklch, var(--mix-color), black 16%);
|
|
10
|
+
}
|
|
3
11
|
cursor: pointer;
|
|
4
12
|
border-radius: calc(infinity * 1px);
|
|
5
13
|
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
6
14
|
transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
|
|
7
15
|
transition-duration: var(--tw-duration, 150ms);
|
|
16
|
+
--tw-duration: var(--switch-transition-duration);
|
|
17
|
+
transition-duration: var(--switch-transition-duration);
|
|
18
|
+
--tw-ease: var(--switch-transition-easing);
|
|
19
|
+
transition-timing-function: var(--switch-transition-easing);
|
|
20
|
+
@media (prefers-reduced-motion: reduce) {
|
|
21
|
+
transition-property: none;
|
|
22
|
+
}
|
|
8
23
|
display: inline-flex;
|
|
9
24
|
flex-shrink: 0;
|
|
10
25
|
align-items: center;
|
|
@@ -33,6 +48,14 @@
|
|
|
33
48
|
&:disabled {
|
|
34
49
|
opacity: 50%;
|
|
35
50
|
}
|
|
51
|
+
&:where(html[data-equality-theme=dark], html[data-equality-theme=dark] *, [data-equality-theme=dark] .root, [data-equality-theme=dark] .root *) {
|
|
52
|
+
--switch-off-fill: var(--color-greyscale-600);
|
|
53
|
+
--switch-off-hover-fill: var(--color-greyscale-500);
|
|
54
|
+
--switch-on-hover-fill: var(--mix-color);
|
|
55
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
56
|
+
--switch-on-hover-fill: color-mix(in oklch, var(--mix-color), white 14%);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
36
59
|
}
|
|
37
60
|
.thumb {
|
|
38
61
|
background-color: var(--color-background, color(display-p3 1 1 1));
|
|
@@ -42,6 +65,13 @@
|
|
|
42
65
|
transition-property: transform, translate, scale, rotate;
|
|
43
66
|
transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
|
|
44
67
|
transition-duration: var(--tw-duration, 150ms);
|
|
68
|
+
--tw-duration: var(--switch-transition-duration);
|
|
69
|
+
transition-duration: var(--switch-transition-duration);
|
|
70
|
+
--tw-ease: var(--switch-transition-easing);
|
|
71
|
+
transition-timing-function: var(--switch-transition-easing);
|
|
72
|
+
@media (prefers-reduced-motion: reduce) {
|
|
73
|
+
transition-property: none;
|
|
74
|
+
}
|
|
45
75
|
display: flex;
|
|
46
76
|
align-items: center;
|
|
47
77
|
justify-content: center;
|
|
@@ -93,52 +123,38 @@
|
|
|
93
123
|
}
|
|
94
124
|
.switch.default {
|
|
95
125
|
--mix-color: var(--color-button-primary-fill);
|
|
96
|
-
&[data-state="checked"] {
|
|
97
|
-
background-color: var(--mix-color);
|
|
98
|
-
}
|
|
99
|
-
&[data-state="unchecked"] {
|
|
100
|
-
background-color: var(--color-greyscale-700, color(display-p3 0.2806 0.2806 0.2806));
|
|
101
|
-
}
|
|
102
|
-
&[data-state="checked"] {
|
|
103
|
-
&:hover {
|
|
104
|
-
@media (hover: hover) {
|
|
105
|
-
background-color: var(--mix-color);
|
|
106
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
107
|
-
background-color: color-mix(in oklch, var(--mix-color), white var(--hover-lighten, 20%));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
&[data-state="unchecked"] {
|
|
113
|
-
&:hover {
|
|
114
|
-
@media (hover: hover) {
|
|
115
|
-
background-color: var(--color-greyscale-600, color(display-p3 0.3886 0.3886 0.3886));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
126
|
}
|
|
120
127
|
.switch.danger {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
@media (hover: hover) {
|
|
130
|
-
background-color: var(--color-red-600, color(display-p3 0.5698 0.1873 0.1674));
|
|
128
|
+
--mix-color: var(--color-button-danger-fill);
|
|
129
|
+
}
|
|
130
|
+
.switch[data-state='unchecked'] {
|
|
131
|
+
background-color: var(--switch-off-fill);
|
|
132
|
+
&:hover {
|
|
133
|
+
@media (hover: hover) {
|
|
134
|
+
&:not(*:disabled) {
|
|
135
|
+
background-color: var(--switch-off-hover-fill);
|
|
131
136
|
}
|
|
132
137
|
}
|
|
133
138
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
}
|
|
140
|
+
.switch[data-state='checked'] {
|
|
141
|
+
background-color: var(--mix-color);
|
|
142
|
+
&:hover {
|
|
143
|
+
@media (hover: hover) {
|
|
144
|
+
&:not(*:disabled) {
|
|
145
|
+
background-color: var(--switch-on-hover-fill);
|
|
138
146
|
}
|
|
139
147
|
}
|
|
140
148
|
}
|
|
141
149
|
}
|
|
150
|
+
@property --tw-duration {
|
|
151
|
+
syntax: "*";
|
|
152
|
+
inherits: false;
|
|
153
|
+
}
|
|
154
|
+
@property --tw-ease {
|
|
155
|
+
syntax: "*";
|
|
156
|
+
inherits: false;
|
|
157
|
+
}
|
|
142
158
|
@property --tw-border-style {
|
|
143
159
|
syntax: "*";
|
|
144
160
|
inherits: false;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
|
|
2
2
|
.textarea {
|
|
3
3
|
display: flex;
|
|
4
|
-
padding
|
|
5
|
-
padding-block: calc(0.25rem * 2);
|
|
4
|
+
padding: calc(0.25rem * 2);
|
|
6
5
|
min-height: calc(0.25rem * 20);
|
|
7
6
|
width: 100%;
|
|
8
7
|
border-radius: var(--radius-md, 0.375rem);
|
|
@@ -65,6 +65,8 @@
|
|
|
65
65
|
--color-button-warning-fill: color(display-p3 0.8263 0.6154 0.2247);
|
|
66
66
|
--color-button-warning-text: color(display-p3 1 1 1);
|
|
67
67
|
--color-focus-ring: color(display-p3 0.5242 0.2903 0.7705);
|
|
68
|
+
--color-greyscale-500: color(display-p3 0.5021 0.5021 0.5021);
|
|
69
|
+
--color-greyscale-600: color(display-p3 0.3886 0.3886 0.3886);
|
|
68
70
|
--color-lilac-100: color(display-p3 0.9492 0.917 0.9935);
|
|
69
71
|
--color-lilac-300: color(display-p3 0.7319 0.6108 0.8873);
|
|
70
72
|
--color-lilac-600: color(display-p3 0.4045 0.2306 0.6077);
|