shelving 1.267.6 → 1.268.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -2
- package/ui/block/Address.module.css +4 -4
- package/ui/block/Blockquote.module.css +5 -5
- package/ui/block/Caption.module.css +5 -4
- package/ui/block/Card.module.css +7 -7
- package/ui/block/Definitions.module.css +6 -5
- package/ui/block/Details.module.css +9 -7
- package/ui/block/Divider.module.css +4 -4
- package/ui/block/Heading.module.css +5 -6
- package/ui/block/Image.module.css +2 -2
- package/ui/block/Label.module.css +4 -4
- package/ui/block/List.module.css +6 -5
- package/ui/block/Panel.module.css +5 -4
- package/ui/block/Paragraph.module.css +2 -2
- package/ui/block/Preformatted.module.css +12 -12
- package/ui/block/Prose.js +2 -1
- package/ui/block/Prose.md +1 -1
- package/ui/block/Prose.tsx +2 -0
- package/ui/block/Section.module.css +6 -6
- package/ui/block/Subheading.module.css +5 -6
- package/ui/block/Title.module.css +5 -6
- package/ui/block/Video.module.css +7 -7
- package/ui/button/Button.module.css +15 -9
- package/ui/dialog/Dialog.module.css +6 -5
- package/ui/dialog/Modal.module.css +8 -8
- package/ui/form/Field.module.css +5 -4
- package/ui/form/Progress.d.ts +5 -1
- package/ui/form/Progress.js +6 -1
- package/ui/form/Progress.md +14 -0
- package/ui/form/Progress.module.css +58 -8
- package/ui/form/Progress.tsx +8 -3
- package/ui/inline/Code.module.css +5 -5
- package/ui/inline/Deleted.module.css +4 -4
- package/ui/inline/Emphasis.module.css +1 -1
- package/ui/inline/Inserted.module.css +4 -4
- package/ui/inline/Link.module.css +4 -4
- package/ui/inline/Mark.module.css +5 -5
- package/ui/inline/Small.module.css +2 -2
- package/ui/inline/Strong.module.css +2 -2
- package/ui/inline/Subscript.module.css +1 -1
- package/ui/inline/Superscript.module.css +1 -1
- package/ui/input/Input.module.css +14 -9
- package/ui/input/Popover.module.css +8 -10
- package/ui/layout/CenteredLayout.module.css +10 -12
- package/ui/layout/SidebarLayout.md +1 -11
- package/ui/layout/SidebarLayout.module.css +20 -13
- package/ui/layout/index.d.ts +0 -1
- package/ui/layout/index.js +0 -1
- package/ui/layout/index.tsx +0 -1
- package/ui/menu/Menu.module.css +9 -6
- package/ui/misc/Icon.module.css +3 -3
- package/ui/misc/Loading.module.css +2 -2
- package/ui/misc/Tag.module.css +8 -7
- package/ui/notice/Message.module.css +4 -4
- package/ui/notice/Notice.module.css +5 -5
- package/ui/notice/Notices.module.css +3 -3
- package/ui/style/Block.module.css +2 -1
- package/ui/style/Color.module.css +21 -11
- package/ui/style/Duration.module.css +3 -1
- package/ui/style/Flex.module.css +22 -3
- package/ui/style/Gap.module.css +19 -2
- package/ui/style/Indent.module.css +19 -2
- package/ui/style/Padding.module.css +19 -2
- package/ui/style/Radius.module.css +8 -1
- package/ui/style/Scroll.module.css +4 -3
- package/ui/style/Shadow.module.css +18 -8
- package/ui/style/Space.module.css +18 -1
- package/ui/style/Status.module.css +3 -3
- package/ui/style/Stroke.module.css +2 -1
- package/ui/style/Tint.module.css +2 -1
- package/ui/style/Typography.module.css +59 -2
- package/ui/style/Width.module.css +20 -2
- package/ui/table/Table.module.css +11 -5
- package/ui/transition/FadeTransition.css +6 -4
- package/ui/transition/HorizontalTransition.css +16 -12
- package/ui/transition/HorizontalTransition.js +1 -1
- package/ui/transition/HorizontalTransition.tsx +1 -1
- package/ui/transition/VerticalTransition.css +16 -12
- package/ui/transition/VerticalTransition.js +1 -1
- package/ui/transition/VerticalTransition.tsx +1 -1
- package/ui/layout/Layout.d.ts +0 -10
- package/ui/layout/Layout.js +0 -30
- package/ui/layout/Layout.ts +0 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shelving",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.268.0",
|
|
4
4
|
"author": "Dave Houlbrooke <dave@shax.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
"@types/bun": "^1.3.14",
|
|
16
16
|
"@types/react": "^19.2.17",
|
|
17
17
|
"@types/react-dom": "^19.2.3",
|
|
18
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
18
|
+
"@typescript/native-preview": "^7.0.0-dev.20260706.1",
|
|
19
19
|
"firebase": "^12.15.0",
|
|
20
20
|
"react": "^19.3.0-canary-fef12a01-20260413",
|
|
21
21
|
"react-dom": "^19.3.0-canary-fef12a01-20260413",
|
|
22
|
+
"stylelint": "^17.14.0",
|
|
23
|
+
"stylelint-config-standard": "^40.0.0",
|
|
22
24
|
"typescript": "^5.9.3"
|
|
23
25
|
},
|
|
24
26
|
"peerDependencies": {
|
|
@@ -68,9 +70,11 @@
|
|
|
68
70
|
"test": "bun run --parallel test:*",
|
|
69
71
|
"test:lint": "biome check .",
|
|
70
72
|
"test:type": "tsgo --noEmit",
|
|
73
|
+
"test:style": "stylelint \"modules/**/*.css\"",
|
|
71
74
|
"test:unit": "bun test ./modules --concurrent --only-failures",
|
|
72
75
|
"fix": "bun run --sequential fix:*",
|
|
73
76
|
"fix:0:lint": "biome check --write .",
|
|
77
|
+
"fix:1:style": "stylelint \"modules/**/*.css\" --fix",
|
|
74
78
|
"docs:build": "bun ./docs/build.tsx",
|
|
75
79
|
"docs:start": "bun ./docs/start.tsx",
|
|
76
80
|
"build": "bun run --sequential build:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Space.module.css";
|
|
4
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Color.module.css");
|
|
3
|
+
@import url("../style/Space.module.css");
|
|
4
|
+
@import url("../style/Typography.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.address,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Space.module.css";
|
|
3
|
-
@import "../style/Stroke.module.css";
|
|
4
|
-
@import "../style/Tint.module.css";
|
|
5
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Space.module.css");
|
|
3
|
+
@import url("../style/Stroke.module.css");
|
|
4
|
+
@import url("../style/Tint.module.css");
|
|
5
|
+
@import url("../style/Typography.module.css");
|
|
6
6
|
|
|
7
7
|
@layer components {
|
|
8
8
|
.blockquote,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Typography.module.css";
|
|
3
|
-
@import "../style/Space.module.css";
|
|
4
|
-
@import "../style/Color.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Typography.module.css");
|
|
3
|
+
@import url("../style/Space.module.css");
|
|
4
|
+
@import url("../style/Color.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.caption,
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
.prose figcaption + * {
|
|
23
23
|
margin-block-start: 0;
|
|
24
24
|
}
|
|
25
|
+
|
|
25
26
|
:has(+ .caption),
|
|
26
27
|
.prose :has(+ figcaption) {
|
|
27
28
|
margin-block-end: 0;
|
package/ui/block/Card.module.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Duration.module.css";
|
|
4
|
-
@import "../style/Radius.module.css";
|
|
5
|
-
@import "../style/Space.module.css";
|
|
6
|
-
@import "../style/Stroke.module.css";
|
|
7
|
-
@import "../style/Tint.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Color.module.css");
|
|
3
|
+
@import url("../style/Duration.module.css");
|
|
4
|
+
@import url("../style/Radius.module.css");
|
|
5
|
+
@import url("../style/Space.module.css");
|
|
6
|
+
@import url("../style/Stroke.module.css");
|
|
7
|
+
@import url("../style/Tint.module.css");
|
|
8
8
|
|
|
9
9
|
@layer defaults {
|
|
10
10
|
.card {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Space.module.css";
|
|
3
|
-
@import "../style/Typography.module.css";
|
|
4
|
-
@import "../style/Color.module.css";
|
|
5
|
-
@import "../style/Gap.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Space.module.css");
|
|
3
|
+
@import url("../style/Typography.module.css");
|
|
4
|
+
@import url("../style/Color.module.css");
|
|
5
|
+
@import url("../style/Gap.module.css");
|
|
6
6
|
|
|
7
7
|
@layer components {
|
|
8
8
|
.definitions,
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
display: block;
|
|
25
25
|
margin: 0;
|
|
26
26
|
}
|
|
27
|
+
|
|
27
28
|
dt {
|
|
28
29
|
/* Box */
|
|
29
30
|
margin-block-start: var(--definitions-gap, var(--space-small));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Space.module.css";
|
|
3
|
-
@import "../style/Radius.module.css";
|
|
4
|
-
@import "../style/Stroke.module.css";
|
|
5
|
-
@import "../style/Color.module.css";
|
|
6
|
-
@import "../style/Duration.module.css";
|
|
7
|
-
@import "../style/Tint.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Space.module.css");
|
|
3
|
+
@import url("../style/Radius.module.css");
|
|
4
|
+
@import url("../style/Stroke.module.css");
|
|
5
|
+
@import url("../style/Color.module.css");
|
|
6
|
+
@import url("../style/Duration.module.css");
|
|
7
|
+
@import url("../style/Tint.module.css");
|
|
8
8
|
|
|
9
9
|
@layer components {
|
|
10
10
|
.prose details,
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
&::marker {
|
|
38
38
|
color: var(--details-marker-color, var(--tint-80));
|
|
39
39
|
}
|
|
40
|
+
|
|
40
41
|
&::before {
|
|
41
42
|
position: absolute;
|
|
42
43
|
content: "";
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
transform: rotate(0deg);
|
|
101
102
|
}
|
|
102
103
|
}
|
|
104
|
+
|
|
103
105
|
&::details-content {
|
|
104
106
|
block-size: fit-content;
|
|
105
107
|
opacity: 1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Space.module.css";
|
|
3
|
-
@import "../style/Stroke.module.css";
|
|
4
|
-
@import "../style/Tint.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Space.module.css");
|
|
3
|
+
@import url("../style/Stroke.module.css");
|
|
4
|
+
@import url("../style/Tint.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.divider,
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Tint.module.css";
|
|
3
|
-
@import "../style/Color.module.css";
|
|
4
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Tint.module.css");
|
|
3
|
+
@import url("../style/Color.module.css");
|
|
4
|
+
@import url("../style/Typography.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.heading,
|
|
8
8
|
.prose h2 {
|
|
9
9
|
/* Box */
|
|
10
|
-
margin-block
|
|
11
|
-
margin-block-end: var(--heading-space, var(--space-paragraph));
|
|
10
|
+
margin-block: var(--heading-space-before, var(--space-section)) var(--heading-space, var(--space-paragraph));
|
|
12
11
|
|
|
13
12
|
/* Text */
|
|
14
13
|
font-family: var(--heading-font, var(--font-title));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Space.module.css";
|
|
3
|
-
@import "../style/Tint.module.css";
|
|
4
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Space.module.css");
|
|
3
|
+
@import url("../style/Tint.module.css");
|
|
4
|
+
@import url("../style/Typography.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.label {
|
package/ui/block/List.module.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Space.module.css";
|
|
3
|
-
@import "../style/Color.module.css";
|
|
4
|
-
@import "../style/Gap.module.css";
|
|
5
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Space.module.css");
|
|
3
|
+
@import url("../style/Color.module.css");
|
|
4
|
+
@import url("../style/Gap.module.css");
|
|
5
|
+
@import url("../style/Typography.module.css");
|
|
6
6
|
|
|
7
7
|
@layer components {
|
|
8
8
|
.unordered,
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
&:first-child {
|
|
45
45
|
margin-block-start: 0;
|
|
46
46
|
}
|
|
47
|
+
|
|
47
48
|
&:last-child {
|
|
48
49
|
margin-block-end: 0;
|
|
49
50
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Stroke.module.css";
|
|
3
|
-
@import "../style/Tint.module.css";
|
|
4
|
-
@import "../style/Space.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Stroke.module.css");
|
|
3
|
+
@import url("../style/Tint.module.css");
|
|
4
|
+
@import url("../style/Space.module.css");
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Full-width vertical region that paints the current surface. Panels always have zero block-space
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
&:first-child {
|
|
33
33
|
border-top: none;
|
|
34
34
|
}
|
|
35
|
+
|
|
35
36
|
&:last-child {
|
|
36
37
|
border-bottom: none;
|
|
37
38
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Duration.module.css";
|
|
4
|
-
@import "../style/Radius.module.css";
|
|
5
|
-
@import "../style/Space.module.css";
|
|
6
|
-
@import "../style/Stroke.module.css";
|
|
7
|
-
@import "../style/Width.module.css";
|
|
8
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Color.module.css");
|
|
3
|
+
@import url("../style/Duration.module.css");
|
|
4
|
+
@import url("../style/Radius.module.css");
|
|
5
|
+
@import url("../style/Space.module.css");
|
|
6
|
+
@import url("../style/Stroke.module.css");
|
|
7
|
+
@import url("../style/Width.module.css");
|
|
8
|
+
@import url("../style/Typography.module.css");
|
|
9
9
|
|
|
10
10
|
@layer components {
|
|
11
11
|
.preformatted,
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
outline-offset: calc(0px - var(--preformatted-stroke, var(--stroke-normal)));
|
|
30
30
|
|
|
31
31
|
/* Text */
|
|
32
|
-
font-family: var(--preformatted-font, var(--font-
|
|
33
|
-
font-weight: var(--preformatted-weight, var(--weight-
|
|
32
|
+
font-family: var(--preformatted-font, var(--font-code));
|
|
33
|
+
font-weight: var(--preformatted-weight, var(--weight-code));
|
|
34
34
|
font-size: var(--preformatted-size, var(--size-normal));
|
|
35
35
|
line-height: var(--preformatted-leading, var(--leading));
|
|
36
36
|
text-transform: none;
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
overflow-wrap: normal;
|
|
40
40
|
|
|
41
41
|
/* Scrolling */
|
|
42
|
-
overflow
|
|
43
|
-
overflow-x: auto;
|
|
42
|
+
overflow: auto hidden;
|
|
44
43
|
overscroll-behavior-x: none;
|
|
45
44
|
scroll-behavior: smooth;
|
|
46
45
|
|
|
@@ -59,6 +58,7 @@
|
|
|
59
58
|
&:first-child {
|
|
60
59
|
margin-block-start: 0;
|
|
61
60
|
}
|
|
61
|
+
|
|
62
62
|
&:last-child {
|
|
63
63
|
margin-block-end: 0;
|
|
64
64
|
}
|
package/ui/block/Prose.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import PROGRESS_CSS from "../form/Progress.module.css";
|
|
2
3
|
import CODE_CSS from "../inline/Code.module.css";
|
|
3
4
|
import DELETED_CSS from "../inline/Deleted.module.css";
|
|
4
5
|
import EMPHASIS_CSS from "../inline/Emphasis.module.css";
|
|
@@ -27,7 +28,7 @@ import SUBHEADING_CSS from "./Subheading.module.css";
|
|
|
27
28
|
import TITLE_CSS from "./Title.module.css";
|
|
28
29
|
import VIDEO_CSS from "./Video.module.css";
|
|
29
30
|
// Combine the `.prose` class from every block and inline component's CSS module into a single string.
|
|
30
|
-
const PROSE_STYLES = getClass(getModuleClass(BLOCK_CSS, "prose"), getModuleClass(VIDEO_CSS, "prose"), getModuleClass(PARAGRAPH_CSS, "prose"), getModuleClass(HEADING_CSS, "prose"), getModuleClass(SUBHEADING_CSS, "prose"), getModuleClass(ADDRESS_CSS, "prose"), getModuleClass(BLOCKQUOTE_CSS, "prose"), getModuleClass(SECTION_CSS, "prose"), getModuleClass(CODE_CSS, "prose"), getModuleClass(DEFINITIONS_CSS, "prose"), getModuleClass(DELETED_CSS, "prose"), getModuleClass(EMPHASIS_CSS, "prose"), getModuleClass(IMAGE_CSS, "prose"), getModuleClass(INSERTED_CSS, "prose"), getModuleClass(CAPTION_CSS, "prose"), getModuleClass(LIST_CSS, "prose"), getModuleClass(TITLE_CSS, "prose"), getModuleClass(LINK_CSS, "prose"), getModuleClass(MARK_CSS, "prose"), getModuleClass(PREFORMATTED_CSS, "prose"), getModuleClass(SMALL_CSS, "prose"), getModuleClass(STRONG_CSS, "prose"), getModuleClass(SUBSCRIPT_CSS, "prose"), getModuleClass(SUPERSCRIPT_CSS, "prose"), getModuleClass(TABLE_CSS, "prose"), getModuleClass(DIVIDER_CSS, "prose"));
|
|
31
|
+
const PROSE_STYLES = getClass(getModuleClass(BLOCK_CSS, "prose"), getModuleClass(VIDEO_CSS, "prose"), getModuleClass(PARAGRAPH_CSS, "prose"), getModuleClass(HEADING_CSS, "prose"), getModuleClass(SUBHEADING_CSS, "prose"), getModuleClass(ADDRESS_CSS, "prose"), getModuleClass(BLOCKQUOTE_CSS, "prose"), getModuleClass(SECTION_CSS, "prose"), getModuleClass(CODE_CSS, "prose"), getModuleClass(DEFINITIONS_CSS, "prose"), getModuleClass(DELETED_CSS, "prose"), getModuleClass(EMPHASIS_CSS, "prose"), getModuleClass(IMAGE_CSS, "prose"), getModuleClass(INSERTED_CSS, "prose"), getModuleClass(CAPTION_CSS, "prose"), getModuleClass(LIST_CSS, "prose"), getModuleClass(TITLE_CSS, "prose"), getModuleClass(LINK_CSS, "prose"), getModuleClass(MARK_CSS, "prose"), getModuleClass(PREFORMATTED_CSS, "prose"), getModuleClass(PROGRESS_CSS, "prose"), getModuleClass(SMALL_CSS, "prose"), getModuleClass(STRONG_CSS, "prose"), getModuleClass(SUBSCRIPT_CSS, "prose"), getModuleClass(SUPERSCRIPT_CSS, "prose"), getModuleClass(TABLE_CSS, "prose"), getModuleClass(DIVIDER_CSS, "prose"));
|
|
31
32
|
/**
|
|
32
33
|
* A section of longform text containing lots of `<p>` or `<ul>` style elements.
|
|
33
34
|
* - Applies the prose variant of every block and inline component so nested content picks up the right longform spacing and typography.
|
package/ui/block/Prose.md
CHANGED
|
@@ -4,7 +4,7 @@ A wrapper that applies cohesive longform typography to a subtree of mixed HTML c
|
|
|
4
4
|
|
|
5
5
|
**Things to know:**
|
|
6
6
|
|
|
7
|
-
- `Prose` applies the "prose" variant of *every* block and inline component as a single compound class, so raw `<p>`, `<ul>`, `<h2>`, `<code>`, `<a>`, etc. are styled to match their component counterparts (`<Paragraph>`, `<List>`, `<Heading>`, `<Code>`, `<Link>`, …).
|
|
7
|
+
- `Prose` applies the "prose" variant of *every* block and inline component as a single compound class, so raw `<p>`, `<ul>`, `<h2>`, `<code>`, `<a>`, `<progress>`, etc. are styled to match their component counterparts (`<Paragraph>`, `<List>`, `<Heading>`, `<Code>`, `<Link>`, `<Progress>`, …).
|
|
8
8
|
- This is the bridge for markup: wrap `shelving/markup` output (or anything that emits raw HTML) in `<Prose>` and it just works — no per-element component wrapping needed.
|
|
9
9
|
- It only sets up typography and its own outer margin; it paints no colour and adds no box of its own.
|
|
10
10
|
|
package/ui/block/Prose.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
+
import PROGRESS_CSS from "../form/Progress.module.css";
|
|
2
3
|
import CODE_CSS from "../inline/Code.module.css";
|
|
3
4
|
import DELETED_CSS from "../inline/Deleted.module.css";
|
|
4
5
|
import EMPHASIS_CSS from "../inline/Emphasis.module.css";
|
|
@@ -50,6 +51,7 @@ const PROSE_STYLES = getClass(
|
|
|
50
51
|
getModuleClass(LINK_CSS, "prose"),
|
|
51
52
|
getModuleClass(MARK_CSS, "prose"),
|
|
52
53
|
getModuleClass(PREFORMATTED_CSS, "prose"),
|
|
54
|
+
getModuleClass(PROGRESS_CSS, "prose"),
|
|
53
55
|
getModuleClass(SMALL_CSS, "prose"),
|
|
54
56
|
getModuleClass(STRONG_CSS, "prose"),
|
|
55
57
|
getModuleClass(SUBSCRIPT_CSS, "prose"),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Indent.module.css";
|
|
4
|
-
@import "../style/Typography.module.css";
|
|
5
|
-
@import "../style/Space.module.css";
|
|
6
|
-
@import "../style/Width.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Color.module.css");
|
|
3
|
+
@import url("../style/Indent.module.css");
|
|
4
|
+
@import url("../style/Typography.module.css");
|
|
5
|
+
@import url("../style/Space.module.css");
|
|
6
|
+
@import url("../style/Width.module.css");
|
|
7
7
|
|
|
8
8
|
@layer components {
|
|
9
9
|
.prose :where(section, article, aside, nav, header, footer, figure),
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Tint.module.css";
|
|
3
|
-
@import "../style/Color.module.css";
|
|
4
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Tint.module.css");
|
|
3
|
+
@import url("../style/Color.module.css");
|
|
4
|
+
@import url("../style/Typography.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.subheading,
|
|
8
8
|
.prose :is(h3, h4, h5, h6) {
|
|
9
9
|
/* Box */
|
|
10
|
-
margin-block
|
|
11
|
-
margin-block-end: var(--subheading-space, var(--space-paragraph));
|
|
10
|
+
margin-block: var(--subheading-space-before, var(--space-section)) var(--subheading-space, var(--space-paragraph));
|
|
12
11
|
|
|
13
12
|
/* Text */
|
|
14
13
|
font-family: var(--subheading-font, var(--font-title));
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Tint.module.css";
|
|
3
|
-
@import "../style/Color.module.css";
|
|
4
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Tint.module.css");
|
|
3
|
+
@import url("../style/Color.module.css");
|
|
4
|
+
@import url("../style/Typography.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.title,
|
|
8
8
|
.prose h1 {
|
|
9
9
|
/* Box */
|
|
10
|
-
margin-block
|
|
11
|
-
margin-block-end: var(--title-space, var(--space-paragraph));
|
|
10
|
+
margin-block: var(--title-space-before, var(--space-section)) var(--title-space, var(--space-paragraph));
|
|
12
11
|
|
|
13
12
|
/* Text */
|
|
14
13
|
font-family: var(--title-font, var(--font-title));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Duration.module.css";
|
|
4
|
-
@import "../style/Radius.module.css";
|
|
5
|
-
@import "../style/Shadow.module.css";
|
|
6
|
-
@import "../style/Space.module.css";
|
|
7
|
-
@import "../style/Stroke.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Color.module.css");
|
|
3
|
+
@import url("../style/Duration.module.css");
|
|
4
|
+
@import url("../style/Radius.module.css");
|
|
5
|
+
@import url("../style/Shadow.module.css");
|
|
6
|
+
@import url("../style/Space.module.css");
|
|
7
|
+
@import url("../style/Stroke.module.css");
|
|
8
8
|
|
|
9
9
|
@layer components {
|
|
10
10
|
.prose video,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Duration.module.css";
|
|
4
|
-
@import "../style/Radius.module.css";
|
|
5
|
-
@import "../style/Space.module.css";
|
|
6
|
-
@import "../style/Stroke.module.css";
|
|
7
|
-
@import "../style/Tint.module.css";
|
|
8
|
-
@import "../style/Typography.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Color.module.css");
|
|
3
|
+
@import url("../style/Duration.module.css");
|
|
4
|
+
@import url("../style/Radius.module.css");
|
|
5
|
+
@import url("../style/Space.module.css");
|
|
6
|
+
@import url("../style/Stroke.module.css");
|
|
7
|
+
@import url("../style/Tint.module.css");
|
|
8
|
+
@import url("../style/Typography.module.css");
|
|
9
9
|
|
|
10
10
|
@layer components {
|
|
11
11
|
.button {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
/* Content */
|
|
26
26
|
overflow: hidden;
|
|
27
|
-
|
|
27
|
+
overflow-wrap: break-word;
|
|
28
28
|
gap: var(--button-gap, var(--space-small));
|
|
29
29
|
justify-content: center;
|
|
30
30
|
align-items: center;
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
opacity: var(--button-disabled-opacity, 0.5);
|
|
51
51
|
cursor: default;
|
|
52
52
|
}
|
|
53
|
+
|
|
53
54
|
&:enabled:hover,
|
|
54
55
|
&:any-link:hover,
|
|
55
56
|
&:focus:not(:focus-visible) {
|
|
@@ -63,10 +64,12 @@
|
|
|
63
64
|
padding-block: var(--button-small-padding, var(--space-xxsmall));
|
|
64
65
|
padding-inline: var(--button-small-padding, var(--space-xxsmall));
|
|
65
66
|
}
|
|
67
|
+
|
|
66
68
|
&.full {
|
|
67
69
|
/* Fill the available width — basis becomes 100%, then shrinks (down to the content floor) to share a row. */
|
|
68
70
|
inline-size: 100%;
|
|
69
71
|
}
|
|
72
|
+
|
|
70
73
|
&.strong {
|
|
71
74
|
background: var(--button-strong-background, var(--tint-50));
|
|
72
75
|
color: var(--button-strong-text, var(--tint-100));
|
|
@@ -85,6 +88,7 @@
|
|
|
85
88
|
&:first-child {
|
|
86
89
|
margin-block-start: 0;
|
|
87
90
|
}
|
|
91
|
+
|
|
88
92
|
&:last-child {
|
|
89
93
|
margin-block-end: 0;
|
|
90
94
|
}
|
|
@@ -98,10 +102,12 @@
|
|
|
98
102
|
&.strong {
|
|
99
103
|
border-color: transparent;
|
|
100
104
|
}
|
|
105
|
+
|
|
101
106
|
&.plain:not(:enabled:hover, :any-link:hover, :focus) {
|
|
102
107
|
border-color: transparent;
|
|
103
108
|
background: transparent;
|
|
104
109
|
}
|
|
110
|
+
|
|
105
111
|
&.outline:not(:enabled:hover, :any-link:hover, :focus) {
|
|
106
112
|
background: transparent;
|
|
107
113
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Duration.module.css";
|
|
4
|
-
@import "../style/Space.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Color.module.css");
|
|
3
|
+
@import url("../style/Duration.module.css");
|
|
4
|
+
@import url("../style/Space.module.css");
|
|
5
|
+
@import url("../style/Shadow.module.css");
|
|
5
6
|
|
|
6
7
|
@layer components {
|
|
7
8
|
.dialog {
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
padding: var(--dialog-padding, var(--space-normal));
|
|
19
20
|
|
|
20
21
|
/* Style */
|
|
21
|
-
background: var(--dialog-color-overlay, var(--color
|
|
22
|
+
background: var(--dialog-color-overlay, var(--shadow-color));
|
|
22
23
|
opacity: 0;
|
|
23
24
|
transition: var(--dialog-transition, all var(--duration-fast));
|
|
24
25
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Duration.module.css";
|
|
3
|
-
@import "../style/Radius.module.css";
|
|
4
|
-
@import "../style/Shadow.module.css";
|
|
5
|
-
@import "../style/Space.module.css";
|
|
6
|
-
@import "../style/Stroke.module.css";
|
|
7
|
-
@import "../style/Tint.module.css";
|
|
8
|
-
@import "../style/Width.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Duration.module.css");
|
|
3
|
+
@import url("../style/Radius.module.css");
|
|
4
|
+
@import url("../style/Shadow.module.css");
|
|
5
|
+
@import url("../style/Space.module.css");
|
|
6
|
+
@import url("../style/Stroke.module.css");
|
|
7
|
+
@import url("../style/Tint.module.css");
|
|
8
|
+
@import url("../style/Width.module.css");
|
|
9
9
|
|
|
10
10
|
@layer components {
|
|
11
11
|
.modal {
|
package/ui/form/Field.module.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Typography.module.css";
|
|
3
|
-
@import "../style/Space.module.css";
|
|
4
|
-
@import "../style/Tint.module.css";
|
|
1
|
+
@import url("../style/layers.css");
|
|
2
|
+
@import url("../style/Typography.module.css");
|
|
3
|
+
@import url("../style/Space.module.css");
|
|
4
|
+
@import url("../style/Tint.module.css");
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
7
|
.field {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
font-weight: var(--field-title-weight, var(--weight-strong));
|
|
24
24
|
color: var(--field-title-color, var(--tint-00));
|
|
25
25
|
}
|
|
26
|
+
|
|
26
27
|
.description {
|
|
27
28
|
font-size: var(--field-description-size, var(--size-normal));
|
|
28
29
|
line-height: var(--field-description-leading, var(--leading));
|
package/ui/form/Progress.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
+
import { type Nullish } from "../../util/null.js";
|
|
2
3
|
import { type ColorVariants } from "../style/Color.js";
|
|
3
4
|
import { type StatusVariants } from "../style/Status.js";
|
|
4
5
|
/**
|
|
@@ -7,7 +8,8 @@ import { type StatusVariants } from "../style/Status.js";
|
|
|
7
8
|
* @see https://shelving.cc/ui/ProgressProps
|
|
8
9
|
*/
|
|
9
10
|
export interface ProgressProps extends ColorVariants, StatusVariants {
|
|
10
|
-
|
|
11
|
+
/** Position within the `min`–`max` range, or `null`/`undefined`/omitted for an indeterminate bar. */
|
|
12
|
+
value?: Nullish<number>;
|
|
11
13
|
min?: number;
|
|
12
14
|
max?: number;
|
|
13
15
|
}
|
|
@@ -16,12 +18,14 @@ export interface ProgressProps extends ColorVariants, StatusVariants {
|
|
|
16
18
|
* - Renders a native `<progress>` element, so `role="progressbar"` and the value/max semantics come from the browser.
|
|
17
19
|
* - `<progress>` has no `min` attribute (its implicit minimum is `0`), so the range is normalised to `value - min` / `max - min` before it's handed to the element.
|
|
18
20
|
* - The browser clamps `value` to the `0`–`max` range, so an out-of-range `value` shows an empty or full bar rather than overspilling.
|
|
21
|
+
* - Omit `value` (or pass `null`/`undefined`) to drop the attribute entirely — exactly as a native `<progress>` does, the element becomes `:indeterminate` (no `aria-valuenow`) and a block of fill colour flows across the track on a loop.
|
|
19
22
|
* - Paints from the tint ladder, so `color=` / `status=` recolour the fill (and track) by moving the tint anchor.
|
|
20
23
|
*
|
|
21
24
|
* @returns A progress bar element.
|
|
22
25
|
* @kind component
|
|
23
26
|
* @example <Progress value={3} max={4} />
|
|
24
27
|
* @example <Progress value={90} status="success" />
|
|
28
|
+
* @example <Progress />
|
|
25
29
|
* @see https://shelving.cc/ui/Progress
|
|
26
30
|
*/
|
|
27
31
|
export declare function Progress({ value, min, max, ...props }: ProgressProps): ReactElement;
|
package/ui/form/Progress.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { formatPercent } from "../../util/format.js";
|
|
3
|
+
import { notNullish } from "../../util/null.js";
|
|
3
4
|
import { getColorClass } from "../style/Color.js";
|
|
4
5
|
import { getStatusClass } from "../style/Status.js";
|
|
5
6
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
@@ -9,17 +10,21 @@ import styles from "./Progress.module.css";
|
|
|
9
10
|
* - Renders a native `<progress>` element, so `role="progressbar"` and the value/max semantics come from the browser.
|
|
10
11
|
* - `<progress>` has no `min` attribute (its implicit minimum is `0`), so the range is normalised to `value - min` / `max - min` before it's handed to the element.
|
|
11
12
|
* - The browser clamps `value` to the `0`–`max` range, so an out-of-range `value` shows an empty or full bar rather than overspilling.
|
|
13
|
+
* - Omit `value` (or pass `null`/`undefined`) to drop the attribute entirely — exactly as a native `<progress>` does, the element becomes `:indeterminate` (no `aria-valuenow`) and a block of fill colour flows across the track on a loop.
|
|
12
14
|
* - Paints from the tint ladder, so `color=` / `status=` recolour the fill (and track) by moving the tint anchor.
|
|
13
15
|
*
|
|
14
16
|
* @returns A progress bar element.
|
|
15
17
|
* @kind component
|
|
16
18
|
* @example <Progress value={3} max={4} />
|
|
17
19
|
* @example <Progress value={90} status="success" />
|
|
20
|
+
* @example <Progress />
|
|
18
21
|
* @see https://shelving.cc/ui/Progress
|
|
19
22
|
*/
|
|
20
23
|
export function Progress({ value, min = 0, max = 100, ...props }) {
|
|
21
24
|
// `<progress>` has no `min`, so shift the range to a `0`-based one. A non-positive span would make `<progress>` indeterminate, so fall back to an empty determinate bar.
|
|
22
25
|
const span = max - min;
|
|
23
26
|
return (_jsx("progress", { className: getClass(getModuleClass(styles, "progress"), //
|
|
24
|
-
getColorClass(props), getStatusClass(props)),
|
|
27
|
+
getColorClass(props), getStatusClass(props)),
|
|
28
|
+
// A nullish `value` drops the attribute (and its announced text) so the element is natively `:indeterminate` and the flowing animation styled off that pseudo-class takes over.
|
|
29
|
+
value: notNullish(value) ? (span > 0 ? value - min : 0) : undefined, max: span > 0 ? span : 1, "aria-valuetext": notNullish(value) ? formatPercent(value - min, max - min) : undefined }));
|
|
25
30
|
}
|