@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.
Files changed (79) hide show
  1. package/dist/components/data-display/card.d.ts +87 -1
  2. package/dist/components/data-display/card.js +88 -15
  3. package/dist/components/data-display/index.d.ts +5 -1
  4. package/dist/components/data-display/index.js +5 -0
  5. package/dist/components/data-display/thought-chain.d.ts +42 -0
  6. package/dist/components/data-display/thought-chain.js +177 -0
  7. package/dist/components/data-display/welcome.d.ts +26 -0
  8. package/dist/components/data-display/welcome.js +37 -0
  9. package/dist/components/data-entry/attachments.d.ts +19 -0
  10. package/dist/components/data-entry/attachments.js +322 -0
  11. package/dist/components/data-entry/index.d.ts +2 -0
  12. package/dist/components/data-entry/index.js +2 -0
  13. package/dist/components/feedback/dialog.d.ts +10 -7
  14. package/dist/components/feedback/dialog.js +40 -17
  15. package/dist/components/feedback/index.d.ts +1 -1
  16. package/dist/components/general/actions.d.ts +59 -0
  17. package/dist/components/general/actions.js +253 -0
  18. package/dist/components/general/activity.js +1 -0
  19. package/dist/components/general/float-button.d.ts +41 -0
  20. package/dist/components/general/float-button.js +336 -0
  21. package/dist/components/general/index.d.ts +6 -2
  22. package/dist/components/general/index.js +12 -1
  23. package/dist/components/general/typography.d.ts +79 -4
  24. package/dist/components/general/typography.js +598 -54
  25. package/dist/components/layout/draggable-panel.d.ts +18 -0
  26. package/dist/components/layout/draggable-panel.js +189 -0
  27. package/dist/components/layout/index.d.ts +2 -0
  28. package/dist/components/layout/index.js +2 -0
  29. package/dist/components/navigation/conversations.d.ts +39 -0
  30. package/dist/components/navigation/conversations.js +371 -0
  31. package/dist/components/navigation/index.d.ts +2 -0
  32. package/dist/components/navigation/index.js +2 -0
  33. package/dist/components/ui/card.js +1 -0
  34. package/dist/i18n/messages/en.json +53 -0
  35. package/dist/i18n/messages/ja.json +53 -0
  36. package/dist/i18n/messages/vi.json +53 -0
  37. package/dist/props/components/data-display.prop.d.ts +143 -1
  38. package/dist/props/components/data-entry.prop.d.ts +76 -0
  39. package/dist/props/components/feedback.prop.d.ts +34 -1
  40. package/dist/props/components/general.prop.d.ts +440 -3
  41. package/dist/props/components/index.d.ts +2 -2
  42. package/dist/props/components/layout.prop.d.ts +63 -1
  43. package/dist/props/components/navigation.prop.d.ts +150 -0
  44. package/dist/props/registry.d.ts +426 -0
  45. package/dist/props/registry.js +546 -0
  46. package/dist/props/vocabulary/index.d.ts +1 -1
  47. package/dist/props/vocabulary/interaction.prop.d.ts +113 -0
  48. package/dist/styles/card-layout.css +30 -0
  49. package/dist/styles/core.css +1 -0
  50. package/dist/styles/data-display-layout.css +236 -0
  51. package/dist/styles/float-button-layout.css +168 -0
  52. package/dist/styles/index.css +1 -0
  53. package/dist/styles/layout.css +196 -0
  54. package/dist/styles/navigation-layout.css +139 -0
  55. package/dist/styles/text-layout.css +156 -0
  56. package/dist/tokens/base.css +7 -0
  57. package/dist/tokens/components/actions.css +14 -0
  58. package/dist/tokens/components/attachments.css +15 -0
  59. package/dist/tokens/components/conversations.css +28 -0
  60. package/dist/tokens/components/draggable-panel.css +25 -0
  61. package/dist/tokens/components/float-button.css +39 -0
  62. package/dist/tokens/components/text.css +13 -0
  63. package/dist/tokens/components/thought-chain.css +31 -0
  64. package/dist/tokens/components/welcome.css +19 -0
  65. package/dist/tokens/foundation.css +2 -0
  66. package/docs/DESIGN-AUTHORITY.md +89 -0
  67. package/docs/FRAME-COVERAGE-REPORT.md +5 -2
  68. package/docs/data-display/card/examples/tab-list.tsx +97 -0
  69. package/docs/data-display/thought-chain.tsx +176 -0
  70. package/docs/data-display/welcome.tsx +115 -0
  71. package/docs/data-entry/attachments.tsx +160 -0
  72. package/docs/feedback/dialog.tsx +50 -0
  73. package/docs/general/actions.tsx +175 -0
  74. package/docs/general/float-button.tsx +133 -0
  75. package/docs/general/typography.tsx +63 -1
  76. package/docs/layout/draggable-panel.tsx +127 -0
  77. package/docs/navigation/conversations.tsx +176 -0
  78. package/docs/roadmap/parity-audit-layout-navigation-general.md +17 -16
  79. package/package.json +3 -3
@@ -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";
@@ -1,7 +1,7 @@
1
1
  /** Layout component prop types — @see docs/COMPONENTS.md#layout */
2
2
  import type * as React from "react";
3
3
  import type { ComponentType, ReactNode, SVGProps } from "react";
