@phcdevworks/spectre-tokens 4.15.0 → 4.16.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/dist/index.css CHANGED
@@ -2195,6 +2195,16 @@
2195
2195
  --sp-action-on-page: var(--sp-action-400);
2196
2196
  --sp-action-on-surface: var(--sp-action-400);
2197
2197
  --sp-action-rail: var(--sp-action-400);
2198
+ --sp-button-secondary-bg: transparent;
2199
+ --sp-button-secondary-bghover: #222b38;
2200
+ --sp-button-secondary-bgactive: #374253;
2201
+ --sp-button-secondary-bgdisabled: transparent;
2202
+ --sp-button-secondary-text: #7dd3fc;
2203
+ --sp-button-secondary-textdisabled: #657287;
2204
+ --sp-button-secondary-border: #38bdf8;
2205
+ --sp-button-secondary-borderdisabled: #374253;
2206
+ --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
2207
+ --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
2198
2208
  --sp-form-valid-border: #22c55e;
2199
2209
  --sp-form-valid-bg: #f0fdf4;
2200
2210
  --sp-form-valid-text: #15803d;
@@ -2209,16 +2219,6 @@
2209
2219
  --sp-button-primary-textdisabled: #8a96ad;
2210
2220
  --sp-button-primary-focusring: rgba(14, 165, 233, 0.4);
2211
2221
  --sp-button-primary-focusvisible: rgba(14, 165, 233, 0.4);
2212
- --sp-button-secondary-bg: #ffffff;
2213
- --sp-button-secondary-bghover: #f7f8fb;
2214
- --sp-button-secondary-bgactive: #eef1f6;
2215
- --sp-button-secondary-bgdisabled: #f7f8fb;
2216
- --sp-button-secondary-text: #075985;
2217
- --sp-button-secondary-textdisabled: #8a96ad;
2218
- --sp-button-secondary-border: #075985;
2219
- --sp-button-secondary-borderdisabled: #d9dfeb;
2220
- --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
2221
- --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
2222
2222
  --sp-button-ghost-bg: transparent;
2223
2223
  --sp-button-ghost-bghover: #f0f9ff;
2224
2224
  --sp-button-ghost-bgactive: #e0f2fe;
@@ -2913,6 +2913,16 @@
2913
2913
  --sp-action-on-page: var(--sp-action-900);
2914
2914
  --sp-action-on-surface: var(--sp-action-900);
2915
2915
  --sp-action-rail: var(--sp-action-900);
2916
+ --sp-button-secondary-bg: #ffffff;
2917
+ --sp-button-secondary-bghover: #f7f8fb;
2918
+ --sp-button-secondary-bgactive: #eef1f6;
2919
+ --sp-button-secondary-bgdisabled: #f7f8fb;
2920
+ --sp-button-secondary-text: #0c4a6e;
2921
+ --sp-button-secondary-textdisabled: #8a96ad;
2922
+ --sp-button-secondary-border: #0c4a6e;
2923
+ --sp-button-secondary-borderdisabled: #d9dfeb;
2924
+ --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
2925
+ --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
2916
2926
  --sp-form-valid-border: #15803d;
2917
2927
  --sp-form-valid-bg: #f0fdf4;
2918
2928
  --sp-form-valid-text: #14532d;
@@ -2927,16 +2937,6 @@
2927
2937
  --sp-button-primary-textdisabled: #8a96ad;
2928
2938
  --sp-button-primary-focusring: rgba(14, 165, 233, 0.4);
2929
2939
  --sp-button-primary-focusvisible: rgba(14, 165, 233, 0.4);
2930
- --sp-button-secondary-bg: #ffffff;
2931
- --sp-button-secondary-bghover: #f7f8fb;
2932
- --sp-button-secondary-bgactive: #eef1f6;
2933
- --sp-button-secondary-bgdisabled: #f7f8fb;
2934
- --sp-button-secondary-text: #0c4a6e;
2935
- --sp-button-secondary-textdisabled: #8a96ad;
2936
- --sp-button-secondary-border: #0c4a6e;
2937
- --sp-button-secondary-borderdisabled: #d9dfeb;
2938
- --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
2939
- --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
2940
2940
  --sp-button-ghost-bg: transparent;
