pixelize-design-library 2.3.1-beta.1 → 2.3.1-beta.2
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/package.json +1 -1
- package/dist/App.d.ts +0 -4
- package/dist/App.js +0 -131
- package/dist/Components/Table/CompactSelect.d.ts +0 -15
- package/dist/Components/Table/CompactSelect.js +0 -69
- package/dist/Components/Table/Components/ActiveFilters.d.ts +0 -9
- package/dist/Components/Table/Components/ActiveFilters.js +0 -132
- package/dist/Components/Table/Components/TableFilters.d.ts +0 -7
- package/dist/Components/Table/Components/TableFilters.js +0 -89
- package/dist/Components/Table/Components/useDebounce.d.ts +0 -2
- package/dist/Components/Table/Components/useDebounce.js +0 -28
- package/dist/Components/Table/Components/useTable.d.ts +0 -47
- package/dist/Components/Table/Components/useTable.js +0 -219
- package/dist/Components/Table/LeftFilterPane.d.ts +0 -36
- package/dist/Components/Table/LeftFilterPane.js +0 -273
- package/dist/Components/Table/SelectOperationControls.d.ts +0 -8
- package/dist/Components/Table/SelectOperationControls.js +0 -15
- package/dist/Components/Table/TableSettings/ManageColumns.d.ts +0 -12
- package/dist/Components/Table/TableSettings/ManageColumns.js +0 -166
- package/dist/Components/Table/TableSettings/ManageColumns.test.d.ts +0 -1
- package/dist/Components/Table/TableSettings/ManageColumns.test.js +0 -146
- package/dist/Components/Table/TableSettings/TableFilters.d.ts +0 -10
- package/dist/Components/Table/TableSettings/TableFilters.js +0 -69
- package/dist/Components/Table/TableSettings/TableFilters.test.d.ts +0 -1
- package/dist/Components/Table/TableSettings/TableFilters.test.js +0 -109
- package/dist/Components/Table/TableSettings/TableSettings.d.ts +0 -8
- package/dist/Components/Table/TableSettings/TableSettings.js +0 -141
- package/dist/Components/Table/TableToDo.d.ts +0 -2
- package/dist/Components/Table/TableToDo.js +0 -291
- package/dist/Components/Table/TextOperationControls.d.ts +0 -12
- package/dist/Components/Table/TextOperationControls.js +0 -29
- package/dist/Layout.d.ts +0 -3
- package/dist/Layout.js +0 -292
- package/dist/Pages/TInput.d.ts +0 -3
- package/dist/Pages/TInput.js +0 -56
- package/dist/Pages/accordion.d.ts +0 -3
- package/dist/Pages/accordion.js +0 -42
- package/dist/Pages/alertdialog.d.ts +0 -3
- package/dist/Pages/alertdialog.js +0 -54
- package/dist/Pages/button.d.ts +0 -3
- package/dist/Pages/button.js +0 -46
- package/dist/Pages/card.d.ts +0 -3
- package/dist/Pages/card.js +0 -117
- package/dist/Pages/chart.d.ts +0 -4
- package/dist/Pages/chart.js +0 -40
- package/dist/Pages/checkbox.d.ts +0 -3
- package/dist/Pages/checkbox.js +0 -12
- package/dist/Pages/contactForm.d.ts +0 -3
- package/dist/Pages/contactForm.js +0 -16
- package/dist/Pages/datePick.d.ts +0 -3
- package/dist/Pages/datePick.js +0 -88
- package/dist/Pages/drawer.d.ts +0 -3
- package/dist/Pages/drawer.js +0 -58
- package/dist/Pages/dropdown.d.ts +0 -3
- package/dist/Pages/dropdown.js +0 -24
- package/dist/Pages/editor.d.ts +0 -3
- package/dist/Pages/editor.js +0 -14
- package/dist/Pages/feedback.d.ts +0 -2
- package/dist/Pages/feedback.js +0 -15
- package/dist/Pages/fileUpload.d.ts +0 -2
- package/dist/Pages/fileUpload.js +0 -82
- package/dist/Pages/input.d.ts +0 -3
- package/dist/Pages/input.js +0 -92
- package/dist/Pages/kanbanboard.d.ts +0 -3
- package/dist/Pages/kanbanboard.js +0 -224
- package/dist/Pages/modal.d.ts +0 -3
- package/dist/Pages/modal.js +0 -65
- package/dist/Pages/multiSelect.d.ts +0 -3
- package/dist/Pages/multiSelect.js +0 -55
- package/dist/Pages/noteArea.d.ts +0 -3
- package/dist/Pages/noteArea.js +0 -59
- package/dist/Pages/notification.d.ts +0 -3
- package/dist/Pages/notification.js +0 -25
- package/dist/Pages/numberInput.d.ts +0 -3
- package/dist/Pages/numberInput.js +0 -49
- package/dist/Pages/photoViewer.d.ts +0 -3
- package/dist/Pages/photoViewer.js +0 -12
- package/dist/Pages/pinInputs.d.ts +0 -3
- package/dist/Pages/pinInputs.js +0 -12
- package/dist/Pages/productCaard.d.ts +0 -3
- package/dist/Pages/productCaard.js +0 -311
- package/dist/Pages/productDetailCard.d.ts +0 -3
- package/dist/Pages/productDetailCard.js +0 -78
- package/dist/Pages/productFilter.d.ts +0 -3
- package/dist/Pages/productFilter.js +0 -202
- package/dist/Pages/progressbar.d.ts +0 -3
- package/dist/Pages/progressbar.js +0 -12
- package/dist/Pages/radioButton.d.ts +0 -3
- package/dist/Pages/radioButton.js +0 -54
- package/dist/Pages/search.d.ts +0 -3
- package/dist/Pages/search.js +0 -54
- package/dist/Pages/searchSelect.d.ts +0 -3
- package/dist/Pages/searchSelect.js +0 -133
- package/dist/Pages/select.d.ts +0 -3
- package/dist/Pages/select.js +0 -53
- package/dist/Pages/selectSearch.d.ts +0 -3
- package/dist/Pages/selectSearch.js +0 -103
- package/dist/Pages/skeleton.d.ts +0 -3
- package/dist/Pages/skeleton.js +0 -22
- package/dist/Pages/switch.d.ts +0 -3
- package/dist/Pages/switch.js +0 -50
- package/dist/Pages/table.d.ts +0 -3
- package/dist/Pages/table.js +0 -174
- package/dist/Pages/textArea.d.ts +0 -3
- package/dist/Pages/textArea.js +0 -15
- package/dist/Pages/timeline.d.ts +0 -3
- package/dist/Pages/timeline.js +0 -74
- package/dist/Pages/tooltip.d.ts +0 -3
- package/dist/Pages/tooltip.js +0 -12
- package/dist/Pages/toster.d.ts +0 -3
- package/dist/Pages/toster.js +0 -68
- package/dist/Pages/verifyEmail.d.ts +0 -3
- package/dist/Pages/verifyEmail.js +0 -18
- package/dist/Theme/Dark/palette.d.ts +0 -370
- package/dist/Theme/Dark/palette.js +0 -372
- package/dist/bootstrap.d.ts +0 -1
- package/dist/bootstrap.js +0 -14
- package/dist/components-v2/AlertDialog/AlertDialog.d.ts +0 -23
- package/dist/components-v2/AlertDialog/AlertDialog.js +0 -98
- package/dist/components-v2/Breadcrumbs/Breadcrumbs.d.ts +0 -14
- package/dist/components-v2/Breadcrumbs/Breadcrumbs.js +0 -66
- package/dist/components-v2/Charts/AreaChart.d.ts +0 -23
- package/dist/components-v2/Charts/AreaChart.js +0 -63
- package/dist/components-v2/Charts/BarChart.d.ts +0 -25
- package/dist/components-v2/Charts/BarChart.js +0 -57
- package/dist/components-v2/Charts/LineChart.d.ts +0 -23
- package/dist/components-v2/Charts/LineChart.js +0 -55
- package/dist/components-v2/Charts/PieChart.d.ts +0 -15
- package/dist/components-v2/Charts/PieChart.js +0 -54
- package/dist/components-v2/Charts/PolarChart.d.ts +0 -14
- package/dist/components-v2/Charts/PolarChart.js +0 -54
- package/dist/components-v2/Charts/chartOptions.d.ts +0 -7
- package/dist/components-v2/Charts/chartOptions.js +0 -41
- package/dist/components-v2/Charts/useChartTheme.d.ts +0 -22
- package/dist/components-v2/Charts/useChartTheme.js +0 -106
- package/dist/components-v2/ContactForm/ContactForm.d.ts +0 -25
- package/dist/components-v2/ContactForm/ContactForm.js +0 -116
- package/dist/components-v2/DatePicker/Calendar.d.ts +0 -19
- package/dist/components-v2/DatePicker/Calendar.js +0 -212
- package/dist/components-v2/DatePicker/DatePicker.d.ts +0 -46
- package/dist/components-v2/DatePicker/DatePicker.js +0 -189
- package/dist/components-v2/DatePicker/TimePicker.d.ts +0 -12
- package/dist/components-v2/DatePicker/TimePicker.js +0 -105
- package/dist/components-v2/DatePicker/utils.d.ts +0 -31
- package/dist/components-v2/DatePicker/utils.js +0 -109
- package/dist/components-v2/Drawer/Drawer.d.ts +0 -27
- package/dist/components-v2/Drawer/Drawer.js +0 -132
- package/dist/components-v2/FeedbackForm/FeedbackForm.d.ts +0 -26
- package/dist/components-v2/FeedbackForm/FeedbackForm.js +0 -112
- package/dist/components-v2/FileUploader/FileUploader.d.ts +0 -28
- package/dist/components-v2/FileUploader/FileUploader.js +0 -127
- package/dist/components-v2/Input/TextInput.d.ts +0 -41
- package/dist/components-v2/Input/TextInput.js +0 -169
- package/dist/components-v2/KanbanBoard/KanbanBoard.d.ts +0 -39
- package/dist/components-v2/KanbanBoard/KanbanBoard.js +0 -101
- package/dist/components-v2/Layout/AppLayout.d.ts +0 -22
- package/dist/components-v2/Layout/AppLayout.js +0 -53
- package/dist/components-v2/Loading/Loading.d.ts +0 -19
- package/dist/components-v2/Loading/Loading.js +0 -55
- package/dist/components-v2/Modal/Modal.d.ts +0 -30
- package/dist/components-v2/Modal/Modal.js +0 -82
- package/dist/components-v2/NavigationBar/NavigationBar.d.ts +0 -47
- package/dist/components-v2/NavigationBar/NavigationBar.js +0 -148
- package/dist/components-v2/Notification/Notification.d.ts +0 -22
- package/dist/components-v2/Notification/Notification.js +0 -113
- package/dist/components-v2/NumberInput/NumberInput.d.ts +0 -37
- package/dist/components-v2/NumberInput/NumberInput.js +0 -210
- package/dist/components-v2/PinInput/PinInput.d.ts +0 -26
- package/dist/components-v2/PinInput/PinInput.js +0 -138
- package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +0 -18
- package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.js +0 -91
- package/dist/components-v2/Select/Select.d.ts +0 -41
- package/dist/components-v2/Select/Select.js +0 -284
- package/dist/components-v2/Sidebar/Sidebar.d.ts +0 -41
- package/dist/components-v2/Sidebar/Sidebar.js +0 -182
- package/dist/components-v2/Slider/Slider.d.ts +0 -18
- package/dist/components-v2/Slider/Slider.js +0 -101
- package/dist/components-v2/Table/Table.d.ts +0 -7
- package/dist/components-v2/Table/Table.js +0 -172
- package/dist/components-v2/Table/TableProps.d.ts +0 -139
- package/dist/components-v2/Table/TableProps.js +0 -9
- package/dist/components-v2/Table/components/ActiveFilters.d.ts +0 -10
- package/dist/components-v2/Table/components/ActiveFilters.js +0 -70
- package/dist/components-v2/Table/components/BulkActionBar.d.ts +0 -11
- package/dist/components-v2/Table/components/BulkActionBar.js +0 -92
- package/dist/components-v2/Table/components/ColumnResizeHandle.d.ts +0 -7
- package/dist/components-v2/Table/components/ColumnResizeHandle.js +0 -41
- package/dist/components-v2/Table/components/Pagination.d.ts +0 -11
- package/dist/components-v2/Table/components/Pagination.js +0 -92
- package/dist/components-v2/Table/components/TableBody.d.ts +0 -23
- package/dist/components-v2/Table/components/TableBody.js +0 -69
- package/dist/components-v2/Table/components/TableCell.d.ts +0 -14
- package/dist/components-v2/Table/components/TableCell.js +0 -63
- package/dist/components-v2/Table/components/TableEmptyState.d.ts +0 -12
- package/dist/components-v2/Table/components/TableEmptyState.js +0 -55
- package/dist/components-v2/Table/components/TableErrorState.d.ts +0 -6
- package/dist/components-v2/Table/components/TableErrorState.js +0 -52
- package/dist/components-v2/Table/components/TableHeader.d.ts +0 -21
- package/dist/components-v2/Table/components/TableHeader.js +0 -94
- package/dist/components-v2/Table/components/TableRow.d.ts +0 -20
- package/dist/components-v2/Table/components/TableRow.js +0 -64
- package/dist/components-v2/Table/components/TableSearch.d.ts +0 -8
- package/dist/components-v2/Table/components/TableSearch.js +0 -47
- package/dist/components-v2/Table/filters/FilterChips.d.ts +0 -6
- package/dist/components-v2/Table/filters/FilterChips.js +0 -9
- package/dist/components-v2/Table/filters/LeftFilterPane.d.ts +0 -17
- package/dist/components-v2/Table/filters/LeftFilterPane.js +0 -105
- package/dist/components-v2/Table/filters/TableFilters.d.ts +0 -12
- package/dist/components-v2/Table/filters/TableFilters.js +0 -127
- package/dist/components-v2/Table/hooks/useColumnResize.d.ts +0 -15
- package/dist/components-v2/Table/hooks/useColumnResize.js +0 -104
- package/dist/components-v2/Table/hooks/useTable.d.ts +0 -58
- package/dist/components-v2/Table/hooks/useTable.js +0 -254
- package/dist/components-v2/Table/hooks/useTableKeyboard.d.ts +0 -25
- package/dist/components-v2/Table/hooks/useTableKeyboard.js +0 -112
- package/dist/components-v2/Table/hooks/useVirtualScroll.d.ts +0 -29
- package/dist/components-v2/Table/hooks/useVirtualScroll.js +0 -83
- package/dist/components-v2/Table/settings/ManageColumns.d.ts +0 -12
- package/dist/components-v2/Table/settings/ManageColumns.js +0 -59
- package/dist/components-v2/Table/settings/TableSettings.d.ts +0 -12
- package/dist/components-v2/Table/settings/TableSettings.js +0 -57
- package/dist/components-v2/Table/utils/filterUtils.d.ts +0 -7
- package/dist/components-v2/Table/utils/filterUtils.js +0 -149
- package/dist/components-v2/Table/utils/sortUtils.d.ts +0 -6
- package/dist/components-v2/Table/utils/sortUtils.js +0 -65
- package/dist/components-v2/Tag/Tag.d.ts +0 -15
- package/dist/components-v2/Tag/Tag.js +0 -87
- package/dist/components-v2/Timeline/Timeline.d.ts +0 -18
- package/dist/components-v2/Timeline/Timeline.js +0 -76
- package/dist/components-v2/Toaster/Toaster.d.ts +0 -61
- package/dist/components-v2/Toaster/Toaster.js +0 -63
- package/dist/components-v2/Toggle/Toggle.d.ts +0 -28
- package/dist/components-v2/Toggle/Toggle.js +0 -90
- package/dist/components-v2/ui/accordion.d.ts +0 -12
- package/dist/components-v2/ui/accordion.js +0 -104
- package/dist/components-v2/ui/alert.d.ts +0 -18
- package/dist/components-v2/ui/alert.js +0 -99
- package/dist/components-v2/ui/avatar.d.ts +0 -12
- package/dist/components-v2/ui/avatar.js +0 -80
- package/dist/components-v2/ui/badge.d.ts +0 -10
- package/dist/components-v2/ui/badge.js +0 -76
- package/dist/components-v2/ui/button.d.ts +0 -18
- package/dist/components-v2/ui/button.js +0 -97
- package/dist/components-v2/ui/checkbox.d.ts +0 -15
- package/dist/components-v2/ui/checkbox.js +0 -86
- package/dist/components-v2/ui/dialog.d.ts +0 -30
- package/dist/components-v2/ui/dialog.js +0 -115
- package/dist/components-v2/ui/dropdown-menu.d.ts +0 -26
- package/dist/components-v2/ui/dropdown-menu.js +0 -121
- package/dist/components-v2/ui/field.d.ts +0 -32
- package/dist/components-v2/ui/field.js +0 -62
- package/dist/components-v2/ui/form-field.d.ts +0 -25
- package/dist/components-v2/ui/form-field.js +0 -96
- package/dist/components-v2/ui/input.d.ts +0 -9
- package/dist/components-v2/ui/input.js +0 -73
- package/dist/components-v2/ui/label.d.ts +0 -10
- package/dist/components-v2/ui/label.js +0 -70
- package/dist/components-v2/ui/popover.d.ts +0 -9
- package/dist/components-v2/ui/popover.js +0 -60
- package/dist/components-v2/ui/progress.d.ts +0 -12
- package/dist/components-v2/ui/progress.js +0 -75
- package/dist/components-v2/ui/radio-group.d.ts +0 -17
- package/dist/components-v2/ui/radio-group.js +0 -91
- package/dist/components-v2/ui/select.d.ts +0 -24
- package/dist/components-v2/ui/select.js +0 -122
- package/dist/components-v2/ui/separator.d.ts +0 -5
- package/dist/components-v2/ui/separator.js +0 -55
- package/dist/components-v2/ui/skeleton.d.ts +0 -9
- package/dist/components-v2/ui/skeleton.js +0 -68
- package/dist/components-v2/ui/spinner.d.ts +0 -16
- package/dist/components-v2/ui/spinner.js +0 -64
- package/dist/components-v2/ui/switch.d.ts +0 -10
- package/dist/components-v2/ui/switch.js +0 -81
- package/dist/components-v2/ui/tabs.d.ts +0 -13
- package/dist/components-v2/ui/tabs.js +0 -95
- package/dist/components-v2/ui/textarea.d.ts +0 -10
- package/dist/components-v2/ui/textarea.js +0 -96
- package/dist/components-v2/ui/tooltip.d.ts +0 -17
- package/dist/components-v2/ui/tooltip.js +0 -75
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +0 -8
- package/dist/theme-v2/ThemeProvider.d.ts +0 -19
- package/dist/theme-v2/ThemeProvider.js +0 -149
- package/dist/theme-v2/dark.css +0 -47
- package/dist/theme-v2/tokens.css +0 -72
- /package/dist/Components/Table/{Components → components}/HeaderActions.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/HeaderActions.js +0 -0
- /package/dist/Components/Table/{Components → components}/Pagination.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/Pagination.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableActions.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableActions.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.virtualize.test.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.virtualize.test.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableGroupRow.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableGroupRow.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableHeader.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableHeader.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableLoading.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableLoading.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableSearch.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableSearch.js +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ManageColumns = ManageColumns;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const lucide_react_1 = require("lucide-react");
|
|
39
|
-
const button_1 = require("../../ui/button");
|
|
40
|
-
const checkbox_1 = require("../../ui/checkbox");
|
|
41
|
-
const popover_1 = require("../../ui/popover");
|
|
42
|
-
/**
|
|
43
|
-
* Toolbar dropdown for toggling column visibility. Columns with
|
|
44
|
-
* `enableHiding === false` are non-toggleable.
|
|
45
|
-
*/
|
|
46
|
-
function ManageColumns({ columns, columnVisibility, onChange, }) {
|
|
47
|
-
return (React.createElement(popover_1.Popover, null,
|
|
48
|
-
React.createElement(popover_1.PopoverTrigger, { asChild: true },
|
|
49
|
-
React.createElement(button_1.Button, { variant: "outline", size: "sm", leftIcon: React.createElement(lucide_react_1.Columns3, null), "aria-label": "Manage columns" }, "Columns")),
|
|
50
|
-
React.createElement(popover_1.PopoverContent, { align: "end", className: "w-56 p-2" },
|
|
51
|
-
React.createElement("div", { className: "px-1 py-1 text-xs font-medium text-muted-foreground" }, "Toggle columns"),
|
|
52
|
-
React.createElement("div", { className: "max-h-64 overflow-y-auto" }, columns.map((column) => {
|
|
53
|
-
const visible = columnVisibility[column.id] !== false;
|
|
54
|
-
const disabled = column.enableHiding === false;
|
|
55
|
-
return (React.createElement("label", { key: column.id, className: "flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1.5 hover:bg-accent" },
|
|
56
|
-
React.createElement(checkbox_1.Checkbox, { size: "sm", checked: visible, disabled: disabled, onCheckedChange: (checked) => onChange(column.id, checked !== true), "aria-label": `Toggle ${column.header} column` }),
|
|
57
|
-
React.createElement("span", { className: "flex-1 truncate text-sm" }, column.header)));
|
|
58
|
-
})))));
|
|
59
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { Density } from "../TableProps";
|
|
3
|
-
export interface TableSettingsProps {
|
|
4
|
-
density: Density;
|
|
5
|
-
onDensityChange: (density: Density) => void;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Density / row-height controls. Lives in the toolbar next to the columns
|
|
9
|
-
* dropdown; consumers can hide it by passing `showDensityToggle={false}` on
|
|
10
|
-
* the parent (handled at the Table level).
|
|
11
|
-
*/
|
|
12
|
-
export declare function TableSettings({ density, onDensityChange, }: TableSettingsProps): React.ReactElement;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TableSettings = TableSettings;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const lucide_react_1 = require("lucide-react");
|
|
39
|
-
const button_1 = require("../../ui/button");
|
|
40
|
-
const dropdown_menu_1 = require("../../ui/dropdown-menu");
|
|
41
|
-
/**
|
|
42
|
-
* Density / row-height controls. Lives in the toolbar next to the columns
|
|
43
|
-
* dropdown; consumers can hide it by passing `showDensityToggle={false}` on
|
|
44
|
-
* the parent (handled at the Table level).
|
|
45
|
-
*/
|
|
46
|
-
function TableSettings({ density, onDensityChange, }) {
|
|
47
|
-
return (React.createElement(dropdown_menu_1.DropdownMenu, null,
|
|
48
|
-
React.createElement(dropdown_menu_1.DropdownMenuTrigger, { asChild: true },
|
|
49
|
-
React.createElement(button_1.Button, { variant: "outline", size: "sm", leftIcon: React.createElement(lucide_react_1.Settings2, null), "aria-label": "Table settings" }, "Density")),
|
|
50
|
-
React.createElement(dropdown_menu_1.DropdownMenuContent, { align: "end", className: "w-48" },
|
|
51
|
-
React.createElement(dropdown_menu_1.DropdownMenuLabel, null, "Row density"),
|
|
52
|
-
React.createElement(dropdown_menu_1.DropdownMenuSeparator, null),
|
|
53
|
-
React.createElement(dropdown_menu_1.DropdownMenuRadioGroup, { value: density, onValueChange: (value) => onDensityChange(value) },
|
|
54
|
-
React.createElement(dropdown_menu_1.DropdownMenuRadioItem, { value: "compact" }, "Compact"),
|
|
55
|
-
React.createElement(dropdown_menu_1.DropdownMenuRadioItem, { value: "default" }, "Default"),
|
|
56
|
-
React.createElement(dropdown_menu_1.DropdownMenuRadioItem, { value: "comfortable" }, "Comfortable")))));
|
|
57
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ActiveFilter, ColumnDef, FilterOperator } from "../TableProps";
|
|
2
|
-
export declare function filterData<T>(data: T[], filters: ActiveFilter[], columns: ColumnDef<T>[]): T[];
|
|
3
|
-
export declare function searchData<T>(data: T[], query: string, columns: ColumnDef<T>[]): T[];
|
|
4
|
-
export declare function defaultOperatorFor(type: ColumnDef["type"] | undefined): FilterOperator;
|
|
5
|
-
export declare const FILTER_OPERATORS_BY_TYPE: Record<NonNullable<ColumnDef["type"]>, FilterOperator[]>;
|
|
6
|
-
export declare const OPERATOR_LABELS: Record<FilterOperator, string>;
|
|
7
|
-
export declare function operatorNeedsValue(op: FilterOperator): boolean;
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OPERATOR_LABELS = exports.FILTER_OPERATORS_BY_TYPE = void 0;
|
|
4
|
-
exports.filterData = filterData;
|
|
5
|
-
exports.searchData = searchData;
|
|
6
|
-
exports.defaultOperatorFor = defaultOperatorFor;
|
|
7
|
-
exports.operatorNeedsValue = operatorNeedsValue;
|
|
8
|
-
const sortUtils_1 = require("./sortUtils");
|
|
9
|
-
function asString(value) {
|
|
10
|
-
if (value === null || value === undefined)
|
|
11
|
-
return "";
|
|
12
|
-
return String(value).toLowerCase();
|
|
13
|
-
}
|
|
14
|
-
function asNumber(value) {
|
|
15
|
-
if (typeof value === "number")
|
|
16
|
-
return value;
|
|
17
|
-
const n = parseFloat(String(value));
|
|
18
|
-
return Number.isNaN(n) ? NaN : n;
|
|
19
|
-
}
|
|
20
|
-
function applyOperator(cellValue, operator, filterValue) {
|
|
21
|
-
const isEmpty = cellValue === null || cellValue === undefined || cellValue === "";
|
|
22
|
-
switch (operator) {
|
|
23
|
-
case "is_empty":
|
|
24
|
-
return isEmpty;
|
|
25
|
-
case "is_not_empty":
|
|
26
|
-
return !isEmpty;
|
|
27
|
-
case "equals":
|
|
28
|
-
return cellValue === filterValue;
|
|
29
|
-
case "not_equals":
|
|
30
|
-
return cellValue !== filterValue;
|
|
31
|
-
case "contains":
|
|
32
|
-
return asString(cellValue).includes(asString(filterValue));
|
|
33
|
-
case "not_contains":
|
|
34
|
-
return !asString(cellValue).includes(asString(filterValue));
|
|
35
|
-
case "starts_with":
|
|
36
|
-
return asString(cellValue).startsWith(asString(filterValue));
|
|
37
|
-
case "ends_with":
|
|
38
|
-
return asString(cellValue).endsWith(asString(filterValue));
|
|
39
|
-
case "greater_than": {
|
|
40
|
-
const a = asNumber(cellValue);
|
|
41
|
-
const b = asNumber(filterValue);
|
|
42
|
-
return !Number.isNaN(a) && !Number.isNaN(b) && a > b;
|
|
43
|
-
}
|
|
44
|
-
case "less_than": {
|
|
45
|
-
const a = asNumber(cellValue);
|
|
46
|
-
const b = asNumber(filterValue);
|
|
47
|
-
return !Number.isNaN(a) && !Number.isNaN(b) && a < b;
|
|
48
|
-
}
|
|
49
|
-
case "between": {
|
|
50
|
-
if (!Array.isArray(filterValue) || filterValue.length !== 2)
|
|
51
|
-
return true;
|
|
52
|
-
const a = asNumber(cellValue);
|
|
53
|
-
const lo = asNumber(filterValue[0]);
|
|
54
|
-
const hi = asNumber(filterValue[1]);
|
|
55
|
-
return !Number.isNaN(a) && a >= lo && a <= hi;
|
|
56
|
-
}
|
|
57
|
-
case "in":
|
|
58
|
-
return Array.isArray(filterValue) && filterValue.includes(cellValue);
|
|
59
|
-
case "not_in":
|
|
60
|
-
return Array.isArray(filterValue) && !filterValue.includes(cellValue);
|
|
61
|
-
default:
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function filterData(data, filters, columns) {
|
|
66
|
-
if (filters.length === 0)
|
|
67
|
-
return data;
|
|
68
|
-
return data.filter((row) => filters.every((filter) => {
|
|
69
|
-
const column = columns.find((c) => c.id === filter.columnId);
|
|
70
|
-
if (!column)
|
|
71
|
-
return true;
|
|
72
|
-
const cellValue = (0, sortUtils_1.getRowValue)(row, column);
|
|
73
|
-
return applyOperator(cellValue, filter.operator, filter.value);
|
|
74
|
-
}));
|
|
75
|
-
}
|
|
76
|
-
function searchData(data, query, columns) {
|
|
77
|
-
if (!query.trim())
|
|
78
|
-
return data;
|
|
79
|
-
const q = query.toLowerCase();
|
|
80
|
-
return data.filter((row) => columns.some((column) => {
|
|
81
|
-
const value = (0, sortUtils_1.getRowValue)(row, column);
|
|
82
|
-
return asString(value).includes(q);
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
function defaultOperatorFor(type) {
|
|
86
|
-
switch (type) {
|
|
87
|
-
case "number":
|
|
88
|
-
return "equals";
|
|
89
|
-
case "date":
|
|
90
|
-
return "equals";
|
|
91
|
-
case "boolean":
|
|
92
|
-
return "equals";
|
|
93
|
-
case "select":
|
|
94
|
-
return "in";
|
|
95
|
-
default:
|
|
96
|
-
return "contains";
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
exports.FILTER_OPERATORS_BY_TYPE = {
|
|
100
|
-
text: [
|
|
101
|
-
"contains",
|
|
102
|
-
"not_contains",
|
|
103
|
-
"equals",
|
|
104
|
-
"not_equals",
|
|
105
|
-
"starts_with",
|
|
106
|
-
"ends_with",
|
|
107
|
-
"is_empty",
|
|
108
|
-
"is_not_empty",
|
|
109
|
-
],
|
|
110
|
-
number: [
|
|
111
|
-
"equals",
|
|
112
|
-
"not_equals",
|
|
113
|
-
"greater_than",
|
|
114
|
-
"less_than",
|
|
115
|
-
"between",
|
|
116
|
-
"is_empty",
|
|
117
|
-
"is_not_empty",
|
|
118
|
-
],
|
|
119
|
-
date: [
|
|
120
|
-
"equals",
|
|
121
|
-
"not_equals",
|
|
122
|
-
"greater_than",
|
|
123
|
-
"less_than",
|
|
124
|
-
"between",
|
|
125
|
-
"is_empty",
|
|
126
|
-
"is_not_empty",
|
|
127
|
-
],
|
|
128
|
-
boolean: ["equals", "not_equals"],
|
|
129
|
-
select: ["in", "not_in", "is_empty", "is_not_empty"],
|
|
130
|
-
custom: ["contains", "equals", "is_empty", "is_not_empty"],
|
|
131
|
-
};
|
|
132
|
-
exports.OPERATOR_LABELS = {
|
|
133
|
-
equals: "Equals",
|
|
134
|
-
not_equals: "Does not equal",
|
|
135
|
-
contains: "Contains",
|
|
136
|
-
not_contains: "Does not contain",
|
|
137
|
-
starts_with: "Starts with",
|
|
138
|
-
ends_with: "Ends with",
|
|
139
|
-
greater_than: "Greater than",
|
|
140
|
-
less_than: "Less than",
|
|
141
|
-
between: "Between",
|
|
142
|
-
is_empty: "Is empty",
|
|
143
|
-
is_not_empty: "Is not empty",
|
|
144
|
-
in: "In",
|
|
145
|
-
not_in: "Not in",
|
|
146
|
-
};
|
|
147
|
-
function operatorNeedsValue(op) {
|
|
148
|
-
return op !== "is_empty" && op !== "is_not_empty";
|
|
149
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ColumnDef, RowKey, SortDirection, SortState } from "../TableProps";
|
|
2
|
-
export declare function getRowValue<T>(row: T, column: Pick<ColumnDef<T>, "accessorKey" | "accessorFn">): unknown;
|
|
3
|
-
export declare function resolveRowKey<T>(row: T, rowKey: RowKey<T>): string | number;
|
|
4
|
-
export declare function sortData<T>(data: T[], sort: SortState | null, columns: ColumnDef<T>[]): T[];
|
|
5
|
-
/** Cycle: null → asc → desc → null */
|
|
6
|
-
export declare function nextSortDirection(current: SortDirection): SortDirection;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRowValue = getRowValue;
|
|
4
|
-
exports.resolveRowKey = resolveRowKey;
|
|
5
|
-
exports.sortData = sortData;
|
|
6
|
-
exports.nextSortDirection = nextSortDirection;
|
|
7
|
-
function getRowValue(row, column) {
|
|
8
|
-
if (column.accessorFn)
|
|
9
|
-
return column.accessorFn(row);
|
|
10
|
-
if (column.accessorKey !== undefined) {
|
|
11
|
-
return row[column.accessorKey];
|
|
12
|
-
}
|
|
13
|
-
return undefined;
|
|
14
|
-
}
|
|
15
|
-
function resolveRowKey(row, rowKey) {
|
|
16
|
-
if (typeof rowKey === "function")
|
|
17
|
-
return rowKey(row);
|
|
18
|
-
const value = row[rowKey];
|
|
19
|
-
if (typeof value === "string" || typeof value === "number")
|
|
20
|
-
return value;
|
|
21
|
-
return String(value);
|
|
22
|
-
}
|
|
23
|
-
function compareValues(a, b) {
|
|
24
|
-
if (a === b)
|
|
25
|
-
return 0;
|
|
26
|
-
if (a === null || a === undefined)
|
|
27
|
-
return 1;
|
|
28
|
-
if (b === null || b === undefined)
|
|
29
|
-
return -1;
|
|
30
|
-
if (typeof a === "number" && typeof b === "number")
|
|
31
|
-
return a - b;
|
|
32
|
-
if (a instanceof Date && b instanceof Date)
|
|
33
|
-
return a.getTime() - b.getTime();
|
|
34
|
-
if (typeof a === "boolean" && typeof b === "boolean") {
|
|
35
|
-
return a === b ? 0 : a ? 1 : -1;
|
|
36
|
-
}
|
|
37
|
-
return String(a).localeCompare(String(b), undefined, {
|
|
38
|
-
numeric: true,
|
|
39
|
-
sensitivity: "base",
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
function sortData(data, sort, columns) {
|
|
43
|
-
if (!sort || sort.direction === null)
|
|
44
|
-
return data;
|
|
45
|
-
const column = columns.find((c) => c.id === sort.id);
|
|
46
|
-
if (!column)
|
|
47
|
-
return data;
|
|
48
|
-
const direction = sort.direction === "asc" ? 1 : -1;
|
|
49
|
-
const indexed = data.map((row, index) => ({ row, index }));
|
|
50
|
-
indexed.sort((a, b) => {
|
|
51
|
-
const valueA = getRowValue(a.row, column);
|
|
52
|
-
const valueB = getRowValue(b.row, column);
|
|
53
|
-
const result = compareValues(valueA, valueB);
|
|
54
|
-
return result === 0 ? a.index - b.index : result * direction;
|
|
55
|
-
});
|
|
56
|
-
return indexed.map((entry) => entry.row);
|
|
57
|
-
}
|
|
58
|
-
/** Cycle: null → asc → desc → null */
|
|
59
|
-
function nextSortDirection(current) {
|
|
60
|
-
if (current === null)
|
|
61
|
-
return "asc";
|
|
62
|
-
if (current === "asc")
|
|
63
|
-
return "desc";
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const tagVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "secondary" | "outline" | "destructive" | "success" | "warning" | null | undefined;
|
|
5
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children">, VariantProps<typeof tagVariants> {
|
|
8
|
-
label: React.ReactNode;
|
|
9
|
-
icon?: React.ReactNode;
|
|
10
|
-
/** If provided, renders a × button that calls this. */
|
|
11
|
-
onRemove?: () => void;
|
|
12
|
-
removeLabel?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
-
export { tagVariants };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
-
var t = {};
|
|
37
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
-
t[p] = s[p];
|
|
39
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
-
t[p[i]] = s[p[i]];
|
|
43
|
-
}
|
|
44
|
-
return t;
|
|
45
|
-
};
|
|
46
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.tagVariants = exports.Tag = void 0;
|
|
48
|
-
const React = __importStar(require("react"));
|
|
49
|
-
const lucide_react_1 = require("lucide-react");
|
|
50
|
-
const class_variance_authority_1 = require("class-variance-authority");
|
|
51
|
-
const utils_1 = require("../../lib/utils");
|
|
52
|
-
const tagVariants = (0, class_variance_authority_1.cva)((0, utils_1.cn)("inline-flex items-center gap-1 rounded-full font-medium transition-colors", "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-1 focus-within:ring-offset-background"), {
|
|
53
|
-
variants: {
|
|
54
|
-
variant: {
|
|
55
|
-
default: "bg-primary/10 text-primary",
|
|
56
|
-
secondary: "bg-secondary text-secondary-foreground",
|
|
57
|
-
outline: "border border-border bg-transparent text-foreground",
|
|
58
|
-
success: "bg-success/15 text-success",
|
|
59
|
-
warning: "bg-warning/15 text-warning",
|
|
60
|
-
destructive: "bg-destructive/15 text-destructive",
|
|
61
|
-
},
|
|
62
|
-
size: {
|
|
63
|
-
sm: "px-2 py-0.5 text-[11px]",
|
|
64
|
-
md: "px-2.5 py-1 text-xs",
|
|
65
|
-
lg: "px-3 py-1 text-sm",
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
defaultVariants: {
|
|
69
|
-
variant: "default",
|
|
70
|
-
size: "md",
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
exports.tagVariants = tagVariants;
|
|
74
|
-
exports.Tag = React.forwardRef((_a, ref) => {
|
|
75
|
-
var { className, variant, size, label, icon, onRemove, removeLabel } = _a, rest = __rest(_a, ["className", "variant", "size", "label", "icon", "onRemove", "removeLabel"]);
|
|
76
|
-
return (React.createElement("span", Object.assign({ ref: ref, className: (0, utils_1.cn)(tagVariants({ variant, size }), className) }, rest),
|
|
77
|
-
icon,
|
|
78
|
-
React.createElement("span", null, label),
|
|
79
|
-
onRemove && (React.createElement("button", { type: "button", "aria-label": removeLabel !== null && removeLabel !== void 0 ? removeLabel : (typeof label === "string"
|
|
80
|
-
? `Remove ${label}`
|
|
81
|
-
: "Remove tag"), onClick: (event) => {
|
|
82
|
-
event.stopPropagation();
|
|
83
|
-
onRemove();
|
|
84
|
-
}, className: "ml-0.5 rounded-sm hover:bg-foreground/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-current" },
|
|
85
|
-
React.createElement(lucide_react_1.X, { "aria-hidden": "true", className: "h-3 w-3" })))));
|
|
86
|
-
});
|
|
87
|
-
exports.Tag.displayName = "Tag";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type LucideIcon } from "lucide-react";
|
|
3
|
-
export type TimelineVariant = "default" | "success" | "warning" | "destructive";
|
|
4
|
-
export type TimelineItemState = "past" | "current" | "future";
|
|
5
|
-
export interface TimelineItem {
|
|
6
|
-
id: string | number;
|
|
7
|
-
title: React.ReactNode;
|
|
8
|
-
description?: React.ReactNode;
|
|
9
|
-
timestamp?: React.ReactNode;
|
|
10
|
-
icon?: LucideIcon;
|
|
11
|
-
variant?: TimelineVariant;
|
|
12
|
-
/** Controls connector style (dashed for future/pending). */
|
|
13
|
-
state?: TimelineItemState;
|
|
14
|
-
}
|
|
15
|
-
export interface TimelineProps extends React.HTMLAttributes<HTMLOListElement> {
|
|
16
|
-
items: TimelineItem[];
|
|
17
|
-
}
|
|
18
|
-
export declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLOListElement>>;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
-
var t = {};
|
|
37
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
-
t[p] = s[p];
|
|
39
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
-
t[p[i]] = s[p[i]];
|
|
43
|
-
}
|
|
44
|
-
return t;
|
|
45
|
-
};
|
|
46
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.Timeline = void 0;
|
|
48
|
-
const React = __importStar(require("react"));
|
|
49
|
-
const lucide_react_1 = require("lucide-react");
|
|
50
|
-
const utils_1 = require("../../lib/utils");
|
|
51
|
-
const DOT_STYLES = {
|
|
52
|
-
default: "border-primary text-primary",
|
|
53
|
-
success: "border-success text-success",
|
|
54
|
-
warning: "border-warning text-warning",
|
|
55
|
-
destructive: "border-destructive text-destructive",
|
|
56
|
-
};
|
|
57
|
-
exports.Timeline = React.forwardRef((_a, ref) => {
|
|
58
|
-
var { items, className } = _a, rest = __rest(_a, ["items", "className"]);
|
|
59
|
-
return (React.createElement("ol", Object.assign({ ref: ref, className: (0, utils_1.cn)("relative space-y-6 pl-6", className) }, rest), items.map((item, index) => {
|
|
60
|
-
var _a, _b;
|
|
61
|
-
const isLast = index === items.length - 1;
|
|
62
|
-
const variant = (_a = item.variant) !== null && _a !== void 0 ? _a : "default";
|
|
63
|
-
const IconComponent = (_b = item.icon) !== null && _b !== void 0 ? _b : lucide_react_1.CircleDot;
|
|
64
|
-
return (React.createElement("li", { key: item.id, className: "relative" },
|
|
65
|
-
!isLast && (React.createElement("span", { "aria-hidden": "true", className: (0, utils_1.cn)("absolute left-[-1.4rem] top-5 h-[calc(100%+1rem)] w-px", item.state === "future"
|
|
66
|
-
? "border-l border-dashed border-border bg-transparent"
|
|
67
|
-
: "bg-border") })),
|
|
68
|
-
React.createElement("span", { "aria-hidden": "true", className: (0, utils_1.cn)("absolute left-[-1.875rem] top-1 grid h-5 w-5 place-items-center rounded-full border-2 bg-background", DOT_STYLES[variant], item.state === "future" && "opacity-60") },
|
|
69
|
-
React.createElement(IconComponent, { className: "h-2.5 w-2.5" })),
|
|
70
|
-
React.createElement("div", { className: "space-y-0.5" },
|
|
71
|
-
React.createElement("p", { className: "text-sm font-medium text-foreground" }, item.title),
|
|
72
|
-
item.timestamp && (React.createElement("p", { className: "text-xs text-muted-foreground" }, item.timestamp)),
|
|
73
|
-
item.description && (React.createElement("p", { className: "text-sm text-muted-foreground" }, item.description)))));
|
|
74
|
-
})));
|
|
75
|
-
});
|
|
76
|
-
exports.Timeline.displayName = "Timeline";
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Toaster as SonnerToaster } from "sonner";
|
|
3
|
-
export type ToasterPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
4
|
-
export interface ToasterProps extends Omit<React.ComponentProps<typeof SonnerToaster>, "theme" | "position"> {
|
|
5
|
-
position?: ToasterPosition;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Mount point for toast notifications. Place once in the app root (inside the
|
|
9
|
-
* ThemeProvider). Themed via CSS variables so it tracks the active preset and
|
|
10
|
-
* dark-mode state automatically.
|
|
11
|
-
*/
|
|
12
|
-
export declare function Toaster({ position, toastOptions, ...rest }: ToasterProps): React.ReactElement;
|
|
13
|
-
export declare namespace Toaster {
|
|
14
|
-
var displayName: string;
|
|
15
|
-
}
|
|
16
|
-
export declare const toast: ((message: React.ReactNode | (() => React.ReactNode), data?: import("sonner").ExternalToast) => string | number) & {
|
|
17
|
-
success: (message: (React.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import("sonner").ExternalToast) => string | number;
|
|
18
|
-
info: (message: (React.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import("sonner").ExternalToast) => string | number;
|
|
19
|
-
warning: (message: (React.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import("sonner").ExternalToast) => string | number;
|
|
20
|
-
error: (message: (React.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import("sonner").ExternalToast) => string | number;
|
|
21
|
-
custom: (jsx: (id: number | string) => React.ReactElement, data?: import("sonner").ExternalToast) => string | number;
|
|
22
|
-
message: (message: (React.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import("sonner").ExternalToast) => string | number;
|
|
23
|
-
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: {
|
|
24
|
-
style?: React.CSSProperties | undefined;
|
|
25
|
-
id?: number | string | undefined;
|
|
26
|
-
className?: string | undefined;
|
|
27
|
-
action?: React.ReactNode | import("sonner").Action;
|
|
28
|
-
onDismiss?: ((toast: import("sonner").ToastT) => void) | undefined;
|
|
29
|
-
position?: ("top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right") | undefined;
|
|
30
|
-
icon?: React.ReactNode;
|
|
31
|
-
duration?: number | undefined;
|
|
32
|
-
cancel?: React.ReactNode | import("sonner").Action;
|
|
33
|
-
invert?: boolean | undefined;
|
|
34
|
-
richColors?: boolean | undefined;
|
|
35
|
-
closeButton?: boolean | undefined;
|
|
36
|
-
dismissible?: boolean | undefined;
|
|
37
|
-
onAutoClose?: ((toast: import("sonner").ToastT) => void) | undefined;
|
|
38
|
-
cancelButtonStyle?: React.CSSProperties | undefined;
|
|
39
|
-
actionButtonStyle?: React.CSSProperties | undefined;
|
|
40
|
-
unstyled?: boolean | undefined;
|
|
41
|
-
classNames?: import("sonner").ToastClassnames | undefined;
|
|
42
|
-
descriptionClassName?: string | undefined;
|
|
43
|
-
} & {
|
|
44
|
-
loading?: string | React.ReactNode;
|
|
45
|
-
success?: React.ReactNode | ((data: ToastData) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
46
|
-
error?: React.ReactNode | ((data: any) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
47
|
-
description?: React.ReactNode | ((data: any) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
48
|
-
finally?: () => void | Promise<void>;
|
|
49
|
-
}) => (string & {
|
|
50
|
-
unwrap: () => Promise<ToastData>;
|
|
51
|
-
}) | (number & {
|
|
52
|
-
unwrap: () => Promise<ToastData>;
|
|
53
|
-
}) | {
|
|
54
|
-
unwrap: () => Promise<ToastData>;
|
|
55
|
-
};
|
|
56
|
-
dismiss: (id?: number | string) => string | number;
|
|
57
|
-
loading: (message: (React.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import("sonner").ExternalToast) => string | number;
|
|
58
|
-
} & {
|
|
59
|
-
getHistory: () => (import("sonner").ToastT | import("sonner").ToastToDismiss)[];
|
|
60
|
-
getToasts: () => (import("sonner").ToastT | import("sonner").ToastToDismiss)[];
|
|
61
|
-
};
|