@schematichq/schematic-components 2.34.0 → 2.34.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.
@@ -53,7 +53,6 @@ var init_tokens = __esm({
53
53
  SCHEMATIC_TOKENS = {
54
54
  "--schematic-accent": ld("#194bfb", "#6f92ff"),
55
55
  "--schematic-accent-contrast": ld("#ffffff", "#0a0a0a"),
56
- // Tints the dialog's backdrop, which also blurs the page behind it.
57
56
  "--schematic-backdrop": ld(
58
57
  "hsla(0, 0%, 87.5%, 0.9)",
59
58
  "hsla(0, 0%, 12.5%, 0.9)"
@@ -67,16 +66,11 @@ var init_tokens = __esm({
67
66
  "hsla(0, 0%, 0%, 0.175)",
68
67
  "hsla(0, 0%, 100%, 0.2)"
69
68
  ),
70
- // 45px from a 750px viewport up; narrower screens give the content the
71
- // room instead (about 22px on a 375px phone).
72
69
  "--schematic-card-padding": "min(2.8125rem, 6vw)",
73
70
  "--schematic-danger": ld("#d75a5c", "#ff6b6e"),
74
71
  "--schematic-font-body": '"Public Sans", system-ui, sans-serif',
75
72
  "--schematic-font-heading": '"Manrope", system-ui, sans-serif',
76
- // Link buttons' face: Edit, Set default, Try again, and the rest.
77
73
  "--schematic-font-link": '"Inter", system-ui, sans-serif',
78
- // A lighter tint than the surface, for panels set into a card: a credit's
79
- // grants, a plan's auto top-up.
80
74
  "--schematic-inset": ld("hsla(0, 0%, 0%, 0.04)", "hsla(0, 0%, 100%, 0.06)"),
81
75
  "--schematic-line-height": "1.375",
82
76
  "--schematic-line-height-heading": "1.2",
@@ -85,10 +79,8 @@ var init_tokens = __esm({
85
79
  "--schematic-primary": ld("#000000", "#ffffff"),
86
80
  "--schematic-primary-contrast": ld("#ffffff", "#000000"),
87
81
  "--schematic-radius": "0.625rem",
88
- // `light-dark()` takes colours only, so it is applied per shadow layer.
89
82
  "--schematic-shadow": `0px 1px 20px 0px ${ld("#1018280f", "#00000099")}, 0px 1px 3px 0px ${ld("#1018281a", "#0000007a")}`,
90
83
  "--schematic-space": "1rem",
91
- // A tint over the background: the payment method pill.
92
84
  "--schematic-surface": ld(
93
85
  "hsla(0, 0%, 0%, 0.0625)",
94
86
  "hsla(0, 0%, 100%, 0.125)"
@@ -2510,6 +2502,45 @@ function defaultString(key, vars) {
2510
2502
  return lookup(DEFAULT_STRINGS, key, vars) ?? DEFAULT_STRINGS[key] ?? key;
2511
2503
  }
2512
2504
 
2505
+ // src/elements/styles/card-group.ts
2506
+ var cardGroupCss = `
2507
+ .schematic-card-group {
2508
+ background: var(--schematic-background);
2509
+ border-radius: var(--schematic-radius);
2510
+ box-shadow: var(--schematic-shadow);
2511
+ color: var(--schematic-text);
2512
+ display: flex;
2513
+ flex-direction: column;
2514
+ overflow: clip;
2515
+ }
2516
+
2517
+ .schematic-card-group .schematic-card,
2518
+ .schematic-card-group .schematic-element[data-state="pending"],
2519
+ .schematic-card-group .schematic-element[data-state="error"],
2520
+ .schematic-card-group .schematic-plan-manager {
2521
+ background: none;
2522
+ border-radius: 0;
2523
+ box-shadow: none;
2524
+ }
2525
+
2526
+ .schematic-card-group .schematic-metered-features__list,
2527
+ .schematic-card-group .schematic-credit-usage__credits,
2528
+ .schematic-card-group .schematic-plan-manager {
2529
+ gap: 0;
2530
+ }
2531
+
2532
+ .schematic-card-group > .schematic-element + .schematic-element,
2533
+ .schematic-card-group .schematic-card + .schematic-card {
2534
+ border-top: 1px solid var(--schematic-card-divider);
2535
+ }
2536
+
2537
+ .schematic-card-group .schematic-element:not(.schematic-card) > .schematic-header {
2538
+ margin: 0;
2539
+ padding: calc(var(--schematic-card-padding) * 0.75)
2540
+ var(--schematic-card-padding) 0;
2541
+ }
2542
+ `;
2543
+
2513
2544
  // src/elements/styles/credit-usage.ts
2514
2545
  var creditUsageCss = `
2515
2546
  .schematic-credit-usage__credits {
@@ -2518,8 +2549,6 @@ var creditUsageCss = `
2518
2549
  gap: var(--schematic-space);
2519
2550
  }
2520
2551
 
2521
- /* Each credit draws its own card, so the root draws one only while pending
2522
- or failed. */
2523
2552
  .schematic-credit-usage[data-state="pending"],
2524
2553
  .schematic-credit-usage[data-state="error"] {
2525
2554
  background: var(--schematic-background);
@@ -2540,7 +2569,6 @@ var creditUsageCss = `
2540
2569
  gap: calc(var(--schematic-space) * 1.5);
2541
2570
  }
2542
2571
 
2543
- /* Held even without a glyph, as the embed does, so names line up. */
2544
2572
  .schematic-credit-usage__icon {
2545
2573
  align-items: center;
2546
2574
  background: var(--schematic-surface);
@@ -2557,8 +2585,6 @@ var creditUsageCss = `
2557
2585
  color: var(--schematic-accent);
2558
2586
  }
2559
2587
 
2560
- /* The embed's spacing: the balance well clear of the name, the composition
2561
- tucked close under the balance. */
2562
2588
  .schematic-credit-usage__body {
2563
2589
  display: flex;
2564
2590
  flex-direction: column;
@@ -2614,7 +2640,6 @@ var creditUsageCss = `
2614
2640
  margin-inline-start: -0.333rem;
2615
2641
  }
2616
2642
 
2617
- /* Opens above its toggle, as in the embed. */
2618
2643
  .schematic-credit-usage__grants {
2619
2644
  background: var(--schematic-inset);
2620
2645
  border-radius: calc(var(--schematic-radius) * 0.8);
@@ -2634,8 +2659,6 @@ var creditUsageCss = `
2634
2659
  padding: 0;
2635
2660
  }
2636
2661
 
2637
- /* Where the grant and its date do not fit on one line, the date wraps
2638
- rather than overflowing the panel. */
2639
2662
  .schematic-credit-usage__grant {
2640
2663
  display: flex;
2641
2664
  flex-wrap: wrap;
@@ -2666,7 +2689,6 @@ var creditUsageCss = `
2666
2689
 
2667
2690
  // src/elements/styles/dialog.ts
2668
2691
  var dialogCss = `
2669
- /* Up to 768px wide, with a tighter radius than a card. */
2670
2692
  .schematic-dialog {
2671
2693
  background: var(--schematic-background);
2672
2694
  border: 0;
@@ -2677,16 +2699,10 @@ var dialogCss = `
2677
2699
  margin: auto;
2678
2700
  max-height: calc(100vh - 2 * var(--schematic-space));
2679
2701
  max-width: none;
2680
- /* No padding of its own: a click on the backdrop lands on the dialog
2681
- itself, and one inside lands on the header or body. */
2682
2702
  padding: 0;
2683
- /* Never wider than the screen, whatever it holds. */
2684
2703
  width: min(48rem, calc(100vw - 2 * var(--schematic-space)));
2685
2704
  }
2686
2705
 
2687
- /* Centred by vw on a phone: a host page wider than the screen widens the
2688
- layout viewport, and auto margins would centre the dialog half off the
2689
- screen. Desktop keeps auto margins, as vw counts the scrollbar there. */
2690
2706
  @media (max-width: 52rem) {
2691
2707
  .schematic-dialog {
2692
2708
  inset-inline: 0 auto;
@@ -2703,8 +2719,6 @@ var dialogCss = `
2703
2719
  background: var(--schematic-backdrop);
2704
2720
  }
2705
2721
 
2706
- /* Narrow on the right, where the close control's own hit area makes up the
2707
- rest. */
2708
2722
  .schematic-dialog__header {
2709
2723
  align-items: center;
2710
2724
  border-bottom: 1px solid
@@ -2721,7 +2735,6 @@ var dialogCss = `
2721
2735
  }
2722
2736
  }
2723
2737
 
2724
- /* Body text at 18px, not a heading face. */
2725
2738
  .schematic-dialog__title {
2726
2739
  font-family: var(--schematic-font-body);
2727
2740
  font-size: 1.125rem;
@@ -3186,15 +3199,12 @@ var includedFeaturesCss = `
3186
3199
  padding: 0;
3187
3200
  }
3188
3201
 
3189
- /* Icon, name and details; the usage drops beneath on a narrow card. */
3190
3202
  .schematic-included-features__row {
3191
3203
  column-gap: 0.5rem;
3192
3204
  display: grid;
3193
3205
  grid-template-columns: min-content 1fr;
3194
3206
  }
3195
3207
 
3196
- /* Two classes: the icon font's own rule comes later in the sheet and sets
3197
- display, which would leave the glyph in the circle's corner. */
3198
3208
  .schematic-included-features .schematic-included-features__icon {
3199
3209
  align-items: center;
3200
3210
  background: var(--schematic-surface);
@@ -3216,7 +3226,6 @@ var includedFeaturesCss = `
3216
3226
  grid-column: 2;
3217
3227
  }
3218
3228
 
3219
- /* An item name, as add-ons and plan lines elsewhere. */
3220
3229
  .schematic-included-features__name {
3221
3230
  font-family: var(--schematic-font-heading);
3222
3231
  font-size: 1.125rem;
@@ -3239,10 +3248,8 @@ var includedFeaturesCss = `
3239
3248
  }
3240
3249
 
3241
3250
  @container (min-width: 23.4375rem) {
3242
- /* The usage takes the room it needs and wraps only when the name leaves
3243
- it none. */
3244
3251
  .schematic-included-features__row {
3245
- grid-template-columns: min-content 1fr auto;
3252
+ grid-template-columns: min-content 1fr 1fr;
3246
3253
  }
3247
3254
 
3248
3255
  .schematic-included-features__usage {
@@ -3314,7 +3321,6 @@ var invoicesCss = `
3314
3321
  .schematic-invoices__amount {
3315
3322
  cursor: help;
3316
3323
  font-variant-numeric: tabular-nums;
3317
- /* Keeps a lone amount at the end when the date is hidden. */
3318
3324
  margin-inline-start: auto;
3319
3325
  text-align: end;
3320
3326
  }
@@ -3332,7 +3338,6 @@ var invoicesCss = `
3332
3338
  gap: calc(var(--schematic-space) / 2);
3333
3339
  }
3334
3340
 
3335
- /* Cancels the glyph's side bearing, so the chevron sits flush. */
3336
3341
  .schematic-invoices__chevron {
3337
3342
  margin-inline-start: -0.333rem;
3338
3343
  }
@@ -3361,7 +3366,6 @@ var meteredFeaturesCss = `
3361
3366
  padding: 0;
3362
3367
  }
3363
3368
 
3364
- /* Each feature is a card; while pending or failed, the root is the card. */
3365
3369
  .schematic-metered-features[data-state="pending"],
3366
3370
  .schematic-metered-features[data-state="error"] {
3367
3371
  background: var(--schematic-background);
@@ -3384,7 +3388,6 @@ var meteredFeaturesCss = `
3384
3388
  gap: calc(var(--schematic-space) * 1.5);
3385
3389
  }
3386
3390
 
3387
- /* Kept without a glyph, as in the embed, so names line up. */
3388
3391
  .schematic-metered-features__icon {
3389
3392
  align-items: center;
3390
3393
  background: var(--schematic-surface);
@@ -3398,8 +3401,6 @@ var meteredFeaturesCss = `
3398
3401
  width: 2.75rem;
3399
3402
  }
3400
3403
 
3401
- /* The glyph takes the base text colour rather than inheriting, so the accent
3402
- is set on it too. */
3403
3404
  .schematic-metered-features__icon .schematic-icon {
3404
3405
  color: var(--schematic-accent);
3405
3406
  }
@@ -3433,8 +3434,6 @@ var meteredFeaturesCss = `
3433
3434
  margin: 0;
3434
3435
  }
3435
3436
 
3436
- /* Beside the title when both fit, otherwise beneath it as in the embed,
3437
- rather than wrapping in a narrow column. */
3438
3437
  .schematic-metered-features__figures {
3439
3438
  display: flex;
3440
3439
  flex: 0 0 auto;
@@ -3457,7 +3456,6 @@ var meteredFeaturesCss = `
3457
3456
  text-align: start;
3458
3457
  }
3459
3458
 
3460
- /* Too narrow to keep "1,300 GB of storage used" on one line. */
3461
3459
  .schematic-metered-features__headline {
3462
3460
  white-space: normal;
3463
3461
  }
@@ -3472,7 +3470,6 @@ var meteredFeaturesCss = `
3472
3470
  white-space: nowrap;
3473
3471
  }
3474
3472
 
3475
- /* Negative margins undo the card's padding so the footer bleeds to its edges. */
3476
3473
  .schematic-metered-features__price-details {
3477
3474
  align-items: center;
3478
3475
  background: var(--schematic-surface);
@@ -3485,6 +3482,10 @@ var meteredFeaturesCss = `
3485
3482
  var(--schematic-card-padding);
3486
3483
  }
3487
3484
 
3485
+ .schematic-metered-features__price-cost {
3486
+ text-align: end;
3487
+ }
3488
+
3488
3489
  .schematic-metered-features .schematic-skeleton__cell[data-column="name"] {
3489
3490
  width: 10rem;
3490
3491
  }
@@ -3508,7 +3509,6 @@ var meteredFeaturesCss = `
3508
3509
  background: color-mix(in srgb, var(--schematic-accent) 50%, transparent);
3509
3510
  }
3510
3511
 
3511
- /* Past the soft limit, the fill is the included share over a warning track. */
3512
3512
  .schematic-meter--overage {
3513
3513
  background: var(--schematic-warning);
3514
3514
  }
@@ -3600,7 +3600,6 @@ var paymentMethodsCss = `
3600
3600
  white-space: nowrap;
3601
3601
  }
3602
3602
 
3603
- /* The pill: the default method on the left, Edit or Add on the right. */
3604
3603
  .schematic-payment-methods__current {
3605
3604
  align-items: center;
3606
3605
  background: var(--schematic-surface);
@@ -3611,8 +3610,6 @@ var paymentMethodsCss = `
3611
3610
  padding: calc(var(--schematic-space) / 2.25) var(--schematic-space);
3612
3611
  }
3613
3612
 
3614
- /* One line: a label too long for the space truncates rather than wrapping
3615
- "Card ending in" away from its digits or widening the dialog. */
3616
3613
  .schematic-payment-methods__method {
3617
3614
  align-items: center;
3618
3615
  display: inline-flex;
@@ -3628,7 +3625,6 @@ var paymentMethodsCss = `
3628
3625
  white-space: nowrap;
3629
3626
  }
3630
3627
 
3631
- /* The brand's mark before the label, in the label's colour. */
3632
3628
  .schematic-payment-methods__icon {
3633
3629
  color: currentColor;
3634
3630
  flex-shrink: 0;
@@ -3651,15 +3647,10 @@ var paymentMethodsCss = `
3651
3647
  white-space: nowrap;
3652
3648
  }
3653
3649
 
3654
- /* The toggle that reveals the other methods. Its chevron is a glyph per
3655
- state, down while folded and up while unfolded, and the hover underline
3656
- goes on the label alone, as on every toggle. */
3657
3650
  .schematic-payment-methods__choose {
3658
3651
  align-items: center;
3659
3652
  align-self: flex-start;
3660
3653
  display: inline-flex;
3661
- /* A button centres its text; a label that wraps on a phone keeps to the
3662
- start. */
3663
3654
  text-align: start;
3664
3655
  gap: calc(var(--schematic-space) / 2);
3665
3656
  }
@@ -3672,9 +3663,6 @@ var paymentMethodsCss = `
3672
3663
  text-decoration: underline;
3673
3664
  }
3674
3665
 
3675
-
3676
- /* A faintly tinted panel, roomier than the shared dialog body, with its
3677
- parts spaced further apart. */
3678
3666
  .schematic-payment-methods__dialog .schematic-dialog__body {
3679
3667
  background: color-mix(in srgb, var(--schematic-text) 2.5%, transparent);
3680
3668
  gap: calc(var(--schematic-space) * 2);
@@ -3687,9 +3675,6 @@ var paymentMethodsCss = `
3687
3675
  }
3688
3676
  }
3689
3677
 
3690
- /* The list tucks up under its toggle, the heading sits a card's gap above
3691
- the pill, and a failed write sits close under what it failed
3692
- on. */
3693
3678
  .schematic-payment-methods__dialog .schematic-payment-methods__list,
3694
3679
  .schematic-payment-methods__dialog .schematic-payment-methods__current,
3695
3680
  .schematic-payment-methods__dialog .schematic-payment-methods__error {
@@ -3704,8 +3689,6 @@ var paymentMethodsCss = `
3704
3689
  padding: 0;
3705
3690
  }
3706
3691
 
3707
- /* The name on the left, the expiry and actions on the right; a narrow
3708
- dialog wraps the actions under the name. */
3709
3692
  .schematic-payment-methods__row {
3710
3693
  align-items: center;
3711
3694
  border-bottom: 1px solid var(--schematic-card-divider);
@@ -3715,8 +3698,6 @@ var paymentMethodsCss = `
3715
3698
  padding: calc(var(--schematic-space) / 2) 0;
3716
3699
  }
3717
3700
 
3718
- /* The name takes the line's room first; the actions wrap under it before
3719
- the name is cut short. */
3720
3701
  .schematic-payment-methods__row .schematic-payment-methods__method {
3721
3702
  flex: 1 1 10rem;
3722
3703
  }
@@ -3769,7 +3750,6 @@ var paymentMethodsCss = `
3769
3750
  width: 100%;
3770
3751
  }
3771
3752
 
3772
- /* Larger than the shared CTA: taller, with bigger type and radius. */
3773
3753
  .schematic-payment-methods__add-new {
3774
3754
  border-radius: 0.625rem;
3775
3755
  font-size: 1.1875rem;
@@ -3781,7 +3761,6 @@ var paymentMethodsCss = `
3781
3761
  align-self: flex-start;
3782
3762
  }
3783
3763
 
3784
- /* The failed write and its retry sit on one line at the foot of the dialog. */
3785
3764
  .schematic-payment-methods__error {
3786
3765
  align-items: center;
3787
3766
  display: flex;
@@ -3794,8 +3773,6 @@ var paymentMethodsCss = `
3794
3773
  white-space: nowrap;
3795
3774
  }
3796
3775
 
3797
- /* Spaced as the embed's form: 24px between parts, and a wider break before
3798
- Save under the address. */
3799
3776
  .schematic-payment-methods__form {
3800
3777
  display: flex;
3801
3778
  flex-direction: column;
@@ -3806,8 +3783,6 @@ var paymentMethodsCss = `
3806
3783
  margin-bottom: calc(var(--schematic-space) * 2);
3807
3784
  }
3808
3785
 
3809
- /* The fields the checkout settings add beside Stripe's own, labelled as
3810
- Stripe's are. */
3811
3786
  .schematic-payment-methods__field {
3812
3787
  display: flex;
3813
3788
  flex-direction: column;
@@ -3817,7 +3792,6 @@ var paymentMethodsCss = `
3817
3792
  .schematic-payment-methods__input {
3818
3793
  background: var(--schematic-background);
3819
3794
  border: 1px solid var(--schematic-border);
3820
- /* The embed's 8px at the default radius; Stripe's fields take the same. */
3821
3795
  border-radius: calc(var(--schematic-radius) * 0.8);
3822
3796
  box-sizing: border-box;
3823
3797
  color: var(--schematic-text);
@@ -3854,7 +3828,6 @@ var planManagerCss = `
3854
3828
  gap: var(--schematic-space);
3855
3829
  }
3856
3830
 
3857
- /* While loading or failed there is no plan card, so the root draws one. */
3858
3831
  .schematic-plan-manager[data-state="pending"],
3859
3832
  .schematic-plan-manager[data-state="error"] {
3860
3833
  background: var(--schematic-background);
@@ -3864,8 +3837,6 @@ var planManagerCss = `
3864
3837
  var(--schematic-card-padding);
3865
3838
  }
3866
3839
 
3867
- /* As in the embed, a notice is a band across the top of the card: the
3868
- root draws the card and the plan's own card goes flat. */
3869
3840
  .schematic-plan-manager:has(.schematic-plan-manager__notice) {
3870
3841
  background: var(--schematic-background);
3871
3842
  border-radius: var(--schematic-radius);
@@ -3955,8 +3926,6 @@ var planManagerCss = `
3955
3926
  padding: 0;
3956
3927
  }
3957
3928
 
3958
- /* Centred as in the embed; a plan credit's name and figure share a
3959
- baseline above the line that explains them. */
3960
3929
  .schematic-plan-manager__row,
3961
3930
  .schematic-plan-manager__row-main {
3962
3931
  align-items: center;
@@ -4049,8 +4018,6 @@ var tooltipCss = `
4049
4018
  border: 0;
4050
4019
  color: var(--schematic-muted);
4051
4020
  cursor: help;
4052
- /* A button keeps the browser's control font; the glyph is the embed's
4053
- 24px. */
4054
4021
  font-size: 1.5rem;
4055
4022
  line-height: 0;
4056
4023
  padding: 0;
@@ -4242,7 +4209,7 @@ var upcomingBillCss = `
4242
4209
  }
4243
4210
 
4244
4211
  .schematic-upcoming-bill__discount {
4245
- align-items: center;
4212
+ align-items: start;
4246
4213
  display: inline-flex;
4247
4214
  gap: calc(var(--schematic-space) / 2);
4248
4215
  }
@@ -4270,6 +4237,7 @@ var rulesCss = `
4270
4237
  color: var(--schematic-text);
4271
4238
  font-family: var(--schematic-font-body);
4272
4239
  line-height: var(--schematic-line-height);
4240
+ text-wrap: balance;
4273
4241
  }
4274
4242
 
4275
4243
  :where([class^="schematic-"]) *,
@@ -4282,7 +4250,6 @@ var rulesCss = `
4282
4250
  margin: 0;
4283
4251
  }
4284
4252
 
4285
- /* Unit suffixes ("/mo", "/seat") sit on the baseline, as in the embed. */
4286
4253
  :where([class^="schematic-"]) sub,
4287
4254
  :where([class^="schematic-"]) sup {
4288
4255
  line-height: 1;
@@ -4320,13 +4287,11 @@ var rulesCss = `
4320
4287
  gap: var(--schematic-space);
4321
4288
  }
4322
4289
 
4323
- /* The message may run long; the action beside it stays one line. */
4324
4290
  .schematic-status__retry {
4325
4291
  flex-shrink: 0;
4326
4292
  white-space: nowrap;
4327
4293
  }
4328
4294
 
4329
- /* Visually hidden, still read by assistive technology. */
4330
4295
  .schematic-hidden {
4331
4296
  border: 0;
4332
4297
  clip-path: inset(50%);
@@ -4455,7 +4420,6 @@ var rulesCss = `
4455
4420
  border-color: var(--schematic-primary);
4456
4421
  }
4457
4422
 
4458
- /* The embed's small button: 15px type, 40px tall. */
4459
4423
  .schematic-cta--small {
4460
4424
  border-radius: 0.375rem;
4461
4425
  font-size: 0.9375rem;
@@ -4463,7 +4427,6 @@ var rulesCss = `
4463
4427
  padding: 0.4375rem 1.25rem;
4464
4428
  }
4465
4429
 
4466
- /* The embed's ghost button, for secondary actions such as Try again. */
4467
4430
  .schematic-cta--ghost {
4468
4431
  background: transparent;
4469
4432
  border-color: color-mix(in srgb, var(--schematic-text) 20%, transparent);
@@ -4491,19 +4454,15 @@ var rulesCss = `
4491
4454
  text-decoration: underline;
4492
4455
  }
4493
4456
 
4494
- /* Every toggle's chevron: the 24px glyph, muted. */
4495
4457
  .schematic-chevron {
4496
4458
  color: var(--schematic-muted);
4497
4459
  font-size: 1.5rem;
4498
4460
  }
4499
4461
 
4500
- /* A toggle underlines its label alone: a flex container hands its underline
4501
- to every item, the chevron included, and an item cannot take it off. */
4502
4462
  .schematic-link-button:has(.schematic-link-button__label):hover {
4503
4463
  text-decoration: none;
4504
4464
  }
4505
4465
 
4506
- /* The reset colours every schematic- element; the label keeps the link's. */
4507
4466
  .schematic-link-button__label {
4508
4467
  color: inherit;
4509
4468
  }
@@ -4604,7 +4563,6 @@ var rulesCss = `
4604
4563
  margin: 0;
4605
4564
  }
4606
4565
 
4607
- /* A label on the left, its value on the right. */
4608
4566
  .schematic-row {
4609
4567
  align-items: flex-start;
4610
4568
  display: flex;
@@ -4815,6 +4773,7 @@ ${meteredFeaturesCss}
4815
4773
  ${creditUsageCss}
4816
4774
  ${planManagerCss}
4817
4775
  ${unsubscribeCss}
4776
+ ${cardGroupCss}
4818
4777
  `;
4819
4778
  var schematicStylesCss = withTokenDefaults(rulesCss) + iconsCss;
4820
4779
  var SchematicStyles = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { "data-schematic-styles": "", children: schematicStylesCss });
@@ -4919,8 +4878,9 @@ var StatusFrame = ({
4919
4878
  skeleton = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "schematic-skeleton" })
4920
4879
  }) => {
4921
4880
  useReportHiddenError(error, errorMessage);
4881
+ const root = cx("schematic-element", className);
4922
4882
  if (error !== void 0 && !hasData) {
4923
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className, "data-state": "error", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "schematic-status", role: "alert", children: [
4883
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: root, "data-state": "error", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "schematic-status", role: "alert", children: [
4924
4884
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "schematic-error schematic-status__message", children: errorMessage ?? error.message }),
4925
4885
  onRetry !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4926
4886
  "button",
@@ -4934,12 +4894,12 @@ var StatusFrame = ({
4934
4894
  ] }) });
