@phcdevworks/spectre-ui 1.5.0 → 1.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 +445 -0
- package/README.md +338 -32
- package/dist/base.css +1 -1
- package/dist/components.css +131 -45
- package/dist/index.cjs +78 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +131 -45
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +75 -28
- package/dist/index.js.map +1 -1
- package/dist/utilities.css +1 -1
- package/package.json +31 -28
package/dist/components.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
--sp-surface-page: #f7f8fb;
|
|
3
3
|
--sp-surface-card: #ffffff;
|
|
4
4
|
--sp-surface-input: #ffffff;
|
|
5
|
-
--sp-surface-overlay: rgba(
|
|
5
|
+
--sp-surface-overlay: rgba(0, 0, 0, 0.6);
|
|
6
6
|
--sp-surface-alternate: #eef1f6;
|
|
7
7
|
--sp-surface-hero: linear-gradient(135deg, #5b6ee1 0%, #6f3fd7 100%);
|
|
8
8
|
--sp-text-on-page-default: #141b24;
|
|
@@ -498,6 +498,8 @@
|
|
|
498
498
|
--sp-component-badge-ghost-text: var(--sp-button-ghost-text);
|
|
499
499
|
--sp-component-badge-accent-bg: var(--sp-button-accent-bg);
|
|
500
500
|
--sp-component-badge-accent-text: var(--sp-button-accent-text);
|
|
501
|
+
--sp-component-badge-cta-bg: var(--sp-button-cta-bg);
|
|
502
|
+
--sp-component-badge-cta-text: var(--sp-button-cta-text);
|
|
501
503
|
|
|
502
504
|
/* badge hover states derived from Spectre token semantics */
|
|
503
505
|
--sp-component-badge-primary-bg-hover: var(--sp-button-primary-bghover);
|
|
@@ -509,6 +511,7 @@
|
|
|
509
511
|
--sp-component-badge-info-bg-hover: var(--sp-color-info-200);
|
|
510
512
|
--sp-component-badge-ghost-bg-hover: var(--sp-button-ghost-bghover);
|
|
511
513
|
--sp-component-badge-accent-bg-hover: var(--sp-button-accent-bghover);
|
|
514
|
+
--sp-component-badge-cta-bg-hover: var(--sp-button-cta-bghover);
|
|
512
515
|
|
|
513
516
|
--sp-component-badge-padding-x-sm: var(--sp-space-8);
|
|
514
517
|
--sp-component-badge-padding-x-md: var(--sp-space-12);
|
|
@@ -541,15 +544,27 @@
|
|
|
541
544
|
--sp-component-iconbox-ghost-text: var(--sp-button-ghost-text);
|
|
542
545
|
--sp-component-iconbox-accent-bg: var(--sp-button-accent-bg);
|
|
543
546
|
--sp-component-iconbox-accent-text: var(--sp-button-accent-text);
|
|
547
|
+
--sp-component-iconbox-cta-bg: var(--sp-button-cta-bg);
|
|
548
|
+
--sp-component-iconbox-cta-text: var(--sp-button-cta-text);
|
|
544
549
|
|
|
545
550
|
/* testimonial roles */
|
|
546
551
|
--sp-component-testimonial-bg: var(--sp-surface-card);
|
|
547
552
|
--sp-component-testimonial-bg-hover: var(--sp-color-neutral-50);
|
|
548
553
|
--sp-component-testimonial-border: var(--sp-color-neutral-200);
|
|
554
|
+
--sp-component-testimonial-border-base: var(--sp-component-testimonial-ghost-border);
|
|
549
555
|
--sp-component-testimonial-text: var(--sp-color-neutral-700);
|
|
550
556
|
--sp-component-testimonial-author-name: var(--sp-color-neutral-900);
|
|
551
557
|
--sp-component-testimonial-author-title: var(--sp-color-neutral-600);
|
|
552
558
|
--sp-component-testimonial-quote-mark: var(--sp-color-neutral-600);
|
|
559
|
+
--sp-component-testimonial-shadow: var(--sp-shadow-none);
|
|
560
|
+
--sp-component-testimonial-shadow-elevated: var(--sp-shadow-lg);
|
|
561
|
+
--sp-component-testimonial-shadow-flat: var(--sp-shadow-none);
|
|
562
|
+
--sp-component-testimonial-shadow-outline: var(--sp-shadow-none);
|
|
563
|
+
--sp-component-testimonial-shadow-ghost: var(--sp-shadow-none);
|
|
564
|
+
--sp-component-testimonial-outline-bg: var(--sp-component-testimonial-bg);
|
|
565
|
+
--sp-component-testimonial-outline-border: var(--sp-component-testimonial-border);
|
|
566
|
+
--sp-component-testimonial-ghost-bg: var(--sp-button-ghost-bg);
|
|
567
|
+
--sp-component-testimonial-ghost-border: var(--sp-component-testimonial-ghost-bg);
|
|
553
568
|
|
|
554
569
|
/* pricing card roles */
|
|
555
570
|
--sp-component-pricing-card-bg: var(--sp-surface-card);
|
|
@@ -576,7 +591,7 @@
|
|
|
576
591
|
:where(:root[data-spectre-theme="dark"]) {
|
|
577
592
|
/* badge hover states remain manual as they are not currently exported as tokens */
|
|
578
593
|
--sp-component-badge-success-bg-hover: var(--sp-color-success-700);
|
|
579
|
-
--sp-component-badge-warning-bg-hover: var(--sp-color-warning-
|
|
594
|
+
--sp-component-badge-warning-bg-hover: var(--sp-color-warning-700);
|
|
580
595
|
--sp-component-badge-danger-bg-hover: var(--sp-color-error-700);
|
|
581
596
|
--sp-component-badge-neutral-bg-hover: var(--sp-color-neutral-600);
|
|
582
597
|
--sp-component-badge-info-bg-hover: var(--sp-color-info-700);
|
|
@@ -879,12 +894,20 @@
|
|
|
879
894
|
line-height: var(--sp-font-sm-line-height);
|
|
880
895
|
}
|
|
881
896
|
|
|
897
|
+
.sp-label--disabled {
|
|
898
|
+
color: var(--sp-component-input-role-text-disabled);
|
|
899
|
+
}
|
|
900
|
+
|
|
882
901
|
.sp-helper-text {
|
|
883
902
|
color: var(--sp-text-on-surface-meta);
|
|
884
903
|
font-size: var(--sp-font-xs-size);
|
|
885
904
|
line-height: var(--sp-font-xs-line-height);
|
|
886
905
|
}
|
|
887
906
|
|
|
907
|
+
.sp-helper-text--disabled {
|
|
908
|
+
opacity: var(--sp-opacity-disabled);
|
|
909
|
+
}
|
|
910
|
+
|
|
888
911
|
.sp-error-message {
|
|
889
912
|
color: var(--sp-component-input-role-text-error);
|
|
890
913
|
font-size: var(--sp-font-xs-size);
|
|
@@ -1046,11 +1069,15 @@
|
|
|
1046
1069
|
height: 100%;
|
|
1047
1070
|
}
|
|
1048
1071
|
|
|
1072
|
+
.sp-card:disabled,
|
|
1073
|
+
.sp-card[aria-disabled="true"],
|
|
1049
1074
|
.sp-card--disabled {
|
|
1050
1075
|
opacity: var(--sp-opacity-disabled);
|
|
1051
1076
|
pointer-events: none;
|
|
1077
|
+
cursor: not-allowed;
|
|
1052
1078
|
}
|
|
1053
1079
|
|
|
1080
|
+
.sp-card[aria-busy="true"],
|
|
1054
1081
|
.sp-card--loading {
|
|
1055
1082
|
opacity: var(--sp-opacity-active);
|
|
1056
1083
|
pointer-events: none;
|
|
@@ -1065,14 +1092,20 @@
|
|
|
1065
1092
|
}
|
|
1066
1093
|
|
|
1067
1094
|
.sp-card--interactive:hover,
|
|
1068
|
-
.sp-card--interactive:focus-visible,
|
|
1069
1095
|
.sp-card--interactive:focus-within,
|
|
1070
1096
|
.sp-card--interactive.sp-card--hover,
|
|
1071
|
-
.sp-card--interactive.is-hover
|
|
1097
|
+
.sp-card--interactive.is-hover {
|
|
1098
|
+
outline: none;
|
|
1099
|
+
transform: translateY(calc(var(--sp-component-border-width) * -1));
|
|
1100
|
+
box-shadow: var(--sp-component-card-shadow-elevated);
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.sp-card--interactive:focus-visible,
|
|
1072
1104
|
.sp-card--interactive.sp-card--focus,
|
|
1073
1105
|
.sp-card--interactive.is-focus {
|
|
1106
|
+
outline: none;
|
|
1074
1107
|
transform: translateY(calc(var(--sp-component-border-width) * -1));
|
|
1075
|
-
box-shadow: var(--sp-component-
|
|
1108
|
+
box-shadow: 0 0 0 calc(var(--sp-focus-ring-width) + var(--sp-component-border-width)) var(--sp-color-focus-primary);
|
|
1076
1109
|
}
|
|
1077
1110
|
|
|
1078
1111
|
.sp-card--interactive:active,
|
|
@@ -1127,8 +1160,8 @@
|
|
|
1127
1160
|
}
|
|
1128
1161
|
|
|
1129
1162
|
.sp-badge--primary.sp-badge--interactive:hover,
|
|
1130
|
-
.sp-badge--primary.sp-badge--
|
|
1131
|
-
.sp-badge--primary.
|
|
1163
|
+
.sp-badge--primary.sp-badge--hover,
|
|
1164
|
+
.sp-badge--primary.is-hover {
|
|
1132
1165
|
background-color: var(--sp-component-badge-primary-bg-hover);
|
|
1133
1166
|
}
|
|
1134
1167
|
|
|
@@ -1139,8 +1172,8 @@
|
|
|
1139
1172
|
}
|
|
1140
1173
|
|
|
1141
1174
|
.sp-badge--secondary.sp-badge--interactive:hover,
|
|
1142
|
-
.sp-badge--secondary.sp-badge--
|
|
1143
|
-
.sp-badge--secondary.
|
|
1175
|
+
.sp-badge--secondary.sp-badge--hover,
|
|
1176
|
+
.sp-badge--secondary.is-hover {
|
|
1144
1177
|
background-color: var(--sp-component-badge-secondary-bg-hover);
|
|
1145
1178
|
}
|
|
1146
1179
|
|
|
@@ -1150,8 +1183,8 @@
|
|
|
1150
1183
|
}
|
|
1151
1184
|
|
|
1152
1185
|
.sp-badge--success.sp-badge--interactive:hover,
|
|
1153
|
-
.sp-badge--success.sp-badge--
|
|
1154
|
-
.sp-badge--success.
|
|
1186
|
+
.sp-badge--success.sp-badge--hover,
|
|
1187
|
+
.sp-badge--success.is-hover {
|
|
1155
1188
|
background-color: var(--sp-component-badge-success-bg-hover);
|
|
1156
1189
|
}
|
|
1157
1190
|
|
|
@@ -1161,8 +1194,8 @@
|
|
|
1161
1194
|
}
|
|
1162
1195
|
|
|
1163
1196
|
.sp-badge--warning.sp-badge--interactive:hover,
|
|
1164
|
-
.sp-badge--warning.sp-badge--
|
|
1165
|
-
.sp-badge--warning.
|
|
1197
|
+
.sp-badge--warning.sp-badge--hover,
|
|
1198
|
+
.sp-badge--warning.is-hover {
|
|
1166
1199
|
background-color: var(--sp-component-badge-warning-bg-hover);
|
|
1167
1200
|
}
|
|
1168
1201
|
|
|
@@ -1172,8 +1205,8 @@
|
|
|
1172
1205
|
}
|
|
1173
1206
|
|
|
1174
1207
|
.sp-badge--danger.sp-badge--interactive:hover,
|
|
1175
|
-
.sp-badge--danger.sp-badge--
|
|
1176
|
-
.sp-badge--danger.
|
|
1208
|
+
.sp-badge--danger.sp-badge--hover,
|
|
1209
|
+
.sp-badge--danger.is-hover {
|
|
1177
1210
|
background-color: var(--sp-component-badge-danger-bg-hover);
|
|
1178
1211
|
}
|
|
1179
1212
|
|
|
@@ -1183,8 +1216,8 @@
|
|
|
1183
1216
|
}
|
|
1184
1217
|
|
|
1185
1218
|
.sp-badge--neutral.sp-badge--interactive:hover,
|
|
1186
|
-
.sp-badge--neutral.sp-badge--
|
|
1187
|
-
.sp-badge--neutral.
|
|
1219
|
+
.sp-badge--neutral.sp-badge--hover,
|
|
1220
|
+
.sp-badge--neutral.is-hover {
|
|
1188
1221
|
background-color: var(--sp-component-badge-neutral-bg-hover);
|
|
1189
1222
|
}
|
|
1190
1223
|
|
|
@@ -1194,8 +1227,8 @@
|
|
|
1194
1227
|
}
|
|
1195
1228
|
|
|
1196
1229
|
.sp-badge--info.sp-badge--interactive:hover,
|
|
1197
|
-
.sp-badge--info.sp-badge--
|
|
1198
|
-
.sp-badge--info.
|
|
1230
|
+
.sp-badge--info.sp-badge--hover,
|
|
1231
|
+
.sp-badge--info.is-hover {
|
|
1199
1232
|
background-color: var(--sp-component-badge-info-bg-hover);
|
|
1200
1233
|
}
|
|
1201
1234
|
|
|
@@ -1205,8 +1238,8 @@
|
|
|
1205
1238
|
}
|
|
1206
1239
|
|
|
1207
1240
|
.sp-badge--ghost.sp-badge--interactive:hover,
|
|
1208
|
-
.sp-badge--ghost.sp-badge--
|
|
1209
|
-
.sp-badge--ghost.
|
|
1241
|
+
.sp-badge--ghost.sp-badge--hover,
|
|
1242
|
+
.sp-badge--ghost.is-hover {
|
|
1210
1243
|
background-color: var(--sp-component-badge-ghost-bg-hover);
|
|
1211
1244
|
}
|
|
1212
1245
|
|
|
@@ -1216,11 +1249,22 @@
|
|
|
1216
1249
|
}
|
|
1217
1250
|
|
|
1218
1251
|
.sp-badge--accent.sp-badge--interactive:hover,
|
|
1219
|
-
.sp-badge--accent.sp-badge--
|
|
1220
|
-
.sp-badge--accent.
|
|
1252
|
+
.sp-badge--accent.sp-badge--hover,
|
|
1253
|
+
.sp-badge--accent.is-hover {
|
|
1221
1254
|
background-color: var(--sp-component-badge-accent-bg-hover);
|
|
1222
1255
|
}
|
|
1223
1256
|
|
|
1257
|
+
.sp-badge--cta {
|
|
1258
|
+
background-color: var(--sp-component-badge-cta-bg);
|
|
1259
|
+
color: var(--sp-component-badge-cta-text);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.sp-badge--cta.sp-badge--interactive:hover,
|
|
1263
|
+
.sp-badge--cta.sp-badge--hover,
|
|
1264
|
+
.sp-badge--cta.is-hover {
|
|
1265
|
+
background-color: var(--sp-component-badge-cta-bg-hover);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1224
1268
|
.sp-badge--interactive {
|
|
1225
1269
|
cursor: pointer;
|
|
1226
1270
|
transition:
|
|
@@ -1232,24 +1276,27 @@
|
|
|
1232
1276
|
}
|
|
1233
1277
|
|
|
1234
1278
|
.sp-badge--interactive:active,
|
|
1235
|
-
.sp-badge--
|
|
1236
|
-
.sp-badge
|
|
1279
|
+
.sp-badge--active,
|
|
1280
|
+
.sp-badge.is-active {
|
|
1237
1281
|
opacity: var(--sp-opacity-active);
|
|
1238
1282
|
}
|
|
1239
1283
|
|
|
1240
1284
|
.sp-badge--interactive:focus-visible,
|
|
1241
|
-
.sp-badge--
|
|
1242
|
-
.sp-badge
|
|
1285
|
+
.sp-badge--focus,
|
|
1286
|
+
.sp-badge.is-focus {
|
|
1243
1287
|
outline: none;
|
|
1244
1288
|
box-shadow: 0 0 0 calc(var(--sp-focus-ring-width) + var(--sp-component-border-width)) var(--sp-color-focus-primary);
|
|
1245
1289
|
}
|
|
1246
1290
|
|
|
1291
|
+
.sp-badge:disabled,
|
|
1292
|
+
.sp-badge[aria-disabled="true"],
|
|
1247
1293
|
.sp-badge--disabled {
|
|
1248
1294
|
opacity: var(--sp-opacity-disabled);
|
|
1249
1295
|
pointer-events: none;
|
|
1250
1296
|
}
|
|
1251
1297
|
|
|
1252
|
-
.sp-badge--loading
|
|
1298
|
+
.sp-badge--loading,
|
|
1299
|
+
.sp-badge[aria-busy="true"] {
|
|
1253
1300
|
opacity: var(--sp-opacity-active);
|
|
1254
1301
|
pointer-events: none;
|
|
1255
1302
|
}
|
|
@@ -1334,6 +1381,10 @@
|
|
|
1334
1381
|
font-size: var(--sp-font-lg-size);
|
|
1335
1382
|
}
|
|
1336
1383
|
|
|
1384
|
+
.sp-iconbox--full {
|
|
1385
|
+
width: 100%;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1337
1388
|
.sp-iconbox--pill {
|
|
1338
1389
|
border-radius: var(--sp-radius-pill);
|
|
1339
1390
|
}
|
|
@@ -1384,25 +1435,30 @@
|
|
|
1384
1435
|
color: var(--sp-component-iconbox-accent-text);
|
|
1385
1436
|
}
|
|
1386
1437
|
|
|
1438
|
+
.sp-iconbox--cta {
|
|
1439
|
+
background-color: var(--sp-component-iconbox-cta-bg);
|
|
1440
|
+
color: var(--sp-component-iconbox-cta-text);
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1387
1443
|
.sp-iconbox--interactive {
|
|
1388
1444
|
cursor: pointer;
|
|
1389
1445
|
}
|
|
1390
1446
|
|
|
1391
1447
|
.sp-iconbox--interactive:hover,
|
|
1392
|
-
.sp-iconbox--
|
|
1393
|
-
.sp-iconbox
|
|
1448
|
+
.sp-iconbox--hover,
|
|
1449
|
+
.sp-iconbox.is-hover {
|
|
1394
1450
|
opacity: var(--sp-opacity-hover);
|
|
1395
1451
|
}
|
|
1396
1452
|
|
|
1397
1453
|
.sp-iconbox--interactive:active,
|
|
1398
|
-
.sp-iconbox--
|
|
1399
|
-
.sp-iconbox
|
|
1454
|
+
.sp-iconbox--active,
|
|
1455
|
+
.sp-iconbox.is-active {
|
|
1400
1456
|
opacity: var(--sp-opacity-active);
|
|
1401
1457
|
}
|
|
1402
1458
|
|
|
1403
1459
|
.sp-iconbox--interactive:focus-visible,
|
|
1404
|
-
.sp-iconbox--
|
|
1405
|
-
.sp-iconbox
|
|
1460
|
+
.sp-iconbox--focus,
|
|
1461
|
+
.sp-iconbox.is-focus {
|
|
1406
1462
|
outline: none;
|
|
1407
1463
|
box-shadow: 0 0 0 calc(var(--sp-focus-ring-width) + var(--sp-component-border-width)) var(--sp-color-focus-primary);
|
|
1408
1464
|
}
|
|
@@ -1415,7 +1471,8 @@
|
|
|
1415
1471
|
cursor: not-allowed;
|
|
1416
1472
|
}
|
|
1417
1473
|
|
|
1418
|
-
.sp-iconbox--loading
|
|
1474
|
+
.sp-iconbox--loading,
|
|
1475
|
+
.sp-iconbox[aria-busy="true"] {
|
|
1419
1476
|
opacity: var(--sp-opacity-active);
|
|
1420
1477
|
pointer-events: none;
|
|
1421
1478
|
}
|
|
@@ -1424,20 +1481,46 @@
|
|
|
1424
1481
|
|
|
1425
1482
|
.sp-testimonial {
|
|
1426
1483
|
background-color: var(--sp-component-testimonial-bg);
|
|
1427
|
-
border: var(--sp-component-border-width) solid var(--sp-component-testimonial-border);
|
|
1484
|
+
border: var(--sp-component-border-width) solid var(--sp-component-testimonial-border-base);
|
|
1428
1485
|
border-radius: var(--sp-radius-lg);
|
|
1429
1486
|
padding: var(--sp-space-32);
|
|
1430
1487
|
display: flex;
|
|
1431
1488
|
flex-direction: column;
|
|
1432
1489
|
gap: var(--sp-space-24);
|
|
1490
|
+
box-shadow: var(--sp-component-testimonial-shadow);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
.sp-testimonial--elevated {
|
|
1494
|
+
box-shadow: var(--sp-component-testimonial-shadow-elevated);
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
.sp-testimonial--flat {
|
|
1498
|
+
box-shadow: var(--sp-component-testimonial-shadow-flat);
|
|
1499
|
+
border-color: var(--sp-component-testimonial-border);
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
.sp-testimonial--outline {
|
|
1503
|
+
background-color: var(--sp-component-testimonial-outline-bg);
|
|
1504
|
+
border-color: var(--sp-component-testimonial-outline-border);
|
|
1505
|
+
box-shadow: var(--sp-component-testimonial-shadow-outline);
|
|
1433
1506
|
}
|
|
1434
1507
|
|
|
1508
|
+
.sp-testimonial--ghost {
|
|
1509
|
+
background-color: var(--sp-component-testimonial-ghost-bg);
|
|
1510
|
+
border-color: var(--sp-component-testimonial-ghost-border);
|
|
1511
|
+
box-shadow: var(--sp-component-testimonial-shadow-ghost);
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
.sp-testimonial:disabled,
|
|
1515
|
+
.sp-testimonial[aria-disabled="true"],
|
|
1435
1516
|
.sp-testimonial--disabled {
|
|
1436
1517
|
opacity: var(--sp-opacity-disabled);
|
|
1437
1518
|
pointer-events: none;
|
|
1519
|
+
cursor: not-allowed;
|
|
1438
1520
|
}
|
|
1439
1521
|
|
|
1440
|
-
.sp-testimonial--loading
|
|
1522
|
+
.sp-testimonial--loading,
|
|
1523
|
+
.sp-testimonial[aria-busy="true"] {
|
|
1441
1524
|
opacity: var(--sp-opacity-active);
|
|
1442
1525
|
pointer-events: none;
|
|
1443
1526
|
}
|
|
@@ -1459,7 +1542,7 @@
|
|
|
1459
1542
|
.sp-testimonial--interactive.sp-testimonial--hover,
|
|
1460
1543
|
.sp-testimonial--interactive.is-hover {
|
|
1461
1544
|
transform: translateY(calc(var(--sp-component-border-width) * -1));
|
|
1462
|
-
box-shadow: var(--sp-shadow-
|
|
1545
|
+
box-shadow: var(--sp-component-testimonial-shadow-elevated);
|
|
1463
1546
|
background-color: var(--sp-component-testimonial-bg-hover);
|
|
1464
1547
|
}
|
|
1465
1548
|
|
|
@@ -1543,12 +1626,15 @@
|
|
|
1543
1626
|
border: none;
|
|
1544
1627
|
}
|
|
1545
1628
|
|
|
1629
|
+
.sp-pricing-card:disabled,
|
|
1630
|
+
.sp-pricing-card[aria-disabled="true"],
|
|
1546
1631
|
.sp-pricing-card--disabled {
|
|
1547
1632
|
opacity: var(--sp-opacity-disabled);
|
|
1548
1633
|
pointer-events: none;
|
|
1549
1634
|
}
|
|
1550
1635
|
|
|
1551
|
-
.sp-pricing-card--loading
|
|
1636
|
+
.sp-pricing-card--loading,
|
|
1637
|
+
.sp-pricing-card[aria-busy="true"] {
|
|
1552
1638
|
opacity: var(--sp-opacity-active);
|
|
1553
1639
|
pointer-events: none;
|
|
1554
1640
|
}
|
|
@@ -1564,7 +1650,7 @@
|
|
|
1564
1650
|
.sp-pricing-card--interactive:hover,
|
|
1565
1651
|
.sp-pricing-card--interactive:focus-within,
|
|
1566
1652
|
.sp-pricing-card--interactive.sp-pricing-card--hover,
|
|
1567
|
-
.sp-pricing-card
|
|
1653
|
+
.sp-pricing-card.is-hover {
|
|
1568
1654
|
transform: translateY(calc(var(--sp-component-border-width) * -1));
|
|
1569
1655
|
box-shadow: var(--sp-shadow-lg);
|
|
1570
1656
|
background-color: var(--sp-component-pricing-card-bg-hover);
|
|
@@ -1574,28 +1660,28 @@
|
|
|
1574
1660
|
.sp-pricing-card--featured.sp-pricing-card--interactive:focus-visible,
|
|
1575
1661
|
.sp-pricing-card--featured.sp-pricing-card--interactive:focus-within,
|
|
1576
1662
|
.sp-pricing-card--featured.sp-pricing-card--interactive.sp-pricing-card--hover,
|
|
1577
|
-
.sp-pricing-card--featured.
|
|
1663
|
+
.sp-pricing-card--featured.is-hover,
|
|
1578
1664
|
.sp-pricing-card--featured.sp-pricing-card--interactive.sp-pricing-card--focus,
|
|
1579
|
-
.sp-pricing-card--featured.
|
|
1665
|
+
.sp-pricing-card--featured.is-focus {
|
|
1580
1666
|
transform: scale(1.05) translateY(calc(var(--sp-component-border-width) * -1));
|
|
1581
1667
|
}
|
|
1582
1668
|
|
|
1583
1669
|
.sp-pricing-card--interactive:active,
|
|
1584
1670
|
.sp-pricing-card--interactive.sp-pricing-card--active,
|
|
1585
|
-
.sp-pricing-card
|
|
1671
|
+
.sp-pricing-card.is-active {
|
|
1586
1672
|
opacity: var(--sp-opacity-active);
|
|
1587
1673
|
transform: translateY(0);
|
|
1588
1674
|
}
|
|
1589
1675
|
|
|
1590
1676
|
.sp-pricing-card--featured.sp-pricing-card--interactive:active,
|
|
1591
1677
|
.sp-pricing-card--featured.sp-pricing-card--interactive.sp-pricing-card--active,
|
|
1592
|
-
.sp-pricing-card--featured.
|
|
1678
|
+
.sp-pricing-card--featured.is-active {
|
|
1593
1679
|
transform: scale(1.05) translateY(0);
|
|
1594
1680
|
}
|
|
1595
1681
|
|
|
1596
1682
|
.sp-pricing-card--interactive:focus-visible,
|
|
1597
1683
|
.sp-pricing-card--interactive.sp-pricing-card--focus,
|
|
1598
|
-
.sp-pricing-card
|
|
1684
|
+
.sp-pricing-card.is-focus {
|
|
1599
1685
|
outline: none;
|
|
1600
1686
|
transform: translateY(calc(var(--sp-component-border-width) * -1));
|
|
1601
1687
|
box-shadow: 0 0 0 calc(var(--sp-focus-ring-width) + var(--sp-component-border-width)) var(--sp-color-focus-primary);
|
package/dist/index.cjs
CHANGED
|
@@ -160,9 +160,9 @@ function getCardClasses(opts = {}) {
|
|
|
160
160
|
fullHeight && "sp-card--full",
|
|
161
161
|
disabled && "sp-card--disabled",
|
|
162
162
|
loading && "sp-card--loading",
|
|
163
|
-
hovered && "sp-card--hover",
|
|
164
|
-
focused && "sp-card--focus",
|
|
165
|
-
active && "sp-card--active"
|
|
163
|
+
hovered && "sp-card--hover is-hover",
|
|
164
|
+
focused && "sp-card--focus is-focus",
|
|
165
|
+
active && "sp-card--active is-active"
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -224,6 +224,26 @@ function getInputClasses(opts = {}) {
|
|
|
224
224
|
pill && "sp-input--pill"
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
|
+
function getInputWrapperClasses() {
|
|
228
|
+
return cx("sp-input-wrapper");
|
|
229
|
+
}
|
|
230
|
+
function getInputLabelClasses(opts = {}) {
|
|
231
|
+
const { disabled = false } = opts;
|
|
232
|
+
return cx(
|
|
233
|
+
"sp-label",
|
|
234
|
+
disabled && "sp-label--disabled"
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
function getInputHelperTextClasses(opts = {}) {
|
|
238
|
+
const { disabled = false } = opts;
|
|
239
|
+
return cx(
|
|
240
|
+
"sp-helper-text",
|
|
241
|
+
disabled && "sp-helper-text--disabled"
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
function getInputErrorMessageClasses() {
|
|
245
|
+
return cx("sp-error-message");
|
|
246
|
+
}
|
|
227
247
|
|
|
228
248
|
// src/recipes/badge.ts
|
|
229
249
|
var BADGE_VARIANTS = {
|
|
@@ -235,7 +255,8 @@ var BADGE_VARIANTS = {
|
|
|
235
255
|
neutral: true,
|
|
236
256
|
info: true,
|
|
237
257
|
ghost: true,
|
|
238
|
-
accent: true
|
|
258
|
+
accent: true,
|
|
259
|
+
cta: true
|
|
239
260
|
};
|
|
240
261
|
var BADGE_SIZES = {
|
|
241
262
|
sm: true,
|
|
@@ -246,12 +267,12 @@ function getBadgeClasses(opts = {}) {
|
|
|
246
267
|
const {
|
|
247
268
|
variant: variantInput,
|
|
248
269
|
size: sizeInput,
|
|
249
|
-
interactive,
|
|
250
|
-
hovered,
|
|
251
|
-
focused,
|
|
252
|
-
active,
|
|
253
|
-
disabled,
|
|
254
|
-
loading,
|
|
270
|
+
interactive = false,
|
|
271
|
+
hovered = false,
|
|
272
|
+
focused = false,
|
|
273
|
+
active = false,
|
|
274
|
+
disabled = false,
|
|
275
|
+
loading = false,
|
|
255
276
|
fullWidth = false
|
|
256
277
|
} = opts;
|
|
257
278
|
const variant = resolveOption({
|
|
@@ -275,7 +296,8 @@ function getBadgeClasses(opts = {}) {
|
|
|
275
296
|
neutral: "sp-badge--neutral",
|
|
276
297
|
info: "sp-badge--info",
|
|
277
298
|
ghost: "sp-badge--ghost",
|
|
278
|
-
accent: "sp-badge--accent"
|
|
299
|
+
accent: "sp-badge--accent",
|
|
300
|
+
cta: "sp-badge--cta"
|
|
279
301
|
};
|
|
280
302
|
const variantClass = variantMap[variant];
|
|
281
303
|
const sizeMap = {
|
|
@@ -289,9 +311,9 @@ function getBadgeClasses(opts = {}) {
|
|
|
289
311
|
variantClass,
|
|
290
312
|
sizeClass,
|
|
291
313
|
interactive && "sp-badge--interactive",
|
|
292
|
-
hovered && "sp-badge--hover",
|
|
293
|
-
focused && "sp-badge--focus",
|
|
294
|
-
active && "sp-badge--active",
|
|
314
|
+
hovered && "sp-badge--hover is-hover",
|
|
315
|
+
focused && "sp-badge--focus is-focus",
|
|
316
|
+
active && "sp-badge--active is-active",
|
|
295
317
|
disabled && "sp-badge--disabled",
|
|
296
318
|
loading && "sp-badge--loading",
|
|
297
319
|
fullWidth && "sp-badge--full"
|
|
@@ -308,7 +330,8 @@ var ICONBOX_VARIANTS = {
|
|
|
308
330
|
info: true,
|
|
309
331
|
neutral: true,
|
|
310
332
|
ghost: true,
|
|
311
|
-
accent: true
|
|
333
|
+
accent: true,
|
|
334
|
+
cta: true
|
|
312
335
|
};
|
|
313
336
|
var ICONBOX_SIZES = {
|
|
314
337
|
sm: true,
|
|
@@ -325,7 +348,8 @@ function getIconBoxClasses(opts = {}) {
|
|
|
325
348
|
hovered = false,
|
|
326
349
|
focused = false,
|
|
327
350
|
active = false,
|
|
328
|
-
pill = false
|
|
351
|
+
pill = false,
|
|
352
|
+
fullWidth = false
|
|
329
353
|
} = opts;
|
|
330
354
|
const variant = resolveOption({
|
|
331
355
|
name: "icon box variant",
|
|
@@ -348,7 +372,8 @@ function getIconBoxClasses(opts = {}) {
|
|
|
348
372
|
info: "sp-iconbox--info",
|
|
349
373
|
neutral: "sp-iconbox--neutral",
|
|
350
374
|
ghost: "sp-iconbox--ghost",
|
|
351
|
-
accent: "sp-iconbox--accent"
|
|
375
|
+
accent: "sp-iconbox--accent",
|
|
376
|
+
cta: "sp-iconbox--cta"
|
|
352
377
|
};
|
|
353
378
|
const variantClass = variantMap[variant];
|
|
354
379
|
const sizeMap = {
|
|
@@ -364,16 +389,24 @@ function getIconBoxClasses(opts = {}) {
|
|
|
364
389
|
disabled && "sp-iconbox--disabled",
|
|
365
390
|
loading && "sp-iconbox--loading",
|
|
366
391
|
interactive && "sp-iconbox--interactive",
|
|
367
|
-
hovered && "sp-iconbox--hover",
|
|
368
|
-
focused && "sp-iconbox--focus",
|
|
369
|
-
active && "sp-iconbox--active",
|
|
370
|
-
pill && "sp-iconbox--pill"
|
|
392
|
+
hovered && "sp-iconbox--hover is-hover",
|
|
393
|
+
focused && "sp-iconbox--focus is-focus",
|
|
394
|
+
active && "sp-iconbox--active is-active",
|
|
395
|
+
pill && "sp-iconbox--pill",
|
|
396
|
+
fullWidth && "sp-iconbox--full"
|
|
371
397
|
);
|
|
372
398
|
}
|
|
373
399
|
|
|
374
400
|
// src/recipes/testimonial.ts
|
|
401
|
+
var TESTIMONIAL_VARIANTS = {
|
|
402
|
+
elevated: true,
|
|
403
|
+
flat: true,
|
|
404
|
+
outline: true,
|
|
405
|
+
ghost: true
|
|
406
|
+
};
|
|
375
407
|
function getTestimonialClasses(opts = {}) {
|
|
376
408
|
const {
|
|
409
|
+
variant: variantInput,
|
|
377
410
|
disabled = false,
|
|
378
411
|
loading = false,
|
|
379
412
|
interactive = false,
|
|
@@ -382,14 +415,28 @@ function getTestimonialClasses(opts = {}) {
|
|
|
382
415
|
active = false,
|
|
383
416
|
fullHeight = false
|
|
384
417
|
} = opts;
|
|
418
|
+
const variant = resolveOption({
|
|
419
|
+
name: "testimonial variant",
|
|
420
|
+
value: variantInput,
|
|
421
|
+
allowed: TESTIMONIAL_VARIANTS,
|
|
422
|
+
fallback: "outline"
|
|
423
|
+
});
|
|
424
|
+
const variantMap = {
|
|
425
|
+
elevated: "sp-testimonial--elevated",
|
|
426
|
+
flat: "sp-testimonial--flat",
|
|
427
|
+
outline: "sp-testimonial--outline",
|
|
428
|
+
ghost: "sp-testimonial--ghost"
|
|
429
|
+
};
|
|
430
|
+
const variantClass = variantMap[variant];
|
|
385
431
|
return cx(
|
|
386
432
|
"sp-testimonial",
|
|
433
|
+
variantClass,
|
|
387
434
|
disabled && "sp-testimonial--disabled",
|
|
388
435
|
loading && "sp-testimonial--loading",
|
|
389
436
|
interactive && "sp-testimonial--interactive",
|
|
390
|
-
hovered && "sp-testimonial--hover",
|
|
391
|
-
focused && "sp-testimonial--focus",
|
|
392
|
-
active && "sp-testimonial--active",
|
|
437
|
+
hovered && "sp-testimonial--hover is-hover",
|
|
438
|
+
focused && "sp-testimonial--focus is-focus",
|
|
439
|
+
active && "sp-testimonial--active is-active",
|
|
393
440
|
fullHeight && "sp-testimonial--full"
|
|
394
441
|
);
|
|
395
442
|
}
|
|
@@ -427,9 +474,9 @@ function getPricingCardClasses(opts = {}) {
|
|
|
427
474
|
disabled && "sp-pricing-card--disabled",
|
|
428
475
|
loading && "sp-pricing-card--loading",
|
|
429
476
|
interactive && "sp-pricing-card--interactive",
|
|
430
|
-
hovered && "sp-pricing-card--hover",
|
|
431
|
-
focused && "sp-pricing-card--focus",
|
|
432
|
-
active && "sp-pricing-card--active",
|
|
477
|
+
hovered && "sp-pricing-card--hover is-hover",
|
|
478
|
+
focused && "sp-pricing-card--focus is-focus",
|
|
479
|
+
active && "sp-pricing-card--active is-active",
|
|
433
480
|
fullHeight && "sp-pricing-card--full"
|
|
434
481
|
);
|
|
435
482
|
}
|
|
@@ -507,6 +554,10 @@ exports.getButtonClasses = getButtonClasses;
|
|
|
507
554
|
exports.getCardClasses = getCardClasses;
|
|
508
555
|
exports.getIconBoxClasses = getIconBoxClasses;
|
|
509
556
|
exports.getInputClasses = getInputClasses;
|
|
557
|
+
exports.getInputErrorMessageClasses = getInputErrorMessageClasses;
|
|
558
|
+
exports.getInputHelperTextClasses = getInputHelperTextClasses;
|
|
559
|
+
exports.getInputLabelClasses = getInputLabelClasses;
|
|
560
|
+
exports.getInputWrapperClasses = getInputWrapperClasses;
|
|
510
561
|
exports.getPricingCardBadgeClasses = getPricingCardBadgeClasses;
|
|
511
562
|
exports.getPricingCardClasses = getPricingCardClasses;
|
|
512
563
|
exports.getPricingCardDescriptionClasses = getPricingCardDescriptionClasses;
|