shelving 1.282.2 → 1.284.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 +2 -2
- package/ui/README.md +2 -1
- package/ui/block/Address.d.ts +7 -7
- package/ui/block/Address.js +6 -6
- package/ui/block/Address.tsx +10 -9
- package/ui/block/Block.d.ts +3 -3
- package/ui/block/Block.js +3 -2
- package/ui/block/Block.tsx +5 -4
- package/ui/block/Blockquote.d.ts +3 -3
- package/ui/block/Blockquote.js +2 -2
- package/ui/block/Blockquote.tsx +4 -3
- package/ui/block/Caption.d.ts +3 -3
- package/ui/block/Caption.js +3 -3
- package/ui/block/Caption.tsx +5 -4
- package/ui/block/Card.d.ts +3 -2
- package/ui/block/Card.js +2 -2
- package/ui/block/Card.tsx +4 -2
- package/ui/block/Column.d.ts +3 -3
- package/ui/block/Column.js +2 -2
- package/ui/block/Column.tsx +4 -3
- package/ui/block/Definitions.d.ts +3 -3
- package/ui/block/Definitions.js +2 -2
- package/ui/block/Definitions.tsx +4 -3
- package/ui/block/Details.d.ts +3 -2
- package/ui/block/Details.js +2 -2
- package/ui/block/Details.tsx +4 -3
- package/ui/block/Divider.d.ts +3 -2
- package/ui/block/Divider.js +2 -2
- package/ui/block/Divider.tsx +4 -2
- package/ui/block/Heading.d.ts +3 -3
- package/ui/block/Heading.js +2 -2
- package/ui/block/Heading.tsx +4 -3
- package/ui/block/Image.d.ts +3 -2
- package/ui/block/Image.js +2 -2
- package/ui/block/Image.tsx +4 -2
- package/ui/block/Label.d.ts +1 -1
- package/ui/block/Label.js +2 -2
- package/ui/block/Label.tsx +2 -1
- package/ui/block/List.d.ts +3 -2
- package/ui/block/List.js +4 -4
- package/ui/block/List.tsx +6 -4
- package/ui/block/Panel.d.ts +3 -3
- package/ui/block/Panel.js +2 -2
- package/ui/block/Panel.tsx +4 -3
- package/ui/block/Paragraph.d.ts +3 -3
- package/ui/block/Paragraph.js +2 -2
- package/ui/block/Paragraph.tsx +4 -3
- package/ui/block/Preformatted.d.ts +3 -3
- package/ui/block/Preformatted.js +2 -2
- package/ui/block/Preformatted.tsx +4 -3
- package/ui/block/Row.d.ts +3 -3
- package/ui/block/Row.js +2 -2
- package/ui/block/Row.tsx +4 -3
- package/ui/block/Section.js +1 -1
- package/ui/block/Section.tsx +1 -0
- package/ui/block/Subheading.d.ts +1 -1
- package/ui/block/Subheading.js +2 -2
- package/ui/block/Subheading.tsx +2 -1
- package/ui/block/Title.d.ts +1 -1
- package/ui/block/Title.js +2 -2
- package/ui/block/Title.tsx +2 -1
- package/ui/block/Video.d.ts +3 -3
- package/ui/block/Video.js +2 -2
- package/ui/block/Video.tsx +4 -3
- package/ui/button/Button.d.ts +3 -2
- package/ui/button/Button.js +2 -2
- package/ui/button/Button.md +28 -0
- package/ui/button/Button.module.css +23 -5
- package/ui/button/Button.tsx +4 -3
- package/ui/button/Clickable.d.ts +3 -3
- package/ui/button/Clickable.js +6 -4
- package/ui/button/Clickable.tsx +9 -9
- package/ui/button/FullscreenButton.d.ts +3 -5
- package/ui/button/FullscreenButton.tsx +3 -2
- package/ui/button/RetryButton.d.ts +2 -2
- package/ui/button/RetryButton.tsx +2 -2
- package/ui/button/SubmitButton.d.ts +3 -3
- package/ui/button/SubmitButton.js +3 -2
- package/ui/button/SubmitButton.tsx +5 -3
- package/ui/dialog/Dialog.d.ts +6 -4
- package/ui/dialog/Dialog.js +7 -4
- package/ui/dialog/Dialog.tsx +19 -7
- package/ui/dialog/Modal.d.ts +3 -3
- package/ui/dialog/Modal.js +3 -3
- package/ui/dialog/Modal.tsx +5 -5
- package/ui/docs/DocumentationButtons.d.ts +3 -2
- package/ui/docs/DocumentationButtons.js +2 -2
- package/ui/docs/DocumentationButtons.tsx +4 -1
- package/ui/form/Field.d.ts +3 -3
- package/ui/form/Field.js +2 -2
- package/ui/form/Field.tsx +4 -3
- package/ui/form/Form.d.ts +2 -2
- package/ui/form/Form.js +3 -2
- package/ui/form/Form.tsx +5 -3
- package/ui/form/FormFields.d.ts +1 -1
- package/ui/form/FormFields.js +2 -2
- package/ui/form/FormFields.tsx +2 -2
- package/ui/form/FormFooter.d.ts +3 -3
- package/ui/form/FormFooter.js +2 -2
- package/ui/form/FormFooter.tsx +4 -4
- package/ui/form/FormMessage.d.ts +2 -2
- package/ui/form/FormMessage.tsx +2 -3
- package/ui/form/Progress.d.ts +3 -2
- package/ui/form/Progress.js +2 -2
- package/ui/form/Progress.tsx +4 -2
- package/ui/inline/Code.d.ts +3 -3
- package/ui/inline/Code.js +2 -2
- package/ui/inline/Code.tsx +4 -3
- package/ui/inline/Deleted.d.ts +3 -3
- package/ui/inline/Deleted.js +2 -2
- package/ui/inline/Deleted.tsx +4 -3
- package/ui/inline/Emphasis.d.ts +3 -3
- package/ui/inline/Emphasis.js +2 -2
- package/ui/inline/Emphasis.tsx +4 -3
- package/ui/inline/Inserted.d.ts +3 -3
- package/ui/inline/Inserted.js +2 -2
- package/ui/inline/Inserted.tsx +4 -3
- package/ui/inline/Link.d.ts +3 -2
- package/ui/inline/Link.js +2 -2
- package/ui/inline/Link.tsx +4 -2
- package/ui/inline/Mark.d.ts +3 -3
- package/ui/inline/Mark.js +2 -2
- package/ui/inline/Mark.tsx +4 -3
- package/ui/inline/Small.d.ts +3 -3
- package/ui/inline/Small.js +2 -2
- package/ui/inline/Small.tsx +4 -3
- package/ui/inline/Span.d.ts +3 -3
- package/ui/inline/Span.js +3 -2
- package/ui/inline/Span.tsx +5 -4
- package/ui/inline/Strong.d.ts +3 -3
- package/ui/inline/Strong.js +2 -2
- package/ui/inline/Strong.tsx +4 -3
- package/ui/inline/Subscript.d.ts +3 -3
- package/ui/inline/Subscript.js +3 -3
- package/ui/inline/Subscript.tsx +5 -5
- package/ui/inline/Superscript.d.ts +3 -3
- package/ui/inline/Superscript.js +3 -3
- package/ui/inline/Superscript.tsx +5 -5
- package/ui/input/ArrayInput.js +2 -2
- package/ui/input/ArrayInput.tsx +2 -1
- package/ui/input/ArrayRadioInputs.d.ts +1 -1
- package/ui/input/ArrayRadioInputs.js +2 -2
- package/ui/input/ArrayRadioInputs.tsx +2 -1
- package/ui/input/ButtonInput.d.ts +1 -1
- package/ui/input/ButtonInput.js +2 -2
- package/ui/input/ButtonInput.tsx +2 -1
- package/ui/input/CheckboxInput.d.ts +1 -1
- package/ui/input/CheckboxInput.js +2 -2
- package/ui/input/CheckboxInput.tsx +2 -0
- package/ui/input/ChoiceRadioInputs.js +2 -2
- package/ui/input/ChoiceRadioInputs.tsx +2 -1
- package/ui/input/DataInput.js +2 -2
- package/ui/input/DataInput.tsx +2 -1
- package/ui/input/DateInput.d.ts +1 -1
- package/ui/input/DateInput.js +2 -2
- package/ui/input/DateInput.tsx +2 -1
- package/ui/input/DictionaryInput.js +2 -2
- package/ui/input/DictionaryInput.tsx +2 -1
- package/ui/input/FileInput.d.ts +1 -1
- package/ui/input/FileInput.js +3 -2
- package/ui/input/FileInput.tsx +3 -1
- package/ui/input/Input.d.ts +10 -3
- package/ui/input/Input.js +2 -2
- package/ui/input/Input.tsx +11 -4
- package/ui/input/NumberInput.d.ts +1 -1
- package/ui/input/NumberInput.js +2 -2
- package/ui/input/NumberInput.tsx +2 -1
- package/ui/input/OutputInput.d.ts +1 -1
- package/ui/input/OutputInput.js +2 -2
- package/ui/input/OutputInput.tsx +2 -2
- package/ui/input/Popover.d.ts +4 -2
- package/ui/input/Popover.js +4 -3
- package/ui/input/Popover.tsx +6 -3
- package/ui/input/PopoverButton.d.ts +28 -0
- package/ui/input/{ButtonPopover.js → PopoverButton.js} +10 -8
- package/ui/input/PopoverButton.tsx +44 -0
- package/ui/input/PopoverButtonInput.d.ts +27 -0
- package/ui/input/{ButtonInputPopover.js → PopoverButtonInput.js} +10 -8
- package/ui/input/PopoverButtonInput.tsx +44 -0
- package/ui/input/QueryInput.d.ts +1 -1
- package/ui/input/QueryInput.js +2 -2
- package/ui/input/QueryInput.tsx +2 -0
- package/ui/input/RadioInput.d.ts +1 -1
- package/ui/input/RadioInput.js +2 -2
- package/ui/input/RadioInput.tsx +2 -0
- package/ui/input/SchemaInput.d.ts +1 -1
- package/ui/input/SchemaInput.js +2 -2
- package/ui/input/SchemaInput.tsx +2 -2
- package/ui/input/SelectInput.js +2 -2
- package/ui/input/SelectInput.tsx +2 -1
- package/ui/input/TextInput.d.ts +1 -1
- package/ui/input/TextInput.js +3 -3
- package/ui/input/TextInput.tsx +3 -2
- package/ui/input/index.d.ts +2 -2
- package/ui/input/index.js +2 -2
- package/ui/input/index.ts +2 -2
- package/ui/menu/Menu.d.ts +5 -5
- package/ui/menu/Menu.js +4 -4
- package/ui/menu/Menu.tsx +7 -6
- package/ui/misc/Icon.d.ts +2 -1
- package/ui/misc/Icon.js +2 -1
- package/ui/misc/Icon.tsx +3 -1
- package/ui/misc/Loading.d.ts +2 -3
- package/ui/misc/Loading.js +2 -2
- package/ui/misc/Loading.tsx +10 -3
- package/ui/misc/Tag.d.ts +3 -2
- package/ui/misc/Tag.js +2 -2
- package/ui/misc/Tag.tsx +4 -3
- package/ui/notice/Message.d.ts +3 -3
- package/ui/notice/Message.js +2 -2
- package/ui/notice/Message.tsx +4 -3
- package/ui/notice/Notice.d.ts +3 -3
- package/ui/notice/Notice.js +2 -2
- package/ui/notice/Notice.tsx +4 -2
- package/ui/notice/Notices.d.ts +3 -2
- package/ui/notice/Notices.js +2 -2
- package/ui/notice/Notices.tsx +4 -3
- package/ui/table/Cell.d.ts +3 -3
- package/ui/table/Cell.js +2 -2
- package/ui/table/Cell.tsx +4 -3
- package/ui/table/Table.d.ts +3 -3
- package/ui/table/Table.js +2 -2
- package/ui/table/Table.tsx +4 -3
- package/ui/tree/TreeBreadcrumbs.d.ts +3 -2
- package/ui/tree/TreeBreadcrumbs.js +2 -2
- package/ui/tree/TreeBreadcrumbs.tsx +4 -2
- package/ui/tree/TreeButton.d.ts +2 -1
- package/ui/tree/TreeButton.tsx +2 -1
- package/ui/util/ClassProps.md +56 -0
- package/ui/util/css.d.ts +1 -1
- package/ui/util/css.js +2 -2
- package/ui/util/css.test.ts +29 -0
- package/ui/util/css.ts +2 -2
- package/ui/util/props.d.ts +12 -0
- package/ui/util/props.test.tsx +100 -0
- package/ui/util/props.ts +13 -0
- package/ui/input/ButtonInputPopover.d.ts +0 -25
- package/ui/input/ButtonInputPopover.tsx +0 -41
- package/ui/input/ButtonPopover.d.ts +0 -25
- package/ui/input/ButtonPopover.tsx +0 -40
package/ui/inline/Code.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
3
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import type { OptionalChildProps } from "../util/index.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/index.js";
|
|
5
5
|
import CODE_CSS from "./Code.module.css";
|
|
6
6
|
|
|
7
7
|
const CODE_CLASS = getModuleClass(CODE_CSS, "code");
|
|
@@ -13,7 +13,7 @@ const CODE_PLAIN_CLASS = getModuleClass(CODE_CSS, "plain");
|
|
|
13
13
|
*
|
|
14
14
|
* @see https://shelving.cc/ui/CodeProps
|
|
15
15
|
*/
|
|
16
|
-
export interface CodeProps extends TypographyVariants, OptionalChildProps {
|
|
16
|
+
export interface CodeProps extends TypographyVariants, OptionalChildProps, ClassProps {
|
|
17
17
|
plain?: boolean | undefined;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -24,13 +24,14 @@ export interface CodeProps extends TypographyVariants, OptionalChildProps {
|
|
|
24
24
|
* @kind component
|
|
25
25
|
* @see https://shelving.cc/ui/Code
|
|
26
26
|
*/
|
|
27
|
-
export function Code({ children, plain, ...props }: CodeProps): ReactElement {
|
|
27
|
+
export function Code({ children, plain, className, ...props }: CodeProps): ReactElement {
|
|
28
28
|
return (
|
|
29
29
|
<code
|
|
30
30
|
className={getClass(
|
|
31
31
|
CODE_CLASS, //
|
|
32
32
|
plain && CODE_PLAIN_CLASS,
|
|
33
33
|
getTypographyClass(props),
|
|
34
|
+
className,
|
|
34
35
|
)}
|
|
35
36
|
>
|
|
36
37
|
{children}
|
package/ui/inline/Deleted.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Deleted` — colour and typography variants, plus optional `children`.
|
|
6
6
|
*
|
|
7
7
|
* @see https://shelving.cc/ui/DeletedProps
|
|
8
8
|
*/
|
|
9
|
-
export interface DeletedProps extends OptionalChildProps, TypographyVariants {
|
|
9
|
+
export interface DeletedProps extends OptionalChildProps, TypographyVariants, ClassProps {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Deleted text — renders a `<del>` element to mark content removed from a document.
|
|
@@ -15,4 +15,4 @@ export interface DeletedProps extends OptionalChildProps, TypographyVariants {
|
|
|
15
15
|
* @example <Deleted>old price</Deleted>
|
|
16
16
|
* @see https://shelving.cc/ui/Deleted
|
|
17
17
|
*/
|
|
18
|
-
export declare function Deleted({ children, ...props }: DeletedProps): ReactElement;
|
|
18
|
+
export declare function Deleted({ children, className, ...props }: DeletedProps): ReactElement;
|
package/ui/inline/Deleted.js
CHANGED
|
@@ -10,7 +10,7 @@ const DELETED_CLASS = getModuleClass(DELETED_CSS, "deleted");
|
|
|
10
10
|
* @example <Deleted>old price</Deleted>
|
|
11
11
|
* @see https://shelving.cc/ui/Deleted
|
|
12
12
|
*/
|
|
13
|
-
export function Deleted({ children, ...props }) {
|
|
13
|
+
export function Deleted({ children, className, ...props }) {
|
|
14
14
|
return (_jsx("del", { className: getClass(DELETED_CLASS, //
|
|
15
|
-
getTypographyClass(props)), children: children }));
|
|
15
|
+
getTypographyClass(props), className), children: children }));
|
|
16
16
|
}
|
package/ui/inline/Deleted.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
3
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
5
5
|
import DELETED_CSS from "./Deleted.module.css";
|
|
6
6
|
|
|
7
7
|
const DELETED_CLASS = getModuleClass(DELETED_CSS, "deleted");
|
|
@@ -11,7 +11,7 @@ const DELETED_CLASS = getModuleClass(DELETED_CSS, "deleted");
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://shelving.cc/ui/DeletedProps
|
|
13
13
|
*/
|
|
14
|
-
export interface DeletedProps extends OptionalChildProps, TypographyVariants {}
|
|
14
|
+
export interface DeletedProps extends OptionalChildProps, TypographyVariants, ClassProps {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Deleted text — renders a `<del>` element to mark content removed from a document.
|
|
@@ -20,12 +20,13 @@ export interface DeletedProps extends OptionalChildProps, TypographyVariants {}
|
|
|
20
20
|
* @example <Deleted>old price</Deleted>
|
|
21
21
|
* @see https://shelving.cc/ui/Deleted
|
|
22
22
|
*/
|
|
23
|
-
export function Deleted({ children, ...props }: DeletedProps): ReactElement {
|
|
23
|
+
export function Deleted({ children, className, ...props }: DeletedProps): ReactElement {
|
|
24
24
|
return (
|
|
25
25
|
<del
|
|
26
26
|
className={getClass(
|
|
27
27
|
DELETED_CLASS, //
|
|
28
28
|
getTypographyClass(props),
|
|
29
|
+
className,
|
|
29
30
|
)}
|
|
30
31
|
>
|
|
31
32
|
{children}
|
package/ui/inline/Emphasis.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Emphasis` — optional `children`.
|
|
6
6
|
*
|
|
7
7
|
* @see https://shelving.cc/ui/EmphasisProps
|
|
8
8
|
*/
|
|
9
|
-
export interface EmphasisProps extends OptionalChildProps, TypographyVariants {
|
|
9
|
+
export interface EmphasisProps extends OptionalChildProps, TypographyVariants, ClassProps {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Emphasised text — renders an `<em>` element for stress emphasis (typically italic).
|
|
@@ -15,4 +15,4 @@ export interface EmphasisProps extends OptionalChildProps, TypographyVariants {
|
|
|
15
15
|
* @example <Emphasis>really</Emphasis>
|
|
16
16
|
* @see https://shelving.cc/ui/Emphasis
|
|
17
17
|
*/
|
|
18
|
-
export declare function Emphasis({ children, ...props }: EmphasisProps): ReactElement;
|
|
18
|
+
export declare function Emphasis({ children, className, ...props }: EmphasisProps): ReactElement;
|
package/ui/inline/Emphasis.js
CHANGED
|
@@ -10,7 +10,7 @@ const EMPHASIS_CLASS = getModuleClass(EMPHASIS_CSS, "emphasis");
|
|
|
10
10
|
* @example <Emphasis>really</Emphasis>
|
|
11
11
|
* @see https://shelving.cc/ui/Emphasis
|
|
12
12
|
*/
|
|
13
|
-
export function Emphasis({ children, ...props }) {
|
|
13
|
+
export function Emphasis({ children, className, ...props }) {
|
|
14
14
|
return (_jsx("em", { className: getClass(EMPHASIS_CLASS, //
|
|
15
|
-
getTypographyClass(props)), children: children }));
|
|
15
|
+
getTypographyClass(props), className), children: children }));
|
|
16
16
|
}
|
package/ui/inline/Emphasis.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
3
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
5
5
|
import EMPHASIS_CSS from "./Emphasis.module.css";
|
|
6
6
|
|
|
7
7
|
const EMPHASIS_CLASS = getModuleClass(EMPHASIS_CSS, "emphasis");
|
|
@@ -11,7 +11,7 @@ const EMPHASIS_CLASS = getModuleClass(EMPHASIS_CSS, "emphasis");
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://shelving.cc/ui/EmphasisProps
|
|
13
13
|
*/
|
|
14
|
-
export interface EmphasisProps extends OptionalChildProps, TypographyVariants {}
|
|
14
|
+
export interface EmphasisProps extends OptionalChildProps, TypographyVariants, ClassProps {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Emphasised text — renders an `<em>` element for stress emphasis (typically italic).
|
|
@@ -20,12 +20,13 @@ export interface EmphasisProps extends OptionalChildProps, TypographyVariants {}
|
|
|
20
20
|
* @example <Emphasis>really</Emphasis>
|
|
21
21
|
* @see https://shelving.cc/ui/Emphasis
|
|
22
22
|
*/
|
|
23
|
-
export function Emphasis({ children, ...props }: EmphasisProps): ReactElement {
|
|
23
|
+
export function Emphasis({ children, className, ...props }: EmphasisProps): ReactElement {
|
|
24
24
|
return (
|
|
25
25
|
<em
|
|
26
26
|
className={getClass(
|
|
27
27
|
EMPHASIS_CLASS, //
|
|
28
28
|
getTypographyClass(props),
|
|
29
|
+
className,
|
|
29
30
|
)}
|
|
30
31
|
>
|
|
31
32
|
{children}
|
package/ui/inline/Inserted.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Inserted` — colour and typography variants, plus optional `children`.
|
|
6
6
|
*
|
|
7
7
|
* @see https://shelving.cc/ui/InsertedProps
|
|
8
8
|
*/
|
|
9
|
-
export interface InsertedProps extends OptionalChildProps, TypographyVariants {
|
|
9
|
+
export interface InsertedProps extends OptionalChildProps, TypographyVariants, ClassProps {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Inserted text — renders an `<ins>` element to mark content added to a document.
|
|
@@ -15,4 +15,4 @@ export interface InsertedProps extends OptionalChildProps, TypographyVariants {
|
|
|
15
15
|
* @example <Inserted>new price</Inserted>
|
|
16
16
|
* @see https://shelving.cc/ui/Inserted
|
|
17
17
|
*/
|
|
18
|
-
export declare function Inserted({ children, ...props }: InsertedProps): ReactElement;
|
|
18
|
+
export declare function Inserted({ children, className, ...props }: InsertedProps): ReactElement;
|
package/ui/inline/Inserted.js
CHANGED
|
@@ -10,7 +10,7 @@ const INSERTED_CLASS = getModuleClass(INSERTED_CSS, "inserted");
|
|
|
10
10
|
* @example <Inserted>new price</Inserted>
|
|
11
11
|
* @see https://shelving.cc/ui/Inserted
|
|
12
12
|
*/
|
|
13
|
-
export function Inserted({ children, ...props }) {
|
|
13
|
+
export function Inserted({ children, className, ...props }) {
|
|
14
14
|
return (_jsx("ins", { className: getClass(INSERTED_CLASS, //
|
|
15
|
-
getTypographyClass(props)), children: children }));
|
|
15
|
+
getTypographyClass(props), className), children: children }));
|
|
16
16
|
}
|
package/ui/inline/Inserted.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
3
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
5
5
|
import INSERTED_CSS from "./Inserted.module.css";
|
|
6
6
|
|
|
7
7
|
const INSERTED_CLASS = getModuleClass(INSERTED_CSS, "inserted");
|
|
@@ -11,7 +11,7 @@ const INSERTED_CLASS = getModuleClass(INSERTED_CSS, "inserted");
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://shelving.cc/ui/InsertedProps
|
|
13
13
|
*/
|
|
14
|
-
export interface InsertedProps extends OptionalChildProps, TypographyVariants {}
|
|
14
|
+
export interface InsertedProps extends OptionalChildProps, TypographyVariants, ClassProps {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Inserted text — renders an `<ins>` element to mark content added to a document.
|
|
@@ -20,12 +20,13 @@ export interface InsertedProps extends OptionalChildProps, TypographyVariants {}
|
|
|
20
20
|
* @example <Inserted>new price</Inserted>
|
|
21
21
|
* @see https://shelving.cc/ui/Inserted
|
|
22
22
|
*/
|
|
23
|
-
export function Inserted({ children, ...props }: InsertedProps): ReactElement {
|
|
23
|
+
export function Inserted({ children, className, ...props }: InsertedProps): ReactElement {
|
|
24
24
|
return (
|
|
25
25
|
<ins
|
|
26
26
|
className={getClass(
|
|
27
27
|
INSERTED_CLASS, //
|
|
28
28
|
getTypographyClass(props),
|
|
29
|
+
className,
|
|
29
30
|
)}
|
|
30
31
|
>
|
|
31
32
|
{children}
|
package/ui/inline/Link.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type ClickableProps } from "../button/Clickable.js";
|
|
3
3
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
4
|
+
import type { ClassProps } from "../util/props.js";
|
|
4
5
|
/**
|
|
5
6
|
* Props for `Link` — `ClickableProps` (`href` for navigation or `onClick` for actions) plus colour and typography variants.
|
|
6
7
|
*
|
|
7
8
|
* @see https://shelving.cc/ui/LinkProps
|
|
8
9
|
*/
|
|
9
|
-
export interface LinkProps extends ClickableProps, TypographyVariants {
|
|
10
|
+
export interface LinkProps extends ClickableProps, TypographyVariants, ClassProps {
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* Inline link — delegates to `<Clickable>`, rendering an `<a>` (when `href` is set) or `<button>` (when `onClick` is set).
|
|
@@ -14,4 +15,4 @@ export interface LinkProps extends ClickableProps, TypographyVariants {
|
|
|
14
15
|
* @kind component
|
|
15
16
|
* @see https://shelving.cc/ui/Link
|
|
16
17
|
*/
|
|
17
|
-
export declare function Link(props: LinkProps): ReactElement;
|
|
18
|
+
export declare function Link({ className, ...props }: LinkProps): ReactElement;
|
package/ui/inline/Link.js
CHANGED
|
@@ -10,7 +10,7 @@ const LINK_CLASS = getModuleClass(LINK_CSS, "link");
|
|
|
10
10
|
* @kind component
|
|
11
11
|
* @see https://shelving.cc/ui/Link
|
|
12
12
|
*/
|
|
13
|
-
export function Link(props) {
|
|
13
|
+
export function Link({ className, ...props }) {
|
|
14
14
|
return (_jsx(Clickable, { ...props, className: getClass(LINK_CLASS, //
|
|
15
|
-
getTypographyClass(props)) }));
|
|
15
|
+
getTypographyClass(props), className) }));
|
|
16
16
|
}
|
package/ui/inline/Link.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import type { ReactElement } from "react";
|
|
|
2
2
|
import { Clickable, type ClickableProps } from "../button/Clickable.js";
|
|
3
3
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
4
4
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
5
|
+
import type { ClassProps } from "../util/props.js";
|
|
5
6
|
import LINK_CSS from "./Link.module.css";
|
|
6
7
|
|
|
7
8
|
const LINK_CLASS = getModuleClass(LINK_CSS, "link");
|
|
@@ -11,7 +12,7 @@ const LINK_CLASS = getModuleClass(LINK_CSS, "link");
|
|
|
11
12
|
*
|
|
12
13
|
* @see https://shelving.cc/ui/LinkProps
|
|
13
14
|
*/
|
|
14
|
-
export interface LinkProps extends ClickableProps, TypographyVariants {}
|
|
15
|
+
export interface LinkProps extends ClickableProps, TypographyVariants, ClassProps {}
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Inline link — delegates to `<Clickable>`, rendering an `<a>` (when `href` is set) or `<button>` (when `onClick` is set).
|
|
@@ -19,13 +20,14 @@ export interface LinkProps extends ClickableProps, TypographyVariants {}
|
|
|
19
20
|
* @kind component
|
|
20
21
|
* @see https://shelving.cc/ui/Link
|
|
21
22
|
*/
|
|
22
|
-
export function Link(props: LinkProps): ReactElement {
|
|
23
|
+
export function Link({ className, ...props }: LinkProps): ReactElement {
|
|
23
24
|
return (
|
|
24
25
|
<Clickable
|
|
25
26
|
{...props}
|
|
26
27
|
className={getClass(
|
|
27
28
|
LINK_CLASS, //
|
|
28
29
|
getTypographyClass(props),
|
|
30
|
+
className,
|
|
29
31
|
)}
|
|
30
32
|
/>
|
|
31
33
|
);
|
package/ui/inline/Mark.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Mark` — optional `children`.
|
|
6
6
|
*
|
|
7
7
|
* @see https://shelving.cc/ui/MarkProps
|
|
8
8
|
*/
|
|
9
|
-
export interface MarkProps extends OptionalChildProps, TypographyVariants {
|
|
9
|
+
export interface MarkProps extends OptionalChildProps, TypographyVariants, ClassProps {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Highlighted text — renders a `<mark>` element to call attention to a run of text.
|
|
@@ -14,4 +14,4 @@ export interface MarkProps extends OptionalChildProps, TypographyVariants {
|
|
|
14
14
|
* @kind component
|
|
15
15
|
* @see https://shelving.cc/ui/Mark
|
|
16
16
|
*/
|
|
17
|
-
export declare function Mark({ children, ...props }: MarkProps): ReactElement;
|
|
17
|
+
export declare function Mark({ children, className, ...props }: MarkProps): ReactElement;
|
package/ui/inline/Mark.js
CHANGED
|
@@ -9,7 +9,7 @@ const MARK_CLASS = getModuleClass(MARK_CSS, "mark");
|
|
|
9
9
|
* @kind component
|
|
10
10
|
* @see https://shelving.cc/ui/Mark
|
|
11
11
|
*/
|
|
12
|
-
export function Mark({ children, ...props }) {
|
|
12
|
+
export function Mark({ children, className, ...props }) {
|
|
13
13
|
return (_jsx("mark", { className: getClass(MARK_CLASS, //
|
|
14
|
-
getTypographyClass(props)), children: children }));
|
|
14
|
+
getTypographyClass(props), className), children: children }));
|
|
15
15
|
}
|
package/ui/inline/Mark.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
3
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
5
5
|
import MARK_CSS from "./Mark.module.css";
|
|
6
6
|
|
|
7
7
|
const MARK_CLASS = getModuleClass(MARK_CSS, "mark");
|
|
@@ -11,7 +11,7 @@ const MARK_CLASS = getModuleClass(MARK_CSS, "mark");
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://shelving.cc/ui/MarkProps
|
|
13
13
|
*/
|
|
14
|
-
export interface MarkProps extends OptionalChildProps, TypographyVariants {}
|
|
14
|
+
export interface MarkProps extends OptionalChildProps, TypographyVariants, ClassProps {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Highlighted text — renders a `<mark>` element to call attention to a run of text.
|
|
@@ -19,12 +19,13 @@ export interface MarkProps extends OptionalChildProps, TypographyVariants {}
|
|
|
19
19
|
* @kind component
|
|
20
20
|
* @see https://shelving.cc/ui/Mark
|
|
21
21
|
*/
|
|
22
|
-
export function Mark({ children, ...props }: MarkProps): ReactElement {
|
|
22
|
+
export function Mark({ children, className, ...props }: MarkProps): ReactElement {
|
|
23
23
|
return (
|
|
24
24
|
<mark
|
|
25
25
|
className={getClass(
|
|
26
26
|
MARK_CLASS, //
|
|
27
27
|
getTypographyClass(props),
|
|
28
|
+
className,
|
|
28
29
|
)}
|
|
29
30
|
>
|
|
30
31
|
{children}
|
package/ui/inline/Small.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Small` — optional `children`.
|
|
6
6
|
*
|
|
7
7
|
* @see https://shelving.cc/ui/SmallProps
|
|
8
8
|
*/
|
|
9
|
-
export interface SmallProps extends OptionalChildProps, TypographyVariants {
|
|
9
|
+
export interface SmallProps extends OptionalChildProps, TypographyVariants, ClassProps {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Small print — renders a `<small>` element for side comments and fine print.
|
|
@@ -15,4 +15,4 @@ export interface SmallProps extends OptionalChildProps, TypographyVariants {
|
|
|
15
15
|
* @example <Small>Terms apply.</Small>
|
|
16
16
|
* @see https://shelving.cc/ui/Small
|
|
17
17
|
*/
|
|
18
|
-
export declare function Small({ children, ...props }: SmallProps): ReactElement;
|
|
18
|
+
export declare function Small({ children, className, ...props }: SmallProps): ReactElement;
|
package/ui/inline/Small.js
CHANGED
|
@@ -10,7 +10,7 @@ const SMALL_CLASS = getModuleClass(SMALL_CSS, "small");
|
|
|
10
10
|
* @example <Small>Terms apply.</Small>
|
|
11
11
|
* @see https://shelving.cc/ui/Small
|
|
12
12
|
*/
|
|
13
|
-
export function Small({ children, ...props }) {
|
|
13
|
+
export function Small({ children, className, ...props }) {
|
|
14
14
|
return (_jsx("small", { className: getClass(SMALL_CLASS, //
|
|
15
|
-
getTypographyClass(props)), children: children }));
|
|
15
|
+
getTypographyClass(props), className), children: children }));
|
|
16
16
|
}
|
package/ui/inline/Small.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
3
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
5
5
|
import SMALL_CSS from "./Small.module.css";
|
|
6
6
|
|
|
7
7
|
const SMALL_CLASS = getModuleClass(SMALL_CSS, "small");
|
|
@@ -11,7 +11,7 @@ const SMALL_CLASS = getModuleClass(SMALL_CSS, "small");
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://shelving.cc/ui/SmallProps
|
|
13
13
|
*/
|
|
14
|
-
export interface SmallProps extends OptionalChildProps, TypographyVariants {}
|
|
14
|
+
export interface SmallProps extends OptionalChildProps, TypographyVariants, ClassProps {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Small print — renders a `<small>` element for side comments and fine print.
|
|
@@ -20,12 +20,13 @@ export interface SmallProps extends OptionalChildProps, TypographyVariants {}
|
|
|
20
20
|
* @example <Small>Terms apply.</Small>
|
|
21
21
|
* @see https://shelving.cc/ui/Small
|
|
22
22
|
*/
|
|
23
|
-
export function Small({ children, ...props }: SmallProps): ReactElement {
|
|
23
|
+
export function Small({ children, className, ...props }: SmallProps): ReactElement {
|
|
24
24
|
return (
|
|
25
25
|
<small
|
|
26
26
|
className={getClass(
|
|
27
27
|
SMALL_CLASS, //
|
|
28
28
|
getTypographyClass(props),
|
|
29
|
+
className,
|
|
29
30
|
)}
|
|
30
31
|
>
|
|
31
32
|
{children}
|
package/ui/inline/Span.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Span` — colour and typography variants, plus optional `children`.
|
|
6
6
|
*
|
|
7
7
|
* @see https://shelving.cc/ui/SpanProps
|
|
8
8
|
*/
|
|
9
|
-
export interface SpanProps extends OptionalChildProps, TypographyVariants {
|
|
9
|
+
export interface SpanProps extends OptionalChildProps, TypographyVariants, ClassProps {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Styled inline text — renders a `<span>` carrying only the colour and typography variant classes, with no styling of its own.
|
|
@@ -16,4 +16,4 @@ export interface SpanProps extends OptionalChildProps, TypographyVariants {
|
|
|
16
16
|
* @example <Span weight="strong" tint="30">label</Span>
|
|
17
17
|
* @see https://shelving.cc/ui/Span
|
|
18
18
|
*/
|
|
19
|
-
export declare function Span({ children, ...props }: SpanProps): ReactElement;
|
|
19
|
+
export declare function Span({ children, className, ...props }: SpanProps): ReactElement;
|
package/ui/inline/Span.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTypographyClass } from "../style/Typography.js";
|
|
3
|
+
import { getClass } from "../util/css.js";
|
|
3
4
|
/**
|
|
4
5
|
* Styled inline text — renders a `<span>` carrying only the colour and typography variant classes, with no styling of its own.
|
|
5
6
|
* - Reach for it to apply variants (`size`, `weight`, `tint`, `color`, …) to a run of text that has no semantic meaning of its own.
|
|
@@ -8,6 +9,6 @@ import { getTypographyClass } from "../style/Typography.js";
|
|
|
8
9
|
* @example <Span weight="strong" tint="30">label</Span>
|
|
9
10
|
* @see https://shelving.cc/ui/Span
|
|
10
11
|
*/
|
|
11
|
-
export function Span({ children, ...props }) {
|
|
12
|
-
return _jsx("span", { className: getTypographyClass(props), children: children });
|
|
12
|
+
export function Span({ children, className, ...props }) {
|
|
13
|
+
return _jsx("span", { className: getClass(getTypographyClass(props), className), children: children });
|
|
13
14
|
}
|
package/ui/inline/Span.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import
|
|
3
|
+
import { getClass } from "../util/css.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Props for `Span` — colour and typography variants, plus optional `children`.
|
|
7
8
|
*
|
|
8
9
|
* @see https://shelving.cc/ui/SpanProps
|
|
9
10
|
*/
|
|
10
|
-
export interface SpanProps extends OptionalChildProps, TypographyVariants {}
|
|
11
|
+
export interface SpanProps extends OptionalChildProps, TypographyVariants, ClassProps {}
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Styled inline text — renders a `<span>` carrying only the colour and typography variant classes, with no styling of its own.
|
|
@@ -17,6 +18,6 @@ export interface SpanProps extends OptionalChildProps, TypographyVariants {}
|
|
|
17
18
|
* @example <Span weight="strong" tint="30">label</Span>
|
|
18
19
|
* @see https://shelving.cc/ui/Span
|
|
19
20
|
*/
|
|
20
|
-
export function Span({ children, ...props }: SpanProps): ReactElement {
|
|
21
|
-
return <span className={getTypographyClass(props)}>{children}</span>;
|
|
21
|
+
export function Span({ children, className, ...props }: SpanProps): ReactElement {
|
|
22
|
+
return <span className={getClass(getTypographyClass(props), className)}>{children}</span>;
|
|
22
23
|
}
|
package/ui/inline/Strong.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Strong` — optional `children`.
|
|
6
6
|
*
|
|
7
7
|
* @see https://shelving.cc/ui/StrongProps
|
|
8
8
|
*/
|
|
9
|
-
export interface StrongProps extends OptionalChildProps, TypographyVariants {
|
|
9
|
+
export interface StrongProps extends OptionalChildProps, TypographyVariants, ClassProps {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Strong importance — renders a `<strong>` element for text of strong importance (typically bold).
|
|
@@ -14,4 +14,4 @@ export interface StrongProps extends OptionalChildProps, TypographyVariants {
|
|
|
14
14
|
* @kind component
|
|
15
15
|
* @see https://shelving.cc/ui/Strong
|
|
16
16
|
*/
|
|
17
|
-
export declare function Strong({ children, ...props }: StrongProps): ReactElement;
|
|
17
|
+
export declare function Strong({ children, className, ...props }: StrongProps): ReactElement;
|
package/ui/inline/Strong.js
CHANGED
|
@@ -9,7 +9,7 @@ const STRONG_CLASS = getModuleClass(STRONG_CSS, "strong");
|
|
|
9
9
|
* @kind component
|
|
10
10
|
* @see https://shelving.cc/ui/Strong
|
|
11
11
|
*/
|
|
12
|
-
export function Strong({ children, ...props }) {
|
|
12
|
+
export function Strong({ children, className, ...props }) {
|
|
13
13
|
return (_jsx("strong", { className: getClass(STRONG_CLASS, //
|
|
14
|
-
getTypographyClass(props)), children: children }));
|
|
14
|
+
getTypographyClass(props), className), children: children }));
|
|
15
15
|
}
|
package/ui/inline/Strong.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { getTypographyClass, type TypographyVariants } from "../style/Typography.js";
|
|
3
3
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
4
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
5
5
|
import STRONG_CSS from "./Strong.module.css";
|
|
6
6
|
|
|
7
7
|
const STRONG_CLASS = getModuleClass(STRONG_CSS, "strong");
|
|
@@ -11,7 +11,7 @@ const STRONG_CLASS = getModuleClass(STRONG_CSS, "strong");
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://shelving.cc/ui/StrongProps
|
|
13
13
|
*/
|
|
14
|
-
export interface StrongProps extends OptionalChildProps, TypographyVariants {}
|
|
14
|
+
export interface StrongProps extends OptionalChildProps, TypographyVariants, ClassProps {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Strong importance — renders a `<strong>` element for text of strong importance (typically bold).
|
|
@@ -19,12 +19,13 @@ export interface StrongProps extends OptionalChildProps, TypographyVariants {}
|
|
|
19
19
|
* @kind component
|
|
20
20
|
* @see https://shelving.cc/ui/Strong
|
|
21
21
|
*/
|
|
22
|
-
export function Strong({ children, ...props }: StrongProps): ReactElement {
|
|
22
|
+
export function Strong({ children, className, ...props }: StrongProps): ReactElement {
|
|
23
23
|
return (
|
|
24
24
|
<strong
|
|
25
25
|
className={getClass(
|
|
26
26
|
STRONG_CLASS, //
|
|
27
27
|
getTypographyClass(props),
|
|
28
|
+
className,
|
|
28
29
|
)}
|
|
29
30
|
>
|
|
30
31
|
{children}
|
package/ui/inline/Subscript.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
2
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
3
3
|
/**
|
|
4
4
|
* Props for `Subscript` — optional `children`.
|
|
5
5
|
*
|
|
6
6
|
* @see https://shelving.cc/ui/SubscriptProps
|
|
7
7
|
*/
|
|
8
|
-
export interface SubscriptProps extends OptionalChildProps {
|
|
8
|
+
export interface SubscriptProps extends OptionalChildProps, ClassProps {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Subscript text — renders a `<sub>` element for typographically lowered text (e.g. chemical formulae).
|
|
@@ -14,4 +14,4 @@ export interface SubscriptProps extends OptionalChildProps {
|
|
|
14
14
|
* @example <>H<Subscript>2</Subscript>O</>
|
|
15
15
|
* @see https://shelving.cc/ui/Subscript
|
|
16
16
|
*/
|
|
17
|
-
export declare function Subscript({ children }: SubscriptProps): ReactElement;
|
|
17
|
+
export declare function Subscript({ children, className }: SubscriptProps): ReactElement;
|
package/ui/inline/Subscript.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getModuleClass } from "../util/css.js";
|
|
2
|
+
import { getClass, getModuleClass } from "../util/css.js";
|
|
3
3
|
import SUBSCRIPT_CSS from "./Subscript.module.css";
|
|
4
4
|
const SUBSCRIPT_CLASS = getModuleClass(SUBSCRIPT_CSS, "subscript");
|
|
5
5
|
/**
|
|
@@ -9,6 +9,6 @@ const SUBSCRIPT_CLASS = getModuleClass(SUBSCRIPT_CSS, "subscript");
|
|
|
9
9
|
* @example <>H<Subscript>2</Subscript>O</>
|
|
10
10
|
* @see https://shelving.cc/ui/Subscript
|
|
11
11
|
*/
|
|
12
|
-
export function Subscript({ children }) {
|
|
13
|
-
return _jsx("sub", { className: SUBSCRIPT_CLASS, children: children });
|
|
12
|
+
export function Subscript({ children, className }) {
|
|
13
|
+
return _jsx("sub", { className: getClass(SUBSCRIPT_CLASS, className), children: children });
|
|
14
14
|
}
|
package/ui/inline/Subscript.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
import { getModuleClass } from "../util/css.js";
|
|
3
|
-
import type { OptionalChildProps } from "../util/props.js";
|
|
2
|
+
import { getClass, getModuleClass } from "../util/css.js";
|
|
3
|
+
import type { ClassProps, OptionalChildProps } from "../util/props.js";
|
|
4
4
|
import SUBSCRIPT_CSS from "./Subscript.module.css";
|
|
5
5
|
|
|
6
6
|
const SUBSCRIPT_CLASS = getModuleClass(SUBSCRIPT_CSS, "subscript");
|
|
@@ -10,7 +10,7 @@ const SUBSCRIPT_CLASS = getModuleClass(SUBSCRIPT_CSS, "subscript");
|
|
|
10
10
|
*
|
|
11
11
|
* @see https://shelving.cc/ui/SubscriptProps
|
|
12
12
|
*/
|
|
13
|
-
export interface SubscriptProps extends OptionalChildProps {}
|
|
13
|
+
export interface SubscriptProps extends OptionalChildProps, ClassProps {}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Subscript text — renders a `<sub>` element for typographically lowered text (e.g. chemical formulae).
|
|
@@ -19,6 +19,6 @@ export interface SubscriptProps extends OptionalChildProps {}
|
|
|
19
19
|
* @example <>H<Subscript>2</Subscript>O</>
|
|
20
20
|
* @see https://shelving.cc/ui/Subscript
|
|
21
21
|
*/
|
|
22
|
-
export function Subscript({ children }: SubscriptProps): ReactElement {
|
|
23
|
-
return <sub className={SUBSCRIPT_CLASS}>{children}</sub>;
|
|
22
|
+
export function Subscript({ children, className }: SubscriptProps): ReactElement {
|
|
23
|
+
return <sub className={getClass(SUBSCRIPT_CLASS, className)}>{children}</sub>;
|
|
24
24
|
}
|