@godxjp/ui 23.2.1 → 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.
Files changed (101) hide show
  1. package/dist/app/timezones.js +2 -1
  2. package/dist/components/charts/chart-cartesian.js +2 -4
  3. package/dist/components/charts/chart-frame.js +2 -1
  4. package/dist/components/data-display/card.d.ts +87 -1
  5. package/dist/components/data-display/card.js +88 -15
  6. package/dist/components/data-display/index.d.ts +5 -1
  7. package/dist/components/data-display/index.js +5 -0
  8. package/dist/components/data-display/thought-chain.d.ts +42 -0
  9. package/dist/components/data-display/thought-chain.js +177 -0
  10. package/dist/components/data-display/welcome.d.ts +26 -0
  11. package/dist/components/data-display/welcome.js +37 -0
  12. package/dist/components/data-entry/attachments.d.ts +19 -0
  13. package/dist/components/data-entry/attachments.js +322 -0
  14. package/dist/components/data-entry/date-picker.js +12 -14
  15. package/dist/components/data-entry/index.d.ts +2 -0
  16. package/dist/components/data-entry/index.js +2 -0
  17. package/dist/components/data-entry/number-input.js +2 -1
  18. package/dist/components/feedback/dialog.d.ts +10 -7
  19. package/dist/components/feedback/dialog.js +40 -17
  20. package/dist/components/feedback/index.d.ts +3 -3
  21. package/dist/components/feedback/index.js +2 -0
  22. package/dist/components/feedback/skeleton.d.ts +11 -2
  23. package/dist/components/feedback/skeleton.js +8 -0
  24. package/dist/components/general/actions.d.ts +59 -0
  25. package/dist/components/general/actions.js +253 -0
  26. package/dist/components/general/activity.js +1 -0
  27. package/dist/components/general/button.js +2 -1
  28. package/dist/components/general/float-button.d.ts +41 -0
  29. package/dist/components/general/float-button.js +336 -0
  30. package/dist/components/general/index.d.ts +6 -2
  31. package/dist/components/general/index.js +12 -1
  32. package/dist/components/general/typography.d.ts +79 -4
  33. package/dist/components/general/typography.js +598 -54
  34. package/dist/components/layout/draggable-panel.d.ts +18 -0
  35. package/dist/components/layout/draggable-panel.js +189 -0
  36. package/dist/components/layout/error-surface.js +3 -2
  37. package/dist/components/layout/index.d.ts +2 -0
  38. package/dist/components/layout/index.js +2 -0
  39. package/dist/components/navigation/conversations.d.ts +39 -0
  40. package/dist/components/navigation/conversations.js +371 -0
  41. package/dist/components/navigation/index.d.ts +2 -0
  42. package/dist/components/navigation/index.js +2 -0
  43. package/dist/components/ui/card.js +1 -0
  44. package/dist/components/ui/toggle.js +2 -1
  45. package/dist/i18n/messages/en.json +53 -0
  46. package/dist/i18n/messages/ja.json +53 -0
  47. package/dist/i18n/messages/vi.json +53 -0
  48. package/dist/i18n/translate.js +3 -2
  49. package/dist/lib/datetime/picker-format.js +2 -1
  50. package/dist/lib/format.js +3 -2
  51. package/dist/lib/intl-cache.d.ts +32 -0
  52. package/dist/lib/intl-cache.js +29 -0
  53. package/dist/props/components/data-display.prop.d.ts +143 -1
  54. package/dist/props/components/data-entry.prop.d.ts +87 -0
  55. package/dist/props/components/feedback.prop.d.ts +53 -1
  56. package/dist/props/components/general.prop.d.ts +440 -3
  57. package/dist/props/components/index.d.ts +2 -2
  58. package/dist/props/components/layout.prop.d.ts +63 -1
  59. package/dist/props/components/navigation.prop.d.ts +150 -0
  60. package/dist/props/registry.d.ts +431 -0
  61. package/dist/props/registry.js +551 -0
  62. package/dist/props/vocabulary/index.d.ts +1 -1
  63. package/dist/props/vocabulary/interaction.prop.d.ts +113 -0
  64. package/dist/styles/alert-layout.css +22 -0
  65. package/dist/styles/card-layout.css +34 -0
  66. package/dist/styles/core.css +1 -0
  67. package/dist/styles/data-display-layout.css +236 -0
  68. package/dist/styles/float-button-layout.css +168 -0
  69. package/dist/styles/form-layout.css +11 -1
  70. package/dist/styles/index.css +1 -0
  71. package/dist/styles/layout.css +196 -0
  72. package/dist/styles/navigation-layout.css +139 -0
  73. package/dist/styles/text-layout.css +156 -0
  74. package/dist/tokens/axes.css +5 -0
  75. package/dist/tokens/base.css +7 -0
  76. package/dist/tokens/components/actions.css +14 -0
  77. package/dist/tokens/components/attachments.css +15 -0
  78. package/dist/tokens/components/conversations.css +28 -0
  79. package/dist/tokens/components/draggable-panel.css +25 -0
  80. package/dist/tokens/components/float-button.css +39 -0
  81. package/dist/tokens/components/text.css +13 -0
  82. package/dist/tokens/components/thought-chain.css +31 -0
  83. package/dist/tokens/components/welcome.css +19 -0
  84. package/dist/tokens/foundation.css +6 -4
  85. package/docs/DESIGN-AUTHORITY.md +133 -20
  86. package/docs/FRAME-COVERAGE-REPORT.md +5 -2
  87. package/docs/data-display/card/examples/tab-list.tsx +97 -0
  88. package/docs/data-display/thought-chain.tsx +176 -0
  89. package/docs/data-display/welcome.tsx +115 -0
  90. package/docs/data-entry/attachments.tsx +160 -0
  91. package/docs/feedback/dialog.tsx +50 -0
  92. package/docs/general/actions.tsx +175 -0
  93. package/docs/general/float-button.tsx +133 -0
  94. package/docs/general/typography.tsx +63 -1
  95. package/docs/layout/draggable-panel.tsx +127 -0
  96. package/docs/navigation/conversations.tsx +176 -0
  97. package/docs/roadmap/parity-audit-layout-navigation-general.md +17 -16
  98. package/package.json +20 -4
  99. package/scripts/_agent-setup.mjs +36 -5
  100. package/scripts/guinea-pig-skill.md +14 -0
  101. package/scripts/ui-audit.mjs +69 -9
