@felloinnovations/brand-kit 0.4.0 → 0.5.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/AGENTS.md +198 -24
- package/CHANGELOG.md +221 -0
- package/README.md +38 -9
- package/design-system/01-how-claude-decides.md +26 -17
- package/design-system/02-principles.md +11 -6
- package/design-system/03-colour.md +135 -47
- package/design-system/04-type.md +45 -23
- package/design-system/05-space-and-layout.md +175 -52
- package/design-system/06-sizing-profiles.md +4 -4
- package/design-system/07-scrolling.md +66 -20
- package/design-system/08-choosing-components.md +50 -22
- package/design-system/09-charts.md +71 -28
- package/design-system/10-patterns.md +33 -10
- package/design-system/11-page-recipes.md +110 -23
- package/design-system/12-content.md +2 -1
- package/design-system/13-motion.md +330 -47
- package/design-system/14-accessibility.md +47 -24
- package/design-system/15-ai-experiences.md +11 -6
- package/design-system/16-creativity.md +1 -1
- package/design-system/17-decisions.md +367 -1
- package/design-system/18-checklist.md +79 -16
- package/design-system/19-public-pages.md +6 -4
- package/design-system/20-palettes.md +275 -0
- package/design-system/README.md +30 -17
- package/design-system/components/ActionList/README.md +96 -10
- package/design-system/components/ActionList/preview.html +52 -7
- package/design-system/components/ActionList/style.css +64 -0
- package/design-system/components/ActivityGrid/README.md +38 -2
- package/design-system/components/ActivityGrid/preview.html +1 -1
- package/design-system/components/ActivityGrid/style.css +35 -0
- package/design-system/components/AppShell/README.md +205 -75
- package/design-system/components/AppShell/preview.html +339 -58
- package/design-system/components/AppShell/style.css +154 -0
- package/design-system/components/Avatar/README.md +37 -10
- package/design-system/components/Avatar/preview.html +13 -4
- package/design-system/components/Avatar/style.css +14 -0
- package/design-system/components/Badge/README.md +41 -19
- package/design-system/components/Badge/preview.html +13 -10
- package/design-system/components/Badge/style.css +23 -0
- package/design-system/components/Banner/README.md +30 -9
- package/design-system/components/Banner/preview.html +1 -1
- package/design-system/components/Banner/style.css +19 -0
- package/design-system/components/Breadcrumb/README.md +58 -46
- package/design-system/components/Breadcrumb/preview.html +16 -16
- package/design-system/components/Breadcrumb/style.css +17 -0
- package/design-system/components/Button/README.md +113 -55
- package/design-system/components/Button/preview.html +98 -25
- package/design-system/components/Button/style.css +86 -0
- package/design-system/components/Card/README.md +158 -49
- package/design-system/components/Card/preview.html +141 -19
- package/design-system/components/Card/style.css +115 -0
- package/design-system/components/CardBoard/README.md +58 -37
- package/design-system/components/CardBoard/preview.html +26 -29
- package/design-system/components/ChatCard/README.md +115 -29
- package/design-system/components/ChatCard/preview.html +149 -32
- package/design-system/components/ChatCard/style.css +49 -0
- package/design-system/components/ChatShell/README.md +116 -0
- package/design-system/components/ChatShell/preview.html +201 -0
- package/design-system/components/ChatShell/style.css +86 -0
- package/design-system/components/ChatTurn/README.md +78 -35
- package/design-system/components/ChatTurn/preview.html +60 -28
- package/design-system/components/ChatTurn/style.css +50 -0
- package/design-system/components/CheckRow/README.md +141 -0
- package/design-system/components/CheckRow/preview.html +140 -0
- package/design-system/components/CheckRow/style.css +88 -0
- package/design-system/components/Checkbox/README.md +58 -22
- package/design-system/components/Checkbox/preview.html +112 -50
- package/design-system/components/Checkbox/style.css +45 -0
- package/design-system/components/Chip/README.md +78 -47
- package/design-system/components/Chip/preview.html +29 -4
- package/design-system/components/Chip/style.css +17 -0
- package/design-system/components/Combobox/README.md +44 -11
- package/design-system/components/Combobox/preview.html +35 -12
- package/design-system/components/Combobox/style.css +54 -0
- package/design-system/components/Composer/README.md +137 -35
- package/design-system/components/Composer/preview.html +115 -40
- package/design-system/components/Composer/style.css +81 -0
- package/design-system/components/ConfirmDialog/README.md +73 -52
- package/design-system/components/ConfirmDialog/preview.html +70 -26
- package/design-system/components/ConfirmDialog/style.css +5 -0
- package/design-system/components/Cover/preview.html +3 -3
- package/design-system/components/Cover/style.css +19 -0
- package/design-system/components/DateInput/README.md +77 -12
- package/design-system/components/DateInput/preview.html +27 -12
- package/design-system/components/DateInput/style.css +38 -0
- package/design-system/components/Dialog/README.md +112 -44
- package/design-system/components/Dialog/preview.html +141 -18
- package/design-system/components/Dialog/style.css +74 -0
- package/design-system/components/EmptyState/README.md +42 -12
- package/design-system/components/EmptyState/preview.html +11 -11
- package/design-system/components/EmptyState/style.css +9 -0
- package/design-system/components/EntryShell/README.md +73 -48
- package/design-system/components/EntryShell/preview.html +60 -27
- package/design-system/components/EntryShell/style.css +19 -0
- package/design-system/components/FeatureGrid/README.md +61 -39
- package/design-system/components/FeatureGrid/preview.html +2 -2
- package/design-system/components/FeatureGrid/style.css +20 -0
- package/design-system/components/FileUpload/README.md +33 -3
- package/design-system/components/FileUpload/preview.html +18 -4
- package/design-system/components/FileUpload/style.css +23 -0
- package/design-system/components/FilterBar/README.md +114 -0
- package/design-system/components/FilterBar/preview.html +82 -0
- package/design-system/components/FilterBar/style.css +22 -0
- package/design-system/components/Fold/README.md +84 -26
- package/design-system/components/Fold/preview.html +77 -34
- package/design-system/components/Fold/style.css +48 -0
- package/design-system/components/Footer/README.md +62 -39
- package/design-system/components/Footer/preview.html +5 -5
- package/design-system/components/Footer/style.css +30 -0
- package/design-system/components/FunnelBars/README.md +24 -3
- package/design-system/components/FunnelBars/preview.html +5 -5
- package/design-system/components/FunnelBars/style.css +13 -0
- package/design-system/components/GoalBars/README.md +54 -10
- package/design-system/components/GoalBars/preview.html +69 -28
- package/design-system/components/GoalBars/style.css +51 -0
- package/design-system/components/GoalTicks/README.md +74 -58
- package/design-system/components/GoalTicks/preview.html +41 -118
- package/design-system/components/GoalTicks/style.css +37 -0
- package/design-system/components/GoalTubes/README.md +29 -3
- package/design-system/components/GoalTubes/preview.html +6 -6
- package/design-system/components/GoalTubes/style.css +23 -0
- package/design-system/components/Heatmap/README.md +133 -0
- package/design-system/components/Heatmap/preview.html +168 -0
- package/design-system/components/Heatmap/style.css +119 -0
- package/design-system/components/Hero/README.md +58 -40
- package/design-system/components/Hero/preview.html +1 -1
- package/design-system/components/Hero/style.css +19 -0
- package/design-system/components/HoverCard/README.md +114 -0
- package/design-system/components/HoverCard/preview.html +107 -0
- package/design-system/components/HoverCard/style.css +59 -0
- package/design-system/components/IconButton/README.md +69 -38
- package/design-system/components/IconButton/preview.html +77 -43
- package/design-system/components/IconButton/style.css +45 -0
- package/design-system/components/Input/README.md +36 -11
- package/design-system/components/Input/preview.html +1 -1
- package/design-system/components/Input/style.css +23 -0
- package/design-system/components/KanbanBoard/README.md +93 -45
- package/design-system/components/KanbanBoard/preview.html +159 -43
- package/design-system/components/KanbanBoard/style.css +53 -0
- package/design-system/components/Kbd/README.md +25 -9
- package/design-system/components/Kbd/preview.html +6 -2
- package/design-system/components/Kbd/style.css +9 -0
- package/design-system/components/KitButton/README.md +81 -47
- package/design-system/components/KitButton/preview.html +35 -13
- package/design-system/components/KitButton/style.css +46 -0
- package/design-system/components/KitCard/README.md +75 -44
- package/design-system/components/KitCard/preview.html +18 -10
- package/design-system/components/KitCard/style.css +15 -0
- package/design-system/components/KitInput/README.md +54 -39
- package/design-system/components/KitInput/preview.html +7 -7
- package/design-system/components/KitInput/style.css +23 -0
- package/design-system/components/Leaderboard/README.md +76 -49
- package/design-system/components/Leaderboard/preview.html +61 -26
- package/design-system/components/Leaderboard/style.css +44 -0
- package/design-system/components/ListDetail/README.md +222 -0
- package/design-system/components/ListDetail/preview.html +213 -0
- package/design-system/components/ListDetail/style.css +148 -0
- package/design-system/components/LoadBar/README.md +79 -0
- package/design-system/components/LoadBar/preview.html +40 -0
- package/design-system/components/LoadBar/style.css +17 -0
- package/design-system/components/MarketingNav/README.md +76 -42
- package/design-system/components/MarketingNav/preview.html +37 -8
- package/design-system/components/MarketingNav/style.css +45 -0
- package/design-system/components/Matrix/README.md +129 -0
- package/design-system/components/Matrix/preview.html +99 -0
- package/design-system/components/Matrix/style.css +84 -0
- package/design-system/components/Menu/README.md +117 -41
- package/design-system/components/Menu/preview.html +85 -23
- package/design-system/components/Menu/style.css +61 -0
- package/design-system/components/Meter/README.md +39 -4
- package/design-system/components/Meter/preview.html +18 -1
- package/design-system/components/Meter/style.css +23 -0
- package/design-system/components/MetricTile/README.md +237 -0
- package/design-system/components/MetricTile/preview.html +241 -0
- package/design-system/components/MetricTile/style.css +129 -0
- package/design-system/components/Morph/README.md +106 -0
- package/design-system/components/Morph/preview.html +103 -0
- package/design-system/components/Morph/style.css +31 -0
- package/design-system/components/Motion/README.md +164 -0
- package/design-system/components/Motion/preview.html +2537 -0
- package/design-system/components/NumberInput/README.md +27 -8
- package/design-system/components/NumberInput/preview.html +21 -5
- package/design-system/components/NumberInput/style.css +34 -0
- package/design-system/components/PaceBar/README.md +75 -0
- package/design-system/components/PaceBar/preview.html +67 -0
- package/design-system/components/PaceBar/style.css +25 -0
- package/design-system/components/Page/README.md +57 -18
- package/design-system/components/Page/preview.html +15 -17
- package/design-system/components/Page/style.css +7 -0
- package/design-system/components/PageBar/README.md +90 -34
- package/design-system/components/PageBar/preview.html +60 -19
- package/design-system/components/PageBar/style.css +35 -0
- package/design-system/components/PageHero/README.md +87 -51
- package/design-system/components/PageHero/preview.html +35 -6
- package/design-system/components/PageHero/style.css +31 -0
- package/design-system/components/Pagination/README.md +70 -49
- package/design-system/components/Pagination/preview.html +24 -15
- package/design-system/components/Pagination/style.css +12 -0
- package/design-system/components/Panel/README.md +109 -51
- package/design-system/components/Panel/preview.html +118 -20
- package/design-system/components/Panel/style.css +51 -0
- package/design-system/components/PasswordInput/README.md +50 -18
- package/design-system/components/PasswordInput/preview.html +71 -21
- package/design-system/components/PasswordInput/style.css +31 -0
- package/design-system/components/Plate/README.md +75 -17
- package/design-system/components/Plate/preview.html +40 -7
- package/design-system/components/Plate/style.css +37 -0
- package/design-system/components/Popover/README.md +70 -49
- package/design-system/components/Popover/preview.html +44 -22
- package/design-system/components/Popover/style.css +41 -0
- package/design-system/components/PricingTable/README.md +69 -49
- package/design-system/components/PricingTable/preview.html +21 -21
- package/design-system/components/PricingTable/style.css +21 -0
- package/design-system/components/ProgressPetals/README.md +31 -3
- package/design-system/components/ProgressPetals/preview.html +14 -15
- package/design-system/components/ProgressPetals/style.css +27 -0
- package/design-system/components/README.md +151 -0
- package/design-system/components/Radio/README.md +40 -17
- package/design-system/components/Radio/preview.html +16 -1
- package/design-system/components/Radio/style.css +21 -0
- package/design-system/components/RankBar/README.md +29 -2
- package/design-system/components/RankBar/preview.html +14 -12
- package/design-system/components/RankBar/style.css +18 -0
- package/design-system/components/Ring/README.md +61 -11
- package/design-system/components/Ring/preview.html +55 -10
- package/design-system/components/Ring/style.css +49 -0
- package/design-system/components/ScoreHero/README.md +91 -0
- package/design-system/components/ScoreHero/preview.html +104 -0
- package/design-system/components/ScoreHero/style.css +32 -0
- package/design-system/components/Section/README.md +72 -33
- package/design-system/components/Section/preview.html +46 -16
- package/design-system/components/Section/style.css +18 -0
- package/design-system/components/Segmented/README.md +100 -55
- package/design-system/components/Segmented/preview.html +107 -26
- package/design-system/components/Segmented/style.css +94 -0
- package/design-system/components/SegmentedProgress/README.md +64 -0
- package/design-system/components/SegmentedProgress/preview.html +69 -0
- package/design-system/components/SegmentedProgress/style.css +11 -0
- package/design-system/components/Select/README.md +47 -12
- package/design-system/components/Select/preview.html +28 -2
- package/design-system/components/Select/style.css +22 -0
- package/design-system/components/ShareBar/README.md +69 -0
- package/design-system/components/ShareBar/preview.html +72 -0
- package/design-system/components/ShareBar/style.css +25 -0
- package/design-system/components/SideList/README.md +147 -0
- package/design-system/components/SideList/preview.html +139 -0
- package/design-system/components/SideList/style.css +94 -0
- package/design-system/components/Skeleton/README.md +53 -16
- package/design-system/components/Skeleton/preview.html +35 -23
- package/design-system/components/Skeleton/style.css +17 -0
- package/design-system/components/Slider/README.md +95 -0
- package/design-system/components/Slider/preview.html +49 -0
- package/design-system/components/Slider/style.css +13 -0
- package/design-system/components/Split/README.md +112 -0
- package/design-system/components/Split/preview.html +105 -0
- package/design-system/components/Split/style.css +30 -0
- package/design-system/components/Starter/README.md +21 -9
- package/design-system/components/Starter/preview.html +5 -5
- package/design-system/components/Stat/README.md +64 -43
- package/design-system/components/Stat/preview.html +3 -3
- package/design-system/components/Stat/style.css +15 -0
- package/design-system/components/StatTiles/README.md +88 -44
- package/design-system/components/StatTiles/preview.html +142 -71
- package/design-system/components/StatTiles/style.css +64 -0
- package/design-system/components/StatusLine/README.md +85 -0
- package/design-system/components/StatusLine/preview.html +49 -0
- package/design-system/components/StatusLine/style.css +14 -0
- package/design-system/components/StatusScreen/README.md +49 -35
- package/design-system/components/StatusScreen/preview.html +20 -5
- package/design-system/components/StatusScreen/style.css +9 -0
- package/design-system/components/StepLine/README.md +97 -0
- package/design-system/components/StepLine/preview.html +108 -0
- package/design-system/components/StepLine/style.css +62 -0
- package/design-system/components/Stepper/README.md +35 -13
- package/design-system/components/Stepper/style.css +13 -0
- package/design-system/components/StreakCalendar/README.md +22 -1
- package/design-system/components/StreakCalendar/preview.html +10 -10
- package/design-system/components/StreakCalendar/style.css +12 -0
- package/design-system/components/SuggestionChip/README.md +87 -0
- package/design-system/components/SuggestionChip/preview.html +42 -0
- package/design-system/components/SuggestionChip/style.css +20 -0
- package/design-system/components/Switch/README.md +44 -24
- package/design-system/components/Switch/preview.html +23 -8
- package/design-system/components/Switch/style.css +31 -0
- package/design-system/components/Table/README.md +129 -58
- package/design-system/components/Table/preview.html +106 -72
- package/design-system/components/Table/style.css +104 -0
- package/design-system/components/Tabs/README.md +71 -46
- package/design-system/components/Tabs/preview.html +56 -24
- package/design-system/components/Tabs/style.css +44 -0
- package/design-system/components/Testimonial/README.md +48 -32
- package/design-system/components/Testimonial/preview.html +14 -14
- package/design-system/components/Testimonial/style.css +12 -0
- package/design-system/components/TextArea/README.md +27 -11
- package/design-system/components/TextArea/preview.html +8 -2
- package/design-system/components/TextArea/style.css +12 -0
- package/design-system/components/ThemeSwitch/README.md +116 -0
- package/design-system/components/ThemeSwitch/preview.html +57 -0
- package/design-system/components/ThemeSwitch/style.css +6 -0
- package/design-system/components/TickRow/README.md +52 -36
- package/design-system/components/TickRow/preview.html +64 -41
- package/design-system/components/TickRow/style.css +23 -0
- package/design-system/components/TickStrip/README.md +95 -0
- package/design-system/components/TickStrip/preview.html +88 -0
- package/design-system/components/TickStrip/style.css +42 -0
- package/design-system/components/Tile/README.md +79 -18
- package/design-system/components/Tile/preview.html +91 -40
- package/design-system/components/Tile/style.css +36 -0
- package/design-system/components/Timeline/README.md +68 -48
- package/design-system/components/Timeline/preview.html +27 -15
- package/design-system/components/Timeline/style.css +25 -0
- package/design-system/components/Toast/README.md +70 -38
- package/design-system/components/Toast/preview.html +43 -8
- package/design-system/components/Toast/style.css +25 -0
- package/design-system/components/Tooltip/README.md +93 -35
- package/design-system/components/Tooltip/preview.html +69 -15
- package/design-system/components/Tooltip/style.css +78 -0
- package/design-system/components/TopBar/README.md +67 -53
- package/design-system/components/TopBar/preview.html +14 -27
- package/design-system/components/TopBar/style.css +35 -0
- package/design-system/components/TopicRail/README.md +108 -0
- package/design-system/components/TopicRail/preview.html +58 -0
- package/design-system/components/TopicRail/style.css +48 -0
- package/design-system/components/TrendBars/README.md +52 -14
- package/design-system/components/TrendBars/preview.html +65 -32
- package/design-system/components/TrendBars/style.css +25 -0
- package/design-system/components/TrendLine/README.md +164 -0
- package/design-system/components/TrendLine/preview.html +373 -0
- package/design-system/components/TrendLine/style.css +155 -0
- package/design-system/components/Well/README.md +64 -22
- package/design-system/components/Well/preview.html +14 -14
- package/design-system/components/Well/style.css +22 -0
- package/design-system/components/_house.css +324 -0
- package/design-system/components/bundle.css +4086 -744
- package/design-system/tokens.json +1310 -124
- package/dist/fello-core.css +2 -2
- package/dist/fello.css +6 -1369
- package/dist/fello.scoped.css +7 -0
- package/dist/index.d.ts +109 -10
- package/dist/index.js +781 -96
- package/dist/palettes.d.ts +464 -0
- package/dist/palettes.js +497 -0
- package/dist/scoped.d.ts +3 -0
- package/dist/scoped.js +16 -0
- package/dist/toast.d.ts +14 -0
- package/dist/toast.js +33 -29
- package/dist/tokens.d.ts +1686 -62
- package/dist/tokens.js +1668 -61
- package/package.json +20 -4
- package/scripts/check-palette.mjs +295 -0
- package/scripts/token-model.mjs +552 -0
- package/tokens/_dark.css +173 -0
- package/tokens/_palettes.css +46 -0
- package/tokens/_product.css +266 -53
- package/tokens/_source.hubl.css +39 -19
- package/tokens/design-tokens.json +319 -0
- package/tokens/palettes.ts +504 -0
- package/tokens/shadcn-compat.css +19 -19
- package/tokens/shadcn-compat.hsl.css +76 -0
- package/tokens/tokens.css +1287 -62
- package/tokens/tokens.md +587 -61
- package/tokens/tokens.root.css +1293 -62
- package/tokens/tokens.ts +1677 -64
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* ---- TrendLine: a value over periods as a line with its dots and the area under it, or as columns (--bars); the
|
|
2
|
+
columns collapse into the line's points and back (North's revenue chart and its Bars / Line toggle) ---- */
|
|
3
|
+
/* A plot 224 tall (the grid; 24 of head room above it for a reference's label, the period names under it) beside a
|
|
4
|
+
40 px value gutter, 12 before the plot. Data is positions: --n (the periods) on the figure, and on each point its
|
|
5
|
+
place --i (0 to n - 1) and its value --y as a percentage of the plot from the top. The line and its area are one
|
|
6
|
+
SVG stretched over the plot (viewBox 0 0 100 100, strokes that never scale) and a hatched box clipped to the area
|
|
7
|
+
(clip-path: polygon(...) in the same percentages); a point is an HTML slot whose ::before is the column and ::after
|
|
8
|
+
the dot, so nothing is distorted at any width. Point i sits at x = (i + 0.5) / n of the plot. */
|
|
9
|
+
.ws-trend-line { --ws-trend-line-tone: var(--tone, var(--color-text-heading)); --ws-trend-line-h: calc(var(--space-9xl) + var(--space-lg)); --ws-trend-line-dot: var(--space-xs); --ws-trend-line-hit: var(--space-sm); --ws-trend-line-col: 48%; --ws-trend-line-ring: calc(var(--ws-hairline) * 3); --ws-trend-line-room: var(--space-xxs); container: ws-trend-line / inline-size; margin: 0; }
|
|
10
|
+
.ws-trend-line__plot { display: grid; grid-template-columns: var(--ws-trend-line-y, var(--space-2xl)) minmax(0, 1fr); grid-template-rows: var(--ws-trend-line-h) auto; column-gap: var(--space-sm); padding-top: var(--space-lg); }
|
|
11
|
+
.ws-trend-line__y { position: relative; grid-area: 1 / 1; min-width: 0; }
|
|
12
|
+
.ws-trend-line__y > span { position: absolute; right: 0; top: var(--y); translate: 0 -50%; font-size: var(--ws-text-micro); line-height: var(--space-sm-plus); color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
13
|
+
/* The plot: a size container, so a column can cut itself at the grid's lines (100cqh is the plot's height), and its own layer, so the band sits under the marks and over the card. The baseline
|
|
14
|
+
is its bottom edge, a shade darker than the grid. */
|
|
15
|
+
.ws-trend-line__area { position: relative; isolation: isolate; grid-area: 1 / 2; min-width: 0; container-type: size; border-bottom: var(--ws-hairline) solid var(--ws-edge-card); }
|
|
16
|
+
.ws-trend-line__rule { position: absolute; left: 0; right: 0; top: var(--y); border-top: var(--ws-hairline) solid var(--ws-edge-slot); }
|
|
17
|
+
/* A reference (a plan, a target): a 1 px dotted salmon line across the plot, its words 4 above it at the left, in the
|
|
18
|
+
salmon's AA word. */
|
|
19
|
+
.ws-trend-line__ref { position: absolute; left: 0; right: 0; top: var(--y); height: var(--ws-line); translate: 0 -50%; background: repeating-linear-gradient(90deg, var(--ws-chart-under-half) 0 var(--ws-line), transparent 0 calc(var(--ws-line) * 3)); transform-origin: left; }
|
|
20
|
+
.ws-trend-line__ref > span { position: absolute; left: 0; bottom: calc(100% + var(--space-xxs)); font-size: var(--ws-text-micro); font-weight: 600; line-height: var(--space-sm-plus); color: var(--ws-word-needs); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
21
|
+
/* The line and the area under it, in one box that the draw reveals left to right (4 of room above and below, so a point
|
|
22
|
+
on the grid's top or bottom keeps its whole stroke). */
|
|
23
|
+
.ws-trend-line__draw { position: absolute; inset: calc(var(--ws-trend-line-room) * -1) 0; clip-path: inset(0); pointer-events: none; }
|
|
24
|
+
.ws-trend-line__hatch, .ws-trend-line__lines { position: absolute; inset: var(--ws-trend-line-room) 0; width: 100%; height: calc(100% - var(--ws-trend-line-room) * 2); }
|
|
25
|
+
/* The area: hairlines every 4, in the line's tone at 45% (North's). A 1x screen cannot draw half a pixel in a gradient
|
|
26
|
+
(it drops it), so there the line is 1 px at half the strength, the same weight to the eye. */
|
|
27
|
+
.ws-trend-line__hatch { --ws-trend-line-hatch: color-mix(in srgb, var(--ws-trend-line-tone) 45%, transparent); --ws-trend-line-hatch-w: var(--ws-hairline); background: repeating-linear-gradient(90deg, var(--ws-trend-line-hatch) 0 var(--ws-trend-line-hatch-w), transparent 0 var(--space-xxs)); }
|
|
28
|
+
@media (max-resolution: 1.49dppx) { .ws-trend-line__hatch { --ws-trend-line-hatch: color-mix(in srgb, var(--ws-trend-line-tone) 22%, transparent); --ws-trend-line-hatch-w: var(--ws-line); } }
|
|
29
|
+
.ws-trend-line__lines { overflow: visible; }
|
|
30
|
+
.ws-trend-line__lines path { fill: none; stroke: var(--ws-trend-line-tone); stroke-width: var(--ws-chart-line); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
|
|
31
|
+
/* What is still to come (a projection): a dotted 1 px line. */
|
|
32
|
+
.ws-trend-line__lines .ws-trend-line__ahead { stroke-width: var(--ws-line); stroke-dasharray: 0.1 calc(var(--ws-hairline) * 5); }
|
|
33
|
+
/* A point: its period's slot, from 12 above its value (the pointer's room) to the baseline. The column (::before) runs
|
|
34
|
+
from the value to the baseline, its corners 1 px, cut by the grid's lines (set --ticks on the figure to the number of
|
|
35
|
+
even steps the grid has; 1 cuts only at the top line); the dot (::after) is 8 on the value, ringed in the ground so the
|
|
36
|
+
line parts round it. A column is never under 2 px, so a zero still shows. */
|
|
37
|
+
.ws-trend-line__point { --ws-trend-line-mark: var(--ws-trend-line-tone); position: absolute; top: calc(var(--y) - var(--ws-trend-line-hit)); bottom: 0; left: calc(100% * var(--i) / var(--n)); width: calc(100% / var(--n)); }
|
|
38
|
+
.ws-trend-line__point--now { --ws-trend-line-mark: var(--tone-now, var(--ws-chart-navy-light)); }
|
|
39
|
+
.ws-trend-line__point::before { content: ""; position: absolute; left: 50%; top: calc(var(--ws-trend-line-hit) - var(--ws-trend-line-dot) / 2); bottom: 0; width: var(--ws-trend-line-col); translate: -50% 0; background: repeating-linear-gradient(to top, var(--ws-trend-line-mark) 0 calc(100cqh / var(--ticks, 1) - var(--ws-hairline)), transparent 0 calc(100cqh / var(--ticks, 1))); transform-origin: bottom; clip-path: inset(0 max(0px, 50% - var(--ws-trend-line-dot) / 2) max(0px, 100% - var(--ws-trend-line-dot)) round calc(var(--ws-trend-line-dot) / 2)); opacity: 0; }
|
|
40
|
+
.ws-trend-line__point::after { content: ""; position: absolute; left: 50%; top: var(--ws-trend-line-hit); width: var(--ws-trend-line-dot); height: var(--ws-trend-line-dot); box-sizing: border-box; translate: -50% -50%; border-radius: var(--radius-full); background: var(--ws-trend-line-mark); box-shadow: 0 0 0 var(--ws-trend-line-ring) var(--color-bg-page), 0 0 0 var(--space-xxs-plus) transparent; }
|
|
41
|
+
/* A period to come: an outline in dashes, the ground inside; its dot hollow. */
|
|
42
|
+
/* An outline cannot collapse into a dot (a clip cuts its sides away), so a column to come keeps its shape and fades. */
|
|
43
|
+
.ws-trend-line__point--ahead::before { top: var(--ws-trend-line-hit); box-sizing: border-box; border: var(--ws-line) dashed var(--ws-trend-line-tone); border-bottom: 0; background: none; clip-path: inset(0 round var(--ws-radius-bar) var(--ws-radius-bar) 0 0); }
|
|
44
|
+
.ws-trend-line__point--ahead::after { border: var(--ws-line) dashed var(--ws-trend-line-tone); background: var(--color-bg-page); }
|
|
45
|
+
/* Columns (--bars): the column whole, the dot gone into its top. */
|
|
46
|
+
.ws-trend-line--bars .ws-trend-line__point::before { clip-path: inset(min(calc(var(--ws-trend-line-dot) / 2), calc(100% - var(--ws-ring))) 0 0 round var(--ws-radius-bar) var(--ws-radius-bar) 0 0); opacity: 1; }
|
|
47
|
+
.ws-trend-line--bars .ws-trend-line__point--ahead::before { clip-path: inset(0 round var(--ws-radius-bar) var(--ws-radius-bar) 0 0); }
|
|
48
|
+
.ws-trend-line--bars .ws-trend-line__point::after { opacity: 0; scale: 0.4; }
|
|
49
|
+
.ws-trend-line--bars .ws-trend-line__draw { clip-path: inset(0 100% 0 0); }
|
|
50
|
+
|
|
51
|
+
/* The hover band (North's "Chart column highlight slide", .32 s soft): one box that slides to the period under the
|
|
52
|
+
pointer or the focus (CSS anchor positioning; the app sets __point--on for a tap or a keyboard mark). Columns: a navy
|
|
53
|
+
wash the slot wide and the plot tall, the other columns step back to --ws-dim. Line: a dashed guide from the dot to the
|
|
54
|
+
baseline, and the dot grows (North's r .2 s) inside a faint halo. Without anchor positioning the band is left out;
|
|
55
|
+
the rest still happens. */
|
|
56
|
+
.ws-trend-line__band { position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 0; opacity: 0; pointer-events: none; background: linear-gradient(var(--ws-trend-line-tone), var(--ws-trend-line-tone)) center / var(--ws-hairline) 100% no-repeat; }
|
|
57
|
+
.ws-trend-line--bars .ws-trend-line__band { border-radius: var(--ws-radius-row); background: var(--ws-hover); }
|
|
58
|
+
@supports (anchor-name: --a) {
|
|
59
|
+
.ws-trend-line__area { anchor-scope: --ws-trend-line-at; }
|
|
60
|
+
.ws-trend-line__point:is(:focus-visible, .ws-trend-line__point--on) { anchor-name: --ws-trend-line-at; }
|
|
61
|
+
.ws-trend-line__band { position-anchor: --ws-trend-line-at; left: anchor(left); right: anchor(right); width: auto; top: calc(anchor(top) + var(--ws-trend-line-hit)); background: repeating-linear-gradient(to bottom, var(--ws-trend-line-tone) 0 var(--ws-ring), transparent 0 calc(var(--ws-ring) * 2)) center / var(--ws-line) 100% no-repeat; }
|
|
62
|
+
.ws-trend-line--bars .ws-trend-line__band { top: 0; background: var(--ws-hover); }
|
|
63
|
+
.ws-trend-line__area:has(> .ws-trend-line__point:is(:focus-visible, .ws-trend-line__point--on)) > .ws-trend-line__band { opacity: 1; }
|
|
64
|
+
}
|
|
65
|
+
.ws-trend-line__point:is(:focus-visible, .ws-trend-line__point--on)::after { transform: scale(1.5); box-shadow: 0 0 0 var(--ws-trend-line-ring) var(--color-bg-page), 0 0 0 var(--space-xxs-plus) color-mix(in srgb, var(--ws-trend-line-mark) 12%, transparent); }
|
|
66
|
+
.ws-trend-line--bars .ws-trend-line__area:has(> .ws-trend-line__point:is(:focus-visible, .ws-trend-line__point--on)) > .ws-trend-line__point:not(:focus-visible, .ws-trend-line__point--on)::before { opacity: var(--ws-dim); }
|
|
67
|
+
@media (hover: hover) {
|
|
68
|
+
@supports (anchor-name: --a) {
|
|
69
|
+
.ws-trend-line__point:hover { anchor-name: --ws-trend-line-at; }
|
|
70
|
+
.ws-trend-line__area:has(> .ws-trend-line__point:hover) > .ws-trend-line__band { opacity: 1; }
|
|
71
|
+
}
|
|
72
|
+
.ws-trend-line__point:hover::after { transform: scale(1.5); box-shadow: 0 0 0 var(--ws-trend-line-ring) var(--color-bg-page), 0 0 0 var(--space-xxs-plus) color-mix(in srgb, var(--ws-trend-line-mark) 12%, transparent); }
|
|
73
|
+
.ws-trend-line--bars .ws-trend-line__area:has(> .ws-trend-line__point:hover) > .ws-trend-line__point:not(:hover)::before { opacity: var(--ws-dim); }
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* The period names: one cell a period, centred on its point, 11 / 14 muted, cut with an ellipsis where a name is wider
|
|
77
|
+
than its slot (give it a title; the table holds the whole words); the current one (__now) 600 navy. A narrow figure
|
|
78
|
+
(under 30rem) is 200 tall; with more than six names, every other one and the current one's neighbours give way, and
|
|
79
|
+
the names that show take two slots. */
|
|
80
|
+
.ws-trend-line__x { grid-area: 2 / 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-top: var(--space-xxs-plus); }
|
|
81
|
+
.ws-trend-line__x > span { min-width: 0; overflow: hidden; font-size: var(--ws-text-micro); line-height: var(--space-sm-plus); color: var(--color-text-muted); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
|
|
82
|
+
.ws-trend-line__x > .ws-trend-line__now { font-weight: 600; color: var(--color-text-heading); }
|
|
83
|
+
/* The key, centred under the plot, 16 apart: a 12 px swatch in the mark's look, 8, 14 / 20 medium words. */
|
|
84
|
+
.ws-trend-line__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xxs) var(--space-md); margin: 0; padding: var(--space-md) 0 0; list-style: none; font-size: var(--ws-text-body); font-weight: 500; line-height: var(--ws-leading-row); color: var(--color-text-body); }
|
|
85
|
+
.ws-trend-line__legend > li { display: inline-flex; align-items: center; gap: var(--space-xs); }
|
|
86
|
+
.ws-trend-line__legend > li::before { content: ""; flex-shrink: 0; box-sizing: border-box; width: var(--space-sm); height: var(--space-sm); border-radius: var(--ws-radius-chip); background: var(--ws-trend-line-tone); }
|
|
87
|
+
.ws-trend-line__legend > .ws-trend-line__key--now::before { background: var(--tone-now, var(--ws-chart-navy-light)); }
|
|
88
|
+
.ws-trend-line__legend > .ws-trend-line__key--ahead::before { border: var(--ws-line) dashed var(--ws-trend-line-tone); background: none; }
|
|
89
|
+
.ws-trend-line__legend > .ws-trend-line__key--ref::before { width: var(--space-md); height: var(--ws-line); border-radius: 0; background: repeating-linear-gradient(90deg, var(--ws-chart-under-half) 0 var(--ws-line), transparent 0 calc(var(--ws-line) * 3)); }
|
|
90
|
+
/* The reading, for a screen reader: a real table of every period and its value (the plot itself is hidden from it), in
|
|
91
|
+
a box that hides it from the eye (a table never shrinks below its words, so the box holds it). */
|
|
92
|
+
.ws-trend-line__table { position: absolute; width: var(--ws-line); height: var(--ws-line); overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
93
|
+
|
|
94
|
+
@container ws-trend-line (max-width: 30rem) {
|
|
95
|
+
.ws-trend-line__plot { grid-template-rows: min(var(--ws-trend-line-h), var(--space-9xl)) auto; }
|
|
96
|
+
.ws-trend-line__x:has(> :nth-child(7)) > :is(:nth-child(even), :has(+ .ws-trend-line__now), .ws-trend-line__now + *) { visibility: hidden; }
|
|
97
|
+
.ws-trend-line__x:has(> :nth-child(7)) > .ws-trend-line__now { visibility: visible; }
|
|
98
|
+
/* a name that shows has its hidden neighbours' halves too: two slots, centred on its own */
|
|
99
|
+
.ws-trend-line__x:has(> :nth-child(7)) > span { margin-inline: -50%; }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* --bare: the drawing alone, for a tile's preview (MetricTile __preview, 24 tall): no gutter, names, rules or key; a
|
|
103
|
+
1 px line, 4 px dots (the current one 6), columns 84% of their slot with 2 px corners. */
|
|
104
|
+
.ws-trend-line--bare { --ws-trend-line-h: var(--space-lg); --ws-trend-line-dot: var(--space-xxs); --ws-trend-line-hit: 0px; --ws-trend-line-col: 84%; --ws-trend-line-ring: var(--ws-hairline); flex: 1; min-width: 0; }
|
|
105
|
+
.ws-trend-line--bare .ws-trend-line__plot { grid-template-columns: minmax(0, 1fr); padding: 0; }
|
|
106
|
+
.ws-trend-line--bare .ws-trend-line__area { grid-column: 1; border-bottom: 0; }
|
|
107
|
+
.ws-trend-line--bare :is(.ws-trend-line__y, .ws-trend-line__x, .ws-trend-line__legend, .ws-trend-line__rule, .ws-trend-line__band) { display: none; }
|
|
108
|
+
.ws-trend-line--bare .ws-trend-line__lines path { stroke-width: var(--ws-line); }
|
|
109
|
+
.ws-trend-line--bare .ws-trend-line__point--now { --ws-trend-line-dot: var(--space-xxs-plus); }
|
|
110
|
+
.ws-trend-line--bare.ws-trend-line--bars .ws-trend-line__point::before { clip-path: inset(min(calc(var(--ws-trend-line-dot) / 2), calc(100% - var(--ws-ring))) 0 0 round var(--ws-radius-chip) var(--ws-radius-chip) 0 0); }
|
|
111
|
+
|
|
112
|
+
/* Motion (D7, North). Nothing here runs under reduced motion: every part is in its final place at once.
|
|
113
|
+
The morph (North "Bars to line morph", the morph-chart spring .85 / .06): to the line, every column collapses into its
|
|
114
|
+
top at once on the spring while the line and its area draw left to right over the draw (900 ms, one linear
|
|
115
|
+
progress); the dots pop on the columns' remains after the settle (320 ms), when the columns are nearly dots, so the
|
|
116
|
+
spring's small overshoot (a column shrinks past its dot for a moment) is never seen. Back to columns, the dots go at
|
|
117
|
+
once, the line undraws right to left over the settle and each column grows back down from its dot on the spring. The same element all the way, so a switch
|
|
118
|
+
midway picks up from where it is. */
|
|
119
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
120
|
+
.ws-trend-line__point::before { transition: clip-path var(--ws-spring-morph-chart-duration) var(--ws-spring-morph-chart), opacity var(--ws-duration-hover) var(--ws-ease-soft) var(--ws-duration-settle); }
|
|
121
|
+
.ws-trend-line__point::after { transition: opacity var(--ws-duration-hover) var(--ws-ease-soft) var(--ws-duration-settle), scale var(--ws-duration-settle) var(--ws-ease-pop) var(--ws-duration-settle), transform var(--ws-duration-hover) var(--ws-ease-soft), box-shadow var(--ws-duration-hover) var(--ws-ease-soft); }
|
|
122
|
+
.ws-trend-line__draw { transition: clip-path var(--ws-duration-draw) var(--ws-ease-steady); }
|
|
123
|
+
.ws-trend-line--bars .ws-trend-line__point::before { transition: clip-path var(--ws-spring-morph-chart-duration) var(--ws-spring-morph-chart), opacity var(--ws-duration-hover) var(--ws-ease-soft); }
|
|
124
|
+
.ws-trend-line--bars .ws-trend-line__point::after { transition: opacity var(--ws-duration-exit) var(--ws-ease-exit), scale var(--ws-duration-exit) var(--ws-ease-exit), transform var(--ws-duration-hover) var(--ws-ease-soft), box-shadow var(--ws-duration-hover) var(--ws-ease-soft); }
|
|
125
|
+
.ws-trend-line--bars .ws-trend-line__draw { transition: clip-path var(--ws-duration-settle) var(--ws-ease-soft); }
|
|
126
|
+
.ws-trend-line .ws-trend-line__point--ahead::before { transition: opacity var(--ws-duration-hover) var(--ws-ease-soft); }
|
|
127
|
+
.ws-trend-line__band { transition: left var(--ws-duration-settle) var(--ws-ease-soft), right var(--ws-duration-settle) var(--ws-ease-soft), top var(--ws-duration-settle) var(--ws-ease-soft), opacity var(--ws-duration-hover) var(--ws-ease-soft); }
|
|
128
|
+
|
|
129
|
+
/* The build-in (D7; 5 Nov 2026, a kit default: a chart builds in when it arrives). On first paint it runs over the
|
|
130
|
+
draw: each column rises from the baseline over the last 45% of it, column i starting at its share of the first 55%
|
|
131
|
+
(North's chart marks), the line and its area draw left to right, each dot pops as the line reaches it, the
|
|
132
|
+
reference runs out from the left; in a .ws-build card it all starts at the card's --ws-build-at. A chart that is
|
|
133
|
+
below the fold builds as it scrolls in instead: the same moves, driven by the figure's own entry into the view
|
|
134
|
+
(view(): from its top at the window's foot until 80% of it is in view), and it is whole by then; scrolled back out the bottom and in again, it builds again. Where the browser has
|
|
135
|
+
no view timeline, a chart below the fold is simply whole when it arrives. Only the parts move; the axis, the grid
|
|
136
|
+
and the words stand still. */
|
|
137
|
+
.ws-trend-line__point::before { animation: ws-trend-line-rise calc(var(--ws-duration-draw) * 0.45) var(--ws-ease-settle) backwards; animation-delay: calc(var(--ws-build-at, 0s) + var(--ws-duration-draw) * 0.55 * var(--i) / max(var(--n) - 1, 1)); }
|
|
138
|
+
.ws-trend-line__point::after { animation: ws-trend-line-pop var(--ws-duration-settle) var(--ws-ease-pop) backwards; animation-delay: calc(var(--ws-build-at, 0s) + var(--ws-duration-draw) * (var(--i) + 0.5) / var(--n)); }
|
|
139
|
+
.ws-trend-line__draw { animation: ws-trend-line-wipe var(--ws-duration-draw) var(--ws-ease-steady) var(--ws-build-at, 0s) backwards; }
|
|
140
|
+
.ws-trend-line__ref { animation: ws-grow var(--ws-duration-draw) var(--ws-ease-soft) var(--ws-build-at, 0s) backwards; }
|
|
141
|
+
@supports (animation-timeline: view()) {
|
|
142
|
+
.ws-trend-line { view-timeline: --ws-trend-line-in block; }
|
|
143
|
+
.ws-trend-line__point::before { animation: ws-trend-line-rise calc(var(--ws-duration-draw) * 0.45) var(--ws-ease-settle) calc(var(--ws-build-at, 0s) + var(--ws-duration-draw) * 0.55 * var(--i) / max(var(--n) - 1, 1)) backwards, ws-trend-line-rise 1s var(--ws-ease-settle) backwards; animation-timeline: auto, --ws-trend-line-in; animation-range: normal, entry calc(44% * var(--i) / max(var(--n) - 1, 1)) entry calc(44% * var(--i) / max(var(--n) - 1, 1) + 36%); }
|
|
144
|
+
.ws-trend-line__point::after { animation: ws-trend-line-pop var(--ws-duration-settle) var(--ws-ease-pop) calc(var(--ws-build-at, 0s) + var(--ws-duration-draw) * (var(--i) + 0.5) / var(--n)) backwards, ws-trend-line-pop 1s var(--ws-ease-pop) backwards; animation-timeline: auto, --ws-trend-line-in; animation-range: normal, entry calc(72% * (var(--i) + 0.5) / var(--n)) entry calc(72% * (var(--i) + 0.5) / var(--n) + 8%); }
|
|
145
|
+
.ws-trend-line__draw { animation: ws-trend-line-wipe var(--ws-duration-draw) var(--ws-ease-steady) var(--ws-build-at, 0s) backwards, ws-trend-line-wipe 1s var(--ws-ease-steady) backwards; animation-timeline: auto, --ws-trend-line-in; animation-range: normal, entry 0% entry 80%; }
|
|
146
|
+
.ws-trend-line__ref { animation: ws-grow var(--ws-duration-draw) var(--ws-ease-soft) var(--ws-build-at, 0s) backwards, ws-grow 1s var(--ws-ease-soft) backwards; animation-timeline: auto, --ws-trend-line-in; animation-range: normal, entry 0% entry 80%; }
|
|
147
|
+
/* Inside a dashboard build-in card the card decides when it plays (once, as it lands): drop the scroll-scrubbed
|
|
148
|
+
copy so the chart never builds a second time when scrolled out and back. */
|
|
149
|
+
.ws-build__card .ws-trend-line__point::before, .ws-build__card .ws-trend-line__point::after,
|
|
150
|
+
.ws-build__card .ws-trend-line__draw, .ws-build__card .ws-trend-line__ref { animation-timeline: auto, none; }
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
@keyframes ws-trend-line-rise { from { transform: scaleY(0); } }
|
|
154
|
+
@keyframes ws-trend-line-pop { from { transform: scale(0); } }
|
|
155
|
+
@keyframes ws-trend-line-wipe { from { clip-path: inset(0 100% 0 0); } }
|
|
@@ -15,39 +15,50 @@ The system's grey well: a plate holding a short list of pressable rows, for ever
|
|
|
15
15
|
|
|
16
16
|
## Anatomy
|
|
17
17
|
|
|
18
|
-
- The well itself: `--ws-radius-card` (8 px) corners, `--ws-well` ground (
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
18
|
+
- The well itself: `--ws-radius-card` (8 px) corners, `--ws-well` ground (#EDEDED), 2 px padding (`--space-3xs`) and
|
|
19
|
+
the same 2 px between rows (Seth's well, node 15:708), so the rows' 6 px corners sit concentric in the plate.
|
|
20
|
+
- Each row (`ws-well-row`): 48 px tall at least (`--ws-row-h`), `--ws-radius-row` (6 px) corners, the cream
|
|
21
|
+
(`--color-bg-page`), 8 px top and bottom, 12 px on the left and 14 px on the right, its parts 12 px apart
|
|
22
|
+
(`--space-sm`).
|
|
23
|
+
- Row words: 14 px medium, navy (`--color-text-heading`), one line. A long question is cut with an ellipsis and its
|
|
24
|
+
row carries a `title` with the whole question.
|
|
25
|
+
- A row may lead with a face or icon before its words (a person's face is a `ws-avatar` with their initials or photo,
|
|
26
|
+
never an empty disc), and end with a 16 px chevron in `--color-text-muted`.
|
|
22
27
|
|
|
23
28
|
## Variants and sizes
|
|
24
29
|
|
|
25
30
|
| State | Row ground |
|
|
26
31
|
| --- | --- |
|
|
27
32
|
| Row, default | The page's cream |
|
|
28
|
-
| Row, hover | White (`--color-
|
|
33
|
+
| Row, hover | White (`--color-surface`), the one surface in the system where hover lightens rather than darkens |
|
|
29
34
|
| Row, pressed | `--ws-surface-press`, a step darker than the cream, so a tap answers on a touch screen |
|
|
30
|
-
| Placeholder row (`hidden`) | A
|
|
35
|
+
| Placeholder row (`hidden`) | A shimmer line standing in for the words (`--ws-shimmer`), hidden from assistive tech; not a target, so no pointer and no white hover. Under reduced motion a still ghost line (`--ws-well-hover`) |
|
|
31
36
|
|
|
32
37
|
## States
|
|
33
38
|
|
|
34
39
|
- **Default**: cream rows on the grey well.
|
|
35
|
-
- **Hover
|
|
36
|
-
|
|
37
|
-
- **
|
|
38
|
-
|
|
39
|
-
- **
|
|
40
|
+
- **Hover** (a pointer that hovers only): a row turns white (`--color-surface`), the one place in the system where hover
|
|
41
|
+
lightens a surface instead of darkening it. A touch screen never shows it, so a tap leaves no stuck white row.
|
|
42
|
+
- **Focus**: the 2 px navy ring drawn inside the row (`--ws-focus-*`), since a row cannot grow an outer ring without
|
|
43
|
+
touching its neighbours.
|
|
44
|
+
- **Pressed**: `--ws-surface-press` at once; rows never scale under a press, they only tint.
|
|
45
|
+
- **Busy**: the well carries `aria-busy`, and rows still loading show a shimmer line, one quiet grey
|
|
46
|
+
(`hidden` rows), present for layout and invisible to a screen reader. Under reduced motion the line stands still.
|
|
47
|
+
- **Disabled**: not a state a well row carries; a row that cannot be used yet is not shown.
|
|
40
48
|
- **Empty**: a well with no suggestions is not rendered; there is no empty well.
|
|
41
|
-
- **Long label**:
|
|
42
|
-
|
|
49
|
+
- **Long label**: the words stay on one line and are cut with an ellipsis; the row's `title` holds the whole question
|
|
50
|
+
(and a screen reader reads it all). Keep prompts short enough that this is rare.
|
|
51
|
+
- **Touch**: rows are 48 px, above the 40 px floor.
|
|
52
|
+
- **Dark**: the plate, the rows and the hover follow the theme.
|
|
43
53
|
|
|
44
54
|
## Behaviour
|
|
45
55
|
|
|
46
56
|
- Keyboard: each interactive row is a real `<button type="button">`, reachable by Tab, activated by Enter or Space.
|
|
47
57
|
- Pointer: hover whitens a row; click fires the row's action at once.
|
|
48
58
|
- Touch: the press tint (`--ws-surface-press`) answers a tap since there is no hover state on touch.
|
|
49
|
-
- Motion:
|
|
50
|
-
-
|
|
59
|
+
- Motion: the hover tint eases over `--ws-duration-hover` on `--ws-ease-soft`, the press at once; rows arriving in a list
|
|
60
|
+
may use `ws-settle` with `--ws-i` for a 22 ms stagger, set on the `li`.
|
|
61
|
+
- Reduced motion: every change is instant and the busy shimmer stands still.
|
|
51
62
|
|
|
52
63
|
## Content
|
|
53
64
|
|
|
@@ -79,14 +90,45 @@ The system's grey well: a plate holding a short list of pressable rows, for ever
|
|
|
79
90
|
## Rules
|
|
80
91
|
|
|
81
92
|
- "What to ask is a well": every short list of suggested prompts uses `Well`, never a hand-built list of buttons.
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
- A row
|
|
86
|
-
controls).
|
|
93
|
+
- The well holds prompts. A list of things to open (checks, fixes, records) is a card's rows (`Card`, Seth's rim list:
|
|
94
|
+
cream rows joined by 0.5 px dividers inside the 1 px tray rim). Those are the two places the grey holds cream rows.
|
|
95
|
+
- A row never scales on press; rows tint instead.
|
|
96
|
+
- A row whose question may be cut carries a `title` with all of it.
|
|
87
97
|
|
|
88
98
|
## Source
|
|
89
99
|
|
|
90
|
-
**Derived from**:
|
|
91
|
-
|
|
100
|
+
**Derived from**: Seth's well (Ignite surfaces.tsx:265-297, node 15:708: 2 in, 2 apart, rows 8 / 14 / 8 / 12, 12
|
|
101
|
+
between parts) and the system's rule that a short list of suggested prompts is always a well. **Precedent**: the first
|
|
92
102
|
product built on the system.
|
|
103
|
+
|
|
104
|
+
## Markup
|
|
105
|
+
|
|
106
|
+
```html
|
|
107
|
+
<ul class="ws-well" aria-label="What to ask">
|
|
108
|
+
<li>
|
|
109
|
+
<button type="button" class="ws-well-row">
|
|
110
|
+
<span class="ws-well-row__words"><span>What should I post this week?</span></span>
|
|
111
|
+
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
112
|
+
</button>
|
|
113
|
+
</li>
|
|
114
|
+
<li>
|
|
115
|
+
<button type="button" class="ws-well-row">
|
|
116
|
+
<span class="ws-avatar ws-avatar--plain" aria-hidden="true">PN</span>
|
|
117
|
+
<span class="ws-well-row__words"><span>Ask Priya Nair for a review</span></span>
|
|
118
|
+
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
119
|
+
</button>
|
|
120
|
+
</li>
|
|
121
|
+
</ul>
|
|
122
|
+
|
|
123
|
+
<!-- Busy -->
|
|
124
|
+
<ul class="ws-well" aria-label="What to ask" aria-busy="true">
|
|
125
|
+
<li aria-hidden="true"><div class="ws-well-row"><span class="ws-well-row__placeholder" style="width: 70%;"></span></div></li>
|
|
126
|
+
</ul>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Styles
|
|
130
|
+
|
|
131
|
+
The well and its row are house surfaces (`_house.css`: ground, corners, row height, the white hover); `Well/style.css`
|
|
132
|
+
sets Seth's 2 px insets, the row's padding and gap, the touch hover, the one-line words and the shimmer placeholder.
|
|
133
|
+
Tokens: `--ws-well`, `--space-3xs`, `--ws-row-h`, `--ws-radius-row`, `--color-surface`, `--ws-surface-press`,
|
|
134
|
+
`--ws-shimmer`, `--ws-well-hover` (the still ghost), `--ws-loop-shimmer`, `--ws-ease-shimmer`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- @dsCard group="Cards" height=
|
|
1
|
+
<!-- @dsCard group="Cards" height=274 -->
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
@@ -8,55 +8,55 @@
|
|
|
8
8
|
<link rel="stylesheet" href="../bundle.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
|
-
<div class="ws-stage
|
|
11
|
+
<div class="ws-stage">
|
|
12
12
|
|
|
13
13
|
<div class="ws-stack" style="width: 340px; max-width: 100%;">
|
|
14
|
-
<span class="ws-muted">Default: four rows, a chevron at the end</span>
|
|
14
|
+
<span class="ws-muted">Default: four rows, a chevron at the end; a long question is cut, its title holds it</span>
|
|
15
15
|
<ul class="ws-well" aria-label="What to ask">
|
|
16
16
|
<li>
|
|
17
17
|
<button type="button" class="ws-well-row">
|
|
18
18
|
<span class="ws-well-row__words"><span>What should I post this week?</span></span>
|
|
19
|
-
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
19
|
+
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
20
20
|
</button>
|
|
21
21
|
</li>
|
|
22
22
|
<li>
|
|
23
23
|
<button type="button" class="ws-well-row">
|
|
24
24
|
<span class="ws-well-row__words"><span>Why did my views drop last week?</span></span>
|
|
25
|
-
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
25
|
+
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
26
26
|
</button>
|
|
27
27
|
</li>
|
|
28
28
|
<li>
|
|
29
29
|
<button type="button" class="ws-well-row">
|
|
30
|
-
<span class="ws-avatar ws-avatar--plain" aria-hidden="true"
|
|
30
|
+
<span class="ws-avatar ws-avatar--plain" aria-hidden="true">PN</span>
|
|
31
31
|
<span class="ws-well-row__words"><span>Ask Priya Nair for a review</span></span>
|
|
32
|
-
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
32
|
+
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
33
33
|
</button>
|
|
34
34
|
</li>
|
|
35
35
|
<li>
|
|
36
|
-
<button type="button" class="ws-well-row">
|
|
37
|
-
<span class="ws-well-row__words"><span>Draft a follow-up for Dana
|
|
38
|
-
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
36
|
+
<button type="button" class="ws-well-row" title="Draft a follow-up for everyone who came to Dana’s open house on Oak Street">
|
|
37
|
+
<span class="ws-well-row__words"><span>Draft a follow-up for everyone who came to Dana’s open house on Oak Street</span></span>
|
|
38
|
+
<svg class="ws-well-row__chevron" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 3.5L11 8l-5 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
39
39
|
</button>
|
|
40
40
|
</li>
|
|
41
41
|
</ul>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
44
|
<div class="ws-stack" style="width: 340px; max-width: 100%;">
|
|
45
|
-
<span class="ws-muted">Busy: the
|
|
45
|
+
<span class="ws-muted">Busy: the rows are still being read, a shimmer line in each place</span>
|
|
46
46
|
<ul class="ws-well" aria-label="What to ask" aria-busy="true">
|
|
47
47
|
<li aria-hidden="true">
|
|
48
48
|
<div class="ws-well-row">
|
|
49
|
-
<span class="ws-well-row__placeholder
|
|
49
|
+
<span class="ws-well-row__placeholder" style="width: 70%;"></span>
|
|
50
50
|
</div>
|
|
51
51
|
</li>
|
|
52
52
|
<li aria-hidden="true">
|
|
53
53
|
<div class="ws-well-row">
|
|
54
|
-
<span class="ws-well-row__placeholder
|
|
54
|
+
<span class="ws-well-row__placeholder" style="width: 55%;"></span>
|
|
55
55
|
</div>
|
|
56
56
|
</li>
|
|
57
57
|
<li aria-hidden="true">
|
|
58
58
|
<div class="ws-well-row">
|
|
59
|
-
<span class="ws-well-row__placeholder
|
|
59
|
+
<span class="ws-well-row__placeholder" style="width: 80%;"></span>
|
|
60
60
|
</div>
|
|
61
61
|
</li>
|
|
62
62
|
</ul>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* ---- Well: Seth's grey plate of cream rows to ask, 2 px in and 2 px apart, a chevron at each end ---- */
|
|
2
|
+
/* Seth's well (node 15:708): 2 in and 2 apart (was 4), so the rows' 6 px corners sit concentric in the 8 px plate. */
|
|
3
|
+
.ws-well { padding: var(--space-3xs); gap: var(--space-3xs); }
|
|
4
|
+
/* A row: 48 at least, 8 top and bottom, 12 on the left and 14 on the right, its parts 12 apart. White under the pointer
|
|
5
|
+
(only where a pointer hovers, so a tap leaves no stuck white row), the press tint at once, the inset ring on focus. */
|
|
6
|
+
.ws-well-row { gap: var(--space-sm); padding: var(--space-xs) var(--space-sm-plus) var(--space-xs) var(--space-sm); }
|
|
7
|
+
.ws-well-row:active { transition-duration: var(--ws-duration-instant); }
|
|
8
|
+
/* A still row (a busy placeholder, no button) is not a target: no pointer, no white under it. */
|
|
9
|
+
.ws-well-row:not(button, a) { cursor: default; }
|
|
10
|
+
.ws-well-row:not(button, a):is(:hover, :active) { background: var(--color-bg-page); }
|
|
11
|
+
@media (hover: none) {
|
|
12
|
+
.ws-well-row:hover { background: var(--color-bg-page); }
|
|
13
|
+
.ws-well-row:active { background: var(--ws-surface-press); }
|
|
14
|
+
}
|
|
15
|
+
/* The words: one line; a long question is cut with an ellipsis and its row carries a title with the whole of it. */
|
|
16
|
+
.ws-well-row__words { display: flex; min-width: 0; flex: 1; flex-direction: column; }
|
|
17
|
+
.ws-well-row__words > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
18
|
+
.ws-well-row__chevron { flex-shrink: 0; width: var(--ws-icon); height: var(--ws-icon); color: var(--color-text-muted); }
|
|
19
|
+
/* Busy: a shimmer line in each row, sized where used; under reduced motion a still ghost in the hover grey, never a
|
|
20
|
+
frozen frame of the sweep. */
|
|
21
|
+
.ws-well-row__placeholder { height: var(--space-sm); border-radius: var(--ws-radius-chip); background: var(--ws-well-hover); }
|
|
22
|
+
@media (prefers-reduced-motion: no-preference) { .ws-well-row__placeholder { background: var(--ws-shimmer); background-size: 300% 100%; animation: ws-shimmer var(--ws-loop-shimmer) var(--ws-ease-shimmer) infinite; } }
|