@imfusion/web-ui 0.8.1-dev.2.g74f81c31 → 0.8.1-dev.3.g40eaad1c
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/CHANGELOG.md +3 -1
- package/dist/components/account-card/account-card.d.ts +42 -12
- package/dist/index.js +1171 -1121
- package/dist/style.css +1 -1
- package/dist/utils/break-hints.d.ts +3 -0
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +39 -18
- package/src/llms/llms.gen.txt +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
- Components — Nikolaus Brunner <brunner@imfusion.com>
|
|
8
8
|
- `Avatar` shows a person's photo, their initials, or a person glyph, in three sizes and an on-color context.
|
|
9
|
-
- `AccountCard` links to the signed-in person's account
|
|
9
|
+
- `AccountCard` links to the signed-in person's account: a large title over a quiet subtitle, then the organization and a
|
|
10
|
+
mono role under a rule, with an action such as Log out in its top row. Emails wrap at the `@` and at dots, and
|
|
11
|
+
`AccountCard.Group` lists several cards with the current one marked.
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
@@ -4,20 +4,26 @@ import * as AvatarParts from '../avatar/avatar';
|
|
|
4
4
|
declare const root: (props?: ({
|
|
5
5
|
context?: "default" | "oncolor" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
type RootProps =
|
|
7
|
+
type RootProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof root>;
|
|
8
8
|
/**
|
|
9
|
-
* AccountCard.Root — the
|
|
10
|
-
*
|
|
11
|
-
* an inset rule. Its accessible name is the title and description; the avatar stays decorative.
|
|
12
|
-
*
|
|
13
|
-
* Place `AccountCard.Action` beside the root, not inside it: a link cannot contain a button.
|
|
9
|
+
* AccountCard.Root — the signed-in person's card: `AccountCard.Link` and, in its top row, `AccountCard.Action`. The
|
|
10
|
+
* action sits beside the link, not inside it, since a link cannot contain a button.
|
|
14
11
|
*/
|
|
15
12
|
declare function Root({
|
|
16
13
|
/** Explicit saturated-surface context; this is never inferred from an ancestor. */
|
|
17
|
-
context,
|
|
14
|
+
context, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
18
15
|
declare namespace Root {
|
|
19
16
|
var displayName: string;
|
|
20
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* AccountCard.Link — the link to the account, holding `AccountCard.Avatar`, `AccountCard.Title`,
|
|
20
|
+
* `AccountCard.Subtitle`, `AccountCard.Description`, and `AccountCard.Role`. Pass a router link through `render`. Its
|
|
21
|
+
* accessible name is its text; the avatar stays decorative.
|
|
22
|
+
*/
|
|
23
|
+
declare function Link({ render, ...props }: useRender.ComponentProps<"a">): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
24
|
+
declare namespace Link {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
21
27
|
type AvatarProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
22
28
|
/** The person's photo. Until it loads, and when it fails, the initials or the person glyph show instead. */
|
|
23
29
|
src?: string;
|
|
@@ -32,22 +38,46 @@ declare function Avatar({ src, size, children, ...props }: AvatarProps): import(
|
|
|
32
38
|
declare namespace Avatar {
|
|
33
39
|
var displayName: string;
|
|
34
40
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
41
|
+
/**
|
|
42
|
+
* AccountCard.Title — the account's name, or the email's local part until a name exists. Set large; text wraps before
|
|
43
|
+
* an `@` and after a dot.
|
|
44
|
+
*/
|
|
45
|
+
declare function Title({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
37
46
|
declare namespace Title {
|
|
38
47
|
var displayName: string;
|
|
39
48
|
}
|
|
40
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* AccountCard.Subtitle — the quiet line under the title: the email's domain, or the whole email once the title is a
|
|
51
|
+
* name. Text wraps before an `@` and after a dot.
|
|
52
|
+
*/
|
|
53
|
+
declare function Subtitle({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare namespace Subtitle {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|
|
57
|
+
/** AccountCard.Description — the organization, under a rule at the foot of the card. */
|
|
41
58
|
declare function Description(props: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
42
59
|
declare namespace Description {
|
|
43
60
|
var displayName: string;
|
|
44
61
|
}
|
|
62
|
+
/** AccountCard.Role — a mono uppercase label beside the description, such as the person's role. */
|
|
63
|
+
declare function Role(props: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
declare namespace Role {
|
|
65
|
+
var displayName: string;
|
|
66
|
+
}
|
|
45
67
|
/**
|
|
46
|
-
* AccountCard.Action — a
|
|
68
|
+
* AccountCard.Action — a slot in the card's top row, beside the link, such as a ghost icon `Button` that logs out. The
|
|
47
69
|
* button carries its own `aria-label` and its own `context`.
|
|
48
70
|
*/
|
|
49
71
|
declare function Action(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
50
72
|
declare namespace Action {
|
|
51
73
|
var displayName: string;
|
|
52
74
|
}
|
|
53
|
-
|
|
75
|
+
/**
|
|
76
|
+
* AccountCard.Group — a list of cards, such as accounts to switch between. Inside it a link with `aria-current="page"`
|
|
77
|
+
* shows as current; a standalone card is always the signed-in account and shows no current state.
|
|
78
|
+
*/
|
|
79
|
+
declare function Group(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
declare namespace Group {
|
|
81
|
+
var displayName: string;
|
|
82
|
+
}
|
|
83
|
+
export { Root, Link, Avatar, Title, Subtitle, Description, Role, Action, Group };
|