prime-ui-kit 0.20.1 → 0.21.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 (149) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{chunk-4KONMO7Z.js → chunk-6L7VWEY6.js} +1 -1
  3. package/dist/chunks/{chunk-3PY52JP3.js → chunk-S27VR4ON.js} +5828 -5596
  4. package/dist/chunks/{chunk-4374EBWV.js → chunk-S4H2ZKWJ.js} +1049 -644
  5. package/dist/color-picker.js +2 -2
  6. package/dist/components/badge/Badge.d.ts +19 -2
  7. package/dist/components/card/Card.d.ts +10 -3
  8. package/dist/components/composer/Composer.d.ts +49 -1
  9. package/dist/components/crossfade/Crossfade.d.ts +6 -4
  10. package/dist/components/data-table/DataTable.d.ts +10 -2
  11. package/dist/components/data-table/Row.d.ts +12 -1
  12. package/dist/components/data-table/SelectionMenu.d.ts +20 -0
  13. package/dist/components/data-table/useRowSelection.d.ts +2 -0
  14. package/dist/components/empty-page/EmptyPage.d.ts +5 -2
  15. package/dist/components/hint/Hint.d.ts +1 -1
  16. package/dist/components/index.d.ts +1 -1
  17. package/dist/components/input/Input.d.ts +15 -3
  18. package/dist/components/message/Message.d.ts +6 -3
  19. package/dist/components/segmented-control/SegmentedControl.d.ts +5 -1
  20. package/dist/components/smart-filter/SmartFilter.d.ts +4 -0
  21. package/dist/components/spinner/Spinner.d.ts +3 -2
  22. package/dist/components/tabs/Tabs.d.ts +10 -1
  23. package/dist/hooks/useModalLayer.d.ts +15 -8
  24. package/dist/index.css +1 -1
  25. package/dist/index.js +2 -2
  26. package/dist/internal/RegionSwap.d.ts +18 -10
  27. package/dist/internal/RollingNumber.d.ts +7 -5
  28. package/dist/internal/ToolRow.d.ts +6 -0
  29. package/dist/internal/mediaSlot.d.ts +29 -0
  30. package/dist/internal/overlay/DialogParts.d.ts +30 -6
  31. package/dist/internal/overlay/focus.d.ts +18 -3
  32. package/dist/internal/partPresence.d.ts +19 -2
  33. package/dist/layout/sidebar/Sidebar.d.ts +3 -2
  34. package/dist/skill/anti-slop.md +35 -37
  35. package/dist/skill/api-contract.md +50 -2
  36. package/dist/skill/cheatsheet.md +15 -10
  37. package/dist/skill/checklist.md +19 -6
  38. package/dist/skill/choosing.md +79 -6
  39. package/dist/skill/components.md +1 -1
  40. package/dist/skill/composition.md +211 -51
  41. package/dist/skill/foundations.md +17 -6
  42. package/dist/skill/layouts.md +64 -14
  43. package/dist/skill/motion.md +9 -3
  44. package/dist/skill/reference/components/avatar/COMPONENT.md +1 -0
  45. package/dist/skill/reference/components/badge/COMPONENT.md +29 -5
  46. package/dist/skill/reference/components/badge/examples/examples.module.css +14 -0
  47. package/dist/skill/reference/components/badge/examples/overflow-count.tsx +32 -0
  48. package/dist/skill/reference/components/banner/COMPONENT.md +1 -1
  49. package/dist/skill/reference/components/card/COMPONENT.md +8 -4
  50. package/dist/skill/reference/components/card/examples/person-header.tsx +38 -0
  51. package/dist/skill/reference/components/composer/COMPONENT.md +35 -5
  52. package/dist/skill/reference/components/composer/examples/bot-keyboard.tsx +43 -0
  53. package/dist/skill/reference/components/confirm-dialog/COMPONENT.md +1 -1
  54. package/dist/skill/reference/components/crossfade/COMPONENT.md +18 -10
  55. package/dist/skill/reference/components/data-table/COMPONENT.md +17 -11
  56. package/dist/skill/reference/components/data-table/examples/screen.tsx +6 -9
  57. package/dist/skill/reference/components/data-table/examples/selection.tsx +60 -18
  58. package/dist/skill/reference/components/drawer/COMPONENT.md +41 -19
  59. package/dist/skill/reference/components/drawer/examples/footer-actions.tsx +54 -0
  60. package/dist/skill/reference/components/drawer/examples/header-actions.tsx +46 -25
  61. package/dist/skill/reference/components/drawer/examples/link-loading.tsx +57 -0
  62. package/dist/skill/reference/components/drawer/examples/screen.tsx +3 -5
  63. package/dist/skill/reference/components/empty-page/COMPONENT.md +2 -2
  64. package/dist/skill/reference/components/field-list/COMPONENT.md +4 -4
  65. package/dist/skill/reference/components/field-list/examples/row-menu.tsx +1 -1
  66. package/dist/skill/reference/components/hint/COMPONENT.md +1 -1
  67. package/dist/skill/reference/components/input/COMPONENT.md +16 -3
  68. package/dist/skill/reference/components/input/examples/password-policy.tsx +65 -0
  69. package/dist/skill/reference/components/list/COMPONENT.md +1 -1
  70. package/dist/skill/reference/components/login-form/COMPONENT.md +13 -11
  71. package/dist/skill/reference/components/login-form/examples/overview.tsx +5 -5
  72. package/dist/skill/reference/components/login-form/examples/states.tsx +7 -6
  73. package/dist/skill/reference/components/message/COMPONENT.md +5 -5
  74. package/dist/skill/reference/components/message/examples/bot-actions.tsx +47 -28
  75. package/dist/skill/reference/components/modal/COMPONENT.md +31 -12
  76. package/dist/skill/reference/components/modal/examples/structure.tsx +2 -4
  77. package/dist/skill/reference/components/segmented-control/COMPONENT.md +11 -6
  78. package/dist/skill/reference/components/segmented-control/examples/router.tsx +22 -0
  79. package/dist/skill/reference/components/select/COMPONENT.md +4 -1
  80. package/dist/skill/reference/components/sheet/COMPONENT.md +31 -12
  81. package/dist/skill/reference/components/sheet/examples/header-actions.tsx +5 -3
  82. package/dist/skill/reference/components/skeleton/COMPONENT.md +3 -2
  83. package/dist/skill/reference/components/smart-filter/COMPONENT.md +2 -1
  84. package/dist/skill/reference/components/smart-filter/examples/ranges.tsx +8 -2
  85. package/dist/skill/reference/components/spinner/COMPONENT.md +1 -1
  86. package/dist/skill/reference/components/tabs/COMPONENT.md +7 -4
  87. package/dist/skill/reference/components/tabs/examples/in-drawer.tsx +18 -2
  88. package/dist/skill/reference/components/thumbnail/COMPONENT.md +1 -0
  89. package/dist/skill/reference/components/tooltip/COMPONENT.md +3 -3
  90. package/dist/skill/reference/foundation.md +15 -9
  91. package/dist/skill/reference/layout/page/COMPONENT.md +1 -0
  92. package/dist/skill/reference/layout/sidebar/COMPONENT.md +4 -2
  93. package/dist/skill/reference/layout/sidebar/examples/account-profile.tsx +66 -0
  94. package/dist/skill/responsive.md +28 -6
  95. package/dist/skill/ux.md +97 -2
  96. package/dist/tokens/semantic.d.ts +2 -1
  97. package/dist/tokens/themes/dark.d.ts +1 -0
  98. package/package.json +1 -1
  99. package/src/components/avatar/COMPONENT.md +1 -0
  100. package/src/components/badge/COMPONENT.md +29 -5
  101. package/src/components/badge/examples/examples.module.css +14 -0
  102. package/src/components/badge/examples/overflow-count.tsx +32 -0
  103. package/src/components/banner/COMPONENT.md +1 -1
  104. package/src/components/card/COMPONENT.md +8 -4
  105. package/src/components/card/examples/person-header.tsx +38 -0
  106. package/src/components/composer/COMPONENT.md +35 -5
  107. package/src/components/composer/examples/bot-keyboard.tsx +43 -0
  108. package/src/components/confirm-dialog/COMPONENT.md +1 -1
  109. package/src/components/crossfade/COMPONENT.md +18 -10
  110. package/src/components/data-table/COMPONENT.md +17 -11
  111. package/src/components/data-table/examples/screen.tsx +6 -9
  112. package/src/components/data-table/examples/selection.tsx +60 -18
  113. package/src/components/drawer/COMPONENT.md +41 -19
  114. package/src/components/drawer/examples/footer-actions.tsx +54 -0
  115. package/src/components/drawer/examples/header-actions.tsx +46 -25
  116. package/src/components/drawer/examples/link-loading.tsx +57 -0
  117. package/src/components/drawer/examples/screen.tsx +3 -5
  118. package/src/components/empty-page/COMPONENT.md +2 -2
  119. package/src/components/field-list/COMPONENT.md +4 -4
  120. package/src/components/field-list/examples/row-menu.tsx +1 -1
  121. package/src/components/hint/COMPONENT.md +1 -1
  122. package/src/components/input/COMPONENT.md +16 -3
  123. package/src/components/input/examples/password-policy.tsx +65 -0
  124. package/src/components/list/COMPONENT.md +1 -1
  125. package/src/components/login-form/COMPONENT.md +13 -11
  126. package/src/components/login-form/examples/overview.tsx +5 -5
  127. package/src/components/login-form/examples/states.tsx +7 -6
  128. package/src/components/message/COMPONENT.md +5 -5
  129. package/src/components/message/examples/bot-actions.tsx +47 -28
  130. package/src/components/modal/COMPONENT.md +31 -12
  131. package/src/components/modal/examples/structure.tsx +2 -4
  132. package/src/components/segmented-control/COMPONENT.md +11 -6
  133. package/src/components/segmented-control/examples/router.tsx +22 -0
  134. package/src/components/select/COMPONENT.md +4 -1
  135. package/src/components/sheet/COMPONENT.md +31 -12
  136. package/src/components/sheet/examples/header-actions.tsx +5 -3
  137. package/src/components/skeleton/COMPONENT.md +3 -2
  138. package/src/components/smart-filter/COMPONENT.md +2 -1
  139. package/src/components/smart-filter/examples/ranges.tsx +8 -2
  140. package/src/components/spinner/COMPONENT.md +1 -1
  141. package/src/components/tabs/COMPONENT.md +7 -4
  142. package/src/components/tabs/examples/in-drawer.tsx +18 -2
  143. package/src/components/thumbnail/COMPONENT.md +1 -0
  144. package/src/components/tooltip/COMPONENT.md +3 -3
  145. package/src/layout/page/COMPONENT.md +1 -0
  146. package/src/layout/sidebar/COMPONENT.md +4 -2
  147. package/src/layout/sidebar/examples/account-profile.tsx +66 -0
  148. package/src/styles/theme-dark.css +1 -0
  149. package/src/styles/theme-light.css +1 -0
