@alis-build/design-system 0.47.0 → 0.49.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/alisx.css +224 -18
- package/classes.json +35 -0
- package/components/AppAlert.md +1 -1
- package/components/AppAsk.md +2 -2
- package/components/AppButton.md +4 -3
- package/components/AppComposer.md +68 -5
- package/components/AppDialog.md +1 -1
- package/components/AppDisclosure.md +1 -1
- package/components/AppEmptyState.md +1 -1
- package/components/AppIconButton.md +3 -2
- package/components/AppListRow.md +3 -1
- package/components/AppMenu.md +2 -2
- package/components/AppSegmented.md +2 -1
- package/components/AppShell.md +4 -3
- package/components/AppTitleBar.md +3 -2
- package/components/AppTooltip.md +1 -1
- package/components/AppTurn.md +8 -4
- package/components/README.md +1 -1
- package/package.json +1 -1
- package/rules/README.md +1 -0
- package/rules/buttons.md +1 -1
- package/rules/known-gaps.md +6 -0
- package/rules/motion.md +154 -0
- package/rules/page.md +6 -2
- package/rules/quick-start.md +1 -0
- package/rules/styling.md +3 -2
- package/rules/surfaces.md +3 -2
- package/stylelint.mjs +14 -0
- package/tokens.css +33 -0
- package/tokens.json +51 -4
- package/words.json +2 -1
package/stylelint.mjs
CHANGED
|
@@ -53,6 +53,12 @@ const blendedColour =
|
|
|
53
53
|
// system doesn't have. A token's own name (var(--space-12)) is not a length.
|
|
54
54
|
const literalLength = /(?<!--[\w-]*)(?<![\w.])\d*\.?\d+(?:px|r?em|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax|[sld]v[wh])\b/i
|
|
55
55
|
const unknownSpace = new RegExp(`var\\(\\s*--space-(?!(?:${escaped(spaces.map((name) => name.slice('space-'.length)))})\\s*[,)])`)
|
|
56
|
+
// A duration or a curve written out in a transition or an animation: 150ms, .2s,
|
|
57
|
+
// -200ms, calc(…), cubic-bezier(…), steps(…), linear(…), linear, ease-out,
|
|
58
|
+
// step-end. 0s is no motion, not a duration. A token's own name
|
|
59
|
+
// (var(--spring-fast-effects-duration)) is neither.
|
|
60
|
+
const literalDuration = /(?<![\w.-])-?(?!0*\.?0+m?s\b)(?:\d+\.?\d*|\.\d+)m?s\b|\bcalc\(/i
|
|
61
|
+
const literalCurve = /\b(?:cubic-bezier|steps|linear)\(|(?<![\w-])(?:ease(?:-in|-out|-in-out)?|linear|step-start|step-end)(?![\w(-])/i
|
|
56
62
|
|
|
57
63
|
// The parts, exported so an app can add to a rule, or keep one part of it for
|
|
58
64
|
// a file, without losing the rest. Each part has a name, so an app picks it by
|
|
@@ -74,6 +80,14 @@ export const refused = {
|
|
|
74
80
|
values: [blendedColour],
|
|
75
81
|
message: `A role at an alpha or a blend belongs to a drawing (fill, stroke) or the scrim. Elsewhere, name the nearest role (${guide}).`,
|
|
76
82
|
},
|
|
83
|
+
motion: {
|
|
84
|
+
// "Every move is a spring": the timing of a transition or an animation is a
|
|
85
|
+
// spring token, never a duration or a curve of the site's own, and a custom
|
|
86
|
+
// property of the site's that holds one (--fade-duration: 200ms) is the same.
|
|
87
|
+
properties: '/^(?:(?:transition|animation)(?:-duration|-timing-function|-delay)?|--[\\w-]*(?:duration|delay|easing|timing))$/',
|
|
88
|
+
values: [literalDuration, literalCurve],
|
|
89
|
+
message: (property) => `Motion runs on the springs: write ${property} with var(--spring-fast-effects) and its kin, never a duration or a curve of your own (${guide}, rules/motion.md).`,
|
|
90
|
+
},
|
|
77
91
|
spacing: {
|
|
78
92
|
properties: '/^(?:(?:margin|padding|scroll-margin|scroll-padding)(?:-|$)|(?:grid-)?(?:row-|column-)?gap$)/',
|
|
79
93
|
values: [literalLength, unknownSpace],
|
package/tokens.css
CHANGED
|
@@ -181,10 +181,43 @@
|
|
|
181
181
|
--state-pressed: 0.12;
|
|
182
182
|
--state-statement: 0.04;
|
|
183
183
|
--state-dragged: 0.08;
|
|
184
|
+
--spring-fast-spatial: 359ms linear(0, 0.023, 0.084, 0.172, 0.275, 0.386, 0.498, 0.606, 0.705, 0.794, 0.872, 0.936, 0.988, 1.028, 1.058, 1.078, 1.089, 1.094, 1.094, 1.089, 1.082, 1.073, 1.062, 1.052, 1.041, 1.032, 1.023, 1.015, 1.008, 1.003, 0.999, 0.996, 0.993, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.998, 1);
|
|
185
|
+
--spring-fast-spatial-duration: 359ms;
|
|
186
|
+
--spring-fast-spatial-easing: linear(0, 0.023, 0.084, 0.172, 0.275, 0.386, 0.498, 0.606, 0.705, 0.794, 0.872, 0.936, 0.988, 1.028, 1.058, 1.078, 1.089, 1.094, 1.094, 1.089, 1.082, 1.073, 1.062, 1.052, 1.041, 1.032, 1.023, 1.015, 1.008, 1.003, 0.999, 0.996, 0.993, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.998, 1);
|
|
187
|
+
--spring-default-spatial: 435ms linear(0, 0.011, 0.04, 0.083, 0.136, 0.196, 0.259, 0.324, 0.389, 0.453, 0.514, 0.572, 0.626, 0.677, 0.723, 0.765, 0.802, 0.836, 0.866, 0.892, 0.914, 0.934, 0.95, 0.964, 0.976, 0.986, 0.994, 1, 1.005, 1.008, 1.011, 1.013, 1.014, 1.015, 1.015, 1.015, 1.015, 1.014, 1.013, 1.012, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.006, 1.005, 1.004, 1.004, 1.003, 1.002, 1.002, 1.002, 1.001, 1);
|
|
188
|
+
--spring-default-spatial-duration: 435ms;
|
|
189
|
+
--spring-default-spatial-easing: linear(0, 0.011, 0.04, 0.083, 0.136, 0.196, 0.259, 0.324, 0.389, 0.453, 0.514, 0.572, 0.626, 0.677, 0.723, 0.765, 0.802, 0.836, 0.866, 0.892, 0.914, 0.934, 0.95, 0.964, 0.976, 0.986, 0.994, 1, 1.005, 1.008, 1.011, 1.013, 1.014, 1.015, 1.015, 1.015, 1.015, 1.014, 1.013, 1.012, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.006, 1.005, 1.004, 1.004, 1.003, 1.002, 1.002, 1.002, 1.001, 1);
|
|
190
|
+
--spring-slow-spatial: 484ms linear(0, 0.009, 0.032, 0.066, 0.109, 0.157, 0.208, 0.262, 0.316, 0.369, 0.422, 0.472, 0.521, 0.566, 0.609, 0.649, 0.686, 0.721, 0.752, 0.781, 0.807, 0.83, 0.852, 0.871, 0.888, 0.903, 0.916, 0.928, 0.939, 0.948, 0.956, 0.963, 0.969, 0.974, 0.979, 0.983, 0.986, 0.989, 0.992, 0.994, 0.995, 0.997, 0.998, 0.999, 0.999, 1, 1, 1.001, 1.001, 1.001, 1.001, 1.001, 1.002, 1.002, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1);
|
|
191
|
+
--spring-slow-spatial-duration: 484ms;
|
|
192
|
+
--spring-slow-spatial-easing: linear(0, 0.009, 0.032, 0.066, 0.109, 0.157, 0.208, 0.262, 0.316, 0.369, 0.422, 0.472, 0.521, 0.566, 0.609, 0.649, 0.686, 0.721, 0.752, 0.781, 0.807, 0.83, 0.852, 0.871, 0.888, 0.903, 0.916, 0.928, 0.939, 0.948, 0.956, 0.963, 0.969, 0.974, 0.979, 0.983, 0.986, 0.989, 0.992, 0.994, 0.995, 0.997, 0.998, 0.999, 0.999, 1, 1, 1.001, 1.001, 1.001, 1.001, 1.001, 1.002, 1.002, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1);
|
|
193
|
+
--spring-fast-effects: 150ms linear(0, 0.086, 0.253, 0.427, 0.578, 0.697, 0.787, 0.853, 0.899, 0.932, 0.954, 0.969, 0.98, 0.987, 0.991, 0.994, 0.996, 0.998, 0.998, 1);
|
|
194
|
+
--spring-fast-effects-duration: 150ms;
|
|
195
|
+
--spring-fast-effects-easing: linear(0, 0.086, 0.253, 0.427, 0.578, 0.697, 0.787, 0.853, 0.899, 0.932, 0.954, 0.969, 0.98, 0.987, 0.991, 0.994, 0.996, 0.998, 0.998, 1);
|
|
196
|
+
--spring-default-effects: 231ms linear(0, 0.041, 0.134, 0.247, 0.363, 0.472, 0.568, 0.652, 0.722, 0.779, 0.826, 0.864, 0.894, 0.918, 0.936, 0.951, 0.962, 0.971, 0.978, 0.983, 0.987, 0.99, 0.993, 0.994, 0.996, 0.997, 0.998, 0.998, 0.999, 1);
|
|
197
|
+
--spring-default-effects-duration: 231ms;
|
|
198
|
+
--spring-default-effects-easing: linear(0, 0.041, 0.134, 0.247, 0.363, 0.472, 0.568, 0.652, 0.722, 0.779, 0.826, 0.864, 0.894, 0.918, 0.936, 0.951, 0.962, 0.971, 0.978, 0.983, 0.987, 0.99, 0.993, 0.994, 0.996, 0.997, 0.998, 0.998, 0.999, 1);
|
|
199
|
+
--spring-slow-effects: 326ms linear(0, 0.022, 0.075, 0.147, 0.227, 0.31, 0.391, 0.467, 0.537, 0.6, 0.657, 0.707, 0.751, 0.789, 0.822, 0.85, 0.874, 0.895, 0.912, 0.926, 0.939, 0.949, 0.958, 0.965, 0.971, 0.976, 0.98, 0.984, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 1);
|
|
200
|
+
--spring-slow-effects-duration: 326ms;
|
|
201
|
+
--spring-slow-effects-easing: linear(0, 0.022, 0.075, 0.147, 0.227, 0.31, 0.391, 0.467, 0.537, 0.6, 0.657, 0.707, 0.751, 0.789, 0.822, 0.85, 0.874, 0.895, 0.912, 0.926, 0.939, 0.949, 0.958, 0.965, 0.971, 0.976, 0.98, 0.984, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 1);
|
|
184
202
|
--font-sans: "Nunito Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
185
203
|
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
186
204
|
}
|
|
187
205
|
|
|
206
|
+
/* Reduced motion: nothing travels, and the fades stay, so nothing jump-cuts (rules/motion.md). */
|
|
207
|
+
@media (prefers-reduced-motion: reduce) {
|
|
208
|
+
:root {
|
|
209
|
+
--spring-fast-spatial: 0s linear;
|
|
210
|
+
--spring-fast-spatial-duration: 0ms;
|
|
211
|
+
--spring-fast-spatial-easing: linear;
|
|
212
|
+
--spring-default-spatial: 0s linear;
|
|
213
|
+
--spring-default-spatial-duration: 0ms;
|
|
214
|
+
--spring-default-spatial-easing: linear;
|
|
215
|
+
--spring-slow-spatial: 0s linear;
|
|
216
|
+
--spring-slow-spatial-duration: 0ms;
|
|
217
|
+
--spring-slow-spatial-easing: linear;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
188
221
|
/* Themes: light unless asked. data-theme works on any element (rules/themes.md). */
|
|
189
222
|
[data-theme="light"] { color-scheme: light; }
|
|
190
223
|
[data-theme="dark"] { color-scheme: dark; }
|
package/tokens.json
CHANGED
|
@@ -1553,12 +1553,12 @@
|
|
|
1553
1553
|
{
|
|
1554
1554
|
"name": "dur-spatial",
|
|
1555
1555
|
"value": "220ms",
|
|
1556
|
-
"usage": "
|
|
1556
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-spatial."
|
|
1557
1557
|
},
|
|
1558
1558
|
{
|
|
1559
1559
|
"name": "dur-effects",
|
|
1560
1560
|
"value": "160ms",
|
|
1561
|
-
"usage": "
|
|
1561
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-effects."
|
|
1562
1562
|
},
|
|
1563
1563
|
{
|
|
1564
1564
|
"name": "dur-tint",
|
|
@@ -1597,12 +1597,12 @@
|
|
|
1597
1597
|
{
|
|
1598
1598
|
"name": "motion-spatial",
|
|
1599
1599
|
"value": "cubic-bezier(0.2, 0.8, 0.2, 1.15)",
|
|
1600
|
-
"usage": "
|
|
1600
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-spatial."
|
|
1601
1601
|
},
|
|
1602
1602
|
{
|
|
1603
1603
|
"name": "motion-effects",
|
|
1604
1604
|
"value": "cubic-bezier(0.2, 0, 0, 1)",
|
|
1605
|
-
"usage": "
|
|
1605
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-effects."
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
1608
|
"name": "ease-standard",
|
|
@@ -1616,6 +1616,53 @@
|
|
|
1616
1616
|
}
|
|
1617
1617
|
]
|
|
1618
1618
|
},
|
|
1619
|
+
"spring": {
|
|
1620
|
+
"about": "Product motion (rules/motion.md). M3's motion physics: a spring is a stiffness and a damping ratio, never a duration. The generator writes each as --<name> (its duration and a linear() curve drawn from the spring, for a transition or an animation), --<name>-duration and --<name>-easing. Spatial springs move things (position, size, rotation, corners, a reveal); effects springs change colour and opacity and never overshoot. Fast and default spatial come from M3's Expressive scheme, slow spatial from its Standard scheme, so the whole screen never bounces. Under prefers-reduced-motion the spatial springs are 0s and the effects springs stay.",
|
|
1621
|
+
"tokens": [
|
|
1622
|
+
{
|
|
1623
|
+
"name": "spring-fast-spatial",
|
|
1624
|
+
"stiffness": 800,
|
|
1625
|
+
"damping": 0.6,
|
|
1626
|
+
"scheme": "expressive",
|
|
1627
|
+
"usage": "Small things answering a touch in place: a press, a switch's handle, a toggle's glyph, an icon that changes its meaning. Overshoots 9.5%."
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
"name": "spring-default-spatial",
|
|
1631
|
+
"stiffness": 380,
|
|
1632
|
+
"damping": 0.8,
|
|
1633
|
+
"scheme": "expressive",
|
|
1634
|
+
"usage": "Things that cover part of the screen or travel across it: a menu, a dialog, a snackbar, a detail pane, a tab's indicator, a fold opening, a page's 24px shift. Overshoots 1.5%."
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"name": "spring-slow-spatial",
|
|
1638
|
+
"stiffness": 300,
|
|
1639
|
+
"damping": 0.9,
|
|
1640
|
+
"scheme": "standard",
|
|
1641
|
+
"usage": "What fills the screen: the phone's navigation pane. No visible overshoot."
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"name": "spring-fast-effects",
|
|
1645
|
+
"stiffness": 3800,
|
|
1646
|
+
"damping": 1,
|
|
1647
|
+
"scheme": "expressive",
|
|
1648
|
+
"usage": "Colour and opacity on small things, state layers, and everything leaving: a fade out."
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
"name": "spring-default-effects",
|
|
1652
|
+
"stiffness": 1600,
|
|
1653
|
+
"damping": 1,
|
|
1654
|
+
"scheme": "expressive",
|
|
1655
|
+
"usage": "Content fading in: a new page, a tab's panel, a fold's rows, a reply as it streams, a scrim."
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
"name": "spring-slow-effects",
|
|
1659
|
+
"stiffness": 800,
|
|
1660
|
+
"damping": 1,
|
|
1661
|
+
"scheme": "expressive",
|
|
1662
|
+
"usage": "A slow colour change: the tint on a row that just arrived, fading out."
|
|
1663
|
+
}
|
|
1664
|
+
]
|
|
1665
|
+
},
|
|
1619
1666
|
"meta": {
|
|
1620
1667
|
"source": "AlisX design system",
|
|
1621
1668
|
"layers": "palette (literal values, register palette) -> product roles (Material Design 3 role names, kebab-case; register product; a value per theme in values) and narrative roles (alisx.com only, register narrative, one value). Framework-neutral: map the roles into any theme."
|
package/words.json
CHANGED
|
@@ -523,6 +523,7 @@
|
|
|
523
523
|
{ "name": "Share", "means": "Opens Sharing." },
|
|
524
524
|
{ "name": "Request access", "means": "Asks whoever can grant it for a role here, with an optional note (rules/access.md). Afterwards the control reads \"Request sent\" until they decide; a refusal reads \"Declined by …\" with Request again." },
|
|
525
525
|
{ "name": "Request to join", "means": "Asks an account's Admins to let you in, from the account rows sign-up shows for your email's domain. Afterwards it reads \"Request sent\" until an Admin decides, as Request access does." },
|
|
526
|
-
{ "name": "Talk", "means": "Starts a live voice conversation from an empty composer (AppComposer § The trailing button): one word, never \"Talk instead\", \"Talk to Alis\" or \"Voice mode\" on the button. Dictate and Record are the mic's." }
|
|
526
|
+
{ "name": "Talk", "means": "Starts a live voice conversation from an empty composer (AppComposer § The trailing button): one word, never \"Talk instead\", \"Talk to Alis\" or \"Voice mode\" on the button. Dictate and Record are the mic's." },
|
|
527
|
+
{ "name": "Ask Alis", "means": "Opens the docked composer from a page that isn't a conversation: the composer put away, or a selection quoted in its tray (AppComposer § Docked as a way in). Never \"Ask AI\", \"Chat\" or \"Open Alis\"." }
|
|
527
528
|
]
|
|
528
529
|
}
|