@@ -778,6 +778,17 @@ export type PickerDateFormatProp = string | Intl.DateTimeFormatOptions | ((date:
778
778
  * `value`/`defaultValue`/`onValueChange` rather than antd's `onChange`.
779
779
  */
780
780
  export type DatePickerBaseProp = FieldA11yProps & PickerChromeProp & {
781
+ /**
782
+ * The accessible NAME of the button that opens the calendar, for a screen where more than one
783
+ * date field exists. Default 「カレンダーを開く」 / "Open calendar" — correct for one picker on a
784
+ * page, and useless for three: a reader hears the same sentence three times with nothing to
785
+ * say which field each button belongs to (WCAG 2.2 SC 2.4.6, gh#551).
786
+ *
787
+ * Same axis, same shape, same reason as Select's `clearLabel`: name the control after the
788
+ * FIELD it serves — `開始日のカレンダーを開く`. The default is unchanged, so nothing moves until
789
+ * a caller says something.
790
+ */
791
+ triggerLabel?: string;
781
792
  /** Display format; native submission remains ISO. */
782
793
  format?: PickerDateFormatProp;
783
794
  /** Parser for a custom display function or Intl era display; ISO always remains accepted. */
@@ -1877,3 +1888,79 @@ export type ChatSuggestionProp = {
1877
1888
  id?: IdProp;
1878
1889
  className?: ClassNameProp;
1879
1890
  };
1891
+ /** Ant Design X `Attachments` overflow modes — how the card list behaves when it exceeds its box. */
1892
+ export type AttachmentsOverflowProp = "wrap" | "scrollX" | "scrollY";
1893
+ /** Placeholder copy/icon when the attachment list is empty. Ant Design X `PlaceholderType`. */
1894
+ export type AttachmentsPlaceholderProp = {
1895
+ icon?: React.ReactNode;
1896
+ title?: React.ReactNode;
1897
+ description?: React.ReactNode;
1898
+ };
1899
+ /**
1900
+ * One attachment row — Ant Design X `Attachment`, which extends antd `UploadFile` plus optional
1901
+ * `description` and `cardType`. Field names are antd's (`thumbUrl`, `originFileObj`, …) so an Ant
1902
+ * X call site compiles unchanged; internally the upload engine maps them to `UploadFileItem`.
1903
+ *
1904
+ * @see Attachments
1905
+ */
1906
+ export type AttachmentsItemProp = {
1907
+ uid: string;
1908
+ name: string;
1909
+ size?: number;
1910
+ status?: "uploading" | "done" | "error" | "removed";
1911
+ percent?: number;
1912
+ url?: string;
1913
+ thumbUrl?: string;
1914
+ originFileObj?: File;
1915
+ response?: unknown;
1916
+ error?: unknown;
1917
+ description?: React.ReactNode;
1918
+ cardType?: string;
1919
+ };
1920
+ /** Semantic slots Ant Design X exposes on `Attachments`. */
1921
+ export type AttachmentsSemanticProp = "list" | "placeholder" | "upload" | "root" | "card" | "file";
1922
+ /**
1923
+ * @see Attachments — the chat-surface attachment collection (Ant Design X `Attachments`).
1924
+ *
1925
+ * Inherits antd Upload behaviour (`accept`, `beforeUpload`, `customRequest`, …) but names the file
1926
+ * list `items` (not `fileList`) and fires `onChange` with antd's `{ file, fileList }` shape. The
1927
+ * ref exposes `nativeElement`, `fileNativeElement`, `upload(file)` and `select({ accept, multiple
1928
+ * })` exactly as Ant X documents.
1929
+ */
1930
+ export type AttachmentsProp = Omit<UploadProp, "value" | "defaultValue" | "onValueChange" | "variant" | "showUploadList" | "children" | "onRemove"> & {
1931
+ /** Controlled attachment list. Ant Design X `items` (= antd Upload `fileList`). */
1932
+ items?: readonly AttachmentsItemProp[];
1933
+ /** Fires when the list changes. Ant Design X / antd Upload `onChange`. */
1934
+ onChange?: (info: {
1935
+ file: AttachmentsItemProp;
1936
+ fileList: AttachmentsItemProp[];
1937
+ }) => void;
1938
+ /** antd Upload `onRemove` — receives the attachment row being removed. */
1939
+ onRemove?: (item: AttachmentsItemProp) => boolean | void | Promise<boolean | void>;
1940
+ /** How overflowing cards layout. Ant Design X `overflow`. */
1941
+ overflow?: AttachmentsOverflowProp;
1942
+ /** Empty-state copy, or a function for inline vs drop variants. Ant Design X `placeholder`. */
1943
+ placeholder?: AttachmentsPlaceholderProp | ((type: "inline" | "drop") => AttachmentsPlaceholderProp);
1944
+ /** Host element for a full-screen drop overlay. Ant Design X `getDropContainer`. */
1945
+ getDropContainer?: (() => HTMLElement | null | undefined) | null;
1946
+ /** Semantic class names. Ant Design X `classNames`. */
1947
+ classNames?: Partial<Record<AttachmentsSemanticProp, string>>;
1948
+ /** Semantic inline styles. Ant Design X `styles`. */
1949
+ styles?: Partial<Record<AttachmentsSemanticProp, React.CSSProperties>>;
1950
+ /** Root class on the outermost node. Ant Design X `rootClassName`. */
1951
+ rootClassName?: ClassNameProp;
1952
+ /** Child mode: the visible trigger; upload runs through a hidden input beside it. Ant Design X `children`. */
1953
+ children?: React.ReactElement;
1954
+ /** Passthrough to the preview image. Ant Design X `imageProps` — reserved; no Image primitive yet. */
1955
+ imageProps?: Record<string, unknown>;
1956
+ };
1957
+ /** Imperative handle Ant Design X documents on `Attachments` ref. */
1958
+ export type AttachmentsRefProp = {
1959
+ nativeElement?: HTMLDivElement | null;
1960
+ fileNativeElement?: HTMLInputElement | null;
1961
+ upload: (file: File) => void;
1962
+ select: (options?: {
1963
+ accept?: string;
1964
+ multiple?: boolean;
1965
+ }) => void;
1966
+ };
@@ -1,7 +1,40 @@
1
1
  /** Feedback component prop types — @see docs/COMPONENTS.md#feedback */
2
2
  import type * as React from "react";
3
3
  import type { QueryErrorCategory } from "../../lib/query-error.js";
4
- import type { AlertVariantProp, AvatarShapeProp, CancelLabelProp, ChildrenProp, ClassNameProp, ConfirmLabelProp, ConfirmVariantProp, DescriptionProp, HandlerProp, IconProp, OpenProp, OnOpenChangeProp, PendingProp, ShapeProp, SizeProp, ToneProp, TitleProp } from "../vocabulary/index.js";
4
+ import type { AlertVariantProp, AvatarShapeProp, CancelLabelProp, ChildrenProp, ClassNameProp, ConfirmLabelProp, ConfirmVariantProp, DefaultOpenProp, DescriptionProp, HandlerProp, IconProp, OpenProp, OnOpenChangeProp, PendingProp, ShapeProp, SizeProp, ToneProp, TitleProp } from "../vocabulary/index.js";
5
+ /**
6
+ * @see Dialog — the compound modal ROOT.
7
+ *
8
+ * `variant` is the one prop that answers gh#567: it decides the ARIA role, whether an
9
+ * outside click dismisses, and the primary action's emphasis together, because those three
10
+ * always travel together. Set it here to cover the whole tree, or on `DialogContent` for one
11
+ * surface. `variant="destructive"` IS the 12 `AlertDialog*` exports, which stay for
12
+ * compatibility — see the file header of `components/feedback/dialog.tsx`.
13
+ */
14
+ export type DialogProp = {
15
+ open?: OpenProp;
16
+ defaultOpen?: DefaultOpenProp;
17
+ onOpenChange?: OnOpenChangeProp;
18
+ variant?: ConfirmVariantProp;
19
+ /** Kept from Radix. RAC's `Modal` always locks scroll, so `false` no longer turns that off. */
20
+ modal?: boolean;
21
+ children?: ChildrenProp;
22
+ };
23
+ /**
24
+ * @see DialogContent — the modal surface. `variant` overrides the root's for this surface and
25
+ * is what actually resolves `role`, outside-click dismissal and the ✕ default.
26
+ */
27
+ export type DialogContentProp = {
28
+ variant?: ConfirmVariantProp;
29
+ /** Show the corner ✕. Defaults to `true`, or `false` under `variant="destructive"`. */
30
+ showCloseButton?: boolean;
31
+ /** shadcn-era spelling of `showCloseButton`; kept working. */
32
+ showClose?: boolean;
33
+ /** Semantic class for the scrim the surface owns (RAC nests overlay → modal → dialog). */
34
+ overlayClassName?: ClassNameProp;
35
+ className?: ClassNameProp;
36
+ children?: ChildrenProp;
37
+ };
5
38
  /** @see AlertDialog */
6
39
  export type AlertDialogProp = {
7
40
  open: OpenProp;
@@ -83,6 +116,25 @@ export type SkeletonRowsProp = {
83
116
  rows?: number;
84
117
  columns?: number;
85
118
  };
119
+ /**
120
+ * The skeleton of a `Form columns={N}` — label + control PAIRS on the same grid the form uses,
121
+ * not the flat line list `SkeletonRows` draws (gh#552).
122
+ *
123
+ * Why it is its own component rather than `SkeletonRows` with better defaults: `SkeletonRows` has
124
+ * no idea a form field is two stacked things, so a consumer approximating one got the column count
125
+ * right and the inside of every cell wrong. Worse, "close enough" is a thing that DRIFTS — change
126
+ * the form's `columns` and forget the skeleton and the layout jumps again on load, with nothing
127
+ * red to say so. Sharing `ResponsiveGrid` is what stops that: one `columns` value, one ladder.
128
+ */
129
+ export type SkeletonFormProp = {
130
+ /** Columns of the form this stands in for — passed straight to `ResponsiveGrid`. */
131
+ columns?: number;
132
+ /** How many label+control pairs to draw. */
133
+ fields?: number;
134
+ /** Shimmer, matching the rest of the family. */
135
+ active?: boolean;
136
+ className?: string;
137
+ };
86
138
  /**
87
139
  * A skeleton line's MEASURE. `number` is read as pixels, matching antd's
88
140
  * `SkeletonParagraphProps["width"]` (components/skeleton/Paragraph.tsx); a string is any CSS length
@@ -1,8 +1,14 @@
1
1
  /** Foundation component prop types — @see docs/COMPONENTS.md#foundation */
2
2
  import type * as React from "react";
3
- import type { ActivityAnnounceProp, ActivityVariantProp, AsChildProp, ButtonSizeProp, ButtonVariantProp, ChildrenProp, ClassNameProp, DisabledProp, FontWeightProp, HeadingLevelProp, LabelProp, OnClickProp, PendingProp, RevealDelayProp, ShapeProp, SizeProp, TextAlignProp, TextSizeProp, TextToneProp, TextWhitespaceProp } from "../vocabulary/index.js";
4
- /** @see Text — typographic primitive; replaces hand-rolled `<span className="text-[13px] …">`. */
5
- export type TextProp = Omit<React.HTMLAttributes<HTMLElement>, "color"> & {
3
+ import type { ActivityAnnounceProp, ActivityVariantProp, AsChildProp, ButtonSizeProp, ButtonVariantProp, ChildrenProp, ClassNameProp, DescriptionProp, DisabledProp, FontWeightProp, HeadingLevelProp, IdProp, LabelProp, OnClickProp, OnOpenChangeProp, OpenProp, PendingProp, RevealDelayProp, ShapeProp, SizeProp, TextAlignProp, TextSizeProp, TextToneProp, TextWhitespaceProp, TitleLevelProp, TypographyActionsConfigProp, TypographyCopyConfigProp, TypographyEditConfigProp, TypographyEllipsisConfigProp, TypographyTypeProp } from "../vocabulary/index.js";
4
+ /**
5
+ * @see Text typographic primitive; replaces hand-rolled `<span className="text-[13px] …">`.
6
+ *
7
+ * This IS antd `Typography.Text`: every prop antd declares on it is here, alongside the props
8
+ * this library already shipped. Where the two name the same axis, BOTH spellings are accepted and
9
+ * the winner is stated at the prop — `tone` over `type`, `ellipsis` over `truncate` / `clamp`.
10
+ */
11
+ export type TextProp = Omit<React.HTMLAttributes<HTMLElement>, "color"> & Omit<TypographyBlockProp, "ellipsis"> & {
6
12
  /** Render element. Default `span`. */
7
13
  as?: "span" | "p" | "div" | "a" | "label" | "strong" | "em" | "small" | "code" | "kbd" | "dt" | "dd" | "caption" | "abbr";
8
14
  /**
@@ -37,6 +43,16 @@ export type TextProp = Omit<React.HTMLAttributes<HTMLElement>, "color"> & {
37
43
  * line-clamp styling (never write the `line-clamp-N` utility page-side).
38
44
  */
39
45
  clamp?: number;
46
+ /**
47
+ * antd `ellipsis`. `true` is one line; the object form carries `suffix`, `symbol`,
48
+ * `defaultExpanded` / `expanded`, `onEllipsis` and `tooltip`.
49
+ *
50
+ * antd omits `rows`, `expandable` and `onExpand` from `Typography.Text` — an inline run has no
51
+ * second line to expand into — and that omission is ported; reach for `Paragraph` when you want
52
+ * them. It OUTRANKS this library's own `truncate` and `clamp` when both are passed, because it
53
+ * is the only spelling that can also carry a suffix or a tooltip.
54
+ */
55
+ ellipsis?: boolean | Omit<TypographyEllipsisConfigProp, "rows" | "expandable" | "onExpand">;
40
56
  /**
41
57
  * Whitespace handling. Default `normal` (CSS's own: newlines and space runs collapse).
42
58
  *
@@ -82,6 +98,128 @@ export type HeadingProp = Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"
82
98
  /** Weight (system canon: 400 · 500 · 700). Default `medium` — set `bold` for an emphasised title. */
83
99
  weight?: FontWeightProp;
84
100
  };
101
+ /**
102
+ * @see Typography — antd's plain `<article>` wrapper for a run of prose (`TypographyProps`).
103
+ *
104
+ * It carries no emphasis of its own; it is the container `Title` / `Paragraph` / `Text` / `Link`
105
+ * sit inside, and the thing `Typography.Text` etc. hang off as a compound component.
106
+ */
107
+ export type TypographyProp = Omit<React.HTMLAttributes<HTMLElement>, "color"> & {
108
+ /** Rendered element. Default `article`, matching antd. */
109
+ as?: string;
110
+ /**
111
+ * antd's (private) `component` — the rendered element.
112
+ *
113
+ * `as` is the spelling this library documents, and `as` WINS when both are passed. `component`
114
+ * exists so antd code pastes in unchanged.
115
+ */
116
+ component?: string;
117
+ };
118
+ /**
119
+ * The antd `BlockProps` behaviour shared by `Text` / `Title` / `Paragraph` / `Link`.
120
+ *
121
+ * The seven decoration flags each WRAP the content in a real element, in antd's own nesting order
122
+ * (strong → u → del → code → mark → kbd → i), so the meaning reaches a screen reader instead of
123
+ * only the pixels. That is why `strong` is not folded into `weight` and `code` is not folded into
124
+ * `mono`: `weight`/`mono` change how the text is painted, these change what it IS.
125
+ */
126
+ export type TypographyBlockProp = {
127
+ /** Which side the copy / edit / expand cluster sits on. Default `{ placement: "end" }`. */
128
+ actions?: TypographyActionsConfigProp;
129
+ /**
130
+ * Emphasis, antd's spelling. This library's `tone` is the same axis and is WIDER, so **`tone`
131
+ * wins** when both are passed. Folds `secondary → muted`, `danger → destructive`.
132
+ */
133
+ type?: TypographyTypeProp;
134
+ /** Renders as unavailable — the disabled foreground, `not-allowed`, and no text selection. */
135
+ disabled?: boolean;
136
+ /** Copy affordance. `true` copies the rendered text; the object form is antd's `CopyConfig`. */
137
+ copyable?: boolean | TypographyCopyConfigProp;
138
+ /** In-place editing. `true` is the default trigger set; the object form is antd's `EditConfig`. */
139
+ editable?: boolean | TypographyEditConfigProp;
140
+ /**
141
+ * Truncation. `true` is one line; the object form is antd's `EllipsisConfig`.
142
+ *
143
+ * `Text` and `Link` NARROW this (antd does too — an inline run has no second line to expand
144
+ * into), which is why they intersect `Omit<TypographyBlockProp, "ellipsis">` and redeclare it.
145
+ */
146
+ ellipsis?: boolean | TypographyEllipsisConfigProp;
147
+ /** Wrap in `<code>`. (`mono` only swaps the FAMILY; this changes the element and its meaning.) */
148
+ code?: boolean;
149
+ /** Wrap in `<mark>` — highlighted. */
150
+ mark?: boolean;
151
+ /** Wrap in `<u>` — underlined. */
152
+ underline?: boolean;
153
+ /** Wrap in `<del>` — struck through. */
154
+ delete?: boolean;
155
+ /** Wrap in `<strong>` — bold, and semantically strong. Composes with `weight`. */
156
+ strong?: boolean;
157
+ /** Wrap in `<kbd>` — a key or key combination. */
158
+ keyboard?: boolean;
159
+ /** Wrap in `<i>` — italic. */
160
+ italic?: boolean;
161
+ /** antd's (private) `component` alias for `as`; `as` wins when both are passed. */
162
+ component?: string;
163
+ };
164
+ /**
165
+ * @see Title — antd `Typography.Title`.
166
+ *
167
+ * A SIBLING of `Heading`, not a replacement: `Heading` is this library's own four-level heading and
168
+ * stays exactly as it was. `Title` is antd's, so it reaches level 5 and carries the block
169
+ * behaviours (`copyable`, `editable`, `ellipsis`, the decorations).
170
+ *
171
+ * antd omits `strong` from `TitleProps` because a heading is already `fontWeightStrong`; that
172
+ * omission is ported.
173
+ *
174
+ * NAMED `TypographyTitleProp`, not `TitleProp`, for one measured reason: `TitleProp` is already a
175
+ * VOCABULARY type (`vocabulary/content.prop.ts` — the ReactNode heading slot a Card / Dialog /
176
+ * PageContainer takes), and `src/props/index.ts` re-exports `./vocabulary` and `./components`
177
+ * through the same `export *`. A second `TitleProp` there is an ambiguous re-export, which TS
178
+ * resolves by dropping BOTH. The component and its public `TitleProps` alias are still spelled
179
+ * antd's way; only the internal type name moves.
180
+ */
181
+ export type TypographyTitleProp = Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & Omit<TypographyBlockProp, "strong"> & {
182
+ /** Heading level 1…5 — sets the `--heading-h*` size token AND the `<h1>`…`<h5>` element. */
183
+ level?: TitleLevelProp;
184
+ /** Override the rendered element (a visual h2 that is a real `<h1>`). */
185
+ as?: "h1" | "h2" | "h3" | "h4" | "h5" | "div";
186
+ /** Semantic colour intent. Outranks antd's `type`. */
187
+ tone?: TextToneProp;
188
+ align?: TextAlignProp;
189
+ /** This library's single-line ellipsis. `ellipsis` outranks it when both are passed. */
190
+ truncate?: boolean;
191
+ /** Weight (system canon: 400 · 500 · 700). Default `medium`. */
192
+ weight?: FontWeightProp;
193
+ /** Truncation — `true` is one line; the object form is antd's full `EllipsisConfig`. */
194
+ ellipsis?: boolean | TypographyEllipsisConfigProp;
195
+ };
196
+ /**
197
+ * @see Paragraph — antd `Typography.Paragraph`.
198
+ *
199
+ * antd renders it as a `<div>`, not a `<p>`, because the editing textarea and the action cluster
200
+ * are block content that a `<p>` may not legally contain. That is ported verbatim; pass
201
+ * `as="p"` when the content is known to be phrasing-only.
202
+ */
203
+ export type ParagraphProp = Omit<TextProp, "ellipsis" | "as"> & {
204
+ /** Rendered element. Default `div` — antd's choice; see above. */
205
+ as?: "div" | "p" | "span";
206
+ /** Truncation — `true` is one line; the object form is antd's full `EllipsisConfig`. */
207
+ ellipsis?: boolean | TypographyEllipsisConfigProp;
208
+ };
209
+ /**
210
+ * @see Link — antd `Typography.Link`.
211
+ *
212
+ * `Text link` is this library's own inline link affordance and is unchanged. `Link` is antd's
213
+ * anchor-by-default flavour of it: it renders `<a>`, defaults `tone` to `primary`, and adds
214
+ * antd's `rel="noopener noreferrer"` guard whenever `target="_blank"` is set without an explicit
215
+ * `rel`. antd restricts `ellipsis` to a boolean here, and that restriction is ported.
216
+ */
217
+ export type LinkProp = Omit<TextProp, "ellipsis" | "as"> & {
218
+ /** Rendered element. Default `a`. */
219
+ as?: "a" | "span";
220
+ /** Single-line truncation. antd allows only a boolean on `Link`. */
221
+ ellipsis?: boolean;
222
+ };
85
223
  /** @see Button */
86
224
  export type ButtonProp = React.ButtonHTMLAttributes<HTMLButtonElement> & {
87
225
  variant?: ButtonVariantProp;
@@ -198,3 +336,302 @@ export type ActivityProp = Omit<React.HTMLAttributes<HTMLSpanElement>, "color">
198
336
  announce?: ActivityAnnounceProp;
199
337
  className?: ClassNameProp;
200
338
  };
339
+ /**
340
+ * FloatButton `type` — the two fills Ant Design gives the corner mark.
341
+ *
342
+ * Ported verbatim from antd 6.6.3 (`FloatButtonType`), including the name `type`, which is NOT
343
+ * this library's usual word for a fill (everything else says `variant`). Keeping antd's spelling
344
+ * is the point: a consumer porting a screen copies the antd call and it compiles. The two values
345
+ * map onto the two `Button` variants that already carry those fills — `default` → `outline`
346
+ * (a white/surface pill with a hairline), `primary` → `default` (the brand fill).
347
+ */
348
+ export type FloatButtonTypeProp = "default" | "primary";
349
+ /**
350
+ * FloatButton `shape` — a round mark or a rounded square.
351
+ *
352
+ * antd's own vocabulary (`FloatButtonShape`), deliberately NOT the control `ShapeProp`
353
+ * (`default | pill | sharp`) and NOT `AvatarShapeProp` (which is documented as an ENTITY mark).
354
+ * `square` is the only shape antd lets carry text: `circle` + `content` is an antd dev warning,
355
+ * and this port raises the same one.
356
+ */
357
+ export type FloatButtonShapeProp = "circle" | "square";
358
+ /**
359
+ * What opens a `FloatButton.Group`'s menu. antd `FloatButtonGroupTrigger`.
360
+ *
361
+ * Absent (the default) means the group is NOT a menu at all — it is a plain stack of buttons, all
362
+ * of them visible, with no trigger. That is antd's `isMenuMode = trigger && …` branch, and it is
363
+ * why `trigger` has no default value.
364
+ */
365
+ export type FloatButtonTriggerProp = "click" | "hover";
366
+ /**
367
+ * Which side of the trigger a `FloatButton.Group` menu opens towards. antd `placement`.
368
+ *
369
+ * PHYSICAL words, not logical ones, because they are antd's and a port that renamed them would
370
+ * break the copy-paste this whole component exists to allow. The stylesheet resolves `left` /
371
+ * `right` through `inset-inline-*`, so the RENDERED side still flips under `dir="rtl"`.
372
+ */
373
+ export type FloatButtonPlacementProp = "top" | "left" | "right" | "bottom";
374
+ /**
375
+ * The count/dot mark on a `FloatButton`'s corner. antd passes its whole `BadgeProps` here minus
376
+ * `status`/`text`/`title`/`children`; this is that surface restricted to the fields that survive
377
+ * this library's rules.
378
+ *
379
+ * NOT ported from antd's badge: `offset` (a raw `[x, y]` px tuple — geometry hand-written at the
380
+ * call site, which `no-hardcoded-geometry` forbids and no token step spells) and `size`
381
+ * (`default | small`, a second size ladder for a mark that is already the smallest thing on the
382
+ * button).
383
+ */
384
+ export type FloatButtonBadgeProp = {
385
+ /** The number on the mark. Omit it (or pass `dot`) for a mark that carries no figure. */
386
+ count?: number;
387
+ /** A bare dot — "there is something here" with no quantity. Wins over `count`. */
388
+ dot?: boolean;
389
+ /** Cap: a `count` above this renders as `{overflowCount}+`. Default `99`, antd's. */
390
+ overflowCount?: number;
391
+ /** Whether `count={0}` still paints a mark. Default `false`, antd's. */
392
+ showZero?: boolean;
393
+ /** The mark's OWN colour as a CSS colour — data, not a semantic tone. Default: the brand fill. */
394
+ color?: string;
395
+ };
396
+ /**
397
+ * @see FloatButton — Ant Design's corner action: a control pinned to the viewport, above the
398
+ * page, for a tool that must stay reachable but is not part of this page's content.
399
+ *
400
+ * Ported from antd 6.6.3. `Button` is in the layout flow, so pinning one meant a consumer writing
401
+ * `position: fixed` themselves — page-local CSS that `ui-audit` blocks with no legal replacement
402
+ * (gh#558). The corner insets are `--float-button-offset-block-end` / `-inline-end`, so a service
403
+ * moves the mark by retuning a token instead of writing a media query.
404
+ *
405
+ * Deliberately NOT ported from antd: `classNames` / `styles` (per-slot style holes — they freeze
406
+ * internal DOM slot names into public API, which docs/WHAT-BELONGS-HERE.md rules out by name),
407
+ * `prefixCls` / `rootClassName` (antd's CSS-in-JS plumbing; this library ships static classes) and
408
+ * `_InternalPanelDoNotUseOrYouWillBeFired`.
409
+ */
410
+ export type FloatButtonProp = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "content" | "color"> & {
411
+ /** The glyph. Defaults to a document mark when the button carries no `content`, as antd does. */
412
+ icon?: ChildrenProp;
413
+ /**
414
+ * A short line UNDER the icon. antd 6 renamed this to `content`; both spellings are accepted and
415
+ * `content` wins, exactly as antd resolves them.
416
+ *
417
+ * @deprecated Use `content`.
418
+ */
419
+ description?: DescriptionProp;
420
+ /** A short line under the icon. Only legal with `shape="square"` — a circle has no room. */
421
+ content?: ChildrenProp;
422
+ /** Fill. Default `default`. */
423
+ type?: FloatButtonTypeProp;
424
+ /** Round mark or rounded square. Default `circle`. Inherited from an enclosing Group. */
425
+ shape?: FloatButtonShapeProp;
426
+ /**
427
+ * Hover/focus label. A plain node is the tooltip's content; the object form takes the same
428
+ * `side` / `align` / `sideOffset` the `TooltipContent` primitive takes.
429
+ *
430
+ * When it is a STRING and no `aria-label` is given, it also becomes the button's accessible
431
+ * name — an icon-only control with no name is a WCAG 4.1.2 failure, and a tooltip alone never
432
+ * reaches a touch user.
433
+ */
434
+ tooltip?: ChildrenProp | FloatButtonTooltipProp;
435
+ /** Renders an `<a>` instead of a `<button>`. antd's `href`. */
436
+ href?: string;
437
+ /** Anchor target; only meaningful beside `href`. */
438
+ target?: React.HTMLAttributeAnchorTarget;
439
+ /** Count / dot mark on the corner. */
440
+ badge?: FloatButtonBadgeProp;
441
+ /** Non-interactive. Inherited by a Group's trigger. */
442
+ disabled?: DisabledProp;
443
+ /** The `<button type>` attribute, since `type` is taken by the fill. Default `button`. antd 5.21+. */
444
+ htmlType?: "button" | "submit" | "reset";
445
+ className?: ClassNameProp;
446
+ };
447
+ /**
448
+ * The object form of `FloatButton tooltip` — the subset of this library's `TooltipContent` props
449
+ * that positions a tooltip. antd passes its whole `TooltipProps` here; the placement fields are
450
+ * the ones that survive, because everything else antd offers (`color`, `overlayStyle`,
451
+ * `overlayClassName`) is a style hole.
452
+ */
453
+ export type FloatButtonTooltipProp = {
454
+ /** What the tooltip says. */
455
+ title?: ChildrenProp;
456
+ /** Edge of the button the tooltip attaches to. Default `left`, so it clears the viewport edge. */
457
+ side?: "top" | "right" | "bottom" | "left";
458
+ /** Alignment along that edge. */
459
+ align?: "start" | "center" | "end";
460
+ /** Gap between button and tooltip, in px. */
461
+ sideOffset?: number;
462
+ };
463
+ /**
464
+ * @see FloatButton.Group — a stack of corner actions, optionally behind one trigger.
465
+ *
466
+ * Two modes, and `trigger` is the switch, exactly as in antd: WITHOUT it the group is a plain
467
+ * stack (every button visible, no trigger rendered); WITH it the children collapse behind a
468
+ * trigger that opens them on click or on hover.
469
+ */
470
+ export type FloatButtonGroupProp = Omit<FloatButtonProp, "content" | "description" | "href"> & {
471
+ /** The buttons. `FloatButton` children inherit the group's `shape`. */
472
+ children?: ChildrenProp;
473
+ /** Menu mode: what opens the stack. Omit for a plain always-open stack. */
474
+ trigger?: FloatButtonTriggerProp;
475
+ /** Controlled open state. antd warns when it is passed without `trigger`; so does this. */
476
+ open?: OpenProp;
477
+ /** Fires when the menu opens or closes. */
478
+ onOpenChange?: OnOpenChangeProp;
479
+ /** Glyph on the trigger while the menu is OPEN. Default: a close mark. */
480
+ closeIcon?: ChildrenProp;
481
+ /** Which way the menu opens. Default `top`. */
482
+ placement?: FloatButtonPlacementProp;
483
+ };
484
+ /**
485
+ * @see FloatButton.BackTop — the corner action that returns a scroll container to the top once
486
+ * the reader is `visibilityHeight` px down it.
487
+ *
488
+ * `target` is antd's, and it is what makes this work in a shell that owns its own scroll: pass
489
+ * `() => element` and BackTop watches that element instead of the document — which is the answer
490
+ * to the objection that a document-bound BackTop competes with `MobileShell`'s single scroll
491
+ * region.
492
+ */
493
+ export type FloatButtonBackTopProp = Omit<FloatButtonProp, "href" | "target"> & {
494
+ /** Scroll distance, in px, before the button appears. Default `400` (antd's). */
495
+ visibilityHeight?: number;
496
+ /** The scroll container to watch and to scroll. Default: the owning document. */
497
+ target?: () => HTMLElement | Window | Document | null;
498
+ /** Scroll-to-top animation length in ms. Default `450` (antd's); `prefers-reduced-motion` → 0. */
499
+ duration?: number;
500
+ /** Paint how far down the container the reader is, as a ring. Default `false`. antd 6.6+. */
501
+ showProgress?: boolean;
502
+ /** Fires after the scroll is started. */
503
+ onClick?: React.MouseEventHandler<HTMLElement>;
504
+ };
505
+ /**
506
+ * Ant Design X `Actions variant`. Governs the strip's chrome, not the buttons' intent:
507
+ * `borderless` (the default) is a bare row of ghost buttons, `filled` gives the strip a tinted
508
+ * ground, `outlined` a hairline boundary.
509
+ * @see Actions
510
+ */
511
+ export type ActionsVariantProp = "borderless" | "filled" | "outlined";
512
+ /**
513
+ * Ant Design X `ACTIONS_ITEM_STATUS` — the four states one action can be in while it runs.
514
+ * @see ActionsItem
515
+ */
516
+ export type ActionsStatusProp = "default" | "running" | "loading" | "error";
517
+ /**
518
+ * Ant Design X `ActionsFeedback` value. `default` is "no opinion recorded", not "absent".
519
+ * @see ActionsFeedback
520
+ */
521
+ export type ActionsFeedbackValueProp = "like" | "dislike" | "default";
522
+ /** @see Actions — one action in the strip. Ant Design X `ItemType`. */
523
+ export type ActionsItemsProp = {
524
+ /** Identity handed back to `onClick`. Ant Design X `key`. */
525
+ key: string;
526
+ /**
527
+ * What the action is called. It is the button's ACCESSIBLE NAME and its tooltip, not just the
528
+ * tooltip — Ant X puts it in a `Tooltip` only, so its icon-only `<div onClick>` reaches a screen
529
+ * reader as nothing at all. A plain string, because `aria-label` cannot carry a node.
530
+ */
531
+ label?: string;
532
+ /** The glyph. Ant Design X `icon`. */
533
+ icon?: React.ReactNode;
534
+ /** Per-item handler. When present it WINS over the strip's `onClick`. Ant Design X `onItemClick`. */
535
+ onItemClick?: (item: ActionsItemsProp) => void;
536
+ /** Paint the action as irreversible. Ant Design X `danger`. */
537
+ danger?: boolean;
538
+ /** Nest the action into a menu behind one trigger. Ant Design X `subItems`. */
539
+ subItems?: readonly Omit<ActionsItemsProp, "subItems" | "actionRender">[];
540
+ /** Replace the rendered action entirely. Ant Design X `actionRender`. */
541
+ actionRender?: ((item: ActionsItemsProp) => React.ReactNode) | React.ReactNode;
542
+ };
543
+ /**
544
+ * @see Actions — the strip of actions under an assistant message (Ant Design X `Actions`): copy,
545
+ * retry, like, and whatever else the turn offers.
546
+ *
547
+ * Ant X renders each action as a `<div onClick>` with the label in a `Tooltip`
548
+ * (`es/actions/Item.js`), so the strip is unreachable by keyboard and nameless to a screen reader.
549
+ * Here every action is a real `Button` carrying its `label` as the accessible name, and the strip
550
+ * is the WAI-ARIA APG **Toolbar**: one tab stop, arrows between the actions.
551
+ */
552
+ export type ActionsProp = {
553
+ /** The actions, in order. Ant Design X `items`. */
554
+ items: readonly ActionsItemsProp[];
555
+ /**
556
+ * Fires for any action without its own `onItemClick`. `keyPath` is the path from the clicked
557
+ * action up to the strip, exactly as in Ant X (a sub-item gives `[subKey, parentKey]`).
558
+ * Ant Design X `onClick`.
559
+ */
560
+ onClick?: (info: {
561
+ item: ActionsItemsProp;
562
+ key: string;
563
+ keyPath: string[];
564
+ domEvent: React.MouseEvent<HTMLElement>;
565
+ }) => void;
566
+ /** Ant Design X `variant`. Default `borderless`. */
567
+ variant?: ActionsVariantProp;
568
+ /** Ant Design X `fadeIn` — the strip fades in on mount. Honours `prefers-reduced-motion`. */
569
+ fadeIn?: boolean;
570
+ /** Ant Design X `fadeInLeft` — the same fade, arriving along the inline axis. */
571
+ fadeInLeft?: boolean;
572
+ /**
573
+ * Accessible name of the toolbar — a plain STRING (it lands on `aria-label`). Ant X has no
574
+ * equivalent because its strip has no role to name; a localized default applies when omitted.
575
+ */
576
+ label?: string;
577
+ id?: IdProp;
578
+ className?: ClassNameProp;
579
+ };
580
+ /**
581
+ * @see ActionsItem — one status-aware action, usable on its own (Ant Design X `Actions.Item`).
582
+ *
583
+ * `status` swaps the glyph: `loading` and `error` bring their own, `running` uses `runningIcon`,
584
+ * and everything else uses `defaultIcon` — Ant X's exact table, from `es/actions/ActionsItem.js`.
585
+ */
586
+ export type ActionsItemProp = {
587
+ /** Ant Design X `status`. Default `default`. */
588
+ status?: ActionsStatusProp;
589
+ /** The resting glyph. Ant Design X `defaultIcon`. */
590
+ defaultIcon: React.ReactNode;
591
+ /** The glyph while `status="running"`. Ant Design X `runningIcon`. */
592
+ runningIcon?: React.ReactNode;
593
+ /** Accessible name AND tooltip. Ant Design X `label` (tooltip only there). */
594
+ label?: string;
595
+ onClick?: OnClickProp;
596
+ disabled?: DisabledProp;
597
+ id?: IdProp;
598
+ className?: ClassNameProp;
599
+ };
600
+ /**
601
+ * @see ActionsCopy — copy this message to the clipboard (Ant Design X `Actions.Copy`).
602
+ *
603
+ * Ant X delegates to antd's `Typography copyable`, which swaps the glyph to a tick for 3s. That
604
+ * feedback is reproduced, and the state change is ANNOUNCED as well as painted — a tick that only
605
+ * appears is invisible to a screen reader (WCAG 1.4.1 / 4.1.3).
606
+ */
607
+ export type ActionsCopyProp = {
608
+ /** What lands on the clipboard. Ant Design X `text`. */
609
+ text?: string;
610
+ /** The resting glyph. Ant Design X `icon`. */
611
+ icon?: React.ReactNode;
612
+ /** Accessible name AND tooltip. Localized default otherwise. */
613
+ label?: string;
614
+ /** Fires after a successful write, so the caller can log or toast. */
615
+ onCopy?: (text: string) => void;
616
+ id?: IdProp;
617
+ className?: ClassNameProp;
618
+ };
619
+ /**
620
+ * @see ActionsFeedback — the like / dislike pair (Ant Design X `Actions.Feedback`).
621
+ *
622
+ * Controlled through Ant X's own field names, `value` and `onChange`, because that is the API the
623
+ * issue asks to port. Clicking the recorded opinion again clears it back to `default`, as in Ant X.
624
+ */
625
+ export type ActionsFeedbackProp = {
626
+ /** Ant Design X `value`. Default `default`. */
627
+ value?: ActionsFeedbackValueProp;
628
+ /** Ant Design X `onChange`. */
629
+ onChange?: (value: ActionsFeedbackValueProp) => void;
630
+ /** Accessible name of the pair's group. Localized default otherwise. */
631
+ label?: string;
632
+ /** Accessible names of the two buttons. Localized defaults otherwise. */
633
+ likeLabel?: string;
634
+ dislikeLabel?: string;
635
+ id?: IdProp;
636
+ className?: ClassNameProp;
637
+ };
@@ -1,9 +1,9 @@
1
- export type { AppLauncherApp, AppLauncherGroup, AppLauncherLabels, AppLauncherProp, AppShellProp, AuthFooterProp, AuthIdentityProp, OrgSwitcherLabels, OrgSwitcherOrganization, OrgSwitcherProp, PageContainerProp, PageInsetProp, SidebarItemProp, SidebarProductProp, SidebarProp, SidebarSectionProp, TopbarProp, } from "./layout.prop.js";
1
+ export type { AppLauncherApp, AppLauncherGroup, AppLauncherLabels, AppLauncherProp, AppShellProp, AuthFooterProp, AuthIdentityProp, OrgSwitcherLabels, OrgSwitcherOrganization, OrgSwitcherProp, DragAxisProp, DragBoundsProp, DraggablePanelPlacementProp, DraggablePanelPositionProp, DraggablePanelProp, PageContainerProp, PageInsetProp, SidebarItemProp, SidebarProductProp, SidebarProp, SidebarSectionProp, TopbarProp, } from "./layout.prop.js";
2
2
  export type { ButtonProp } from "./general.prop.js";
3
3
  export type { InputProp, TextareaProp, FormFieldProp, SearchInputProp, CheckboxProp, CheckboxGroupProp, ChoiceOptionProp, RadioProp, RadioGroupProp, SwitchProp, SliderProp, CalendarProp, DatePickerProp, TimePickerProp, ColorPickerProp, UploadProp, UploadFileItemProp, UploadVariantProp, TreeOptionProp, TreeFieldNamesProp, CascaderProp, TreeSelectProp, ShowCheckedStrategyProp, TransferProp, TransferItemProp, } from "./data-entry.prop.js";
4
4
  export type { AvatarProp, EmptyStateProp, DescriptionsProp, DescriptionsItemProp, BadgeProp, DataTableProp, QrCodeProp, } from "./data-display.prop.js";
5
5
  export type { ChartDatum, ChartSeriesProp, LineChartProp, BarChartProp, AreaChartProp, PieChartProp, } from "./charts.prop.js";
6
- export type { AlertQueryErrorProp, AlertProp, AlertTitleProp, AlertContentProp, AlertDescriptionProp, AlertActionsProp, SheetResponsiveProp, SkeletonRowsProp, } from "./feedback.prop.js";
6
+ export type { AlertQueryErrorProp, AlertProp, DialogProp, DialogContentProp, AlertTitleProp, AlertContentProp, AlertDescriptionProp, AlertActionsProp, SheetResponsiveProp, SkeletonRowsProp, } from "./feedback.prop.js";
7
7
  export type { DataStateProp, InfiniteQueryStateProp, InfiniteQueryHelpers, PrefetchLinkProp, } from "./query.prop.js";
8
8
  export type { DropdownMenuPlacementProp, DropdownMenuTriggerActionProp, PaginationProp, PaginationSizeProp, PaginationAlignProp, StepsProp, StepItemProp, StepStatusProp, StepsTypeProp, TabsProp, TabItemProp, TabsVariantProp, TabsPlacementProp, TabsExtraProp, TabsOnEditProp, } from "./navigation.prop.js";
9
9
  export type { AppProviderProp, AppContextValue, AppSettingKind, AppSettingPickerProp, AppSettingToggleKind, AppSettingToggleProp, } from "./app.prop.js";