@@ -4,8 +4,8 @@ import {
4
4
  ColorField,
5
5
  ColorPicker,
6
6
  parseColor
7
- } from "./chunks/chunk-4KONMO7Z.js";
8
- import "./chunks/chunk-3PY52JP3.js";
7
+ } from "./chunks/chunk-6L7VWEY6.js";
8
+ import "./chunks/chunk-S27VR4ON.js";
9
9
  import "./chunks/chunk-QFHE5GKW.js";
10
10
  export {
11
11
  ColorField,
@@ -127,11 +127,26 @@ export type BadgeActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement
127
127
  children?: React.ReactNode;
128
128
  ref?: React.Ref<HTMLButtonElement>;
129
129
  };
130
+ export type BadgeGroupLabels = {
131
+ /** The visible text of the badge that stands for the badges that did not fit. */
132
+ more: string;
133
+ /** What assistive tech reads for that badge: how many values are not shown (its tooltip lists them). */
134
+ moreCount: string;
135
+ };
136
+ export declare const BADGE_GROUP_LABELS: BadgeGroupLabels;
130
137
  export type BadgeGroupProps = React.HTMLAttributes<HTMLDivElement> & {
131
138
  /**
132
139
  * Tier of every badge in the group; a badge's own `size` wins. Small tiers stand closer.
133
140
  */
134
141
  size?: ControlSize;
142
+ /**
143
+ * `wrap` — the row wraps onto more lines. `count` — one line (a table cell): the badges that fit the container, the rest behind a focusable «+N» badge whose tooltip lists them.
144
+ */
145
+ overflow?: "wrap" | "count";
146
+ /**
147
+ * Built-in strings of the «+N» badge, see Labels.
148
+ */
149
+ labels?: Partial<BadgeGroupLabels>;
135
150
  ref?: React.Ref<HTMLDivElement>;
136
151
  };
