@sunboard/react 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css CHANGED
@@ -16,7 +16,7 @@
16
16
  --sunboard-checklist-background: #ffffff;
17
17
  --sunboard-checklist-foreground: #111827;
18
18
  --sunboard-checklist-border: #e5e7eb;
19
- --sunboard-checklist-shadow: 0 18px 60px rgb(15 23 42 / 16%);
19
+ --sunboard-checklist-shadow: 0 4px 12px rgb(0 0 0 / 10%);
20
20
  --sunboard-checklist-muted: #f3f4f6;
21
21
  --sunboard-checklist-muted-foreground: #6b7280;
22
22
  --sunboard-checklist-primary: #2563eb;
@@ -25,13 +25,9 @@
25
25
 
26
26
  --sunboard-launcher-background: var(--sunboard-checklist-primary);
27
27
  --sunboard-launcher-foreground: var(--sunboard-checklist-primary-foreground);
28
- --sunboard-launcher-border: var(--sunboard-checklist-border);
29
28
  --sunboard-launcher-shadow: var(--sunboard-checklist-shadow);
30
- --sunboard-launcher-count-background: color-mix(
31
- in srgb,
32
- var(--sunboard-launcher-foreground) 18%,
33
- transparent
34
- );
29
+ --sunboard-launcher-badge-background: #ef4444;
30
+ --sunboard-launcher-badge-foreground: #ffffff;
35
31
 
36
32
  --sunboard-tour-background: var(--sunboard-checklist-background);
37
33
  --sunboard-tour-foreground: var(--sunboard-checklist-foreground);
@@ -91,7 +87,7 @@
91
87
  width: 56px;
92
88
  height: 56px;
93
89
  place-items: center;
94
- border: 1px solid var(--sunboard-launcher-border);
90
+ border: 0;
95
91
  border-radius: 999px;
96
92
  background: var(--sunboard-launcher-background);
97
93
  box-shadow: var(--sunboard-launcher-shadow);
@@ -99,18 +95,34 @@
99
95
  cursor: pointer;
100
96
  font-family: var(--sunboard-font);
101
97
  padding: 0;
98
+ transition: transform 160ms ease;
102
99
  }
103
100
 
