@eqtylab/equality 4.5.1 → 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 CHANGED
@@ -2,6 +2,12 @@
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
+
5
11
  ## 4.5.1 - 2026-09-25
6
12
 
7
13
  ### Fixed
@@ -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
@@ -3943,6 +3943,7 @@ var SegmentedControls = ({
3943
3943
  const allHaveIcons = options.every((option) => option.icon != null);
3944
3944
  const effectiveDisplay = display === "icon-only" && !allHaveIcons ? "both" : display;
3945
3945
  const isIconOnly = effectiveDisplay === "icon-only";
3946
+ const activeVariant = options.find((option) => option.value === value)?.variant ?? "primary";
3946
3947
  const containerRef = React15.useRef(null);
3947
3948
  const segmentRefs = React15.useRef({});
3948
3949
  const [indicator, setIndicator] = React15.useState({
@@ -3974,7 +3975,12 @@ var SegmentedControls = ({
3974
3975
  "div",
3975
3976
  {
3976
3977
  ref: containerRef,
3977
- className: cn(styles49__default.default["segmented-controls"], styles49__default.default[`size--${size}`], className),
3978
+ className: cn(
3979
+ styles49__default.default["segmented-controls"],
3980
+ styles49__default.default[`size--${size}`],
3981
+ styles49__default.default[`variant--${activeVariant}`],
3982
+ className
3983
+ ),
3978
3984
  children: [
3979
3985
  options.map((option) => {
3980
3986
  const currentlyActive = option.value === value;