@eqtylab/equality 4.7.0 → 4.9.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 CHANGED
@@ -2,6 +2,27 @@
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.9.0 - 2026-10-01
6
+
7
+ ### Changed
8
+
9
+ - `Dialog` and `Command` use the overlay surface, border and shadow tokens that `AlertDialog`,
10
+ `Sheet`, `Drawer` and `Popover` already use. In dark mode a `Dialog` sat darker than the page
11
+ behind it; it now sits above it.
12
+
13
+ ## 4.8.0 - 2026-10-01
14
+
15
+ ### Changed
16
+
17
+ - `Switch`'s off track is a lighter grey in both themes and clears 3:1 against the page in each,
18
+ as WCAG 1.4.11 asks of a control's state. In dark mode it was 2.07:1. An off `danger` switch is
19
+ grey like any other off switch rather than dark red, so it no longer reads as on. Hover darkens
20
+ the track in light mode and lightens it in dark mode, and the track and thumb move with the
21
+ same 250ms easing as `SegmentedControls` and respect reduced motion.
22
+ - A checked `RadioGroupItem` uses the primary fill a checked `Checkbox` uses, instead of a black
23
+ dot.
24
+ - `Textarea` has the same 8px padding as `Input`, so their text lines up in a form.
25
+
5
26
  ## 4.7.0 - 2026-09-28
6
27
 
7
28
  ### Added
@@ -1,10 +1,10 @@
1
1
  /*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
2
2
  .command {
3
- background-color: var(--color-popover-background, color(display-p3 0.9738 0.9799 0.9872));
3
+ background-color: var(--color-background-overlay, color(display-p3 0.9946 0.9998 0.9999));
4
4
  color: var(--color-text-primary, color(display-p3 0 0 0));
5
5
  border-style: var(--tw-border-style);
6
6
  border-width: 1px;
7
- border-color: var(--color-card-border, color(display-p3 0.8698 0.8698 0.8698));
7
+ border-color: var(--color-border-overlay, color(display-p3 0.8011 0.807 0.814));
8
8
  width: 100%;
9
9
  height: 100%;
10
10
  overflow: hidden;
@@ -70,7 +70,7 @@
70
70
  .command-input {
71
71
  border-bottom-style: var(--tw-border-style);
72
72
  border-bottom-width: 1px;
73
- border-color: var(--color-card-border, color(display-p3 0.8698 0.8698 0.8698));
73
+ border-color: var(--color-border-overlay, color(display-p3 0.8011 0.807 0.814));
74
74
  height: calc(0.25rem * 9);
75
75
  padding-inline: calc(0.25rem * 3);
76
76
  display: flex;
@@ -29,9 +29,11 @@
29
29
  border-radius: 0.5rem;
30
30
  border-style: var(--tw-border-style);
31
31
  border-width: 1px;
32
- background-color: var(--color-popover-background, color(display-p3 0.9738 0.9799 0.9872));
32
+ border-color: var(--color-border-overlay, color(display-p3 0.8011 0.807 0.814));
33
+ background-color: var(--color-background-overlay, color(display-p3 0.9946 0.9998 0.9999));
33
34
  --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
34
35
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
36
+ --tw-shadow-color: color-mix(in oklab, rgba(0, 0, 0, 0.1) var(--tw-shadow-alpha), transparent);
35
37
  display: flex;
36
38
  flex-direction: column;
37
39
  --tw-duration: 200ms;
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" | "link" | "navigation" | null | undefined;
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" | "link" | "navigation" | null | undefined;
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" | "link" | "navigation" | null | undefined;
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" | "link" | "navigation" | null | undefined;
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" | "link" | "navigation" | null | undefined;
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" | "link" | "navigation" | null | undefined;
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.5);
45
- height: calc(0.25rem * 2.5);
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
- &[data-state="checked"] {
122
- background-color: var(--color-red-500, color(display-p3 0.7365 0.2216 0.2026));
123
- }
124
- &[data-state="unchecked"] {
125
- background-color: var(--color-red-700, color(display-p3 0.4113 0.1505 0.1319));
126
- }
127
- &[data-state="checked"] {
128
- &:hover {
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
- &[data-state="unchecked"] {
135
- &:hover {
136
- @media (hover: hover) {
137
- background-color: var(--color-red-600, color(display-p3 0.5698 0.1873 0.1674));
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-inline: calc(0.25rem * 3);
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);
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.7.0",
10
+ "version": "4.9.0",
11
11
  "license": "Apache-2.0",
12
12
  "keywords": [
13
13
  "component library",