@danxbot/ui 6.0.3 → 6.0.5

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.
@@ -0,0 +1,31 @@
1
+ export type PaginationBarMode = "numbered" | "simple";
2
+ export interface PaginationBarProps {
3
+ /** 1-based current page. */
4
+ page: number;
5
+ /** Rows per page. Should be one of `pageSizeOptions`. */
6
+ pageSize: number;
7
+ /** The sizes offered in the per-page popover, in the order shown. */
8
+ pageSizeOptions: readonly number[];
9
+ /** Total matching items across every page — drives the range text and page count. */
10
+ total: number;
11
+ onPageChange: (page: number) => void;
12
+ onPageSizeChange: (size: number) => void;
13
+ /**
14
+ * `"simple"`: ‹ Page N of M › — fixed width regardless of how many pages
15
+ * exist, and the shape guaranteed to fit a narrow bar unaided.
16
+ * `"numbered"`: the numbered-window `Pagination` control, for a list long
17
+ * enough that jumping past adjacent pages is worth the room it costs.
18
+ * @default "simple"
19
+ */
20
+ mode?: PaginationBarMode;
21
+ /** Names the bar for assistive tech, e.g. "Cards" or "Dispatches". */
22
+ label: string;
23
+ className?: string;
24
+ }
25
+ /**
26
+ * Range text + a popover-based per-page picker + page navigation, always on
27
+ * one row. See the file banner above for the reasoning behind the popover
28
+ * and the `mode` split — this replaces both of gpt-manager's pre-existing,
29
+ * differently-shaped hand-rolled footers.
30
+ */
31
+ export declare function PaginationBar({ page, pageSize, pageSizeOptions, total, onPageChange, onPageSizeChange, mode, label, className, }: PaginationBarProps): import("react").JSX.Element;
@@ -28,6 +28,18 @@ declare const bar: import("tailwind-variants").TVReturnType<{
28
28
  danger: {
29
29
  indicator: string;
30
30
  };
31
+ /**
32
+ * Neutral/gray — for a segment or bar that is neither good nor bad, just
33
+ * not-yet-decided (a "pending" quality gate, a step nobody has started).
34
+ * `--color-tertiary` is already the closest token to the old Vue app's
35
+ * pending-gate gray (`#64748b`): in the light theme it resolves to
36
+ * `--slate-500`, which IS `#64748b` (see tokens.css / contrast.css) —
37
+ * so this reuses an existing semantic slot instead of minting a new
38
+ * `--color-neutral` custom property for one tone.
39
+ */
40
+ neutral: {
41
+ indicator: string;
42
+ };
31
43
  };
