@godxjp/ui 23.3.0 → 23.4.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/dist/components/data-display/card.d.ts +87 -1
- package/dist/components/data-display/card.js +88 -15
- package/dist/components/data-display/index.d.ts +5 -1
- package/dist/components/data-display/index.js +5 -0
- package/dist/components/data-display/thought-chain.d.ts +42 -0
- package/dist/components/data-display/thought-chain.js +177 -0
- package/dist/components/data-display/welcome.d.ts +26 -0
- package/dist/components/data-display/welcome.js +37 -0
- package/dist/components/data-entry/attachments.d.ts +19 -0
- package/dist/components/data-entry/attachments.js +322 -0
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +2 -0
- package/dist/components/feedback/dialog.d.ts +10 -7
- package/dist/components/feedback/dialog.js +40 -17
- package/dist/components/feedback/index.d.ts +1 -1
- package/dist/components/general/actions.d.ts +59 -0
- package/dist/components/general/actions.js +253 -0
- package/dist/components/general/activity.js +1 -0
- package/dist/components/general/float-button.d.ts +41 -0
- package/dist/components/general/float-button.js +336 -0
- package/dist/components/general/index.d.ts +6 -2
- package/dist/components/general/index.js +12 -1
- package/dist/components/general/typography.d.ts +79 -4
- package/dist/components/general/typography.js +598 -54
- package/dist/components/layout/draggable-panel.d.ts +18 -0
- package/dist/components/layout/draggable-panel.js +189 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/navigation/conversations.d.ts +39 -0
- package/dist/components/navigation/conversations.js +371 -0
- package/dist/components/navigation/index.d.ts +2 -0
- package/dist/components/navigation/index.js +2 -0
- package/dist/components/ui/card.js +1 -0
- package/dist/i18n/messages/en.json +53 -0
- package/dist/i18n/messages/ja.json +53 -0
- package/dist/i18n/messages/vi.json +53 -0
- package/dist/props/components/data-display.prop.d.ts +143 -1
- package/dist/props/components/data-entry.prop.d.ts +76 -0
- package/dist/props/components/feedback.prop.d.ts +34 -1
- package/dist/props/components/general.prop.d.ts +440 -3
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/components/layout.prop.d.ts +63 -1
- package/dist/props/components/navigation.prop.d.ts +150 -0
- package/dist/props/registry.d.ts +426 -0
- package/dist/props/registry.js +546 -0
- package/dist/props/vocabulary/index.d.ts +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +113 -0
- package/dist/styles/card-layout.css +30 -0
- package/dist/styles/core.css +1 -0
- package/dist/styles/data-display-layout.css +236 -0
- package/dist/styles/float-button-layout.css +168 -0
- package/dist/styles/index.css +1 -0
- package/dist/styles/layout.css +196 -0
- package/dist/styles/navigation-layout.css +139 -0
- package/dist/styles/text-layout.css +156 -0
- package/dist/tokens/base.css +7 -0
- package/dist/tokens/components/actions.css +14 -0
- package/dist/tokens/components/attachments.css +15 -0
- package/dist/tokens/components/conversations.css +28 -0
- package/dist/tokens/components/draggable-panel.css +25 -0
- package/dist/tokens/components/float-button.css +39 -0
- package/dist/tokens/components/text.css +13 -0
- package/dist/tokens/components/thought-chain.css +31 -0
- package/dist/tokens/components/welcome.css +19 -0
- package/dist/tokens/foundation.css +2 -0
- package/docs/DESIGN-AUTHORITY.md +89 -0
- package/docs/FRAME-COVERAGE-REPORT.md +5 -2
- package/docs/data-display/card/examples/tab-list.tsx +97 -0
- package/docs/data-display/thought-chain.tsx +176 -0
- package/docs/data-display/welcome.tsx +115 -0
- package/docs/data-entry/attachments.tsx +160 -0
- package/docs/feedback/dialog.tsx +50 -0
- package/docs/general/actions.tsx +175 -0
- package/docs/general/float-button.tsx +133 -0
- package/docs/general/typography.tsx +63 -1
- package/docs/layout/draggable-panel.tsx +127 -0
- package/docs/navigation/conversations.tsx +176 -0
- package/docs/roadmap/parity-audit-layout-navigation-general.md +17 -16
- package/package.json +3 -3
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
import type { TextProp, TypographyBlockProp } from "../../props/components/general.prop.js";
|
|
3
|
+
import type { TypographyEllipsisConfigProp } from "../../props/vocabulary/index.js";
|
|
4
|
+
export type { TextProp, TextProp as TextProps, HeadingProp, HeadingProp as HeadingProps, TypographyProp, TypographyProp as TypographyProps, TypographyBlockProp, TypographyTitleProp, TypographyTitleProp as TitleProps, ParagraphProp, ParagraphProp as ParagraphProps, LinkProp, LinkProp as LinkProps, } from "../../props/components/general.prop.js";
|
|
3
5
|
/**
|
|
4
|
-
* Text — the typographic primitive
|
|
5
|
-
*
|
|
6
|
+
* Text — the typographic primitive, and antd's `Typography.Text`.
|
|
7
|
+
*
|
|
8
|
+
* Use it INSTEAD of a hand-rolled `<span className="text-[13px] font-medium text-muted-foreground">`.
|
|
9
|
+
* Size is a step of the type scale (never a px); tone and weight are tokens.
|
|
6
10
|
*/
|
|
7
|
-
export declare const Text: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "color"> & {
|
|
11
|
+
export declare const Text: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "color"> & Omit<TypographyBlockProp, "ellipsis"> & {
|
|
8
12
|
as?: "span" | "p" | "div" | "a" | "label" | "strong" | "em" | "small" | "code" | "kbd" | "dt" | "dd" | "caption" | "abbr";
|
|
9
13
|
asChild?: import("../../props/index.js").AsChildProp;
|
|
10
14
|
link?: boolean;
|
|
@@ -14,6 +18,7 @@ export declare const Text: React.ForwardRefExoticComponent<Omit<React.HTMLAttrib
|
|
|
14
18
|
align?: import("../../props/index.js").TextAlignProp;
|
|
15
19
|
truncate?: boolean;
|
|
16
20
|
clamp?: number;
|
|
21
|
+
ellipsis?: boolean | Omit<TypographyEllipsisConfigProp, "rows" | "expandable" | "onExpand">;
|
|
17
22
|
whitespace?: import("../../props/index.js").TextWhitespaceProp;
|
|
18
23
|
tabular?: boolean;
|
|
19
24
|
decoration?: "none" | "underline" | "line-through";
|
|
@@ -25,9 +30,39 @@ export declare const Text: React.ForwardRefExoticComponent<Omit<React.HTMLAttrib
|
|
|
25
30
|
rel?: string;
|
|
26
31
|
download?: React.AnchorHTMLAttributes<HTMLAnchorElement>["download"];
|
|
27
32
|
} & React.RefAttributes<HTMLElement>>;
|
|
33
|
+
/**
|
|
34
|
+
* Paragraph — antd `Typography.Paragraph`.
|
|
35
|
+
*
|
|
36
|
+
* Renders a `<div>`, matching antd, because the editing textarea and the action cluster are block
|
|
37
|
+
* content that a `<p>` may not legally contain — a `<p>` would be split by the parser and the
|
|
38
|
+
* actions would end up OUTSIDE the paragraph. Pass `as="p"` when the content is phrasing-only.
|
|
39
|
+
*
|
|
40
|
+
* The one difference from `Text` is antd's: `ellipsis` here keeps `rows`, `expandable` and
|
|
41
|
+
* `onExpand`.
|
|
42
|
+
*/
|
|
43
|
+
export declare const Paragraph: React.ForwardRefExoticComponent<Omit<TextProp, "as" | "ellipsis"> & {
|
|
44
|
+
as?: "div" | "p" | "span";
|
|
45
|
+
ellipsis?: boolean | TypographyEllipsisConfigProp;
|
|
46
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
47
|
+
/**
|
|
48
|
+
* Link — antd `Typography.Link`.
|
|
49
|
+
*
|
|
50
|
+
* `Text link` is the same affordance and is unchanged; `Link` is antd's anchor-by-default flavour
|
|
51
|
+
* of it. It adds antd's `rel` guard: a `target="_blank"` with no explicit `rel` gets
|
|
52
|
+
* `noopener noreferrer`, because the opened document otherwise keeps a live handle on
|
|
53
|
+
* `window.opener`. antd restricts `ellipsis` to a boolean on `Link`, and that restriction is ported
|
|
54
|
+
* by the type — `allowRows` stays off.
|
|
55
|
+
*/
|
|
56
|
+
export declare const Link: React.ForwardRefExoticComponent<Omit<TextProp, "as" | "ellipsis"> & {
|
|
57
|
+
as?: "a" | "span";
|
|
58
|
+
ellipsis?: boolean;
|
|
59
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
28
60
|
/**
|
|
29
61
|
* Heading — h1..h4 sized from the `--heading-h*` tokens. `level` sets both the size token and the
|
|
30
62
|
* semantic element; override the rendered element with `as` (e.g. a visual h2 that is a real <h1>).
|
|
63
|
+
*
|
|
64
|
+
* UNCHANGED by the antd port. antd's heading is `Title`, which is the sibling below; `Heading` is
|
|
65
|
+
* this library's own and keeps its four levels, its props and its markup exactly as they shipped.
|
|
31
66
|
*/
|
|
32
67
|
export declare const Heading: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
33
68
|
level?: import("../../props/index.js").HeadingLevelProp;
|
|
@@ -37,3 +72,43 @@ export declare const Heading: React.ForwardRefExoticComponent<Omit<React.HTMLAtt
|
|
|
37
72
|
truncate?: boolean;
|
|
38
73
|
weight?: import("../../props/index.js").FontWeightProp;
|
|
39
74
|
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
75
|
+
/**
|
|
76
|
+
* Title — antd `Typography.Title`.
|
|
77
|
+
*
|
|
78
|
+
* A SIBLING of `Heading`, not a replacement: five levels instead of four, plus the antd block
|
|
79
|
+
* behaviours (`copyable`, `editable`, `ellipsis`, the decorations). antd omits `strong` here
|
|
80
|
+
* because a heading already renders at the strong weight, and that omission is ported.
|
|
81
|
+
*/
|
|
82
|
+
export declare const Title: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & Omit<TypographyBlockProp, "strong"> & {
|
|
83
|
+
level?: import("../../props/index.js").TitleLevelProp;
|
|
84
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "div";
|
|
85
|
+
tone?: import("../../props/index.js").TextToneProp;
|
|
86
|
+
align?: import("../../props/index.js").TextAlignProp;
|
|
87
|
+
truncate?: boolean;
|
|
88
|
+
weight?: import("../../props/index.js").FontWeightProp;
|
|
89
|
+
ellipsis?: boolean | TypographyEllipsisConfigProp;
|
|
90
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
91
|
+
/**
|
|
92
|
+
* Typography — antd's plain wrapper for a run of prose.
|
|
93
|
+
*
|
|
94
|
+
* It renders an `<article>` and carries no emphasis of its own. It exists so `Title`, `Paragraph`,
|
|
95
|
+
* `Text` and `Link` have a container with the reading measure and the block rhythm on it, and so
|
|
96
|
+
* the compound spelling every antd codebase is written in — `<Typography.Text>` — works here
|
|
97
|
+
* unchanged.
|
|
98
|
+
*/
|
|
99
|
+
declare const TypographyRoot: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "color"> & {
|
|
100
|
+
as?: string;
|
|
101
|
+
component?: string;
|
|
102
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
103
|
+
type TypographyCompound = typeof TypographyRoot & {
|
|
104
|
+
Text: typeof Text;
|
|
105
|
+
Title: typeof Title;
|
|
106
|
+
Paragraph: typeof Paragraph;
|
|
107
|
+
Link: typeof Link;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The compound export. `Typography.Text` and the bare `Text` are the SAME component — there is no
|
|
111
|
+
* second, poorer Text — so a paste from an antd codebase and a call written in this library's own
|
|
112
|
+
* style compile to the same thing.
|
|
113
|
+
*/
|
|
114
|
+
export declare const Typography: TypographyCompound;
|