@phcdevworks/spectre-tokens 3.3.0 → 3.3.1

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
@@ -26,14 +26,19 @@
26
26
  --sp-button-text-default: #141b24;
27
27
  --sp-button-text-on-primary: #ffffff;
28
28
  --sp-badge-neutral-bg: #eef1f6;
29
+ --sp-badge-neutral-bg-hover: #d9dfeb;
29
30
  --sp-badge-neutral-text: #374253;
30
31
  --sp-badge-info-bg: #e0f2fe;
32
+ --sp-badge-info-bg-hover: #bae6fd;
31
33
  --sp-badge-info-text: #075985;
32
34
  --sp-badge-success-bg: #dcfce7;
35
+ --sp-badge-success-bg-hover: #bbf7d0;
33
36
  --sp-badge-success-text: #15803d;
34
37
  --sp-badge-warning-bg: #fff1c2;
38
+ --sp-badge-warning-bg-hover: #ffe08a;
35
39
  --sp-badge-warning-text: #8f5200;
36
40
  --sp-badge-danger-bg: #fee2e2;
41
+ --sp-badge-danger-bg-hover: #fecaca;
37
42
  --sp-badge-danger-text: #b91c1c;
38
43
  --sp-icon-box-bg: #ffffff;
39
44
  --sp-icon-box-border: #d9dfeb;
@@ -97,6 +102,10 @@
97
102
  --sp-select-disabled-bg: #f7f8fb;
98
103
  --sp-select-disabled-border: #d9dfeb;
99
104
  --sp-select-focus-border: #0ea5e9;
105
+ --sp-select-border-invalid: #ef4444;
106
+ --sp-select-bg-invalid: #fef2f2;
107
+ --sp-select-border-success: #22c55e;
108
+ --sp-select-bg-success: #f0fdf4;
100
109
  --sp-textarea-bg: #ffffff;
101
110
  --sp-textarea-border: #b7c1d4;
102
111
  --sp-textarea-text: #141b24;
@@ -104,11 +113,34 @@
104
113
  --sp-textarea-disabled-bg: #f7f8fb;
105
114
  --sp-textarea-disabled-border: #d9dfeb;
106
115
  --sp-textarea-focus-border: #0ea5e9;
116
+ --sp-textarea-border-invalid: #ef4444;
117
+ --sp-textarea-bg-invalid: #fef2f2;
118
+ --sp-textarea-border-success: #22c55e;
119
+ --sp-textarea-bg-success: #f0fdf4;
107
120
  --sp-fieldset-border: #d9dfeb;
108
121
  --sp-fieldset-legend-text: #141b24;
109
122
  --sp-label-text: #141b24;
110
123
  --sp-label-disabled-text: #8a96ad;
111
124
  --sp-label-required-indicator-text: #dc2626;
125
+ --sp-testimonial-bg: #ffffff;
126
+ --sp-testimonial-bg-hover: #f7f8fb;
127
+ --sp-testimonial-border: #d9dfeb;
128
+ --sp-testimonial-text: #374253;
129
+ --sp-testimonial-author-name: #141b24;
130
+ --sp-testimonial-author-title: #4b576a;
131
+ --sp-testimonial-quote-mark: #4b576a;
132
+ --sp-pricing-card-bg: #ffffff;
133
+ --sp-pricing-card-bg-hover: #f7f8fb;
134
+ --sp-pricing-card-border: #d9dfeb;
135
+ --sp-pricing-card-featured-bg: #0369a1;
136
+ --sp-pricing-card-featured-text: #ffffff;
137
+ --sp-pricing-card-featured-badge-bg: #f5ad00;
138
+ --sp-pricing-card-featured-badge-text: #141b24;
139
+ --sp-pricing-card-price: #141b24;
140
+ --sp-pricing-card-price-description: #4b576a;
141
+ --sp-rating-star-filled: #f5ad00;
142
+ --sp-rating-star-empty: #d9dfeb;
143
+ --sp-rating-text: #657287;
112
144
  --sp-link-default: #1f57db;
113
145
  --sp-link-hover: #1946b4;
114
146
  --sp-link-active: #173b8f;
@@ -488,14 +520,19 @@
488
520
  --sp-button-text-default: #eef1f6;
489
521
  --sp-button-text-on-primary: #ffffff;
490
522
  --sp-badge-neutral-bg: #374253;
523
+ --sp-badge-neutral-bg-hover: #4b576a;
491
524
  --sp-badge-neutral-text: #f7f8fb;
492
525
  --sp-badge-info-bg: #0c4a6e;
526
+ --sp-badge-info-bg-hover: #075985;
493
527
  --sp-badge-info-text: #e0f2fe;
