@ngrok/mantle 0.77.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +63 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +4 -1
- package/dist/alert-dialog.d.ts +19 -26
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +16 -24
- package/dist/alert.js +1 -1
- package/dist/{anchor-BtgEJoPN.js → anchor-C_tjSVy6.js} +1 -1
- package/dist/anchor.d.ts +3 -4
- package/dist/anchor.js +1 -1
- package/dist/{as-child-uN_018tj.d.ts → as-child-CYEVu1WY.d.ts} +0 -7
- package/dist/badge.d.ts +5 -56
- package/dist/badge.js +1 -1
- package/dist/breadcrumb.d.ts +212 -0
- package/dist/breadcrumb.js +1 -0
- package/dist/browser-only.d.ts +2 -6
- package/dist/{button-CERx95KE.js → button-5t6-JS_I.js} +1 -1
- package/dist/button-AS5Ir3DE.js +1 -0
- package/dist/{button-mfYak6Rx.d.ts → button-Bw9MpShl.d.ts} +26 -8
- package/dist/button.d.ts +5 -4
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +2 -8
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +8 -8
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +147 -0
- package/dist/centered-layout.js +1 -0
- package/dist/checkbox-DJ2xl7Rc.js +1 -0
- package/dist/checkbox.d.ts +9 -11
- package/dist/checkbox.js +1 -1
- package/dist/{choice-D6S38dPs.js → choice-DOdyNzFC.js} +1 -1
- package/dist/choice.d.ts +16 -14
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +5 -17
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +4 -5
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +40 -19
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +60 -38
- package/dist/command.js +1 -1
- package/dist/cx-IiQEAKf5.js +1 -0
- package/dist/cx.js +1 -1
- package/dist/data-slot-CChfb_cv.d.ts +17 -0
- package/dist/data-table.d.ts +45 -131
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +7 -7
- package/dist/description-list.js +1 -1
- package/dist/{dialog-uyJcNks7.js → dialog-DVDFVT_-.js} +1 -1
- package/dist/dialog.d.ts +155 -48
- package/dist/dialog.js +1 -1
- package/dist/{direction-CcTY0FmA.d.ts → direction-BjU0bPST.d.ts} +1 -1
- package/dist/{dropdown-menu-OEuW4GLp.js → dropdown-menu-ByUQkAvJ.js} +1 -1
- package/dist/{dropdown-menu-CADgs9gz.d.ts → dropdown-menu-DT30TQzL.d.ts} +21 -24
- package/dist/dropdown-menu.d.ts +2 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +133 -53
- package/dist/empty.js +1 -1
- package/dist/{field-context-4k1kI7Bo.js → field-context-BR01g789.js} +1 -1
- package/dist/field.d.ts +24 -36
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +2 -9
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +13 -15
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +34 -14
- package/dist/hover-card.js +1 -1
- package/dist/icon-CDtYjF_H.js +1 -0
- package/dist/{icon-n49kOh4_.d.ts → icon-Cevjo93X.d.ts} +2 -3
- package/dist/{icon-button-DiX9iZ9n.js → icon-button-CxVsZ2N1.js} +1 -1
- package/dist/{icon-button-D7hs6bX2.d.ts → icon-button-DuRSCsPh.d.ts} +5 -6
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +7 -19
- package/dist/icons.js +1 -1
- package/dist/{in-view-bItE1fkG.d.ts → in-view-nkSOdED2.d.ts} +1 -6
- package/dist/index-BnI3OppC.d.ts +1 -0
- package/dist/{index-CTU6apE6.d.ts → index-CDwfBOAA.d.ts} +5 -4
- package/dist/{index-Bed_XLWa.d.ts → index-D47aqlpz.d.ts} +3 -2
- package/dist/index-Rv8RL7xy.d.ts +25 -0
- package/dist/{input-B3TS9yAP.js → input-Ct1YOqSy.js} +1 -1
- package/dist/input.d.ts +10 -11
- package/dist/input.js +1 -1
- package/dist/{kbd-D6k4Dnrf.js → kbd-K8iaZ-Ti.js} +1 -1
- package/dist/kbd.d.ts +3 -8
- package/dist/kbd.js +1 -1
- package/dist/{label-BLXfnQmn.js → label-BMlHW_2D.js} +1 -1
- package/dist/{label-PY0qM0G5.d.ts → label-v2-bv98k.d.ts} +1 -1
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/list.d.ts +18 -60
- package/dist/list.js +1 -1
- package/dist/llms.txt +4 -1
- package/dist/main.d.ts +4 -27
- package/dist/main.js +1 -1
- package/dist/mantle.css +6 -6
- package/dist/media-object.d.ts +6 -7
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +80 -33
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +7 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +11 -22
- package/dist/pagination.js +1 -1
- package/dist/{popover-Bq52EC7X.js → popover-D5WxxnBY.js} +1 -1
- package/dist/popover.d.ts +6 -7
- package/dist/popover.js +1 -1
- package/dist/{primitive-FoWela9a.d.ts → primitive-C64-m48O.d.ts} +0 -1
- package/dist/{primitive-BuVqb6zf.js → primitive-wm7Wk-gy.js} +1 -1
- package/dist/progress.d.ts +55 -46
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +10 -9
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +71 -60
- package/dist/radio-group.js +1 -1
- package/dist/{resolve-pre-rendered-props-DxJ9-DAl.d.ts → resolve-pre-rendered-props-B6OlZrSI.d.ts} +13 -26
- package/dist/{resolve-pre-rendered-props-DwIF_M_K.js → resolve-pre-rendered-props-C3e5Auo3.js} +1 -1
- package/dist/sandboxed-on-click.d.ts +4 -8
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/{select-BUGOJMER.d.ts → select-Bwt2YduR.d.ts} +11 -12
- package/dist/{select-Bxq_N-_o.js → select-D-5u0Blc.js} +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +160 -146
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-CqohKk4z.js → separator-kBnnv3Cw.js} +1 -1
- package/dist/separator.d.ts +6 -37
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +231 -47
- package/dist/sheet.js +1 -1
- package/dist/sizes-Dje_rwKc.d.ts +29 -0
- package/dist/skeleton-Bu3tgNcW.js +1 -0
- package/dist/skeleton.d.ts +2 -2
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +4 -34
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +2 -21
- package/dist/slider.js +1 -1
- package/dist/slot-DmPrjM7N.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +20 -12
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-f6ToFLH0.d.ts → svg-only-BFeFS1aa.d.ts} +2 -3
- package/dist/{svg-only-CSOaF1tL.js → svg-only-DDx6FtJd.js} +1 -1
- package/dist/switch.d.ts +4 -5
- package/dist/switch.js +1 -1
- package/dist/{table-CAitdL78.js → table-CPH2md2-.js} +1 -1
- package/dist/{table-BWD9IlIN.d.ts → table-CwFHXC-G.d.ts} +10 -10
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +29 -15
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -3
- package/dist/text-area.js +1 -1
- package/dist/theme-D8kZCOzM.js +1 -0
- package/dist/theme-provider-Djj_jBo6.js +1 -0
- package/dist/theme-switcher.d.ts +45 -0
- package/dist/theme-switcher.js +1 -0
- package/dist/theme.d.ts +15 -101
- package/dist/theme.js +1 -1
- package/dist/{toast-CZBWjXcP.js → toast-RkhbliFh.js} +1 -1
- package/dist/toast.d.ts +13 -37
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +10 -44
- package/dist/tooltip.js +1 -1
- package/dist/{types-CTam1uIW.d.ts → types-C19IR7jf.d.ts} +1 -0
- package/dist/{types-BvUzforF.d.ts → types-D1RY5Tcj.d.ts} +0 -1
- package/dist/types.d.ts +3 -3
- package/dist/use-prefers-reduced-motion-CagaNRgm.js +1 -0
- package/dist/utils.d.ts +2 -3
- package/dist/{validation-xyX_6kph.d.ts → validation-7QeiTFwl.d.ts} +3 -12
- package/dist/{validation-DCyx-ceH.js → validation-Bpptk_9t.js} +1 -1
- package/dist/{virtual-PBNiHjMK.js → virtual-DZMBu7Ch.js} +1 -1
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/dist/{with-style-props-CyImx7vd.d.ts → with-style-props-Dq5Vntqy.d.ts} +0 -1
- package/package.json +17 -14
- package/dist/button-C9GW9nAr.js +0 -1
- package/dist/checkbox-Apow0ipK.js +0 -1
- package/dist/cx-C1UYP5We.js +0 -1
- package/dist/icon-SUx16Sl3.js +0 -1
- package/dist/index-CJbKEKr2.d.ts +0 -20
- package/dist/slot-DT_E5BQx.js +0 -1
- package/dist/theme-provider-C5XYi2-H.js +0 -1
- package/dist/use-prefers-reduced-motion-DBqNw1wB.js +0 -1
package/dist/data-table.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as Button } from "./button-
|
|
2
|
-
import { t as IconButton } from "./icon-button-
|
|
3
|
-
import { s as SortingMode } from "./direction-
|
|
4
|
-
import { t as Table$1 } from "./table-
|
|
1
|
+
import { t as Button } from "./button-Bw9MpShl.js";
|
|
2
|
+
import { t as IconButton } from "./icon-button-DuRSCsPh.js";
|
|
3
|
+
import { s as SortingMode } from "./direction-BjU0bPST.js";
|
|
4
|
+
import { t as Table$1 } from "./table-CwFHXC-G.js";
|
|
5
5
|
import { ComponentProps, ReactNode } from "react";
|
|
6
6
|
import { HeaderContext, Row, Table } from "@tanstack/react-table";
|
|
7
7
|
export * from "@tanstack/react-table";
|
|
8
|
-
|
|
9
8
|
//#region src/components/data-table/types.d.ts
|
|
10
9
|
declare const sortDirections: readonly ["asc", "desc", "unsorted"];
|
|
11
10
|
type SortDirection = (typeof sortDirections)[number];
|
|
@@ -24,7 +23,7 @@ type DataTableProps<TData> = ComponentProps<typeof Table$1.Root> & {
|
|
|
24
23
|
* any sorting / filtering / pagination state — the wrapper components read
|
|
25
24
|
* from it.
|
|
26
25
|
*
|
|
27
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableroot
|
|
26
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableroot
|
|
28
27
|
*
|
|
29
28
|
* @example
|
|
30
29
|
* ```tsx
|
|
@@ -62,14 +61,7 @@ type DataTableProps<TData> = ComponentProps<typeof Table$1.Root> & {
|
|
|
62
61
|
* }
|
|
63
62
|
* ```
|
|
64
63
|
*/
|
|
65
|
-
declare function Root<TData>({
|
|
66
|
-
children,
|
|
67
|
-
table,
|
|
68
|
-
...props
|
|
69
|
-
}: DataTableProps<TData>): import("react").JSX.Element;
|
|
70
|
-
declare namespace Root {
|
|
71
|
-
var displayName: string;
|
|
72
|
-
}
|
|
64
|
+
declare function Root<TData>({ children, table, ...props }: DataTableProps<TData>): import("react").JSX.Element;
|
|
73
65
|
type DataTableHeaderSortButtonProps<TData, TValue> = Omit<ComponentProps<typeof Button>, "icon"> & Pick<HeaderContext<TData, TValue>, "column"> & ({
|
|
74
66
|
/**
|
|
75
67
|
* Disable sorting for this column.
|
|
@@ -110,7 +102,7 @@ type DataTableHeaderSortButtonProps<TData, TValue> = Omit<ComponentProps<typeof
|
|
|
110
102
|
* For right-aligned numeric columns, pass `className="justify-end"` and
|
|
111
103
|
* `iconPlacement="start"` so the sort icon stays paired with the label.
|
|
112
104
|
*
|
|
113
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableheadersortbutton
|
|
105
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableheadersortbutton
|
|
114
106
|
*
|
|
115
107
|
* @example
|
|
116
108
|
* ```tsx
|
|
@@ -127,27 +119,14 @@ type DataTableHeaderSortButtonProps<TData, TValue> = Omit<ComponentProps<typeof
|
|
|
127
119
|
* });
|
|
128
120
|
* ```
|
|
129
121
|
*/
|
|
130
|
-
declare function HeaderSortButton<TData, TValue>({
|
|
131
|
-
children,
|
|
132
|
-
className,
|
|
133
|
-
column,
|
|
134
|
-
disableSorting,
|
|
135
|
-
iconPlacement,
|
|
136
|
-
sortingMode,
|
|
137
|
-
sortIcon: propSortIcon,
|
|
138
|
-
onClick,
|
|
139
|
-
...props
|
|
140
|
-
}: DataTableHeaderSortButtonProps<TData, TValue>): import("react").JSX.Element;
|
|
141
|
-
declare namespace HeaderSortButton {
|
|
142
|
-
var displayName: string;
|
|
143
|
-
}
|
|
122
|
+
declare function HeaderSortButton<TData, TValue>({ children, className, column, disableSorting, iconPlacement, sortingMode, sortIcon: propSortIcon, onClick, ...props }: DataTableHeaderSortButtonProps<TData, TValue>): import("react").JSX.Element;
|
|
144
123
|
type DataTableHeaderProps = ComponentProps<typeof Table$1.Header>;
|
|
145
124
|
/**
|
|
146
125
|
* A `<th>` optimized for header actions. Wrap each column's header content in
|
|
147
126
|
* this; for sortable columns, nest a `DataTable.HeaderSortButton` inside.
|
|
148
127
|
* Non-sortable columns can render plain text.
|
|
149
128
|
*
|
|
150
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableheader
|
|
129
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableheader
|
|
151
130
|
*
|
|
152
131
|
* @example
|
|
153
132
|
* ```tsx
|
|
@@ -164,21 +143,14 @@ type DataTableHeaderProps = ComponentProps<typeof Table$1.Header>;
|
|
|
164
143
|
* });
|
|
165
144
|
* ```
|
|
166
145
|
*/
|
|
167
|
-
declare function Header({
|
|
168
|
-
children,
|
|
169
|
-
className,
|
|
170
|
-
...props
|
|
171
|
-
}: DataTableHeaderProps): import("react").JSX.Element;
|
|
172
|
-
declare namespace Header {
|
|
173
|
-
var displayName: string;
|
|
174
|
-
}
|
|
146
|
+
declare function Header({ children, className, ...props }: DataTableHeaderProps): import("react").JSX.Element;
|
|
175
147
|
type DataTableHeadProps = Omit<ComponentProps<typeof Table$1.Head>, "children">;
|
|
176
148
|
/**
|
|
177
149
|
* The `<thead>` container that renders column headers automatically from
|
|
178
150
|
* `table.getHeaderGroups()`. Does not accept children — headers come from each
|
|
179
151
|
* column's `header` definition on the TanStack Table column config.
|
|
180
152
|
*
|
|
181
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablehead
|
|
153
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablehead
|
|
182
154
|
*
|
|
183
155
|
* @example
|
|
184
156
|
* ```tsx
|
|
@@ -196,9 +168,6 @@ type DataTableHeadProps = Omit<ComponentProps<typeof Table$1.Head>, "children">;
|
|
|
196
168
|
* ```
|
|
197
169
|
*/
|
|
198
170
|
declare function Head<TData>(props: DataTableHeadProps): import("react").JSX.Element;
|
|
199
|
-
declare namespace Head {
|
|
200
|
-
var displayName: string;
|
|
201
|
-
}
|
|
202
171
|
type DataTableRowProps<TData> = Omit<ComponentProps<typeof Table$1.Row>, "children"> & {
|
|
203
172
|
row: Row<TData>;
|
|
204
173
|
/**
|
|
@@ -228,7 +197,7 @@ type DataTableRowProps<TData> = Omit<ComponentProps<typeof Table$1.Row>, "childr
|
|
|
228
197
|
* holding the returned content. Pair it with a `DataTable.RowExpandButton` toggle
|
|
229
198
|
* and configure the table for expansion (`getExpandedRowModel`, `getRowCanExpand`).
|
|
230
199
|
*
|
|
231
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablerow
|
|
200
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablerow
|
|
232
201
|
*
|
|
233
202
|
* @example
|
|
234
203
|
* Clickable row navigating to a detail page:
|
|
@@ -265,15 +234,7 @@ type DataTableRowProps<TData> = Omit<ComponentProps<typeof Table$1.Row>, "childr
|
|
|
265
234
|
* ))}
|
|
266
235
|
* ```
|
|
267
236
|
*/
|
|
268
|
-
declare function Row$1<TData>({
|
|
269
|
-
className,
|
|
270
|
-
renderExpanded,
|
|
271
|
-
row,
|
|
272
|
-
...props
|
|
273
|
-
}: DataTableRowProps<TData>): import("react").JSX.Element;
|
|
274
|
-
declare namespace Row$1 {
|
|
275
|
-
var displayName: string;
|
|
276
|
-
}
|
|
237
|
+
declare function Row$1<TData>({ className, renderExpanded, row, ...props }: DataTableRowProps<TData>): import("react").JSX.Element;
|
|
277
238
|
type DataTableEmptyRowProps = ComponentProps<typeof Table$1.Row>;
|
|
278
239
|
/**
|
|
279
240
|
* An empty-state row that spans every column. Render this as the `else` branch
|
|
@@ -284,8 +245,8 @@ type DataTableEmptyRowProps = ComponentProps<typeof Table$1.Row>;
|
|
|
284
245
|
* Host an `Empty` for a real empty state, and branch on whether a filter is
|
|
285
246
|
* active so the user sees the right message (and a way out when filtered):
|
|
286
247
|
*
|
|
287
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableemptyrow
|
|
288
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
248
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableemptyrow
|
|
249
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
289
250
|
*
|
|
290
251
|
* @example
|
|
291
252
|
* ```tsx
|
|
@@ -332,13 +293,7 @@ type DataTableEmptyRowProps = ComponentProps<typeof Table$1.Row>;
|
|
|
332
293
|
* </DataTable.Body>
|
|
333
294
|
* ```
|
|
334
295
|
*/
|
|
335
|
-
declare function EmptyRow<TData>({
|
|
336
|
-
children,
|
|
337
|
-
...props
|
|
338
|
-
}: DataTableEmptyRowProps): import("react").JSX.Element;
|
|
339
|
-
declare namespace EmptyRow {
|
|
340
|
-
var displayName: string;
|
|
341
|
-
}
|
|
296
|
+
declare function EmptyRow<TData>({ children, ...props }: DataTableEmptyRowProps): import("react").JSX.Element;
|
|
342
297
|
type DataTableActionCellProps = ComponentProps<typeof Table$1.Cell>;
|
|
343
298
|
/**
|
|
344
299
|
* A sticky-right `<td>` for per-row action buttons (typically an `IconButton`
|
|
@@ -348,7 +303,7 @@ type DataTableActionCellProps = ComponentProps<typeof Table$1.Cell>;
|
|
|
348
303
|
* on this cell so clicks on action controls don't bubble and fire the row
|
|
349
304
|
* handler.
|
|
350
305
|
*
|
|
351
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableactioncell
|
|
306
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableactioncell
|
|
352
307
|
*
|
|
353
308
|
* @example
|
|
354
309
|
* ```tsx
|
|
@@ -363,21 +318,14 @@ type DataTableActionCellProps = ComponentProps<typeof Table$1.Cell>;
|
|
|
363
318
|
* });
|
|
364
319
|
* ```
|
|
365
320
|
*/
|
|
366
|
-
declare function ActionCell({
|
|
367
|
-
children,
|
|
368
|
-
className,
|
|
369
|
-
...props
|
|
370
|
-
}: DataTableActionCellProps): import("react").JSX.Element;
|
|
371
|
-
declare namespace ActionCell {
|
|
372
|
-
var displayName: string;
|
|
373
|
-
}
|
|
321
|
+
declare function ActionCell({ children, className, ...props }: DataTableActionCellProps): import("react").JSX.Element;
|
|
374
322
|
type DataTableActionHeaderProps = ComponentProps<typeof Table$1.Header>;
|
|
375
323
|
/**
|
|
376
324
|
* A sticky header cell that pairs with `DataTable.ActionCell`. Use this as the
|
|
377
325
|
* header for the action column so the pinned column visually aligns across the
|
|
378
326
|
* header and every body row when the table scrolls horizontally.
|
|
379
327
|
*
|
|
380
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableactionheader
|
|
328
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableactionheader
|
|
381
329
|
*
|
|
382
330
|
* @example
|
|
383
331
|
* ```tsx
|
|
@@ -388,14 +336,7 @@ type DataTableActionHeaderProps = ComponentProps<typeof Table$1.Header>;
|
|
|
388
336
|
* })
|
|
389
337
|
* ```
|
|
390
338
|
*/
|
|
391
|
-
declare function ActionHeader({
|
|
392
|
-
children,
|
|
393
|
-
className,
|
|
394
|
-
...props
|
|
395
|
-
}: DataTableActionHeaderProps): import("react").JSX.Element;
|
|
396
|
-
declare namespace ActionHeader {
|
|
397
|
-
var displayName: string;
|
|
398
|
-
}
|
|
339
|
+
declare function ActionHeader({ children, className, ...props }: DataTableActionHeaderProps): import("react").JSX.Element;
|
|
399
340
|
/**
|
|
400
341
|
* Compute the stable DOM `id` for a row's expanded detail row. Shared by
|
|
401
342
|
* `DataTable.RowExpandButton` (as its `aria-controls` target) and
|
|
@@ -432,7 +373,7 @@ type DataTableExpandHeaderProps = Omit<ComponentProps<typeof Table$1.Header>, "c
|
|
|
432
373
|
* column is announced to assistive tech while staying visually empty; pass
|
|
433
374
|
* `children` to render an "expand all" control instead.
|
|
434
375
|
*
|
|
435
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableexpandheader
|
|
376
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableexpandheader
|
|
436
377
|
*
|
|
437
378
|
* @example
|
|
438
379
|
* ```tsx
|
|
@@ -447,14 +388,7 @@ type DataTableExpandHeaderProps = Omit<ComponentProps<typeof Table$1.Header>, "c
|
|
|
447
388
|
* });
|
|
448
389
|
* ```
|
|
449
390
|
*/
|
|
450
|
-
declare function ExpandHeader({
|
|
451
|
-
children,
|
|
452
|
-
className,
|
|
453
|
-
...props
|
|
454
|
-
}: DataTableExpandHeaderProps): import("react").JSX.Element;
|
|
455
|
-
declare namespace ExpandHeader {
|
|
456
|
-
var displayName: string;
|
|
457
|
-
}
|
|
391
|
+
declare function ExpandHeader({ children, className, ...props }: DataTableExpandHeaderProps): import("react").JSX.Element;
|
|
458
392
|
type DataTableRowExpandButtonProps<TData> = Omit<ComponentProps<typeof IconButton>, "aria-controls" | "aria-expanded" | "icon" | "label"> & {
|
|
459
393
|
/**
|
|
460
394
|
* The TanStack Table row this button toggles. The table must be configured for
|
|
@@ -491,7 +425,7 @@ type DataTableRowExpandButtonProps<TData> = Omit<ComponentProps<typeof IconButto
|
|
|
491
425
|
* pass `onClick` to run side effects before the toggle (call
|
|
492
426
|
* `event.preventDefault()` to veto it).
|
|
493
427
|
*
|
|
494
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablerowexpandbutton
|
|
428
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablerowexpandbutton
|
|
495
429
|
*
|
|
496
430
|
* @example
|
|
497
431
|
* ```tsx
|
|
@@ -506,27 +440,16 @@ type DataTableRowExpandButtonProps<TData> = Omit<ComponentProps<typeof IconButto
|
|
|
506
440
|
* });
|
|
507
441
|
* ```
|
|
508
442
|
*/
|
|
509
|
-
declare function RowExpandButton<TData>({
|
|
510
|
-
appearance,
|
|
511
|
-
className,
|
|
512
|
-
collapseIcon,
|
|
513
|
-
expandIcon,
|
|
514
|
-
label,
|
|
515
|
-
onClick,
|
|
516
|
-
row,
|
|
517
|
-
size,
|
|
518
|
-
...props
|
|
519
|
-
}: DataTableRowExpandButtonProps<TData>): import("react").JSX.Element | null;
|
|
520
|
-
declare namespace RowExpandButton {
|
|
521
|
-
var displayName: string;
|
|
522
|
-
}
|
|
443
|
+
declare function RowExpandButton<TData>({ appearance, className, collapseIcon, expandIcon, label, onClick, row, size, ...props }: DataTableRowExpandButtonProps<TData>): import("react").JSX.Element | null;
|
|
523
444
|
type DataTableExpandedRowProps<TData> = Omit<ComponentProps<typeof Table$1.Row>, "children"> & {
|
|
524
|
-
/** The row whose detail panel this displays. */
|
|
445
|
+
/** The row whose detail panel this displays. */
|
|
446
|
+
row: Row<TData>;
|
|
525
447
|
/**
|
|
526
448
|
* Override the cell's `colSpan`. Defaults to the row's visible-cell count so
|
|
527
449
|
* the panel spans every visible column (visibility- and pinning-aware).
|
|
528
450
|
*/
|
|
529
|
-
colSpan?: number;
|
|
451
|
+
colSpan?: number;
|
|
452
|
+
/** The detail content rendered inside the full-width panel. */
|
|
530
453
|
children: ReactNode;
|
|
531
454
|
};
|
|
532
455
|
/**
|
|
@@ -546,7 +469,7 @@ type DataTableExpandedRowProps<TData> = Omit<ComponentProps<typeof Table$1.Row>,
|
|
|
546
469
|
* the parent data row reacts to hover). Exposes `data-expanded-content` for
|
|
547
470
|
* styling hooks.
|
|
548
471
|
*
|
|
549
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableexpandedrow
|
|
472
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableexpandedrow
|
|
550
473
|
*
|
|
551
474
|
* @example
|
|
552
475
|
* Render the row's underlying object as JSON (a common detail-panel use case).
|
|
@@ -574,16 +497,7 @@ type DataTableExpandedRowProps<TData> = Omit<ComponentProps<typeof Table$1.Row>,
|
|
|
574
497
|
* ))}
|
|
575
498
|
* ```
|
|
576
499
|
*/
|
|
577
|
-
declare function ExpandedRow<TData>({
|
|
578
|
-
children,
|
|
579
|
-
className,
|
|
580
|
-
colSpan,
|
|
581
|
-
row,
|
|
582
|
-
...props
|
|
583
|
-
}: DataTableExpandedRowProps<TData>): import("react").JSX.Element;
|
|
584
|
-
declare namespace ExpandedRow {
|
|
585
|
-
var displayName: string;
|
|
586
|
-
}
|
|
500
|
+
declare function ExpandedRow<TData>({ children, className, colSpan, row, ...props }: DataTableExpandedRowProps<TData>): import("react").JSX.Element;
|
|
587
501
|
/**
|
|
588
502
|
* Use `DataTable` for INTERACTIVE tabular data — sorting, filtering, pagination,
|
|
589
503
|
* row selection, and server-side or client-side data. Built on TanStack Table;
|
|
@@ -597,7 +511,7 @@ declare namespace ExpandedRow {
|
|
|
597
511
|
* For STATIC, layout-driven tables (read-only data dumps, simple key/value
|
|
598
512
|
* displays, plain markup tables with no interactivity), use `Table` instead.
|
|
599
513
|
*
|
|
600
|
-
* @see https://mantle.ngrok.com/components/data-table
|
|
514
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table
|
|
601
515
|
*
|
|
602
516
|
* @example
|
|
603
517
|
* Composition:
|
|
@@ -908,7 +822,7 @@ declare const DataTable: {
|
|
|
908
822
|
* from `@ngrok/mantle/data-table`) via the `table` prop — every other
|
|
909
823
|
* `DataTable.*` part reads from it through context.
|
|
910
824
|
*
|
|
911
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableroot
|
|
825
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableroot
|
|
912
826
|
*
|
|
913
827
|
* @example
|
|
914
828
|
* ```tsx
|
|
@@ -933,7 +847,7 @@ declare const DataTable: {
|
|
|
933
847
|
* If the row has `onClick`, stop propagation on this cell so clicks on action
|
|
934
848
|
* controls don't bubble up and fire the row handler.
|
|
935
849
|
*
|
|
936
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableactioncell
|
|
850
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableactioncell
|
|
937
851
|
*
|
|
938
852
|
* @example
|
|
939
853
|
* ```tsx
|
|
@@ -954,7 +868,7 @@ declare const DataTable: {
|
|
|
954
868
|
* action column aligned across the header and body when scrolling horizontally.
|
|
955
869
|
* Use as the `header` for a `columnHelper.display` action column.
|
|
956
870
|
*
|
|
957
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableactionheader
|
|
871
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableactionheader
|
|
958
872
|
*
|
|
959
873
|
* @example
|
|
960
874
|
* ```tsx
|
|
@@ -975,7 +889,7 @@ declare const DataTable: {
|
|
|
975
889
|
* `Table.Cell`. Every cell rendered by a column's `cell` function should
|
|
976
890
|
* be wrapped in this — a raw `<td>` skips mantle typography and padding.
|
|
977
891
|
*
|
|
978
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablecell
|
|
892
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablecell
|
|
979
893
|
*
|
|
980
894
|
* @example
|
|
981
895
|
* ```tsx
|
|
@@ -992,7 +906,7 @@ declare const DataTable: {
|
|
|
992
906
|
* `DataTable.Row`, with a `DataTable.EmptyRow` fallback when there is
|
|
993
907
|
* no data.
|
|
994
908
|
*
|
|
995
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablebody
|
|
909
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablebody
|
|
996
910
|
*
|
|
997
911
|
* @example
|
|
998
912
|
* ```tsx
|
|
@@ -1013,8 +927,8 @@ declare const DataTable: {
|
|
|
1013
927
|
* every column and `Empty.Root` centers itself, so no `<td>` or centering
|
|
1014
928
|
* markup is needed.
|
|
1015
929
|
*
|
|
1016
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableemptyrow
|
|
1017
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
930
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableemptyrow
|
|
931
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
1018
932
|
*
|
|
1019
933
|
* @example
|
|
1020
934
|
* ```tsx
|
|
@@ -1036,7 +950,7 @@ declare const DataTable: {
|
|
|
1036
950
|
* `table.getHeaderGroups()`. Does not accept children — headers come from
|
|
1037
951
|
* each column's `header` definition.
|
|
1038
952
|
*
|
|
1039
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablehead
|
|
953
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablehead
|
|
1040
954
|
*
|
|
1041
955
|
* @example
|
|
1042
956
|
* ```tsx
|
|
@@ -1051,7 +965,7 @@ declare const DataTable: {
|
|
|
1051
965
|
* A `<th>` optimized for header actions. Wrap each column's header content
|
|
1052
966
|
* in this; for sortable columns, nest a `DataTable.HeaderSortButton` inside.
|
|
1053
967
|
*
|
|
1054
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableheader
|
|
968
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableheader
|
|
1055
969
|
*
|
|
1056
970
|
* @example
|
|
1057
971
|
* ```tsx
|
|
@@ -1077,7 +991,7 @@ declare const DataTable: {
|
|
|
1077
991
|
* Pass `className="justify-end"` and `iconPlacement="start"` for
|
|
1078
992
|
* right-aligned numeric columns so the sort icon stays paired with the label.
|
|
1079
993
|
*
|
|
1080
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableheadersortbutton
|
|
994
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableheadersortbutton
|
|
1081
995
|
*
|
|
1082
996
|
* @example
|
|
1083
997
|
* ```tsx
|
|
@@ -1107,7 +1021,7 @@ declare const DataTable: {
|
|
|
1107
1021
|
* renders a sibling `DataTable.ExpandedRow` (only while expanded) holding the
|
|
1108
1022
|
* returned content. Pair with `DataTable.RowExpandButton`.
|
|
1109
1023
|
*
|
|
1110
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablerow
|
|
1024
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablerow
|
|
1111
1025
|
*
|
|
1112
1026
|
* @example
|
|
1113
1027
|
* ```tsx
|
|
@@ -1135,7 +1049,7 @@ declare const DataTable: {
|
|
|
1135
1049
|
* `DataTable.ActionHeader`. Renders a screen-reader-only label by default so
|
|
1136
1050
|
* the column is announced while staying visually empty.
|
|
1137
1051
|
*
|
|
1138
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableexpandheader
|
|
1052
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableexpandheader
|
|
1139
1053
|
*
|
|
1140
1054
|
* @example
|
|
1141
1055
|
* ```tsx
|
|
@@ -1159,7 +1073,7 @@ declare const DataTable: {
|
|
|
1159
1073
|
* a row-level `onClick`, and renders nothing when `row.getCanExpand()` is
|
|
1160
1074
|
* false.
|
|
1161
1075
|
*
|
|
1162
|
-
* @see https://mantle.ngrok.com/components/data-table#datatablerowexpandbutton
|
|
1076
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatablerowexpandbutton
|
|
1163
1077
|
*
|
|
1164
1078
|
* @example
|
|
1165
1079
|
* ```tsx
|
|
@@ -1177,7 +1091,7 @@ declare const DataTable: {
|
|
|
1177
1091
|
* and sits on an opaque card surface so it coexists with a sticky action
|
|
1178
1092
|
* column.
|
|
1179
1093
|
*
|
|
1180
|
-
* @see https://mantle.ngrok.com/components/data-table#datatableexpandedrow
|
|
1094
|
+
* @see https://mantle.ngrok.com/components/data-display/data-table#datatableexpandedrow
|
|
1181
1095
|
*
|
|
1182
1096
|
* @example
|
|
1183
1097
|
* ```tsx
|
package/dist/data-table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-CxVsZ2N1.js";import{t as n}from"./button-AS5Ir3DE.js";import{i as r}from"./direction-Wa9W2F61.js";import{t as i}from"./sort-BPX2Fk9t.js";import{t as a}from"./table-CPH2md2-.js";import{Fragment as o,createContext as s,forwardRef as c,useContext as l,useMemo as u}from"react";import d from"tiny-invariant";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{flexRender as h}from"@tanstack/react-table";import{MinusIcon as g}from"@phosphor-icons/react/Minus";import{PlusIcon as _}from"@phosphor-icons/react/Plus";export*from"@tanstack/react-table";const v=[`unsorted`,`asc`,`desc`],y=[`unsorted`,`desc`,`asc`];function b(e,t){return x(t===`alphanumeric`?v:y,e)??`unsorted`}function x(e,t,n){if(e.length===0)return n;let r=e.findIndex(e=>e===t);if(r===-1)return n;let i=(r+1)%e.length;return e.at(i)??n}const S=s(null);function C(){let e=l(S);return d(e,`useDataTableContext should only be used within a DataTable child component`),e}function w({children:e,table:t,...n}){let r=u(()=>({table:t}),[t]);return p(S.Provider,{value:r,children:p(a.Root,{"data-slot":`data-table`,...n,children:p(a.Element,{children:e})})})}function T({children:t,className:i,column:a,disableSorting:o=!1,iconPlacement:s=`end`,sortingMode:c,sortIcon:l,onClick:u,...d}){let f=a.getIsSorted(),h=!o&&a.getCanSort(),g=h&&typeof f==`string`?f:`unsorted`,_=l?.(g)??p(V,{mode:c,direction:g});return m(n,{appearance:`ghost`,"data-slot":`data-table-header-sort-button`,className:e(`flex justify-start w-full h-full rounded-none not-disabled:active:scale-none text-muted`,i),"data-sort-direction":g,"data-table-header-action":!0,icon:_,iconPlacement:s,onClick:e=>{u?.(e),!e.defaultPrevented&&(!h||o||c===void 0||H(a,c))},priority:`neutral`,type:`button`,...d,children:[h&&g!==`unsorted`&&m(`span`,{className:`sr-only`,children:[`Column sorted in`,` `,c===`alphanumeric`?g===`asc`?`ascending`:`descending`:r(g),` `,`order`]}),t]})}function E({children:t,className:n,...r}){return p(a.Header,{"data-slot":`data-table-header`,className:e(`has-data-table-header-action:px-0`,n),...r,children:t})}const D=c((e,t)=>p(a.Body,{ref:t,"data-slot":`data-table-body`,...e}));D.displayName=`DataTableBody`;function O(e){let{table:t}=C();return p(a.Head,{"data-slot":`data-table-head`,...e,children:t.getHeaderGroups().map(e=>p(a.Row,{children:e.headers.map(e=>p(o,{children:e.isPlaceholder?p(a.Header,{},e.id):h(e.column.columnDef.header,e.getContext())},e.id))},e.id))})}function k({className:t,renderExpanded:n,row:r,...i}){let s=p(a.Row,{"data-slot":`data-table-row`,"data-expanded":r.getIsExpanded()||void 0,className:e(i.onClick&&`cursor-pointer`,t),...i,children:r.getVisibleCells().map(e=>p(o,{children:h(e.column.columnDef.cell,e.getContext())},e.id))});return n==null?s:m(f,{children:[s,r.getIsExpanded()&&p(z,{row:r,children:n(r)})]})}function A({children:e,...t}){let{table:n}=C(),r=n.getAllColumns().length;return p(a.Row,{"data-slot":`data-table-empty-row`,...t,children:p(a.Cell,{colSpan:r,children:e})})}function j(){return p(`span`,{"aria-hidden":!0,className:e(`pointer-events-none absolute -inset-y-px -left-1.5 w-1.5`,`opacity-0 transition-opacity group-data-sticky-active/table:opacity-100`,`shadow-[1px_0_0_0_var(--border-color-card-muted)]`,`bg-linear-to-l to-transparent`,`from-[color-mix(in_oklab,var(--shadow-color)_var(--shadow-second-opacity),transparent)]`)})}function M({children:t,className:n,...r}){return m(a.Cell,{"data-mantle-table-sticky-right":!0,"data-slot":`data-table-action-cell`,className:e(`sticky z-10 right-0 text-end align-middle bg-inherit p-2`,n),...r,children:[p(j,{}),t]})}function N({children:t,className:n,...r}){let{table:i}=C(),o=i.getRowModel().rows.length>0;return m(a.Header,{...o?{"data-mantle-table-sticky-right":!0}:{},"data-slot":`data-table-action-header`,className:e(o&&`sticky z-10 right-0 bg-inherit`,n),...r,children:[o&&p(j,{}),t]})}function P(e){return`data-table-expanded-row-${encodeURIComponent(e.id)}`}function F({children:t,className:n,...r}){return p(a.Header,{"data-slot":`data-table-expand-header`,className:e(`w-9 px-0 text-center`,n),...r,children:t??p(`span`,{className:`sr-only`,children:`Row details`})})}const I=p(_,{weight:`bold`,className:`size-3.5`}),L=p(g,{weight:`bold`,className:`size-3.5`});function R({appearance:n=`ghost`,className:r,collapseIcon:i=L,expandIcon:a=I,label:o,onClick:s,row:c,size:l=`sm`,...u}){if(!c.getCanExpand())return null;let d=c.getIsExpanded(),f=c.getToggleExpandedHandler();return p(t,{type:`button`,"data-slot":`data-table-row-expand-button`,appearance:n,size:l,className:e(`rounded`,r),"aria-expanded":d,"aria-controls":d?P(c):void 0,icon:d?i:a,label:`${d?`Hide`:`Show`} details for ${o}`,onClick:e=>{e.stopPropagation(),s?.(e),!e.defaultPrevented&&f()},...u})}function z({children:t,className:n,colSpan:r,row:i,...o}){return p(a.Row,{"data-slot":`data-table-expanded-row`,"data-expanded-content":!0,className:e(`[&>td]:border-t-0`,n),...o,children:p(a.Cell,{id:P(i),colSpan:r??i.getVisibleCells().length,className:`bg-card font-sans text-body`,children:t})})}w.displayName=`DataTable`,M.displayName=`DataTableActionCell`,N.displayName=`DataTableActionHeader`,D.displayName=`DataTableBody`,A.displayName=`DataTableEmptyRow`,F.displayName=`DataTableExpandHeader`,z.displayName=`DataTableExpandedRow`,O.displayName=`DataTableHead`,E.displayName=`DataTableHeader`,T.displayName=`DataTableHeaderSortButton`,k.displayName=`DataTableRow`,R.displayName=`DataTableRowExpandButton`;const B={Root:w,ActionCell:M,ActionHeader:N,Cell:a.Cell,Body:D,EmptyRow:A,Head:O,Header:E,HeaderSortButton:T,Row:k,ExpandHeader:F,RowExpandButton:R,ExpandedRow:z};function V({direction:e,mode:t,...n}){return e===`unsorted`||!t||!e?p(`svg`,{"aria-hidden":!0,...n}):p(i,{mode:t,direction:e,...n})}function H(e,t){if(!e.getCanSort())return;let n=e.getIsSorted();switch(b(typeof n==`string`?n:`unsorted`,t)){case`unsorted`:e.clearSorting();return;case`asc`:e.toggleSorting(!1);return;case`desc`:e.toggleSorting(!0);return;default:return}}export{B as DataTable,P as expandedRowId};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as WithAsChild } from "./as-child-
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import "./index-D47aqlpz.js";
|
|
2
3
|
import { ComponentProps } from "react";
|
|
3
|
-
|
|
4
4
|
//#region src/components/description-list/description-list.d.ts
|
|
5
5
|
type DescriptionListProps = ComponentProps<"dl"> & WithAsChild;
|
|
6
6
|
type DescriptionListItemProps = ComponentProps<"div"> & WithAsChild;
|
|
@@ -15,7 +15,7 @@ type DescriptionListValueProps = ComponentProps<"dd"> & WithAsChild;
|
|
|
15
15
|
* Compose with `DescriptionList.Item`, `DescriptionList.Label`, and
|
|
16
16
|
* `DescriptionList.Value` as direct children.
|
|
17
17
|
*
|
|
18
|
-
* @see https://mantle.ngrok.com/components/description-list
|
|
18
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list
|
|
19
19
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
@@ -47,7 +47,7 @@ declare const DescriptionList: {
|
|
|
47
47
|
/**
|
|
48
48
|
* The root container for a description list. Renders a `<dl>` element.
|
|
49
49
|
*
|
|
50
|
-
* @see https://mantle.ngrok.com/components/description-list#descriptionlistroot
|
|
50
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistroot
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* ```tsx
|
|
@@ -64,7 +64,7 @@ declare const DescriptionList: {
|
|
|
64
64
|
* A wrapper that groups a label/value pair. Renders a `<div>` with a default
|
|
65
65
|
* subgrid layout.
|
|
66
66
|
*
|
|
67
|
-
* @see https://mantle.ngrok.com/components/description-list#descriptionlistitem
|
|
67
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistitem
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
70
|
* ```tsx
|
|
@@ -78,7 +78,7 @@ declare const DescriptionList: {
|
|
|
78
78
|
/**
|
|
79
79
|
* The label for a description list item. Renders a `<dt>` element.
|
|
80
80
|
*
|
|
81
|
-
* @see https://mantle.ngrok.com/components/description-list#descriptionlistlabel
|
|
81
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistlabel
|
|
82
82
|
*
|
|
83
83
|
* @example
|
|
84
84
|
* ```tsx
|
|
@@ -89,7 +89,7 @@ declare const DescriptionList: {
|
|
|
89
89
|
/**
|
|
90
90
|
* The value for a description list item. Renders a `<dd>` element.
|
|
91
91
|
*
|
|
92
|
-
* @see https://mantle.ngrok.com/components/description-list#descriptionlistvalue
|
|
92
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistvalue
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
95
|
* ```tsx
|
package/dist/description-list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`dl`,{ref:s,"data-slot":`description-list`,className:e(`relative scrollbar overflow-x-auto overscroll-x-none rounded-lg border border-card grid grid-cols-[auto_1fr] gap-x-4 [&>*:nth-child(odd)]:bg-neutral-500/5 p-1`,i),...o,children:a}));i.displayName=`DescriptionList`;const a=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`description-list-item`,className:e(`rounded-sm col-span-full grid grid-cols-subgrid items-center`,i),...o,children:a}));a.displayName=`DescriptionListItem`;const o=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`dt`,{ref:s,"data-slot":`description-list-label`,className:e(`text-muted text-sm font-sans font-medium min-w-36 p-2`,i),...o,children:a}));o.displayName=`DescriptionListLabel`;const s=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`dd`,{ref:s,"data-slot":`description-list-value`,className:e(`text-body font-mono text-mono py-2 px-3`,i),...o,children:a}));s.displayName=`DescriptionListValue`;const c={Root:i,Item:a,Label:o,Value:s};export{c as DescriptionList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-CxVsZ2N1.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-wm7Wk-gy.js";import{forwardRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";const m=o;m.displayName=`Dialog`;const h=u((e,t)=>d(r,{ref:t,"data-slot":`dialog-trigger`,...e}));h.displayName=`DialogTrigger`;const g=n;g.displayName=`DialogPortal`;const _=u((e,t)=>d(l,{ref:t,"data-slot":`dialog-close`,...e}));_.displayName=`DialogClose`;const v=u(({className:t,...n},r)=>d(i,{ref:r,"data-slot":`dialog-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-xs`,t),...n}));v.displayName=`DialogOverlay`;const y=u(({children:t,className:n,preferredWidth:r=`max-w-lg`,...i},o)=>f(g,{children:[d(v,{}),d(`div`,{className:`fixed inset-4 z-50 flex items-center justify-center`,children:d(a,{"data-mantle-modal-content":!0,"data-slot":`dialog-content`,className:e(`flex max-h-full w-full flex-1 flex-col`,`outline-hidden focus-within:outline-hidden`,`border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,r,n),ref:o,...i,children:t})})]}));y.displayName=`DialogContent`;const b=({className:t,children:n,...r})=>d(`div`,{"data-slot":`dialog-header`,className:e(`border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4`,`has-[.icon-button]:pr-4`,t),...r,children:n});b.displayName=`DialogHeader`;const x=({size:e=`md`,type:n=`button`,label:r=`Close Dialog`,appearance:i=`ghost`,...a})=>d(l,{asChild:!0,children:d(t,{appearance:i,"data-slot":`dialog-close-icon-button`,icon:d(p,{}),label:r,size:e,type:n,...a})});x.displayName=`DialogCloseIconButton`;const S=({className:t,...n})=>d(`div`,{"data-slot":`dialog-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n});S.displayName=`DialogBody`;const C=({className:t,...n})=>d(`div`,{"data-slot":`dialog-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-4`,t),...n});C.displayName=`DialogFooter`;const w=u(({className:t,...n},r)=>d(c,{ref:r,"data-slot":`dialog-title`,className:e(`text-strong truncate text-lg font-medium`,t),...n}));w.displayName=`DialogTitle`;const T=u(({className:t,...n},r)=>d(s,{ref:r,"data-slot":`dialog-description`,className:e(`text-muted`,t),...n}));T.displayName=`DialogDescription`;const E={Root:m,Body:S,Close:_,CloseIconButton:x,Content:y,Description:T,Footer:C,Header:b,Overlay:v,Portal:g,Title:w,Trigger:h};export{E as t};
|