shelving 1.271.3 → 1.271.4
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 +1 -1
- package/ui/block/List.d.ts +3 -2
- package/ui/block/List.tsx +3 -2
- package/ui/input/Popover.d.ts +1 -1
- package/ui/input/Popover.tsx +1 -1
- package/ui/menu/Menu.d.ts +1 -1
- package/ui/menu/Menu.tsx +1 -1
package/package.json
CHANGED
package/ui/block/List.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { ImmutableArray } from "../../util/array.js";
|
|
2
3
|
import { type BlockVariants } from "../style/Block.js";
|
|
3
4
|
import { type GapVariants } from "../style/Gap.js";
|
|
4
5
|
/**
|
|
@@ -7,8 +8,8 @@ import { type GapVariants } from "../style/Gap.js";
|
|
|
7
8
|
* @see https://shelving.cc/ui/ListProps
|
|
8
9
|
*/
|
|
9
10
|
export interface ListProps extends GapVariants, BlockVariants {
|
|
10
|
-
children: ReactNode
|
|
11
|
-
ordered?: boolean;
|
|
11
|
+
readonly children: ImmutableArray<ReactNode>;
|
|
12
|
+
readonly ordered?: boolean | undefined;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* List block — wraps each child in an `<li>` and renders an `<ul>` or `<ol>`.
|
package/ui/block/List.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { ImmutableArray } from "../../util/array.js";
|
|
2
3
|
import { type BlockVariants, getBlockClass } from "../style/Block.js";
|
|
3
4
|
import { type GapVariants, getGapClass } from "../style/Gap.js";
|
|
4
5
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
@@ -13,8 +14,8 @@ const LIST_UNORDERED_CLASS = getModuleClass(LIST_CSS, "unordered");
|
|
|
13
14
|
* @see https://shelving.cc/ui/ListProps
|
|
14
15
|
*/
|
|
15
16
|
export interface ListProps extends GapVariants, BlockVariants {
|
|
16
|
-
children: ReactNode
|
|
17
|
-
ordered?: boolean;
|
|
17
|
+
readonly children: ImmutableArray<ReactNode>;
|
|
18
|
+
readonly ordered?: boolean | undefined;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
/**
|
package/ui/input/Popover.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { Callback } from "../../util/function.js";
|
|
|
7
7
|
*
|
|
8
8
|
* @see https://shelving.cc/ui/PopoverChildren
|
|
9
9
|
*/
|
|
10
|
-
export type PopoverChildren = [
|
|
10
|
+
export type PopoverChildren = readonly [
|
|
11
11
|
/**
|
|
12
12
|
* First child of the <Popover> is element that activates the popover.
|
|
13
13
|
* - Should be a `<Button>` or `<Input>` that activates or provides the children.
|
package/ui/input/Popover.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import styles from "./Popover.module.css";
|
|
|
15
15
|
*
|
|
16
16
|
* @see https://shelving.cc/ui/PopoverChildren
|
|
17
17
|
*/
|
|
18
|
-
export type PopoverChildren = [
|
|
18
|
+
export type PopoverChildren = readonly [
|
|
19
19
|
/**
|
|
20
20
|
* First child of the <Popover> is element that activates the popover.
|
|
21
21
|
* - Should be a `<Button>` or `<Input>` that activates or provides the children.
|
package/ui/menu/Menu.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface MenuItemProps extends ClickableProps {
|
|
|
28
28
|
* The first child becomes the link label (rendered inside the `<a>`).
|
|
29
29
|
* - Any additional children form the submenu — only rendered when this item is "proud" (an ancestor of the current page). The caller is responsible for wrapping the submenu in a nested `<Menu>` if it wants the CSS `.menu .menu` descendant rules to apply.
|
|
30
30
|
*/
|
|
31
|
-
readonly children: ReactNode | [ReactNode, ...ReactNode[]];
|
|
31
|
+
readonly children: ReactNode | readonly [ReactNode, ...ReactNode[]];
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* A `<li>` containing an `<a>` link, plus optional submenu content shown when this item is "proud".
|
package/ui/menu/Menu.tsx
CHANGED
|
@@ -52,7 +52,7 @@ export interface MenuItemProps extends ClickableProps {
|
|
|
52
52
|
* The first child becomes the link label (rendered inside the `<a>`).
|
|
53
53
|
* - Any additional children form the submenu — only rendered when this item is "proud" (an ancestor of the current page). The caller is responsible for wrapping the submenu in a nested `<Menu>` if it wants the CSS `.menu .menu` descendant rules to apply.
|
|
54
54
|
*/
|
|
55
|
-
readonly children: ReactNode | [ReactNode, ...ReactNode[]];
|
|
55
|
+
readonly children: ReactNode | readonly [ReactNode, ...ReactNode[]];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|