@alexgorbatchev/shadcn 0.0.30 → 0.0.32
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/README.md +26 -22
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/dist/{chunk-0ewzb2ax.js → chunk-0kyfh857.js} +1 -1
- package/dist/chunk-1xncv9gb.js +19 -0
- package/dist/chunk-2dxa9enk.js +98 -0
- package/dist/{chunk-8wfy03bp.js → chunk-6kwf9644.js} +1 -1
- package/dist/{chunk-82e7fbmq.js → chunk-9vyg3854.js} +2 -1
- package/dist/chunk-c6g2rbhv.js +3940 -0
- package/dist/chunk-dzvsjw59.js +200 -0
- package/dist/{chunk-g238nezp.js → chunk-pg9rhbgm.js} +4 -2
- package/dist/{chunk-5da3rzn5.js → chunk-s0typ7hv.js} +1 -1
- package/dist/chunk-tch86q2w.js +6050 -0
- package/dist/{chunk-eehfrrdz.js → chunk-tnnf8ydf.js} +1 -15
- package/dist/chunk-yfr9syen.js +363 -0
- package/dist/{chunk-53q730zs.js → chunk-zdt8xxzy.js} +3 -0
- package/dist/components/Alert.d.ts +1 -1
- package/dist/components/Table.d.ts +1 -0
- package/dist/components/assistant-ui/elements/Chart.js +2 -2
- package/dist/components/assistant-ui/elements/GuardrailNotice.js +2 -2
- package/dist/components/assistant-ui/elements/OptionList.js +3 -2
- package/dist/components/assistant-ui/elements/QuestionFlow.js +4 -3
- package/dist/components/assistant-ui/index.js +8 -7
- package/dist/components/assistant-ui/native/Sources.d.ts +1 -1
- package/dist/components/carousel/index.js +15 -204
- package/dist/components/chart/AnalyticsChart.d.ts +3 -2
- package/dist/components/chart/Chart.d.ts +1 -1
- package/dist/components/chart/index.js +24 -10
- package/dist/components/chart/types.d.ts +1 -0
- package/dist/components/data-grid/DataGrid.d.ts +48 -9
- package/dist/components/data-grid/DataGridColumnOptions.d.ts +14 -0
- package/dist/components/data-grid/DataGridColumnResizer.d.ts +13 -0
- package/dist/components/data-grid/getDataGridColumnSizeVariables.d.ts +6 -0
- package/dist/components/data-grid/hooks/useDataGridColumnSizes.d.ts +8 -0
- package/dist/components/data-grid/index.d.ts +3 -2
- package/dist/components/data-grid/index.js +124 -199
- package/dist/components/data-grid/moveDataGridColumn.d.ts +5 -0
- package/dist/components/event-calendar/index.js +4 -2
- package/dist/components/json-render/JsonAccordion.d.ts +3 -0
- package/dist/components/json-render/JsonAlert.d.ts +3 -0
- package/dist/components/json-render/JsonAvatar.d.ts +3 -0
- package/dist/components/json-render/JsonBadge.d.ts +3 -0
- package/dist/components/json-render/JsonButton.d.ts +3 -0
- package/dist/components/json-render/JsonButtonGroup.d.ts +3 -0
- package/dist/components/json-render/JsonCard.d.ts +3 -0
- package/dist/components/json-render/JsonCarousel.d.ts +3 -0
- package/dist/components/json-render/JsonCheckbox.d.ts +3 -0
- package/dist/components/json-render/JsonCollapsible.d.ts +3 -0
- package/dist/components/json-render/JsonDialog.d.ts +3 -0
- package/dist/components/json-render/JsonDrawer.d.ts +3 -0
- package/dist/components/json-render/JsonDropdownMenu.d.ts +3 -0
- package/dist/components/json-render/JsonGrid.d.ts +3 -0
- package/dist/components/json-render/JsonHeading.d.ts +3 -0
- package/dist/components/json-render/JsonImage.d.ts +3 -0
- package/dist/components/json-render/JsonInput.d.ts +3 -0
- package/dist/components/json-render/JsonLink.d.ts +3 -0
- package/dist/components/json-render/JsonPagination.d.ts +3 -0
- package/dist/components/json-render/JsonPopover.d.ts +3 -0
- package/dist/components/json-render/JsonProgress.d.ts +3 -0
- package/dist/components/json-render/JsonRadio.d.ts +3 -0
- package/dist/components/json-render/JsonSelect.d.ts +3 -0
- package/dist/components/json-render/JsonSeparator.d.ts +3 -0
- package/dist/components/json-render/JsonSkeleton.d.ts +3 -0
- package/dist/components/json-render/JsonSlider.d.ts +3 -0
- package/dist/components/json-render/JsonSpinner.d.ts +3 -0
- package/dist/components/json-render/JsonStack.d.ts +3 -0
- package/dist/components/json-render/JsonSwitch.d.ts +3 -0
- package/dist/components/json-render/JsonTable.d.ts +3 -0
- package/dist/components/json-render/JsonTabs.d.ts +3 -0
- package/dist/components/json-render/JsonText.d.ts +3 -0
- package/dist/components/json-render/JsonTextarea.d.ts +3 -0
- package/dist/components/json-render/JsonToggle.d.ts +3 -0
- package/dist/components/json-render/JsonToggleGroup.d.ts +3 -0
- package/dist/components/json-render/JsonTooltip.d.ts +3 -0
- package/dist/components/json-render/catalog.d.ts +548 -0
- package/dist/components/json-render/catalog.js +6 -0
- package/dist/components/json-render/getPaginationRange.d.ts +1 -0
- package/dist/components/json-render/index.d.ts +39 -0
- package/dist/components/json-render/index.js +1254 -0
- package/dist/components/virtual-data-grid/VirtualDataGrid.d.ts +26 -0
- package/dist/components/virtual-data-grid/index.d.ts +2 -0
- package/dist/components/virtual-data-grid/index.js +88 -0
- package/dist/components/virtual-table/index.js +4 -96
- package/dist/index.d.ts +1 -0
- package/dist/index.js +569 -4189
- package/licenses/json-render-APACHE-2.0.txt +201 -0
- package/llms/components/data-display/AnalyticsChart.md +34 -0
- package/llms/components/data-display/DataGridColumnOptions.md +22 -0
- package/llms/components/data-display/JsonRender.md +476 -0
- package/llms/components/data-display/VirtualDataGrid.md +71 -0
- package/llms/components/feedback/Alert.md +20 -4
- package/llms/setup.md +26 -22
- package/llms.txt +3 -0
- package/package.json +24 -2
|
@@ -20,18 +20,4 @@ function Checkbox2({ density, className, ...props }) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
import { Loader2Icon } from "lucide-react";
|
|
25
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
26
|
-
function Spinner2({ density, className, ...props }) {
|
|
27
|
-
return /* @__PURE__ */ jsx2(Loader2Icon, {
|
|
28
|
-
"data-density": density,
|
|
29
|
-
"data-slot": "spinner",
|
|
30
|
-
role: "status",
|
|
31
|
-
"aria-label": "Loading",
|
|
32
|
-
className: cn2("size-4 animate-spin", className),
|
|
33
|
-
...props
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { Checkbox2, Spinner2 };
|
|
23
|
+
export { Checkbox2 };
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button2
|
|
3
|
+
} from "./chunk-q7p28b89.js";
|
|
4
|
+
import {
|
|
5
|
+
Table2,
|
|
6
|
+
TableHeader2,
|
|
7
|
+
TableBody2,
|
|
8
|
+
TableRow2,
|
|
9
|
+
TableHead2,
|
|
10
|
+
TableCell2,
|
|
11
|
+
TableColumnGroup2,
|
|
12
|
+
TableColumn2
|
|
13
|
+
} from "./chunk-zte6pw69.js";
|
|
14
|
+
import {
|
|
15
|
+
NativeSelect2,
|
|
16
|
+
NativeSelectOption2
|
|
17
|
+
} from "./chunk-r9qrb6b6.js";
|
|
18
|
+
import {
|
|
19
|
+
Input2
|
|
20
|
+
} from "./chunk-59p19t57.js";
|
|
21
|
+
|
|
22
|
+
// src/components/data-grid/DataGrid.tsx
|
|
23
|
+
import {
|
|
24
|
+
FlexRender,
|
|
25
|
+
columnFilteringFeature,
|
|
26
|
+
columnOrderingFeature,
|
|
27
|
+
columnResizingFeature,
|
|
28
|
+
columnSizingFeature,
|
|
29
|
+
columnVisibilityFeature,
|
|
30
|
+
createFilteredRowModel,
|
|
31
|
+
createPaginatedRowModel,
|
|
32
|
+
createSortedRowModel,
|
|
33
|
+
filterFn_includesString,
|
|
34
|
+
globalFilteringFeature,
|
|
35
|
+
rowPaginationFeature,
|
|
36
|
+
rowSelectionFeature,
|
|
37
|
+
rowSortingFeature,
|
|
38
|
+
sortFn_alphanumeric,
|
|
39
|
+
sortFn_basic,
|
|
40
|
+
tableFeatures
|
|
41
|
+
} from "@tanstack/react-table";
|
|
42
|
+
import { ArrowDownIcon, ArrowUpIcon, ChevronsUpDownIcon } from "lucide-react";
|
|
43
|
+
import { useId } from "react";
|
|
44
|
+
|
|
45
|
+
// src/components/data-grid/DataGridColumnResizer.tsx
|
|
46
|
+
import { Subscribe } from "@tanstack/react-table";
|
|
47
|
+
import { jsx } from "react/jsx-runtime";
|
|
48
|
+
var KEYBOARD_STEP = 16;
|
|
49
|
+
function DataGridColumnResizer({
|
|
50
|
+
header,
|
|
51
|
+
label
|
|
52
|
+
}) {
|
|
53
|
+
const column = header.column;
|
|
54
|
+
const table = column.table;
|
|
55
|
+
const minSize = column.columnDef.minSize ?? 0;
|
|
56
|
+
const maxSize = column.columnDef.maxSize ?? Number.MAX_SAFE_INTEGER;
|
|
57
|
+
const resize = header.getResizeHandler();
|
|
58
|
+
const setSize = (size) => table.setColumnSizing((sizes) => ({ ...sizes, [column.id]: Math.min(maxSize, Math.max(minSize, size)) }));
|
|
59
|
+
const onKeyDown = (event) => {
|
|
60
|
+
const growKey = table.options.columnResizeDirection === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
61
|
+
const shrinkKey = growKey === "ArrowRight" ? "ArrowLeft" : "ArrowRight";
|
|
62
|
+
const size = column.getSize();
|
|
63
|
+
const next = event.key === growKey ? size + KEYBOARD_STEP : event.key === shrinkKey ? size - KEYBOARD_STEP : event.key === "Home" ? minSize : event.key === "End" && maxSize < Number.MAX_SAFE_INTEGER ? maxSize : undefined;
|
|
64
|
+
if (next === undefined)
|
|
65
|
+
return;
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
setSize(next);
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ jsx(Subscribe, {
|
|
70
|
+
source: table.store,
|
|
71
|
+
selector: (state) => `${state.columnSizing[column.id]}:${state.columnResizing.isResizingColumn === column.id}`,
|
|
72
|
+
children: () => /* @__PURE__ */ jsx("div", {
|
|
73
|
+
role: "separator",
|
|
74
|
+
"aria-orientation": "vertical",
|
|
75
|
+
"aria-label": `Resize ${label}`,
|
|
76
|
+
"aria-valuenow": column.getSize(),
|
|
77
|
+
"aria-valuemin": minSize,
|
|
78
|
+
"aria-valuemax": maxSize < Number.MAX_SAFE_INTEGER ? maxSize : undefined,
|
|
79
|
+
tabIndex: 0,
|
|
80
|
+
"data-slot": "data-grid-column-resizer",
|
|
81
|
+
"data-resizing": column.getIsResizing() || undefined,
|
|
82
|
+
onMouseDown: resize,
|
|
83
|
+
onTouchStart: resize,
|
|
84
|
+
onDoubleClick: () => column.resetSize(),
|
|
85
|
+
onKeyDown,
|
|
86
|
+
className: "absolute inset-y-0 end-0 flex w-2 cursor-col-resize touch-none justify-center outline-none select-none after:w-px after:bg-border hover:after:bg-ring focus-visible:after:w-0.5 focus-visible:after:bg-ring data-resizing:after:bg-ring"
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/components/data-grid/getDataGridColumnSizeVariables.ts
|
|
92
|
+
function getDataGridColumnSizeVariables(table) {
|
|
93
|
+
return new Map(table.getAllColumns().flatMap((column) => column.getLeafColumns()).map((column, index) => [column.id, `--data-grid-column-${index}-size`]));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// src/components/data-grid/DataGrid.tsx
|
|
97
|
+
import { jsx as jsx2, jsxs, Fragment } from "react/jsx-runtime";
|
|
98
|
+
var columnMeta = {};
|
|
99
|
+
var dataGridFeatures2 = tableFeatures({
|
|
100
|
+
columnFilteringFeature,
|
|
101
|
+
columnOrderingFeature,
|
|
102
|
+
columnSizingFeature,
|
|
103
|
+
columnResizingFeature,
|
|
104
|
+
columnVisibilityFeature,
|
|
105
|
+
globalFilteringFeature,
|
|
106
|
+
rowPaginationFeature,
|
|
107
|
+
rowSelectionFeature,
|
|
108
|
+
rowSortingFeature,
|
|
109
|
+
filteredRowModel: createFilteredRowModel(),
|
|
110
|
+
sortedRowModel: createSortedRowModel(),
|
|
111
|
+
paginatedRowModel: createPaginatedRowModel(),
|
|
112
|
+
filterFns: { includesString: filterFn_includesString },
|
|
113
|
+
sortFns: { alphanumeric: sortFn_alphanumeric, basic: sortFn_basic },
|
|
114
|
+
columnMeta
|
|
115
|
+
});
|
|
116
|
+
function getDataGridColumnLabel(column) {
|
|
117
|
+
const header = column.columnDef.header;
|
|
118
|
+
return column.columnDef.meta?.label ?? (typeof header === "string" ? header : column.id);
|
|
119
|
+
}
|
|
120
|
+
function getAriaSort(column) {
|
|
121
|
+
if (!column.getCanSort())
|
|
122
|
+
return;
|
|
123
|
+
const sorted = column.getIsSorted();
|
|
124
|
+
return sorted === "asc" ? "ascending" : sorted === "desc" ? "descending" : "none";
|
|
125
|
+
}
|
|
126
|
+
function DataGridHeaderCell({ header, isResizable }) {
|
|
127
|
+
const contentId = useId();
|
|
128
|
+
const meta = header.column.columnDef.meta;
|
|
129
|
+
const hasResizer = isResizable && !meta?.fill && header.column.getCanResize();
|
|
130
|
+
return /* @__PURE__ */ jsx2(TableHead2, {
|
|
131
|
+
scope: "col",
|
|
132
|
+
colSpan: header.colSpan,
|
|
133
|
+
"aria-sort": getAriaSort(header.column),
|
|
134
|
+
"aria-labelledby": hasResizer ? contentId : undefined,
|
|
135
|
+
textAlign: meta?.textAlign,
|
|
136
|
+
truncate: meta?.truncate,
|
|
137
|
+
visibleFrom: meta?.visibleFrom,
|
|
138
|
+
className: hasResizer ? "relative" : undefined,
|
|
139
|
+
children: hasResizer ? /* @__PURE__ */ jsxs(Fragment, {
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ jsx2("span", {
|
|
142
|
+
id: contentId,
|
|
143
|
+
children: header.isPlaceholder ? null : /* @__PURE__ */ jsx2(FlexRender, {
|
|
144
|
+
header
|
|
145
|
+
})
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ jsx2(DataGridColumnResizer, {
|
|
148
|
+
header,
|
|
149
|
+
label: getDataGridColumnLabel(header.column)
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
}) : header.isPlaceholder ? null : /* @__PURE__ */ jsx2(FlexRender, {
|
|
153
|
+
header
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function DataGridHeaderRows({
|
|
158
|
+
table,
|
|
159
|
+
isResizable = false
|
|
160
|
+
}) {
|
|
161
|
+
return /* @__PURE__ */ jsx2(Fragment, {
|
|
162
|
+
children: table.getHeaderGroups().map((group) => /* @__PURE__ */ jsx2(TableRow2, {
|
|
163
|
+
children: group.headers.map((header) => /* @__PURE__ */ jsx2(DataGridHeaderCell, {
|
|
164
|
+
header,
|
|
165
|
+
isResizable
|
|
166
|
+
}, header.id))
|
|
167
|
+
}, group.id))
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function DataGridCells2({ row }) {
|
|
171
|
+
return /* @__PURE__ */ jsx2(Fragment, {
|
|
172
|
+
children: row.getVisibleCells().map((cell) => {
|
|
173
|
+
const meta = cell.column.columnDef.meta;
|
|
174
|
+
return /* @__PURE__ */ jsx2(TableCell2, {
|
|
175
|
+
textAlign: meta?.textAlign,
|
|
176
|
+
truncate: meta?.truncate,
|
|
177
|
+
visibleFrom: meta?.visibleFrom,
|
|
178
|
+
children: /* @__PURE__ */ jsx2(FlexRender, {
|
|
179
|
+
cell
|
|
180
|
+
})
|
|
181
|
+
}, cell.id);
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function DataGridColumns({ table }) {
|
|
186
|
+
const variables = getDataGridColumnSizeVariables(table);
|
|
187
|
+
return /* @__PURE__ */ jsx2(TableColumnGroup2, {
|
|
188
|
+
children: table.getVisibleLeafColumns().map((column) => {
|
|
189
|
+
const meta = column.columnDef.meta;
|
|
190
|
+
const variable = variables.get(column.id);
|
|
191
|
+
return /* @__PURE__ */ jsx2(TableColumn2, {
|
|
192
|
+
visibleFrom: meta?.visibleFrom,
|
|
193
|
+
width: meta?.fill ? undefined : `var(${variable}, ${column.getSize()}px)`
|
|
194
|
+
}, column.id);
|
|
195
|
+
})
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function DataGrid2({
|
|
199
|
+
table,
|
|
200
|
+
label,
|
|
201
|
+
toolbar,
|
|
202
|
+
empty = "No results.",
|
|
203
|
+
loading = false,
|
|
204
|
+
pagination = true,
|
|
205
|
+
density
|
|
206
|
+
}) {
|
|
207
|
+
const rows = table.getRowModel().rows;
|
|
208
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
209
|
+
"data-density": density,
|
|
210
|
+
"data-scroll": "none",
|
|
211
|
+
className: "grid min-w-0 gap-3",
|
|
212
|
+
"aria-busy": loading,
|
|
213
|
+
children: [
|
|
214
|
+
toolbar,
|
|
215
|
+
/* @__PURE__ */ jsx2("div", {
|
|
216
|
+
className: "min-w-0 rounded-sm border border-border",
|
|
217
|
+
children: /* @__PURE__ */ jsxs(Table2, {
|
|
218
|
+
"aria-label": label,
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ jsx2(TableHeader2, {
|
|
221
|
+
children: /* @__PURE__ */ jsx2(DataGridHeaderRows, {
|
|
222
|
+
table
|
|
223
|
+
})
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ jsx2(TableBody2, {
|
|
226
|
+
children: loading ? /* @__PURE__ */ jsx2(TableRow2, {
|
|
227
|
+
children: /* @__PURE__ */ jsx2(TableCell2, {
|
|
228
|
+
colSpan: table.getVisibleLeafColumns().length,
|
|
229
|
+
children: /* @__PURE__ */ jsxs("p", {
|
|
230
|
+
role: "status",
|
|
231
|
+
children: [
|
|
232
|
+
"Loading ",
|
|
233
|
+
label,
|
|
234
|
+
"…"
|
|
235
|
+
]
|
|
236
|
+
})
|
|
237
|
+
})
|
|
238
|
+
}) : rows.length ? rows.map((row) => /* @__PURE__ */ jsx2(TableRow2, {
|
|
239
|
+
"data-state": row.getIsSelected() ? "selected" : undefined,
|
|
240
|
+
children: /* @__PURE__ */ jsx2(DataGridCells2, {
|
|
241
|
+
row
|
|
242
|
+
})
|
|
243
|
+
}, row.id)) : /* @__PURE__ */ jsx2(TableRow2, {
|
|
244
|
+
children: /* @__PURE__ */ jsx2(TableCell2, {
|
|
245
|
+
colSpan: table.getVisibleLeafColumns().length,
|
|
246
|
+
children: /* @__PURE__ */ jsx2("p", {
|
|
247
|
+
role: "status",
|
|
248
|
+
children: empty
|
|
249
|
+
})
|
|
250
|
+
})
|
|
251
|
+
})
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
})
|
|
255
|
+
}),
|
|
256
|
+
pagination && /* @__PURE__ */ jsx2(DataGridPagination2, {
|
|
257
|
+
table
|
|
258
|
+
})
|
|
259
|
+
]
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
function DataGridColumnHeader2({
|
|
263
|
+
column,
|
|
264
|
+
children
|
|
265
|
+
}) {
|
|
266
|
+
const sorted = column.getIsSorted();
|
|
267
|
+
return column.getCanSort() ? /* @__PURE__ */ jsxs(Button2, {
|
|
268
|
+
type: "button",
|
|
269
|
+
variant: "ghost",
|
|
270
|
+
size: "sm",
|
|
271
|
+
onClick: column.getToggleSortingHandler(),
|
|
272
|
+
children: [
|
|
273
|
+
children,
|
|
274
|
+
sorted === "asc" ? /* @__PURE__ */ jsx2(ArrowUpIcon, {
|
|
275
|
+
"aria-hidden": "true"
|
|
276
|
+
}) : sorted === "desc" ? /* @__PURE__ */ jsx2(ArrowDownIcon, {
|
|
277
|
+
"aria-hidden": "true"
|
|
278
|
+
}) : /* @__PURE__ */ jsx2(ChevronsUpDownIcon, {
|
|
279
|
+
"aria-hidden": "true"
|
|
280
|
+
})
|
|
281
|
+
]
|
|
282
|
+
}) : /* @__PURE__ */ jsx2("span", {
|
|
283
|
+
children
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
function DataGridFilter2({
|
|
287
|
+
table,
|
|
288
|
+
columnId,
|
|
289
|
+
label
|
|
290
|
+
}) {
|
|
291
|
+
const column = table.getColumn(columnId);
|
|
292
|
+
if (!column)
|
|
293
|
+
throw new Error(`Unknown filter column: ${columnId}`);
|
|
294
|
+
const value = column.getFilterValue();
|
|
295
|
+
return /* @__PURE__ */ jsx2(Input2, {
|
|
296
|
+
"aria-label": label,
|
|
297
|
+
placeholder: label,
|
|
298
|
+
value: typeof value === "string" ? value : "",
|
|
299
|
+
onChange: (event) => column.setFilterValue(event.target.value)
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
function DataGridPagination2({ table }) {
|
|
303
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
304
|
+
className: "flex flex-wrap items-center justify-between gap-3 text-sm",
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ jsxs("span", {
|
|
307
|
+
role: "status",
|
|
308
|
+
children: [
|
|
309
|
+
table.getSelectedRowModel().rows.length,
|
|
310
|
+
" selected · Page ",
|
|
311
|
+
table.state.pagination.pageIndex + 1,
|
|
312
|
+
" of",
|
|
313
|
+
" ",
|
|
314
|
+
Math.max(1, table.getPageCount())
|
|
315
|
+
]
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ jsxs("div", {
|
|
318
|
+
className: "flex items-center gap-2",
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ jsxs(NativeSelect2, {
|
|
321
|
+
"aria-label": "Rows per page",
|
|
322
|
+
value: table.state.pagination.pageSize,
|
|
323
|
+
onChange: (event) => table.setPageSize(Number(event.target.value)),
|
|
324
|
+
children: [
|
|
325
|
+
[10, 20, 50, 100].map((size) => /* @__PURE__ */ jsxs(NativeSelectOption2, {
|
|
326
|
+
value: size,
|
|
327
|
+
children: [
|
|
328
|
+
size,
|
|
329
|
+
" rows"
|
|
330
|
+
]
|
|
331
|
+
}, size)),
|
|
332
|
+
![10, 20, 50, 100].includes(table.state.pagination.pageSize) && /* @__PURE__ */ jsxs(NativeSelectOption2, {
|
|
333
|
+
value: table.state.pagination.pageSize,
|
|
334
|
+
children: [
|
|
335
|
+
table.state.pagination.pageSize,
|
|
336
|
+
" rows"
|
|
337
|
+
]
|
|
338
|
+
})
|
|
339
|
+
]
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ jsx2(Button2, {
|
|
342
|
+
type: "button",
|
|
343
|
+
variant: "outline",
|
|
344
|
+
size: "sm",
|
|
345
|
+
disabled: !table.getCanPreviousPage(),
|
|
346
|
+
onClick: () => table.previousPage(),
|
|
347
|
+
children: "Previous"
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ jsx2(Button2, {
|
|
350
|
+
type: "button",
|
|
351
|
+
variant: "outline",
|
|
352
|
+
size: "sm",
|
|
353
|
+
disabled: !table.getCanNextPage(),
|
|
354
|
+
onClick: () => table.nextPage(),
|
|
355
|
+
children: "Next"
|
|
356
|
+
})
|
|
357
|
+
]
|
|
358
|
+
})
|
|
359
|
+
]
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export { getDataGridColumnSizeVariables, dataGridFeatures2, getDataGridColumnLabel, DataGridHeaderRows, DataGridCells2, DataGridColumns, DataGrid2, DataGridColumnHeader2, DataGridFilter2, DataGridPagination2 };
|
|
@@ -9,6 +9,9 @@ var alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-sm bor
|
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-card text-card-foreground",
|
|
12
|
+
success: "bg-success text-success-foreground *:data-[slot=alert-description]:text-success-foreground",
|
|
13
|
+
warning: "bg-warning text-warning-foreground *:data-[slot=alert-description]:text-warning-foreground",
|
|
14
|
+
info: "bg-card text-primary *:data-[slot=alert-description]:text-primary/90",
|
|
12
15
|
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
@@ -2,7 +2,7 @@ import type { IDensityProps } from "../density/types.js";
|
|
|
2
2
|
import type { ComponentProps, ReactElement } from "react";
|
|
3
3
|
import { type VariantProps } from "class-variance-authority";
|
|
4
4
|
declare const alertVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
type AlertProps = ComponentProps<"div"> & VariantProps<typeof alertVariants> & IDensityProps;
|
|
8
8
|
declare function Alert({ density, className, variant, ...props }: AlertProps): ReactElement;
|
|
@@ -34,3 +34,4 @@ declare function TableColumn({ className, style, visibleFrom, width, ...props }:
|
|
|
34
34
|
type TableCaptionProps = ComponentProps<"caption"> & IDensityProps;
|
|
35
35
|
declare function TableCaption({ density, className, ...props }: TableCaptionProps): ReactElement;
|
|
36
36
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, TableColumnGroup, TableColumn, };
|
|
37
|
+
export type { TableTextAlign, TableVisibility };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Chart2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-0kyfh857.js";
|
|
4
4
|
import"../../../chunk-bygq5yqf.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-9vyg3854.js";
|
|
6
6
|
import"../../../chunk-jpvw9xqy.js";
|
|
7
7
|
import"../../../chunk-e6hk39ev.js";
|
|
8
8
|
import"../../../chunk-cp2m7y7v.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GuardrailNotice2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-6kwf9644.js";
|
|
4
|
+
import"../../../chunk-zdt8xxzy.js";
|
|
5
5
|
import"../../../chunk-q7p28b89.js";
|
|
6
6
|
import"../../../chunk-cp2m7y7v.js";
|
|
7
7
|
export {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OptionList2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-pg9rhbgm.js";
|
|
4
4
|
import"../../../chunk-71efbr5n.js";
|
|
5
5
|
import"../../../chunk-vxvaaptq.js";
|
|
6
|
-
import"../../../chunk-
|
|
6
|
+
import"../../../chunk-1xncv9gb.js";
|
|
7
|
+
import"../../../chunk-tnnf8ydf.js";
|
|
7
8
|
import"../../../chunk-q7p28b89.js";
|
|
8
9
|
import"../../../chunk-cp2m7y7v.js";
|
|
9
10
|
export {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
QuestionFlow2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-s0typ7hv.js";
|
|
4
|
+
import"../../../chunk-pg9rhbgm.js";
|
|
5
5
|
import"../../../chunk-71efbr5n.js";
|
|
6
6
|
import"../../../chunk-vxvaaptq.js";
|
|
7
|
-
import"../../../chunk-
|
|
7
|
+
import"../../../chunk-1xncv9gb.js";
|
|
8
|
+
import"../../../chunk-tnnf8ydf.js";
|
|
8
9
|
import"../../../chunk-q7p28b89.js";
|
|
9
10
|
import"../../../chunk-cp2m7y7v.js";
|
|
10
11
|
export {
|
|
@@ -47,11 +47,11 @@ import {
|
|
|
47
47
|
CanvasSplitBody2,
|
|
48
48
|
CanvasSplitLine2
|
|
49
49
|
} from "../../chunk-vf1rsqpk.js";
|
|
50
|
-
import"../../chunk-
|
|
50
|
+
import"../../chunk-9vyg3854.js";
|
|
51
51
|
import"../../chunk-jpvw9xqy.js";
|
|
52
52
|
import {
|
|
53
53
|
Chart2
|
|
54
|
-
} from "../../chunk-
|
|
54
|
+
} from "../../chunk-0kyfh857.js";
|
|
55
55
|
import"../../chunk-59p19t57.js";
|
|
56
56
|
import"../../chunk-hz9azhzx.js";
|
|
57
57
|
import"../../chunk-57jj9v64.js";
|
|
@@ -292,10 +292,10 @@ import {
|
|
|
292
292
|
import {
|
|
293
293
|
GitHubIcon2
|
|
294
294
|
} from "../../chunk-4bjqbky7.js";
|
|
295
|
-
import"../../chunk-
|
|
295
|
+
import"../../chunk-zdt8xxzy.js";
|
|
296
296
|
import {
|
|
297
297
|
GuardrailNotice2
|
|
298
|
-
} from "../../chunk-
|
|
298
|
+
} from "../../chunk-6kwf9644.js";
|
|
299
299
|
import {
|
|
300
300
|
ImageRoot2,
|
|
301
301
|
ImagePreview2,
|
|
@@ -423,13 +423,14 @@ import {
|
|
|
423
423
|
import {
|
|
424
424
|
OpenAILogo2
|
|
425
425
|
} from "../../chunk-pa07b92f.js";
|
|
426
|
-
import"../../chunk-
|
|
426
|
+
import"../../chunk-1xncv9gb.js";
|
|
427
|
+
import"../../chunk-tnnf8ydf.js";
|
|
427
428
|
import {
|
|
428
429
|
OptionText2
|
|
429
430
|
} from "../../chunk-71efbr5n.js";
|
|
430
431
|
import {
|
|
431
432
|
OptionList2
|
|
432
|
-
} from "../../chunk-
|
|
433
|
+
} from "../../chunk-pg9rhbgm.js";
|
|
433
434
|
import {
|
|
434
435
|
PermissionGrant2
|
|
435
436
|
} from "../../chunk-726x26pk.js";
|
|
@@ -438,7 +439,7 @@ import {
|
|
|
438
439
|
} from "../../chunk-dvmxyk3q.js";
|
|
439
440
|
import {
|
|
440
441
|
QuestionFlow2
|
|
441
|
-
} from "../../chunk-
|
|
442
|
+
} from "../../chunk-s0typ7hv.js";
|
|
442
443
|
import {
|
|
443
444
|
QuotaBanner2
|
|
444
445
|
} from "../../chunk-bsff5mmk.js";
|
|
@@ -7,7 +7,7 @@ type SourceIconContract = ComponentProps<"span"> & {
|
|
|
7
7
|
faviconUrl?: ((domain: string) => string) | undefined;
|
|
8
8
|
};
|
|
9
9
|
export declare const sourceVariants: (props?: ({
|
|
10
|
-
variant?: "outline" | "secondary" | "ghost" | "destructive" | "success" | "warning" | "
|
|
10
|
+
variant?: "outline" | "secondary" | "ghost" | "destructive" | "success" | "warning" | "info" | "muted" | null | undefined;
|
|
11
11
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
export declare const SourceIcon: import("react").ForwardRefExoticComponent<Omit<SourceIconContract, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|