4935
4895
  }
4936
4896
  if (isPending && !hasData) {
4937
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { "aria-busy": "true", className, "data-state": "pending", children: [
4897
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { "aria-busy": "true", className: root, "data-state": "pending", children: [
4938
4898
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "schematic-hidden", children: loadingLabel }),
4939
4899
  skeleton
4940
4900
  ] });
4941
4901
  }
4942
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className, "data-state": "ready", children: [
4902
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: root, "data-state": "ready", children: [
4943
4903
  children,
4944
4904
  error !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "schematic-status-note schematic-error", role: "alert", children: errorMessage ?? error.message })
4945
4905
  ] });
@@ -6120,7 +6080,7 @@ function PriceDetails({
6120
6080
  const period = details.period === null ? void 0 : shortPeriod(details.period, t);
6121
6081
  if (details.kind === "overage") {
6122
6082
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "schematic-metered-features__price-details", children: [
6123
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
6083
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "schematic-metered-features__price-label", children: [
6124
6084
  t("meteredFeaturesAdditional"),
6125
6085
  ": ",
6126
6086
  details.unitPrice,
@@ -6131,7 +6091,7 @@ function PriceDetails({
6131
6091
  period !== void 0 && `/${period}`
6132
6092
  ] })
6133
6093
  ] }),
6134
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
6094
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "schematic-metered-features__price-cost", children: [
6135
6095
  details.overage.amount,
6136
6096
  " ",
6137
6097
  details.overage.units,
@@ -6145,7 +6105,7 @@ function PriceDetails({
6145
6105
  ] });
6146
6106
  }
