@ignite-ember/ui-react 0.0.0-stage → 0.2.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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +260 -2
- package/dist/CopySource.d.ts +4 -0
- package/dist/CopySource.d.ts.map +1 -0
- package/dist/CopySource.js +50 -0
- package/dist/CopySource.js.map +1 -0
- package/dist/DataTable.d.ts +77 -0
- package/dist/DataTable.d.ts.map +1 -0
- package/dist/DataTable.js +45 -0
- package/dist/DataTable.js.map +1 -0
- package/dist/Dialog.d.ts +41 -0
- package/dist/Dialog.d.ts.map +1 -0
- package/dist/Dialog.js +94 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/ErrorBoundary.d.ts +97 -0
- package/dist/ErrorBoundary.d.ts.map +1 -0
- package/dist/ErrorBoundary.js +97 -0
- package/dist/ErrorBoundary.js.map +1 -0
- package/dist/LiveRegion.d.ts +41 -0
- package/dist/LiveRegion.d.ts.map +1 -0
- package/dist/LiveRegion.js +76 -0
- package/dist/LiveRegion.js.map +1 -0
- package/dist/Markdown.d.ts +22 -0
- package/dist/Markdown.d.ts.map +1 -0
- package/dist/Markdown.js +56 -0
- package/dist/Markdown.js.map +1 -0
- package/dist/MarkdownInline.d.ts +53 -0
- package/dist/MarkdownInline.d.ts.map +1 -0
- package/dist/MarkdownInline.js +159 -0
- package/dist/MarkdownInline.js.map +1 -0
- package/dist/MenuIcon.d.ts +60 -0
- package/dist/MenuIcon.d.ts.map +1 -0
- package/dist/MenuIcon.js +102 -0
- package/dist/MenuIcon.js.map +1 -0
- package/dist/Mermaid.d.ts +40 -0
- package/dist/Mermaid.d.ts.map +1 -0
- package/dist/Mermaid.js +121 -0
- package/dist/Mermaid.js.map +1 -0
- package/dist/Monogram.d.ts +46 -0
- package/dist/Monogram.d.ts.map +1 -0
- package/dist/Monogram.js +96 -0
- package/dist/Monogram.js.map +1 -0
- package/dist/OverflowMenu.d.ts +60 -0
- package/dist/OverflowMenu.d.ts.map +1 -0
- package/dist/OverflowMenu.js +149 -0
- package/dist/OverflowMenu.js.map +1 -0
- package/dist/Shell.d.ts +67 -0
- package/dist/Shell.d.ts.map +1 -0
- package/dist/Shell.js +44 -0
- package/dist/Shell.js.map +1 -0
- package/dist/Skeleton.d.ts +62 -0
- package/dist/Skeleton.d.ts.map +1 -0
- package/dist/Skeleton.js +56 -0
- package/dist/Skeleton.js.map +1 -0
- package/dist/Split.d.ts +85 -0
- package/dist/Split.d.ts.map +1 -0
- package/dist/Split.js +156 -0
- package/dist/Split.js.map +1 -0
- package/dist/Tabs.d.ts +77 -0
- package/dist/Tabs.d.ts.map +1 -0
- package/dist/Tabs.js +91 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Toast.d.ts +98 -0
- package/dist/Toast.d.ts.map +1 -0
- package/dist/Toast.js +129 -0
- package/dist/Toast.js.map +1 -0
- package/dist/Tooltip.d.ts +24 -0
- package/dist/Tooltip.d.ts.map +1 -0
- package/dist/Tooltip.js +166 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/controls.d.ts +117 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +59 -0
- package/dist/controls.js.map +1 -0
- package/dist/cx.d.ts +3 -0
- package/dist/cx.d.ts.map +1 -0
- package/dist/cx.js +5 -0
- package/dist/cx.js.map +1 -0
- package/dist/fenceInfo.d.ts +26 -0
- package/dist/fenceInfo.d.ts.map +1 -0
- package/dist/fenceInfo.js +22 -0
- package/dist/fenceInfo.js.map +1 -0
- package/dist/formControls.d.ts +143 -0
- package/dist/formControls.d.ts.map +1 -0
- package/dist/formControls.js +108 -0
- package/dist/formControls.js.map +1 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +95 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +93 -0
- package/dist/layout.js.map +1 -0
- package/dist/primitives.d.ts +33 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +33 -0
- package/dist/primitives.js.map +1 -0
- package/dist/progress.d.ts +64 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +51 -0
- package/dist/progress.js.map +1 -0
- package/dist/text.d.ts +63 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +61 -0
- package/dist/text.js.map +1 -0
- package/package.json +56 -4
- package/src/CopySource.tsx +67 -0
- package/src/DataTable.tsx +120 -0
- package/src/Dialog.tsx +158 -0
- package/src/ErrorBoundary.tsx +137 -0
- package/src/LiveRegion.tsx +127 -0
- package/src/Markdown.tsx +75 -0
- package/src/MarkdownInline.tsx +177 -0
- package/src/MenuIcon.tsx +209 -0
- package/src/Mermaid.tsx +144 -0
- package/src/Monogram.tsx +112 -0
- package/src/OverflowMenu.tsx +359 -0
- package/src/Shell.tsx +99 -0
- package/src/Skeleton.tsx +98 -0
- package/src/Split.tsx +267 -0
- package/src/Tabs.tsx +194 -0
- package/src/Toast.tsx +269 -0
- package/src/Tooltip.tsx +213 -0
- package/src/controls.tsx +159 -0
- package/src/cx.ts +4 -0
- package/src/fenceInfo.ts +36 -0
- package/src/formControls.tsx +249 -0
- package/src/index.ts +149 -0
- package/src/layout.tsx +141 -0
- package/src/primitives.tsx +33 -0
- package/src/progress.tsx +129 -0
- package/src/text.tsx +99 -0
package/dist/Monogram.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Two letters standing in for a face.
|
|
4
|
+
*
|
|
5
|
+
* Not an avatar. Nothing in the product stores an uploaded picture —
|
|
6
|
+
* there is no `avatar_url` on a user anywhere in the server — and a
|
|
7
|
+
* generic silhouette for everybody says strictly less than two
|
|
8
|
+
* letters of somebody's own name. The portal draws the same thing
|
|
9
|
+
* from the same source, so the two surfaces agree about what a person
|
|
10
|
+
* looks like.
|
|
11
|
+
*
|
|
12
|
+
* The colour is derived from the name rather than chosen, so the same
|
|
13
|
+
* person is the same colour on every machine and across restarts.
|
|
14
|
+
* That is the whole point: the monogram is a recognition aid, and one
|
|
15
|
+
* that changed colour per session would be decoration.
|
|
16
|
+
*/
|
|
17
|
+
export function initialsOf(name) {
|
|
18
|
+
const cleaned = (name || "").trim();
|
|
19
|
+
if (!cleaned)
|
|
20
|
+
return "?";
|
|
21
|
+
// An address is not a name: "maya@acme.test" should read as M, not
|
|
22
|
+
// as MA from "maya" and "acme".
|
|
23
|
+
const local = cleaned.includes("@") ? cleaned.split("@")[0] : cleaned;
|
|
24
|
+
const words = local.split(/[\s._-]+/).filter(Boolean);
|
|
25
|
+
if (words.length === 0)
|
|
26
|
+
return "?";
|
|
27
|
+
// By code point: slicing by UTF-16 unit cuts an emoji in half.
|
|
28
|
+
const letters = (word) => Array.from(word);
|
|
29
|
+
if (words.length === 1) {
|
|
30
|
+
return letters(words[0]).slice(0, 2).join("").toUpperCase();
|
|
31
|
+
}
|
|
32
|
+
const last = words[words.length - 1];
|
|
33
|
+
return (letters(words[0])[0] + letters(last)[0]).toUpperCase();
|
|
34
|
+
}
|
|
35
|
+
/** A stable hue for a name. Same person, same colour, every time. */
|
|
36
|
+
export function hueOf(name) {
|
|
37
|
+
let hash = 0;
|
|
38
|
+
for (const ch of name || "") {
|
|
39
|
+
hash = (hash * 31 + ch.charCodeAt(0)) % 360;
|
|
40
|
+
}
|
|
41
|
+
return hash;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The same colour, written as ``#rrggbb``.
|
|
45
|
+
*
|
|
46
|
+
* For the places that cannot take ``hsl()``. The collaborative
|
|
47
|
+
* caret is one: it validates against ``/^#[0-9a-fA-F]{6}$/`` and
|
|
48
|
+
* quietly renders anything else transparent — a cursor that is
|
|
49
|
+
* there, labelled with the right name, and invisible.
|
|
50
|
+
*
|
|
51
|
+
* Derived from the same hue as the monogram, so somebody's caret and
|
|
52
|
+
* their initials are the same colour.
|
|
53
|
+
*/
|
|
54
|
+
export function hexOf(name, saturation = 0.62, lightness = 0.52) {
|
|
55
|
+
const hue = hueOf(name) / 360;
|
|
56
|
+
const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
57
|
+
const second = chroma * (1 - Math.abs(((hue * 6) % 2) - 1));
|
|
58
|
+
const base = lightness - chroma / 2;
|
|
59
|
+
const sixth = Math.floor(hue * 6) % 6;
|
|
60
|
+
const [r, g, b] = [
|
|
61
|
+
[chroma, second, 0],
|
|
62
|
+
[second, chroma, 0],
|
|
63
|
+
[0, chroma, second],
|
|
64
|
+
[0, second, chroma],
|
|
65
|
+
[second, 0, chroma],
|
|
66
|
+
[chroma, 0, second],
|
|
67
|
+
][sixth];
|
|
68
|
+
const byte = (value) => Math.round((value + base) * 255)
|
|
69
|
+
.toString(16)
|
|
70
|
+
.padStart(2, "0");
|
|
71
|
+
return `#${byte(r)}${byte(g)}${byte(b)}`;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Two letters standing in for a face.
|
|
75
|
+
*
|
|
76
|
+
* Not an avatar: nothing stores an uploaded picture, so the two
|
|
77
|
+
* letters come from the name. The colour comes from the name too, so
|
|
78
|
+
* the same person is the same colour on every machine and across
|
|
79
|
+
* restarts.
|
|
80
|
+
*
|
|
81
|
+
* @param name — the name the initials and the colour are derived from.
|
|
82
|
+
* @param size — the width and height of the square, in pixels.
|
|
83
|
+
*/
|
|
84
|
+
export function Monogram({ name, size = 18 }) {
|
|
85
|
+
const hue = hueOf(name);
|
|
86
|
+
return (_jsx("span", { className: "monogram", "aria-hidden": "true", style: {
|
|
87
|
+
width: size,
|
|
88
|
+
height: size,
|
|
89
|
+
fontSize: Math.round(size * 0.46),
|
|
90
|
+
// Fixed saturation and lightness so every generated colour
|
|
91
|
+
// clears contrast against white text, rather than hoping the
|
|
92
|
+
// hash lands somewhere readable.
|
|
93
|
+
background: `hsl(${hue} 42% 42%)`,
|
|
94
|
+
}, children: initialsOf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EAAE,CAAC,EAAE,MAAM,CAAC;QACnB,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC;KAEtB,CAAC,KAAK,CAAC,CAAC;IACT,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAC7B,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC;SAC7B,QAAQ,CAAC,EAAE,CAAC;SACZ,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAmC;IAC3E,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,CACL,eACE,SAAS,EAAC,UAAU,iBACR,MAAM,EAClB,KAAK,EAAE;YACL,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;YACjC,2DAA2D;YAC3D,6DAA6D;YAC7D,iCAAiC;YACjC,UAAU,EAAE,OAAO,GAAG,WAAW;SAClC,YAEA,UAAU,CAAC,IAAI,CAAC,GACZ,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type MenuIconName } from "./MenuIcon.js";
|
|
2
|
+
/**
|
|
3
|
+
* A row of actions collapsed behind one button.
|
|
4
|
+
*
|
|
5
|
+
* For the case where the actions are real but secondary: four buttons
|
|
6
|
+
* across a header give each of them the same weight as the page
|
|
7
|
+
* title, and the one that deletes the thing ends up the same size as
|
|
8
|
+
* the one that exports it.
|
|
9
|
+
*
|
|
10
|
+
* Hiding them costs discoverability, so everything that made them
|
|
11
|
+
* usable as buttons has to survive the move — focus, the keyboard,
|
|
12
|
+
* and the names screen readers announce. That is most of what is
|
|
13
|
+
* below.
|
|
14
|
+
*/
|
|
15
|
+
/** One action in an {@link OverflowMenu}. */
|
|
16
|
+
export interface OverflowAction {
|
|
17
|
+
/** Stable across renders; the label changes on toggles. */
|
|
18
|
+
key: string;
|
|
19
|
+
/** What it is called. */
|
|
20
|
+
label: string;
|
|
21
|
+
/** What picking it does. Omitted when `items` makes it a submenu. */
|
|
22
|
+
onSelect?: () => void;
|
|
23
|
+
/** Variants of this action, opened as a submenu rather than run.
|
|
24
|
+
* Use it when one verb has several objects — export as HTML, as
|
|
25
|
+
* Markdown, as PDF — so the menu stays a list of things you can
|
|
26
|
+
* do rather than a list of every combination of them. */
|
|
27
|
+
items?: OverflowAction[];
|
|
28
|
+
/** Destructive — rendered apart from the rest and in the danger colour. */
|
|
29
|
+
danger?: boolean;
|
|
30
|
+
/** A toggle that is currently on. Announced as such, not just coloured. */
|
|
31
|
+
active?: boolean;
|
|
32
|
+
/** Whether it can be picked. Shown as it is, and kept out of the tab order. */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/** Why you would pick this. Shown on hover, same as the buttons had. */
|
|
35
|
+
title?: string;
|
|
36
|
+
/** The glyph beside the label.
|
|
37
|
+
*
|
|
38
|
+
* Optional. A menu of five verbs reads as five equal options, and
|
|
39
|
+
* picking the wrong one of Archive and Remove costs quite
|
|
40
|
+
* differently — the shape is recognised before the word is read. */
|
|
41
|
+
icon?: MenuIconName;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A row of actions collapsed behind one button.
|
|
45
|
+
*
|
|
46
|
+
* For actions that are real but secondary. Everything that made the
|
|
47
|
+
* buttons usable as buttons survives the move: focus, the keyboard,
|
|
48
|
+
* and the names screen readers announce.
|
|
49
|
+
*
|
|
50
|
+
* @param actions — the actions to offer; the destructive ones are set
|
|
51
|
+
* apart from the rest.
|
|
52
|
+
* @param label — what the trigger is called, for anyone who cannot see
|
|
53
|
+
* three dots.
|
|
54
|
+
*/
|
|
55
|
+
export declare function OverflowMenu({ actions, label, }: {
|
|
56
|
+
actions: OverflowAction[];
|
|
57
|
+
/** What the trigger is called, for anyone who cannot see three dots. */
|
|
58
|
+
label?: string;
|
|
59
|
+
}): import("react").JSX.Element | null;
|
|
60
|
+
//# sourceMappingURL=OverflowMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowMenu.d.ts","sourceRoot":"","sources":["../src/OverflowMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAE5D;;;;;;;;;;;;GAYG;AAEH,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;8DAG0D;IAC1D,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;yEAIqE;IACrE,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAyBD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAsB,GACvB,EAAE;IACD,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,sCA2FA"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { MenuIcon } from "./MenuIcon.js";
|
|
4
|
+
/** Direct children only — a submenu's own items belong to its list. */
|
|
5
|
+
const OWN_ITEMS = ":scope > [role='menuitem'], :scope > .overflow-sub-wrap > [role='menuitem']";
|
|
6
|
+
function enabledItems(root) {
|
|
7
|
+
return Array.from(root?.querySelectorAll(OWN_ITEMS) ?? []).filter((el) => !el.disabled);
|
|
8
|
+
}
|
|
9
|
+
/** Up/down within one list, wrapping. Returns whether it handled the key. */
|
|
10
|
+
function moveFocus(root, key) {
|
|
11
|
+
if (key !== "ArrowDown" && key !== "ArrowUp")
|
|
12
|
+
return false;
|
|
13
|
+
const all = enabledItems(root);
|
|
14
|
+
if (!all.length)
|
|
15
|
+
return false;
|
|
16
|
+
const at = all.indexOf(document.activeElement);
|
|
17
|
+
const step = key === "ArrowDown" ? 1 : -1;
|
|
18
|
+
// Wrapping, because a menu this short has no scroll to tell you
|
|
19
|
+
// that you have reached the end of it.
|
|
20
|
+
all[(at + step + all.length) % all.length]?.focus();
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A row of actions collapsed behind one button.
|
|
25
|
+
*
|
|
26
|
+
* For actions that are real but secondary. Everything that made the
|
|
27
|
+
* buttons usable as buttons survives the move: focus, the keyboard,
|
|
28
|
+
* and the names screen readers announce.
|
|
29
|
+
*
|
|
30
|
+
* @param actions — the actions to offer; the destructive ones are set
|
|
31
|
+
* apart from the rest.
|
|
32
|
+
* @param label — what the trigger is called, for anyone who cannot see
|
|
33
|
+
* three dots.
|
|
34
|
+
*/
|
|
35
|
+
export function OverflowMenu({ actions, label = "More actions", }) {
|
|
36
|
+
const [open, setOpen] = useState(false);
|
|
37
|
+
const trigger = useRef(null);
|
|
38
|
+
const list = useRef(null);
|
|
39
|
+
const menuId = useId();
|
|
40
|
+
// Closing returns focus to the trigger. Without it a keyboard user
|
|
41
|
+
// who opens the menu and changes their mind is dropped at the top
|
|
42
|
+
// of the document with no way back to where they were.
|
|
43
|
+
const close = useCallback((restoreFocus = true) => {
|
|
44
|
+
setOpen(false);
|
|
45
|
+
if (restoreFocus)
|
|
46
|
+
trigger.current?.focus();
|
|
47
|
+
}, []);
|
|
48
|
+
// Opening moves focus into the menu, which is what makes it a menu
|
|
49
|
+
// rather than a panel that happens to be visible: the next Tab or
|
|
50
|
+
// arrow key lands on an action instead of on whatever follows the
|
|
51
|
+
// trigger in the document.
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (open)
|
|
54
|
+
enabledItems(list.current)[0]?.focus();
|
|
55
|
+
}, [open]);
|
|
56
|
+
const onKeyDown = (e) => {
|
|
57
|
+
if (e.key === "Escape") {
|
|
58
|
+
// Only if no submenu is open — that one owns Escape first, and
|
|
59
|
+
// closes back to here rather than out of the menu entirely.
|
|
60
|
+
if (list.current?.querySelector(".overflow-sub"))
|
|
61
|
+
return;
|
|
62
|
+
e.stopPropagation();
|
|
63
|
+
close();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (moveFocus(list.current, e.key))
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
};
|
|
69
|
+
if (!actions.length)
|
|
70
|
+
return null;
|
|
71
|
+
const safe = actions.filter((a) => !a.danger);
|
|
72
|
+
const destructive = actions.filter((a) => a.danger);
|
|
73
|
+
const dismiss = () => close(false);
|
|
74
|
+
return (_jsxs("div", { className: "overflow-menu", children: [_jsx("button", { ref: trigger, type: "button", className: "kb-icon-btn", "aria-haspopup": "menu", "aria-expanded": open, "aria-controls": open ? menuId : undefined, "aria-label": label, title: label, onClick: () => (open ? close() : setOpen(true)), children: _jsxs("svg", { viewBox: "0 0 16 16", width: "14", height: "14", "aria-hidden": "true", children: [_jsx("circle", { cx: "3", cy: "8", r: "1.4", fill: "currentColor" }), _jsx("circle", { cx: "8", cy: "8", r: "1.4", fill: "currentColor" }), _jsx("circle", { cx: "13", cy: "8", r: "1.4", fill: "currentColor" })] }) }), open && (_jsxs(_Fragment, { children: [_jsx("div", { className: "overflow-backdrop", onClick: dismiss }), _jsxs("div", { ref: list, id: menuId, className: "overflow-list", role: "menu", "aria-label": label, onKeyDown: onKeyDown, children: [safe.map((a) => (_jsx(Entry, { action: a, onDone: dismiss }, a.key))), destructive.length > 0 && safe.length > 0 && (_jsx("div", { className: "overflow-sep", role: "separator" })), destructive.map((a) => (_jsx(Entry, { action: a, onDone: dismiss }, a.key)))] })] }))] }));
|
|
75
|
+
}
|
|
76
|
+
function Entry({ action, onDone, }) {
|
|
77
|
+
return action.items?.length ? (_jsx(Submenu, { action: action, onDone: onDone })) : (_jsx(Item, { action: action, onDone: onDone }));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* An item that opens its own list beside it.
|
|
81
|
+
*
|
|
82
|
+
* Opens to the *left*. The parent menu is already pinned to the right
|
|
83
|
+
* edge of what it hangs off, so a submenu flying out to the right —
|
|
84
|
+
* the desktop default — would open past the window.
|
|
85
|
+
*/
|
|
86
|
+
function Submenu({ action, onDone, }) {
|
|
87
|
+
const [open, setOpen] = useState(false);
|
|
88
|
+
const item = useRef(null);
|
|
89
|
+
const list = useRef(null);
|
|
90
|
+
const menuId = useId();
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (open)
|
|
93
|
+
enabledItems(list.current)[0]?.focus();
|
|
94
|
+
}, [open]);
|
|
95
|
+
const back = () => {
|
|
96
|
+
setOpen(false);
|
|
97
|
+
item.current?.focus();
|
|
98
|
+
};
|
|
99
|
+
return (_jsxs("div", { className: "overflow-sub-wrap",
|
|
100
|
+
// Hover opens it, the way a desktop menu does. `onMouseLeave`
|
|
101
|
+
// rather than a timer: a submenu that lingers after the pointer
|
|
102
|
+
// has gone covers the items below the one that opened it.
|
|
103
|
+
onMouseEnter: () => {
|
|
104
|
+
if (!action.disabled)
|
|
105
|
+
setOpen(true);
|
|
106
|
+
}, onMouseLeave: () => setOpen(false), children: [_jsxs("button", { ref: item, type: "button", role: "menuitem", className: "popup-item overflow-item overflow-item-parent", "aria-haspopup": "menu", "aria-expanded": open, "aria-controls": open ? menuId : undefined, disabled: action.disabled, title: action.title, onClick: () => setOpen((on) => !on), onKeyDown: (e) => {
|
|
107
|
+
// Right opens and steps in, matching every other menu on
|
|
108
|
+
// the desktop. Enter and Space come free from `button`.
|
|
109
|
+
if (e.key === "ArrowRight" || e.key === "Enter" || e.key === " ") {
|
|
110
|
+
e.preventDefault();
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
setOpen(true);
|
|
113
|
+
}
|
|
114
|
+
}, children: [action.icon && _jsx(MenuIcon, { name: action.icon }), action.label, _jsx("svg", { className: "overflow-chevron", viewBox: "0 0 16 16", width: "11", height: "11", "aria-hidden": "true", children: _jsx("path", { d: "M6 3.5 10.5 8 6 12.5", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), open && (_jsx("div", { ref: list, id: menuId, className: "overflow-list overflow-sub", role: "menu", "aria-label": action.label, onKeyDown: (e) => {
|
|
115
|
+
// Escape and Left close *this* list and go back to the
|
|
116
|
+
// item that opened it, rather than dropping the whole
|
|
117
|
+
// menu — one level per keypress, like the trail does.
|
|
118
|
+
if (e.key === "Escape" || e.key === "ArrowLeft") {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
e.stopPropagation();
|
|
121
|
+
back();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (moveFocus(list.current, e.key)) {
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
e.stopPropagation();
|
|
127
|
+
}
|
|
128
|
+
}, children: action.items?.map((child) => (_jsx(Item, { action: child, onDone: onDone, parent: action.label }, child.key))) }))] }));
|
|
129
|
+
}
|
|
130
|
+
function Item({ action, onDone, parent, }) {
|
|
131
|
+
return (_jsxs("button", { type: "button", role: "menuitem", "aria-current": action.active ? true : undefined, "aria-label": parent ? `${parent} ${action.label}` : undefined, className: [
|
|
132
|
+
"popup-item",
|
|
133
|
+
"overflow-item",
|
|
134
|
+
action.active ? "active" : "",
|
|
135
|
+
action.danger ? "overflow-item-danger" : "",
|
|
136
|
+
]
|
|
137
|
+
.filter(Boolean)
|
|
138
|
+
.join(" "), disabled: action.disabled, title: action.title,
|
|
139
|
+
// Closed without pulling focus back to the trigger, because most
|
|
140
|
+
// of these actions replace the header the trigger lives in —
|
|
141
|
+
// restoring focus to an element that is about to unmount loses
|
|
142
|
+
// it on `document.body`. Where focus goes next belongs to the
|
|
143
|
+
// action. Dismissing without choosing still restores it.
|
|
144
|
+
onClick: () => {
|
|
145
|
+
onDone();
|
|
146
|
+
action.onSelect?.();
|
|
147
|
+
}, children: [action.icon && _jsx(MenuIcon, { name: action.icon }), action.label] }));
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=OverflowMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowMenu.js","sourceRoot":"","sources":["../src/OverflowMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAqB,MAAM,eAAe,CAAC;AA6C5D,uEAAuE;AACvE,MAAM,SAAS,GACb,6EAA6E,CAAC;AAEhF,SAAS,YAAY,CAAC,IAAwB;IAC5C,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,EAAE,gBAAgB,CAAoB,SAAS,CAAC,IAAI,EAAE,CAC3D,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED,6EAA6E;AAC7E,SAAS,SAAS,CAAC,IAAwB,EAAE,GAAW;IACtD,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC3D,MAAM,GAAG,GAAG,YAAY,C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;QACnB,iEAAiE;QACjE,6DAA6D;QAC7D,+DAA+D;QAC/D,8DAA8D;QAC9D,yDAAyD;QACzD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,EAAE,CAAC;YACT,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;QACtB,CAAC,aAEA,MAAM,CAAC,IAAI,IAAI,KAAC,QAAQ,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAI,EAC9C,MAAM,CAAC,KAAK,IACN,CACV,CAAC;AACJ,CAAC"}
|
package/dist/Shell.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page an extension fills.
|
|
3
|
+
*
|
|
4
|
+
* `.igni-root` set colour, type and `margin: 0`, and nothing about
|
|
5
|
+
* layout — no height, no `box-sizing`, nothing on `html`. So every
|
|
6
|
+
* full-frame extension opened by writing the same six lines of CSS,
|
|
7
|
+
* and wrote them differently. Two panels in one product then scroll
|
|
8
|
+
* differently, which is the kind of difference nobody can name and
|
|
9
|
+
* everybody notices.
|
|
10
|
+
*
|
|
11
|
+
* `min-height: 0` is the reason this is a published component rather
|
|
12
|
+
* than a recipe in a README. A flex child defaults to
|
|
13
|
+
* `min-height: auto`, which refuses to shrink below its content, so
|
|
14
|
+
* a scroll container nested in a flex column grows the page instead
|
|
15
|
+
* of scrolling. It is invisible until the content is long, it is the
|
|
16
|
+
* most-reported layout bug in flexbox, and the fix is one line that
|
|
17
|
+
* reads like it does nothing.
|
|
18
|
+
*/
|
|
19
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
20
|
+
/** What an {@link AppShell} takes. */
|
|
21
|
+
export interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
/** Fixed at the top. A `Toolbar`, usually. */
|
|
23
|
+
header?: ReactNode;
|
|
24
|
+
/** Fixed at the bottom. Status, or a form's actions. */
|
|
25
|
+
footer?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Header, body, footer — with exactly one part allowed to grow.
|
|
29
|
+
*
|
|
30
|
+
* The body is a flex column itself, so a `Scroll` placed directly
|
|
31
|
+
* inside it fills what is left over rather than the whole frame.
|
|
32
|
+
*
|
|
33
|
+
* @param header — fixed at the top; a `Toolbar`, usually.
|
|
34
|
+
* @param footer — fixed at the bottom: status, or a form's actions.
|
|
35
|
+
* @param children — the body, the one part allowed to grow.
|
|
36
|
+
* @param className — added to the element's classes, beside the one the
|
|
37
|
+
* theme gives it.
|
|
38
|
+
* @param rest — the remaining props, spread onto the shell.
|
|
39
|
+
*/
|
|
40
|
+
export declare function AppShell({ header, footer, children, className, ...rest }: AppShellProps): import("react").JSX.Element;
|
|
41
|
+
/** What a {@link Scroll} takes. */
|
|
42
|
+
export interface ScrollProps extends HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
/** Scroll sideways instead. A wide table, not a long list. */
|
|
44
|
+
axis?: "y" | "x";
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The part that scrolls.
|
|
48
|
+
*
|
|
49
|
+
* `overscroll-behavior: contain`, so reaching the end does not chain
|
|
50
|
+
* the scroll to the host page behind the frame — an extension that
|
|
51
|
+
* scrolls igni when its own list bottoms out feels like a bug in
|
|
52
|
+
* igni.
|
|
53
|
+
*
|
|
54
|
+
* Not focusable by default. A scrollable region that holds no
|
|
55
|
+
* focusable children is unreachable by keyboard, so pass
|
|
56
|
+
* `tabIndex={0}` when that is the case; doing it unconditionally
|
|
57
|
+
* would put a stop in the tab order of every list that already has
|
|
58
|
+
* buttons in it.
|
|
59
|
+
*
|
|
60
|
+
* @param axis — scroll sideways instead; for a wide table, not a long
|
|
61
|
+
* list.
|
|
62
|
+
* @param className — added to the element's classes, beside the one the
|
|
63
|
+
* theme gives it.
|
|
64
|
+
* @param rest — the remaining props, spread onto the element.
|
|
65
|
+
*/
|
|
66
|
+
export declare function Scroll({ axis, className, ...rest }: ScrollProps): import("react").JSX.Element;
|
|
67
|
+
//# sourceMappingURL=Shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shell.d.ts","sourceRoot":"","sources":["../src/Shell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD,sCAAsC;AACtC,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,8CAA8C;IAC9C,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,aAAa,+BAYf;AAED,mCAAmC;AACnC,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,8DAA8D;IAC9D,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,EAAE,IAAU,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,+BAOrE"}
|
package/dist/Shell.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
function cx(...parts) {
|
|
3
|
+
return parts.filter(Boolean).join(" ");
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Header, body, footer — with exactly one part allowed to grow.
|
|
7
|
+
*
|
|
8
|
+
* The body is a flex column itself, so a `Scroll` placed directly
|
|
9
|
+
* inside it fills what is left over rather than the whole frame.
|
|
10
|
+
*
|
|
11
|
+
* @param header — fixed at the top; a `Toolbar`, usually.
|
|
12
|
+
* @param footer — fixed at the bottom: status, or a form's actions.
|
|
13
|
+
* @param children — the body, the one part allowed to grow.
|
|
14
|
+
* @param className — added to the element's classes, beside the one the
|
|
15
|
+
* theme gives it.
|
|
16
|
+
* @param rest — the remaining props, spread onto the shell.
|
|
17
|
+
*/
|
|
18
|
+
export function AppShell({ header, footer, children, className, ...rest }) {
|
|
19
|
+
return (_jsxs("div", { ...rest, className: cx("ui-shell", className), children: [header === undefined ? null : (_jsx("div", { className: "ui-shell-header", children: header })), _jsx("div", { className: "ui-shell-body", children: children }), footer === undefined ? null : (_jsx("div", { className: "ui-shell-footer", children: footer }))] }));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The part that scrolls.
|
|
23
|
+
*
|
|
24
|
+
* `overscroll-behavior: contain`, so reaching the end does not chain
|
|
25
|
+
* the scroll to the host page behind the frame — an extension that
|
|
26
|
+
* scrolls igni when its own list bottoms out feels like a bug in
|
|
27
|
+
* igni.
|
|
28
|
+
*
|
|
29
|
+
* Not focusable by default. A scrollable region that holds no
|
|
30
|
+
* focusable children is unreachable by keyboard, so pass
|
|
31
|
+
* `tabIndex={0}` when that is the case; doing it unconditionally
|
|
32
|
+
* would put a stop in the tab order of every list that already has
|
|
33
|
+
* buttons in it.
|
|
34
|
+
*
|
|
35
|
+
* @param axis — scroll sideways instead; for a wide table, not a long
|
|
36
|
+
* list.
|
|
37
|
+
* @param className — added to the element's classes, beside the one the
|
|
38
|
+
* theme gives it.
|
|
39
|
+
* @param rest — the remaining props, spread onto the element.
|
|
40
|
+
*/
|
|
41
|
+
export function Scroll({ axis = "y", className, ...rest }) {
|
|
42
|
+
return (_jsx("div", { ...rest, className: cx(axis === "x" ? "ui-scroll-x" : "ui-scroll", className) }));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=Shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shell.js","sourceRoot":"","sources":["../src/Shell.tsx"],"names":[],"mappings":";AAoBA,SAAS,EAAE,CAAC,GAAG,KAA4C;IACzD,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAUD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACO;IACd,OAAO,CACL,kBAAS,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,aAChD,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC7B,cAAK,SAAS,EAAC,iBAAiB,YAAE,MAAM,GAAO,CAChD,EACD,cAAK,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAO,EAC9C,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC7B,cAAK,SAAS,EAAC,iBAAiB,YAAE,MAAM,GAAO,CAChD,IACG,CACP,CAAC;AACJ,CAAC;AAQD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,GAAG,GAAG,EAAE,SAAS,EAAE,GAAG,IAAI,EAAe;IACpE,OAAO,CACL,iBACM,IAAI,EACR,SAAS,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,GACpE,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Animated placeholder block. Render at the same approximate size
|
|
4
|
+
* and rhythm as the eventual content so the layout doesn't jump
|
|
5
|
+
* when async data lands.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* <Skeleton.Line width="60%" />
|
|
9
|
+
* <Skeleton.Block height={64} />
|
|
10
|
+
* <Skeleton.Circle size={48} />
|
|
11
|
+
*/
|
|
12
|
+
export declare const Skeleton: {
|
|
13
|
+
/**
|
|
14
|
+
* A line of placeholder text, the size of the line it stands in for.
|
|
15
|
+
*
|
|
16
|
+
* @param width — how wide the line is, in pixels or as a CSS length.
|
|
17
|
+
* @param height — how tall the line is, in pixels or as a CSS length.
|
|
18
|
+
* @param style — the element's inline style, merged over the
|
|
19
|
+
* defaults.
|
|
20
|
+
*/
|
|
21
|
+
Line({ width, height, style, }: {
|
|
22
|
+
width?: number | string;
|
|
23
|
+
height?: number | string;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* A block of placeholder content, the size of the content it stands in for.
|
|
28
|
+
*
|
|
29
|
+
* @param height — how tall the block is, in pixels or as a CSS
|
|
30
|
+
* length.
|
|
31
|
+
* @param width — how wide the block is, in pixels or as a CSS length.
|
|
32
|
+
* @param style — the element's inline style, merged over the
|
|
33
|
+
* defaults.
|
|
34
|
+
*/
|
|
35
|
+
Block({ height, width, style, }: {
|
|
36
|
+
height?: number | string;
|
|
37
|
+
width?: number | string;
|
|
38
|
+
style?: CSSProperties;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* A circle, the size of the thing it stands in for.
|
|
42
|
+
*
|
|
43
|
+
* @param size — the diameter of the circle, in pixels.
|
|
44
|
+
* @param style — the element's inline style, merged over the
|
|
45
|
+
* defaults.
|
|
46
|
+
*/
|
|
47
|
+
Circle({ size, style }: {
|
|
48
|
+
size?: number;
|
|
49
|
+
style?: CSSProperties;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
51
|
+
/**
|
|
52
|
+
* Several lines of placeholder text, the shape of the list they stand in for.
|
|
53
|
+
*
|
|
54
|
+
* @param count — how many rows of text to draw.
|
|
55
|
+
* @param style — the stack's inline style, merged over the defaults.
|
|
56
|
+
*/
|
|
57
|
+
Rows({ count, style }: {
|
|
58
|
+
count?: number;
|
|
59
|
+
style?: CSSProperties;
|
|
60
|
+
}): import("react").JSX.Element;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;;OAOG;oCAKA;QACD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,aAAa,CAAC;KACvB;IAQD;;;;;;;;OAQG;qCAKA;QACD,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,aAAa,CAAC;KACvB;IAQD;;;;;;OAMG;4BAC0B;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAA;KAAE;IAQrE;;;;;OAKG;2BACwB;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAA;KAAE;CAcrE,CAAC"}
|
package/dist/Skeleton.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Animated placeholder block. Render at the same approximate size
|
|
4
|
+
* and rhythm as the eventual content so the layout doesn't jump
|
|
5
|
+
* when async data lands.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* <Skeleton.Line width="60%" />
|
|
9
|
+
* <Skeleton.Block height={64} />
|
|
10
|
+
* <Skeleton.Circle size={48} />
|
|
11
|
+
*/
|
|
12
|
+
export const Skeleton = {
|
|
13
|
+
/**
|
|
14
|
+
* A line of placeholder text, the size of the line it stands in for.
|
|
15
|
+
*
|
|
16
|
+
* @param width — how wide the line is, in pixels or as a CSS length.
|
|
17
|
+
* @param height — how tall the line is, in pixels or as a CSS length.
|
|
18
|
+
* @param style — the element's inline style, merged over the
|
|
19
|
+
* defaults.
|
|
20
|
+
*/
|
|
21
|
+
Line({ width = "100%", height = 12, style, }) {
|
|
22
|
+
return (_jsx("span", { className: "skeleton skeleton-text", style: { display: "block", width, height, ...style } }));
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* A block of placeholder content, the size of the content it stands in for.
|
|
26
|
+
*
|
|
27
|
+
* @param height — how tall the block is, in pixels or as a CSS
|
|
28
|
+
* length.
|
|
29
|
+
* @param width — how wide the block is, in pixels or as a CSS length.
|
|
30
|
+
* @param style — the element's inline style, merged over the
|
|
31
|
+
* defaults.
|
|
32
|
+
*/
|
|
33
|
+
Block({ height = 64, width = "100%", style, }) {
|
|
34
|
+
return (_jsx("span", { className: "skeleton skeleton-block", style: { display: "block", height, width, ...style } }));
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* A circle, the size of the thing it stands in for.
|
|
38
|
+
*
|
|
39
|
+
* @param size — the diameter of the circle, in pixels.
|
|
40
|
+
* @param style — the element's inline style, merged over the
|
|
41
|
+
* defaults.
|
|
42
|
+
*/
|
|
43
|
+
Circle({ size = 24, style }) {
|
|
44
|
+
return (_jsx("span", { className: "skeleton skeleton-circle", style: { display: "inline-block", width: size, height: size, ...style } }));
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Several lines of placeholder text, the shape of the list they stand in for.
|
|
48
|
+
*
|
|
49
|
+
* @param count — how many rows of text to draw.
|
|
50
|
+
* @param style — the stack's inline style, merged over the defaults.
|
|
51
|
+
*/
|
|
52
|
+
Rows({ count = 4, style }) {
|
|
53
|
+
return (_jsx("div", { style: { display: "flex", flexDirection: "column", gap: 12, ...style }, children: Array.from({ length: count }).map((_, i) => (_jsxs("div", { children: [_jsx(Skeleton.Line, { width: "40%", height: 11 }), _jsx(Skeleton.Line, { width: "100%" })] }, i))) }));
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":";AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;;;;;;;OAOG;IACH,IAAI,CAAC,EACH,KAAK,GAAG,MAAM,EACd,MAAM,GAAG,EAAE,EACX,KAAK,GAKN;QACC,OAAO,CACL,eACE,SAAS,EAAC,wBAAwB,EAClC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,GACpD,CACH,CAAC;IACJ,CAAC;IACD;;;;;;;;OAQG;IACH,KAAK,CAAC,EACJ,MAAM,GAAG,EAAE,EACX,KAAK,GAAG,MAAM,EACd,KAAK,GAKN;QACC,OAAO,CACL,eACE,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GACpD,CACH,CAAC;IACJ,CAAC;IACD;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,EAA4C;QACnE,OAAO,CACL,eACE,SAAS,EAAC,0BAA0B,EACpC,KAAK,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GACvE,CACH,CAAC;IACJ,CAAC;IACD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAA6C;QAClE,OAAO,CACL,cACE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,a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