137
152
  declare function BadgeRoot({ color, tone, variant, size: sizeProp, shape, onRemove, pressed: pressedProp, defaultPressed, onPressedChange, loading, labels, disabled: disabledProp, children, className, ref, ...rest }: BadgeRootProps): import("react/jsx-runtime").JSX.Element;
@@ -163,9 +178,11 @@ declare namespace BadgeAction {
163
178
  /**
164
179
  * A row of badges as one value (the tags of a record, the stages a deal went through): the badges
165
180
  * wrap onto more lines, a chip gap apart. `size` sets the tier of every badge in it; without it the
166
- * badges follow the host, as a lone badge does.
181
+ * badges follow the host, as a lone badge does. `overflow="count"` keeps the row on one line: as
182
+ * many badges as fit the container, the rest behind a focusable «+N» badge: assistive tech
183
+ * reads how many, its tooltip (the badge's description) lists them.
167
184
  */
168
- declare function BadgeGroup({ size, className, ...rest }: BadgeGroupProps): import("react/jsx-runtime").JSX.Element;
185
+ declare function BadgeGroup({ size, overflow, labels: labelsProp, className, children, ref, ...rest }: BadgeGroupProps): import("react/jsx-runtime").JSX.Element;
169
186
  declare namespace BadgeGroup {
170
187
  var displayName: string;
171
188
  }
@@ -30,7 +30,10 @@ declare namespace CardRoot {
30
30
  var displayName: string;
31
31
  }
32
32
  export type CardHeaderProps = DivProps;
33
- /** The top row: the title first, anything after it (a control, a quiet caption) at the end. */
33
+ /**
34
+ * The top row: an optional `Card.Icon` first, then the title (and its description), anything after
35
+ * it (a control, a quiet caption) at the end.
36
+ */
34
37
  declare function CardHeader({ className, ...rest }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
35
38
  declare namespace CardHeader {
36
39
  var displayName: string;
@@ -72,8 +75,12 @@ declare namespace CardFooter {
72
75
  var displayName: string;
73
76
  }
74
77
  export type CardIconProps = DivProps;
75
- /** The accent icon tile of a KPI; holds one icon. */
76
- declare function CardIcon({ className, ...rest }: CardIconProps): import("react/jsx-runtime").JSX.Element;
78
+ /**
79
+ * The accent icon tile of a KPI (one icon), or the picture of the record a card is about (an
80
+ * `Avatar.Root` or a `Thumbnail.Root` anywhere inside, internal/mediaSlot): no tile, the tile's 40
81
+ * box. In `Card.Header` it leads, before the title and its description.
82
+ */
83
+ declare function CardIcon({ className, children, ...rest }: CardIconProps): import("react/jsx-runtime").JSX.Element;
77
84
  declare namespace CardIcon {
78
85
  var displayName: string;
79
86
  }
@@ -66,6 +66,8 @@ export type ComposerLabels = TextFormattingLabels & {
66
66
  cancelReply: string;
67
67
  /** Name of the close button of an edit bar. */
68
68
  cancelEdit: string;
69
+ /** Name of the button that shows and hides the reply keyboard, and of the keyboard itself. */
70
+ keyboard: string;
69
71
  };
70
72
  export declare const COMPOSER_LABELS: ComposerLabels;
71
73
  /** An attached photo or video: the uploaded queue item and what it shows. */
@@ -193,7 +195,7 @@ export type ComposerContextProps = React.HTMLAttributes<HTMLDivElement> & {
193
195
  ref?: React.Ref<HTMLDivElement>;
194
196
  };
195
197
  /** The bar above the field: «Ответ Анне» with the quoted text, or «Редактирование». */
196
- declare function ComposerContext({ mode, messageId, onDismiss, id: idProp, className, children, ...rest }: ComposerContextProps): import("react/jsx-runtime").JSX.Element;
198
+ declare function ComposerContext({ mode, messageId, onDismiss, id: idProp, className, children, ref, ...rest }: ComposerContextProps): import("react/jsx-runtime").JSX.Element;
197
199
  declare namespace ComposerContext {
198
200
  var displayName: string;
199
201
  }
@@ -257,6 +259,51 @@ declare function ComposerItemIcon(props: ComposerItemIconProps): import("react/j
257
259
  declare namespace ComposerItemIcon {
258
260
  var displayName: string;
259
261
  }
262
+ /**
263
+ * A key of the reply keyboard: its text (sent as the message), or the text with an `icon` before
264
+ * it and a `tone` (Telegram's `primary` is `accent`).
265
+ */
266
+ export type ComposerKey = string | {
267
+ label: string;
268
+ icon?: React.ReactNode;
269
+ tone?: "accent" | "success" | "danger";
270
+ };
271
+ export type ComposerKeyboardProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
272
+ /**
273
+ * Rows of keys, each row one line shared equally. A key is its text, or `{ label, icon?, tone? }` with `tone` `"accent" | "success" | "danger"`.
274
+ */
275
+ rows: readonly (readonly ComposerKey[])[];
276
+ /**
277
+ * The field's placeholder while the keyboard is shown («Выберите раздел»).
278
+ */
279
+ placeholder?: string;
280
+ /**
281
+ * Hides the keyboard after a key is used (once its promise resolves) and puts the caret in the field; the toggle shows it again.
282
+ */
283
+ oneTime?: boolean;
284
+ /**
285
+ * Whether the keys are shown (controlled).
286
+ */
287
+ open?: boolean;
288
+ /**
289
+ * Shown at first, uncontrolled: a keyboard the bot just sent is open.
290
+ */
291
+ defaultOpen?: boolean;
292
+ /**
293
+ * The toggle pressed, or a `oneTime` keyboard used.
294
+ */
295
+ onOpenChange?: (open: boolean) => void;
296
+ ref?: React.Ref<HTMLDivElement>;
297
+ };
298
+ /**
299
+ * A bot's reply keyboard: rows of keys under the composer's row, in place of a phone's keyboard;
300
+ * a key sends its text through `onSend`. The toggle before the send button shows and hides it;
301
+ * `oneTime` hides it after a key is used.
302
+ */
303
+ declare function ComposerKeyboard({ rows, placeholder, oneTime, open: openProp, defaultOpen, onOpenChange, id: idProp, className, "aria-label": ariaLabel, ref, ...rest }: ComposerKeyboardProps): import("react/jsx-runtime").JSX.Element | null;
304
+ declare namespace ComposerKeyboard {
305
+ var displayName: string;
306
+ }
260
307
  export declare const Composer: {
261
308
  Root: typeof ComposerRoot;
262
309
  Context: typeof ComposerContext;
@@ -265,4 +312,5 @@ export declare const Composer: {
265
312
  Attach: typeof ComposerAttach;
266
313
  Item: typeof ComposerItem;
267
314
  ItemIcon: typeof ComposerItemIcon;
315
+ Keyboard: typeof ComposerKeyboard;
268
316
  };
@@ -1,7 +1,7 @@
1
1
  import type * as React from "react";
2
2
  export type CrossfadeProps = React.HTMLAttributes<HTMLDivElement> & {
3
3
  /**
4
- * Key of what the region shows: `"loading"`, `"ready"`, `"empty"`, `"error"` or a record id. A new value cross-fades the old content into the new one; the same value updates in place.
4
+ * Key of what the region shows: `"loading"`, `"ready"`, `"empty"`, `"error"` or a record id. A new value cross-fades; the same one updates in place. A swap into or out of `"loading"` never glides the height.
5
5
  */
6
6
  state: string | number;
7
7
  /**
@@ -11,7 +11,9 @@ export type CrossfadeProps = React.HTMLAttributes<HTMLDivElement> & {
11
11
  ref?: React.Ref<HTMLDivElement>;
12
12
  };
13
13
  /**
14
- * Cross-fades a region between its states (loading → data → empty → error) and glides its height,
15
- * so the page below does not jump: the kit's region swap (`src/internal/RegionSwap`), public.
14
+ * Cross-fades a region between its states (loading → data → empty → error): the data replaces the
15
+ * `"loading"` skeleton in place, settled states glide the height, so the page below does not jump:
16
+ * the kit's region swap (`src/internal/RegionSwap`), public. The region spans its parent's inline
17
+ * size, also inside a centring grid.
16
18
  */
17
- export declare function Crossfade(props: CrossfadeProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function Crossfade({ className, ...props }: CrossfadeProps): import("react/jsx-runtime").JSX.Element;
@@ -24,6 +24,10 @@ export type DataTableLabels = {
24
24
  expand: string;
25
25
  /** `aria-label` of the expand toggle of an expanded row. */
26
26
  collapse: string;
27
+ /** Text of the menu button of the actions on the selected rows (`renderSelectionActions`). */
28
+ selectionActions: string;
29
+ /** The first item of the selection actions menu: clears the selection. */
30
+ clearSelection: string;
27
31
  /** Name and tooltip of the column chooser (`columnsMenu`); `{shown}` and `{total}` are counts. */
28
32
  columns: string;
29
33
  /** The heading of the column chooser's list of columns. */
@@ -282,13 +286,17 @@ export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "ch
282
286
  */
283
287
  loadingRows?: number;
284
288
  /**
285
- * The table's own tools row — search, filter, `DataTableColumnsMenu`, a view, bulk actions; two or more, unwrapped. Laid out as `Page.Tools`: the search takes the free room, the rest keep their width at the end.
289
+ * The table's own tools row — search, filter, `DataTableColumnsMenu`, a view; two or more, as direct children or a fragment (a wrapper component is one cell). Laid out as `Page.Tools`.
286
290
  */
287
291
  toolbar?: React.ReactNode;
288
292
  /**
289
293
  * The applied filters (`SmartFilter.Chips`) on a line under the `toolbar`, gone while empty; `SmartFilter.Root` wraps the DataTable.
290
294
  */
291
295
  toolbarChips?: React.ReactNode;
296
+ /**
297
+ * `Dropdown.Item`s acting on the selected keys: while rows are selected, a menu button with the count enters last in the tool row, after the `toolbar`; its first item clears the selection.
298
+ */
299
+ renderSelectionActions?: (selected: React.Key[]) => React.ReactNode;
292
300
  /**
293
301
  * Group key of a row: each group gets a header row and its own `<tbody>`. Groups keep the order in which they first appear in `rows`; a sort orders the rows inside each group; a group split by paging repeats its header.
294
302
  */
@@ -314,4 +322,4 @@ export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "ch
314
322
  */
315
323
  onCollapsedGroupsChange?: (collapsedGroups: (string | number)[]) => void;
316
324
  };
317
- export declare function DataTable<Row>({ columns: allColumns, hiddenColumns, defaultHiddenColumns, onHiddenColumnsChange, columnOrder, defaultColumnOrder, onColumnOrderChange, columnsMenu, rows, source, rowCount, size: sizeProp, className, showHeader, stickyHeader, stickyFirstColumn, stickyLastColumn, getRowKey, getRowHref, onRowClick, isRowClickable, loading, empty, labels: labelsProp, rowDividers, columnDividers, sort, defaultSort, onSortChange, paging, page, defaultPage, onPageChange, pageSize, infiniteBatchSize, hasMore, loadingMore, onLoadMore, scrollHeight, fullWidth, highlightRowOnHover, highlightColumnOnHover, striped, getRowLabel, selectable, selected, defaultSelected, onSelectedChange, onReorder, reorderHandle, getRowChildren, renderExpanded, isRowExpandable, expanded, defaultExpanded, onExpandedChange, loadError, loadingRows, toolbar, toolbarChips, getRowGroup, renderGroupHeader, stickyGroupHeaders, collapsedGroups, defaultCollapsedGroups, onCollapsedGroupsChange, ref, ...rest }: DataTableProps<Row>): import("react/jsx-runtime").JSX.Element;
325
+ export declare function DataTable<Row>({ columns: allColumns, hiddenColumns, defaultHiddenColumns, onHiddenColumnsChange, columnOrder, defaultColumnOrder, onColumnOrderChange, columnsMenu, rows, source, rowCount, size: sizeProp, className, showHeader, stickyHeader, stickyFirstColumn, stickyLastColumn, getRowKey, getRowHref, onRowClick, isRowClickable, loading, empty, labels: labelsProp, rowDividers, columnDividers, sort, defaultSort, onSortChange, paging, page, defaultPage, onPageChange, pageSize, infiniteBatchSize, hasMore, loadingMore, onLoadMore, scrollHeight, fullWidth, highlightRowOnHover, highlightColumnOnHover, striped, getRowLabel, selectable, selected, defaultSelected, onSelectedChange, onReorder, reorderHandle, getRowChildren, renderExpanded, isRowExpandable, expanded, defaultExpanded, onExpandedChange, loadError, loadingRows, toolbar, toolbarChips, renderSelectionActions, getRowGroup, renderGroupHeader, stickyGroupHeaders, collapsedGroups, defaultCollapsedGroups, onCollapsedGroupsChange, ref, ...rest }: DataTableProps<Row>): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,18 @@ import { type MeasureRow } from "./rows";
6
6
  import type { DataTableCellAlign, DataTableColumn, DataTableRowClickEvent } from "./types";
7
7
  import type { RowSelectionHandlers } from "./useRowSelection";
8
8
  export declare function columnAlign<Row>(column: DataTableColumn<Row>): DataTableCellAlign;
9
- export declare function columnSizeStyle<Row>(column: DataTableColumn<Row>): React.CSSProperties | undefined;
9
+ /**
10
+ * The size of a column's cells: its own lengths inline (a fixed `width` is also its floor, which the
11
+ * frozen widths keep), `data-grow` for the free width (CSS).
12
+ */
13
+ export declare function columnSizeProps<Row>(column: DataTableColumn<Row>): {
14
+ style: {
15
+ width: string | undefined;
16
+ minWidth: string | undefined;
17
+ maxWidth: string | undefined;
18
+ } | undefined;
19
+ "data-grow": string | undefined;
20
+ };
10
21
  /** Everything a row needs that is the same for every row (memoized by the table). */
11
22
  export type RowShared<Row> = {
12
23
  columns: DataTableColumn<Row>[];
@@ -0,0 +1,20 @@
1
+ import type * as React from "react";
2
+ import type { ControlSize } from "../../internal/states";
3
+ type SelectionMenuProps = {
4
+ /** The selected row keys, in the order they were selected. */
5
+ selected: React.Key[];
6
+ /** The consumer's items for the selection (`renderSelectionActions`). */
7
+ actions: React.ReactNode;
8
+ onClear: () => void;
9
+ labels: {
10
+ selectionActions: string;
11
+ clearSelection: string;
12
+ };
13
+ size: ControlSize;
14
+ };
15
+ /**
16
+ * The actions on the selected rows: a soft Button with the count of selected rows that opens a
17
+ * Dropdown — `labels.clearSelection` first, then the consumer's items.
18
+ */
19
+ export declare function SelectionMenu({ selected, actions, onClear, labels, size }: SelectionMenuProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -25,12 +25,14 @@ export type RowSelectionHandlers = {
25
25
  * stable, so memoized rows do not re-render when the selection of other rows changes.
26
26
  */
27
27
  export declare function useRowSelection({ selected, defaultSelected, onSelectedChange, visibleKeys, allKeys, tableRef, announce, }: UseRowSelectionOptions): {
28
+ selectedKeys: React.Key[];
28
29
  selectedSet: Set<React.Key>;
29
30
  allSelected: boolean;
30
31
  someSelected: boolean;
31
32
  announcement: string;
32
33
  dragging: boolean;
33
34
  toggleAll: () => void;
35
+ clear: () => void;
34
36
  handlers: RowSelectionHandlers;
35
37
  };
36
38
  export {};
@@ -27,8 +27,11 @@ export type EmptyPageRootProps = React.HTMLAttributes<HTMLDivElement> & {
27
27
  labels?: Partial<EmptyPageLabels>;
28
28
  ref?: React.Ref<HTMLDivElement>;
29
29
  };
30
- /** Parts rise in on first render, except in `compact` (it appears on every keystroke). */
31
- declare function EmptyPageRoot({ size: sizeProp, layout, tone, labels, className, children, ...rest }: EmptyPageRootProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
30
+ /**
31
+ * Parts rise in when it appears on a shown page (a search or a filter that came to nothing), except
32
+ * in `compact` (it appears on every keystroke); one that mounts with its page is just there.
33
+ */
34
+ declare function EmptyPageRoot({ size: sizeProp, layout, tone, labels, className, children, ref, ...rest }: EmptyPageRootProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
32
35
  declare namespace EmptyPageRoot {
33
36
  var displayName: string;
34
37
  }
@@ -21,7 +21,7 @@ export type HintRootProps = React.HTMLAttributes<HTMLParagraphElement> & {
21
21
  disabled?: boolean;
22
22
  ref?: React.Ref<HTMLParagraphElement>;
23
23
  };
24
- declare function HintRoot({ className, size: sizeProp, tone, invalid, disabled: disabledProp, children, ...rest }: HintRootProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
24
+ declare function HintRoot({ className, size: sizeProp, tone, invalid, disabled: disabledProp, children, ref, ...rest }: HintRootProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
25
25
  declare namespace HintRoot {
26
26
  var displayName: string;
27
27
  }
@@ -6,7 +6,7 @@ export type { AccordionContentProps, AccordionHeaderProps, AccordionHeadingLevel
6
6
  export { Accordion } from "./accordion/Accordion";
7
7
  export type { AvatarFallbackProps, AvatarGroupProps, AvatarImageProps, AvatarOverflowProps, AvatarPresence, AvatarRootProps, AvatarSize, AvatarStatusLabels, AvatarStatusProps, } from "./avatar/Avatar";
8
8
  export { Avatar } from "./avatar/Avatar";
9
- export type { BadgeActionProps, BadgeDotProps, BadgeGroupProps, BadgeIconProps, BadgeLabels, BadgeRootProps, } from "./badge/Badge";
9
+ export type { BadgeActionProps, BadgeDotProps, BadgeGroupLabels, BadgeGroupProps, BadgeIconProps, BadgeLabels, BadgeRootProps, } from "./badge/Badge";
10
10
  export { Badge } from "./badge/Badge";
11
11
  export type { BannerActionsProps, BannerContentProps, BannerDescriptionProps, BannerIconProps, BannerLabels, BannerRootProps, BannerTitleProps, } from "./banner/Banner";
12
12
  export { Banner } from "./banner/Banner";
@@ -31,6 +31,10 @@ export type InputLabels = {
31
31
  strengthEasy: string;
32
32
  strengthMedium: string;
33
33
  strengthHard: string;
34
+ /** The error under a `strength` field below `minStrength` once a submit was refused, and the browser's validation message. */
35
+ strengthTooWeak: string;
36
+ /** Spoken when the field is `valid`: the check mark itself is silent. */
37
+ valid: string;
34
38
  };
35
39
  export declare const INPUT_LABELS: InputLabels;
36
40
  /**
@@ -47,6 +51,10 @@ export type InputRootProps = FieldRootDomProps & FieldFocusRingProps & {
47
51
  * Danger inset ring on the field, `aria-invalid` on the input. A non-empty `error` implies it.
48
52
  */
49
53
  invalid?: boolean;
54
+ /**
55
+ * A confirmed value (a matching repeat, a verified code): a success ring and a drawn check at the field's end, `labels.valid` spoken. `invalid` wins. Pass `false` too: the live region exists only with it.
56
+ */
57
+ valid?: boolean;
50
58
  /**
51
59
  * Label above the field, rendered as `<label htmlFor>`. Without it, give `Input.Field` an `aria-label`.
52
60
  */
@@ -88,9 +96,13 @@ export type InputRootProps = FieldRootDomProps & FieldFocusRingProps & {
88
96
  */
89
97
  strength?: boolean;
90
98
  /**
91
- * Replaces the kit's estimate of `strength`. Return 0 for empty, 1 weak … 4 hard. A hint for the person typing, not a security check.
99
+ * Replaces the kit's estimate of `strength`. Return 0 for empty, 1 weak … 4 hard.
92
100
  */
93
101
  getStrength?: (value: string) => PasswordStrength;
102
+ /**
103
+ * The policy of `strength`: below this level the meter turns danger and the form refuses to submit (`setCustomValidity`), then shows `labels.strengthTooWeak` as the error.
104
+ */
105
+ minStrength?: Exclude<PasswordStrength, 0>;
94
106
  /**
95
107
  * Inline save: fires with a changed value on blur and Enter; Escape reverts. Return a Promise: the field shows a spinner and stays editable; a rejection restores the value — show why through `error`.
96
108
  */
@@ -116,7 +128,7 @@ export type InputRootProps = FieldRootDomProps & FieldFocusRingProps & {
116
128
  */
117
129
  children: React.ReactNode;
118
130
  };
119
- declare function InputRoot({ size: sizeProp, invalid, focusRing, label, required, optional, hint, hintTone, error, counter, reserveSupportRow, id, strength, getStrength, onCommit, suggestions, closeOnEscape, closeOnOutsideClick, labels: labelsProp, children, className, ...rest }: InputRootProps): import("react/jsx-runtime").JSX.Element;
131
+ declare function InputRoot({ size: sizeProp, invalid, valid, focusRing, label, required, optional, hint, hintTone, error, counter, reserveSupportRow, id, strength, getStrength, minStrength, onCommit, suggestions, closeOnEscape, closeOnOutsideClick, labels: labelsProp, children, className, ...rest }: InputRootProps): import("react/jsx-runtime").JSX.Element;
120
132
  declare namespace InputRoot {
121
133
  var displayName: string;
122
134
  }
@@ -139,7 +151,7 @@ export type InputFieldProps = Omit<React.InputHTMLAttributes<HTMLInputElement>,
139
151
  ref?: React.Ref<HTMLInputElement>;
140
152
  };
141
153
  /** The `<input>`; its id comes from `Input.Root` so the label, hint and error stay linked. */
142
- declare function InputField({ className, "aria-describedby": ariaDescribedBy, required, disabled: disabledProp, type, onChange, onValueChange, onFocus, onBlur, onKeyDown, onClick, ref, ...rest }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
154
+ declare function InputField({ className, "aria-describedby": ariaDescribedBy, required, disabled: disabledProp, type, onChange, onValueChange, onFocus, onBlur, onKeyDown, onClick, onInvalid, ref, ...rest }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
143
155
  declare namespace InputField {
144
156
  var displayName: string;
145
157
  }
@@ -26,10 +26,13 @@ export type MessageActionsProps = React.HTMLAttributes<HTMLDivElement> & {
26
26
  };
27
27
  /**
28
28
  * A row of a bot's inline keyboard under the message: `Button.Root` children sharing the row
29
- * equally, at the message's width (the bubble widens to the keyboard when it is wider). Several
30
- * make several rows, in the order written. A row too narrow for its buttons wraps them.
29
+ * equally on one line (a label too long ellipsizes), at the message's width (the bubble widens to
30
+ * the keyboard when it is wider). Several make several rows, in the order written; the last row's
31
+ * outer corners follow the bubble's radius. A key is `soft` `neutral` unless it sets its own
32
+ * `variant` / `tone`; a link (`asChild` around an `<a href>`) carries the link mark at its
33
+ * top-end corner; an `onClick` that returns a promise keeps its key loading until it settles.
31
34
  */
32
- declare function MessageActions({ className, ...rest }: MessageActionsProps): import("react/jsx-runtime").JSX.Element;
35
+ declare function MessageActions({ className, children, ...rest }: MessageActionsProps): import("react/jsx-runtime").JSX.Element;
33
36
  declare namespace MessageActions {
34
37
  var displayName: string;
35
38
  }
@@ -73,6 +73,10 @@ export type SegmentedControlItemProps = Omit<React.ButtonHTMLAttributes<HTMLButt
73
73
  * Palette hue: a dot before the content; while selected the thumb takes a soft fill of the hue with a ring of it.
74
74
  */
75
75
  color?: PaletteColor;
76
+ /**
77
+ * The single child (a router `<Link>`) becomes the segment. A row of links is a navigation: links in the Tab order, the one matching `value` current, no arrow keys.
78
+ */
79
+ asChild?: boolean;
76
80
  /**
77
81
  * Text, `Icon`, `Label`, `Count`, `Description`. Only an icon → square segment; give it `aria-label`.
78
82
  */
@@ -83,7 +87,7 @@ export type SegmentedControlItemProps = Omit<React.ButtonHTMLAttributes<HTMLButt
83
87
  className?: string;
84
88
  ref?: React.Ref<HTMLButtonElement>;
85
89
  };
86
- declare function SegmentedControlItem({ value, disabled, color, children, className, onClick, ref, ...rest }: SegmentedControlItemProps): import("react/jsx-runtime").JSX.Element;
90
+ declare function SegmentedControlItem({ value, disabled, color, asChild, children, className, onClick, ref, ...rest }: SegmentedControlItemProps): import("react/jsx-runtime").JSX.Element;
87
91
  declare namespace SegmentedControlItem {
88
92
  var displayName: string;
89
93
  }
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type DatepickerPanelProps } from "../datepicker/Datepicker";
2
3
  import { type ControlSize } from "../../internal/states";
3
4
  import { type SmartFilterValue } from "./model";
4
5
  export type { SmartFilterFieldValue, SmartFilterMode, SmartFilterRange, SmartFilterSelection, SmartFilterValue, } from "./model";
@@ -40,9 +41,12 @@ export type SmartFilterRangeField = SmartFilterFieldBase & {
40
41
  /** Display of a bound in the chip («1 000 ₽»). Default: Russian digit groups. */
41
42
  formatValue?: (value: number) => string;
42
43
  };
44
+ /** The Datepicker options a `date-range` field passes to its calendar. */
45
+ type SmartFilterCalendar = Pick<DatepickerPanelProps, "months" | "presets" | "prompt" | "footer" | "withTime" | "isDayDisabled" | "disableFuture" | "today" | "locale" | "weekStartsOn" | "labels">;
43
46
  /** A period picked in the kit Datepicker (`mode="range"`). */
44
47
  export type SmartFilterDateRangeField = SmartFilterFieldBase & {
45
48
  kind: "date-range";
49
+ calendar?: SmartFilterCalendar;
46
50
  };
47
51
  export type SmartFilterField = SmartFilterOptionsField | SmartFilterRangeField | SmartFilterDateRangeField;
48
52
  /** System strings. `{query}`, `{value}`, `{field}`, `{fields}`, `{count}` are substituted. */
@@ -24,6 +24,7 @@ export type SpinnerProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children
24
24
  * Indeterminate loading indicator: the kit ring (`internal/ring`) with the share unknown — a quarter
25
25
  * arc turning on a faint track, at the line weight. A `role="status"` region with `labels.loading`
26
26
  * for screen readers; pass `aria-hidden` when the host already says it is busy. It fades itself in
27
- * (`enterMotion.enterFade`), so a host that shows it conditionally needs no motion of its own.
27
+ * (`enterMotion.enterFade`) when it appears on a shown host, so a host that shows it conditionally
28
+ * needs no motion of its own; one that mounts with its page is just there.
28
29
  */
29
- export declare function Spinner({ size: sizeProp, tone, labels: labelsProp, className, ...rest }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function Spinner({ size: sizeProp, tone, labels: labelsProp, className, ref, ...rest }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
@@ -151,9 +151,18 @@ export type TabsPanelProps = React.HTMLAttributes<HTMLDivElement> & {
151
151
  * Tab value this panel belongs to.
152
152
  */
153
153
  value: string;
154
+ /**
155
+ * Once opened, the panel stays mounted and `hidden` while another tab is active: its data, form draft and scroll survive a switch. A panel never opened is not mounted.
156
+ */
157
+ keepMounted?: boolean;
154
158
  ref?: React.Ref<HTMLDivElement>;
155
159
  };
156
- declare function TabsPanel({ value, ...rest }: TabsPanelProps): import("react/jsx-runtime").JSX.Element | null;
160
+ /**
161
+ * Mounted while its tab is active. With `keepMounted` a panel stays in the document once its tab
162
+ * has been opened: hidden (out of the layout, the tab order and the accessibility tree) while
163
+ * another tab is active, so its state — fetched data, a draft, a scroll position — survives.
164
+ */
165
+ declare function TabsPanel({ value, keepMounted, ...rest }: TabsPanelProps): import("react/jsx-runtime").JSX.Element | null;
157
166
  declare namespace TabsPanel {
158
167
  var displayName: string;
159
168
  }
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type FocusStart } from "../internal/overlay/focus";
2
3
  import { type DismissReason, type LayerEntry } from "../internal/overlay/layerStack";
3
4
  type UseModalLayerOptions = {
4
5
  open: boolean;
@@ -8,6 +9,11 @@ type UseModalLayerOptions = {
8
9
  closeOnOutsideClick: boolean;
9
10
  /** A dismiss the options allow: Escape (`escape`) or a click on the scrim (`scrim`). */
10
11
  onDismiss: (reason: DismissReason) => void;
12
+ /**
13
+ * Where focus lands on open when nothing inside asks for it (`autoFocus`, `[data-autofocus]`):
14
+ * the first tab stop (default), or the panel itself.
15
+ */
16
+ focusStart?: FocusStart;
11
17
  };
12
18
  type ModalLayer<T extends HTMLElement> = {
13
19
  /** Attach to the panel (`role="dialog"`): the trap container and the inside of the layer. */
@@ -18,13 +24,14 @@ type ModalLayer<T extends HTMLElement> = {
18
24
  /**
19
25
  * The mechanics of a modal layer — Modal, Drawer, Sheet, ConfirmDialog, CommandMenu, MediaViewer,
20
26
  * the off-canvas Sidebar — in one fixed order: the rest of the page becomes inert, focus moves in
21
- * and Tab is trapped, document scroll locks, and the layer joins the stack with scrim (`click`)
22
- * dismissal, filtered by `closeOnEscape` / `closeOnOutsideClick` before `onDismiss` hears of it. On close the page is
23
- * restored first, then focus returns to the opener, captured at the open transition — the control
24
- * that was pressed (Safari does not focus a clicked button), else the focused element; a layer a
25
- * pointer opened returns focus without the focus ring. Focus always returns, also after a scrim
26
- * click: the page behind was inert, so the opener is the only place to continue from (foundation
27
- * §8).
27
+ * (the first tab stop, or the panel itself with `focusStart: "container"`; without the focus ring
28
+ * when a pointer opened the layer) and Tab is trapped, document scroll locks, and the layer joins
29
+ * the stack with scrim (`click`) dismissal, filtered by `closeOnEscape` / `closeOnOutsideClick`
30
+ * before `onDismiss` hears of it. On close the page is restored first, then focus returns to the
31
+ * opener, captured at the open transition — the control that was pressed (Safari does not focus a
32
+ * clicked button), else the focused element; a layer a pointer opened returns focus without the
33
+ * focus ring. Focus always returns, also after a scrim click: the page behind was inert, so the
34
+ * opener is the only place to continue from (foundation §8).
28
35
  */
29
- export declare function useModalLayer<T extends HTMLElement = HTMLElement>({ open, closeOnEscape, closeOnOutsideClick, onDismiss, }: UseModalLayerOptions): ModalLayer<T>;
36
+ export declare function useModalLayer<T extends HTMLElement = HTMLElement>({ open, closeOnEscape, closeOnOutsideClick, onDismiss, focusStart, }: UseModalLayerOptions): ModalLayer<T>;
30
37
  export {};