6147
6107
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "schematic-metered-features__price-details", children: [
6148
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
6108
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "schematic-metered-features__price-label", children: [
6149
6109
  t("meteredFeaturesTier"),
6150
6110
  ": ",
6151
6111
  details.from,
@@ -6163,7 +6123,7 @@ function PriceDetails({
6163
6123
  }
6164
6124
  ) })
6165
6125
  ] }),
6166
- details.cost !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
6126
+ details.cost !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "schematic-metered-features__price-cost", children: [
6167
6127
  details.cost,
6168
6128
  period !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("sub", { children: [
6169
6129
  "/",
@@ -7235,93 +7195,104 @@ function UnsubscribeButton({
7235
7195
  onUnsubscribed?.();
7236
7196
  };
7237
7197
  const per = shortPeriod(view.period, t);
7238
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cx("schematic-card", "schematic-unsubscribe", className), children: [
7239
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7240
- "button",
7241
- {
7242
- className: "schematic-cta schematic-unsubscribe__open",
7243
- type: "button",
7244
- onClick: () => {
7245
- setFailed(false);
7246
- setOpen(true);
7247
- },
7248
- children: t("unsubscribeButton")
7249
- }
7250
- ),
7251
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7252
- Dialog,
7253
- {
7254
- className: "schematic-unsubscribe__dialog",
7255
- closeLabel: t("unsubscribeClose"),
7256
- open,
7257
- title: t("unsubscribeTitle"),
7258
- onClose: close,
7259
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__columns", children: [
7260
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__summary", children: [
7261
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { children: t("unsubscribeAccessUntil", { date: view.accessEndsOn }) }),
7262
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7263
- ManagePlan,
7264
- {
7265
- onClick: onManagePlan,
7266
- t,
7267
- target: managePlanTarget,
7268
- url: managePlanUrl
7269
- }
7270
- )
7271
- ] }),
7272
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__sidebar", children: [
7273
- view.plan !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__group", children: [
7274
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-muted schematic-small", children: t("unsubscribePlan") }),
7275
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__line", children: [
7276
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-unsubscribe__name", children: view.plan.name }),
7277
- view.plan.price !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
7278
- view.plan.price,
7279
- per !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("sub", { children: [
7280
- "/",
7281
- per
7198
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
7199
+ "div",
7200
+ {
7201
+ className: cx(
7202
+ "schematic-element",
7203
+ "schematic-card",
7204
+ "schematic-unsubscribe",
7205
+ className
7206
+ ),
7207
+ children: [
7208
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7209
+ "button",
7210
+ {
7211
+ className: "schematic-cta schematic-unsubscribe__open",
7212
+ type: "button",
7213
+ onClick: () => {
7214
+ setFailed(false);
7215
+ setOpen(true);
7216
+ },
7217
+ children: t("unsubscribeButton")
7218
+ }
7219
+ ),
7220
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7221
+ Dialog,
7222
+ {
7223
+ className: "schematic-unsubscribe__dialog",
7224
+ closeLabel: t("unsubscribeClose"),
7225
+ open,
7226
+ title: t("unsubscribeTitle"),
7227
+ onClose: close,
7228
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__columns", children: [
7229
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__summary", children: [
7230
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { children: t("unsubscribeAccessUntil", { date: view.accessEndsOn }) }),
7231
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7232
+ ManagePlan,
7233
+ {
7234
+ onClick: onManagePlan,
7235
+ t,
7236
+ target: managePlanTarget,
7237
+ url: managePlanUrl
7238
+ }
7239
+ )
7240
+ ] }),
7241
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__sidebar", children: [
7242
+ view.plan !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__group", children: [
7243
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-muted schematic-small", children: t("unsubscribePlan") }),
7244
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__line", children: [
7245
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-unsubscribe__name", children: view.plan.name }),
7246
+ view.plan.price !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
7247
+ view.plan.price,
7248
+ per !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("sub", { children: [
7249
+ "/",
7250
+ per
7251
+ ] })
7252
+ ] })
7282
7253
  ] })