2941
2941
  --sp-button-ghost-bghover: #f0f9ff;
2942
2942
  --sp-button-ghost-bgactive: #e0f2fe;
@@ -3633,6 +3633,16 @@
3633
3633
  --sp-action-on-page: var(--sp-action-700);
3634
3634
  --sp-action-on-surface: var(--sp-action-700);
3635
3635
  --sp-action-rail: var(--sp-action-700);
3636
+ --sp-button-secondary-bg: #ffffff;
3637
+ --sp-button-secondary-bghover: #f7f8fb;
3638
+ --sp-button-secondary-bgactive: #eef1f6;
3639
+ --sp-button-secondary-bgdisabled: #f7f8fb;
3640
+ --sp-button-secondary-text: #075985;
3641
+ --sp-button-secondary-textdisabled: #8a96ad;
3642
+ --sp-button-secondary-border: #075985;
3643
+ --sp-button-secondary-borderdisabled: #d9dfeb;
3644
+ --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
3645
+ --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
3636
3646
  --sp-form-valid-border: #22c55e;
3637
3647
  --sp-form-valid-bg: #f0fdf4;
3638
3648
  --sp-form-valid-text: #15803d;
@@ -3647,16 +3657,6 @@
3647
3657
  --sp-button-primary-textdisabled: #8a96ad;
3648
3658
  --sp-button-primary-focusring: rgba(14, 165, 233, 0.4);
3649
3659
  --sp-button-primary-focusvisible: rgba(14, 165, 233, 0.4);
3650
- --sp-button-secondary-bg: #ffffff;
3651
- --sp-button-secondary-bghover: #f7f8fb;
3652
- --sp-button-secondary-bgactive: #eef1f6;
3653
- --sp-button-secondary-bgdisabled: #f7f8fb;
3654
- --sp-button-secondary-text: #075985;
3655
- --sp-button-secondary-textdisabled: #8a96ad;
3656
- --sp-button-secondary-border: #075985;
3657
- --sp-button-secondary-borderdisabled: #d9dfeb;
3658
- --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
3659
- --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
3660
3660
  --sp-button-ghost-bg: transparent;
3661
3661
  --sp-button-ghost-bghover: #f0f9ff;
3662
3662
  --sp-button-ghost-bgactive: #e0f2fe;
@@ -4352,6 +4352,16 @@
4352
4352
  --sp-action-on-page: var(--sp-action-400);
4353
4353
  --sp-action-on-surface: var(--sp-action-400);
4354
4354
  --sp-action-rail: var(--sp-action-400);
4355
+ --sp-button-secondary-bg: transparent;
4356
+ --sp-button-secondary-bghover: #222b38;
4357
+ --sp-button-secondary-bgactive: #374253;
4358
+ --sp-button-secondary-bgdisabled: transparent;
4359
+ --sp-button-secondary-text: #7dd3fc;
4360
+ --sp-button-secondary-textdisabled: #657287;
4361
+ --sp-button-secondary-border: #38bdf8;
4362
+ --sp-button-secondary-borderdisabled: #374253;
4363
+ --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
4364
+ --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
4355
4365
  --sp-form-valid-border: #22c55e;
4356
4366
  --sp-form-valid-bg: #f0fdf4;
4357
4367
  --sp-form-valid-text: #15803d;
@@ -4366,16 +4376,6 @@
4366
4376
  --sp-button-primary-textdisabled: #8a96ad;
4367
4377
  --sp-button-primary-focusring: rgba(14, 165, 233, 0.4);
4368
4378
  --sp-button-primary-focusvisible: rgba(14, 165, 233, 0.4);
4369
- --sp-button-secondary-bg: #ffffff;
4370
- --sp-button-secondary-bghover: #f7f8fb;
4371
- --sp-button-secondary-bgactive: #eef1f6;
4372
- --sp-button-secondary-bgdisabled: #f7f8fb;
4373
- --sp-button-secondary-text: #075985;
4374
- --sp-button-secondary-textdisabled: #8a96ad;
4375
- --sp-button-secondary-border: #075985;
4376
- --sp-button-secondary-borderdisabled: #d9dfeb;
4377
- --sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
4378
- --sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
4379
4379
  --sp-button-ghost-bg: transparent;
