@scalewing/react 1.26.0 → 1.28.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.
Files changed (81) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +147 -3
  3. package/dist/components/ActionBar.d.ts +14 -0
  4. package/dist/components/ActionBar.js +5 -2
  5. package/dist/components/DenominationGrid.d.ts +5 -2
  6. package/dist/components/DenominationGrid.js +11 -3
  7. package/dist/components/Dialog.d.ts +28 -4
  8. package/dist/components/Dialog.js +20 -2
  9. package/dist/components/Notice.d.ts +69 -0
  10. package/dist/components/Notice.js +48 -0
  11. package/dist/components/Progress.d.ts +3 -1
  12. package/dist/components/Progress.js +4 -0
  13. package/dist/components/Stepper.d.ts +44 -0
  14. package/dist/components/Stepper.js +77 -0
  15. package/dist/components/Steps.d.ts +18 -0
  16. package/dist/components/Steps.js +34 -0
  17. package/dist/components/Toast.d.ts +20 -4
  18. package/dist/components/Toast.js +44 -21
  19. package/dist/components/action-bar/ActionBarSummary.d.ts +22 -0
  20. package/dist/components/action-bar/ActionBarSummary.js +23 -0
  21. package/dist/components/denomination-grid/ColumnHeadText.d.ts +7 -0
  22. package/dist/components/denomination-grid/ColumnHeadText.js +13 -0
  23. package/dist/components/denomination-grid/DenominationStrip.d.ts +5 -2
  24. package/dist/components/denomination-grid/DenominationStrip.js +4 -8
  25. package/dist/components/denomination-grid/DenominationTiles.d.ts +5 -2
  26. package/dist/components/denomination-grid/DenominationTiles.js +4 -3
  27. package/dist/components/denomination-grid/EntryCell.d.ts +15 -0
  28. package/dist/components/denomination-grid/EntryCell.js +16 -0
  29. package/dist/components/denomination-grid/RowLabelLine.d.ts +3 -2
  30. package/dist/components/denomination-grid/RowLabelLine.js +5 -3
  31. package/dist/components/denomination-grid/StripRow.d.ts +13 -0
  32. package/dist/components/denomination-grid/StripRow.js +19 -0
  33. package/dist/components/denomination-grid/types.d.ts +53 -1
  34. package/dist/components/denomination-grid/validate-entry.d.ts +15 -0
  35. package/dist/components/denomination-grid/validate-entry.js +78 -0
  36. package/dist/components/dialog/DialogFooter.d.ts +14 -0
  37. package/dist/components/dialog/DialogFooter.js +11 -0
  38. package/dist/components/dialog/DialogTitle.d.ts +11 -4
  39. package/dist/components/dialog/DialogTitle.js +8 -6
  40. package/dist/components/steps/Step.d.ts +24 -0
  41. package/dist/components/steps/Step.js +62 -0
  42. package/dist/components/steps/step-status.d.ts +26 -0
  43. package/dist/components/steps/step-status.js +37 -0
  44. package/dist/components/steps/steps-context.d.ts +16 -0
  45. package/dist/components/steps/steps-context.js +3 -0
  46. package/dist/components/toast/ToastContent.d.ts +22 -0
  47. package/dist/components/toast/ToastContent.js +21 -0
  48. package/dist/components/toast/use-toast-hold.d.ts +28 -0
  49. package/dist/components/toast/use-toast-hold.js +53 -0
  50. package/dist/components/toast/use-toast-timer.d.ts +15 -0
  51. package/dist/components/toast/use-toast-timer.js +34 -0
  52. package/dist/css/css-action-bar-summary.d.ts +2 -0
  53. package/dist/css/css-action-bar-summary.js +48 -0
  54. package/dist/css/css-action-bar.js +4 -0
  55. package/dist/css/css-components.js +16 -0
  56. package/dist/css/css-denomination-entry.d.ts +2 -0
  57. package/dist/css/css-denomination-entry.js +78 -0
  58. package/dist/css/css-denomination-grid.js +8 -0
  59. package/dist/css/css-denomination-label.d.ts +10 -0
  60. package/dist/css/css-denomination-label.js +36 -0
  61. package/dist/css/css-dialog-frame.d.ts +2 -0
  62. package/dist/css/css-dialog-frame.js +83 -0
  63. package/dist/css/css-dialog.js +20 -4
  64. package/dist/css/css-notice.d.ts +22 -0
  65. package/dist/css/css-notice.js +168 -0
  66. package/dist/css/css-progress.d.ts +3 -0
  67. package/dist/css/css-progress.js +13 -6
  68. package/dist/css/css-stepper.d.ts +10 -0
  69. package/dist/css/css-stepper.js +126 -0
  70. package/dist/css/css-steps.d.ts +9 -0
  71. package/dist/css/css-steps.js +203 -0
  72. package/dist/css/css-toast-card.d.ts +5 -0
  73. package/dist/css/css-toast-card.js +122 -0
  74. package/dist/css/css-variables.js +1 -0
  75. package/dist/css/stylesheet.js +10 -0
  76. package/dist/index.d.ts +9 -6
  77. package/dist/index.js +8 -5
  78. package/dist/stepper-count.d.ts +37 -0
  79. package/dist/stepper-count.js +50 -0
  80. package/dist/styles.css +623 -1
  81. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -48,6 +48,7 @@