32
44
  }, {
33
45
  root: string;
@@ -64,6 +76,18 @@ declare const bar: import("tailwind-variants").TVReturnType<{
64
76
  danger: {
65
77
  indicator: string;
66
78
  };
79
+ /**
80
+ * Neutral/gray — for a segment or bar that is neither good nor bad, just
81
+ * not-yet-decided (a "pending" quality gate, a step nobody has started).
82
+ * `--color-tertiary` is already the closest token to the old Vue app's
83
+ * pending-gate gray (`#64748b`): in the light theme it resolves to
84
+ * `--slate-500`, which IS `#64748b` (see tokens.css / contrast.css) —
85
+ * so this reuses an existing semantic slot instead of minting a new
86
+ * `--color-neutral` custom property for one tone.
87
+ */
88
+ neutral: {
89
+ indicator: string;
90
+ };
67
91
  };
68
92
  }, {
69
93
  root: string;
@@ -100,6 +124,18 @@ declare const bar: import("tailwind-variants").TVReturnType<{
100
124
  danger: {
101
125
  indicator: string;
102
126
  };
127
+ /**
128
+ * Neutral/gray — for a segment or bar that is neither good nor bad, just
129
+ * not-yet-decided (a "pending" quality gate, a step nobody has started).
130
+ * `--color-tertiary` is already the closest token to the old Vue app's
131
+ * pending-gate gray (`#64748b`): in the light theme it resolves to
132
+ * `--slate-500`, which IS `#64748b` (see tokens.css / contrast.css) —
133
+ * so this reuses an existing semantic slot instead of minting a new
134
+ * `--color-neutral` custom property for one tone.
135
+ */
136
+ neutral: {
137
+ indicator: string;
138
+ };
103
139
  };
104
140
  }, {
105
141
  root: string;
@@ -134,6 +170,15 @@ export interface MeterProps extends VariantProps<typeof bar> {
134
170
  export declare function Meter({ value, min, max, label, format, showValue, size, tone, className, ref, }: MeterProps): import("react").JSX.Element;
135
171
  declare const ring: import("tailwind-variants").TVReturnType<{
136
172
  size: {
173
+ /**
174
+ * Icon-sized — a single arc beside a chevron or a percentage in a card
175
+ * row (24px), where even `sm` (40px) is taller than the row itself.
176
+ * Matches the private `ContextDial` this size replaces in
177
+ * `chat/ContextMeter.tsx` (`size-3.5`) pixel-for-pixel. Always pair with
178
+ * `showValue={false}`: two digits do not fit a 14px circle, and nothing
179
+ * clips or shrinks them automatically if you leave the number on.
180
+ */
181
+ xs: "size-3.5";
137
182
  sm: "size-10";
138
183
  md: "size-16";
139
184
  lg: "size-24";
@@ -148,6 +193,15 @@ declare const ring: import("tailwind-variants").TVReturnType<{
148
193
  };
149
194
  }, undefined, "relative grid shrink-0 place-items-center", {
150
195
  size: {
196
+ /**
197
+ * Icon-sized — a single arc beside a chevron or a percentage in a card
198
+ * row (24px), where even `sm` (40px) is taller than the row itself.
199
+ * Matches the private `ContextDial` this size replaces in
200
+ * `chat/ContextMeter.tsx` (`size-3.5`) pixel-for-pixel. Always pair with
201
+ * `showValue={false}`: two digits do not fit a 14px circle, and nothing
202
+ * clips or shrinks them automatically if you leave the number on.
203
+ */
204
+ xs: "size-3.5";
151
205
  sm: "size-10";
152
206
  md: "size-16";
153
207
  lg: "size-24";
@@ -162,6 +216,15 @@ declare const ring: import("tailwind-variants").TVReturnType<{
162
216
  };
163
217
  }, undefined, import("tailwind-variants").TVReturnTypeLike<{
164
218
  size: {
219
+ /**
220
+ * Icon-sized — a single arc beside a chevron or a percentage in a card
221
+ * row (24px), where even `sm` (40px) is taller than the row itself.
222
+ * Matches the private `ContextDial` this size replaces in
223
+ * `chat/ContextMeter.tsx` (`size-3.5`) pixel-for-pixel. Always pair with
224
+ * `showValue={false}`: two digits do not fit a 14px circle, and nothing
225
+ * clips or shrinks them automatically if you leave the number on.
226
+ */
227
+ xs: "size-3.5";
165
228
  sm: "size-10";
166
229
  md: "size-16";
167
230
  lg: "size-24";
@@ -39,6 +39,22 @@ export interface DataTableProps<TData> {
39
39
  * never connected to anything. This is that connection.
40
40
  */
41
41
  pageSize?: number;
42
+ /**
43
+ * The sizes offered by the footer's per-page picker. Defaults to
44
+ * `[10, 25, 50, 100]` (with `pageSize` folded in if it names a value not
45
+ * already on that list), so a caller that only ever set `pageSize` still
46
+ * gets a real picker rather than none at all — DX-2947 added this menu to
47
+ * every paginated table, not as an opt-in.
48
+ */
49
+ pageSizeOptions?: readonly number[];
50
+ /**
51
+ * Told when the footer's per-page picker changes the size, in addition to
52
+ * the table re-paginating itself immediately. Pagination stays entirely
53
+ * internal either way — this is for a caller that wants to remember the
54
+ * choice (e.g. persist it), not something that has to be wired for paging
55
+ * to work.
56
+ */
57
+ onPageSizeChange?: (size: number) => void;
42
58
  emptyState?: ReactNode;
43
59
  /**
44
60
  * An extra class for the rows a consumer needs to mark — "this figure could
@@ -79,7 +95,7 @@ export interface DataTableProps<TData> {
79
95
  className?: string;
80
96
  getRowId?: (row: TData, index: number) => string;
81
97
  }
82
- export declare function DataTable<TData>({ data, columns, density, selectable, maxHeight, zebra, loading, refreshing, loadingRows, pageSize, emptyState, getRowClassName, onRowClick, toolbar, className, getRowId, }: DataTableProps<TData>): import("react").JSX.Element;
98
+ export declare function DataTable<TData>({ data, columns, density, selectable, maxHeight, zebra, loading, refreshing, loadingRows, pageSize, pageSizeOptions, onPageSizeChange, emptyState, getRowClassName, onRowClick, toolbar, className, getRowId, }: DataTableProps<TData>): import("react").JSX.Element;
83
99
  export declare function TableEmptyState({ icon, title, description, action, }: {
84
100
  icon?: ReactNode;
85
101
  title?: string;
@@ -47,6 +47,7 @@ export { RecordCard, RecordCardHandle, RecordCardEyebrow, RecordCardTitle, Recor
47
47
  export { Tabs, TabList, Tab, TabPanel, type TabsProps, type TabListProps, type TabProps, type TabPanelProps, } from "./components/Tabs";
48
48
  export { Accordion, AccordionItem, type AccordionProps, type AccordionItemProps, } from "./components/Accordion";
49
49
  export { Breadcrumb, Pagination, type BreadcrumbProps, type PaginationProps, type Crumb, } from "./components/Navigation";
50
+ export { PaginationBar, type PaginationBarProps, type PaginationBarMode, } from "./components/PaginationBar";
50
51
  export { Stepper, stepStatus, stepperProgress, advanceBlockReason, assertSteps, type StepperProps, type Step, type StepStatus, type StepperProgress, } from "./components/stepper";
51
52
  export { StatusChecklist, tallyChecklist, type StatusChecklistProps, type ChecklistItem, type ChecklistState, type ChecklistTally, } from "./components/checklist";
52
53
  export { Toggle, ToggleGroup, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarSeparator, type ToggleProps, type ToggleGroupProps, type ToolbarProps, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarInputProps, } from "./components/Toggle";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "6.0.3",
3
+ "version": "6.0.5",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",