@sableui/react 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/DESIGN.md +3 -1
- package/bin/sable-lint.mjs +5 -1
- package/dist/{_contract-CkqXDVww.d.ts → _contract-CDa9-NdB.d.ts} +47 -1
- package/dist/blocks/index.d.ts +12 -1
- package/dist/blocks/index.js +4 -0
- package/dist/blocks/message-reactions-block.js +87 -0
- package/dist/blocks/message-reactions-block.meta.js +23 -0
- package/dist/blocks/wallet-block.js +2 -2
- package/dist/components/app-shell/app-shell-frame.js +16 -0
- package/dist/components/app-shell/app-shell-main.js +12 -0
- package/dist/components/app-shell/app-shell.js +28 -4
- package/dist/components/app-shell/app-shell.meta.js +88 -4
- package/dist/components/area-chart/area-chart.meta.js +6 -1
- package/dist/components/attachment/attachment.meta.js +2 -1
- package/dist/components/attachment/attachment.variants.js +1 -1
- package/dist/components/badge/badge.meta.js +8 -1
- package/dist/components/badge/badge.variants.js +7 -7
- package/dist/components/banner/banner.meta.js +6 -1
- package/dist/components/banner/banner.variants.js +5 -5
- package/dist/components/bar-chart/bar-chart.meta.js +6 -1
- package/dist/components/bubble/bubble.js +105 -5
- package/dist/components/bubble/bubble.meta.js +42 -6
- package/dist/components/bubble/bubble.variants.js +1 -1
- package/dist/components/bubble/index.js +2 -0
- package/dist/components/caret-menu/caret-menu.js +5 -6
- package/dist/components/chat-composer/chat-composer.meta.js +2 -2
- package/dist/components/chat-composer/chat-composer.variants.js +1 -1
- package/dist/components/color-field/color-field.js +6 -8
- package/dist/components/combobox/combobox.js +27 -5
- package/dist/components/combobox/combobox.meta.js +10 -2
- package/dist/components/command-menu/command-menu.js +14 -3
- package/dist/components/command-menu/command-menu.meta.js +9 -1
- package/dist/components/date-picker/date-picker.meta.js +2 -2
- package/dist/components/feedback/feedback.js +9 -2
- package/dist/components/feedback/feedback.meta.js +8 -1
- package/dist/components/gradient-art/gradient-art.js +8 -5
- package/dist/components/gradient-art/gradient-art.meta.js +35 -2
- package/dist/components/input/input.meta.js +11 -3
- package/dist/components/input-group/input-group.js +1 -1
- package/dist/components/input-group/input-group.meta.js +1 -1
- package/dist/components/like-button/index.js +7 -0
- package/dist/components/like-button/like-button.js +89 -0
- package/dist/components/like-button/like-button.meta.js +132 -0
- package/dist/components/line-chart/line-chart.meta.js +6 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/meter/meter.js +53 -7
- package/dist/components/meter/meter.meta.js +51 -4
- package/dist/components/meter/meter.variants.js +43 -7
- package/dist/components/note/note.meta.js +5 -1
- package/dist/components/note/note.variants.js +4 -4
- package/dist/components/number-field/number-field.meta.js +2 -2
- package/dist/components/otp-field/otp-field.meta.js +2 -2
- package/dist/components/panel-group/panel-group.js +5 -8
- package/dist/components/pie-chart/pie-chart.meta.js +6 -1
- package/dist/components/radar-chart/radar-chart.meta.js +6 -1
- package/dist/components/radial-chart/radial-chart.meta.js +6 -1
- package/dist/components/reaction-picker/index.js +13 -0
- package/dist/components/reaction-picker/reaction-picker.js +104 -0
- package/dist/components/reaction-picker/reaction-picker.meta.js +156 -0
- package/dist/components/search-input/search-input.meta.js +11 -3
- package/dist/components/segmented-bar/segmented-bar.meta.js +8 -1
- package/dist/components/segmented-bar/segmented-bar.variants.js +7 -7
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/select.meta.js +2 -2
- package/dist/components/sheet/sheet.js +5 -4
- package/dist/components/sidebar/sidebar.js +16 -1
- package/dist/components/sidebar/sidebar.meta.js +7 -2
- package/dist/components/sparkline/sparkline.meta.js +8 -1
- package/dist/components/status-dot/status-dot.meta.js +8 -1
- package/dist/components/status-dot/status-dot.variants.js +7 -7
- package/dist/components/stepper/stepper.meta.js +2 -1
- package/dist/components/stepper/stepper.variants.js +1 -1
- package/dist/components/table/table.meta.js +4 -4
- package/dist/components/textarea/textarea.js +5 -0
- package/dist/components/textarea/textarea.meta.js +3 -3
- package/dist/components/toast/toast.js +25 -13
- package/dist/components/toast/toast.meta.js +7 -1
- package/dist/file-hashes.json +112 -100
- package/dist/foundations/accessibility.js +5 -0
- package/dist/foundations/motion.js +21 -1
- package/dist/icon-sets/reicon.js +11 -1
- package/dist/index.d.ts +425 -84
- package/dist/index.js +11 -1
- package/dist/lib/chart/types.js +8 -8
- package/dist/lib/chart/use-arrival.js +5 -4
- package/dist/lib/field-shell.js +1 -1
- package/dist/lib/highlight-glide.js +6 -6
- package/dist/lib/scrub-gesture.js +6 -6
- package/dist/lib/taxonomy.js +2 -0
- package/dist/lib/use-caret-trigger.js +11 -18
- package/dist/lib/use-match-highlight.js +69 -0
- package/dist/lib/use-smooth-wheel.js +10 -8
- package/dist/motion/Burst.js +79 -0
- package/dist/motion/index.js +2 -0
- package/dist/presets/index.d.ts +13 -2
- package/dist/presets/index.js +17 -1
- package/dist/styles.css +241 -0
- package/dist/{theme-provider-CdSicAad.d.ts → theme-provider-BydfM5Z0.d.ts} +1 -1
- package/dist/themes/_contract.js +14 -0
- package/dist/themes/atelier/atelier.css +18 -0
- package/dist/themes/atelier/index.d.ts +1 -1
- package/dist/themes/contrast.js +48 -1
- package/dist/themes/ember/ember.css +18 -0
- package/dist/themes/ember/index.d.ts +1 -1
- package/dist/themes/index.d.ts +2 -2
- package/dist/themes/meridian/index.d.ts +1 -1
- package/dist/themes/meridian/meridian.css +18 -0
- package/dist/themes/poppy/index.d.ts +1 -1
- package/dist/themes/poppy/poppy.css +18 -0
- package/dist/themes/prism/index.d.ts +1 -1
- package/dist/themes/prism/prism.css +18 -0
- package/dist/themes/sable/index.d.ts +1 -1
- package/dist/themes/sable/sable.css +18 -0
- package/dist/themes/verdant/index.d.ts +1 -1
- package/dist/themes/verdant/verdant.css +18 -0
- package/llms/blocks/message-reactions-block.md +116 -0
- package/llms/blocks/wallet-block.md +5 -4
- package/llms/components/app-shell.md +72 -3
- package/llms/components/area-chart.md +1 -1
- package/llms/components/attachment.md +1 -1
- package/llms/components/badge.md +1 -1
- package/llms/components/banner.md +1 -1
- package/llms/components/bar-chart.md +1 -1
- package/llms/components/bubble.md +17 -7
- package/llms/components/chat-composer.md +1 -1
- package/llms/components/combobox.md +2 -1
- package/llms/components/command-menu.md +3 -2
- package/llms/components/date-picker.md +1 -1
- package/llms/components/feedback.md +2 -1
- package/llms/components/gradient-art.md +28 -1
- package/llms/components/input-group.md +1 -1
- package/llms/components/input.md +4 -2
- package/llms/components/like-button.md +91 -0
- package/llms/components/line-chart.md +1 -1
- package/llms/components/meter.md +33 -4
- package/llms/components/note.md +1 -1
- package/llms/components/number-field.md +1 -1
- package/llms/components/otp-field.md +1 -1
- package/llms/components/pie-chart.md +1 -1
- package/llms/components/radar-chart.md +1 -1
- package/llms/components/radial-chart.md +1 -1
- package/llms/components/reaction-picker.md +115 -0
- package/llms/components/search-input.md +20 -2
- package/llms/components/segmented-bar.md +1 -1
- package/llms/components/select.md +1 -1
- package/llms/components/sidebar.md +3 -2
- package/llms/components/sparkline.md +1 -1
- package/llms/components/status-dot.md +1 -1
- package/llms/components/stepper.md +1 -1
- package/llms/components/table.md +2 -2
- package/llms/components/textarea.md +2 -2
- package/llms/components/toast.md +2 -1
- package/llms/foundations/accessibility.md +1 -0
- package/llms/foundations/motion.md +18 -2
- package/llms/reference/token-intent.md +22 -2
- package/llms/reference/utilities.md +9 -3
- package/llms-full.txt +596 -61
- package/llms.txt +10 -7
- package/package.json +1 -1
- package/registry.json +968 -68
- package/scripts/lint-rules.mjs +6 -3
- package/targets/ios.json +18 -0
|
@@ -69,6 +69,11 @@ var accessibility = {
|
|
|
69
69
|
why: "The ratio alone passes labels that read muddy. A deliberate brand pair is allowed with a recorded reason (lint disable or preset exceptions).",
|
|
70
70
|
enforcedBy: "sable-lint: label-contrast"
|
|
71
71
|
},
|
|
72
|
+
{
|
|
73
|
+
never: "A label fill painted on a mark that carries no text \u2014 a meter, a segmented bar, a status dot, a chart series, a soft tint.",
|
|
74
|
+
instead: "The colour's `-mark` token (`bg-success-mark`, `bg-tone-warning-mark/15`): the same hue lifted and saturated, held to 2:1 on the page. Text contrast is for text; a graphic owes visibility, and 3:1 (WCAG 1.4.11) only when it is the sole carrier of its meaning.",
|
|
75
|
+
why: "A fill is pinned dark enough for a white label. On a bar or dot with nothing to label, that darkness only reads as mud: a brown warning, a forest-green success."
|
|
76
|
+
},
|
|
72
77
|
{
|
|
73
78
|
never: 'Blocking paste, or type="number" for codes and card numbers.',
|
|
74
79
|
instead: 'type="text" inputMode="numeric" with the right autocomplete.',
|
|
@@ -31,6 +31,8 @@ var motion = {
|
|
|
31
31
|
{ name: "motion-appear", value: "fast fade + base scale", use: "A small control mounting in place: a clear button, a send arrow, a badge. @starting-style, no JS." },
|
|
32
32
|
{ name: "motion-arrive", value: "base \xB7 decelerate \xB7 staggered \xB7 expressive", use: "Items a user action brings into a list: a folder's children on expand, a row just added. Never on every render." },
|
|
33
33
|
{ name: "motion-size", value: "base \xB7 emphasized \xB7 expressive", use: "An element easing between intrinsic sizes when its label changes: a two-step confirm, Copy \u2192 Copied." },
|
|
34
|
+
{ name: "motion-bloom", value: "slower \xB7 0 \u2192 1.2 \u2192 1 \xB7 expressive", use: "A small glyph landing in its on state: a liked heart, a picked rating, a toast's status icon. Remount it (key) to replay; never on the resting state." },
|
|
35
|
+
{ name: "<Burst>", value: "slower ring + thrown dots \xB7 expressive", use: "The follow-through behind a bloom, in the theme's palette families. Only on a choice a person made: a like, a star, a finished task." },
|
|
34
36
|
{ name: "motion-draw", value: "slower \xB7 decelerate", use: 'SVG line art drawing on when a <Reveal> scrolls in. The path needs pathLength="1"; stagger siblings with --motion-draw-delay.' },
|
|
35
37
|
{ name: "motion-spin \xB7 pulse \xB7 shimmer \xB7 dot-bounce \xB7 ping", value: "loops", use: "Activity. Scale-aware, so reduced motion freezes them." }
|
|
36
38
|
]
|
|
@@ -50,7 +52,7 @@ var motion = {
|
|
|
50
52
|
note: "Essential motion answers the user; expressive motion narrates continuity. Expressive durations are also multiplied by --motion-expressive, which `subtle` sets to 0. Each level can only turn motion down from what surrounds it.",
|
|
51
53
|
terms: [
|
|
52
54
|
{ name: "essential", value: "always, unless off", use: "Colour and focus feedback, press, overlay arrival, disclosure height, loaders, chart hover." },
|
|
53
|
-
{ name: "expressive", value: "full only", use: "Glides, rolling numbers (NumberTicker), drawn ticks, shakes, staggers, chart arrival and morph, scroll reveals, spring overshoot." },
|
|
55
|
+
{ name: "expressive", value: "full only", use: "Glides, rolling numbers (NumberTicker), drawn ticks, blooms and bursts, shakes, staggers, chart arrival and morph, scroll reveals, spring overshoot." },
|
|
54
56
|
{ name: "full", value: "default", use: "Both levels play. The crafted default." },
|
|
55
57
|
{ name: "subtle", value: 'data-motion="subtle"', use: "Essential only; nothing overshoots. For dense tools, embedded widgets, readers who want calm without stillness." },
|
|
56
58
|
{ name: "off", value: 'data-motion="off" \xB7 reduce-motion', use: "Nothing moves; every state still changes." },
|
|
@@ -112,6 +114,18 @@ var motion = {
|
|
|
112
114
|
rule: "A state change finishes its story: refused shakes and says why, success confirms in place, armed asks again.",
|
|
113
115
|
why: "Motion that starts a change and leaves the outcome to a snap reads as unfinished. ConfirmButton, OtpField's invalid shake and the copy-to-check swap are the reference cases."
|
|
114
116
|
},
|
|
117
|
+
{
|
|
118
|
+
rule: "Amplitude scales with smallness. A 16px glyph that turns on grows from nothing past its size; a surface travels from 0.96 and a press settles to 0.97.",
|
|
119
|
+
why: "The same 4% that is right for a dialog is invisible on an icon, which is why a state change on a small control used to read as a colour swap with no life in it. A dialog that overshot 20% would lurch. Size, not importance, sets how far a thing moves."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
rule: "Stage a moment: the main object lands first, the follow-through after it.",
|
|
123
|
+
why: "A ring that opens, a glyph that blooms 90ms later, dots thrown 60ms after that read as one event with a cause and an effect. Everything starting on the same frame reads as a flash. LikeButton and the toast's status glyph are the reference cases."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
rule: "Celebrate only what a person chose, and only at full motion.",
|
|
127
|
+
why: "A burst is a reply. On a like it is delight; on a system event, on load, or on every row of a list it is a notification wearing confetti. Under subtle the fill alone answers."
|
|
128
|
+
},
|
|
115
129
|
{
|
|
116
130
|
rule: "Component motion props and MotionScope only turn motion down.",
|
|
117
131
|
why: "`full` on a component means inherit. Nothing below the provider can switch motion back on for a reader who asked for it off."
|
|
@@ -166,6 +180,12 @@ var motion = {
|
|
|
166
180
|
after: '<NumberTicker value={total} format={{ style: "currency", currency: "USD" }} />',
|
|
167
181
|
why: "The digits that changed roll; the ones that did not stay still, so the eye goes straight to the difference."
|
|
168
182
|
},
|
|
183
|
+
{
|
|
184
|
+
title: "A glyph that lands",
|
|
185
|
+
before: '<Icon name="heart" variant={liked ? "solid" : "regular"} />',
|
|
186
|
+
after: "<LikeButton count={likes} defaultPressed={liked} />",
|
|
187
|
+
why: "The heart used to swap fill in one frame. Now it blooms past its size and settles while a ring and dots burst from it, and the count rolls: the same state, told as an event."
|
|
188
|
+
},
|
|
169
189
|
{
|
|
170
190
|
title: "Faster exits",
|
|
171
191
|
before: "transition: opacity 200ms ease-in-out; /* in and out */",
|
package/dist/icon-sets/reicon.js
CHANGED
|
@@ -72,6 +72,9 @@ import { Pause } from "reicon-react/icons/Pause";
|
|
|
72
72
|
import { Play } from "reicon-react/icons/Play";
|
|
73
73
|
import { Previous } from "reicon-react/icons/Previous";
|
|
74
74
|
import { Refresh } from "reicon-react/icons/Refresh";
|
|
75
|
+
import { Restart } from "reicon-react/icons/Restart";
|
|
76
|
+
import { EmojiHappy } from "reicon-react/icons/EmojiHappy";
|
|
77
|
+
import { PlaybackSpeed } from "reicon-react/icons/PlaybackSpeed";
|
|
75
78
|
import { Send } from "reicon-react/icons/Send";
|
|
76
79
|
import { Star } from "reicon-react/icons/Star";
|
|
77
80
|
import { Trash } from "reicon-react/icons/Trash";
|
|
@@ -181,7 +184,14 @@ var ICONS = {
|
|
|
181
184
|
paperclip: Paperclip,
|
|
182
185
|
chart: ChartBar,
|
|
183
186
|
flag: Flag,
|
|
184
|
-
"at-sign": AtSign
|
|
187
|
+
"at-sign": AtSign,
|
|
188
|
+
// Added when the docs' preview controls borrowed `sparkles` (which reads
|
|
189
|
+
// as AI) for a motion level and `refresh` (which reads as fetching again)
|
|
190
|
+
// for watching an animation from its first frame.
|
|
191
|
+
replay: Restart,
|
|
192
|
+
motion: PlaybackSpeed,
|
|
193
|
+
// Added for the add-reaction pill under a chat bubble.
|
|
194
|
+
emoji: EmojiHappy
|
|
185
195
|
};
|
|
186
196
|
var WEIGHTS = {
|
|
187
197
|
regular: "Outline",
|