shelving 1.253.2 → 1.253.3
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 +3 -3
- package/ui/README.md +4 -4
- package/ui/app/App.d.ts +0 -12
- package/ui/app/App.js +0 -14
- package/ui/app/App.tsx +0 -14
- package/ui/block/Address.module.css +2 -0
- package/ui/block/Block.d.ts +7 -3
- package/ui/block/Block.js +2 -2
- package/ui/block/Block.module.css +4 -0
- package/ui/block/Block.tsx +8 -4
- package/ui/block/Blockquote.module.css +1 -1
- package/ui/block/Caption.module.css +2 -2
- package/ui/block/Card.d.ts +9 -2
- package/ui/block/Card.js +4 -3
- package/ui/block/Card.tsx +13 -5
- package/ui/block/Definitions.module.css +3 -4
- package/ui/block/Divider.module.css +1 -1
- package/ui/block/Heading.module.css +2 -3
- package/ui/block/Label.module.css +2 -4
- package/ui/block/List.module.css +3 -1
- package/ui/block/List.tsx +0 -1
- package/ui/block/Panel.d.ts +7 -7
- package/ui/block/Panel.js +2 -2
- package/ui/block/Panel.module.css +4 -1
- package/ui/block/Panel.tsx +11 -11
- package/ui/block/Paragraph.module.css +2 -0
- package/ui/block/Preformatted.module.css +2 -4
- package/ui/block/Section.d.ts +20 -29
- package/ui/block/Section.js +21 -33
- package/ui/block/Section.md +2 -2
- package/ui/block/Section.module.css +2 -0
- package/ui/block/Section.tsx +32 -46
- package/ui/block/Subheading.module.css +2 -3
- package/ui/block/Title.module.css +2 -3
- package/ui/block/Video.js +3 -1
- package/ui/block/Video.tsx +10 -1
- package/ui/form/Button.module.css +1 -3
- package/ui/form/Field.module.css +1 -2
- package/ui/form/Input.module.css +1 -3
- package/ui/inline/Code.module.css +1 -3
- package/ui/inline/Deleted.module.css +1 -1
- package/ui/inline/Inserted.module.css +1 -1
- package/ui/inline/Link.module.css +1 -1
- package/ui/inline/Mark.module.css +1 -1
- package/ui/inline/Small.module.css +1 -1
- package/ui/inline/Strong.module.css +1 -1
- package/ui/menu/Menu.module.css +1 -4
- package/ui/misc/Loading.module.css +1 -1
- package/ui/misc/StatusIcon.module.css +1 -1
- package/ui/misc/Tag.module.css +1 -3
- package/ui/notice/Message.module.css +1 -1
- package/ui/notice/Notice.module.css +1 -2
- package/ui/style/Flex.js +2 -1
- package/ui/style/Flex.module.css +1 -1
- package/ui/style/Flex.tsx +4 -1
- package/ui/style/Padding.js +1 -1
- package/ui/style/Padding.module.css +18 -18
- package/ui/style/Padding.tsx +1 -1
- package/ui/style/Radius.module.css +7 -8
- package/ui/style/Space.js +1 -1
- package/ui/style/Space.module.css +25 -26
- package/ui/style/Space.tsx +1 -1
- package/ui/style/Tint.d.ts +6 -0
- package/ui/style/Tint.module.css +0 -6
- package/ui/style/Tint.tsx +28 -0
- package/ui/style/Typography.d.ts +37 -32
- package/ui/style/Typography.js +4 -8
- package/ui/style/Typography.module.css +163 -0
- package/ui/style/Typography.tsx +47 -59
- package/ui/style/getRadiusClass.md +8 -9
- package/ui/style/getSpaceClass.md +9 -10
- package/ui/style/getTypographyClass.md +64 -0
- package/ui/style/index.d.ts +0 -3
- package/ui/style/index.js +0 -3
- package/ui/style/index.tsx +0 -3
- package/ui/style/layers.css +2 -2
- package/ui/table/Table.module.css +1 -3
- package/ui/style/Font.d.ts +0 -24
- package/ui/style/Font.js +0 -13
- package/ui/style/Font.module.css +0 -50
- package/ui/style/Font.tsx +0 -31
- package/ui/style/Size.d.ts +0 -24
- package/ui/style/Size.js +0 -13
- package/ui/style/Size.module.css +0 -69
- package/ui/style/Size.tsx +0 -31
- package/ui/style/Weight.d.ts +0 -24
- package/ui/style/Weight.js +0 -13
- package/ui/style/Weight.module.css +0 -42
- package/ui/style/Weight.tsx +0 -31
- package/ui/style/getFontClass.md +0 -32
- package/ui/style/getSizeClass.md +0 -35
- package/ui/style/getWeightClass.md +0 -18
package/ui/block/Section.js
CHANGED
|
@@ -17,13 +17,11 @@ const SECTION_CLASS = getModuleClass(SECTION_CSS, "section");
|
|
|
17
17
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/getSectionClass
|
|
18
18
|
*/
|
|
19
19
|
export function getSectionClass(variants) {
|
|
20
|
-
return getClass(SECTION_CLASS,
|
|
21
|
-
|
|
22
|
-
function renderSection(defaultComponent, { as: Component = defaultComponent, children, ...variants }) {
|
|
23
|
-
return _jsx(Component, { className: getSectionClass(variants), children: children });
|
|
20
|
+
return getClass(SECTION_CLASS, //
|
|
21
|
+
getColorClass(variants), getSpaceClass(variants), getTypographyClass(variants), getWidthClass(variants));
|
|
24
22
|
}
|
|
25
23
|
/**
|
|
26
|
-
* `<section>` block with
|
|
24
|
+
* `<section>` block with section-level spacing.
|
|
27
25
|
* - Pass `as` to render a different semantic element.
|
|
28
26
|
*
|
|
29
27
|
* @kind component
|
|
@@ -31,61 +29,51 @@ function renderSection(defaultComponent, { as: Component = defaultComponent, chi
|
|
|
31
29
|
* @example <Section><Heading>About</Heading></Section>
|
|
32
30
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Section
|
|
33
31
|
*/
|
|
34
|
-
export function Section(
|
|
35
|
-
return
|
|
32
|
+
export function Section({ as: Element = "section", children, ...variants }) {
|
|
33
|
+
return _jsx(Element, { className: getSectionClass(variants), children: children });
|
|
36
34
|
}
|
|
37
35
|
/**
|
|
38
|
-
* `<header>` block with
|
|
36
|
+
* `<header>` block with section-level spacing.
|
|
39
37
|
*
|
|
40
38
|
* @kind component
|
|
41
39
|
* @returns Rendered `<header>` element.
|
|
42
40
|
* @example <Header><Title>Welcome</Title></Header>
|
|
43
41
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Header
|
|
44
42
|
*/
|
|
45
|
-
export function Header(
|
|
46
|
-
return
|
|
43
|
+
export function Header({ as: Element = "section", children, ...variants }) {
|
|
44
|
+
return _jsx(Element, { className: getSectionClass(variants), children: children });
|
|
47
45
|
}
|
|
48
46
|
/**
|
|
49
|
-
* `<footer>` block with
|
|
47
|
+
* `<footer>` block with section-level spacing.
|
|
50
48
|
*
|
|
51
49
|
* @kind component
|
|
52
50
|
* @returns Rendered `<footer>` element.
|
|
53
51
|
* @example <Footer><Small>© 2026</Small></Footer>
|
|
54
52
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Footer
|
|
55
53
|
*/
|
|
56
|
-
export function Footer(
|
|
57
|
-
return
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* `<nav>` block with block-level spacing.
|
|
61
|
-
*
|
|
62
|
-
* @kind component
|
|
63
|
-
* @returns Rendered `<nav>` element.
|
|
64
|
-
* @example <Nav><Link href="/">Home</Link></Nav>
|
|
65
|
-
* @see https://dhoulb.github.io/shelving/ui/block/Section/Nav
|
|
66
|
-
*/
|
|
67
|
-
export function Nav(props) {
|
|
68
|
-
return renderSection("nav", props);
|
|
54
|
+
export function Footer({ as: Element = "section", children, ...variants }) {
|
|
55
|
+
return _jsx(Element, { className: getSectionClass(variants), children: children });
|
|
69
56
|
}
|
|
70
57
|
/**
|
|
71
|
-
* `<
|
|
58
|
+
* `<article>` block with section-level spacing.
|
|
59
|
+
* - Use a `<Card>` instead to display boxed content.
|
|
72
60
|
*
|
|
73
61
|
* @kind component
|
|
74
|
-
* @returns Rendered `<
|
|
75
|
-
* @
|
|
76
|
-
* @see https://dhoulb.github.io/shelving/ui/block/Section/Aside
|
|
62
|
+
* @returns Rendered `<article>` element.
|
|
63
|
+
* @see https://dhoulb.github.io/shelving/ui/block/Section/Article
|
|
77
64
|
*/
|
|
78
|
-
export function
|
|
79
|
-
return
|
|
65
|
+
export function Article({ as: Element = "article", children, ...variants }) {
|
|
66
|
+
return _jsx(Element, { className: getSectionClass(variants), children: children });
|
|
80
67
|
}
|
|
81
68
|
/**
|
|
82
|
-
* `<figure>` block with
|
|
69
|
+
* `<figure>` block with section-level spacing.
|
|
70
|
+
* - Pair with `<Caption>` for `<figcaption>` content.
|
|
83
71
|
*
|
|
84
72
|
* @kind component
|
|
85
73
|
* @returns Rendered `<figure>` element.
|
|
86
74
|
* @example <Figure><Image src="/cat.jpg" /><Caption>A cat</Caption></Figure>
|
|
87
75
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Figure
|
|
88
76
|
*/
|
|
89
|
-
export function Figure(
|
|
90
|
-
return
|
|
77
|
+
export function Figure({ as: Element = "figure", children, ...variants }) {
|
|
78
|
+
return _jsx(Element, { className: getSectionClass(variants), children: children });
|
|
91
79
|
}
|
package/ui/block/Section.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Section
|
|
2
2
|
|
|
3
|
-
A landmark content region — renders a `<section>` with block-level spacing and a constrained content width. `Section.tsx` exports the whole family of semantic landmarks (
|
|
3
|
+
A landmark content region — renders a `<section>` with block-level spacing and a constrained content width. `Section.tsx` exports the whole family of semantic landmarks (`<Section>`, `<Header>`, `<Footer>`, `<Figure>`) — they share `SectionProps` and differ only in the HTML element they render.
|
|
4
4
|
|
|
5
5
|
**Things to know:**
|
|
6
6
|
|
|
7
|
-
- Pick the component whose HTML element matches the semantic meaning rather than reaching for a generic `<Block>`. `<Section>` is a `<section>`, `<
|
|
7
|
+
- Pick the component whose HTML element matches the semantic meaning rather than reaching for a generic `<Block>`. `<Section>` is a `<section>`, `<Figure>` a `<figure>`, and so on.
|
|
8
8
|
- Every section centres its content and caps the line length so text never touches the viewport edges. Nested sections relax that cap so they can fill their parent.
|
|
9
9
|
- Sections default to the `--width-normal` content width, so most of the time you set no width at all. Pass `width="narrow"` / `"wide"` / `"full"` (or `"fit"`) to change that, and the usual `color` / `space` / typography variants to retint and respace.
|
|
10
10
|
- Pair `Figure` with `<Caption>` for a `<figure>` / `<figcaption>` pair.
|
package/ui/block/Section.tsx
CHANGED
|
@@ -5,24 +5,22 @@ import { getTypographyClass, type TypographyVariants } from "../style/Typography
|
|
|
5
5
|
import { getWidthClass, type WidthVariants } from "../style/Width.js";
|
|
6
6
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
7
7
|
import type { OptionalChildProps } from "../util/props.js";
|
|
8
|
+
import type { BlockElement } from "./Block.js";
|
|
8
9
|
import SECTION_CSS from "./Section.module.css";
|
|
9
10
|
|
|
10
11
|
const SECTION_CLASS = getModuleClass(SECTION_CSS, "section");
|
|
11
12
|
|
|
12
|
-
/**
|
|
13
|
-
* Semantic element names a `Section` may render as via its `as` prop.
|
|
14
|
-
*
|
|
15
|
-
* @see https://dhoulb.github.io/shelving/ui/block/Section/SectionElement
|
|
16
|
-
*/
|
|
17
|
-
export type SectionElement = "section" | "header" | "footer" | "nav" | "aside" | "figure";
|
|
18
|
-
|
|
19
13
|
/**
|
|
20
14
|
* Props for `Section` and its semantic siblings — colour, space, typography, and width variants plus an optional `as` element override.
|
|
21
15
|
*
|
|
22
16
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/SectionProps
|
|
23
17
|
*/
|
|
24
18
|
export interface SectionProps extends ColorVariants, SpaceVariants, TypographyVariants, WidthVariants, OptionalChildProps {
|
|
25
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Element this `<Section>` renders as, e.g. "header" to output a "<header>"
|
|
21
|
+
* @default "section"
|
|
22
|
+
*/
|
|
23
|
+
as?: BlockElement | undefined;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
/**
|
|
@@ -36,18 +34,17 @@ export interface SectionProps extends ColorVariants, SpaceVariants, TypographyVa
|
|
|
36
34
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/getSectionClass
|
|
37
35
|
*/
|
|
38
36
|
export function getSectionClass(variants: SectionProps): string {
|
|
39
|
-
return getClass(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
)
|
|
46
|
-
return <Component className={getSectionClass(variants)}>{children}</Component>;
|
|
37
|
+
return getClass(
|
|
38
|
+
SECTION_CLASS, //
|
|
39
|
+
getColorClass(variants),
|
|
40
|
+
getSpaceClass(variants),
|
|
41
|
+
getTypographyClass(variants),
|
|
42
|
+
getWidthClass(variants),
|
|
43
|
+
);
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
/**
|
|
50
|
-
* `<section>` block with
|
|
47
|
+
* `<section>` block with section-level spacing.
|
|
51
48
|
* - Pass `as` to render a different semantic element.
|
|
52
49
|
*
|
|
53
50
|
* @kind component
|
|
@@ -55,66 +52,55 @@ function renderSection(
|
|
|
55
52
|
* @example <Section><Heading>About</Heading></Section>
|
|
56
53
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Section
|
|
57
54
|
*/
|
|
58
|
-
export function Section(
|
|
59
|
-
return
|
|
55
|
+
export function Section({ as: Element = "section", children, ...variants }: SectionProps): ReactElement {
|
|
56
|
+
return <Element className={getSectionClass(variants)}>{children}</Element>;
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
/**
|
|
63
|
-
* `<header>` block with
|
|
60
|
+
* `<header>` block with section-level spacing.
|
|
64
61
|
*
|
|
65
62
|
* @kind component
|
|
66
63
|
* @returns Rendered `<header>` element.
|
|
67
64
|
* @example <Header><Title>Welcome</Title></Header>
|
|
68
65
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Header
|
|
69
66
|
*/
|
|
70
|
-
export function Header(
|
|
71
|
-
return
|
|
67
|
+
export function Header({ as: Element = "section", children, ...variants }: SectionProps): ReactElement {
|
|
68
|
+
return <Element className={getSectionClass(variants)}>{children}</Element>;
|
|
72
69
|
}
|
|
73
70
|
|
|
74
71
|
/**
|
|
75
|
-
* `<footer>` block with
|
|
72
|
+
* `<footer>` block with section-level spacing.
|
|
76
73
|
*
|
|
77
74
|
* @kind component
|
|
78
75
|
* @returns Rendered `<footer>` element.
|
|
79
76
|
* @example <Footer><Small>© 2026</Small></Footer>
|
|
80
77
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Footer
|
|
81
78
|
*/
|
|
82
|
-
export function Footer(
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* `<nav>` block with block-level spacing.
|
|
88
|
-
*
|
|
89
|
-
* @kind component
|
|
90
|
-
* @returns Rendered `<nav>` element.
|
|
91
|
-
* @example <Nav><Link href="/">Home</Link></Nav>
|
|
92
|
-
* @see https://dhoulb.github.io/shelving/ui/block/Section/Nav
|
|
93
|
-
*/
|
|
94
|
-
export function Nav(props: SectionProps): ReactElement {
|
|
95
|
-
return renderSection("nav", props);
|
|
79
|
+
export function Footer({ as: Element = "section", children, ...variants }: SectionProps): ReactElement {
|
|
80
|
+
return <Element className={getSectionClass(variants)}>{children}</Element>;
|
|
96
81
|
}
|
|
97
82
|
|
|
98
83
|
/**
|
|
99
|
-
* `<
|
|
84
|
+
* `<article>` block with section-level spacing.
|
|
85
|
+
* - Use a `<Card>` instead to display boxed content.
|
|
100
86
|
*
|
|
101
87
|
* @kind component
|
|
102
|
-
* @returns Rendered `<
|
|
103
|
-
* @
|
|
104
|
-
* @see https://dhoulb.github.io/shelving/ui/block/Section/Aside
|
|
88
|
+
* @returns Rendered `<article>` element.
|
|
89
|
+
* @see https://dhoulb.github.io/shelving/ui/block/Section/Article
|
|
105
90
|
*/
|
|
106
|
-
export function
|
|
107
|
-
return
|
|
91
|
+
export function Article({ as: Element = "article", children, ...variants }: SectionProps): ReactElement {
|
|
92
|
+
return <Element className={getSectionClass(variants)}>{children}</Element>;
|
|
108
93
|
}
|
|
109
94
|
|
|
110
95
|
/**
|
|
111
|
-
* `<figure>` block with
|
|
96
|
+
* `<figure>` block with section-level spacing.
|
|
97
|
+
* - Pair with `<Caption>` for `<figcaption>` content.
|
|
112
98
|
*
|
|
113
99
|
* @kind component
|
|
114
100
|
* @returns Rendered `<figure>` element.
|
|
115
101
|
* @example <Figure><Image src="/cat.jpg" /><Caption>A cat</Caption></Figure>
|
|
116
102
|
* @see https://dhoulb.github.io/shelving/ui/block/Section/Figure
|
|
117
103
|
*/
|
|
118
|
-
export function Figure(
|
|
119
|
-
return
|
|
104
|
+
export function Figure({ as: Element = "figure", children, ...variants }: SectionProps): ReactElement {
|
|
105
|
+
return <Element className={getSectionClass(variants)}>{children}</Element>;
|
|
120
106
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Font.module.css";
|
|
3
|
-
@import "../style/Size.module.css";
|
|
4
2
|
@import "../style/Space.module.css";
|
|
5
|
-
@import "../style/
|
|
3
|
+
@import "../style/Color.module.css";
|
|
4
|
+
@import "../style/Typography.module.css";
|
|
6
5
|
|
|
7
6
|
@layer components {
|
|
8
7
|
.subheading,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
|
-
@import "../style/
|
|
3
|
-
@import "../style/Size.module.css";
|
|
2
|
+
@import "../style/Color.module.css";
|
|
4
3
|
@import "../style/Space.module.css";
|
|
5
|
-
@import "../style/
|
|
4
|
+
@import "../style/Typography.module.css";
|
|
6
5
|
|
|
7
6
|
@layer components {
|
|
8
7
|
.title,
|
package/ui/block/Video.js
CHANGED
|
@@ -5,6 +5,7 @@ import { getSpaceClass } from "../style/Space.js";
|
|
|
5
5
|
import { getWidthClass } from "../style/Width.js";
|
|
6
6
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
7
7
|
import styles from "./Video.module.css";
|
|
8
|
+
const VIDEO_CLASS = getModuleClass(styles, "video");
|
|
8
9
|
/**
|
|
9
10
|
* Video container element.
|
|
10
11
|
* - Has a black background and a 16:9 aspect ratio.
|
|
@@ -17,7 +18,8 @@ import styles from "./Video.module.css";
|
|
|
17
18
|
*/
|
|
18
19
|
export function Video({ children, ...variants }) {
|
|
19
20
|
const ref = useRef(null);
|
|
20
|
-
return (_jsx("figure", { ref: ref, className: getClass(
|
|
21
|
+
return (_jsx("figure", { ref: ref, className: getClass(VIDEO_CLASS, //
|
|
22
|
+
getSpaceClass(variants), getWidthClass(variants)), children: children }));
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Set of video buttons floating over a video.
|
package/ui/block/Video.tsx
CHANGED
|
@@ -6,6 +6,8 @@ import { getClass, getModuleClass } from "../util/css.js";
|
|
|
6
6
|
import type { ChildProps, OptionalChildProps } from "../util/props.js";
|
|
7
7
|
import styles from "./Video.module.css";
|
|
8
8
|
|
|
9
|
+
const VIDEO_CLASS = getModuleClass(styles, "video");
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Props for `Video` — space and width variants plus optional `children`.
|
|
11
13
|
*
|
|
@@ -48,7 +50,14 @@ export function Video({ children, ...variants }: VideoProps): ReactElement {
|
|
|
48
50
|
const ref = useRef<HTMLElement | null>(null);
|
|
49
51
|
|
|
50
52
|
return (
|
|
51
|
-
<figure
|
|
53
|
+
<figure
|
|
54
|
+
ref={ref}
|
|
55
|
+
className={getClass(
|
|
56
|
+
VIDEO_CLASS, //
|
|
57
|
+
getSpaceClass(variants),
|
|
58
|
+
getWidthClass(variants),
|
|
59
|
+
)}
|
|
60
|
+
>
|
|
52
61
|
{children}
|
|
53
62
|
</figure>
|
|
54
63
|
);
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
2
|
@import "../style/Color.module.css";
|
|
3
3
|
@import "../style/Duration.module.css";
|
|
4
|
-
@import "../style/Font.module.css";
|
|
5
4
|
@import "../style/Radius.module.css";
|
|
6
|
-
@import "../style/Size.module.css";
|
|
7
5
|
@import "../style/Space.module.css";
|
|
8
6
|
@import "../style/Stroke.module.css";
|
|
9
7
|
@import "../style/Tint.module.css";
|
|
10
|
-
@import "../style/
|
|
8
|
+
@import "../style/Typography.module.css";
|
|
11
9
|
|
|
12
10
|
@layer components {
|
|
13
11
|
.button {
|
package/ui/form/Field.module.css
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
2
|
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/
|
|
3
|
+
@import "../style/Typography.module.css";
|
|
4
4
|
@import "../style/Space.module.css";
|
|
5
5
|
@import "../style/Tint.module.css";
|
|
6
|
-
@import "../style/Weight.module.css";
|
|
7
6
|
|
|
8
7
|
@layer components {
|
|
9
8
|
.field {
|
package/ui/form/Input.module.css
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
2
|
@import "../style/Color.module.css";
|
|
3
3
|
@import "../style/Duration.module.css";
|
|
4
|
-
@import "../style/Font.module.css";
|
|
5
4
|
@import "../style/Radius.module.css";
|
|
6
|
-
@import "../style/Size.module.css";
|
|
7
5
|
@import "../style/Space.module.css";
|
|
8
6
|
@import "../style/Stroke.module.css";
|
|
9
7
|
@import "../style/Tint.module.css";
|
|
10
|
-
@import "../style/
|
|
8
|
+
@import "../style/Typography.module.css";
|
|
11
9
|
|
|
12
10
|
@layer components {
|
|
13
11
|
.input {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
|
-
@import "../style/Font.module.css";
|
|
3
2
|
@import "../style/Radius.module.css";
|
|
4
|
-
@import "../style/Size.module.css";
|
|
5
3
|
@import "../style/Space.module.css";
|
|
6
4
|
@import "../style/Tint.module.css";
|
|
7
|
-
@import "../style/
|
|
5
|
+
@import "../style/Typography.module.css";
|
|
8
6
|
|
|
9
7
|
@layer components {
|
|
10
8
|
.code,
|
package/ui/menu/Menu.module.css
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
2
|
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Font.module.css";
|
|
4
3
|
@import "../style/Radius.module.css";
|
|
5
|
-
@import "../style/Size.module.css";
|
|
6
4
|
@import "../style/Space.module.css";
|
|
7
5
|
@import "../style/Stroke.module.css";
|
|
8
|
-
@import "../style/
|
|
9
|
-
@import "../style/Weight.module.css";
|
|
6
|
+
@import "../style/Typography.module.css";
|
|
10
7
|
|
|
11
8
|
@layer components {
|
|
12
9
|
.menu {
|
package/ui/misc/Tag.module.css
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
2
|
@import "../style/Color.module.css";
|
|
3
|
-
@import "../style/Font.module.css";
|
|
4
3
|
@import "../style/Radius.module.css";
|
|
5
|
-
@import "../style/Size.module.css";
|
|
6
4
|
@import "../style/Space.module.css";
|
|
7
5
|
@import "../style/Stroke.module.css";
|
|
8
6
|
@import "../style/Tint.module.css";
|
|
9
|
-
@import "../style/
|
|
7
|
+
@import "../style/Typography.module.css";
|
|
10
8
|
|
|
11
9
|
@layer components {
|
|
12
10
|
.tag {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
@import "../style/layers.css";
|
|
2
2
|
@import "../style/Radius.module.css";
|
|
3
|
-
@import "../style/
|
|
3
|
+
@import "../style/Typography.module.css";
|
|
4
4
|
@import "../style/Space.module.css";
|
|
5
5
|
@import "../style/Stroke.module.css";
|
|
6
6
|
@import "../style/Tint.module.css";
|
|
7
|
-
@import "../style/Weight.module.css";
|
|
8
7
|
|
|
9
8
|
@layer components {
|
|
10
9
|
.notice {
|
package/ui/style/Flex.js
CHANGED
|
@@ -13,7 +13,8 @@ import { getGapClass } from "./Gap.js";
|
|
|
13
13
|
* @see https://dhoulb.github.io/shelving/ui/style/Flex/getFlexClass
|
|
14
14
|
*/
|
|
15
15
|
export function getFlexClass(variants) {
|
|
16
|
-
return getClass(getModuleClass(FLEX_CSS, "flex", variants),
|
|
16
|
+
return getClass(getModuleClass(FLEX_CSS, "flex", variants), //
|
|
17
|
+
getGapClass(variants));
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Flex container that arranges its children as a row by default.
|
package/ui/style/Flex.module.css
CHANGED
package/ui/style/Flex.tsx
CHANGED
|
@@ -81,7 +81,10 @@ export interface FlexVariants extends GapVariants {
|
|
|
81
81
|
* @see https://dhoulb.github.io/shelving/ui/style/Flex/getFlexClass
|
|
82
82
|
*/
|
|
83
83
|
export function getFlexClass(variants: FlexVariants): string {
|
|
84
|
-
return getClass(
|
|
84
|
+
return getClass(
|
|
85
|
+
getModuleClass(FLEX_CSS, "flex", variants), //
|
|
86
|
+
getGapClass(variants),
|
|
87
|
+
);
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
/**
|
package/ui/style/Padding.js
CHANGED
|
@@ -9,5 +9,5 @@ import PADDING_CSS from "./Padding.module.css";
|
|
|
9
9
|
* @see https://dhoulb.github.io/shelving/ui/style/Padding/getPaddingClass
|
|
10
10
|
*/
|
|
11
11
|
export function getPaddingClass({ padding }) {
|
|
12
|
-
return padding && getModuleClass(PADDING_CSS, padding);
|
|
12
|
+
return padding && getModuleClass(PADDING_CSS, `padding-${padding}`);
|
|
13
13
|
}
|
|
@@ -3,60 +3,60 @@
|
|
|
3
3
|
|
|
4
4
|
@layer variants {
|
|
5
5
|
/* Block-padding variants. */
|
|
6
|
-
.none {
|
|
6
|
+
.padding-none {
|
|
7
7
|
padding-block: 0;
|
|
8
8
|
}
|
|
9
|
-
.xxsmall {
|
|
9
|
+
.padding-xxsmall {
|
|
10
10
|
padding-block: var(--space-xxsmall);
|
|
11
11
|
}
|
|
12
|
-
.xsmall {
|
|
12
|
+
.padding-xsmall {
|
|
13
13
|
padding-block: var(--space-xsmall);
|
|
14
14
|
}
|
|
15
|
-
.small {
|
|
15
|
+
.padding-small {
|
|
16
16
|
padding-block: var(--space-small);
|
|
17
17
|
}
|
|
18
|
-
.normal {
|
|
18
|
+
.padding-normal {
|
|
19
19
|
padding-block: var(--space-normal);
|
|
20
20
|
}
|
|
21
|
-
.large {
|
|
21
|
+
.padding-large {
|
|
22
22
|
padding-block: var(--space-large);
|
|
23
23
|
}
|
|
24
|
-
.xlarge {
|
|
24
|
+
.padding-xlarge {
|
|
25
25
|
padding-block: var(--space-xlarge);
|
|
26
26
|
}
|
|
27
|
-
.xxlarge {
|
|
27
|
+
.padding-xxlarge {
|
|
28
28
|
padding-block: var(--space-xxlarge);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/* Numeric block-padding multiples of `--space-normal` (`1x` … `10x`). */
|
|
32
|
-
|
|
32
|
+
.padding-1x {
|
|
33
33
|
padding-block: calc(var(--space-normal) * 1);
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
.padding-2x {
|
|
36
36
|
padding-block: calc(var(--space-normal) * 2);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
.padding-3x {
|
|
39
39
|
padding-block: calc(var(--space-normal) * 3);
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
.padding-4x {
|
|
42
42
|
padding-block: calc(var(--space-normal) * 4);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
.padding-5x {
|
|
45
45
|
padding-block: calc(var(--space-normal) * 5);
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
.padding-6x {
|
|
48
48
|
padding-block: calc(var(--space-normal) * 6);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
.padding-7x {
|
|
51
51
|
padding-block: calc(var(--space-normal) * 7);
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
.padding-8x {
|
|
54
54
|
padding-block: calc(var(--space-normal) * 8);
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
.padding-9x {
|
|
57
57
|
padding-block: calc(var(--space-normal) * 9);
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
.padding-10x {
|
|
60
60
|
padding-block: calc(var(--space-normal) * 10);
|
|
61
61
|
}
|
|
62
62
|
}
|
package/ui/style/Padding.tsx
CHANGED
|
@@ -45,5 +45,5 @@ export interface PaddingVariants {
|
|
|
45
45
|
* @see https://dhoulb.github.io/shelving/ui/style/Padding/getPaddingClass
|
|
46
46
|
*/
|
|
47
47
|
export function getPaddingClass({ padding }: PaddingVariants): string | undefined {
|
|
48
|
-
return padding && getModuleClass(PADDING_CSS, padding);
|
|
48
|
+
return padding && getModuleClass(PADDING_CSS, `padding-${padding}`);
|
|
49
49
|
}
|