@seekalfred/primitives 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -11
- package/dist/activity-heatmap/activity-heatmap.d.ts +92 -0
- package/dist/activity-heatmap/activity-heatmap.js +699 -0
- package/dist/activity-heatmap/activity-heatmap.js.map +1 -0
- package/dist/activity-heatmap/index.d.ts +2 -0
- package/dist/activity-heatmap/index.js +2 -0
- package/dist/alert/alert.d.ts +5 -1
- package/dist/alert/alert.js +68 -7
- package/dist/alert/alert.js.map +1 -1
- package/dist/alert-dialog/alert-dialog.d.ts +45 -18
- package/dist/alert-dialog/alert-dialog.js +128 -9
- package/dist/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/alert-dialog/index.d.ts +2 -2
- package/dist/alert-dialog/index.js +2 -2
- package/dist/animated-counter/animated-counter.d.ts +38 -0
- package/dist/animated-counter/animated-counter.js +230 -0
- package/dist/animated-counter/animated-counter.js.map +1 -0
- package/dist/animated-counter/index.d.ts +2 -0
- package/dist/animated-counter/index.js +2 -0
- package/dist/announcement-bar/announcement-bar.d.ts +67 -0
- package/dist/announcement-bar/announcement-bar.js +364 -0
- package/dist/announcement-bar/announcement-bar.js.map +1 -0
- package/dist/announcement-bar/index.d.ts +2 -0
- package/dist/announcement-bar/index.js +2 -0
- package/dist/badge/badge.d.ts +1 -1
- package/dist/bar-chart/bar-chart.d.ts +51 -0
- package/dist/bar-chart/bar-chart.js +565 -0
- package/dist/bar-chart/bar-chart.js.map +1 -0
- package/dist/bar-chart/index.d.ts +2 -0
- package/dist/bar-chart/index.js +2 -0
- package/dist/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/breadcrumb/breadcrumb.js +12 -3
- package/dist/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/brush-chart/brush-chart.d.ts +64 -0
- package/dist/brush-chart/brush-chart.js +1056 -0
- package/dist/brush-chart/brush-chart.js.map +1 -0
- package/dist/brush-chart/index.d.ts +2 -0
- package/dist/brush-chart/index.js +2 -0
- package/dist/button/button.d.ts +2 -2
- package/dist/button/button.js +31 -21
- package/dist/button/button.js.map +1 -1
- package/dist/button-group/button-group.js +3 -4
- package/dist/button-group/button-group.js.map +1 -1
- package/dist/card/card.js +1 -1
- package/dist/card/card.js.map +1 -1
- package/dist/card-stack/card-stack.d.ts +54 -0
- package/dist/card-stack/card-stack.js +492 -0
- package/dist/card-stack/card-stack.js.map +1 -0
- package/dist/card-stack/index.d.ts +2 -0
- package/dist/card-stack/index.js +2 -0
- package/dist/carousel/carousel.d.ts +56 -0
- package/dist/carousel/carousel.js +389 -0
- package/dist/carousel/carousel.js.map +1 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +2 -0
- package/dist/checkbox/checkbox.js +4 -4
- package/dist/checkbox/checkbox.js.map +1 -1
- package/dist/chip-group/chip-group.d.ts +37 -0
- package/dist/chip-group/chip-group.js +148 -0
- package/dist/chip-group/chip-group.js.map +1 -0
- package/dist/chip-group/index.d.ts +2 -0
- package/dist/chip-group/index.js +2 -0
- package/dist/countdown/countdown.d.ts +45 -0
- package/dist/countdown/countdown.js +298 -0
- package/dist/countdown/countdown.js.map +1 -0
- package/dist/countdown/index.d.ts +2 -0
- package/dist/countdown/index.js +2 -0
- package/dist/date-picker/picker-parts.js +1 -1
- package/dist/date-picker/picker-parts.js.map +1 -1
- package/dist/dialog/dialog.js +1 -1
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/donut-chart/donut-chart.d.ts +64 -0
- package/dist/donut-chart/donut-chart.js +576 -0
- package/dist/donut-chart/donut-chart.js.map +1 -0
- package/dist/donut-chart/index.d.ts +2 -0
- package/dist/donut-chart/index.js +2 -0
- package/dist/empty-state/empty-state.d.ts +21 -10
- package/dist/empty-state/empty-state.js +32 -26
- package/dist/empty-state/empty-state.js.map +1 -1
- package/dist/empty-state/index.d.ts +2 -2
- package/dist/empty-state/index.js +2 -2
- package/dist/file-drop-zone/file-drop-zone.js +1 -1
- package/dist/file-drop-zone/file-drop-zone.js.map +1 -1
- package/dist/filter-bar/filter-bar.d.ts +47 -26
- package/dist/filter-bar/filter-bar.js +272 -156
- package/dist/filter-bar/filter-bar.js.map +1 -1
- package/dist/gauge/gauge.d.ts +45 -0
- package/dist/gauge/gauge.js +219 -0
- package/dist/gauge/gauge.js.map +1 -0
- package/dist/gauge/index.d.ts +2 -0
- package/dist/gauge/index.js +2 -0
- package/dist/in-view-title/in-view-title.d.ts +33 -0
- package/dist/in-view-title/in-view-title.js +119 -0
- package/dist/in-view-title/in-view-title.js.map +1 -0
- package/dist/in-view-title/index.d.ts +2 -0
- package/dist/in-view-title/index.js +2 -0
- package/dist/index.d.ts +49 -6
- package/dist/index.js +48 -8
- package/dist/lib/cn.js +11 -1
- package/dist/lib/cn.js.map +1 -1
- package/dist/lib/field-message.js +28 -10
- package/dist/lib/field-message.js.map +1 -1
- package/dist/lib/field-surface.js +9 -8
- package/dist/lib/field-surface.js.map +1 -1
- package/dist/lib/flag-emoji.js +50 -0
- package/dist/lib/flag-emoji.js.map +1 -0
- package/dist/lib/flip.js +11 -3
- package/dist/lib/flip.js.map +1 -1
- package/dist/lib/menu-highlight.js +64 -0
- package/dist/lib/menu-highlight.js.map +1 -0
- package/dist/lib/motion.js +9 -2
- package/dist/lib/motion.js.map +1 -1
- package/dist/lib/rolling-value.js +1 -1
- package/dist/lib/rolling-value.js.map +1 -1
- package/dist/lib/spring-tween.js +500 -0
- package/dist/lib/spring-tween.js.map +1 -0
- package/dist/lib/swap-text.js +3 -1
- package/dist/lib/swap-text.js.map +1 -1
- package/dist/line-chart/index.d.ts +2 -0
- package/dist/line-chart/index.js +2 -0
- package/dist/line-chart/line-chart.d.ts +76 -0
- package/dist/line-chart/line-chart.js +611 -0
- package/dist/line-chart/line-chart.js.map +1 -0
- package/dist/mention-input/index.d.ts +2 -0
- package/dist/mention-input/index.js +2 -0
- package/dist/mention-input/mention-input.d.ts +98 -0
- package/dist/mention-input/mention-input.js +576 -0
- package/dist/mention-input/mention-input.js.map +1 -0
- package/dist/menu/menu.d.ts +2 -0
- package/dist/menu/menu.js +23 -12
- package/dist/menu/menu.js.map +1 -1
- package/dist/money-input/index.d.ts +2 -0
- package/dist/money-input/index.js +2 -0
- package/dist/money-input/money-input.d.ts +65 -0
- package/dist/money-input/money-input.js +607 -0
- package/dist/money-input/money-input.js.map +1 -0
- package/dist/morph-select/index.d.ts +2 -0
- package/dist/morph-select/index.js +2 -0
- package/dist/morph-select/morph-select.d.ts +71 -0
- package/dist/morph-select/morph-select.js +693 -0
- package/dist/morph-select/morph-select.js.map +1 -0
- package/dist/multi-select/index.d.ts +2 -0
- package/dist/multi-select/index.js +2 -0
- package/dist/multi-select/multi-select.d.ts +36 -0
- package/dist/multi-select/multi-select.js +152 -0
- package/dist/multi-select/multi-select.js.map +1 -0
- package/dist/number-field/index.d.ts +2 -0
- package/dist/number-field/index.js +2 -0
- package/dist/number-field/number-field.d.ts +42 -0
- package/dist/number-field/number-field.js +199 -0
- package/dist/number-field/number-field.js.map +1 -0
- package/dist/onboarding-checklist/index.d.ts +2 -0
- package/dist/onboarding-checklist/index.js +2 -0
- package/dist/onboarding-checklist/onboarding-checklist.d.ts +55 -0
- package/dist/onboarding-checklist/onboarding-checklist.js +577 -0
- package/dist/onboarding-checklist/onboarding-checklist.js.map +1 -0
- package/dist/password-field/password-field.js +2 -2
- package/dist/password-field/password-field.js.map +1 -1
- package/dist/phone-input/index.d.ts +3 -0
- package/dist/phone-input/index.js +3 -0
- package/dist/phone-input/phone-countries.d.ts +29 -0
- package/dist/phone-input/phone-countries.js +170 -0
- package/dist/phone-input/phone-countries.js.map +1 -0
- package/dist/phone-input/phone-input.d.ts +66 -0
- package/dist/phone-input/phone-input.js +440 -0
- package/dist/phone-input/phone-input.js.map +1 -0
- package/dist/popover/popover.d.ts +12 -0
- package/dist/popover/popover.js +31 -7
- package/dist/popover/popover.js.map +1 -1
- package/dist/progress/progress.js +1 -1
- package/dist/radio-group/radio-group.js +1 -1
- package/dist/radio-group/radio-group.js.map +1 -1
- package/dist/reactions/index.d.ts +2 -0
- package/dist/reactions/index.js +2 -0
- package/dist/reactions/reactions.d.ts +50 -0
- package/dist/reactions/reactions.js +315 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/rich-text-editor/index.d.ts +3 -0
- package/dist/rich-text-editor/index.js +2 -0
- package/dist/rich-text-editor/rich-text-editor.d.ts +70 -0
- package/dist/rich-text-editor/rich-text-editor.js +909 -0
- package/dist/rich-text-editor/rich-text-editor.js.map +1 -0
- package/dist/rich-text-editor/rich-text-engine.d.ts +16 -0
- package/dist/rich-text-editor/rich-text-engine.js +366 -0
- package/dist/rich-text-editor/rich-text-engine.js.map +1 -0
- package/dist/rich-text-editor/rich-text-html.js +174 -0
- package/dist/rich-text-editor/rich-text-html.js.map +1 -0
- package/dist/rich-text-editor/rich-text-icons.js +43 -0
- package/dist/rich-text-editor/rich-text-icons.js.map +1 -0
- package/dist/ridgeline/index.d.ts +2 -0
- package/dist/ridgeline/index.js +2 -0
- package/dist/ridgeline/ridgeline.d.ts +55 -0
- package/dist/ridgeline/ridgeline.js +701 -0
- package/dist/ridgeline/ridgeline.js.map +1 -0
- package/dist/scroll-area/index.d.ts +2 -2
- package/dist/scroll-area/index.js +2 -2
- package/dist/scroll-area/scroll-area.d.ts +68 -31
- package/dist/scroll-area/scroll-area.js +208 -59
- package/dist/scroll-area/scroll-area.js.map +1 -1
- package/dist/scrub-input/evaluate.d.ts +14 -0
- package/dist/scrub-input/evaluate.js +72 -0
- package/dist/scrub-input/evaluate.js.map +1 -0
- package/dist/scrub-input/index.d.ts +3 -0
- package/dist/scrub-input/index.js +3 -0
- package/dist/scrub-input/scrub-input.d.ts +74 -0
- package/dist/scrub-input/scrub-input.js +486 -0
- package/dist/scrub-input/scrub-input.js.map +1 -0
- package/dist/search-field/search-field.d.ts +2 -1
- package/dist/search-field/search-field.js +4 -4
- package/dist/search-field/search-field.js.map +1 -1
- package/dist/select/select.d.ts +3 -1
- package/dist/select/select.js +20 -8
- package/dist/select/select.js.map +1 -1
- package/dist/separator/separator.d.ts +1 -1
- package/dist/sheet/sheet.js +2 -1
- package/dist/sheet/sheet.js.map +1 -1
- package/dist/shortcut-recorder/index.d.ts +3 -0
- package/dist/shortcut-recorder/index.js +3 -0
- package/dist/shortcut-recorder/shortcut-model.d.ts +27 -0
- package/dist/shortcut-recorder/shortcut-model.js +206 -0
- package/dist/shortcut-recorder/shortcut-model.js.map +1 -0
- package/dist/shortcut-recorder/shortcut-recorder.d.ts +93 -0
- package/dist/shortcut-recorder/shortcut-recorder.js +489 -0
- package/dist/shortcut-recorder/shortcut-recorder.js.map +1 -0
- package/dist/slider/index.d.ts +2 -2
- package/dist/slider/slider.d.ts +46 -14
- package/dist/slider/slider.js +151 -67
- package/dist/slider/slider.js.map +1 -1
- package/dist/slope-chart/index.d.ts +2 -0
- package/dist/slope-chart/index.js +2 -0
- package/dist/slope-chart/slope-chart.d.ts +54 -0
- package/dist/slope-chart/slope-chart.js +568 -0
- package/dist/slope-chart/slope-chart.js.map +1 -0
- package/dist/sparkline/index.d.ts +2 -0
- package/dist/sparkline/index.js +2 -0
- package/dist/sparkline/sparkline.d.ts +46 -0
- package/dist/sparkline/sparkline.js +390 -0
- package/dist/sparkline/sparkline.js.map +1 -0
- package/dist/split-bar/index.d.ts +2 -0
- package/dist/split-bar/index.js +2 -0
- package/dist/split-bar/split-bar.d.ts +62 -0
- package/dist/split-bar/split-bar.js +513 -0
- package/dist/split-bar/split-bar.js.map +1 -0
- package/dist/split-button/split-button.d.ts +1 -1
- package/dist/split-button/split-button.js +12 -11
- package/dist/split-button/split-button.js.map +1 -1
- package/dist/stat-card/index.d.ts +2 -2
- package/dist/stat-card/index.js +2 -2
- package/dist/stat-card/stat-card.d.ts +24 -4
- package/dist/stat-card/stat-card.js +114 -17
- package/dist/stat-card/stat-card.js.map +1 -1
- package/dist/stepper/index.d.ts +2 -0
- package/dist/stepper/index.js +2 -0
- package/dist/stepper/stepper.d.ts +51 -0
- package/dist/stepper/stepper.js +215 -0
- package/dist/stepper/stepper.js.map +1 -0
- package/dist/streamgraph/index.d.ts +2 -0
- package/dist/streamgraph/index.js +2 -0
- package/dist/streamgraph/streamgraph.d.ts +70 -0
- package/dist/streamgraph/streamgraph.js +613 -0
- package/dist/streamgraph/streamgraph.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/swipe-actions/index.d.ts +2 -0
- package/dist/swipe-actions/index.js +2 -0
- package/dist/swipe-actions/swipe-actions.d.ts +67 -0
- package/dist/swipe-actions/swipe-actions.js +552 -0
- package/dist/swipe-actions/swipe-actions.js.map +1 -0
- package/dist/switch/switch.js +2 -2
- package/dist/switch/switch.js.map +1 -1
- package/dist/table/index.d.ts +2 -2
- package/dist/table/index.js +2 -2
- package/dist/table/table.d.ts +56 -4
- package/dist/table/table.js +340 -165
- package/dist/table/table.js.map +1 -1
- package/dist/tabs/tabs.js +2 -2
- package/dist/tabs/tabs.js.map +1 -1
- package/dist/tag-input/index.d.ts +2 -0
- package/dist/tag-input/index.js +2 -0
- package/dist/tag-input/tag-input.d.ts +40 -0
- package/dist/tag-input/tag-input.js +269 -0
- package/dist/tag-input/tag-input.js.map +1 -0
- package/dist/text-morph/index.d.ts +2 -0
- package/dist/text-morph/index.js +2 -0
- package/dist/text-morph/text-morph.d.ts +23 -0
- package/dist/text-morph/text-morph.js +21 -0
- package/dist/text-morph/text-morph.js.map +1 -0
- package/dist/text-reveal/index.d.ts +2 -0
- package/dist/text-reveal/index.js +2 -0
- package/dist/text-reveal/text-reveal.d.ts +27 -0
- package/dist/text-reveal/text-reveal.js +51 -0
- package/dist/text-reveal/text-reveal.js.map +1 -0
- package/dist/text-shimmer/index.d.ts +2 -0
- package/dist/text-shimmer/index.js +2 -0
- package/dist/text-shimmer/text-shimmer.d.ts +29 -0
- package/dist/text-shimmer/text-shimmer.js +29 -0
- package/dist/text-shimmer/text-shimmer.js.map +1 -0
- package/dist/time-picker/time-picker.js +2 -2
- package/dist/time-picker/time-picker.js.map +1 -1
- package/dist/toast/index.d.ts +2 -2
- package/dist/toast/index.js +2 -2
- package/dist/toast/toast.d.ts +6 -0
- package/dist/toast/toast.js +82 -40
- package/dist/toast/toast.js.map +1 -1
- package/dist/tooltip/tooltip.d.ts +9 -2
- package/dist/tooltip/tooltip.js +7 -7
- package/dist/tooltip/tooltip.js.map +1 -1
- package/dist/treemap/index.d.ts +2 -0
- package/dist/treemap/index.js +2 -0
- package/dist/treemap/treemap.d.ts +53 -0
- package/dist/treemap/treemap.js +699 -0
- package/dist/treemap/treemap.js.map +1 -0
- package/dist/usage-meter/index.d.ts +2 -0
- package/dist/usage-meter/index.js +2 -0
- package/dist/usage-meter/usage-meter.d.ts +50 -0
- package/dist/usage-meter/usage-meter.js +440 -0
- package/dist/usage-meter/usage-meter.js.map +1 -0
- package/dist/waffle-chart/index.d.ts +2 -0
- package/dist/waffle-chart/index.js +2 -0
- package/dist/waffle-chart/waffle-chart.d.ts +57 -0
- package/dist/waffle-chart/waffle-chart.js +426 -0
- package/dist/waffle-chart/waffle-chart.js.map +1 -0
- package/package.json +165 -3
package/README.md
CHANGED
|
@@ -224,8 +224,8 @@ A new string label swaps as a whole and the pill's width springs to the new size
|
|
|
224
224
|
```tsx
|
|
225
225
|
<Breadcrumbs>
|
|
226
226
|
<BreadcrumbItem href="/">Home</BreadcrumbItem>
|
|
227
|
-
<BreadcrumbItem href="/design-thinking">Design
|
|
228
|
-
<BreadcrumbItem>User
|
|
227
|
+
<BreadcrumbItem href="/design-thinking">Design thinking</BreadcrumbItem>
|
|
228
|
+
<BreadcrumbItem>User personas</BreadcrumbItem>
|
|
229
229
|
</Breadcrumbs>
|
|
230
230
|
```
|
|
231
231
|
|
|
@@ -1351,17 +1351,21 @@ The pulse dims a block to about half and back over 1.8s, 11 times (about 20 seco
|
|
|
1351
1351
|
## Slider
|
|
1352
1352
|
|
|
1353
1353
|
```tsx
|
|
1354
|
-
<Slider label="
|
|
1354
|
+
<Slider label="Volume" defaultValue={60} formatOptions={{ style: "unit", unit: "percent" }} />
|
|
1355
|
+
<Slider label="Budget" defaultValue={[2200, 8000]} minValue={0} maxValue={10000} step={100} description="Per month" />
|
|
1356
|
+
<Slider label="Volume" step={25} marks={[0, 25, 50, 75, 100].map((v) => ({ value: v, label: `${v}%` }))} start={<Button size="icon" aria-label="Mute">...</Button>} />
|
|
1355
1357
|
```
|
|
1356
1358
|
|
|
1357
1359
|
**`label` is required** — all four legacy call sites are unnamed sliders.
|
|
1358
1360
|
|
|
1361
|
+
The look follows the design spec: a thin, rounded, light-grey track with a solid ink (`foreground`) fill, and a solid white thumb with a soft shadow. The label sits left and the value right. `value`/`defaultValue` may be a `[low, high]` pair, which gives two thumbs and a range readout ("$2,200 – $8,000"); `description` adds grey helper text; `marks` draws tick dots (a mark with a `label` prints it under the track); `start`/`end` hold content beside the track, such as an icon button.
|
|
1362
|
+
|
|
1359
1363
|
The thumb is 24×24 (WCAG 2.5.8); the legacy's was 16. `aria-valuetext` comes
|
|
1360
1364
|
free, so a scrubber can announce a time instead of a raw second count.
|
|
1361
1365
|
|
|
1362
1366
|
### Motion (Slider)
|
|
1363
1367
|
|
|
1364
|
-
A value that arrives from outside a drag (a key, a prop, a click on the track) moves the thumb and the fill on the snappy spring; while dragging they stay under the pointer. The thumb swells to 1.16 while held. A bubble with the value rises in over the thumb (from small and blurred) while it is dragged or keyboard focused, and drops away in 120ms; the readout and the bubble roll their value up or down as it changes. The bubble is `aria-hidden`: the output beside the label carries the value. Reduced motion keeps opacity changes only. Not ported:
|
|
1368
|
+
A value that arrives from outside a drag (a key, a prop, a click on the track) moves the thumb and the fill on the snappy spring; while dragging they stay under the pointer. The thumb swells to 1.16 while held. A bubble with the value rises in over the thumb (from small and blurred) while it is dragged or keyboard focused, and drops away in 120ms; the readout and the bubble roll their value up or down as it changes. The bubble is `aria-hidden`: the output beside the label carries the value. Reduced motion keeps opacity changes only. Not ported: clicking a mark label to move there, the springing catch-up on a click of the track (React Aria starts a drag at once), rubber-banding past the limits and release momentum.
|
|
1365
1369
|
|
|
1366
1370
|
## SplitButton
|
|
1367
1371
|
|
|
@@ -1422,8 +1426,9 @@ The thumb travels on a no-overshoot spring (559ms), stretches 5px toward its tra
|
|
|
1422
1426
|
|
|
1423
1427
|
**The track colours are not the legacy's, and could not be.** A white thumb
|
|
1424
1428
|
on `--color-primary` is 2.44:1 and on `--color-muted` is 1.13:1 — both fail
|
|
1425
|
-
WCAG 1.4.11. The track is `
|
|
1426
|
-
which clears 3:1 in both themes.
|
|
1429
|
+
WCAG 1.4.11. The track is `control-edge` unchecked and `primary-strong`
|
|
1430
|
+
checked, which clears 3:1 in both themes. (`control-edge`, not the light
|
|
1431
|
+
page `border`, which is a decorative hairline.)
|
|
1427
1432
|
|
|
1428
1433
|
## Table
|
|
1429
1434
|
|
|
@@ -1526,9 +1531,10 @@ already agree on every value that matters:
|
|
|
1526
1531
|
| cell padding | 16px / 12px | same |
|
|
1527
1532
|
| typeface | Satoshi | same |
|
|
1528
1533
|
|
|
1529
|
-
The text colours were never a gap: the product's
|
|
1530
|
-
`#6B6B78` and
|
|
1531
|
-
`--color-muted-foreground` and `--color-foreground
|
|
1534
|
+
The text colours were never a gap at the time: the product's
|
|
1535
|
+
`--muted-foreground` (`#6B6B78`) and body ink (`#02021e`) matched this
|
|
1536
|
+
system's `--color-muted-foreground` and `--color-foreground`. Since the 2026
|
|
1537
|
+
colour refresh these roles follow the design tokens (ink 600 and ink 900). An earlier draft of
|
|
1532
1538
|
this section claimed otherwise and prescribed `#0f172b` / `#6b6b6b`; those come
|
|
1533
1539
|
from `--table-text-*`, which the AI-visibility tables do not use. Do not apply
|
|
1534
1540
|
them.
|
|
@@ -1591,8 +1597,8 @@ uncommitted form state, a running video or a scroll position will lose it
|
|
|
1591
1597
|
on tab change — pass `shouldForceMount` on that `TabPanel`. With 31 legacy
|
|
1592
1598
|
panels, some will need it.
|
|
1593
1599
|
|
|
1594
|
-
The selected tab carries a **border**, not just a fill:
|
|
1595
|
-
|
|
1600
|
+
The selected tab carries a **border**, not just a fill: a surface on a
|
|
1601
|
+
`bg-muted` list is barely distinguishable, and WCAG 1.4.11 wants 3:1 for the thing
|
|
1596
1602
|
telling you which tab is active.
|
|
1597
1603
|
|
|
1598
1604
|
## ThemeSwitch
|
|
@@ -1681,6 +1687,8 @@ A toast rises 16px from below and grows from .96 on the morph spring while it fa
|
|
|
1681
1687
|
</TooltipTrigger>
|
|
1682
1688
|
```
|
|
1683
1689
|
|
|
1690
|
+
The bubble is solid ink with `background` text (so it inverts in dark mode), a large corner and comfortable padding; long text wraps at 15rem. It opens above its trigger with **no arrow**; `placement` and `showArrow` are opt-in.
|
|
1691
|
+
|
|
1684
1692
|
**`delay` defaults to 0**, matching the legacy provider. React Aria ships
|
|
1685
1693
|
1500ms — taking that default would have put a 1.5-second warm-up on every
|
|
1686
1694
|
tooltip in the app. Focus opens it immediately regardless.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/activity-heatmap/activity-heatmap.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* ActivityHeatmap: one square per day, weeks as columns, four tints of the
|
|
5
|
+
* primary chart colour for how busy a day was. Use it when rhythm, streaks and
|
|
6
|
+
* quiet weeks matter more than exact comparisons; use a bar chart when the
|
|
7
|
+
* exact comparison is the point.
|
|
8
|
+
*
|
|
9
|
+
* The squares wave in once, diagonally, when the grid is seen. A tooltip
|
|
10
|
+
* glides between squares on hover or keyboard focus and its words rise in. A
|
|
11
|
+
* new range recolours the grid in a sweep instead of redrawing it, and the
|
|
12
|
+
* total rolls to its new number. The legend's squares preview a level on the
|
|
13
|
+
* grid (the others step back) and pin it on press.
|
|
14
|
+
*
|
|
15
|
+
* It sits in a card (`framed`, on by default). A year switch (`periods`) sits
|
|
16
|
+
* beside the total, and a detail line under the legend says what the hovered,
|
|
17
|
+
* focused or selected day holds (`describeDay`).
|
|
18
|
+
*
|
|
19
|
+
* The grid is a `grid` of `gridcell`s with one tab stop: arrow keys move by
|
|
20
|
+
* day (up and down) and by week (left and right), Home and End jump to the
|
|
21
|
+
* ends, Enter selects. A visually hidden table carries every day.
|
|
22
|
+
*/
|
|
23
|
+
export interface ActivityDay {
|
|
24
|
+
/** Calendar day as YYYY-MM-DD. */
|
|
25
|
+
date: string;
|
|
26
|
+
count: number;
|
|
27
|
+
}
|
|
28
|
+
/** What `describeDay` is given for one day. */
|
|
29
|
+
export interface ActivityDayDetail {
|
|
30
|
+
/** The day as YYYY-MM-DD. */
|
|
31
|
+
date: string;
|
|
32
|
+
count: number;
|
|
33
|
+
/** The day spelled out, such as "Tuesday, March 18". The year is added when the range spans more than one. */
|
|
34
|
+
label: string;
|
|
35
|
+
/** The nouns for the count, as passed in `unit`. */
|
|
36
|
+
unit: {
|
|
37
|
+
one: string;
|
|
38
|
+
other: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface ActivityHeatmapProps {
|
|
42
|
+
/** One entry per day, oldest first. Days missing inside the range count as zero. */
|
|
43
|
+
days: ActivityDay[];
|
|
44
|
+
/** Accessible name for the grid, such as "Contributions in 2025". */
|
|
45
|
+
label: string;
|
|
46
|
+
/** Finishes the summary line: "1,284 contributions in {period}". */
|
|
47
|
+
period: string;
|
|
48
|
+
/** Nouns for the count. @default { one: "contribution", other: "contributions" } */
|
|
49
|
+
unit?: {
|
|
50
|
+
one: string;
|
|
51
|
+
other: string;
|
|
52
|
+
};
|
|
53
|
+
/** Upper bounds for levels one to three; anything above the last is level four. Defaults to quarters of the busiest day. */
|
|
54
|
+
thresholds?: [number, number, number];
|
|
55
|
+
/** @default 0 (Sunday) */
|
|
56
|
+
weekStartsOn?: 0 | 1;
|
|
57
|
+
/** Controlled selected day, as YYYY-MM-DD. */
|
|
58
|
+
selectedDate?: string | null;
|
|
59
|
+
defaultSelectedDate?: string | null;
|
|
60
|
+
/** Called with the day's YYYY-MM-DD when a day is pressed or chosen with Enter. */
|
|
61
|
+
onSelectDate?: (date: string) => void;
|
|
62
|
+
/** Controls beside the summary. */
|
|
63
|
+
actions?: ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* The ranges to switch between, such as ["2025", "2024", "2023"], shown as a segmented switch beside the summary with the one
|
|
66
|
+
* equal to `period` selected. You own the data: when `onPeriodChange` fires, pass the new `days`, `period` and `label`.
|
|
67
|
+
*/
|
|
68
|
+
periods?: string[];
|
|
69
|
+
/** Called with the chosen entry of `periods`. */
|
|
70
|
+
onPeriodChange?: (period: string) => void;
|
|
71
|
+
/** Accessible name for the switch. @default "Period" */
|
|
72
|
+
periodsLabel?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The sentence under the legend about the hovered, focused or selected day. Return the whole sentence, so it can carry data
|
|
75
|
+
* the heatmap does not hold. Pass `null` to remove the line. The default is date and count only:
|
|
76
|
+
* "Tuesday, March 18: 4 contributions."
|
|
77
|
+
*/
|
|
78
|
+
describeDay?: ((day: ActivityDayDetail) => string) | null;
|
|
79
|
+
/** The detail line when no day is hovered, focused or selected. @default "Hover or select a day for details." */
|
|
80
|
+
detailHint?: string;
|
|
81
|
+
/** Draws the card around it: border, panel radius, surface and padding. Turn it off to place the heatmap inside a card of your own. @default true */
|
|
82
|
+
framed?: boolean;
|
|
83
|
+
/** Shown instead of the grid when there are no days. @default "No activity yet" */
|
|
84
|
+
emptyLabel?: string;
|
|
85
|
+
/** Formatting locale. Fixed by default so server and client render the same labels. @default "en-US" */
|
|
86
|
+
locale?: string;
|
|
87
|
+
/** Extra classes for the root. Merged last. */
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
export declare const ActivityHeatmap: import("react").ForwardRefExoticComponent<ActivityHeatmapProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
91
|
+
//#endregion
|
|
92
|
+
//# sourceMappingURL=activity-heatmap.d.ts.map
|