104
- .sunboard-launcher-count {
105
- display: grid;
106
- min-width: 24px;
101
+ .sunboard-launcher:hover {
102
+ transform: scale(1.05);
103
+ }
104
+
105
+ .sunboard-launcher svg {
106
+ width: 24px;
107
107
  height: 24px;
108
+ }
109
+
110
+ .sunboard-launcher-badge {
111
+ position: absolute;
112
+ top: -4px;
113
+ right: -4px;
114
+ display: grid;
115
+ min-width: 22px;
116
+ height: 22px;
108
117
  place-items: center;
109
118
  border-radius: 999px;
110
- background: var(--sunboard-launcher-count-background);
111
- font-size: 14px;
112
- font-weight: 800;
119
+ background: var(--sunboard-launcher-badge-background);
120
+ box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
121
+ color: var(--sunboard-launcher-badge-foreground);
122
+ font-size: 12px;
123
+ font-weight: 700;
113
124
  line-height: 1;
125
+ padding: 0 6px;
114
126
  }
115
127
 
116
128
  .sunboard-launcher:focus-visible,
@@ -174,21 +186,26 @@
174
186
 
175
187
  .sunboard-close {
176
188
  display: grid;
177
- width: 28px;
178
- height: 28px;
189
+ width: 26px;
190
+ height: 26px;
179
191
  place-items: center;
180
- border: 1px solid var(--sunboard-checklist-border);
192
+ border: 0;
181
193
  border-radius: 999px;
182
- background: var(--sunboard-checklist-background);
194
+ background: transparent;
183
195
  color: var(--sunboard-checklist-muted-foreground);
184
196
  cursor: pointer;
185
- font: inherit;
186
- font-size: 14px;
187
- font-weight: 800;
188
- line-height: 1;
189
197
  padding: 0;
190
198
  }
191
199
 
200
+ .sunboard-close:hover {
201
+ background: var(--sunboard-checklist-muted);
202
+ }
203
+
204
+ .sunboard-close svg {
205
+ width: 14px;
206
+ height: 14px;
207
+ }
208
+
192
209
  .sunboard-progress {
193
210
  height: 8px;
194
211
  overflow: hidden;
@@ -206,58 +223,99 @@
206
223
 
207
224
  .sunboard-step-list {
208
225
  display: grid;
209
- gap: 20px;
226
+ gap: 4px;
210
227
  list-style: none;
211
- margin: 16px 0 0;
228
+ margin: 8px 0 0;
212
229
  padding: 0;
213
230
  }
214
231
 
215
232
  .sunboard-step-row {
216
233
  display: grid;
217
234
  width: 100%;
218
- grid-template-columns: 24px minmax(0, 1fr);
219
- gap: 10px;
235
+ grid-template-columns: 20px minmax(0, 1fr);
236
+ gap: 12px;
220
237
  align-items: start;
221
- border: 0;
222
- background: transparent;
223
- color: inherit;
224
- cursor: default;
225
- font: inherit;
226
- text-align: left;
227
- padding: 6px;
228
- margin: -6px;
238
+ padding: 10px 8px;
239
+ margin: 0 -8px;
229
240
  border-radius: 8px;
230
241
  }
231
242
 
232
- button.sunboard-step-row {
233
- cursor: pointer;
243
+ /* Hovering anywhere on a row with something to click (an action, a checkable
244
+ checkbox, or both) highlights the whole row, like the old row-button did. */
245
+ .sunboard-step-row[data-interactive="true"]:hover {
246
+ background: var(--sunboard-checklist-muted);
234
247
  }
235
248
 
236
- button.sunboard-step-row:hover {
237
- background: var(--sunboard-checklist-muted);
249
+ .sunboard-step-main {
250
+ display: grid;
251
+ width: 100%;
252
+ grid-template-columns: minmax(0, 1fr) 16px;
253
+ gap: 12px;
254
+ align-items: start;
255
+ border: 0;
256
+ background: transparent;
257
+ color: inherit;
258
+ cursor: pointer;
259
+ font: inherit;
260
+ text-align: left;
261
+ padding: 0;
262
+ margin: 0;
263
+ border-radius: 4px;
238
264
  }
239
265
 
240
- button.sunboard-step-row:focus-visible {
266
+ .sunboard-step-main:focus-visible {
241
267
  outline: 2px solid var(--sunboard-checklist-primary);
242
268
  outline-offset: 2px;
243
269
  }
244
270
 
245
271
  .sunboard-step-status {
246
272
  display: grid;
247
- width: 22px;
248
- height: 22px;
273
+ width: 20px;
274
+ height: 20px;
249
275
  place-items: center;
250
- border: 1px solid var(--sunboard-checklist-border);
251
- border-radius: 999px;
276
+ border: 2px solid var(--sunboard-checklist-border);
277
+ border-radius: 6px;
278
+ background: transparent;
279
+ padding: 0;
252
280
  color: var(--sunboard-checklist-primary-foreground);
253
- font-size: 13px;
254
- font-weight: 800;
255
- line-height: 1;
256
281
  }
257
282
 
258
283
  .sunboard-step-status svg {
259
- width: 14px;
260
- height: 14px;
284
+ width: 12px;
285
+ height: 12px;
286
+ stroke-width: 3;
287
+ }
288
+
289
+ /* Checkable: the status is a button; preview the check on hover/focus. */
290
+ button.sunboard-step-status {
291
+ cursor: pointer;
292
+ }
293
+
294
+ button.sunboard-step-status svg {
295
+ opacity: 0;
296
+ color: var(--sunboard-checklist-muted-foreground);
297
+ transition: opacity 120ms ease;
298
+ }
299
+
300
+ button.sunboard-step-status:hover,
301
+ button.sunboard-step-status:focus-visible {
302
+ border-color: var(--sunboard-checklist-success);
303
+ }
304
+
305
+ button.sunboard-step-status:hover svg,
306
+ button.sunboard-step-status:focus-visible svg {
307
+ opacity: 1;
308
+ }
309
+
310
+ button.sunboard-step-status:focus-visible {
311
+ outline: 2px solid var(--sunboard-checklist-primary);
312
+ outline-offset: 2px;
313
+ }
314
+
315
+ /* manual: false and not yet complete: the checkbox is inert and says so. */
316
+ .sunboard-step-status[data-locked="true"] {
317
+ border-style: dashed;
318
+ opacity: 0.55;
261
319
  }
262
320
 
263
321
  .sunboard-step[data-completed="true"] .sunboard-step-status {
@@ -265,6 +323,24 @@ button.sunboard-step-row:focus-visible {
265
323
  background: var(--sunboard-checklist-success);
266
324
  }
267
325
 
326
+ .sunboard-step[data-completed="true"] .sunboard-step-title {
327
+ color: var(--sunboard-checklist-muted-foreground);
328
+ text-decoration: line-through;
329
+ }
330
+
331
+ .sunboard-step-arrow {
332
+ display: grid;
333
+ width: 16px;
334
+ height: 20px;
335
+ place-items: center;
336
+ color: var(--sunboard-checklist-muted-foreground);
337
+ }
338
+
339
+ .sunboard-step-arrow svg {
340
+ width: 16px;
341
+ height: 16px;
342
+ }
343
+
268
344
  .sunboard-step-content {
269
345
  min-width: 0;
270
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunboard/react",
3
- "version": "0.6.1",
3
+ "version": "0.8.0",
4
4
  "description": "React SDK for the Sunboard onboarding runtime.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@floating-ui/react": "^0.27.19",
29
- "@sunboard/core": "0.8.1"
29
+ "@sunboard/core": "0.9.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=18.3.0 || >=19.0.0",