494
528
  --sp-badge-success-bg: #166534;
529
+ --sp-badge-success-bg-hover: #15803d;
495
530
  --sp-badge-success-text: #dcfce7;
496
531
  --sp-badge-warning-bg: #8f5200;
532
+ --sp-badge-warning-bg-hover: #8f5200;
497
533
  --sp-badge-warning-text: #fff1c2;
498
534
  --sp-badge-danger-bg: #991b1b;
535
+ --sp-badge-danger-bg-hover: #b91c1c;
499
536
  --sp-badge-danger-text: #fee2e2;
500
537
  --sp-icon-box-bg: #222b38;
501
538
  --sp-icon-box-border: #374253;
@@ -559,6 +596,10 @@
559
596
  --sp-select-disabled-bg: #141b24;
560
597
  --sp-select-disabled-border: #374253;
561
598
  --sp-select-focus-border: #38bdf8;
599
+ --sp-select-border-invalid: #ef4444;
600
+ --sp-select-bg-invalid: #fef2f2;
601
+ --sp-select-border-success: #22c55e;
602
+ --sp-select-bg-success: #f0fdf4;
562
603
  --sp-textarea-bg: #222b38;
563
604
  --sp-textarea-border: #4b576a;
564
605
  --sp-textarea-text: #f7f8fb;
@@ -566,11 +607,34 @@
566
607
  --sp-textarea-disabled-bg: #141b24;
567
608
  --sp-textarea-disabled-border: #374253;
568
609
  --sp-textarea-focus-border: #38bdf8;
610
+ --sp-textarea-border-invalid: #ef4444;
611
+ --sp-textarea-bg-invalid: #fef2f2;
612
+ --sp-textarea-border-success: #22c55e;
613
+ --sp-textarea-bg-success: #f0fdf4;
569
614
  --sp-fieldset-border: #374253;
570
615
  --sp-fieldset-legend-text: #f7f8fb;
571
616
  --sp-label-text: #f7f8fb;
572
617
  --sp-label-disabled-text: #4b576a;
573
618
  --sp-label-required-indicator-text: #f87171;
619
+ --sp-testimonial-bg: #222b38;
620
+ --sp-testimonial-bg-hover: #374253;
621
+ --sp-testimonial-border: #374253;
622
+ --sp-testimonial-text: #d9dfeb;
623
+ --sp-testimonial-author-name: #eef1f6;
624
+ --sp-testimonial-author-title: #b7c1d4;
625
+ --sp-testimonial-quote-mark: #b7c1d4;
626
+ --sp-pricing-card-bg: #222b38;
627
+ --sp-pricing-card-bg-hover: #374253;
628
+ --sp-pricing-card-border: #374253;
629
+ --sp-pricing-card-featured-bg: #0369a1;
630
+ --sp-pricing-card-featured-text: #ffffff;
631
+ --sp-pricing-card-featured-badge-bg: #f5ad00;
632
+ --sp-pricing-card-featured-badge-text: #141b24;
633
+ --sp-pricing-card-price: #eef1f6;
634
+ --sp-pricing-card-price-description: #b7c1d4;
635
+ --sp-rating-star-filled: #ffc21a;
636
+ --sp-rating-star-empty: #374253;
637
+ --sp-rating-text: #8a96ad;
574
638
  --sp-link-default: #1f57db;
575
639
  --sp-link-hover: #1946b4;
576
640
  --sp-link-active: #173b8f;
package/dist/index.d.cts CHANGED
@@ -1339,6 +1339,10 @@ interface ComponentSelectTokens<Value = string> {
1339
1339
  disabledBg: Value;
1340
1340
  disabledBorder: Value;
1341
1341
  focusBorder: Value;
1342
+ borderInvalid: Value;
1343
+ bgInvalid: Value;
1344
+ borderSuccess: Value;
1345
+ bgSuccess: Value;
1342
1346
  }