4380
4380
  --sp-button-ghost-bghover: #f0f9ff;
4381
4381
  --sp-button-ghost-bgactive: #e0f2fe;
package/dist/index.d.cts CHANGED
@@ -2800,6 +2800,20 @@ interface SpectreGeneratedTokens {
2800
2800
  underline: string;
2801
2801
  underlineHover: string;
2802
2802
  };
2803
+ buttons: {
2804
+ secondary: {
2805
+ bg: string;
2806
+ bgHover: string;
2807
+ bgActive: string;
2808
+ bgDisabled: string;
2809
+ text: string;
2810
+ textDisabled: string;
2811
+ border: string;
2812
+ borderDisabled: string;
2813
+ focusRing: string;
2814
+ focusVisible: string;
2815
+ };
2816
+ };
2803
2817
  };
2804
2818
  highContrast: {
2805
2819
  action: {
package/dist/index.d.ts CHANGED
@@ -2800,6 +2800,20 @@ interface SpectreGeneratedTokens {
2800
2800
  underline: string;
2801
2801
  underlineHover: string;
2802
2802
  };
2803
+ buttons: {
2804
+ secondary: {
2805
+ bg: string;
2806
+ bgHover: string;
2807
+ bgActive: string;
2808
+ bgDisabled: string;
2809
+ text: string;
2810
+ textDisabled: string;
2811
+ border: string;
2812
+ borderDisabled: string;
2813
+ focusRing: string;
2814
+ focusVisible: string;
2815
+ };
2816
+ };
2803
2817
  };
2804
2818
  highContrast: {
2805
2819
  action: {
package/dist/index.js CHANGED
@@ -2800,6 +2800,20 @@ var coreTokens = {
2800
2800
  "visited": "{colors.accent.300}",
2801
2801
  "underline": "{colors.brand.400} / 0.4",
2802
2802
  "underlineHover": "{colors.brand.300}"
2803
+ },
2804
+ "buttons": {
2805
+ "secondary": {
2806
+ "bg": "transparent",
2807
+ "bgHover": "{colors.neutral.800}",
2808
+ "bgActive": "{colors.neutral.700}",
2809
+ "bgDisabled": "transparent",
2810
+ "text": "{colors.info.300}",
2811
+ "textDisabled": "{colors.neutral.500}",
2812
+ "border": "{colors.info.400}",
2813
+ "borderDisabled": "{colors.neutral.700}",
2814
+ "focusRing": "{colors.info.500} / 0.4",
2815
+ "focusVisible": "{colors.info.500} / 0.4"
2816
+ }
2803
2817
  }
2804
2818
  },
2805
2819
  "highContrast": {
@@ -5641,14 +5655,17 @@ var generateCssVariables = (tokens2, options = {}) => {
5641
5655
  addDark(varName, actionValue(getPath(darkAction, [key]) ?? value));
5642
5656
  addHighContrast(varName, actionValue(getPath(highContrastAction, [key]) ?? value));
5643
5657
  });
5644
- const highContrastButtons = getPath(highContrastMode, ["buttons"]);
5645
- if (isPlainObject(highContrastButtons)) {
5646
- Object.entries(highContrastButtons).forEach(([variant, states]) => {
5658
+ const addButtonOverrides = (mode, add) => {
5659
+ const buttons = getPath(mode, ["buttons"]);
5660
+ if (!isPlainObject(buttons)) return;
5661
+ Object.entries(buttons).forEach(([variant, states]) => {
5647
5662
  Object.entries(states).forEach(([state, value]) => {
5648
- addHighContrast(toVariableName(prefix, "button", variant, state), pickSemantic(tokens2, value));
5663
+ add(toVariableName(prefix, "button", variant, state), pickSemantic(tokens2, value));
5649
5664
  });
5650
5665
  });
5651
- }
5666
+ };
5667
+ addButtonOverrides(darkMode, addDark);
5668
+ addButtonOverrides(highContrastMode, addHighContrast);
5652
5669
  const mapLines = Object.entries(declarations).filter(([name]) => !modeScopedNames.has(name)).map(([name, value]) => ` ${name}: ${value};`);
5653
5670
  const rootBlock = `${selector} {
5654
5671
  ${[...baseLines, ...mapLines].join("\n")}