@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,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `form`: fields, and what sends them.
|
|
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 { gap, on } from "../tokens/classes.ts"
|
|
9
|
+
import layout from "../layout/layout.module.css"
|
|
10
|
+
import type { Space } from "../tokens/tokens.ts"
|
|
11
|
+
|
|
12
|
+
export const form = <Msg>(h: Html.H<Msg>) => ({
|
|
13
|
+
/** A form. Its children stack, and the browser's own validation is off: the Model says what is wrong. */
|
|
14
|
+
form: <R = never>(
|
|
15
|
+
options: { readonly onSubmit: Msg; readonly gap?: Space },
|
|
16
|
+
...children: ReadonlyArray<Child<Kind, Msg, R>>
|
|
17
|
+
): Node<"block", Msg, R> =>
|
|
18
|
+
node(
|
|
19
|
+
h.form
|
|
20
|
+
.class(layout.stack, on(options.gap, gap))
|
|
21
|
+
.attr("novalidate", "")
|
|
22
|
+
.on("submit", options.onSubmit)
|
|
23
|
+
.children(inner(children))
|
|
24
|
+
)
|
|
25
|
+
})
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/* icon: a pictogram, from Material Symbols (Sharp, weight 700, filled; Apache-2.0). */
|
|
2
|
+
|
|
3
|
+
@layer standard.type {
|
|
4
|
+
/*
|
|
5
|
+
* A glyph in the line: it is as high as the text it is in, takes the
|
|
6
|
+
* text's colour, and is one flat shape. The sharp, filled style of the
|
|
7
|
+
* family is the one that sits well with a bold grotesque.
|
|
8
|
+
*/
|
|
9
|
+
.icon {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
flex: none;
|
|
12
|
+
inline-size: 1.2em;
|
|
13
|
+
block-size: 1.2em;
|
|
14
|
+
background: currentColor;
|
|
15
|
+
mask: var(--s-icon) center / contain no-repeat;
|
|
16
|
+
vertical-align: -0.22em;
|
|
17
|
+
forced-color-adjust: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* One that stands before a word is half an em from it: one unit at the
|
|
22
|
+
* size text is read in, and less in smaller type, so it is never further
|
|
23
|
+
* from its word than the two are from the edge of what they are in. The
|
|
24
|
+
* space written after it is part of that, and the rest is made up here;
|
|
25
|
+
* a space is 0.28em in a grotesque.
|
|
26
|
+
*/
|
|
27
|
+
.leads {
|
|
28
|
+
margin-inline-end: 0.22em;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.icon-menu {
|
|
32
|
+
--s-icon: url("@material-symbols/svg-700/sharp/menu-fill.svg");
|
|
33
|
+
}
|
|
34
|
+
.icon-close {
|
|
35
|
+
--s-icon: url("@material-symbols/svg-700/sharp/close-fill.svg");
|
|
36
|
+
}
|
|
37
|
+
.icon-search {
|
|
38
|
+
--s-icon: url("@material-symbols/svg-700/sharp/search-fill.svg");
|
|
39
|
+
}
|
|
40
|
+
.icon-add {
|
|
41
|
+
--s-icon: url("@material-symbols/svg-700/sharp/add-fill.svg");
|
|
42
|
+
}
|
|
43
|
+
.icon-remove {
|
|
44
|
+
--s-icon: url("@material-symbols/svg-700/sharp/remove-fill.svg");
|
|
45
|
+
}
|
|
46
|
+
.icon-check {
|
|
47
|
+
--s-icon: url("@material-symbols/svg-700/sharp/check-fill.svg");
|
|
48
|
+
}
|
|
49
|
+
.icon-edit {
|
|
50
|
+
--s-icon: url("@material-symbols/svg-700/sharp/edit-fill.svg");
|
|
51
|
+
}
|
|
52
|
+
.icon-delete {
|
|
53
|
+
--s-icon: url("@material-symbols/svg-700/sharp/delete-fill.svg");
|
|
54
|
+
}
|
|
55
|
+
.icon-more-horiz {
|
|
56
|
+
--s-icon: url("@material-symbols/svg-700/sharp/more_horiz-fill.svg");
|
|
57
|
+
}
|
|
58
|
+
.icon-settings {
|
|
59
|
+
--s-icon: url("@material-symbols/svg-700/sharp/settings-fill.svg");
|
|
60
|
+
}
|
|
61
|
+
.icon-tune {
|
|
62
|
+
--s-icon: url("@material-symbols/svg-700/sharp/tune-fill.svg");
|
|
63
|
+
}
|
|
64
|
+
.icon-filter-list {
|
|
65
|
+
--s-icon: url("@material-symbols/svg-700/sharp/filter_list-fill.svg");
|
|
66
|
+
}
|
|
67
|
+
.icon-sort {
|
|
68
|
+
--s-icon: url("@material-symbols/svg-700/sharp/sort-fill.svg");
|
|
69
|
+
}
|
|
70
|
+
.icon-refresh {
|
|
71
|
+
--s-icon: url("@material-symbols/svg-700/sharp/refresh-fill.svg");
|
|
72
|
+
}
|
|
73
|
+
.icon-download {
|
|
74
|
+
--s-icon: url("@material-symbols/svg-700/sharp/download-fill.svg");
|
|
75
|
+
}
|
|
76
|
+
.icon-upload {
|
|
77
|
+
--s-icon: url("@material-symbols/svg-700/sharp/upload-fill.svg");
|
|
78
|
+
}
|
|
79
|
+
.icon-share {
|
|
80
|
+
--s-icon: url("@material-symbols/svg-700/sharp/share-fill.svg");
|
|
81
|
+
}
|
|
82
|
+
.icon-content-copy {
|
|
83
|
+
--s-icon: url("@material-symbols/svg-700/sharp/content_copy-fill.svg");
|
|
84
|
+
}
|
|
85
|
+
.icon-link {
|
|
86
|
+
--s-icon: url("@material-symbols/svg-700/sharp/link-fill.svg");
|
|
87
|
+
}
|
|
88
|
+
.icon-open-in-new {
|
|
89
|
+
--s-icon: url("@material-symbols/svg-700/sharp/open_in_new-fill.svg");
|
|
90
|
+
}
|
|
91
|
+
.icon-info {
|
|
92
|
+
--s-icon: url("@material-symbols/svg-700/sharp/info-fill.svg");
|
|
93
|
+
}
|
|
94
|
+
.icon-warning {
|
|
95
|
+
--s-icon: url("@material-symbols/svg-700/sharp/warning-fill.svg");
|
|
96
|
+
}
|
|
97
|
+
.icon-error {
|
|
98
|
+
--s-icon: url("@material-symbols/svg-700/sharp/error-fill.svg");
|
|
99
|
+
}
|
|
100
|
+
.icon-check-circle {
|
|
101
|
+
--s-icon: url("@material-symbols/svg-700/sharp/check_circle-fill.svg");
|
|
102
|
+
}
|
|
103
|
+
.icon-help {
|
|
104
|
+
--s-icon: url("@material-symbols/svg-700/sharp/help-fill.svg");
|
|
105
|
+
}
|
|
106
|
+
.icon-home {
|
|
107
|
+
--s-icon: url("@material-symbols/svg-700/sharp/home-fill.svg");
|
|
108
|
+
}
|
|
109
|
+
.icon-person {
|
|
110
|
+
--s-icon: url("@material-symbols/svg-700/sharp/person-fill.svg");
|
|
111
|
+
}
|
|
112
|
+
.icon-group {
|
|
113
|
+
--s-icon: url("@material-symbols/svg-700/sharp/group-fill.svg");
|
|
114
|
+
}
|
|
115
|
+
.icon-mail {
|
|
116
|
+
--s-icon: url("@material-symbols/svg-700/sharp/mail-fill.svg");
|
|
117
|
+
}
|
|
118
|
+
.icon-calendar-today {
|
|
119
|
+
--s-icon: url("@material-symbols/svg-700/sharp/calendar_today-fill.svg");
|
|
120
|
+
}
|
|
121
|
+
.icon-schedule {
|
|
122
|
+
--s-icon: url("@material-symbols/svg-700/sharp/schedule-fill.svg");
|
|
123
|
+
}
|
|
124
|
+
.icon-location-on {
|
|
125
|
+
--s-icon: url("@material-symbols/svg-700/sharp/location_on-fill.svg");
|
|
126
|
+
}
|
|
127
|
+
.icon-call {
|
|
128
|
+
--s-icon: url("@material-symbols/svg-700/sharp/call-fill.svg");
|
|
129
|
+
}
|
|
130
|
+
.icon-description {
|
|
131
|
+
--s-icon: url("@material-symbols/svg-700/sharp/description-fill.svg");
|
|
132
|
+
}
|
|
133
|
+
.icon-folder {
|
|
134
|
+
--s-icon: url("@material-symbols/svg-700/sharp/folder-fill.svg");
|
|
135
|
+
}
|
|
136
|
+
.icon-image {
|
|
137
|
+
--s-icon: url("@material-symbols/svg-700/sharp/image-fill.svg");
|
|
138
|
+
}
|
|
139
|
+
.icon-attach-file {
|
|
140
|
+
--s-icon: url("@material-symbols/svg-700/sharp/attach_file-fill.svg");
|
|
141
|
+
}
|
|
142
|
+
.icon-star {
|
|
143
|
+
--s-icon: url("@material-symbols/svg-700/sharp/star-fill.svg");
|
|
144
|
+
}
|
|
145
|
+
.icon-favorite {
|
|
146
|
+
--s-icon: url("@material-symbols/svg-700/sharp/favorite-fill.svg");
|
|
147
|
+
}
|
|
148
|
+
.icon-bookmark {
|
|
149
|
+
--s-icon: url("@material-symbols/svg-700/sharp/bookmark-fill.svg");
|
|
150
|
+
}
|
|
151
|
+
.icon-lock {
|
|
152
|
+
--s-icon: url("@material-symbols/svg-700/sharp/lock-fill.svg");
|
|
153
|
+
}
|
|
154
|
+
.icon-visibility {
|
|
155
|
+
--s-icon: url("@material-symbols/svg-700/sharp/visibility-fill.svg");
|
|
156
|
+
}
|
|
157
|
+
.icon-visibility-off {
|
|
158
|
+
--s-icon: url("@material-symbols/svg-700/sharp/visibility_off-fill.svg");
|
|
159
|
+
}
|
|
160
|
+
.icon-notifications {
|
|
161
|
+
--s-icon: url("@material-symbols/svg-700/sharp/notifications-fill.svg");
|
|
162
|
+
}
|
|
163
|
+
.icon-send {
|
|
164
|
+
--s-icon: url("@material-symbols/svg-700/sharp/send-fill.svg");
|
|
165
|
+
}
|
|
166
|
+
.icon-print {
|
|
167
|
+
--s-icon: url("@material-symbols/svg-700/sharp/print-fill.svg");
|
|
168
|
+
}
|
|
169
|
+
.icon-save {
|
|
170
|
+
--s-icon: url("@material-symbols/svg-700/sharp/save-fill.svg");
|
|
171
|
+
}
|
|
172
|
+
.icon-language {
|
|
173
|
+
--s-icon: url("@material-symbols/svg-700/sharp/language-fill.svg");
|
|
174
|
+
}
|
|
175
|
+
.icon-palette {
|
|
176
|
+
--s-icon: url("@material-symbols/svg-700/sharp/palette-fill.svg");
|
|
177
|
+
}
|
|
178
|
+
.icon-code {
|
|
179
|
+
--s-icon: url("@material-symbols/svg-700/sharp/code-fill.svg");
|
|
180
|
+
}
|
|
181
|
+
.icon-menu-book {
|
|
182
|
+
--s-icon: url("@material-symbols/svg-700/sharp/menu_book-fill.svg");
|
|
183
|
+
}
|
|
184
|
+
.icon-grid-view {
|
|
185
|
+
--s-icon: url("@material-symbols/svg-700/sharp/grid_view-fill.svg");
|
|
186
|
+
}
|
|
187
|
+
.icon-dashboard {
|
|
188
|
+
--s-icon: url("@material-symbols/svg-700/sharp/dashboard-fill.svg");
|
|
189
|
+
}
|
|
190
|
+
.icon-widgets {
|
|
191
|
+
--s-icon: url("@material-symbols/svg-700/sharp/widgets-fill.svg");
|
|
192
|
+
}
|
|
193
|
+
.icon-title {
|
|
194
|
+
--s-icon: url("@material-symbols/svg-700/sharp/title-fill.svg");
|
|
195
|
+
}
|
|
196
|
+
.icon-layers {
|
|
197
|
+
--s-icon: url("@material-symbols/svg-700/sharp/layers-fill.svg");
|
|
198
|
+
}
|
|
199
|
+
.icon-touch-app {
|
|
200
|
+
--s-icon: url("@material-symbols/svg-700/sharp/touch_app-fill.svg");
|
|
201
|
+
}
|
|
202
|
+
.icon-animation {
|
|
203
|
+
--s-icon: url("@material-symbols/svg-700/sharp/animation-fill.svg");
|
|
204
|
+
}
|
|
205
|
+
.icon-map {
|
|
206
|
+
--s-icon: url("@material-symbols/svg-700/sharp/map-fill.svg");
|
|
207
|
+
}
|
|
208
|
+
.icon-explore {
|
|
209
|
+
--s-icon: url("@material-symbols/svg-700/sharp/explore-fill.svg");
|
|
210
|
+
}
|
|
211
|
+
.icon-flag {
|
|
212
|
+
--s-icon: url("@material-symbols/svg-700/sharp/flag-fill.svg");
|
|
213
|
+
}
|
|
214
|
+
.icon-bolt {
|
|
215
|
+
--s-icon: url("@material-symbols/svg-700/sharp/bolt-fill.svg");
|
|
216
|
+
}
|
|
217
|
+
.icon-keyboard {
|
|
218
|
+
--s-icon: url("@material-symbols/svg-700/sharp/keyboard-fill.svg");
|
|
219
|
+
}
|
|
220
|
+
.icon-verified {
|
|
221
|
+
--s-icon: url("@material-symbols/svg-700/sharp/verified-fill.svg");
|
|
222
|
+
}
|
|
223
|
+
.icon-account-balance {
|
|
224
|
+
--s-icon: url("@material-symbols/svg-700/sharp/account_balance-fill.svg");
|
|
225
|
+
}
|
|
226
|
+
.icon-credit-card {
|
|
227
|
+
--s-icon: url("@material-symbols/svg-700/sharp/credit_card-fill.svg");
|
|
228
|
+
}
|
|
229
|
+
.icon-payments {
|
|
230
|
+
--s-icon: url("@material-symbols/svg-700/sharp/payments-fill.svg");
|
|
231
|
+
}
|
|
232
|
+
.icon-savings {
|
|
233
|
+
--s-icon: url("@material-symbols/svg-700/sharp/savings-fill.svg");
|
|
234
|
+
}
|
|
235
|
+
.icon-swap-horiz {
|
|
236
|
+
--s-icon: url("@material-symbols/svg-700/sharp/swap_horiz-fill.svg");
|
|
237
|
+
}
|
|
238
|
+
.icon-receipt-long {
|
|
239
|
+
--s-icon: url("@material-symbols/svg-700/sharp/receipt_long-fill.svg");
|
|
240
|
+
}
|
|
241
|
+
.icon-account-balance-wallet {
|
|
242
|
+
--s-icon: url("@material-symbols/svg-700/sharp/account_balance_wallet-fill.svg");
|
|
243
|
+
}
|
|
244
|
+
.icon-logout {
|
|
245
|
+
--s-icon: url("@material-symbols/svg-700/sharp/logout-fill.svg");
|
|
246
|
+
}
|
|
247
|
+
.icon-shield {
|
|
248
|
+
--s-icon: url("@material-symbols/svg-700/sharp/shield-fill.svg");
|
|
249
|
+
}
|
|
250
|
+
.icon-ac-unit {
|
|
251
|
+
--s-icon: url("@material-symbols/svg-700/sharp/ac_unit-fill.svg");
|
|
252
|
+
}
|
|
253
|
+
.icon-bar-chart {
|
|
254
|
+
--s-icon: url("@material-symbols/svg-700/sharp/bar_chart-fill.svg");
|
|
255
|
+
}
|
|
256
|
+
.icon-contactless {
|
|
257
|
+
--s-icon: url("@material-symbols/svg-700/sharp/contactless-fill.svg");
|
|
258
|
+
}
|
|
259
|
+
.icon-shopping-cart {
|
|
260
|
+
--s-icon: url("@material-symbols/svg-700/sharp/shopping_cart-fill.svg");
|
|
261
|
+
}
|
|
262
|
+
.icon-restaurant {
|
|
263
|
+
--s-icon: url("@material-symbols/svg-700/sharp/restaurant-fill.svg");
|
|
264
|
+
}
|
|
265
|
+
.icon-directions-bus {
|
|
266
|
+
--s-icon: url("@material-symbols/svg-700/sharp/directions_bus-fill.svg");
|
|
267
|
+
}
|
|
268
|
+
.icon-storefront {
|
|
269
|
+
--s-icon: url("@material-symbols/svg-700/sharp/storefront-fill.svg");
|
|
270
|
+
}
|
|
271
|
+
.icon-work {
|
|
272
|
+
--s-icon: url("@material-symbols/svg-700/sharp/work-fill.svg");
|
|
273
|
+
}
|
|
274
|
+
.icon-key {
|
|
275
|
+
--s-icon: url("@material-symbols/svg-700/sharp/key-fill.svg");
|
|
276
|
+
}
|
|
277
|
+
.icon-public {
|
|
278
|
+
--s-icon: url("@material-symbols/svg-700/sharp/public-fill.svg");
|
|
279
|
+
}
|
|
280
|
+
.icon-pause {
|
|
281
|
+
--s-icon: url("@material-symbols/svg-700/sharp/pause-fill.svg");
|
|
282
|
+
}
|
|
283
|
+
.icon-play-arrow {
|
|
284
|
+
--s-icon: url("@material-symbols/svg-700/sharp/play_arrow-fill.svg");
|
|
285
|
+
}
|
|
286
|
+
.icon-block {
|
|
287
|
+
--s-icon: url("@material-symbols/svg-700/sharp/block-fill.svg");
|
|
288
|
+
}
|
|
289
|
+
.icon-history {
|
|
290
|
+
--s-icon: url("@material-symbols/svg-700/sharp/history-fill.svg");
|
|
291
|
+
}
|
|
292
|
+
.icon-local-cafe {
|
|
293
|
+
--s-icon: url("@material-symbols/svg-700/sharp/local_cafe-fill.svg");
|
|
294
|
+
}
|
|
295
|
+
.icon-bakery-dining {
|
|
296
|
+
--s-icon: url("@material-symbols/svg-700/sharp/bakery_dining-fill.svg");
|
|
297
|
+
}
|
|
298
|
+
.icon-lunch-dining {
|
|
299
|
+
--s-icon: url("@material-symbols/svg-700/sharp/lunch_dining-fill.svg");
|
|
300
|
+
}
|
|
301
|
+
.icon-icecream {
|
|
302
|
+
--s-icon: url("@material-symbols/svg-700/sharp/icecream-fill.svg");
|
|
303
|
+
}
|
|
304
|
+
.icon-local-bar {
|
|
305
|
+
--s-icon: url("@material-symbols/svg-700/sharp/local_bar-fill.svg");
|
|
306
|
+
}
|
|
307
|
+
.icon-redeem {
|
|
308
|
+
--s-icon: url("@material-symbols/svg-700/sharp/redeem-fill.svg");
|
|
309
|
+
}
|
|
310
|
+
.icon-qr-code-2 {
|
|
311
|
+
--s-icon: url("@material-symbols/svg-700/sharp/qr_code_2-fill.svg");
|
|
312
|
+
}
|
|
313
|
+
.icon-takeout-dining {
|
|
314
|
+
--s-icon: url("@material-symbols/svg-700/sharp/takeout_dining-fill.svg");
|
|
315
|
+
}
|
|
316
|
+
.icon-table-restaurant {
|
|
317
|
+
--s-icon: url("@material-symbols/svg-700/sharp/table_restaurant-fill.svg");
|
|
318
|
+
}
|
|
319
|
+
.icon-eco {
|
|
320
|
+
--s-icon: url("@material-symbols/svg-700/sharp/eco-fill.svg");
|
|
321
|
+
}
|
|
322
|
+
.icon-shopping-bag {
|
|
323
|
+
--s-icon: url("@material-symbols/svg-700/sharp/shopping_bag-fill.svg");
|
|
324
|
+
}
|
|
325
|
+
.icon-loyalty {
|
|
326
|
+
--s-icon: url("@material-symbols/svg-700/sharp/loyalty-fill.svg");
|
|
327
|
+
}
|
|
328
|
+
.icon-arrow-back {
|
|
329
|
+
--s-icon: url("@material-symbols/svg-700/sharp/arrow_back-fill.svg");
|
|
330
|
+
}
|
|
331
|
+
.icon-article {
|
|
332
|
+
--s-icon: url("@material-symbols/svg-700/sharp/article-fill.svg");
|
|
333
|
+
}
|
|
334
|
+
.icon-chat {
|
|
335
|
+
--s-icon: url("@material-symbols/svg-700/sharp/chat-fill.svg");
|
|
336
|
+
}
|
|
337
|
+
.icon-sell {
|
|
338
|
+
--s-icon: url("@material-symbols/svg-700/sharp/sell-fill.svg");
|
|
339
|
+
}
|
|
340
|
+
.icon-rss-feed {
|
|
341
|
+
--s-icon: url("@material-symbols/svg-700/sharp/rss_feed-fill.svg");
|
|
342
|
+
}
|
|
343
|
+
.icon-inventory-2 {
|
|
344
|
+
--s-icon: url("@material-symbols/svg-700/sharp/inventory_2-fill.svg");
|
|
345
|
+
}
|
|
346
|
+
.icon-edit-note {
|
|
347
|
+
--s-icon: url("@material-symbols/svg-700/sharp/edit_note-fill.svg");
|
|
348
|
+
}
|
|
349
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "icon": string;
|
|
3
|
+
readonly "icon-ac-unit": string;
|
|
4
|
+
readonly "icon-account-balance": string;
|
|
5
|
+
readonly "icon-account-balance-wallet": string;
|
|
6
|
+
readonly "icon-add": string;
|
|
7
|
+
readonly "icon-animation": string;
|
|
8
|
+
readonly "icon-arrow-back": string;
|
|
9
|
+
readonly "icon-article": string;
|
|
10
|
+
readonly "icon-attach-file": string;
|
|
11
|
+
readonly "icon-bakery-dining": string;
|
|
12
|
+
readonly "icon-bar-chart": string;
|
|
13
|
+
readonly "icon-block": string;
|
|
14
|
+
readonly "icon-bolt": string;
|
|
15
|
+
readonly "icon-bookmark": string;
|
|
16
|
+
readonly "icon-calendar-today": string;
|
|
17
|
+
readonly "icon-call": string;
|
|
18
|
+
readonly "icon-chat": string;
|
|
19
|
+
readonly "icon-check": string;
|
|
20
|
+
readonly "icon-check-circle": string;
|
|
21
|
+
readonly "icon-close": string;
|
|
22
|
+
readonly "icon-code": string;
|
|
23
|
+
readonly "icon-contactless": string;
|
|
24
|
+
readonly "icon-content-copy": string;
|
|
25
|
+
readonly "icon-credit-card": string;
|
|
26
|
+
readonly "icon-dashboard": string;
|
|
27
|
+
readonly "icon-delete": string;
|
|
28
|
+
readonly "icon-description": string;
|
|
29
|
+
readonly "icon-directions-bus": string;
|
|
30
|
+
readonly "icon-download": string;
|
|
31
|
+
readonly "icon-eco": string;
|
|
32
|
+
readonly "icon-edit": string;
|
|
33
|
+
readonly "icon-edit-note": string;
|
|
34
|
+
readonly "icon-error": string;
|
|
35
|
+
readonly "icon-explore": string;
|
|
36
|
+
readonly "icon-favorite": string;
|
|
37
|
+
readonly "icon-filter-list": string;
|
|
38
|
+
readonly "icon-flag": string;
|
|
39
|
+
readonly "icon-folder": string;
|
|
40
|
+
readonly "icon-grid-view": string;
|
|
41
|
+
readonly "icon-group": string;
|
|
42
|
+
readonly "icon-help": string;
|
|
43
|
+
readonly "icon-history": string;
|
|
44
|
+
readonly "icon-home": string;
|
|
45
|
+
readonly "icon-icecream": string;
|
|
46
|
+
readonly "icon-image": string;
|
|
47
|
+
readonly "icon-info": string;
|
|
48
|
+
readonly "icon-inventory-2": string;
|
|
49
|
+
readonly "icon-key": string;
|
|
50
|
+
readonly "icon-keyboard": string;
|
|
51
|
+
readonly "icon-language": string;
|
|
52
|
+
readonly "icon-layers": string;
|
|
53
|
+
readonly "icon-link": string;
|
|
54
|
+
readonly "icon-local-bar": string;
|
|
55
|
+
readonly "icon-local-cafe": string;
|
|
56
|
+
readonly "icon-location-on": string;
|
|
57
|
+
readonly "icon-lock": string;
|
|
58
|
+
readonly "icon-logout": string;
|
|
59
|
+
readonly "icon-loyalty": string;
|
|
60
|
+
readonly "icon-lunch-dining": string;
|
|
61
|
+
readonly "icon-mail": string;
|
|
62
|
+
readonly "icon-map": string;
|
|
63
|
+
readonly "icon-menu": string;
|
|
64
|
+
readonly "icon-menu-book": string;
|
|
65
|
+
readonly "icon-more-horiz": string;
|
|
66
|
+
readonly "icon-notifications": string;
|
|
67
|
+
readonly "icon-open-in-new": string;
|
|
68
|
+
readonly "icon-palette": string;
|
|
69
|
+
readonly "icon-pause": string;
|
|
70
|
+
readonly "icon-payments": string;
|
|
71
|
+
readonly "icon-person": string;
|
|
72
|
+
readonly "icon-play-arrow": string;
|
|
73
|
+
readonly "icon-print": string;
|
|
74
|
+
readonly "icon-public": string;
|
|
75
|
+
readonly "icon-qr-code-2": string;
|
|
76
|
+
readonly "icon-receipt-long": string;
|
|
77
|
+
readonly "icon-redeem": string;
|
|
78
|
+
readonly "icon-refresh": string;
|
|
79
|
+
readonly "icon-remove": string;
|
|
80
|
+
readonly "icon-restaurant": string;
|
|
81
|
+
readonly "icon-rss-feed": string;
|
|
82
|
+
readonly "icon-save": string;
|
|
83
|
+
readonly "icon-savings": string;
|
|
84
|
+
readonly "icon-schedule": string;
|
|
85
|
+
readonly "icon-search": string;
|
|
86
|
+
readonly "icon-sell": string;
|
|
87
|
+
readonly "icon-send": string;
|
|
88
|
+
readonly "icon-settings": string;
|
|
89
|
+
readonly "icon-share": string;
|
|
90
|
+
readonly "icon-shield": string;
|
|
91
|
+
readonly "icon-shopping-bag": string;
|
|
92
|
+
readonly "icon-shopping-cart": string;
|
|
93
|
+
readonly "icon-sort": string;
|
|
94
|
+
readonly "icon-star": string;
|
|
95
|
+
readonly "icon-storefront": string;
|
|
96
|
+
readonly "icon-swap-horiz": string;
|
|
97
|
+
readonly "icon-table-restaurant": string;
|
|
98
|
+
readonly "icon-takeout-dining": string;
|
|
99
|
+
readonly "icon-title": string;
|
|
100
|
+
readonly "icon-touch-app": string;
|
|
101
|
+
readonly "icon-tune": string;
|
|
102
|
+
readonly "icon-upload": string;
|
|
103
|
+
readonly "icon-verified": string;
|
|
104
|
+
readonly "icon-visibility": string;
|
|
105
|
+
readonly "icon-visibility-off": string;
|
|
106
|
+
readonly "icon-warning": string;
|
|
107
|
+
readonly "icon-widgets": string;
|
|
108
|
+
readonly "icon-work": string;
|
|
109
|
+
readonly "leads": string;
|
|
110
|
+
};
|
|
111
|
+
export = styles;
|
|
112
|
+
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `icon`: a pictogram.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.4.0
|
|
5
|
+
*/
|
|
6
|
+
import { Schema } from "effect"
|
|
7
|
+
import type { Html } from "effect/ui/html"
|
|
8
|
+
import { node, type Node } from "../../Node.ts"
|
|
9
|
+
import styles from "./icon.module.css"
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The pictograms: a small selection from Material Symbols, in its sharp,
|
|
13
|
+
* filled, bold style, under the family's own names. One that is missing is
|
|
14
|
+
* added here and to the stylesheet beside this file, where a name with no
|
|
15
|
+
* class doesn't compile.
|
|
16
|
+
*/
|
|
17
|
+
export const Icon = Schema.Literals([
|
|
18
|
+
"menu",
|
|
19
|
+
"close",
|
|
20
|
+
"search",
|
|
21
|
+
"add",
|
|
22
|
+
"remove",
|
|
23
|
+
"check",
|
|
24
|
+
"edit",
|
|
25
|
+
"delete",
|
|
26
|
+
"more-horiz",
|
|
27
|
+
"settings",
|
|
28
|
+
"tune",
|
|
29
|
+
"filter-list",
|
|
30
|
+
"sort",
|
|
31
|
+
"refresh",
|
|
32
|
+
"download",
|
|
33
|
+
"upload",
|
|
34
|
+
"share",
|
|
35
|
+
"content-copy",
|
|
36
|
+
"link",
|
|
37
|
+
"open-in-new",
|
|
38
|
+
"info",
|
|
39
|
+
"warning",
|
|
40
|
+
"error",
|
|
41
|
+
"check-circle",
|
|
42
|
+
"help",
|
|
43
|
+
"home",
|
|
44
|
+
"person",
|
|
45
|
+
"group",
|
|
46
|
+
"mail",
|
|
47
|
+
"calendar-today",
|
|
48
|
+
"schedule",
|
|
49
|
+
"location-on",
|
|
50
|
+
"call",
|
|
51
|
+
"description",
|
|
52
|
+
"folder",
|
|
53
|
+
"image",
|
|
54
|
+
"attach-file",
|
|
55
|
+
"star",
|
|
56
|
+
"favorite",
|
|
57
|
+
"bookmark",
|
|
58
|
+
"lock",
|
|
59
|
+
"visibility",
|
|
60
|
+
"visibility-off",
|
|
61
|
+
"notifications",
|
|
62
|
+
"send",
|
|
63
|
+
"print",
|
|
64
|
+
"save",
|
|
65
|
+
"language",
|
|
66
|
+
"palette",
|
|
67
|
+
"code",
|
|
68
|
+
"menu-book",
|
|
69
|
+
"grid-view",
|
|
70
|
+
"dashboard",
|
|
71
|
+
"widgets",
|
|
72
|
+
"title",
|
|
73
|
+
"layers",
|
|
74
|
+
"touch-app",
|
|
75
|
+
"animation",
|
|
76
|
+
"map",
|
|
77
|
+
"explore",
|
|
78
|
+
"flag",
|
|
79
|
+
"bolt",
|
|
80
|
+
"keyboard",
|
|
81
|
+
"verified",
|
|
82
|
+
"account-balance",
|
|
83
|
+
"credit-card",
|
|
84
|
+
"payments",
|
|
85
|
+
"savings",
|
|
86
|
+
"swap-horiz",
|
|
87
|
+
"receipt-long",
|
|
88
|
+
"account-balance-wallet",
|
|
89
|
+
"logout",
|
|
90
|
+
"shield",
|
|
91
|
+
"ac-unit",
|
|
92
|
+
"bar-chart",
|
|
93
|
+
"contactless",
|
|
94
|
+
"shopping-cart",
|
|
95
|
+
"restaurant",
|
|
96
|
+
"directions-bus",
|
|
97
|
+
"storefront",
|
|
98
|
+
"work",
|
|
99
|
+
"key",
|
|
100
|
+
"public",
|
|
101
|
+
"pause",
|
|
102
|
+
"play-arrow",
|
|
103
|
+
"block",
|
|
104
|
+
"history",
|
|
105
|
+
"arrow-back",
|
|
106
|
+
"local-cafe",
|
|
107
|
+
"bakery-dining",
|
|
108
|
+
"lunch-dining",
|
|
109
|
+
"icecream",
|
|
110
|
+
"local-bar",
|
|
111
|
+
"redeem",
|
|
112
|
+
"qr-code-2",
|
|
113
|
+
"takeout-dining",
|
|
114
|
+
"table-restaurant",
|
|
115
|
+
"eco",
|
|
116
|
+
"shopping-bag",
|
|
117
|
+
"loyalty",
|
|
118
|
+
"article",
|
|
119
|
+
"chat",
|
|
120
|
+
"sell",
|
|
121
|
+
"rss-feed",
|
|
122
|
+
"inventory-2",
|
|
123
|
+
"edit-note"
|
|
124
|
+
])
|
|
125
|
+
export type Icon = typeof Icon.Type
|
|
126
|
+
|
|
127
|
+
/** The pictogram itself, for a builder that has one in it. A screen reader reads it out only when it is given a label. One that `leads` a word keeps its distance from it. */
|
|
128
|
+
export const iconOf = <Msg>(h: Html.H<Msg>, name: Icon, label?: string, leads = false) =>
|
|
129
|
+
h.span
|
|
130
|
+
.class(styles.icon, styles[`icon-${name}`], leads && styles.leads)
|
|
131
|
+
.attr("role", label === undefined ? undefined : "img")
|
|
132
|
+
.attr("aria-label", label)
|
|
133
|
+
.attr("aria-hidden", label === undefined ? "true" : undefined)
|
|
134
|
+
|
|
135
|
+
/** A pictogram before words, with the space that separates it from them: half an em, with what the stylesheet adds. Nothing when there is none. */
|
|
136
|
+
export const leading = <Msg>(h: Html.H<Msg>, name: Icon | undefined) =>
|
|
137
|
+
name === undefined ? [] : [iconOf(h, name, undefined, true), " "]
|
|
138
|
+
|
|
139
|
+
export const icon = <Msg>(h: Html.H<Msg>) => ({
|
|
140
|
+
/**
|
|
141
|
+
* A pictogram, set in the line like a letter: as high as the text, and in
|
|
142
|
+
* its colour. It goes beside a word, not in place of one; when it stands
|
|
143
|
+
* alone, give it a label, which is what a screen reader reads out.
|
|
144
|
+
* Without one it stands before its word: write a space between the two,
|
|
145
|
+
* and it is as far from the word as the pictogram of a button is.
|
|
146
|
+
*/
|
|
147
|
+
icon: (name: Icon, label?: string): Node<"inline", Msg> => node(iconOf(h, name, label, label === undefined))
|
|
148
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* image: a picture, cropped to a ratio. */
|
|
2
|
+
|
|
3
|
+
@layer standard.layout {
|
|
4
|
+
.image {
|
|
5
|
+
display: block;
|
|
6
|
+
inline-size: 100%;
|
|
7
|
+
block-size: auto;
|
|
8
|
+
object-fit: cover;
|
|
9
|
+
background: var(--s-muted);
|
|
10
|
+
|
|
11
|
+
&.ratio-1x1 {
|
|
12
|
+
aspect-ratio: 1 / 1;
|
|
13
|
+
}
|
|
14
|
+
&.ratio-4x3 {
|
|
15
|
+
aspect-ratio: 4 / 3;
|
|
16
|
+
}
|
|
17
|
+
&.ratio-3x2 {
|
|
18
|
+
aspect-ratio: 3 / 2;
|
|
19
|
+
}
|
|
20
|
+
&.ratio-16x9 {
|
|
21
|
+
aspect-ratio: 16 / 9;
|
|
22
|
+
}
|
|
23
|
+
&.ratio-3x4 {
|
|
24
|
+
aspect-ratio: 3 / 4;
|
|
25
|
+
}
|
|
26
|
+
&.ratio-2x3 {
|
|
27
|
+
aspect-ratio: 2 / 3;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.figure {
|
|
32
|
+
display: grid;
|
|
33
|
+
gap: var(--s-unit);
|
|
34
|
+
|
|
35
|
+
& figcaption {
|
|
36
|
+
font-size: 0.875rem;
|
|
37
|
+
line-height: 1.5rem;
|
|
38
|
+
color: var(--s-muted);
|
|
39
|
+
max-inline-size: 68ch;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "figure": string;
|
|
3
|
+
readonly "image": string;
|
|
4
|
+
readonly "ratio-16x9": string;
|
|
5
|
+
readonly "ratio-1x1": string;
|
|
6
|
+
readonly "ratio-2x3": string;
|
|
7
|
+
readonly "ratio-3x2": string;
|
|
8
|
+
readonly "ratio-3x4": string;
|
|
9
|
+
readonly "ratio-4x3": string;
|
|
10
|
+
};
|
|
11
|
+
export = styles;
|
|
12
|
+
|