1343
1347
  interface ComponentTextareaTokens<Value = string> {
1344
1348
  bg: Value;
@@ -1348,6 +1352,10 @@ interface ComponentTextareaTokens<Value = string> {
1348
1352
  disabledBg: Value;
1349
1353
  disabledBorder: Value;
1350
1354
  focusBorder: Value;
1355
+ borderInvalid: Value;
1356
+ bgInvalid: Value;
1357
+ borderSuccess: Value;
1358
+ bgSuccess: Value;
1351
1359
  }
1352
1360
  interface ComponentFieldsetTokens<Value = string> {
1353
1361
  border: Value;
package/dist/index.d.ts CHANGED
@@ -1339,6 +1339,10 @@ interface ComponentSelectTokens<Value = string> {
1339
1339
  disabledBg: Value;
1340
1340
  disabledBorder: Value;
1341
1341
  focusBorder: Value;
1342
+ borderInvalid: Value;
1343
+ bgInvalid: Value;
1344
+ borderSuccess: Value;
1345
+ bgSuccess: Value;
1342
1346
  }
1343
1347
  interface ComponentTextareaTokens<Value = string> {
1344
1348
  bg: Value;
@@ -1348,6 +1352,10 @@ interface ComponentTextareaTokens<Value = string> {
1348
1352
  disabledBg: Value;
1349
1353
  disabledBorder: Value;
1350
1354
  focusBorder: Value;
1355
+ borderInvalid: Value;
1356
+ bgInvalid: Value;
1357
+ borderSuccess: Value;
1358
+ bgSuccess: Value;
1351
1359
  }
1352
1360
  interface ComponentFieldsetTokens<Value = string> {
1353
1361
  border: Value;
package/dist/index.js CHANGED
@@ -1191,11 +1191,11 @@ var toVariableName = (prefix, ...parts) => {
1191
1191
  return `--${prefix}-${filtered.join("-")}`;
1192
1192
  };
1193
1193
  var BADGE_VARIANTS = [
1194
- { variant: "neutral", bgKey: "neutralBg", textKey: "neutralText" },
1195
- { variant: "info", bgKey: "infoBg", textKey: "infoText" },
1196
- { variant: "success", bgKey: "successBg", textKey: "successText" },
1197
- { variant: "warning", bgKey: "warningBg", textKey: "warningText" },
1198
- { variant: "danger", bgKey: "dangerBg", textKey: "dangerText" }
1194
+ { variant: "neutral", bgKey: "neutralBg", bgHoverKey: "neutralBgHover", textKey: "neutralText" },
1195
+ { variant: "info", bgKey: "infoBg", bgHoverKey: "infoBgHover", textKey: "infoText" },
1196
+ { variant: "success", bgKey: "successBg", bgHoverKey: "successBgHover", textKey: "successText" },
1197
+ { variant: "warning", bgKey: "warningBg", bgHoverKey: "warningBgHover", textKey: "warningText" },
1198
+ { variant: "danger", bgKey: "dangerBg", bgHoverKey: "dangerBgHover", textKey: "dangerText" }
1199
1199
  ];
1200
1200
  var ICON_BOX_FIELDS = [
1201
1201
  { name: "bg", tokenKey: "bg" },
@@ -1219,6 +1219,31 @@ var MODAL_FIELDS = [
1219
1219
  { name: "border", tokenKey: "border" },
1220
1220
  { name: "overlay", tokenKey: "overlay" }
1221
1221
  ];
1222
+ var TESTIMONIAL_FIELDS = [
1223
+ { name: "bg", tokenKey: "bg" },
1224
+ { name: "bg-hover", tokenKey: "bgHover" },
1225
+ { name: "border", tokenKey: "border" },
1226
+ { name: "text", tokenKey: "text" },
1227
+ { name: "author-name", tokenKey: "authorName" },
1228
+ { name: "author-title", tokenKey: "authorTitle" },
1229
+ { name: "quote-mark", tokenKey: "quoteMark" }
1230
+ ];
1231
+ var PRICING_CARD_FIELDS = [
1232
+ { name: "bg", tokenKey: "bg" },
1233
+ { name: "bg-hover", tokenKey: "bgHover" },
1234
+ { name: "border", tokenKey: "border" },
1235
+ { name: "featured-bg", tokenKey: "featuredBg" },
1236
+ { name: "featured-text", tokenKey: "featuredText" },
1237
+ { name: "featured-badge-bg", tokenKey: "featuredBadgeBg" },
1238
+ { name: "featured-badge-text", tokenKey: "featuredBadgeText" },
1239
+ { name: "price", tokenKey: "price" },
1240
+ { name: "price-description", tokenKey: "priceDescription" }
1241
+ ];
1242
+ var RATING_FIELDS = [
1243
+ { name: "star-filled", tokenKey: "starFilled" },
1244
+ { name: "star-empty", tokenKey: "starEmpty" },
1245
+ { name: "text", tokenKey: "text" }
1246
+ ];
1222
1247
  var TOAST_VARIANTS = ["success", "warning", "danger", "info"].map((variant) => ({
1223
1248
  variant,
1224
1249
  fields: [
@@ -1257,7 +1282,11 @@ var SELECT_FIELDS = [
1257
1282
  { name: "placeholder-text", tokenKey: "placeholderText" },
1258
1283
  { name: "disabled-bg", tokenKey: "disabledBg" },
1259
1284
  { name: "disabled-border", tokenKey: "disabledBorder" },
1260
- { name: "focus-border", tokenKey: "focusBorder" }
1285
+ { name: "focus-border", tokenKey: "focusBorder" },
1286
+ { name: "border-invalid", tokenKey: "borderInvalid" },
1287
+ { name: "bg-invalid", tokenKey: "bgInvalid" },
1288
+ { name: "border-success", tokenKey: "borderSuccess" },
1289
+ { name: "bg-success", tokenKey: "bgSuccess" }
1261
1290
  ];
1262
1291
  var TEXTAREA_FIELDS = [
1263
1292
  { name: "bg", tokenKey: "bg" },
@@ -1266,7 +1295,11 @@ var TEXTAREA_FIELDS = [
1266
1295
  { name: "placeholder", tokenKey: "placeholder" },
1267
1296
  { name: "disabled-bg", tokenKey: "disabledBg" },
1268
1297
  { name: "disabled-border", tokenKey: "disabledBorder" },
1269
- { name: "focus-border", tokenKey: "focusBorder" }
1298
+ { name: "focus-border", tokenKey: "focusBorder" },
1299
+ { name: "border-invalid", tokenKey: "borderInvalid" },
1300
+ { name: "bg-invalid", tokenKey: "bgInvalid" },
1301
+ { name: "border-success", tokenKey: "borderSuccess" },
1302
+ { name: "bg-success", tokenKey: "bgSuccess" }
1270
1303
  ];
1271
1304
  var FIELDSET_FIELDS = [
1272
1305
  { name: "border", tokenKey: "border" },
@@ -1520,8 +1553,9 @@ var generateCssVariables = (tokens2, options = {}) => {
1520
1553
  { varParts: ["component", "input", "placeholder"], modePath: ["component", "input", "placeholder"], aliasSrc: componentAliases, aliasPath: ["input", "placeholder"] },
1521
1554
  { varParts: ["button", "text", "default"], modePath: ["component", "button", "textDefault"], aliasSrc: componentAliases, aliasPath: ["button", "textDefault"] },
1522
1555
  { varParts: ["button", "text", "on", "primary"], modePath: ["component", "button", "textOnPrimary"], aliasSrc: componentAliases, aliasPath: ["button", "textOnPrimary"] },
1523
- ...BADGE_VARIANTS.flatMap(({ variant, bgKey, textKey }) => [
1556
+ ...BADGE_VARIANTS.flatMap(({ variant, bgKey, bgHoverKey, textKey }) => [
1524
1557
  { varParts: ["badge", variant, "bg"], modePath: ["component", "badge", bgKey], aliasSrc: componentAliases, aliasPath: ["badge", bgKey] },
1558
+ { varParts: ["badge", variant, "bg-hover"], modePath: ["component", "badge", bgHoverKey], aliasSrc: componentAliases, aliasPath: ["badge", bgHoverKey] },
1525
1559
  { varParts: ["badge", variant, "text"], modePath: ["component", "badge", textKey], aliasSrc: componentAliases, aliasPath: ["badge", textKey] }
1526
1560
  ]),
1527
1561
  ...ICON_BOX_FIELDS.map(({ name, tokenKey }) => ({
@@ -1595,6 +1629,24 @@ var generateCssVariables = (tokens2, options = {}) => {
1595
1629
  modePath: ["component", "label", tokenKey],
1596
1630
  aliasSrc: componentAliases,
1597
1631
  aliasPath: ["label", tokenKey]
1632
+ })),
1633
+ ...TESTIMONIAL_FIELDS.map(({ name, tokenKey }) => ({
1634
+ varParts: ["testimonial", name],
1635
+ modePath: ["component", "testimonial", tokenKey],
1636
+ aliasSrc: componentAliases,
1637
+ aliasPath: ["testimonial", tokenKey]
1638
+ })),
1639
+ ...PRICING_CARD_FIELDS.map(({ name, tokenKey }) => ({
1640
+ varParts: ["pricing-card", name],
1641
+ modePath: ["component", "pricingCard", tokenKey],
1642
+ aliasSrc: componentAliases,
1643
+ aliasPath: ["pricingCard", tokenKey]
1644
+ })),
1645
+ ...RATING_FIELDS.map(({ name, tokenKey }) => ({
1646
+ varParts: ["rating", name],
1647
+ modePath: ["component", "rating", tokenKey],
1648
+ aliasSrc: componentAliases,
1649
+ aliasPath: ["rating", tokenKey]
1598
1650
  }))
1599
1651
  ];
1600
1652
  const baseLines = [];