7283
- ] })
7284
- ] })
7285
- ] }),
7286
- view.addOns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__group", children: [
7287
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-muted schematic-small", children: t("unsubscribeAddOns") }),
7288
- view.addOns.map((addOn) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__line", children: [
7289
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-unsubscribe__name", children: addOn.name }),
7290
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
7291
- addOn.price,
7292
- !addOn.oneTime && per !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("sub", { children: [
7293
- "/",
7294
- per
7254
+ ] }),
7255
+ view.addOns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__group", children: [
7256
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-muted schematic-small", children: t("unsubscribeAddOns") }),
7257
+ view.addOns.map((addOn) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__line", children: [
7258
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-unsubscribe__name", children: addOn.name }),
7259
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
7260
+ addOn.price,
7261
+ !addOn.oneTime && per !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("sub", { children: [
7262
+ "/",
7263
+ per
7264
+ ] })
7265
+ ] })
7266
+ ] }, addOn.id))
7267
+ ] }),
7268
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__line schematic-unsubscribe__total", children: [
7269
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-muted", children: t(TOTAL_KEY[view.period] ?? "unsubscribeMonthlyTotal") }),
7270
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
7271
+ view.total,
7272
+ per !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("sub", { children: [
7273
+ "/",
7274
+ per
7275
+ ] })
7295
7276
  ] })
