@nmnmcc/standard 0.0.0-stage → 0.4.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/LICENSE +21 -0
- package/README.md +516 -2
- package/dist/Extend.d.ts +15 -0
- package/dist/Extend.d.ts.map +1 -0
- package/dist/Extend.js +1 -0
- package/dist/Node.d.ts +71 -0
- package/dist/Node.d.ts.map +1 -0
- package/dist/Palette-BIJ96BEh.js +84 -0
- package/dist/Palette.d.ts +8 -0
- package/dist/Palette.d.ts.map +1 -0
- package/dist/Palette.js +1 -0
- package/dist/Standard-BPpzr5SM.js +488 -0
- package/dist/Standard.d.ts +249 -0
- package/dist/Standard.d.ts.map +1 -0
- package/dist/Standard.js +1 -0
- package/dist/Ui-B9xQqqNT.js +468 -0
- package/dist/Ui.d.ts +500 -0
- package/dist/Ui.d.ts.map +1 -0
- package/dist/Ui.js +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/rolldown-runtime-BMBA7GOT.js +10 -0
- package/dist/standard/button/button.d.ts +21 -0
- package/dist/standard/button/button.d.ts.map +1 -0
- package/dist/standard/colour/colour.d.ts +93 -0
- package/dist/standard/colour/colour.d.ts.map +1 -0
- package/dist/standard/field/field.d.ts +91 -0
- package/dist/standard/field/field.d.ts.map +1 -0
- package/dist/standard/form/form.d.ts +16 -0
- package/dist/standard/form/form.d.ts.map +1 -0
- package/dist/standard/icon/icon.d.ts +31 -0
- package/dist/standard/icon/icon.d.ts.map +1 -0
- package/dist/standard/image/image.d.ts +21 -0
- package/dist/standard/image/image.d.ts.map +1 -0
- package/dist/standard/layout/layout.d.ts +73 -0
- package/dist/standard/layout/layout.d.ts.map +1 -0
- package/dist/standard/list/list.d.ts +26 -0
- package/dist/standard/list/list.d.ts.map +1 -0
- package/dist/standard/page/page.d.ts +20 -0
- package/dist/standard/page/page.d.ts.map +1 -0
- package/dist/standard/table/table.d.ts +18 -0
- package/dist/standard/table/table.d.ts.map +1 -0
- package/dist/standard/text/text.d.ts +39 -0
- package/dist/standard/text/text.d.ts.map +1 -0
- package/dist/standard/tokens/classes.d.ts +16 -0
- package/dist/standard/tokens/classes.d.ts.map +1 -0
- package/dist/standard/tokens/tokens.d.ts +162 -0
- package/dist/standard/tokens/tokens.d.ts.map +1 -0
- package/dist/standard.css +2 -0
- package/dist/ui/arrow/arrow.d.ts +18 -0
- package/dist/ui/arrow/arrow.d.ts.map +1 -0
- package/dist/ui/avatar/avatar.d.ts +15 -0
- package/dist/ui/avatar/avatar.d.ts.map +1 -0
- package/dist/ui/board/board.d.ts +34 -0
- package/dist/ui/board/board.d.ts.map +1 -0
- package/dist/ui/bullet/bullet.d.ts +15 -0
- package/dist/ui/bullet/bullet.d.ts.map +1 -0
- package/dist/ui/card/card.d.ts +24 -0
- package/dist/ui/card/card.d.ts.map +1 -0
- package/dist/ui/carousel/carousel.d.ts +17 -0
- package/dist/ui/carousel/carousel.d.ts.map +1 -0
- package/dist/ui/check/check.d.ts +20 -0
- package/dist/ui/check/check.d.ts.map +1 -0
- package/dist/ui/choice/choice.d.ts +19 -0
- package/dist/ui/choice/choice.d.ts.map +1 -0
- package/dist/ui/control/control.d.ts +57 -0
- package/dist/ui/control/control.d.ts.map +1 -0
- package/dist/ui/dialog/dialog.d.ts +30 -0
- package/dist/ui/dialog/dialog.d.ts.map +1 -0
- package/dist/ui/disclosure/disclosure.d.ts +20 -0
- package/dist/ui/disclosure/disclosure.d.ts.map +1 -0
- package/dist/ui/flap/flap.d.ts +18 -0
- package/dist/ui/flap/flap.d.ts.map +1 -0
- package/dist/ui/item/item.d.ts +21 -0
- package/dist/ui/item/item.d.ts.map +1 -0
- package/dist/ui/key/key.d.ts +12 -0
- package/dist/ui/key/key.d.ts.map +1 -0
- package/dist/ui/menu/menu.d.ts +26 -0
- package/dist/ui/menu/menu.d.ts.map +1 -0
- package/dist/ui/modal/modal.d.ts +22 -0
- package/dist/ui/modal/modal.d.ts.map +1 -0
- package/dist/ui/navigator/navigator.d.ts +137 -0
- package/dist/ui/navigator/navigator.d.ts.map +1 -0
- package/dist/ui/notice/notice.d.ts +34 -0
- package/dist/ui/notice/notice.d.ts.map +1 -0
- package/dist/ui/options/options.d.ts +19 -0
- package/dist/ui/options/options.d.ts.map +1 -0
- package/dist/ui/pager/pager.d.ts +29 -0
- package/dist/ui/pager/pager.d.ts.map +1 -0
- package/dist/ui/pagination/pagination.d.ts +14 -0
- package/dist/ui/pagination/pagination.d.ts.map +1 -0
- package/dist/ui/popover/popover.d.ts +20 -0
- package/dist/ui/popover/popover.d.ts.map +1 -0
- package/dist/ui/progress/progress.d.ts +17 -0
- package/dist/ui/progress/progress.d.ts.map +1 -0
- package/dist/ui/route/route.d.ts +27 -0
- package/dist/ui/route/route.d.ts.map +1 -0
- package/dist/ui/sheet/sheet.d.ts +35 -0
- package/dist/ui/sheet/sheet.d.ts.map +1 -0
- package/dist/ui/skeleton/skeleton.d.ts +15 -0
- package/dist/ui/skeleton/skeleton.d.ts.map +1 -0
- package/dist/ui/slider/slider.d.ts +23 -0
- package/dist/ui/slider/slider.d.ts.map +1 -0
- package/dist/ui/stepper/stepper.d.ts +32 -0
- package/dist/ui/stepper/stepper.d.ts.map +1 -0
- package/dist/ui/tabs/tabs.d.ts +22 -0
- package/dist/ui/tabs/tabs.d.ts.map +1 -0
- package/dist/ui/tag/tag.d.ts +17 -0
- package/dist/ui/tag/tag.d.ts.map +1 -0
- package/dist/ui/tile/tile.d.ts +38 -0
- package/dist/ui/tile/tile.d.ts.map +1 -0
- package/dist/ui/toasts/toasts.d.ts +17 -0
- package/dist/ui/toasts/toasts.d.ts.map +1 -0
- package/dist/ui/toggle/toggle.d.ts +17 -0
- package/dist/ui/toggle/toggle.d.ts.map +1 -0
- package/dist/ui/trail/trail.d.ts +22 -0
- package/dist/ui/trail/trail.d.ts.map +1 -0
- package/package.json +70 -3
- package/src/Extend.ts +14 -0
- package/src/Node.ts +44 -0
- package/src/Palette.ts +7 -0
- package/src/Standard.ts +109 -0
- package/src/Ui.ts +156 -0
- package/src/index.ts +27 -0
- package/src/standard/button/button.module.css +43 -0
- package/src/standard/button/button.module.d.css.ts +6 -0
- package/src/standard/button/button.ts +38 -0
- package/src/standard/colour/colour.ts +197 -0
- package/src/standard/field/field.module.css +222 -0
- package/src/standard/field/field.module.d.css.ts +13 -0
- package/src/standard/field/field.ts +266 -0
- package/src/standard/form/form.ts +25 -0
- package/src/standard/icon/icon.module.css +349 -0
- package/src/standard/icon/icon.module.d.css.ts +112 -0
- package/src/standard/icon/icon.ts +148 -0
- package/src/standard/image/image.module.css +42 -0
- package/src/standard/image/image.module.d.css.ts +12 -0
- package/src/standard/image/image.ts +39 -0
- package/src/standard/layout/layout.module.css +224 -0
- package/src/standard/layout/layout.module.d.css.ts +41 -0
- package/src/standard/layout/layout.ts +133 -0
- package/src/standard/list/list.module.css +71 -0
- package/src/standard/list/list.module.d.css.ts +10 -0
- package/src/standard/list/list.ts +53 -0
- package/src/standard/page/page.module.css +244 -0
- package/src/standard/page/page.module.d.css.ts +9 -0
- package/src/standard/page/page.ts +32 -0
- package/src/standard/table/table.module.css +40 -0
- package/src/standard/table/table.module.d.css.ts +6 -0
- package/src/standard/table/table.ts +36 -0
- package/src/standard/text/text.module.css +149 -0
- package/src/standard/text/text.module.d.css.ts +19 -0
- package/src/standard/text/text.ts +77 -0
- package/src/standard/tokens/classes.ts +31 -0
- package/src/standard/tokens/tokens.module.css +294 -0
- package/src/standard/tokens/tokens.module.d.css.ts +40 -0
- package/src/standard/tokens/tokens.ts +339 -0
- package/src/ui/arrow/arrow.module.css +38 -0
- package/src/ui/arrow/arrow.module.d.css.ts +13 -0
- package/src/ui/arrow/arrow.ts +35 -0
- package/src/ui/avatar/avatar.module.css +25 -0
- package/src/ui/avatar/avatar.module.d.css.ts +5 -0
- package/src/ui/avatar/avatar.ts +28 -0
- package/src/ui/board/board.module.css +94 -0
- package/src/ui/board/board.module.d.css.ts +10 -0
- package/src/ui/board/board.ts +84 -0
- package/src/ui/bullet/bullet.module.css +28 -0
- package/src/ui/bullet/bullet.module.d.css.ts +5 -0
- package/src/ui/bullet/bullet.ts +16 -0
- package/src/ui/card/card.module.css +80 -0
- package/src/ui/card/card.module.d.css.ts +6 -0
- package/src/ui/card/card.ts +42 -0
- package/src/ui/carousel/carousel.module.css +24 -0
- package/src/ui/carousel/carousel.module.d.css.ts +5 -0
- package/src/ui/carousel/carousel.ts +30 -0
- package/src/ui/check/check.module.css +53 -0
- package/src/ui/check/check.module.d.css.ts +8 -0
- package/src/ui/check/check.ts +46 -0
- package/src/ui/choice/choice.module.css +32 -0
- package/src/ui/choice/choice.module.d.css.ts +6 -0
- package/src/ui/choice/choice.ts +31 -0
- package/src/ui/control/control.module.css +127 -0
- package/src/ui/control/control.module.d.css.ts +12 -0
- package/src/ui/control/control.ts +97 -0
- package/src/ui/dialog/dialog.module.css +42 -0
- package/src/ui/dialog/dialog.module.d.css.ts +6 -0
- package/src/ui/dialog/dialog.ts +44 -0
- package/src/ui/disclosure/disclosure.module.css +57 -0
- package/src/ui/disclosure/disclosure.module.d.css.ts +7 -0
- package/src/ui/disclosure/disclosure.ts +32 -0
- package/src/ui/flap/flap.module.css +161 -0
- package/src/ui/flap/flap.module.d.css.ts +48 -0
- package/src/ui/flap/flap.ts +78 -0
- package/src/ui/item/item.module.css +39 -0
- package/src/ui/item/item.module.d.css.ts +7 -0
- package/src/ui/item/item.ts +33 -0
- package/src/ui/key/key.module.css +15 -0
- package/src/ui/key/key.module.d.css.ts +5 -0
- package/src/ui/key/key.ts +13 -0
- package/src/ui/menu/menu.module.css +11 -0
- package/src/ui/menu/menu.module.d.css.ts +5 -0
- package/src/ui/menu/menu.ts +48 -0
- package/src/ui/modal/modal.module.css +66 -0
- package/src/ui/modal/modal.module.d.css.ts +8 -0
- package/src/ui/modal/modal.ts +55 -0
- package/src/ui/navigator/navigator.module.css +658 -0
- package/src/ui/navigator/navigator.module.d.css.ts +39 -0
- package/src/ui/navigator/navigator.ts +337 -0
- package/src/ui/notice/notice.module.css +80 -0
- package/src/ui/notice/notice.module.d.css.ts +10 -0
- package/src/ui/notice/notice.ts +57 -0
- package/src/ui/options/options.module.css +30 -0
- package/src/ui/options/options.module.d.css.ts +6 -0
- package/src/ui/options/options.ts +31 -0
- package/src/ui/pager/pager.module.css +38 -0
- package/src/ui/pager/pager.module.d.css.ts +8 -0
- package/src/ui/pager/pager.ts +48 -0
- package/src/ui/pagination/pagination.module.css +38 -0
- package/src/ui/pagination/pagination.module.d.css.ts +7 -0
- package/src/ui/pagination/pagination.ts +52 -0
- package/src/ui/popover/popover.module.css +94 -0
- package/src/ui/popover/popover.module.d.css.ts +8 -0
- package/src/ui/popover/popover.ts +139 -0
- package/src/ui/progress/progress.module.css +69 -0
- package/src/ui/progress/progress.module.d.css.ts +6 -0
- package/src/ui/progress/progress.ts +26 -0
- package/src/ui/route/route.module.css +116 -0
- package/src/ui/route/route.module.d.css.ts +11 -0
- package/src/ui/route/route.ts +58 -0
- package/src/ui/sheet/sheet.module.css +194 -0
- package/src/ui/sheet/sheet.module.d.css.ts +7 -0
- package/src/ui/sheet/sheet.ts +47 -0
- package/src/ui/skeleton/skeleton.module.css +44 -0
- package/src/ui/skeleton/skeleton.module.d.css.ts +6 -0
- package/src/ui/skeleton/skeleton.ts +20 -0
- package/src/ui/slider/slider.module.css +56 -0
- package/src/ui/slider/slider.module.d.css.ts +6 -0
- package/src/ui/slider/slider.ts +48 -0
- package/src/ui/stepper/stepper.module.css +32 -0
- package/src/ui/stepper/stepper.module.d.css.ts +7 -0
- package/src/ui/stepper/stepper.ts +62 -0
- package/src/ui/tabs/tabs.module.css +38 -0
- package/src/ui/tabs/tabs.module.d.css.ts +6 -0
- package/src/ui/tabs/tabs.ts +24 -0
- package/src/ui/tag/tag.module.css +23 -0
- package/src/ui/tag/tag.module.d.css.ts +5 -0
- package/src/ui/tag/tag.ts +17 -0
- package/src/ui/tile/tile.module.css +137 -0
- package/src/ui/tile/tile.module.d.css.ts +13 -0
- package/src/ui/tile/tile.ts +69 -0
- package/src/ui/toasts/toasts.module.css +38 -0
- package/src/ui/toasts/toasts.module.d.css.ts +6 -0
- package/src/ui/toasts/toasts.ts +26 -0
- package/src/ui/toggle/toggle.module.css +46 -0
- package/src/ui/toggle/toggle.module.d.css.ts +6 -0
- package/src/ui/toggle/toggle.ts +29 -0
- package/src/ui/trail/trail.module.css +42 -0
- package/src/ui/trail/trail.module.d.css.ts +5 -0
- package/src/ui/trail/trail.ts +28 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/* page: the root of a page. The reset, the type, the ground, and how the window moves in a change of view. */
|
|
2
|
+
|
|
3
|
+
@layer standard.reset {
|
|
4
|
+
:where(html):has(.page) {
|
|
5
|
+
text-size-adjust: none;
|
|
6
|
+
-webkit-text-size-adjust: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where(body):has(.page) {
|
|
10
|
+
margin: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where(.page) {
|
|
14
|
+
&,
|
|
15
|
+
& *,
|
|
16
|
+
& *::before,
|
|
17
|
+
& *::after {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
border: 0 solid currentColor;
|
|
22
|
+
border-radius: 0;
|
|
23
|
+
box-shadow: none;
|
|
24
|
+
font: inherit;
|
|
25
|
+
color: inherit;
|
|
26
|
+
letter-spacing: inherit;
|
|
27
|
+
text-align: start;
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@layer standard.tokens {
|
|
34
|
+
.page {
|
|
35
|
+
--s-unit: 0.5rem;
|
|
36
|
+
/* The two neutrals, black and white. In the light scheme they are ink and paper; in the dark scheme they swap places, and everything set in them follows. */
|
|
37
|
+
--s-black: oklch(0.16 0 0);
|
|
38
|
+
--s-white: oklch(0.985 0.003 95);
|
|
39
|
+
--s-ink: var(--s-black);
|
|
40
|
+
--s-paper: var(--s-white);
|
|
41
|
+
--s-night: 0;
|
|
42
|
+
--s-dark: var(--s-night);
|
|
43
|
+
--s-flat: 0;
|
|
44
|
+
color-scheme: light;
|
|
45
|
+
--s-bg: var(--s-paper);
|
|
46
|
+
--s-fg: var(--s-ink);
|
|
47
|
+
/* Muted text, on each: text taken as far towards its ground as it can go and still be readable. From `colour.ts`. */
|
|
48
|
+
/* The red as text, on each of the two grounds: what says that something is wrong. */
|
|
49
|
+
--s-wrong-on-white: #c2000c;
|
|
50
|
+
--s-wrong-on-black: #fc463c;
|
|
51
|
+
--s-soft-on-white: #5e5e5d;
|
|
52
|
+
--s-soft-on-black: #8c8c8a;
|
|
53
|
+
/* The colour as a block, and what is written on it. */
|
|
54
|
+
--s-mark: var(--s-accent);
|
|
55
|
+
--s-on-mark: var(--s-on-accent);
|
|
56
|
+
--s-hair: max(1px, 0.0625rem);
|
|
57
|
+
/* Resolved where they are used, against the page's own width. */
|
|
58
|
+
--s-gutter: clamp(1rem, 2.5cqi, 2rem);
|
|
59
|
+
--s-margin: clamp(1rem, 4cqi, 4rem);
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
* Nothing fades. A state changes at once, and a thing that changes
|
|
63
|
+
* place moves there: quick for a part of a control, move for a thing on
|
|
64
|
+
* the page, travel for the window itself. All take no time at all for
|
|
65
|
+
* anyone who asks for reduced motion.
|
|
66
|
+
*/
|
|
67
|
+
--s-quick: 60ms;
|
|
68
|
+
--s-move: 140ms;
|
|
69
|
+
--s-travel: 260ms;
|
|
70
|
+
/* Fast at the start and slow to settle: it reads as something arriving. */
|
|
71
|
+
--s-ease: cubic-bezier(0.2, 0, 0, 1);
|
|
72
|
+
/* Pulls away and brakes, as a train does between two stops. */
|
|
73
|
+
--s-glide: cubic-bezier(0.6, 0, 0.2, 1);
|
|
74
|
+
|
|
75
|
+
@media (prefers-reduced-motion: reduce) {
|
|
76
|
+
--s-quick: 0s;
|
|
77
|
+
--s-move: 0s;
|
|
78
|
+
--s-travel: 0s;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
container: s-page / inline-size;
|
|
82
|
+
/* A column, so that a region can sit at the bottom of a short page. */
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
min-block-size: 100dvb;
|
|
86
|
+
background: var(--s-bg);
|
|
87
|
+
color: var(--s-fg);
|
|
88
|
+
/*
|
|
89
|
+
* The typeface is the app's to choose: it names a family in
|
|
90
|
+
* `--s-font`, on the root or anywhere above the page. The language is
|
|
91
|
+
* designed for a neo-grotesque; with none named, it is set in the one the
|
|
92
|
+
* system has.
|
|
93
|
+
*/
|
|
94
|
+
font-family: var(--s-font, "Helvetica Neue"), Helvetica, "Nimbus Sans", Arial, sans-serif;
|
|
95
|
+
font-size: 1rem;
|
|
96
|
+
font-weight: 400;
|
|
97
|
+
line-height: 1.5;
|
|
98
|
+
font-kerning: normal;
|
|
99
|
+
/* A family may come in one weight, and bold is still bold. Nothing else is synthesised: no slanted fake italic, no shrunken fake small capitals. */
|
|
100
|
+
font-synthesis: weight;
|
|
101
|
+
-webkit-font-smoothing: antialiased;
|
|
102
|
+
text-rendering: optimizeLegibility;
|
|
103
|
+
/*
|
|
104
|
+
* An interface is for pressing, not for marking up: a drag across it
|
|
105
|
+
* selects nothing, unless a region says its text is there to be taken.
|
|
106
|
+
*/
|
|
107
|
+
user-select: none;
|
|
108
|
+
-webkit-user-select: none;
|
|
109
|
+
/* A press is answered by the control's own :active state. */
|
|
110
|
+
-webkit-tap-highlight-color: transparent;
|
|
111
|
+
|
|
112
|
+
/* The size a finger needs to hit a control. A mouse or a pen needs less. */
|
|
113
|
+
--s-target: 2.75rem;
|
|
114
|
+
|
|
115
|
+
@media (pointer: coarse) {
|
|
116
|
+
--s-target: 3rem;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* The dark scheme: when the page asks for it, or, when the page asks for neither scheme, when the reader's system does. */
|
|
121
|
+
.page.scheme-dark {
|
|
122
|
+
--s-ink: var(--s-white);
|
|
123
|
+
--s-paper: var(--s-black);
|
|
124
|
+
--s-night: 1;
|
|
125
|
+
color-scheme: dark;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (prefers-color-scheme: dark) {
|
|
129
|
+
.page:not(.scheme-light) {
|
|
130
|
+
--s-ink: var(--s-white);
|
|
131
|
+
--s-paper: var(--s-black);
|
|
132
|
+
--s-night: 1;
|
|
133
|
+
color-scheme: dark;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@layer standard.controls {
|
|
139
|
+
.page :focus-visible {
|
|
140
|
+
outline: calc(var(--s-unit) / 4) solid var(--s-read);
|
|
141
|
+
outline-offset: calc(var(--s-unit) / 4);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/*
|
|
146
|
+
* The app is one canvas, and the screen a window onto it. In a change of view
|
|
147
|
+
* the window moves, and that is all that happens: what was in the window
|
|
148
|
+
* and what is in it now are one rigid surface, edge to edge, that slides
|
|
149
|
+
* the other way by one whole window. Along both axes at once when the new
|
|
150
|
+
* place is diagonal from the old one.
|
|
151
|
+
*
|
|
152
|
+
* What moves is a snapshot of the window itself, so it is right wherever
|
|
153
|
+
* the page was scrolled to. A thing with its own view-transition name is
|
|
154
|
+
* not in that snapshot: it stays where it is, as a navigator does. If its
|
|
155
|
+
* place is not the same after the change, it moves there in the same time
|
|
156
|
+
* and on the same curve as the window, so everything that moves, moves
|
|
157
|
+
* together.
|
|
158
|
+
*/
|
|
159
|
+
/* The fallbacks are lengths: a bare 0 inside `calc()` is a number, and would make the whole declaration invalid. */
|
|
160
|
+
@keyframes leave {
|
|
161
|
+
to {
|
|
162
|
+
translate: var(--s-travel-x, 0px) var(--s-travel-y, 0px);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
@keyframes enter {
|
|
166
|
+
from {
|
|
167
|
+
translate: calc(-1 * var(--s-travel-x, 0px)) calc(-1 * var(--s-travel-y, 0px));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Nothing fades: for a thing with a name, the new one is what is seen, from the first frame. */
|
|
172
|
+
::view-transition-new(*) {
|
|
173
|
+
animation: none;
|
|
174
|
+
mix-blend-mode: normal;
|
|
175
|
+
}
|
|
176
|
+
::view-transition-old(*) {
|
|
177
|
+
display: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* A named thing whose place changes moves there with the window: `--s-travel` and `--s-glide`. */
|
|
181
|
+
::view-transition-group(*) {
|
|
182
|
+
animation-duration: 260ms;
|
|
183
|
+
animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@media (prefers-reduced-motion: reduce) {
|
|
187
|
+
::view-transition-group(*) {
|
|
188
|
+
animation: none;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* The durations and the curve are `--s-travel` and `--s-glide`, which do not reach the `::view-transition` pseudo-elements. */
|
|
193
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
194
|
+
:root:active-view-transition-type(forward, back, down, up)::view-transition-old(root) {
|
|
195
|
+
display: block;
|
|
196
|
+
mix-blend-mode: normal;
|
|
197
|
+
animation: leave 260ms cubic-bezier(0.6, 0, 0.2, 1) both;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:root:active-view-transition-type(forward, back, down, up)::view-transition-new(root) {
|
|
201
|
+
animation: enter 260ms cubic-bezier(0.6, 0, 0.2, 1) both;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/*
|
|
205
|
+
* The arrow of a navigator's button that goes back says where on the
|
|
206
|
+
* canvas the page before this one is, so it belongs to the page and not
|
|
207
|
+
* to the window: it leaves with the page that is left, and the next
|
|
208
|
+
* page's arrow comes in with that page, the same way and edge to edge.
|
|
209
|
+
* Its button is the window it is seen through, and is one whole step.
|
|
210
|
+
*/
|
|
211
|
+
:root:active-view-transition-type(forward, back, down, up)::view-transition-group(s-ui-navigator-back) {
|
|
212
|
+
overflow: clip;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:root:active-view-transition-type(forward, back, down, up)::view-transition-old(s-ui-navigator-back) {
|
|
216
|
+
display: block;
|
|
217
|
+
mix-blend-mode: normal;
|
|
218
|
+
animation: leave 260ms cubic-bezier(0.6, 0, 0.2, 1) both;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:root:active-view-transition-type(forward, back, down, up)::view-transition-new(s-ui-navigator-back) {
|
|
222
|
+
animation: enter 260ms cubic-bezier(0.6, 0, 0.2, 1) both;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* One whole window, across or down. */
|
|
226
|
+
:root:active-view-transition-type(forward) {
|
|
227
|
+
--s-travel-x: -100%;
|
|
228
|
+
}
|
|
229
|
+
:root:active-view-transition-type(back) {
|
|
230
|
+
--s-travel-x: 100%;
|
|
231
|
+
}
|
|
232
|
+
:root:active-view-transition-type(down) {
|
|
233
|
+
--s-travel-y: -100%;
|
|
234
|
+
}
|
|
235
|
+
:root:active-view-transition-type(up) {
|
|
236
|
+
--s-travel-y: 100%;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@media print {
|
|
241
|
+
.page {
|
|
242
|
+
min-block-size: 0;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `page`: the root of a page.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.4.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Html } from "effect/ui/html"
|
|
7
|
+
import { type Child, contents as inner, type Kind, node, type Node } from "../../Node.ts"
|
|
8
|
+
import { accent, on } from "../tokens/classes.ts"
|
|
9
|
+
import styles from "./page.module.css"
|
|
10
|
+
import type { Colour, Scheme } from "../tokens/tokens.ts"
|
|
11
|
+
|
|
12
|
+
export const page = <Msg>(h: Html.H<Msg>) => ({
|
|
13
|
+
/**
|
|
14
|
+
* The root of a page: sets the type, the ground and the accent colour, and
|
|
15
|
+
* its width is what the columns collapse against. `scheme` sets the light
|
|
16
|
+
* or the dark scheme; left out, it follows the reader's system.
|
|
17
|
+
*/
|
|
18
|
+
page: <R = never>(
|
|
19
|
+
options: { readonly accent?: Colour; readonly scheme?: Scheme },
|
|
20
|
+
...children: ReadonlyArray<Child<Kind, Msg, R>>
|
|
21
|
+
): Node<"block", Msg, R> =>
|
|
22
|
+
node(
|
|
23
|
+
h.div
|
|
24
|
+
.class(
|
|
25
|
+
styles.page,
|
|
26
|
+
on(options.accent, accent),
|
|
27
|
+
options.scheme === "light" && styles["scheme-light"],
|
|
28
|
+
options.scheme === "dark" && styles["scheme-dark"]
|
|
29
|
+
)
|
|
30
|
+
.children(inner(children))
|
|
31
|
+
)
|
|
32
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* table: a table of text. */
|
|
2
|
+
|
|
3
|
+
@layer standard.type {
|
|
4
|
+
.table th {
|
|
5
|
+
font-size: 0.75rem;
|
|
6
|
+
line-height: 1rem;
|
|
7
|
+
font-weight: 700;
|
|
8
|
+
letter-spacing: 0.08em;
|
|
9
|
+
text-transform: uppercase;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.table {
|
|
13
|
+
inline-size: 100%;
|
|
14
|
+
border-collapse: collapse;
|
|
15
|
+
|
|
16
|
+
& th,
|
|
17
|
+
& td {
|
|
18
|
+
padding-block: calc(1.5 * var(--s-unit));
|
|
19
|
+
padding-inline: calc(1.5 * var(--s-unit)) var(--s-gutter);
|
|
20
|
+
vertical-align: baseline;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* The head is a surface a step darker than any row; the rows are told apart by a tint on every other one. */
|
|
24
|
+
& th {
|
|
25
|
+
background: color-mix(in oklch, var(--s-fg) 12%, transparent);
|
|
26
|
+
}
|
|
27
|
+
& tbody tr:nth-child(even) td {
|
|
28
|
+
background: color-mix(in oklch, var(--s-fg) 6%, transparent);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
& .numeric {
|
|
32
|
+
text-align: end;
|
|
33
|
+
font-variant-numeric: tabular-nums;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& :is(th, td):last-child {
|
|
37
|
+
padding-inline-end: calc(1.5 * var(--s-unit));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `table`: a table of text.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.4.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Html } from "effect/ui/html"
|
|
7
|
+
import { node, type Node } from "../../Node.ts"
|
|
8
|
+
import styles from "./table.module.css"
|
|
9
|
+
|
|
10
|
+
export const table = <Msg>(h: Html.H<Msg>) => ({
|
|
11
|
+
/** A table of text. Numeric columns are set flush right in tabular figures. */
|
|
12
|
+
table: (options: {
|
|
13
|
+
readonly columns: ReadonlyArray<{ readonly title: string; readonly numeric?: boolean }>
|
|
14
|
+
readonly rows: ReadonlyArray<ReadonlyArray<string>>
|
|
15
|
+
}): Node<"block", Msg> => {
|
|
16
|
+
const numeric = (index: number) => options.columns[index]?.numeric === true && styles.numeric
|
|
17
|
+
return node(
|
|
18
|
+
h.table
|
|
19
|
+
.class(styles.table)
|
|
20
|
+
.children(
|
|
21
|
+
h.thead.children(
|
|
22
|
+
h.tr.children(
|
|
23
|
+
options.columns.map((column, index) =>
|
|
24
|
+
h.th.attr("scope", "col").class(numeric(index)).children(column.title)
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
),
|
|
28
|
+
h.tbody.children(
|
|
29
|
+
options.rows.map((row) =>
|
|
30
|
+
h.tr.children(row.map((cell, index) => h.td.class(numeric(index)).children(cell)))
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
)
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
})
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* The text: the type scale, emphasis, code and links. */
|
|
2
|
+
|
|
3
|
+
@layer standard.type {
|
|
4
|
+
.text {
|
|
5
|
+
text-wrap: pretty;
|
|
6
|
+
overflow-wrap: break-word;
|
|
7
|
+
hanging-punctuation: first;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.role-display {
|
|
11
|
+
font-size: clamp(3rem, 12cqi, 10rem);
|
|
12
|
+
line-height: 0.92;
|
|
13
|
+
font-weight: 700;
|
|
14
|
+
letter-spacing: -0.045em;
|
|
15
|
+
text-wrap: balance;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.role-title {
|
|
19
|
+
font-size: clamp(2rem, 5.5cqi, 4rem);
|
|
20
|
+
line-height: 1;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
letter-spacing: -0.03em;
|
|
23
|
+
text-wrap: balance;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.role-heading {
|
|
27
|
+
font-size: 1.5rem;
|
|
28
|
+
line-height: 2rem;
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
letter-spacing: -0.015em;
|
|
31
|
+
text-wrap: balance;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.role-lead {
|
|
35
|
+
font-size: 1.25rem;
|
|
36
|
+
line-height: 2rem;
|
|
37
|
+
max-inline-size: 60ch;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.role-body {
|
|
41
|
+
font-size: 1rem;
|
|
42
|
+
line-height: 1.5rem;
|
|
43
|
+
max-inline-size: 68ch;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.role-caption {
|
|
47
|
+
font-size: 0.875rem;
|
|
48
|
+
line-height: 1.5rem;
|
|
49
|
+
color: var(--s-muted);
|
|
50
|
+
max-inline-size: 68ch;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.role-label {
|
|
54
|
+
font-size: 0.75rem;
|
|
55
|
+
line-height: 1rem;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
letter-spacing: 0.08em;
|
|
58
|
+
text-transform: uppercase;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.em-strong {
|
|
62
|
+
font-weight: 700;
|
|
63
|
+
}
|
|
64
|
+
.em-muted {
|
|
65
|
+
color: var(--s-muted);
|
|
66
|
+
}
|
|
67
|
+
.em-accent {
|
|
68
|
+
color: var(--s-read);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.code,
|
|
72
|
+
.listing {
|
|
73
|
+
/* The app's, if it names one in `--s-font-mono`. */
|
|
74
|
+
font-family: var(--s-font-mono, ui-monospace), "SF Mono", Menlo, Consolas, monospace;
|
|
75
|
+
font-size: 0.875em;
|
|
76
|
+
letter-spacing: 0;
|
|
77
|
+
font-variant-ligatures: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.code {
|
|
81
|
+
padding-inline: 0.25em;
|
|
82
|
+
background: color-mix(in oklch, var(--s-fg) 8%, transparent);
|
|
83
|
+
/*
|
|
84
|
+
* Always in the text's own colour, even inside muted text: it is on a
|
|
85
|
+
* tint of its own, and that tint on a surface that is tinted already
|
|
86
|
+
* would leave muted text with too little contrast.
|
|
87
|
+
*/
|
|
88
|
+
color: var(--s-fg);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.listing {
|
|
92
|
+
padding: calc(2 * var(--s-unit)) calc(3 * var(--s-unit));
|
|
93
|
+
/* A surface: a step from its ground towards its text. */
|
|
94
|
+
background: color-mix(in oklch, var(--s-fg) 8%, var(--s-bg));
|
|
95
|
+
color: var(--s-fg);
|
|
96
|
+
font-size: 0.875rem;
|
|
97
|
+
line-height: 1.5rem;
|
|
98
|
+
overflow-x: auto;
|
|
99
|
+
overscroll-behavior-inline: contain;
|
|
100
|
+
tab-size: 2;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.quote {
|
|
104
|
+
display: grid;
|
|
105
|
+
gap: calc(2 * var(--s-unit));
|
|
106
|
+
padding: calc(3 * var(--s-unit));
|
|
107
|
+
/*
|
|
108
|
+
* A step from whatever it is on towards its text: on a card or in a
|
|
109
|
+
* dialog it is still a surface of its own. Its words are in the text's
|
|
110
|
+
* own colour, never muted, so the step costs them no contrast.
|
|
111
|
+
*/
|
|
112
|
+
background: color-mix(in oklch, currentColor 8%, transparent);
|
|
113
|
+
|
|
114
|
+
& p {
|
|
115
|
+
font-size: 1.25rem;
|
|
116
|
+
line-height: 2rem;
|
|
117
|
+
max-inline-size: 60ch;
|
|
118
|
+
text-wrap: pretty;
|
|
119
|
+
hanging-punctuation: first;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Who said it, as a label: small and bold, and in the text's own colour, since muted text has too little contrast on a tint. */
|
|
123
|
+
& figcaption {
|
|
124
|
+
font-size: 0.75rem;
|
|
125
|
+
line-height: 1rem;
|
|
126
|
+
font-weight: 700;
|
|
127
|
+
letter-spacing: 0.08em;
|
|
128
|
+
text-transform: uppercase;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
& cite {
|
|
132
|
+
font-style: normal;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.link {
|
|
137
|
+
/* Said by colour and weight, not by a line under it. */
|
|
138
|
+
color: var(--s-read);
|
|
139
|
+
font-weight: 700;
|
|
140
|
+
text-decoration: none;
|
|
141
|
+
|
|
142
|
+
/* The one to the current page, and one under a press, are a block of the colour. */
|
|
143
|
+
&[aria-current="page"],
|
|
144
|
+
&:active {
|
|
145
|
+
background: var(--s-mark);
|
|
146
|
+
color: var(--s-on-mark);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "code": string;
|
|
3
|
+
readonly "em-accent": string;
|
|
4
|
+
readonly "em-muted": string;
|
|
5
|
+
readonly "em-strong": string;
|
|
6
|
+
readonly "link": string;
|
|
7
|
+
readonly "listing": string;
|
|
8
|
+
readonly "quote": string;
|
|
9
|
+
readonly "role-body": string;
|
|
10
|
+
readonly "role-caption": string;
|
|
11
|
+
readonly "role-display": string;
|
|
12
|
+
readonly "role-heading": string;
|
|
13
|
+
readonly "role-label": string;
|
|
14
|
+
readonly "role-lead": string;
|
|
15
|
+
readonly "role-title": string;
|
|
16
|
+
readonly "text": string;
|
|
17
|
+
};
|
|
18
|
+
export = styles;
|
|
19
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The text: `text`, `em`, `code`, `listing`, `quote`, `link` and `br`.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.4.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Html } from "effect/ui/html"
|
|
7
|
+
import { type Child, contents as inner, node, type Node } from "../../Node.ts"
|
|
8
|
+
import { iconOf } from "../icon/icon.ts"
|
|
9
|
+
import { selectable } from "../tokens/classes.ts"
|
|
10
|
+
import styles from "./text.module.css"
|
|
11
|
+
import type { Emphasis, Role } from "../tokens/tokens.ts"
|
|
12
|
+
|
|
13
|
+
const tags = { display: "h1", title: "h2", heading: "h3", lead: "p", body: "p", caption: "p", label: "p" } as const
|
|
14
|
+
|
|
15
|
+
export const text = <Msg>(h: Html.H<Msg>) => ({
|
|
16
|
+
/** A block of text at one step of the type scale. */
|
|
17
|
+
text: <R = never>(role: Role, ...children: ReadonlyArray<Child<"inline", Msg, R>>): Node<"block", Msg, R> =>
|
|
18
|
+
node(h[tags[role]].class(styles.text, styles[`role-${role}`]).children(inner(children))),
|
|
19
|
+
|
|
20
|
+
/** A run of text set apart by weight or colour. */
|
|
21
|
+
em: <R = never>(emphasis: Emphasis, ...children: ReadonlyArray<Child<"inline", Msg, R>>): Node<"inline", Msg, R> =>
|
|
22
|
+
node(h[emphasis === "strong" ? "strong" : "span"].class(styles[`em-${emphasis}`]).children(inner(children))),
|
|
23
|
+
|
|
24
|
+
/** A run of code, in the one monospaced typeface. */
|
|
25
|
+
code: (text: string): Node<"inline", Msg> => node(h.code.class(styles.code).children(text)),
|
|
26
|
+
|
|
27
|
+
/** A listing of code. It scrolls sideways instead of wrapping. With `select`, it can be selected and copied. */
|
|
28
|
+
listing: (options: { readonly label?: string; readonly select?: boolean }, text: string): Node<"block", Msg> =>
|
|
29
|
+
node(
|
|
30
|
+
h.pre
|
|
31
|
+
.class(styles.listing, options.select === true && selectable)
|
|
32
|
+
.attr("aria-label", options.label)
|
|
33
|
+
.attr("tabindex", "0")
|
|
34
|
+
.children(h.code.children(text))
|
|
35
|
+
),
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Somebody else's words, set apart from yours: a surface of its own, in
|
|
39
|
+
* the size of a lead. `by` is who said it and `from` is where, and a
|
|
40
|
+
* screen reader is told that the words are quoted.
|
|
41
|
+
*/
|
|
42
|
+
quote: <R = never>(
|
|
43
|
+
options: { readonly by?: string; readonly from?: string },
|
|
44
|
+
...children: ReadonlyArray<Child<"inline", Msg, R>>
|
|
45
|
+
): Node<"block", Msg, R> =>
|
|
46
|
+
node(
|
|
47
|
+
h.figure
|
|
48
|
+
.class(styles.quote)
|
|
49
|
+
.children(
|
|
50
|
+
h.blockquote.children(h.p.children(inner(children))),
|
|
51
|
+
(options.by !== undefined || options.from !== undefined) &&
|
|
52
|
+
h.figcaption.children(
|
|
53
|
+
options.by,
|
|
54
|
+
options.by !== undefined && options.from !== undefined && ", ",
|
|
55
|
+
options.from !== undefined && h.cite.children(options.from)
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
),
|
|
59
|
+
|
|
60
|
+
/** A link. One that leaves the site says so with a pictogram; the one to the current page is marked. */
|
|
61
|
+
link: <R = never>(
|
|
62
|
+
options: { readonly href: string; readonly external?: boolean; readonly current?: boolean },
|
|
63
|
+
...children: ReadonlyArray<Child<"inline", Msg, R>>
|
|
64
|
+
): Node<"inline", Msg, R> =>
|
|
65
|
+
node(
|
|
66
|
+
h.a
|
|
67
|
+
.class(styles.link)
|
|
68
|
+
.attr("href", options.href)
|
|
69
|
+
.attr("target", options.external === true ? "_blank" : undefined)
|
|
70
|
+
.attr("rel", options.external === true ? "external noopener noreferrer" : undefined)
|
|
71
|
+
.attr("aria-current", options.current === true ? "page" : undefined)
|
|
72
|
+
.children(inner(children), options.external === true && ["\u00a0", iconOf(h, "open-in-new")])
|
|
73
|
+
),
|
|
74
|
+
|
|
75
|
+
/** A line break. */
|
|
76
|
+
br: node<"inline", Msg, never>(h.br)
|
|
77
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The classes the tokens stand for. A builder never writes a class name
|
|
3
|
+
* itself: it gets the class of a token from here, or a class from its own
|
|
4
|
+
* stylesheet.
|
|
5
|
+
*
|
|
6
|
+
* @since 0.4.0
|
|
7
|
+
*/
|
|
8
|
+
import styles from "./tokens.module.css"
|
|
9
|
+
import type { Align, Colour, Space, Tone } from "./tokens.ts"
|
|
10
|
+
|
|
11
|
+
/** The class a token stands for, or none when the option was left out. */
|
|
12
|
+
export const on = <A>(value: A | undefined, name: (value: A) => string): string | undefined =>
|
|
13
|
+
value === undefined ? undefined : name(value)
|
|
14
|
+
|
|
15
|
+
/** The class that sets a ground's colours. The element paints them with `--s-bg` and `--s-fg`. */
|
|
16
|
+
export const tone = (name: Tone): string => styles[`tone-${name}`]
|
|
17
|
+
|
|
18
|
+
/** The class that sets `--s-accent` and `--s-on-accent` to a colour. */
|
|
19
|
+
export const accent = (colour: Colour): string => styles[`accent-${colour}`]
|
|
20
|
+
|
|
21
|
+
/** The class of a region whose text can be selected. No text can be, without it. */
|
|
22
|
+
export const selectable: string = styles.selectable
|
|
23
|
+
|
|
24
|
+
/** The class that sets `--s-gap`. */
|
|
25
|
+
export const gap = (space: Space): string => styles[`gap-${space}`]
|
|
26
|
+
|
|
27
|
+
/** The class that sets `--s-pad`. */
|
|
28
|
+
export const pad = (space: Space): string => styles[`pad-${space}`]
|
|
29
|
+
|
|
30
|
+
/** The class that sets `--s-align`. */
|
|
31
|
+
export const align = (name: Align): string => styles[`align-${name}`]
|