48
48
  --sw-container-max: 72rem;
49
49
  --sw-dialog-max: 32rem;
50
50
  --sw-dialog-max-lg: 56rem;
51
+ --sw-dialog-max-xl: 65rem;
51
52
  --sw-select-max: 16rem;
52
53
  --sw-split-min: 14rem;
53
54
  --sw-split-size: 22rem;
@@ -112,6 +113,7 @@
112
113
  --sw-container-max: 72rem;
113
114
  --sw-dialog-max: 32rem;
114
115
  --sw-dialog-max-lg: 56rem;
116
+ --sw-dialog-max-xl: 65rem;
115
117
  --sw-select-max: 16rem;
116
118
  --sw-split-min: 14rem;
117
119
  --sw-split-size: 22rem;
@@ -2182,6 +2184,10 @@ body {
2182
2184
  max-width: min(var(--sw-dialog-max-lg), calc(100vw - var(--sw-space-8)));
2183
2185
  }
2184
2186
 
2187
+ .sw-dialog-xl {
2188
+ max-width: min(var(--sw-dialog-max-xl), calc(100vw - var(--sw-space-8)));
2189
+ }
2190
+
2185
2191
  @media not all and (min-width: 48rem) {
2186
2192
  .sw-dialog-sheet-below-md {
2187
2193
  border-radius: var(--sw-radius-lg) var(--sw-radius-lg) 0 0;
@@ -2198,6 +2204,12 @@ body {
2198
2204
  .sw-dialog-sheet-below-md[open] {
2199
2205
  animation: sw-dialog-sheet-in var(--sw-motion-default) var(--sw-motion-easing);
2200
2206
  }
2207
+
2208
+ .sw-dialog-sheet-below-md .sw-dialog-footer {
2209
+ bottom: calc(-1 * (var(--sw-space-5) + env(safe-area-inset-bottom, 0px)));
2210
+ margin-bottom: calc(-1 * (var(--sw-space-5) + env(safe-area-inset-bottom, 0px)));
2211
+ padding-bottom: calc(var(--sw-space-3) + env(safe-area-inset-bottom, 0px));
2212
+ }
2201
2213
  }
2202
2214
 
2203
2215
  @keyframes sw-dialog-sheet-in {
@@ -2223,7 +2235,8 @@ body {
2223
2235
  gap: var(--sw-space-2);
2224
2236
  }
2225
2237
 
2226
- .sw-dialog-header > :first-child {
2238
+ .sw-dialog-header > :is(h2, h3),
2239
+ .sw-dialog-titles {
2227
2240
  flex: 1 1 auto;
2228
2241
  min-width: 0;
2229
2242
  }
@@ -2270,6 +2283,64 @@ body {
2270
2283
  .sw-dialog-close-glyph::before { transform: rotate(45deg); }
2271
2284
  .sw-dialog-close-glyph::after { transform: rotate(-45deg); }
2272
2285
 
2286
+ .sw-dialog-header-framed {
2287
+ align-items: center;
2288
+ gap: var(--sw-space-3);
2289
+ }
2290
+
2291
+ .sw-dialog-icon {
2292
+ display: inline-flex;
2293
+ flex: none;
2294
+ }
2295
+
2296
+ .sw-dialog-description { margin: 0; }
2297
+
2298
+ .sw-dialog-footer {
2299
+ align-items: center;
2300
+ background: var(--sw-color-surface);
2301
+ border-top: 1px solid var(--sw-color-border);
2302
+ /* Sticky insets count from the scrollport's padding edge: step past the
2303
+ dialog's own padding to sit on its bottom edge. */
2304
+ bottom: calc(-1 * var(--sw-space-5));
2305
+ box-sizing: border-box;
2306
+ display: flex;
2307
+ flex-wrap: wrap;
2308
+ gap: var(--sw-space-2) var(--sw-space-4);
2309
+ margin: 0 calc(-1 * var(--sw-space-5)) calc(-1 * var(--sw-space-5));
2310
+ padding: var(--sw-space-3) var(--sw-space-5);
2311
+ position: sticky;
2312
+ }
2313
+
2314
+ .sw-dialog-footer-status {
2315
+ align-items: center;
2316
+ display: flex;
2317
+ flex: 1 1 auto;
2318
+ min-width: 0;
2319
+ }
2320
+
2321
+ /* With no summary the live region stays in the dialog, so a first figure
2322
+ is still announced, but it takes no room in the footer. */
2323
+ .sw-dialog-footer-status:empty {
2324
+ clip-path: inset(50%);
2325
+ height: 1px;
2326
+ overflow: hidden;
2327
+ position: absolute;
2328
+ width: 1px;
2329
+ }
2330
+
2331
+ .sw-dialog-footer-actions {
2332
+ display: flex;
2333
+ flex: 0 1 auto;
2334
+ flex-wrap: wrap;
2335
+ gap: var(--sw-space-2);
2336
+ justify-content: flex-end;
2337
+ margin-inline-start: auto;
2338
+ }
2339
+
2340
+ @media (forced-colors: active) {
2341
+ .sw-dialog-footer { border-top-color: CanvasText; }
2342
+ }
2343
+
2273
2344
  .sw-accordion {
2274
2345
  background: var(--sw-glass-fill);
2275
2346
  border: 1px solid var(--sw-glass-border);
@@ -2707,6 +2778,33 @@ body {
2707
2778
  .sw-action-bar-actions > * { flex: 1 1 auto; }
2708
2779
  }
2709
2780
 
2781
+ .sw-action-bar-summary {
2782
+ align-items: baseline;
2783
+ column-gap: var(--sw-space-2);
2784
+ display: inline-flex;
2785
+ flex-wrap: wrap;
2786
+ min-width: 0;
2787
+ }
2788
+
2789
+ .sw-action-bar-summary-label,
2790
+ .sw-action-bar-summary-detail {
2791
+ color: var(--sw-color-muted);
2792
+ font-size: 15px;
2793
+ letter-spacing: -0.2px;
2794
+ line-height: 20px;
2795
+ }
2796
+
2797
+ .sw-action-bar-summary-value {
2798
+ color: var(--sw-color-text);
2799
+ }
2800
+
2801
+ .sw-action-bar-summary-danger .sw-action-bar-summary-value { color: var(--sw-color-danger); }
2802
+ .sw-action-bar-summary-success .sw-action-bar-summary-value { color: var(--sw-color-success); }
2803
+
2804
+ @media (forced-colors: active) {
2805
+ .sw-action-bar-summary-value { color: CanvasText; }
2806
+ }
2807
+
2710
2808
  .sw-action-bar-sticky {
2711
2809
  bottom: calc(var(--sw-space-2) + env(safe-area-inset-bottom, 0px));
2712
2810
  position: sticky;
@@ -2866,6 +2964,7 @@ body {
2866
2964
 
2867
2965
  .sw-progress-accent { --sw-progress-color: var(--sw-color-accent); }
2868
2966
  .sw-progress-success { --sw-progress-color: var(--sw-color-success); }
2967
+ .sw-progress-warning { --sw-progress-color: var(--sw-color-warning); }
2869
2968
  .sw-progress-danger { --sw-progress-color: var(--sw-color-danger); }
2870
2969
 
2871
2970
  .sw-progress-heading {
@@ -2916,6 +3015,117 @@ body {
2916
3015
  .sw-progress-bar::-moz-progress-bar { background: Highlight; }
2917
3016
  }
2918
3017
 
3018
+ .sw-notice-info { --sw-notice-fill: var(--sw-color-accentSubtle); --sw-notice-ink: color-mix(in srgb, var(--sw-color-accent) 70%, var(--sw-color-text)); }
3019
+ .sw-notice-success { --sw-notice-fill: color-mix(in srgb, var(--sw-color-success) 10%, var(--sw-color-surface)); --sw-notice-ink: color-mix(in srgb, var(--sw-color-success) 70%, var(--sw-color-text)); }
3020
+ .sw-notice-warning { --sw-notice-fill: color-mix(in srgb, var(--sw-color-warning) 10%, var(--sw-color-surface)); --sw-notice-ink: color-mix(in srgb, var(--sw-color-warning) 70%, var(--sw-color-text)); }
3021
+ .sw-notice-danger { --sw-notice-fill: color-mix(in srgb, var(--sw-color-danger) 10%, var(--sw-color-surface)); --sw-notice-ink: color-mix(in srgb, var(--sw-color-danger) 70%, var(--sw-color-text)); }
3022
+
3023
+ .sw-notice {
3024
+ align-items: flex-start;
3025
+ background: var(--sw-notice-fill);
3026
+ border-radius: var(--sw-radius-sm);
3027
+ box-sizing: border-box;
3028
+ color: var(--sw-notice-ink);
3029
+ column-gap: var(--sw-space-2);
3030
+ display: flex;
3031
+ flex-wrap: wrap;
3032
+ font-family: var(--sw-font-sans);
3033
+ font-size: 15px;
3034
+ letter-spacing: -0.2px;
3035
+ line-height: 20px;
3036
+ min-width: 0;
3037
+ padding: var(--sw-space-2) var(--sw-space-3);
3038
+ row-gap: var(--sw-space-2);
3039
+ /* Muted words of a control inside (a field's or a checkbox's
3040
+ description) take the ink, which keeps 4.5:1 on the fill. */
3041
+ --sw-color-muted: var(--sw-notice-ink);
3042
+ }
3043
+
3044
+ .sw-notice-icon {
3045
+ display: inline-flex;
3046
+ flex: none;
3047
+ min-height: 20px;
3048
+ align-items: center;
3049
+ }
3050
+
3051
+ .sw-notice-content {
3052
+ align-items: baseline;
3053
+ column-gap: var(--sw-space-2);
3054
+ display: flex;
3055
+ flex: 1 1 16rem;
3056
+ flex-wrap: wrap;
3057
+ min-width: 0;
3058
+ row-gap: var(--sw-space-1);
3059
+ }
3060
+
3061
+ .sw-notice-stacked {
3062
+ align-items: stretch;
3063
+ flex-direction: column;
3064
+ row-gap: var(--sw-space-2);
3065
+ }
3066
+
3067
+ .sw-notice-title {
3068
+ font-weight: 600;
3069
+ min-width: 0;
3070
+ }
3071
+
3072
+ .sw-notice-body {
3073
+ flex: 1 1 auto;
3074
+ font-weight: 400;
3075
+ min-width: 0;
3076
+ }
3077
+
3078
+ .sw-notice-action {
3079
+ align-items: center;
3080
+ align-self: flex-start;
3081
+ display: inline-flex;
3082
+ flex: none;
3083
+ min-height: 20px;
3084
+ }
3085
+
3086
+ /* A small Button keeps the note one text line tall: it overhangs the
3087
+ padding evenly instead of growing the row. */
3088
+ .sw-notice-action > .sw-button {
3089
+ margin-block: calc((20px - var(--sw-control-sm-min-height)) / 2);
3090
+ }
3091
+
3092
+ /* A band across the page's full width, such as an environment strip
3093
+ above the app header: square, the xs control height, caption type,
3094
+ its words centered on one line that wraps on a phone. A glyph or an
3095
+ action stays on the words' row (no wrap): the words wrap instead. */
3096
+ .sw-notice-band {
3097
+ align-items: center;
3098
+ border-radius: 0;
3099
+ flex-wrap: nowrap;
3100
+ font-size: 13px;
3101
+ justify-content: center;
3102
+ letter-spacing: -0.08px;
3103
+ line-height: 18px;
3104
+ min-height: var(--sw-control-xs-min-height);
3105
+ padding: var(--sw-space-1) var(--sw-space-4);
3106
+ text-align: center;
3107
+ width: 100%;
3108
+ }
3109
+
3110
+ .sw-notice-band .sw-notice-content {
3111
+ flex: 0 1 auto;
3112
+ justify-content: center;
3113
+ }
3114
+
3115
+ .sw-notice-band .sw-notice-icon,
3116
+ .sw-notice-band .sw-notice-action { min-height: 18px; }
3117
+
3118
+ .sw-notice-band .sw-notice-action { align-self: center; }
3119
+
3120
+ .sw-notice-band .sw-notice-action > .sw-button {
3121
+ margin-block: calc((18px - var(--sw-control-sm-min-height)) / 2);
3122
+ }
3123
+
3124
+ @media (forced-colors: active) {
3125
+ .sw-notice { border: 1px solid CanvasText; }
3126
+ .sw-notice-band { border-width: 0 0 1px; }
3127
+ }
3128
+
2919
3129
  .sw-tooltip-anchor {
2920
3130
  display: inline-flex;
2921
3131
  position: relative;
@@ -3608,6 +3818,57 @@ body {
3608
3818
  .sw-denomination-grid .sw-denomination-cell-toned .sw-denomination-cell-zero { color: GrayText; }
3609
3819
  }
3610
3820
 
3821
+ .sw-denomination-strip td.sw-denomination-entry {
3822
+ padding: var(--sw-space-1);
3823
+ }
3824
+
3825
+ .sw-denomination-entry .sw-stepper-full .sw-stepper-track {
3826
+ grid-template-columns: var(--sw-space-6) minmax(var(--sw-space-8), 1fr) var(--sw-space-6);
3827
+ }
3828
+
3829
+ /* A strip with entry rows centres its heads and read-only counts over the steppers. */
3830
+ .sw-denomination-strip-entry .sw-denomination-head:not(.sw-denomination-total-head),
3831
+ .sw-denomination-strip-entry .sw-denomination-cell {
3832
+ text-align: center;
3833
+ }
3834
+
3835
+ [data-theme] .sw-denomination-cell-toned .sw-stepper:not(.sw-stepper-invalid) input.sw-stepper-input:not(:disabled) {
3836
+ border-color: var(--sw-denomination-cell-tone);
3837
+ box-shadow: inset 0 0 0 1px var(--sw-denomination-cell-tone);
3838
+ }
3839
+
3840
+ .sw-denomination-label-words {
3841
+ display: flex;
3842
+ flex-direction: column;
3843
+ min-width: 0;
3844
+ }
3845
+
3846
+ .sw-denomination-label-caption,
3847
+ .sw-denomination-head-caption {
3848
+ color: var(--sw-color-muted);
3849
+ font-size: 13px;
3850
+ font-weight: 400;
3851
+ letter-spacing: -0.08px;
3852
+ line-height: 18px;
3853
+ }
3854
+
3855
+ .sw-denomination-row-quiet,
3856
+ .sw-denomination-strip .sw-denomination-row-quiet .sw-denomination-label {
3857
+ background: var(--sw-color-subtle);
3858
+ }
3859
+
3860
+ .sw-denomination-strip .sw-denomination-row-disabled .sw-denomination-label-body,
3861
+ .sw-denomination-strip .sw-denomination-row-disabled .sw-denomination-cell,
3862
+ .sw-denomination-strip .sw-denomination-row-disabled .sw-denomination-total {
3863
+ opacity: var(--sw-disabled-opacity);
3864
+ }
3865
+
3866
+ @media (forced-colors: active) {
3867
+ [data-theme] .sw-denomination-cell-toned .sw-stepper:not(.sw-stepper-invalid) input.sw-stepper-input:not(:disabled) { border-color: Highlight; box-shadow: inset 0 0 0 1px Highlight; }
3868
+ .sw-denomination-label-caption,
3869
+ .sw-denomination-head-caption { color: CanvasText; }
3870
+ }
3871
+
3611
3872
  .sw-denomination-scroll-aligned {
3612
3873
  container-type: inline-size;
3613
3874
  }
@@ -3649,6 +3910,28 @@ body {
3649
3910
  .sw-denomination-strip-aligned .sw-denomination-total-head { width: 0; }
3650
3911
  }
3651
3912
 
3913
+ .sw-denomination-labels-plain .sw-denomination-label {
3914
+ border-inline-start: 0;
3915
+ color: var(--sw-color-text);
3916
+ }
3917
+
3918
+ /* The total under a phone's label keeps its row's tone. */
3919
+ .sw-denomination-labels-plain .sw-denomination-total-inline { color: var(--sw-denomination-tone); }
3920
+
3921
+ .sw-denomination-strip.sw-denomination-labels-plain .sw-denomination-label {
3922
+ padding-inline-start: var(--sw-space-2);
3923
+ }
3924
+
3925
+ .sw-denomination-strip.sw-denomination-labels-plain .sw-denomination-label::before { content: none; }
3926
+
3927
+ @media not all and (min-width: 48rem) {
3928
+ .sw-denomination-strip.sw-denomination-labels-plain .sw-denomination-label { padding-inline-start: var(--sw-space-1); }
3929
+ }
3930
+
3931
+ @media (forced-colors: active) {
3932
+ .sw-denomination-labels-plain .sw-denomination-label { color: CanvasText; }
3933
+ }
3934
+
3652
3935
  @media (forced-colors: active) {
3653
3936
  .sw-denomination-label { border-inline-start-color: CanvasText; color: CanvasText; }
3654
3937
  .sw-denomination-strip .sw-denomination-label::before { background: CanvasText; forced-color-adjust: none; }
@@ -3791,6 +4074,251 @@ body {
3791
4074
  .sw-field-error, .sw-field-required { color: Mark; }
3792
4075
  }
3793
4076
 
4077
+ .sw-stepper {
4078
+ align-items: flex-start;
4079
+ display: inline-flex;
4080
+ flex-direction: column;
4081
+ gap: var(--sw-space-1);
4082
+ min-width: 0;
4083
+ /* Holds its hidden label and empty error region, which leave the flow,
4084
+ so inside a scroll region they never widen the page. */
4085
+ position: relative;
4086
+ }
4087
+
4088
+ .sw-stepper-full { align-items: stretch; display: flex; }
4089
+
4090
+ .sw-stepper-track {
4091
+ display: inline-grid;
4092
+ gap: var(--sw-space-1);
4093
+ grid-template-columns: var(--sw-space-6) auto var(--sw-space-6);
4094
+ }
4095
+
4096
+ .sw-stepper-full .sw-stepper-track {
4097
+ display: grid;
4098
+ grid-template-columns: var(--sw-space-6) minmax(0, 1fr) var(--sw-space-6);
4099
+ }
4100
+
4101
+ .sw-stepper-button {
4102
+ align-items: center;
4103
+ appearance: none;
4104
+ background: var(--sw-color-subtle);
4105
+ border: 1px solid transparent;
4106
+ border-radius: var(--sw-radius-sm);
4107
+ color: var(--sw-color-text);
4108
+ cursor: pointer;
4109
+ display: inline-flex;
4110
+ font-family: var(--sw-font-sans);
4111
+ font-size: 20px;
4112
+ font-weight: 600;
4113
+ justify-content: center;
4114
+ line-height: 28px;
4115
+ margin: 0;
4116
+ min-height: var(--sw-control-md-min-height);
4117
+ padding: 0;
4118
+ touch-action: manipulation;
4119
+ }
4120
+
4121
+ .sw-stepper-button:hover:not(:disabled) {
4122
+ background: var(--sw-color-border);
4123
+ }
4124
+
4125
+ .sw-stepper-button:disabled {
4126
+ cursor: not-allowed;
4127
+ opacity: var(--sw-disabled-opacity);
4128
+ }
4129
+
4130
+ [data-theme] input.sw-stepper-input {
4131
+ font-size: 17px;
4132
+ font-variant-numeric: tabular-nums;
4133
+ font-weight: 600;
4134
+ inline-size: calc(5ch + 2 * var(--sw-space-1));
4135
+ line-height: 25px;
4136
+ min-width: 0;
4137
+ padding-inline: var(--sw-space-1);
4138
+ text-align: center;
4139
+ }
4140
+
4141
+ .sw-stepper-full input.sw-stepper-input { inline-size: 100%; }
4142
+
4143
+ [data-theme] .sw-stepper-invalid input.sw-stepper-input {
4144
+ border-color: var(--sw-color-danger);
4145
+ }
4146
+
4147
+ [data-theme] .sw-stepper-changed input.sw-stepper-input {
4148
+ border-color: var(--sw-color-accent);
4149
+ box-shadow: inset 0 0 0 1px var(--sw-color-accent);
4150
+ }
4151
+
4152
+ [data-theme] .sw-stepper-changed input.sw-stepper-input:not(:placeholder-shown) {
4153
+ background-image: linear-gradient(color-mix(in srgb, var(--sw-color-accent) 12%, transparent), color-mix(in srgb, var(--sw-color-accent) 12%, transparent));
4154
+ }
4155
+
4156
+ /* Read-only: the buttons keep their room, so the count lines up with an editable one. */
4157
+ .sw-stepper-readonly .sw-stepper-button { visibility: hidden; }
4158
+
4159
+ @media (forced-colors: active) {
4160
+ .sw-stepper-button { border-color: ButtonText; }
4161
+ .sw-stepper-button:disabled { border-color: GrayText; color: GrayText; opacity: 1; }
4162
+ [data-theme] .sw-stepper-invalid input.sw-stepper-input { border-color: Mark; }
4163
+ [data-theme] .sw-stepper-changed input.sw-stepper-input { border-color: Highlight; box-shadow: inset 0 0 0 1px Highlight; background-image: none; }
4164
+ }
4165
+
4166
+ .sw-steps {
4167
+ display: flex;
4168
+ flex-direction: column;
4169
+ gap: var(--sw-space-2);
4170
+ list-style: none;
4171
+ margin: 0;
4172
+ padding: 0;
4173
+ }
4174
+
4175
+ .sw-steps-item {
4176
+ --sw-steps-padding: var(--sw-space-3);
4177
+ background: var(--sw-glass-fill);
4178
+ border: 1px solid var(--sw-glass-border);
4179
+ border-radius: var(--sw-radius-md);
4180
+ box-shadow: inset 0 1px 0 var(--sw-glass-specular);
4181
+ color: var(--sw-color-text);
4182
+ display: flex;
4183
+ flex-direction: column;
4184
+ gap: var(--sw-space-4);
4185
+ padding: var(--sw-steps-padding) var(--sw-space-4);
4186
+ position: relative;
4187
+ }
4188
+
4189
+ .sw-steps-item-current,
4190
+ .sw-steps-item-error {
4191
+ --sw-steps-padding: var(--sw-space-4);
4192
+ }
4193
+
4194
+ /* The marker sits at the top of the header, so the connector always starts
4195
+ under it; each line of the header is centred on the marker's height. */
4196
+ .sw-steps-header {
4197
+ align-items: flex-start;
4198
+ display: flex;
4199
+ gap: var(--sw-space-3);
4200
+ min-height: var(--sw-control-xs-min-height);
4201
+ min-width: 0;
4202
+ }
4203
+
4204
+ .sw-steps-marker {
4205
+ align-items: center;
4206
+ border-radius: var(--sw-radius-pill);
4207
+ box-sizing: border-box;
4208
+ display: inline-flex;
4209
+ flex: none;
4210
+ font-family: var(--sw-font-sans);
4211
+ font-size: 13px;
4212
+ font-variant-numeric: tabular-nums;
4213
+ font-weight: 700;
4214
+ height: var(--sw-control-xs-min-height);
4215
+ justify-content: center;
4216
+ line-height: 18px;
4217
+ width: var(--sw-control-xs-min-height);
4218
+ }
4219
+
4220
+ .sw-steps-title {
4221
+ font-family: var(--sw-font-sans);
4222
+ font-size: 17px;
4223
+ font-weight: 600;
4224
+ letter-spacing: -0.2px;
4225
+ line-height: 25px;
4226
+ margin: 0;
4227
+ min-width: 0;
4228
+ padding-block: calc((var(--sw-control-xs-min-height) - 25px) / 2);
4229
+ }
4230
+
4231
+ .sw-steps-item-current .sw-steps-title,
4232
+ .sw-steps-item-error .sw-steps-title {
4233
+ font-size: 20px;
4234
+ letter-spacing: -0.3px;
4235
+ line-height: 28px;
4236
+ padding-block: calc((var(--sw-control-xs-min-height) - 28px) / 2);
4237
+ }
4238
+
4239
+ .sw-steps-item-upcoming .sw-steps-title,
4240
+ .sw-steps-item-skipped .sw-steps-title,
4241
+ .sw-steps-reason {
4242
+ color: var(--sw-color-muted);
4243
+ }
4244
+
4245
+ .sw-steps-summary {
4246
+ flex: 1 1 0;
4247
+ font-size: 15px;
4248
+ letter-spacing: -0.2px;
4249
+ line-height: 20px;
4250
+ min-width: 25%;
4251
+ overflow: hidden;
4252
+ padding-block: calc((var(--sw-control-xs-min-height) - 20px) / 2);
4253
+ text-overflow: ellipsis;
4254
+ white-space: nowrap;
4255
+ }
4256
+
4257
+ .sw-button.sw-steps-edit {
4258
+ flex: none;
4259
+ margin-block: calc((var(--sw-control-xs-min-height) - var(--sw-control-sm-min-height)) / 2);
4260
+ margin-inline-start: auto;
4261
+ }
4262
+
4263
+ .sw-steps-body {
4264
+ margin-inline-start: calc(var(--sw-control-xs-min-height) + var(--sw-space-3));
4265
+ min-width: 0;
4266
+ }
4267
+
4268
+ .sw-steps-item-upcoming .sw-steps-marker,
4269
+ .sw-steps-item-skipped .sw-steps-marker {
4270
+ box-shadow: inset 0 0 0 2px var(--sw-color-border);
4271
+ color: var(--sw-color-muted);
4272
+ }
4273
+
4274
+ .sw-steps-item-current .sw-steps-marker {
4275
+ background: var(--sw-color-accent);
4276
+ color: var(--sw-color-onAccent);
4277
+ }
4278
+
4279
+ .sw-steps-item-error .sw-steps-marker {
4280
+ background: var(--sw-color-danger);
4281
+ color: var(--sw-color-onDanger);
4282
+ }
4283
+
4284
+ .sw-steps-item-done .sw-steps-marker {
4285
+ background: var(--sw-color-success);
4286
+ }
4287
+
4288
+ /* Private chrome: a check drawn with two borders, as Checkbox's. */
4289
+ .sw-steps-item-done .sw-steps-marker::after {
4290
+ border-bottom: 2px solid var(--sw-color-surface);
4291
+ border-right: 2px solid var(--sw-color-surface);
4292
+ content: '';
4293
+ height: var(--sw-space-3);
4294
+ margin-top: calc(-1 * var(--sw-space-1) / 2);
4295
+ transform: rotate(45deg);
4296
+ width: calc(var(--sw-space-3) / 2);
4297
+ }
4298
+
4299
+ .sw-steps-item:not(:last-child)::after {
4300
+ background: var(--sw-color-border);
4301
+ bottom: calc(-1 * var(--sw-space-2) - 1px);
4302
+ content: '';
4303
+ inset-inline-start: calc(var(--sw-space-4) + var(--sw-control-xs-min-height) / 2 - 1px);
4304
+ position: absolute;
4305
+ top: calc(var(--sw-steps-padding) + var(--sw-control-xs-min-height) + var(--sw-space-1));
4306
+ width: 2px;
4307
+ }
4308
+
4309
+ .sw-steps-item-done:not(:last-child)::after {
4310
+ background: var(--sw-color-success);
4311
+ }
4312
+
4313
+ @media (forced-colors: active) {
4314
+ .sw-steps-marker { border: 2px solid CanvasText; box-shadow: none; }
4315
+ .sw-steps-item-current .sw-steps-marker { border-color: Highlight; }
4316
+ .sw-steps-item-done .sw-steps-marker::after { border-color: CanvasText; }
4317
+ .sw-steps-item:not(:last-child)::after { background: CanvasText; }
4318
+ .sw-steps-item-upcoming .sw-steps-title,
4319
+ .sw-steps-item-skipped .sw-steps-title { color: GrayText; }
4320
+ }
4321
+
3794
4322
  .sw-split {
3795
4323
  align-items: stretch;
3796
4324
  align-self: start;
@@ -3969,6 +4497,99 @@ body {
3969
4497
  }
3970
4498
  }
3971
4499
 
4500
+ .sw-toast-title {
4501
+ display: block;
4502
+ font-size: 15px;
4503
+ font-weight: 600;
4504
+ letter-spacing: -0.2px;
4505
+ line-height: 20px;
4506
+ }
4507
+
4508
+ .sw-toast-detail {
4509
+ color: var(--sw-color-muted);
4510
+ font-size: 15px;
4511
+ font-weight: 400;
4512
+ letter-spacing: -0.2px;
4513
+ line-height: 20px;
4514
+ }
4515
+
4516
+ .sw-toast-row:has(.sw-toast-title) { align-items: flex-start; }
4517
+
4518
+ .sw-toast-row .sw-toast-body { flex: 1 1 auto; }
4519
+
4520
+ .sw-button.sw-toast-action {
4521
+ flex: none;
4522
+ margin-block: calc((20px - var(--sw-control-sm-min-height)) / 2);
4523
+ }
4524
+
4525
+ .sw-toast-interactive { pointer-events: auto; }
4526
+
4527
+ .sw-toast-top-end {
4528
+ bottom: auto;
4529
+ left: auto;
4530
+ max-width: min(var(--sw-dialog-max), calc(100% - var(--sw-space-4) - var(--sw-space-4)));
4531
+ right: max(var(--sw-space-4), env(safe-area-inset-right, 0px));
4532
+ top: max(var(--sw-space-4), env(safe-area-inset-top, 0px));
4533
+ translate: none;
4534
+ }
4535
+
4536
+ .sw-toast-top-end:dir(rtl) {
4537
+ left: max(var(--sw-space-4), env(safe-area-inset-left, 0px));
4538
+ right: auto;
4539
+ }
4540
+
4541
+ .sw-toast-top-end:popover-open {
4542
+ animation: sw-toast-drop var(--sw-motion-default) var(--sw-motion-easing);
4543
+ }
4544
+
4545
+ @keyframes sw-toast-drop {
4546
+ from {
4547
+ opacity: 0;
4548
+ translate: 0 calc(-1 * var(--sw-space-3));
4549
+ }
4550
+ to {
4551
+ opacity: 1;
4552
+ translate: none;
4553
+ }
4554
+ }
4555
+
4556
+ .sw-toast-remaining {
4557
+ background: var(--sw-color-border);
4558
+ border-radius: var(--sw-radius-pill);
4559
+ display: block;
4560
+ height: var(--sw-space-1);
4561
+ margin-top: var(--sw-space-2);
4562
+ overflow: hidden;
4563
+ position: relative;
4564
+ }
4565
+
4566
+ .sw-toast-remaining::after {
4567
+ animation: sw-toast-remaining var(--sw-toast-duration, 0ms) linear forwards;
4568
+ background: var(--sw-toast-tone, var(--sw-color-accent));
4569
+ content: '';
4570
+ inset: 0;
4571
+ position: absolute;
4572
+ transform-origin: left center;
4573
+ }
4574
+
4575
+ .sw-toast-remaining:dir(rtl)::after { transform-origin: right center; }
4576
+
4577
+ .sw-toast-paused .sw-toast-remaining::after { animation-play-state: paused; }
4578
+
4579
+ @keyframes sw-toast-remaining {
4580
+ from { transform: scaleX(1); }
4581
+ to { transform: scaleX(0); }
4582
+ }
4583
+
4584
+ @media (prefers-reduced-motion: reduce) {
4585
+ .sw-toast-top-end:popover-open { animation: none; }
4586
+ }
4587
+
4588
+ @media (forced-colors: active) {
4589
+ .sw-toast-remaining { background: Canvas; border: 1px solid CanvasText; }
4590
+ .sw-toast-remaining::after { background: CanvasText; }
4591
+ }
4592
+
3972
4593
  @media (min-width: 48rem) {
3973
4594
  .sw-hide-from-md { display: none; }
3974
4595
  }
@@ -3992,6 +4613,7 @@ body {
3992
4613
  .sw-card-glass,
3993
4614
  .sw-app-header,
3994
4615
  .sw-action-bar,
4616
+ .sw-steps-item,
3995
4617
  .sw-badge-neutral,
3996
4618
  .sw-segmented,
3997
4619
  .sw-table-sticky thead th,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalewing/react",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "Scalewing DOM components and package-owned CSS utilities.",
5
5
  "type": "module",
6
6
  "license": "MIT",