shelving 1.263.0 → 1.264.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/block/Card.d.ts +1 -1
- package/ui/block/Card.js +1 -1
- package/ui/block/Card.tsx +1 -1
- package/ui/block/Image.d.ts +3 -3
- package/ui/block/Image.js +4 -4
- package/ui/block/Image.module.css +4 -1
- package/ui/block/Image.tsx +14 -4
- package/ui/block/Video.d.ts +3 -58
- package/ui/block/Video.js +2 -52
- package/ui/block/Video.module.css +1 -51
- package/ui/block/Video.tsx +3 -99
- package/ui/{form → button}/Button.d.ts +6 -2
- package/ui/{form → button}/Button.tsx +6 -1
- package/ui/button/FullscreenButton.d.ts +31 -0
- package/ui/button/FullscreenButton.js +37 -0
- package/ui/button/FullscreenButton.tsx +58 -0
- package/ui/button/RetryButton.d.ts +29 -0
- package/ui/button/RetryButton.js +27 -0
- package/ui/button/RetryButton.tsx +48 -0
- package/ui/{form → button}/SubmitButton.d.ts +12 -8
- package/ui/{form → button}/SubmitButton.js +5 -5
- package/ui/{form → button}/SubmitButton.tsx +24 -20
- package/ui/button/index.d.ts +5 -0
- package/ui/button/index.js +5 -0
- package/ui/button/index.ts +5 -0
- package/ui/dialog/Dialog.d.ts +1 -1
- package/ui/dialog/Dialog.tsx +1 -1
- package/ui/docs/DocumentationSearchPage.js +2 -2
- package/ui/docs/DocumentationSearchPage.tsx +2 -2
- package/ui/form/FormContext.d.ts +1 -1
- package/ui/form/FormContext.js +1 -1
- package/ui/form/FormContext.tsx +1 -1
- package/ui/form/FormFields.d.ts +1 -1
- package/ui/form/FormFields.js +1 -1
- package/ui/form/FormFields.tsx +2 -2
- package/ui/form/FormFooter.js +1 -1
- package/ui/form/FormFooter.tsx +1 -1
- package/ui/form/FormInput.d.ts +1 -1
- package/ui/form/FormInput.js +1 -1
- package/ui/form/FormInput.tsx +2 -2
- package/ui/form/Progress.d.ts +6 -24
- package/ui/form/Progress.js +9 -20
- package/ui/form/Progress.module.css +13 -32
- package/ui/form/Progress.tsx +18 -51
- package/ui/form/index.d.ts +0 -23
- package/ui/form/index.js +0 -23
- package/ui/form/index.ts +0 -23
- package/ui/index.d.ts +2 -0
- package/ui/index.js +2 -0
- package/ui/index.ts +2 -0
- package/ui/inline/Link.d.ts +1 -1
- package/ui/inline/Link.js +1 -1
- package/ui/inline/Link.tsx +1 -1
- package/ui/{form → input}/ArrayInput.js +1 -1
- package/ui/{form → input}/ArrayInput.tsx +1 -1
- package/ui/{form → input}/ButtonInput.d.ts +1 -1
- package/ui/{form → input}/ButtonInput.js +1 -1
- package/ui/{form → input}/ButtonInput.tsx +1 -1
- package/ui/{form → input}/ButtonPopover.d.ts +1 -1
- package/ui/{form → input}/ButtonPopover.js +1 -1
- package/ui/{form → input}/ButtonPopover.tsx +1 -1
- package/ui/{form → input}/DictionaryInput.js +1 -1
- package/ui/{form → input}/DictionaryInput.tsx +1 -1
- package/ui/{form → input}/SchemaInput.js +1 -1
- package/ui/{form → input}/SchemaInput.test.tsx +2 -3
- package/ui/{form → input}/SchemaInput.tsx +1 -1
- package/ui/{form → input}/TextInput.d.ts +1 -1
- package/ui/{form → input}/TextInput.js +1 -1
- package/ui/{form → input}/TextInput.tsx +1 -1
- package/ui/input/index.d.ts +20 -0
- package/ui/input/index.js +20 -0
- package/ui/input/index.ts +20 -0
- package/ui/layout/Layout.d.ts +1 -1
- package/ui/layout/Layout.js +4 -0
- package/ui/layout/Layout.ts +6 -0
- package/ui/layout/SidebarLayout.js +1 -1
- package/ui/layout/SidebarLayout.tsx +1 -1
- package/ui/menu/Menu.d.ts +1 -1
- package/ui/menu/Menu.js +1 -1
- package/ui/menu/Menu.tsx +1 -1
- package/ui/misc/Catcher.d.ts +2 -19
- package/ui/misc/Catcher.js +3 -22
- package/ui/misc/Catcher.tsx +4 -40
- package/ui/misc/Icon.module.css +3 -1
- package/ui/misc/Loading.d.ts +10 -14
- package/ui/misc/Loading.js +14 -7
- package/ui/misc/Loading.md +24 -5
- package/ui/misc/Loading.module.css +3 -10
- package/ui/misc/Loading.tsx +16 -25
- package/ui/misc/Tag.d.ts +1 -1
- package/ui/misc/Tag.js +1 -1
- package/ui/misc/Tag.tsx +1 -1
- package/ui/notice/Message.d.ts +0 -7
- package/ui/notice/Message.js +0 -8
- package/ui/notice/Message.tsx +0 -9
- package/ui/tree/TreeButton.d.ts +1 -1
- package/ui/tree/TreeButton.js +1 -1
- package/ui/tree/TreeButton.tsx +1 -1
- package/ui/tree/TreeSidebar.js +1 -1
- package/ui/tree/TreeSidebar.tsx +1 -1
- /package/ui/{form → button}/Button.js +0 -0
- /package/ui/{form → button}/Button.md +0 -0
- /package/ui/{form → button}/Button.module.css +0 -0
- /package/ui/{form → button}/Clickable.d.ts +0 -0
- /package/ui/{form → button}/Clickable.js +0 -0
- /package/ui/{form → button}/Clickable.tsx +0 -0
- /package/ui/{form → input}/ArrayInput.d.ts +0 -0
- /package/ui/{form → input}/ArrayRadioInputs.d.ts +0 -0
- /package/ui/{form → input}/ArrayRadioInputs.js +0 -0
- /package/ui/{form → input}/ArrayRadioInputs.tsx +0 -0
- /package/ui/{form → input}/ButtonInputPopover.d.ts +0 -0
- /package/ui/{form → input}/ButtonInputPopover.js +0 -0
- /package/ui/{form → input}/ButtonInputPopover.tsx +0 -0
- /package/ui/{form → input}/CheckboxInput.d.ts +0 -0
- /package/ui/{form → input}/CheckboxInput.js +0 -0
- /package/ui/{form → input}/CheckboxInput.tsx +0 -0
- /package/ui/{form → input}/ChoiceRadioInputs.d.ts +0 -0
- /package/ui/{form → input}/ChoiceRadioInputs.js +0 -0
- /package/ui/{form → input}/ChoiceRadioInputs.tsx +0 -0
- /package/ui/{form → input}/DataInput.d.ts +0 -0
- /package/ui/{form → input}/DataInput.js +0 -0
- /package/ui/{form → input}/DataInput.tsx +0 -0
- /package/ui/{form → input}/DateInput.d.ts +0 -0
- /package/ui/{form → input}/DateInput.js +0 -0
- /package/ui/{form → input}/DateInput.tsx +0 -0
- /package/ui/{form → input}/DictionaryInput.d.ts +0 -0
- /package/ui/{form → input}/FileInput.d.ts +0 -0
- /package/ui/{form → input}/FileInput.js +0 -0
- /package/ui/{form → input}/FileInput.tsx +0 -0
- /package/ui/{form → input}/Input.d.ts +0 -0
- /package/ui/{form → input}/Input.js +0 -0
- /package/ui/{form → input}/Input.module.css +0 -0
- /package/ui/{form → input}/Input.tsx +0 -0
- /package/ui/{form → input}/NumberInput.d.ts +0 -0
- /package/ui/{form → input}/NumberInput.js +0 -0
- /package/ui/{form → input}/NumberInput.tsx +0 -0
- /package/ui/{form → input}/OutputInput.d.ts +0 -0
- /package/ui/{form → input}/OutputInput.js +0 -0
- /package/ui/{form → input}/OutputInput.tsx +0 -0
- /package/ui/{form → input}/Popover.d.ts +0 -0
- /package/ui/{form → input}/Popover.js +0 -0
- /package/ui/{form → input}/Popover.module.css +0 -0
- /package/ui/{form → input}/Popover.tsx +0 -0
- /package/ui/{form → input}/QueryInput.d.ts +0 -0
- /package/ui/{form → input}/QueryInput.js +0 -0
- /package/ui/{form → input}/QueryInput.tsx +0 -0
- /package/ui/{form → input}/RadioInput.d.ts +0 -0
- /package/ui/{form → input}/RadioInput.js +0 -0
- /package/ui/{form → input}/RadioInput.tsx +0 -0
- /package/ui/{form → input}/SchemaInput.d.ts +0 -0
- /package/ui/{form → input}/SchemaInput.md +0 -0
- /package/ui/{form → input}/SelectInput.d.ts +0 -0
- /package/ui/{form → input}/SelectInput.js +0 -0
- /package/ui/{form → input}/SelectInput.tsx +0 -0
package/ui/form/index.d.ts
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
export * from "./ArrayInput.js";
|
|
2
|
-
export * from "./ArrayRadioInputs.js";
|
|
3
|
-
export * from "./Button.js";
|
|
4
|
-
export * from "./ButtonInput.js";
|
|
5
|
-
export * from "./ButtonInputPopover.js";
|
|
6
|
-
export * from "./ButtonPopover.js";
|
|
7
|
-
export * from "./CheckboxInput.js";
|
|
8
|
-
export * from "./ChoiceRadioInputs.js";
|
|
9
|
-
export * from "./Clickable.js";
|
|
10
|
-
export * from "./DataInput.js";
|
|
11
|
-
export * from "./DateInput.js";
|
|
12
|
-
export * from "./DictionaryInput.js";
|
|
13
1
|
export * from "./Field.js";
|
|
14
|
-
export * from "./FileInput.js";
|
|
15
2
|
export * from "./Form.js";
|
|
16
3
|
export * from "./FormContext.js";
|
|
17
4
|
export * from "./FormFields.js";
|
|
@@ -21,14 +8,4 @@ export * from "./FormMessage.js";
|
|
|
21
8
|
export * from "./FormNotice.js";
|
|
22
9
|
export * from "./FormNotify.js";
|
|
23
10
|
export * from "./FormStore.js";
|
|
24
|
-
export * from "./Input.js";
|
|
25
|
-
export * from "./NumberInput.js";
|
|
26
|
-
export * from "./OutputInput.js";
|
|
27
|
-
export * from "./Popover.js";
|
|
28
11
|
export * from "./Progress.js";
|
|
29
|
-
export * from "./QueryInput.js";
|
|
30
|
-
export * from "./RadioInput.js";
|
|
31
|
-
export * from "./SchemaInput.js";
|
|
32
|
-
export * from "./SelectInput.js";
|
|
33
|
-
export * from "./SubmitButton.js";
|
|
34
|
-
export * from "./TextInput.js";
|
package/ui/form/index.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
export * from "./ArrayInput.js";
|
|
2
|
-
export * from "./ArrayRadioInputs.js";
|
|
3
|
-
export * from "./Button.js";
|
|
4
|
-
export * from "./ButtonInput.js";
|
|
5
|
-
export * from "./ButtonInputPopover.js";
|
|
6
|
-
export * from "./ButtonPopover.js";
|
|
7
|
-
export * from "./CheckboxInput.js";
|
|
8
|
-
export * from "./ChoiceRadioInputs.js";
|
|
9
|
-
export * from "./Clickable.js";
|
|
10
|
-
export * from "./DataInput.js";
|
|
11
|
-
export * from "./DateInput.js";
|
|
12
|
-
export * from "./DictionaryInput.js";
|
|
13
1
|
export * from "./Field.js";
|
|
14
|
-
export * from "./FileInput.js";
|
|
15
2
|
export * from "./Form.js";
|
|
16
3
|
export * from "./FormContext.js";
|
|
17
4
|
export * from "./FormFields.js";
|
|
@@ -21,14 +8,4 @@ export * from "./FormMessage.js";
|
|
|
21
8
|
export * from "./FormNotice.js";
|
|
22
9
|
export * from "./FormNotify.js";
|
|
23
10
|
export * from "./FormStore.js";
|
|
24
|
-
export * from "./Input.js";
|
|
25
|
-
export * from "./NumberInput.js";
|
|
26
|
-
export * from "./OutputInput.js";
|
|
27
|
-
export * from "./Popover.js";
|
|
28
11
|
export * from "./Progress.js";
|
|
29
|
-
export * from "./QueryInput.js";
|
|
30
|
-
export * from "./RadioInput.js";
|
|
31
|
-
export * from "./SchemaInput.js";
|
|
32
|
-
export * from "./SelectInput.js";
|
|
33
|
-
export * from "./SubmitButton.js";
|
|
34
|
-
export * from "./TextInput.js";
|
package/ui/form/index.ts
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
export * from "./ArrayInput.js";
|
|
2
|
-
export * from "./ArrayRadioInputs.js";
|
|
3
|
-
export * from "./Button.js";
|
|
4
|
-
export * from "./ButtonInput.js";
|
|
5
|
-
export * from "./ButtonInputPopover.js";
|
|
6
|
-
export * from "./ButtonPopover.js";
|
|
7
|
-
export * from "./CheckboxInput.js";
|
|
8
|
-
export * from "./ChoiceRadioInputs.js";
|
|
9
|
-
export * from "./Clickable.js";
|
|
10
|
-
export * from "./DataInput.js";
|
|
11
|
-
export * from "./DateInput.js";
|
|
12
|
-
export * from "./DictionaryInput.js";
|
|
13
1
|
export * from "./Field.js";
|
|
14
|
-
export * from "./FileInput.js";
|
|
15
2
|
export * from "./Form.js";
|
|
16
3
|
export * from "./FormContext.js";
|
|
17
4
|
export * from "./FormFields.js";
|
|
@@ -21,14 +8,4 @@ export * from "./FormMessage.js";
|
|
|
21
8
|
export * from "./FormNotice.js";
|
|
22
9
|
export * from "./FormNotify.js";
|
|
23
10
|
export * from "./FormStore.js";
|
|
24
|
-
export * from "./Input.js";
|
|
25
|
-
export * from "./NumberInput.js";
|
|
26
|
-
export * from "./OutputInput.js";
|
|
27
|
-
export * from "./Popover.js";
|
|
28
11
|
export * from "./Progress.js";
|
|
29
|
-
export * from "./QueryInput.js";
|
|
30
|
-
export * from "./RadioInput.js";
|
|
31
|
-
export * from "./SchemaInput.js";
|
|
32
|
-
export * from "./SelectInput.js";
|
|
33
|
-
export * from "./SubmitButton.js";
|
|
34
|
-
export * from "./TextInput.js";
|
package/ui/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from "./app/index.js";
|
|
2
2
|
export * from "./block/index.js";
|
|
3
|
+
export * from "./button/index.js";
|
|
3
4
|
export * from "./dialog/index.js";
|
|
4
5
|
export * from "./docs/index.js";
|
|
5
6
|
export * from "./form/index.js";
|
|
6
7
|
export * from "./inline/index.js";
|
|
8
|
+
export * from "./input/index.js";
|
|
7
9
|
export * from "./layout/index.js";
|
|
8
10
|
export * from "./menu/index.js";
|
|
9
11
|
export * from "./misc/index.js";
|
package/ui/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from "./app/index.js";
|
|
2
2
|
export * from "./block/index.js";
|
|
3
|
+
export * from "./button/index.js";
|
|
3
4
|
export * from "./dialog/index.js";
|
|
4
5
|
export * from "./docs/index.js";
|
|
5
6
|
export * from "./form/index.js";
|
|
6
7
|
export * from "./inline/index.js";
|
|
8
|
+
export * from "./input/index.js";
|
|
7
9
|
export * from "./layout/index.js";
|
|
8
10
|
export * from "./menu/index.js";
|
|
9
11
|
export * from "./misc/index.js";
|
package/ui/index.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from "./app/index.js";
|
|
2
2
|
export * from "./block/index.js";
|
|
3
|
+
export * from "./button/index.js";
|
|
3
4
|
export * from "./dialog/index.js";
|
|
4
5
|
export * from "./docs/index.js";
|
|
5
6
|
export * from "./form/index.js";
|
|
6
7
|
export * from "./inline/index.js";
|
|
8
|
+
export * from "./input/index.js";
|
|
7
9
|
export * from "./layout/index.js";
|
|
8
10
|
export * from "./menu/index.js";
|
|
9
11
|
export * from "./misc/index.js";
|
package/ui/inline/Link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
import { type ClickableProps } from "../
|
|
2
|
+
import { type ClickableProps } from "../button/Clickable.js";
|
|
3
3
|
import { type TypographyVariants } from "../style/Typography.js";
|
|
4
4
|
/**
|
|
5
5
|
* Props for `Link` — `ClickableProps` (`href` for navigation or `onClick` for actions) plus colour and typography variants.
|
package/ui/inline/Link.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Clickable } from "../
|
|
2
|
+
import { Clickable } from "../button/Clickable.js";
|
|
3
3
|
import { getTypographyClass } from "../style/Typography.js";
|
|
4
4
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
5
5
|
import LINK_CSS from "./Link.module.css";
|
package/ui/inline/Link.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
import { Clickable, type ClickableProps } from "../
|
|
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
5
|
import LINK_CSS from "./Link.module.css";
|
|
@@ -5,7 +5,7 @@ import { splitMessage } from "../../util/error.js";
|
|
|
5
5
|
import { formatUnit } from "../../util/format.js";
|
|
6
6
|
import { Column } from "../block/Column.js";
|
|
7
7
|
import { Row } from "../block/Row.js";
|
|
8
|
-
import { Button } from "
|
|
8
|
+
import { Button } from "../button/Button.js";
|
|
9
9
|
import { ButtonInput } from "./ButtonInput.js";
|
|
10
10
|
import { SchemaInput } from "./SchemaInput.js";
|
|
11
11
|
export function ArrayInput({ name,
|
|
@@ -6,7 +6,7 @@ import { splitMessage } from "../../util/error.js";
|
|
|
6
6
|
import { formatUnit } from "../../util/format.js";
|
|
7
7
|
import { Column } from "../block/Column.js";
|
|
8
8
|
import { Row } from "../block/Row.js";
|
|
9
|
-
import { Button } from "
|
|
9
|
+
import { Button } from "../button/Button.js";
|
|
10
10
|
import { ButtonInput } from "./ButtonInput.js";
|
|
11
11
|
import type { ValueInputProps } from "./Input.js";
|
|
12
12
|
import { SchemaInput } from "./SchemaInput.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
+
import { type ClickableProps } from "../button/Clickable.js";
|
|
2
3
|
import { type FlexVariants } from "../style/Flex.js";
|
|
3
|
-
import { type ClickableProps } from "./Clickable.js";
|
|
4
4
|
import { type InputProps, type InputVariants } from "./Input.js";
|
|
5
5
|
/**
|
|
6
6
|
* Props for `ButtonInput`, a clickable element styled to match form inputs.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { notNullish } from "../../util/null.js";
|
|
3
|
+
import { Clickable } from "../button/Clickable.js";
|
|
3
4
|
import { getFlexClass } from "../style/Flex.js";
|
|
4
5
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
5
|
-
import { Clickable } from "./Clickable.js";
|
|
6
6
|
import { getInputClass } from "./Input.js";
|
|
7
7
|
import INPUT_CSS from "./Input.module.css";
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { notNullish } from "../../util/null.js";
|
|
3
|
+
import { Clickable, type ClickableProps } from "../button/Clickable.js";
|
|
3
4
|
import { type FlexVariants, getFlexClass } from "../style/Flex.js";
|
|
4
5
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
5
|
-
import { Clickable, type ClickableProps } from "./Clickable.js";
|
|
6
6
|
import { getInputClass, type InputProps, type InputVariants } from "./Input.js";
|
|
7
7
|
import INPUT_CSS from "./Input.module.css";
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** biome-ignore-all lint/a11y/noStaticElementInteractions: This is fine we're only using this to listen for clicks on child buttons. */
|
|
2
2
|
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: This is fine we're only using this to listen for clicks on child buttons. */
|
|
3
3
|
import { type ReactElement } from "react";
|
|
4
|
-
import { type ButtonVariants } from "
|
|
4
|
+
import { type ButtonVariants } from "../button/Button.js";
|
|
5
5
|
import { type PopoverChildren } from "./Popover.js";
|
|
6
6
|
/**
|
|
7
7
|
* Props for `ButtonPopover`, a button that toggles an adjacent popover.
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
/** biome-ignore-all lint/a11y/noStaticElementInteractions: This is fine we're only using this to listen for clicks on child buttons. */
|
|
3
3
|
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: This is fine we're only using this to listen for clicks on child buttons. */
|
|
4
4
|
import { useState } from "react";
|
|
5
|
-
import { Button } from "
|
|
5
|
+
import { Button } from "../button/Button.js";
|
|
6
6
|
import { Popover } from "./Popover.js";
|
|
7
7
|
/**
|
|
8
8
|
* A button that, when clicked, shows a popover next to it when clicked or focused.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: This is fine we're only using this to listen for clicks on child buttons. */
|
|
3
3
|
|
|
4
4
|
import { type ReactElement, useState } from "react";
|
|
5
|
-
import { Button, type ButtonVariants } from "
|
|
5
|
+
import { Button, type ButtonVariants } from "../button/Button.js";
|
|
6
6
|
import { Popover, type PopoverChildren } from "./Popover.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -5,7 +5,7 @@ import { splitMessage } from "../../util/error.js";
|
|
|
5
5
|
import { formatUnit } from "../../util/format.js";
|
|
6
6
|
import { omitProp } from "../../util/object.js";
|
|
7
7
|
import { Row } from "../block/Row.js";
|
|
8
|
-
import { Button } from "
|
|
8
|
+
import { Button } from "../button/Button.js";
|
|
9
9
|
import { ButtonInput } from "./ButtonInput.js";
|
|
10
10
|
import { SchemaInput } from "./SchemaInput.js";
|
|
11
11
|
import { TextInput } from "./TextInput.js";
|
|
@@ -7,7 +7,7 @@ import { splitMessage } from "../../util/error.js";
|
|
|
7
7
|
import { formatUnit } from "../../util/format.js";
|
|
8
8
|
import { omitProp } from "../../util/object.js";
|
|
9
9
|
import { Row } from "../block/Row.js";
|
|
10
|
-
import { Button } from "
|
|
10
|
+
import { Button } from "../button/Button.js";
|
|
11
11
|
import { ButtonInput } from "./ButtonInput.js";
|
|
12
12
|
import type { ValueInputProps } from "./Input.js";
|
|
13
13
|
import { SchemaInput } from "./SchemaInput.js";
|
|
@@ -17,13 +17,13 @@ import { getNumber } from "../../util/number.js";
|
|
|
17
17
|
import { getKeys } from "../../util/object.js";
|
|
18
18
|
import { getSource, requireSource } from "../../util/source.js";
|
|
19
19
|
import { getString } from "../../util/string.js";
|
|
20
|
+
import { Field } from "../form/Field.js";
|
|
20
21
|
import { ArrayInput } from "./ArrayInput.js";
|
|
21
22
|
import { CheckboxInput } from "./CheckboxInput.js";
|
|
22
23
|
import { ChoiceRadioInputs } from "./ChoiceRadioInputs.js";
|
|
23
24
|
import { DataInput } from "./DataInput.js";
|
|
24
25
|
import { DateInput } from "./DateInput.js";
|
|
25
26
|
import { DictionaryInput } from "./DictionaryInput.js";
|
|
26
|
-
import { Field } from "./Field.js";
|
|
27
27
|
import { NumberInput } from "./NumberInput.js";
|
|
28
28
|
import { SelectInput } from "./SelectInput.js";
|
|
29
29
|
import { TextInput } from "./TextInput.js";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import { renderToStaticMarkup } from "react-dom/server";
|
|
3
|
-
import { StringSchema } from "../../
|
|
4
|
-
import {
|
|
5
|
-
import { StringSchemaInput } from "./SchemaInput.js";
|
|
3
|
+
import { PASSTHROUGH, StringSchema } from "../../index.js";
|
|
4
|
+
import { StringSchemaInput } from "../index.js";
|
|
6
5
|
|
|
7
6
|
describe("StringSchemaInput", () => {
|
|
8
7
|
test("formats the initial value to its clean sanitized value", () => {
|
|
@@ -19,6 +19,7 @@ import { getKeys } from "../../util/object.js";
|
|
|
19
19
|
import { getSource, requireSource } from "../../util/source.js";
|
|
20
20
|
import { getString } from "../../util/string.js";
|
|
21
21
|
import type { ValidatorType } from "../../util/validate.js";
|
|
22
|
+
import { Field } from "../form/Field.js";
|
|
22
23
|
import type { OptionalChildProps } from "../util/props.js";
|
|
23
24
|
import { ArrayInput } from "./ArrayInput.js";
|
|
24
25
|
import { CheckboxInput } from "./CheckboxInput.js";
|
|
@@ -26,7 +27,6 @@ import { ChoiceRadioInputs } from "./ChoiceRadioInputs.js";
|
|
|
26
27
|
import { DataInput } from "./DataInput.js";
|
|
27
28
|
import { DateInput } from "./DateInput.js";
|
|
28
29
|
import { DictionaryInput } from "./DictionaryInput.js";
|
|
29
|
-
import { Field } from "./Field.js";
|
|
30
30
|
import type { ValueInputProps } from "./Input.js";
|
|
31
31
|
import { NumberInput } from "./NumberInput.js";
|
|
32
32
|
import { SelectInput } from "./SelectInput.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import type { StringInputType } from "../../schema/StringSchema.js";
|
|
3
|
-
import { type InputVariants, type ValueInputProps } from "
|
|
3
|
+
import { type InputVariants, type ValueInputProps } from "../input/Input.js";
|
|
4
4
|
type TextFormatter = (str: string) => string;
|
|
5
5
|
/**
|
|
6
6
|
* Props for `TextInput`, a single- or multi-line text input bound to a `string` value.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PASSTHROUGH } from "../../util/function.js";
|
|
3
|
+
import { getInputClass } from "../input/Input.js";
|
|
3
4
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
4
|
-
import { getInputClass } from "./Input.js";
|
|
5
5
|
import INPUT_CSS from "./Input.module.css";
|
|
6
6
|
/**
|
|
7
7
|
* Text input bound to a `string` value, rendered as an `<input>` or a `<textarea>` when `rows > 1`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactElement, SyntheticEvent } from "react";
|
|
2
2
|
import type { StringInputType } from "../../schema/StringSchema.js";
|
|
3
3
|
import { PASSTHROUGH } from "../../util/function.js";
|
|
4
|
+
import { getInputClass, type InputVariants, type ValueInputProps } from "../input/Input.js";
|
|
4
5
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
5
|
-
import { getInputClass, type InputVariants, type ValueInputProps } from "./Input.js";
|
|
6
6
|
import INPUT_CSS from "./Input.module.css";
|
|
7
7
|
|
|
8
8
|
type TextFormatter = (str: string) => string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./ArrayInput.js";
|
|
2
|
+
export * from "./ArrayRadioInputs.js";
|
|
3
|
+
export * from "./ButtonInput.js";
|
|
4
|
+
export * from "./ButtonInputPopover.js";
|
|
5
|
+
export * from "./ButtonPopover.js";
|
|
6
|
+
export * from "./CheckboxInput.js";
|
|
7
|
+
export * from "./ChoiceRadioInputs.js";
|
|
8
|
+
export * from "./DataInput.js";
|
|
9
|
+
export * from "./DateInput.js";
|
|
10
|
+
export * from "./DictionaryInput.js";
|
|
11
|
+
export * from "./FileInput.js";
|
|
12
|
+
export * from "./Input.js";
|
|
13
|
+
export * from "./NumberInput.js";
|
|
14
|
+
export * from "./OutputInput.js";
|
|
15
|
+
export * from "./Popover.js";
|
|
16
|
+
export * from "./QueryInput.js";
|
|
17
|
+
export * from "./RadioInput.js";
|
|
18
|
+
export * from "./SchemaInput.js";
|
|
19
|
+
export * from "./SelectInput.js";
|
|
20
|
+
export * from "./TextInput.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./ArrayInput.js";
|
|
2
|
+
export * from "./ArrayRadioInputs.js";
|
|
3
|
+
export * from "./ButtonInput.js";
|
|
4
|
+
export * from "./ButtonInputPopover.js";
|
|
5
|
+
export * from "./ButtonPopover.js";
|
|
6
|
+
export * from "./CheckboxInput.js";
|
|
7
|
+
export * from "./ChoiceRadioInputs.js";
|
|
8
|
+
export * from "./DataInput.js";
|
|
9
|
+
export * from "./DateInput.js";
|
|
10
|
+
export * from "./DictionaryInput.js";
|
|
11
|
+
export * from "./FileInput.js";
|
|
12
|
+
export * from "./Input.js";
|
|
13
|
+
export * from "./NumberInput.js";
|
|
14
|
+
export * from "./OutputInput.js";
|
|
15
|
+
export * from "./Popover.js";
|
|
16
|
+
export * from "./QueryInput.js";
|
|
17
|
+
export * from "./RadioInput.js";
|
|
18
|
+
export * from "./SchemaInput.js";
|
|
19
|
+
export * from "./SelectInput.js";
|
|
20
|
+
export * from "./TextInput.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./ArrayInput.js";
|
|
2
|
+
export * from "./ArrayRadioInputs.js";
|
|
3
|
+
export * from "./ButtonInput.js";
|
|
4
|
+
export * from "./ButtonInputPopover.js";
|
|
5
|
+
export * from "./ButtonPopover.js";
|
|
6
|
+
export * from "./CheckboxInput.js";
|
|
7
|
+
export * from "./ChoiceRadioInputs.js";
|
|
8
|
+
export * from "./DataInput.js";
|
|
9
|
+
export * from "./DateInput.js";
|
|
10
|
+
export * from "./DictionaryInput.js";
|
|
11
|
+
export * from "./FileInput.js";
|
|
12
|
+
export * from "./Input.js";
|
|
13
|
+
export * from "./NumberInput.js";
|
|
14
|
+
export * from "./OutputInput.js";
|
|
15
|
+
export * from "./Popover.js";
|
|
16
|
+
export * from "./QueryInput.js";
|
|
17
|
+
export * from "./RadioInput.js";
|
|
18
|
+
export * from "./SchemaInput.js";
|
|
19
|
+
export * from "./SelectInput.js";
|
|
20
|
+
export * from "./TextInput.js";
|
package/ui/layout/Layout.d.ts
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* @todo This can be removed once Safari iOS supports interactive-widget viewport property. https://caniuse.com/mdn-html_elements_meta_name_viewport_interactive-widget
|
|
8
8
|
* @see https://shelving.cc/ui/useSafeKeyboardArea
|
|
9
9
|
*/
|
|
10
|
-
export declare function useSafeKeyboardArea():
|
|
10
|
+
export declare function useSafeKeyboardArea(): void;
|
package/ui/layout/Layout.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
1
2
|
/**
|
|
2
3
|
* Track the dynamic viewport height so layout safe-area insets follow the on-screen keyboard.
|
|
3
4
|
*
|
|
@@ -8,6 +9,9 @@
|
|
|
8
9
|
* @see https://shelving.cc/ui/useSafeKeyboardArea
|
|
9
10
|
*/
|
|
10
11
|
export function useSafeKeyboardArea() {
|
|
12
|
+
useEffect(_safeKeyboardArea, []);
|
|
13
|
+
}
|
|
14
|
+
function _safeKeyboardArea() {
|
|
11
15
|
const vv = window.visualViewport;
|
|
12
16
|
if (!vv)
|
|
13
17
|
return;
|
package/ui/layout/Layout.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Track the dynamic viewport height so layout safe-area insets follow the on-screen keyboard.
|
|
3
5
|
*
|
|
@@ -8,6 +10,10 @@
|
|
|
8
10
|
* @see https://shelving.cc/ui/useSafeKeyboardArea
|
|
9
11
|
*/
|
|
10
12
|
export function useSafeKeyboardArea() {
|
|
13
|
+
useEffect(_safeKeyboardArea, []);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function _safeKeyboardArea() {
|
|
11
17
|
const vv = window.visualViewport;
|
|
12
18
|
if (!vv) return;
|
|
13
19
|
const onResize = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/solid";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
-
import { Button } from "../
|
|
4
|
+
import { Button } from "../button/Button.js";
|
|
5
5
|
import { requireMetaURL } from "../misc/MetaContext.js";
|
|
6
6
|
import { RouteCache } from "../router/RouteCache.js";
|
|
7
7
|
import { getClass, getModuleClass } from "../util/css.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/solid";
|
|
2
2
|
import { type ReactElement, type ReactNode, useEffect, useState } from "react";
|
|
3
|
-
import { Button } from "../
|
|
3
|
+
import { Button } from "../button/Button.js";
|
|
4
4
|
import { requireMetaURL } from "../misc/MetaContext.js";
|
|
5
5
|
import { RouteCache } from "../router/RouteCache.js";
|
|
6
6
|
import { getClass, getModuleClass } from "../util/css.js";
|
package/ui/menu/Menu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import { type ClickableProps } from "../
|
|
2
|
+
import { type ClickableProps } from "../button/Clickable.js";
|
|
3
3
|
import { type BlockVariants } from "../style/Block.js";
|
|
4
4
|
import type { OptionalChildProps } from "../util/props.js";
|
|
5
5
|
/**
|
package/ui/menu/Menu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { isArray } from "../../util/array.js";
|
|
3
3
|
import { getLink, isURLActive, isURLProud } from "../../util/index.js";
|
|
4
|
-
import { Clickable } from "../
|
|
4
|
+
import { Clickable } from "../button/Clickable.js";
|
|
5
5
|
import { requireMeta } from "../misc/MetaContext.js";
|
|
6
6
|
import { getBlockClass } from "../style/Block.js";
|
|
7
7
|
import { getClass, getModuleClass } from "../util/css.js";
|
package/ui/menu/Menu.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { isArray } from "../../util/array.js";
|
|
3
3
|
import { getLink, isURLActive, isURLProud } from "../../util/index.js";
|
|
4
|
-
import { Clickable, type ClickableProps } from "../
|
|
4
|
+
import { Clickable, type ClickableProps } from "../button/Clickable.js";
|
|
5
5
|
import { requireMeta } from "../misc/MetaContext.js";
|
|
6
6
|
import { type BlockVariants, getBlockClass } from "../style/Block.js";
|
|
7
7
|
import { getClass, getModuleClass } from "../util/css.js";
|
package/ui/misc/Catcher.d.ts
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
import { Component, type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import type { Callback } from "../../util/function.js";
|
|
3
|
-
import {
|
|
4
|
-
import type { ChildProps, OptionalChildProps } from "../util/props.js";
|
|
5
|
-
/**
|
|
6
|
-
* Props for `<RetryButton>` — `<Button>` variants plus optional `children` to override the default "Retry" label.
|
|
7
|
-
*
|
|
8
|
-
* @see https://shelving.cc/ui/RetryButtonProps
|
|
9
|
-
*/
|
|
10
|
-
export interface RetryButtonProps extends ButtonVariants, OptionalChildProps {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Button that retries the nearest `<Catcher>` error boundary when clicked.
|
|
14
|
-
*
|
|
15
|
-
* - Reads the retry callback from `<Catcher>`'s private context, so it renders `null` when there is no boundary above it to retry.
|
|
16
|
-
* - Defaults to an "Retry" label with a refresh icon; pass `children` to override.
|
|
17
|
-
*
|
|
18
|
-
* @kind component
|
|
19
|
-
* @see https://shelving.cc/ui/RetryButton
|
|
20
|
-
*/
|
|
21
|
-
export declare function RetryButton({ children, ...props }: RetryButtonProps): ReactElement | null;
|
|
3
|
+
import type { ChildProps } from "../util/props.js";
|
|
22
4
|
/**
|
|
5
|
+
import { RetryButton, RetryContext } from "../button/RetryButton.js";
|
|
23
6
|
* Props for a component that renders a caught error `reason`.
|
|
24
7
|
*
|
|
25
8
|
* @see https://shelving.cc/ui/ErrorProps
|
package/ui/misc/Catcher.js
CHANGED
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Component, createContext, use } from "react";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Component } from "react";
|
|
4
3
|
import { getMessage } from "../../util/error.js";
|
|
5
4
|
import { Paragraph } from "../block/Paragraph.js";
|
|
6
|
-
import {
|
|
5
|
+
import { RetryButton, RetryContext } from "../button/RetryButton.js";
|
|
7
6
|
import { CenteredLayout } from "../layout/CenteredLayout.js";
|
|
8
7
|
import { Notice } from "../notice/Notice.js";
|
|
9
8
|
import { Page } from "../page/Page.js";
|
|
10
|
-
const RetryContext = createContext(undefined);
|
|
11
|
-
RetryContext.displayName = "RetryContext";
|
|
12
|
-
const RETRY_CHILDREN = (_jsxs(_Fragment, { children: [_jsx(ArrowPathIcon, {}), "Retry"] }));
|
|
13
|
-
/**
|
|
14
|
-
* Button that retries the nearest `<Catcher>` error boundary when clicked.
|
|
15
|
-
*
|
|
16
|
-
* - Reads the retry callback from `<Catcher>`'s private context, so it renders `null` when there is no boundary above it to retry.
|
|
17
|
-
* - Defaults to an "Retry" label with a refresh icon; pass `children` to override.
|
|
18
|
-
*
|
|
19
|
-
* @kind component
|
|
20
|
-
* @see https://shelving.cc/ui/RetryButton
|
|
21
|
-
*/
|
|
22
|
-
export function RetryButton({ children = RETRY_CHILDREN, ...props }) {
|
|
23
|
-
const retry = use(RetryContext);
|
|
24
|
-
if (!retry)
|
|
25
|
-
return null;
|
|
26
|
-
return (_jsx(Button, { onClick: retry, ...props, children: children }));
|
|
27
|
-
}
|
|
28
9
|
/**
|
|
29
10
|
* React error boundary that renders a fallback component when any descendant throws.
|
|
30
11
|
*
|
package/ui/misc/Catcher.tsx
CHANGED
|
@@ -1,51 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Component, createContext, type ReactElement, type ReactNode, use } from "react";
|
|
1
|
+
import { Component, type ReactElement, type ReactNode } from "react";
|
|
3
2
|
import { getMessage } from "../../util/error.js";
|
|
4
3
|
import type { Callback } from "../../util/function.js";
|
|
5
4
|
import { Paragraph } from "../block/Paragraph.js";
|
|
6
|
-
import {
|
|
5
|
+
import { RetryButton, RetryContext } from "../button/RetryButton.js";
|
|
7
6
|
import { CenteredLayout } from "../layout/CenteredLayout.js";
|
|
8
7
|
import { Notice } from "../notice/Notice.js";
|
|
9
8
|
import { Page } from "../page/Page.js";
|
|
10
|
-
import type { ChildProps
|
|
11
|
-
|
|
12
|
-
const RetryContext = createContext<Callback | undefined>(undefined);
|
|
13
|
-
RetryContext.displayName = "RetryContext";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Props for `<RetryButton>` — `<Button>` variants plus optional `children` to override the default "Retry" label.
|
|
17
|
-
*
|
|
18
|
-
* @see https://shelving.cc/ui/RetryButtonProps
|
|
19
|
-
*/
|
|
20
|
-
export interface RetryButtonProps extends ButtonVariants, OptionalChildProps {}
|
|
21
|
-
|
|
22
|
-
const RETRY_CHILDREN = (
|
|
23
|
-
<>
|
|
24
|
-
<ArrowPathIcon />
|
|
25
|
-
Retry
|
|
26
|
-
</>
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Button that retries the nearest `<Catcher>` error boundary when clicked.
|
|
31
|
-
*
|
|
32
|
-
* - Reads the retry callback from `<Catcher>`'s private context, so it renders `null` when there is no boundary above it to retry.
|
|
33
|
-
* - Defaults to an "Retry" label with a refresh icon; pass `children` to override.
|
|
34
|
-
*
|
|
35
|
-
* @kind component
|
|
36
|
-
* @see https://shelving.cc/ui/RetryButton
|
|
37
|
-
*/
|
|
38
|
-
export function RetryButton({ children = RETRY_CHILDREN, ...props }: RetryButtonProps): ReactElement | null {
|
|
39
|
-
const retry = use(RetryContext);
|
|
40
|
-
if (!retry) return null;
|
|
41
|
-
return (
|
|
42
|
-
<Button onClick={retry} {...props}>
|
|
43
|
-
{children}
|
|
44
|
-
</Button>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
9
|
+
import type { ChildProps } from "../util/props.js";
|
|
47
10
|
|
|
48
11
|
/**
|
|
12
|
+
import { RetryButton, RetryContext } from "../button/RetryButton.js";
|
|
49
13
|
* Props for a component that renders a caught error `reason`.
|
|
50
14
|
*
|
|
51
15
|
* @see https://shelving.cc/ui/ErrorProps
|