7296
- ] })
7297
- ] }, addOn.id))
7298
- ] }),
7299
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "schematic-unsubscribe__line schematic-unsubscribe__total", children: [
7300
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "schematic-muted", children: t(TOTAL_KEY[view.period] ?? "unsubscribeMonthlyTotal") }),
7301
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
7302
- view.total,
7303
- per !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("sub", { children: [
7304
- "/",
7305
- per
7306
- ] })
7277
+ ] }),
7278
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7279
+ "button",
7280
+ {
7281
+ className: "schematic-cta schematic-unsubscribe__confirm",
7282
+ disabled: isMutating,
7283
+ type: "button",
7284
+ onClick: () => void confirm(),
7285
+ children: t("unsubscribeConfirm")
7286
+ }
7287
+ ),
7288
+ failed && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "schematic-error", role: "alert", children: t("unsubscribeFailed") })
7307
7289
  ] })
7308
- ] }),
7309
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7310
- "button",
7311
- {
7312
- className: "schematic-cta schematic-unsubscribe__confirm",
7313
- disabled: isMutating,
7314
- type: "button",
7315
- onClick: () => void confirm(),
7316
- children: t("unsubscribeConfirm")
7317
- }
7318
- ),
7319
- failed && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "schematic-error", role: "alert", children: t("unsubscribeFailed") })
7320
- ] })
7321
- ] })
7322
- }
7323
- )
7324
- ] });
7290
+ ] })
7291
+ }
7292
+ )
7293
+ ]
7294
+ }
7295
+ );
7325
7296
  }
7326
7297
  function ManagePlan({
7327
7298
  onClick,