4
- import type { BreadcrumbProp, TitleProp, SubtitleProp, StatusProp, ExtraProp, FooterProp, PageDensityProp, PageContainerVariantProp, CenteredShellWidthProp, CenteredShellAlignProp, CenteredShellPresetProp, ErrorSurfaceModeProp, ErrorSurfaceStatusProp, AuthShellPresetProp, MobileShellHeightProp, MobileShellWidthProp, OrientationProp, TextAlignProp, TextToneProp, BreakpointProp, GapProp, PadProp, PadRawProp, ClassNameProp, ChildrenProp, IdProp, DisabledProp, DescriptionProp, ActionProp, IconProp, HeadingLevelProp, ToneProp, WidthProp } from "../vocabulary/index.js";
4
+ import type { BreadcrumbProp, TitleProp, SubtitleProp, StatusProp, ExtraProp, FooterProp, PageDensityProp, PageContainerVariantProp, CenteredShellWidthProp, CenteredShellAlignProp, CenteredShellPresetProp, ErrorSurfaceModeProp, ErrorSurfaceStatusProp, AuthShellPresetProp, MobileShellHeightProp, MobileShellWidthProp, OrientationProp, TextAlignProp, TextToneProp, BreakpointProp, GapProp, PadProp, PadRawProp, ClassNameProp, ChildrenProp, IdProp, DisabledProp, DescriptionProp, ActionProp, IconProp, HeadingLevelProp, ToneProp, WidthProp, SizeProp } from "../vocabulary/index.js";
5
5
  import type { EmptyStateToneProp } from "./data-display.prop.js";
6
6
  /**
7
7
  * Arrangement of the page header's title band and its `extra` slot below the 640px step.
@@ -1418,3 +1418,65 @@ export type ServiceRolePanelProp = {
1418
1418
  id?: IdProp;
1419
1419
  className?: ClassNameProp;
1420
1420
  };
1421
+ /**
1422
+ * Which axis a `DraggablePanel` moves on. react-draggable's `axis`, ported verbatim including
1423
+ * `"none"` (mounted, but pinned where it started).
1424
+ */
1425
+ export type DragAxisProp = "both" | "x" | "y" | "none";
1426
+ /**
1427
+ * How far a `DraggablePanel` may travel. react-draggable's `bounds`, trimmed to the two forms that
1428
+ * survive this library's rules: `"viewport"` keeps the whole panel on screen, `"none"` lets it go
1429
+ * anywhere. react-draggable also accepts `'parent'`, a CSS selector and a `{left, top, right,
1430
+ * bottom}` object — the selector is a back door into internal DOM (the layer
1431
+ * docs/DESIGN-AUTHORITY.md refuses alongside antd's `components` / `prefixCls`), and the object is
1432
+ * spelled in PHYSICAL directions, which cannot mirror for an RTL locale.
1433
+ */
1434
+ export type DragBoundsProp = "viewport" | "none";
1435
+ /** Resting corner of a `DraggablePanel`, in logical directions so it mirrors under RTL. */
1436
+ export type DraggablePanelPlacementProp = "top-start" | "top-end" | "bottom-start" | "bottom-end";
1437
+ /**
1438
+ * Offset from the resting corner, in CSS pixels, on the PHYSICAL axes — the same frame the pointer
1439
+ * reports in, so no RTL sign flip exists to get wrong. react-draggable's `{x, y}`.
1440
+ */
1441
+ export type DraggablePanelPositionProp = {
1442
+ x: number;
1443
+ y: number;
1444
+ };
1445
+ /**
1446
+ * @see DraggablePanel — a floating surface the person using it can MOVE, so a docked assistant
1447
+ * stops covering the thing they are asking about.
1448
+ *
1449
+ * The movement props take react-draggable's names, because react-draggable is what antd's own
1450
+ * "Draggable Modal" demo prescribes and antd has no component of its own for this. The library is
1451
+ * NOT a dependency here: the drag is the repo's existing window-level pointer pattern.
1452
+ */
1453
+ export type DraggablePanelProp = Omit<React.HTMLAttributes<HTMLElement>, "title" | "children" | "onDrag"> & {
1454
+ /** Panel name. A string also becomes the region's accessible name. */
1455
+ title: TitleProp;
1456
+ children?: ChildrenProp;
1457
+ /** Trailing slot in the title bar, before the close control. */
1458
+ extra?: ExtraProp;
1459
+ /** Resting corner before any movement. Default `bottom-end`. */
1460
+ placement?: DraggablePanelPlacementProp;
1461
+ /** Panel width, from the token scale. Default `md`. */
1462
+ width?: Extract<SizeProp, "sm" | "md" | "lg">;
1463
+ /** react-draggable `axis`. Default `both`. */
1464
+ axis?: DragAxisProp;
1465
+ /** react-draggable `bounds`. Default `viewport`. */
1466
+ bounds?: DragBoundsProp;
1467
+ /** react-draggable `position` — controlled offset. Pair with `onPositionChange`. */
1468
+ position?: DraggablePanelPositionProp;
1469
+ /** react-draggable `defaultPosition` — starting offset when uncontrolled. */
1470
+ defaultPosition?: DraggablePanelPositionProp;
1471
+ /**
1472
+ * Fires with the clamped offset after every pointer frame and every keyboard nudge. The panel
1473
+ * REPORTS its position and never stores it: where it is remembered, and per what scope, is the
1474
+ * consumer's decision.
1475
+ */
1476
+ onPositionChange?: (position: DraggablePanelPositionProp) => void;
1477
+ /** Presence renders the close control in the title bar (antd Modal's `onCancel`). */
1478
+ onClose?: () => void;
1479
+ /** react-draggable `disabled` — the panel stays, the handle stops moving it. */
1480
+ disabled?: DisabledProp;
1481
+ className?: ClassNameProp;
1482
+ };