@eqtylab/equality 4.5.0 → 4.6.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 +22 -0
- package/dist/dropdown-menu.module.module.css.module.css +5 -0
- package/dist/generated/color-vars.css +10 -0
- package/dist/generated/dark-tokens.css +4 -0
- package/dist/generated/global-dark-tokens.css +4 -0
- package/dist/generated/global-light-tokens.css +6 -0
- package/dist/generated/light-tokens.css +6 -0
- package/dist/generated/tailwind-tokens.css +6 -0
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/segmented-controls.module.module.css.module.css +23 -3
- package/dist/select.module.module.css.module.css +4 -4
- package/dist/theme-utilities.css +1 -0
- package/dist/theme.module.module.css.module.css +31 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
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.6.0 - 2026-09-25
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Segmented control options can now display `primary` (default), `neutral`, `success`, `warning`, and `danger` variants that change the selection color based on the state.
|
|
10
|
+
|
|
11
|
+
## 4.5.1 - 2026-09-25
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- The search box in a searchable `Select` or `DropdownMenu` stays at the top of the list while
|
|
16
|
+
it scrolls. In a `Select` it scrolled away with the options, and in a `DropdownMenu` it was
|
|
17
|
+
never pinned.
|
|
18
|
+
- <kbd>↓</kbd> on the last option of a searchable `Select` or `DropdownMenu` scrolls the list back
|
|
19
|
+
to the top as it returns to the search box. The list stayed scrolled to the bottom.
|
|
20
|
+
|
|
21
|
+
## 4.5.0 - 2026-09-25
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Segmented controls now have `sm`, `md`, and `lg` `size` variants
|
|
26
|
+
|
|
5
27
|
## 4.4.2 - 2026-09-25
|
|
6
28
|
|
|
7
29
|
### Fixed
|
|
@@ -373,6 +373,9 @@
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
.dropdown-menu-search {
|
|
376
|
+
position: sticky;
|
|
377
|
+
top: calc(0.25rem * 0);
|
|
378
|
+
z-index: 10;
|
|
376
379
|
display: flex;
|
|
377
380
|
align-items: center;
|
|
378
381
|
justify-content: center;
|
|
@@ -382,7 +385,9 @@
|
|
|
382
385
|
margin-bottom: calc(0.25rem * 1);
|
|
383
386
|
border-bottom-style: var(--tw-border-style);
|
|
384
387
|
border-bottom-width: 1px;
|
|
388
|
+
top: calc(0.25rem * -1);
|
|
385
389
|
border-color: var(--color-border-overlay, color(display-p3 0.8011 0.807 0.814));
|
|
390
|
+
background-color: var(--color-background-overlay, color(display-p3 0.9946 0.9998 0.9999));
|
|
386
391
|
}
|
|
387
392
|
.dropdown-menu-search-input {
|
|
388
393
|
min-width: calc(0.25rem * 0);
|
|
@@ -73,12 +73,18 @@
|
|
|
73
73
|
--color-button-danger-border: color(display-p3 0.5698 0.1873 0.1674);
|
|
74
74
|
--color-button-danger-fill: color(display-p3 0.7365 0.2216 0.2026);
|
|
75
75
|
--color-button-danger-text: color(display-p3 1 1 1);
|
|
76
|
+
--color-button-neutral-border: color(display-p3 0.3886 0.3886 0.3886);
|
|
77
|
+
--color-button-neutral-fill: color(display-p3 0.3886 0.3886 0.3886);
|
|
78
|
+
--color-button-neutral-text: color(display-p3 1 1 1);
|
|
76
79
|
--color-button-primary-border: color(display-p3 0.5242 0.2903 0.7705);
|
|
77
80
|
--color-button-primary-fill: color(display-p3 0.5242 0.2903 0.7705);
|
|
78
81
|
--color-button-primary-text: color(display-p3 1 1 1);
|
|
79
82
|
--color-button-secondary-border: color(display-p3 0.0861 0.0861 0.0861);
|
|
80
83
|
--color-button-secondary-fill: color(display-p3 0.0861 0.0861 0.0861);
|
|
81
84
|
--color-button-secondary-text: color(display-p3 1 1 1);
|
|
85
|
+
--color-button-success-border: color(display-p3 0.2946 0.5328 0.2433);
|
|
86
|
+
--color-button-success-fill: color(display-p3 0.2946 0.5328 0.2433);
|
|
87
|
+
--color-button-success-text: color(display-p3 1 1 1);
|
|
82
88
|
--color-button-tertiary-border: color(display-p3 0.7432 0.7432 0.7432);
|
|
83
89
|
--color-button-tertiary-fill: color(display-p3 1 1 1);
|
|
84
90
|
--color-button-tertiary-text: color(display-p3 0 0 0);
|
|
@@ -324,11 +330,15 @@
|
|
|
324
330
|
--dark-color-border: color(display-p3 0.1792 0.1792 0.1792);
|
|
325
331
|
--dark-color-button-danger-border: color(display-p3 0.7365 0.2216 0.2026);
|
|
326
332
|
--dark-color-button-danger-fill: color(display-p3 0.7365 0.2216 0.2026);
|
|
333
|
+
--dark-color-button-neutral-border: color(display-p3 0.3886 0.3886 0.3886);
|
|
334
|
+
--dark-color-button-neutral-fill: color(display-p3 0.3886 0.3886 0.3886);
|
|
327
335
|
--dark-color-button-primary-border: color(display-p3 0.5242 0.2903 0.7705);
|
|
328
336
|
--dark-color-button-primary-fill: color(display-p3 0.5242 0.2903 0.7705);
|
|
329
337
|
--dark-color-button-secondary-border: color(display-p3 1 1 1);
|
|
330
338
|
--dark-color-button-secondary-fill: color(display-p3 1 1 1);
|
|
331
339
|
--dark-color-button-secondary-text: color(display-p3 0 0 0);
|
|
340
|
+
--dark-color-button-success-border: color(display-p3 0.2946 0.5328 0.2433);
|
|
341
|
+
--dark-color-button-success-fill: color(display-p3 0.2946 0.5328 0.2433);
|
|
332
342
|
--dark-color-button-tertiary-border: color(display-p3 0.2806 0.2806 0.2806);
|
|
333
343
|
--dark-color-button-tertiary-fill: color(display-p3 0 0 0);
|
|
334
344
|
--dark-color-button-tertiary-text: color(display-p3 1 1 1);
|
|
@@ -48,11 +48,15 @@
|
|
|
48
48
|
--color-border: color(display-p3 0.1792 0.1792 0.1792);
|
|
49
49
|
--color-button-danger-border: color(display-p3 0.7365 0.2216 0.2026);
|
|
50
50
|
--color-button-danger-fill: color(display-p3 0.7365 0.2216 0.2026);
|
|
51
|
+
--color-button-neutral-border: color(display-p3 0.3886 0.3886 0.3886);
|
|
52
|
+
--color-button-neutral-fill: color(display-p3 0.3886 0.3886 0.3886);
|
|
51
53
|
--color-button-primary-border: color(display-p3 0.5242 0.2903 0.7705);
|
|
52
54
|
--color-button-primary-fill: color(display-p3 0.5242 0.2903 0.7705);
|
|
53
55
|
--color-button-secondary-border: color(display-p3 1 1 1);
|
|
54
56
|
--color-button-secondary-fill: color(display-p3 1 1 1);
|
|
55
57
|
--color-button-secondary-text: color(display-p3 0 0 0);
|
|
58
|
+
--color-button-success-border: color(display-p3 0.2946 0.5328 0.2433);
|
|
59
|
+
--color-button-success-fill: color(display-p3 0.2946 0.5328 0.2433);
|
|
56
60
|
--color-button-tertiary-border: color(display-p3 0.2806 0.2806 0.2806);
|
|
57
61
|
--color-button-tertiary-fill: color(display-p3 0 0 0);
|
|
58
62
|
--color-button-tertiary-text: color(display-p3 1 1 1);
|
|
@@ -48,11 +48,15 @@ html[data-equality-theme='dark'] {
|
|
|
48
48
|
--color-border: color(display-p3 0.1792 0.1792 0.1792);
|
|
49
49
|
--color-button-danger-border: color(display-p3 0.7365 0.2216 0.2026);
|
|
50
50
|
--color-button-danger-fill: color(display-p3 0.7365 0.2216 0.2026);
|
|
51
|
+
--color-button-neutral-border: color(display-p3 0.3886 0.3886 0.3886);
|
|
52
|
+
--color-button-neutral-fill: color(display-p3 0.3886 0.3886 0.3886);
|
|
51
53
|
--color-button-primary-border: color(display-p3 0.5242 0.2903 0.7705);
|
|
52
54
|
--color-button-primary-fill: color(display-p3 0.5242 0.2903 0.7705);
|
|
53
55
|
--color-button-secondary-border: color(display-p3 1 1 1);
|
|
54
56
|
--color-button-secondary-fill: color(display-p3 1 1 1);
|
|
55
57
|
--color-button-secondary-text: color(display-p3 0 0 0);
|
|
58
|
+
--color-button-success-border: color(display-p3 0.2946 0.5328 0.2433);
|
|
59
|
+
--color-button-success-fill: color(display-p3 0.2946 0.5328 0.2433);
|
|
56
60
|
--color-button-tertiary-border: color(display-p3 0.2806 0.2806 0.2806);
|
|
57
61
|
--color-button-tertiary-fill: color(display-p3 0 0 0);
|
|
58
62
|
--color-button-tertiary-text: color(display-p3 1 1 1);
|
|
@@ -77,12 +77,18 @@ html {
|
|
|
77
77
|
--color-button-danger-border: color(display-p3 0.5698 0.1873 0.1674);
|
|
78
78
|
--color-button-danger-fill: color(display-p3 0.7365 0.2216 0.2026);
|
|
79
79
|
--color-button-danger-text: color(display-p3 1 1 1);
|
|
80
|
+
--color-button-neutral-border: color(display-p3 0.3886 0.3886 0.3886);
|
|
81
|
+
--color-button-neutral-fill: color(display-p3 0.3886 0.3886 0.3886);
|
|
82
|
+
--color-button-neutral-text: color(display-p3 1 1 1);
|
|
80
83
|
--color-button-primary-border: color(display-p3 0.5242 0.2903 0.7705);
|
|
81
84
|
--color-button-primary-fill: color(display-p3 0.5242 0.2903 0.7705);
|
|
82
85
|
--color-button-primary-text: color(display-p3 1 1 1);
|
|
83
86
|
--color-button-secondary-border: color(display-p3 0.0861 0.0861 0.0861);
|
|
84
87
|
--color-button-secondary-fill: color(display-p3 0.0861 0.0861 0.0861);
|
|
85
88
|
--color-button-secondary-text: color(display-p3 1 1 1);
|
|
89
|
+
--color-button-success-border: color(display-p3 0.2946 0.5328 0.2433);
|
|
90
|
+
--color-button-success-fill: color(display-p3 0.2946 0.5328 0.2433);
|
|
91
|
+
--color-button-success-text: color(display-p3 1 1 1);
|
|
86
92
|
--color-button-tertiary-border: color(display-p3 0.7432 0.7432 0.7432);
|
|
87
93
|
--color-button-tertiary-fill: color(display-p3 1 1 1);
|
|
88
94
|
--color-button-tertiary-text: color(display-p3 0 0 0);
|
|
@@ -77,12 +77,18 @@
|
|
|
77
77
|
--color-button-danger-border: color(display-p3 0.5698 0.1873 0.1674);
|
|
78
78
|
--color-button-danger-fill: color(display-p3 0.7365 0.2216 0.2026);
|
|
79
79
|
--color-button-danger-text: color(display-p3 1 1 1);
|
|
80
|
+
--color-button-neutral-border: color(display-p3 0.3886 0.3886 0.3886);
|
|
81
|
+
--color-button-neutral-fill: color(display-p3 0.3886 0.3886 0.3886);
|
|
82
|
+
--color-button-neutral-text: color(display-p3 1 1 1);
|
|
80
83
|
--color-button-primary-border: color(display-p3 0.5242 0.2903 0.7705);
|
|
81
84
|
--color-button-primary-fill: color(display-p3 0.5242 0.2903 0.7705);
|
|
82
85
|
--color-button-primary-text: color(display-p3 1 1 1);
|
|
83
86
|
--color-button-secondary-border: color(display-p3 0.0861 0.0861 0.0861);
|
|
84
87
|
--color-button-secondary-fill: color(display-p3 0.0861 0.0861 0.0861);
|
|
85
88
|
--color-button-secondary-text: color(display-p3 1 1 1);
|
|
89
|
+
--color-button-success-border: color(display-p3 0.2946 0.5328 0.2433);
|
|
90
|
+
--color-button-success-fill: color(display-p3 0.2946 0.5328 0.2433);
|
|
91
|
+
--color-button-success-text: color(display-p3 1 1 1);
|
|
86
92
|
--color-button-tertiary-border: color(display-p3 0.7432 0.7432 0.7432);
|
|
87
93
|
--color-button-tertiary-fill: color(display-p3 1 1 1);
|
|
88
94
|
--color-button-tertiary-text: color(display-p3 0 0 0);
|
|
@@ -77,12 +77,18 @@
|
|
|
77
77
|
--color-button-danger-border: color(display-p3 0.5698 0.1873 0.1674);
|
|
78
78
|
--color-button-danger-fill: color(display-p3 0.7365 0.2216 0.2026);
|
|
79
79
|
--color-button-danger-text: color(display-p3 1 1 1);
|
|
80
|
+
--color-button-neutral-border: color(display-p3 0.3886 0.3886 0.3886);
|
|
81
|
+
--color-button-neutral-fill: color(display-p3 0.3886 0.3886 0.3886);
|
|
82
|
+
--color-button-neutral-text: color(display-p3 1 1 1);
|
|
80
83
|
--color-button-primary-border: color(display-p3 0.5242 0.2903 0.7705);
|
|
81
84
|
--color-button-primary-fill: color(display-p3 0.5242 0.2903 0.7705);
|
|
82
85
|
--color-button-primary-text: color(display-p3 1 1 1);
|
|
83
86
|
--color-button-secondary-border: color(display-p3 0.0861 0.0861 0.0861);
|
|
84
87
|
--color-button-secondary-fill: color(display-p3 0.0861 0.0861 0.0861);
|
|
85
88
|
--color-button-secondary-text: color(display-p3 1 1 1);
|
|
89
|
+
--color-button-success-border: color(display-p3 0.2946 0.5328 0.2433);
|
|
90
|
+
--color-button-success-fill: color(display-p3 0.2946 0.5328 0.2433);
|
|
91
|
+
--color-button-success-text: color(display-p3 1 1 1);
|
|
86
92
|
--color-button-tertiary-border: color(display-p3 0.7432 0.7432 0.7432);
|
|
87
93
|
--color-button-tertiary-fill: color(display-p3 1 1 1);
|
|
88
94
|
--color-button-tertiary-text: color(display-p3 0 0 0);
|
package/dist/index.cjs
CHANGED
|
@@ -1956,6 +1956,12 @@ function handleListKeyDown(state, event, { searchSelector, itemSelector }) {
|
|
|
1956
1956
|
const edgeItem = event.key === "ArrowUp" ? items[0] : items[items.length - 1];
|
|
1957
1957
|
if (edgeItem && edgeItem === target?.closest(itemSelector)) {
|
|
1958
1958
|
event.preventDefault();
|
|
1959
|
+
if (event.key === "ArrowDown") {
|
|
1960
|
+
for (let el = target; el; el = el.parentElement) {
|
|
1961
|
+
el.scrollTop = 0;
|
|
1962
|
+
if (el === event.currentTarget) break;
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1959
1965
|
state.requestFocus();
|
|
1960
1966
|
return;
|
|
1961
1967
|
}
|
|
@@ -3937,6 +3943,7 @@ var SegmentedControls = ({
|
|
|
3937
3943
|
const allHaveIcons = options.every((option) => option.icon != null);
|
|
3938
3944
|
const effectiveDisplay = display === "icon-only" && !allHaveIcons ? "both" : display;
|
|
3939
3945
|
const isIconOnly = effectiveDisplay === "icon-only";
|
|
3946
|
+
const activeVariant = options.find((option) => option.value === value)?.variant ?? "primary";
|
|
3940
3947
|
const containerRef = React15.useRef(null);
|
|
3941
3948
|
const segmentRefs = React15.useRef({});
|
|
3942
3949
|
const [indicator, setIndicator] = React15.useState({
|
|
@@ -3968,7 +3975,12 @@ var SegmentedControls = ({
|
|
|
3968
3975
|
"div",
|
|
3969
3976
|
{
|
|
3970
3977
|
ref: containerRef,
|
|
3971
|
-
className: cn(
|
|
3978
|
+
className: cn(
|
|
3979
|
+
styles49__default.default["segmented-controls"],
|
|
3980
|
+
styles49__default.default[`size--${size}`],
|
|
3981
|
+
styles49__default.default[`variant--${activeVariant}`],
|
|
3982
|
+
className
|
|
3983
|
+
),
|
|
3972
3984
|
children: [
|
|
3973
3985
|
options.map((option) => {
|
|
3974
3986
|
const currentlyActive = option.value === value;
|