@dcs-tech/ui 0.8.0 → 0.10.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/CHANGELOG.md +496 -0
- package/README.md +56 -5
- package/dist/{ChartImageMenu-AsfvmdTH.js → ChartImageMenu-3OfqNFyt.js} +557 -546
- package/dist/{ChartView-CW3m4Z_1.js → ChartView-n4G5_2ro.js} +35 -31
- package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-i6fOdrDM.js} +2 -2
- package/dist/{SummaryImage-DeYs2Jgj.js → SummaryImage-CCt5ozD9.js} +2 -2
- package/dist/{SummarySeeAll-CrmROhBv.js → SummarySeeAll-BY8knsRe.js} +5 -5
- package/dist/assets/fileTask.worker--Q3rI3Bn.js +1 -0
- package/dist/{columnValue-DwUqueZ6.js → columnValue-74XDBcVF.js} +219 -192
- package/dist/{exportContext-BKFnNQ0q.js → exportContext-C52ZuHd8.js} +2 -2
- package/dist/{exportEngine-CZ22cX7a.js → exportEngine-BmDly7iw.js} +3 -3
- package/dist/file-worker.js +1 -1
- package/dist/{fileActions-COf5Q4Eg.js → fileActions-CFNO14Aj.js} +1 -1
- package/dist/{geometry-yZmKN662.js → geometry-DG134nYI.js} +379 -273
- package/dist/index.js +12808 -9621
- package/dist/{labels-CnqqTrne.js → labels-BPItSeRU.js} +2 -0
- package/dist/{runFileTask--4YjQH7Y.js → runFileTask-BIZTFnZP.js} +55 -39
- package/dist/scrollArea-D84Cwm4o.js +310 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-BiQYJbYZ.js} +8 -2
- package/dist/types/components/Alert/Alert.d.ts +16 -0
- package/dist/types/components/Alert/index.d.ts +2 -0
- package/dist/types/components/Card/Card.d.ts +4 -3
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Charts/Funnel.d.ts +2 -1
- package/dist/types/components/Charts/chartImage.d.ts +1 -0
- package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
- package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
- package/dist/types/components/CommandPalette/index.d.ts +2 -0
- package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
- package/dist/types/components/DataTable/TableToolbar.d.ts +2 -1
- package/dist/types/components/DataTable/TableView.d.ts +1 -0
- package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
- package/dist/types/components/DataTable/defaults.d.ts +4 -0
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DataTable/labels.d.ts +2 -0
- package/dist/types/components/DataTable/types.d.ts +19 -2
- package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
- package/dist/types/components/DataTable/ui.d.ts +2 -1
- package/dist/types/components/DataTable/useTable.d.ts +1 -0
- package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
- package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
- package/dist/types/components/FieldWrapper/index.d.ts +1 -1
- package/dist/types/components/Fields/index.d.ts +1 -1
- package/dist/types/components/Image/ImageEditor.d.ts +21 -0
- package/dist/types/components/Image/ImagePicker.d.ts +10 -1
- package/dist/types/components/Image/imageRender.d.ts +33 -0
- package/dist/types/components/Image/index.d.ts +3 -1
- package/dist/types/components/Image/prepareImage.d.ts +4 -3
- package/dist/types/components/Link/Link.d.ts +22 -0
- package/dist/types/components/Link/index.d.ts +2 -0
- package/dist/types/components/NavList/NavList.d.ts +13 -0
- package/dist/types/components/NavList/index.d.ts +2 -0
- package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
- package/dist/types/components/PageProgress/index.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +19 -0
- package/dist/types/components/Pagination/index.d.ts +2 -0
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/floatingPosition.d.ts +4 -0
- package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
- package/dist/types/components/ReorderList/ReorderList.d.ts +55 -0
- package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
- package/dist/types/components/ReorderList/index.d.ts +5 -0
- package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
- package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +86 -0
- package/dist/types/core/hooks/index.d.ts +1 -0
- package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
- package/dist/types/core/logic/alert.logic.d.ts +3 -0
- package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
- package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
- package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
- package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
- package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
- package/dist/types/core/logic/index.d.ts +9 -0
- package/dist/types/core/logic/inertProps.d.ts +3 -0
- package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
- package/dist/types/core/logic/pagination.logic.d.ts +7 -0
- package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
- package/dist/types/core/logic/reorder.logic.d.ts +49 -0
- package/dist/types/core/types/chipinput.types.d.ts +3 -1
- package/dist/types/core/types/collapsible.types.d.ts +3 -0
- package/dist/types/core/types/datePicker.types.d.ts +7 -0
- package/dist/types/core/types/field.types.d.ts +6 -3
- package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
- package/dist/types/core/types/fields.types.d.ts +6 -1
- package/dist/types/core/types/form.types.d.ts +1 -0
- package/dist/types/core/types/format.types.d.ts +2 -0
- package/dist/types/core/types/input.types.d.ts +2 -0
- package/dist/types/core/types/navigation.types.d.ts +1 -0
- package/dist/types/core/types/select.types.d.ts +2 -6
- package/dist/types/core/types/suggest.types.d.ts +2 -0
- package/dist/types/index.d.ts +25 -7
- package/package.json +3 -2
- package/dist/assets/fileTask.worker-BHT1olUk.js +0 -1
- package/dist/scrollArea-Dd2dNMV4.js +0 -236
- package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
- package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
- package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +0 -70
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Tt as e, U as t } from "./geometry-
|
|
2
|
+
import { Tt as e, U as t } from "./geometry-DG134nYI.js";
|
|
3
3
|
// src/components/DataTable/summary/summaryChartData.ts
|
|
4
4
|
function n(e, t) {
|
|
5
5
|
return {
|
|
@@ -77,5 +77,11 @@ function r(e) {
|
|
|
77
77
|
case "breakdown": return n(e, e.buckets ?? []);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
var i = (t) => e(t.card), a = (e, n) =>
|
|
80
|
+
var i = (t) => e(t.card), a = (e, n) => {
|
|
81
|
+
let a = t(r(e), i(e), n);
|
|
82
|
+
return a.kind === "funnel" && e.kind === "funnel" && e.card.showChange === !1 ? {
|
|
83
|
+
...a,
|
|
84
|
+
showChange: !1
|
|
85
|
+
} : a;
|
|
86
|
+
};
|
|
81
87
|
export { a as n, i as r, n as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AlertTone } from '../../core/logic';
|
|
3
|
+
export interface AlertProps {
|
|
4
|
+
tone?: AlertTone;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode | false;
|
|
8
|
+
action?: React.ReactNode;
|
|
9
|
+
onDismiss?: () => void;
|
|
10
|
+
banner?: boolean;
|
|
11
|
+
role?: React.AriaRole;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
declare const Alert: React.FC<AlertProps>;
|
|
16
|
+
export default Alert;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type CardVariant = 'outlined' | 'elevated' | 'flat';
|
|
3
3
|
export type CardPadding = 'none' | 'small' | 'medium';
|
|
4
|
-
export
|
|
4
|
+
export type CardHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
export interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'children' | 'onClick'> {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
variant?: CardVariant;
|
|
7
8
|
padding?: CardPadding;
|
|
8
9
|
title?: React.ReactNode;
|
|
10
|
+
headingLevel?: CardHeadingLevel | 'none';
|
|
9
11
|
subtitle?: React.ReactNode;
|
|
10
12
|
action?: React.ReactNode;
|
|
11
13
|
footer?: React.ReactNode;
|
|
12
14
|
onClick?: () => void;
|
|
13
|
-
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
+
selected?: boolean;
|
|
15
16
|
}
|
|
16
17
|
declare const Card: React.FC<CardProps>;
|
|
17
18
|
export default Card;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Card } from './Card';
|
|
2
|
-
export type { CardProps, CardVariant, CardPadding } from './Card';
|
|
2
|
+
export type { CardProps, CardVariant, CardPadding, CardHeadingLevel } from './Card';
|
|
@@ -6,5 +6,6 @@ export interface FunnelProps extends ChartFormatProps, ChartSelectProps<ChartSli
|
|
|
6
6
|
ariaLabel: string;
|
|
7
7
|
title?: ReactNode;
|
|
8
8
|
compact?: boolean;
|
|
9
|
+
showChange?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare function Funnel({ steps, ariaLabel, title, compact, onSelect, selected, ...format }: FunnelProps): import("react").JSX.Element;
|
|
11
|
+
export declare function Funnel({ steps, ariaLabel, title, compact, showChange, onSelect, selected, ...format }: FunnelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CommandPaletteTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'type'> {
|
|
3
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
label?: string;
|
|
5
|
+
hotkey?: string | null;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const CommandPaletteTrigger: React.ForwardRefExoticComponent<CommandPaletteTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export default CommandPaletteTrigger;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as CommandPalette } from './CommandPalette';
|
|
2
2
|
export type { CommandPaletteProps, CommandPaletteItem } from './CommandPalette';
|
|
3
|
+
export { default as CommandPaletteTrigger } from './CommandPaletteTrigger';
|
|
4
|
+
export type { CommandPaletteTriggerProps } from './CommandPaletteTrigger';
|
|
@@ -10,7 +10,7 @@ export interface TablePager {
|
|
|
10
10
|
setPageSize: (n: number) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare function pagerOf(table: any, pager?: TablePager): TablePager;
|
|
13
|
-
export declare function pageSizeChoices(paginationConfig: DataTablePaginationConfig, allMode: boolean, pageSize: number, formatNumber: (n: number) => string, allLabel: string): {
|
|
13
|
+
export declare function pageSizeChoices(paginationConfig: DataTablePaginationConfig, allMode: boolean, pageSize: number, formatNumber: (n: number) => string, allLabel: string, defaults?: number[]): {
|
|
14
14
|
options: {
|
|
15
15
|
name: string;
|
|
16
16
|
value: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import { type DataTableActiveFilter, type DataTableColumnPinning, type DataTableDisplayPrefs, type DataTableQuickFilter, type DataTableQuickFilterMode, type DataTableSavedFilter, type DataTableLayout } from './types';
|
|
2
|
+
import { type DataTableActiveFilter, type DataTableColumnPinning, type DataTableDisplayPrefs, type DataTableQuickFilter, type DataTableQuickFilterMode, type DataTableSavedFilter, type DataTableLayout, type DataTableToolbarAction } from './types';
|
|
3
3
|
interface TableToolbarProps {
|
|
4
4
|
phone: boolean;
|
|
5
|
+
appActions?: DataTableToolbarAction[];
|
|
5
6
|
searchEnabled: boolean;
|
|
6
7
|
globalFilter: string;
|
|
7
8
|
setGlobalFilter: (value: string) => void;
|
|
@@ -15,6 +15,7 @@ export declare function sameFields<K extends string>(set: FieldSet<K>, a: Fields
|
|
|
15
15
|
export declare function unplacedColumns<K extends string>(set: FieldSet<K>, fields: Fields<K>, columns: DataTableColumn[]): DataTableColumn[];
|
|
16
16
|
export declare function placeField<K extends string>(set: FieldSet<K>, fields: Fields<K>, key: string, part: K | null, opts?: {
|
|
17
17
|
replace?: boolean;
|
|
18
|
+
index?: number;
|
|
18
19
|
}): Fields<K>;
|
|
19
20
|
export declare function partForAdd<K extends string>(set: FieldSet<K>, fields: Fields<K>): K | null;
|
|
20
21
|
export declare const isCardFields: (value: unknown) => value is Partial<DataTableCardFields>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DataTableView, type DataTablePaginationConfig, type DataTableSortingConfig, type DataTableFilteringConfig, type DataTableSelectionConfig, type DataTableFilterGroup, type DataTableExportConfig, type DataTableExportFormat } from './types';
|
|
2
2
|
export declare const DEFAULT_PAGE_SIZE = 25;
|
|
3
3
|
export declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
4
|
+
export declare const DEFAULT_SERVER_PAGE_SIZES: number[];
|
|
4
5
|
export declare const DEFAULT_PAGINATION: DataTablePaginationConfig;
|
|
5
6
|
export declare const DEFAULT_SORTING: DataTableSortingConfig;
|
|
6
7
|
export declare const DEFAULT_FILTERING: DataTableFilteringConfig;
|
|
@@ -8,6 +9,9 @@ export declare const DEFAULT_EXPORT_FORMATS: DataTableExportFormat[];
|
|
|
8
9
|
export declare const DEFAULT_SELECTION: DataTableSelectionConfig;
|
|
9
10
|
export declare function createEmptyFilterGroup(): DataTableFilterGroup;
|
|
10
11
|
export declare function resolvePagination(config: DataTableView): DataTablePaginationConfig | false;
|
|
12
|
+
export declare function fitPageSize(pageSize: number, options: number[] | undefined): number;
|
|
13
|
+
export declare function offeredPageSizes(options: number[] | undefined, inUse: Array<number | undefined>, defaults?: number[]): number[];
|
|
14
|
+
export declare function paramsKey(params: Record<string, unknown> | undefined): string;
|
|
11
15
|
export declare function resolveSorting(config: DataTableView): DataTableSortingConfig | false;
|
|
12
16
|
export declare function resolveFiltering(config: DataTableView): DataTableFilteringConfig | false;
|
|
13
17
|
export declare function resolveExport(config: DataTableView): DataTableExportConfig | false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as DataTable } from './DataTable';
|
|
2
|
-
export type { DataTableProps, DataTableView, DataTableColumn, DataTableColumnType, DataTableNumberFormat, DataTableComponentProps, DataTableRowAction, DataTableFilterGroup, DataTableFilterCondition, DataTableActiveFilter, DataTableSingleRowView, DataTableSingleRowField, DataTableSingleRowAction, DataTableSelectionConfig, DataTableSelectionShow, DataTablePaginationConfig, DataTableSortingConfig, DataTableFilteringConfig, DataTableQuickFilter, DataTableQuickFilterMode, DataTableSavedFilter, DataTableSavedFilterIssue, DataTableViewPrefs, DataTableExportFormat, DataTableExportAction, DataTableExportTemplate, DataTableQuickExport, DataTableExportConfig, DataTableXlsxStyle, DataTablePdfConfig, DataTableExportGenerator, DataTableExportResult, DataTableExportResultStatus, DataTableExportGeneratorResult, DataTableFilenameContext, DataTableExportMeta, DataTableExportContext, DataTableExportSettings, DataTableExportPrefs, DataTableExportMetadata, DataTableExportSummary, DataTableExportSummaryTable, DataTableExportOptions, DataTableFileNameAs, DataTablePdfFonts, DataTablePdfPageSize, DataTablePdfOrientation, DataTablePdfFontSize, DataTablePdfMargins, DataTableSummaryConfig, DataTableSummaryCard, DataTableSummaryValueCard, DataTableSummaryRatioCard, DataTableSummaryBreakdownCard, DataTableSummaryTrendCard, DataTableSummaryFunnelCard, DataTableSummaryFunnelStep, DataTableSummaryValueTrend, DataTableSummaryPeriod, DataTableSummaryTrendChart, DataTableSummaryValueChart, DataTableSummaryRatioChart, DataTableSummaryAnyChart, DataTableSummaryCardRequest, DataTableSummaryPeriodCount, DataTableSummaryFigure, DataTableSummarySubline, DataTableSummaryStrip, DataTableSummaryChart, DataTableSummaryWidth, DataTableSummaryShow, DataTableSummaryPart, DataTableSummaryUserCard, DataTableSummaryPrefs, DataTableExportSummaryMode, DataTableSummaryPlacement, DataTableSummaryRequest, DataTableSummaryBucket, DataTableSummaryBreakdown, DataTableSummaryFigures, DataTableLicense, DataTableFlashColor, DataTableFlashColors, DataTableCellFlashStyle, DataTableCellStyle, DataTableLayout, DataTableCardFields, DataTableCardField, DataTableListFields, DataTableListField, DataTableRowMenuConfig, DataTableRowMenuItem, DataTableRowMenuBuiltIn, DataTableRowMenuIconAction, DataTableDetailMode, DataTableDetailContext, DataTableDetailRenderer, DataTableDisplayPrefs, DataTableDensity, DataTableFontSize, DataTableColumnWidth, DataTableActionDisplay, DataTableQuery, DataTableDataSource, DataTableRowsResult, DataTableAllRowsResult, DataTableCounts, DataTableInitialState, DataTableApi, DataTablePersistence, DataTableGate, DataTableAuthorize, DataTableManagePrefs, DataTableManageList, DataTableViewsPrefs, DataTableExportTemplatePrefs, DataTableBulkAction, DataTableBulkActionContext, DataTableBulkActionResult, DataTableBulkConfirm, DataTableSelection, DataTableColumnPinning, DataTablePinningConfig, DataTableKeyboardConfig, DataTableShortcut, DataTableVirtualizeConfig, DataTableGroupingConfig, DataTableGroupPathItem, DataTableGroupResult, DataTableGroupSummaryContext, DataTableViewState, DataTableSharedView, DataTableShareAudience, DataTableSharing, } from './types';
|
|
2
|
+
export type { DataTableProps, DataTableView, DataTableColumn, DataTableColumnType, DataTableNumberFormat, DataTableComponentProps, DataTableRowAction, DataTableFilterGroup, DataTableFilterCondition, DataTableActiveFilter, DataTableSingleRowView, DataTableSingleRowField, DataTableSingleRowAction, DataTableSelectionConfig, DataTableSelectionShow, DataTablePaginationConfig, DataTableSortingConfig, DataTableFilteringConfig, DataTableQuickFilter, DataTableQuickFilterMode, DataTableSavedFilter, DataTableSavedFilterIssue, DataTableViewPrefs, DataTableExportFormat, DataTableExportAction, DataTableExportTemplate, DataTableQuickExport, DataTableExportConfig, DataTableXlsxStyle, DataTablePdfConfig, DataTableExportGenerator, DataTableExportResult, DataTableExportResultStatus, DataTableExportGeneratorResult, DataTableFilenameContext, DataTableExportMeta, DataTableExportContext, DataTableExportSettings, DataTableExportPrefs, DataTableExportMetadata, DataTableExportSummary, DataTableExportSummaryTable, DataTableExportOptions, DataTableFileNameAs, DataTablePdfFonts, DataTablePdfPageSize, DataTablePdfOrientation, DataTablePdfFontSize, DataTablePdfMargins, DataTableSummaryConfig, DataTableSummaryCard, DataTableSummaryValueCard, DataTableSummaryRatioCard, DataTableSummaryBreakdownCard, DataTableSummaryTrendCard, DataTableSummaryFunnelCard, DataTableSummaryFunnelStep, DataTableSummaryValueTrend, DataTableSummaryPeriod, DataTableSummaryTrendChart, DataTableSummaryValueChart, DataTableSummaryRatioChart, DataTableSummaryAnyChart, DataTableSummaryCardRequest, DataTableSummaryPeriodCount, DataTableSummaryFigure, DataTableSummarySubline, DataTableSummaryStrip, DataTableSummaryChart, DataTableSummaryWidth, DataTableSummaryShow, DataTableSummaryPart, DataTableSummaryUserCard, DataTableSummaryPrefs, DataTableExportSummaryMode, DataTableSummaryPlacement, DataTableSummaryRequest, DataTableSummaryBucket, DataTableSummaryBreakdown, DataTableSummaryFigures, DataTableLicense, DataTableFlashColor, DataTableFlashColors, DataTableCellFlashStyle, DataTableCellStyle, DataTableLayout, DataTableCardFields, DataTableCardField, DataTableListFields, DataTableListField, DataTableRowMenuConfig, DataTableRowMenuItem, DataTableRowMenuBuiltIn, DataTableRowMenuIconAction, DataTableDetailMode, DataTableDetailContext, DataTableDetailRenderer, DataTableDisplayPrefs, DataTableDensity, DataTableFontSize, DataTableColumnWidth, DataTableActionDisplay, DataTableQuery, DataTableDataSource, DataTableRowsResult, DataTableAllRowsResult, DataTableCounts, DataTableInitialState, DataTableApi, DataTablePersistence, DataTableGate, DataTableAuthorize, DataTableManagePrefs, DataTableManageList, DataTableViewsPrefs, DataTableExportTemplatePrefs, DataTableBulkAction, DataTableBulkActionContext, DataTableBulkActionResult, DataTableBulkConfirm, DataTableToolbarAction, DataTableSelection, DataTableColumnPinning, DataTablePinningConfig, DataTableKeyboardConfig, DataTableShortcut, DataTableVirtualizeConfig, DataTableGroupingConfig, DataTableGroupPathItem, DataTableGroupResult, DataTableGroupSummaryContext, DataTableViewState, DataTableSharedView, DataTableShareAudience, DataTableSharing, } from './types';
|
|
3
3
|
export { isFilterGroup, CARD_FIELD_LIMITS, LIST_FIELD_LIMITS, SUMMARY_PLACEMENTS_MAX, SUMMARY_SHOWS, SUMMARY_STRIPS, SUMMARY_TREND_COUNTS, SUMMARY_TREND_COUNT_BOUNDS, SUMMARY_KIND_CHARTS, SUMMARY_USER_CARDS_MAX, SUMMARY_WIDTHS } from './types';
|
|
4
4
|
export { DEFAULT_DATA_TABLE_LABELS } from './labels';
|
|
5
5
|
export type { DataTableLabels, DataTableLabelKey } from './labels';
|
|
@@ -93,6 +93,7 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
93
93
|
yes: string;
|
|
94
94
|
no: string;
|
|
95
95
|
empty: string;
|
|
96
|
+
noResults: string;
|
|
96
97
|
loading: string;
|
|
97
98
|
loadError: string;
|
|
98
99
|
rowsHidden: string;
|
|
@@ -596,6 +597,7 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
596
597
|
listAllInList: string;
|
|
597
598
|
fieldsDropHere: string;
|
|
598
599
|
fieldsRemove: (field: string) => string;
|
|
600
|
+
fieldsMove: (field: string) => string;
|
|
599
601
|
fieldsAdd: string;
|
|
600
602
|
fieldsLivePreview: string;
|
|
601
603
|
cardPreviewCard: string;
|
|
@@ -139,7 +139,7 @@ export declare const SUMMARY_KIND_CHARTS: {
|
|
|
139
139
|
readonly ratio: readonly ["bar", "gauge", "ring", "donut", "pie"];
|
|
140
140
|
readonly breakdown: readonly ["donut", "pie", "bars", "stacked", "treemap"];
|
|
141
141
|
readonly trend: readonly ["columns", "line", "area", "grouped", "stacked", "calendar"];
|
|
142
|
-
readonly funnel: readonly ["funnel"];
|
|
142
|
+
readonly funnel: readonly ["funnel", "bars"];
|
|
143
143
|
};
|
|
144
144
|
export type DataTableSummaryWidth = 'auto' | 'quarter' | 'half' | 'full';
|
|
145
145
|
export declare const SUMMARY_WIDTHS: readonly DataTableSummaryWidth[];
|
|
@@ -217,6 +217,8 @@ export interface DataTableSummaryFunnelStep<TData = any> {
|
|
|
217
217
|
export interface DataTableSummaryFunnelCard<TData = any> extends DataTableSummaryCardBase {
|
|
218
218
|
kind: 'funnel';
|
|
219
219
|
steps: DataTableSummaryFunnelStep<TData>[];
|
|
220
|
+
chart?: 'funnel' | 'bars';
|
|
221
|
+
showChange?: boolean;
|
|
220
222
|
}
|
|
221
223
|
export type DataTableSummaryCard<TData = any> = DataTableSummaryValueCard<TData> | DataTableSummaryRatioCard<TData> | DataTableSummaryBreakdownCard | DataTableSummaryTrendCard | DataTableSummaryFunnelCard<TData>;
|
|
222
224
|
export interface DataTableSummaryConfig<TData = any> {
|
|
@@ -331,6 +333,7 @@ export interface DataTableRowAction<TData = any> {
|
|
|
331
333
|
showWhen?: (row: TData) => boolean;
|
|
332
334
|
disabledWhen?: (row: TData) => boolean;
|
|
333
335
|
tooltip?: string | ((row: TData) => string);
|
|
336
|
+
disableTextTransform?: boolean;
|
|
334
337
|
primary?: boolean | ((row: TData) => boolean);
|
|
335
338
|
shortcut?: string;
|
|
336
339
|
}
|
|
@@ -486,6 +489,17 @@ export interface DataTableBulkAction<TData = any> {
|
|
|
486
489
|
undoTimeoutMs?: number;
|
|
487
490
|
onRun: (ctx: DataTableBulkActionContext<TData>) => Promise<DataTableBulkActionResult | void> | DataTableBulkActionResult | void;
|
|
488
491
|
}
|
|
492
|
+
export interface DataTableToolbarAction {
|
|
493
|
+
id: string;
|
|
494
|
+
label: string;
|
|
495
|
+
icon?: ReactNode;
|
|
496
|
+
variant?: ActionVariant;
|
|
497
|
+
display?: 'icon' | 'label' | 'icon-label';
|
|
498
|
+
tooltip?: string;
|
|
499
|
+
disabled?: boolean;
|
|
500
|
+
authorize?: () => boolean;
|
|
501
|
+
onClick: () => void;
|
|
502
|
+
}
|
|
489
503
|
export interface DataTableColumnPinning {
|
|
490
504
|
left: string[];
|
|
491
505
|
right: string[];
|
|
@@ -902,7 +916,9 @@ export interface DataTableView<TData = any> {
|
|
|
902
916
|
expandRow?: (row: TData) => ReactNode;
|
|
903
917
|
actions?: DataTableRowAction<TData>[] | ((row: TData) => DataTableRowAction<TData>[]);
|
|
904
918
|
inlineActions?: number;
|
|
919
|
+
actionsHeader?: boolean;
|
|
905
920
|
bulkActions?: DataTableBulkAction<TData>[];
|
|
921
|
+
toolbarActions?: DataTableToolbarAction[];
|
|
906
922
|
hideBulkActions?: string[];
|
|
907
923
|
pinning?: DataTablePinningConfig;
|
|
908
924
|
devTools?: boolean;
|
|
@@ -923,6 +939,7 @@ export interface DataTableView<TData = any> {
|
|
|
923
939
|
bordered?: boolean;
|
|
924
940
|
stickyHeader?: boolean;
|
|
925
941
|
emptyMessage?: string;
|
|
942
|
+
noResultsMessage?: string;
|
|
926
943
|
loadingMessage?: string;
|
|
927
944
|
loading?: boolean;
|
|
928
945
|
}
|
|
@@ -1040,7 +1057,7 @@ export interface DataTablePersistence {
|
|
|
1040
1057
|
list?: (prefix: string) => Promise<string[]>;
|
|
1041
1058
|
remove?: (key: string) => Promise<void>;
|
|
1042
1059
|
}
|
|
1043
|
-
export type DataTableGate = 'export' | 'export.format' | 'export.template' | 'manage' | 'selection' | 'columns' | 'cardFields' | 'savedFilters' | 'devTools' | 'license' | 'bulkAction' | 'copy' | 'layout' | 'grouping' | 'shareView' | 'rows';
|
|
1060
|
+
export type DataTableGate = 'export' | 'export.format' | 'export.template' | 'manage' | 'selection' | 'columns' | 'cardFields' | 'savedFilters' | 'devTools' | 'license' | 'bulkAction' | 'toolbarAction' | 'copy' | 'layout' | 'grouping' | 'shareView' | 'rows';
|
|
1044
1061
|
export type DataTableAuthorize = (gate: DataTableGate, subject?: unknown) => boolean;
|
|
1045
1062
|
export interface DataTablePdfFonts {
|
|
1046
1063
|
fonts?: Record<string, {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ui-local.css';
|
|
3
|
+
interface TableReorderListProps<T> {
|
|
4
|
+
items: readonly T[];
|
|
5
|
+
getKey: (item: T) => string;
|
|
6
|
+
getItemLabel: (item: T) => string;
|
|
7
|
+
onReorder?: (items: T[]) => void;
|
|
8
|
+
renderItem: (item: T, dragHandle: React.ReactNode) => React.ReactNode;
|
|
9
|
+
maxHeight?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function TableReorderList<T>({ items, getKey, getItemLabel, onReorder, renderItem, maxHeight, className }: TableReorderListProps<T>): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -7,7 +7,8 @@ export { Tabs as SmartTabs } from '../Tabs';
|
|
|
7
7
|
export { DropdownMenu as SmartDropdownMenu } from '../DropdownMenu';
|
|
8
8
|
export { Dialog as SmartDialog } from '../Dialog';
|
|
9
9
|
export { Badge as SmartBadge } from '../Badge';
|
|
10
|
+
export { ReorderList } from '../ReorderList';
|
|
10
11
|
export { ReactModal } from './ui-local/ReactModal';
|
|
11
|
-
export {
|
|
12
|
+
export { TableReorderList } from './ui-local/TableReorderList';
|
|
12
13
|
export { AutoHeight } from './ui-local/AutoHeight';
|
|
13
14
|
export { DateRangePicker } from './ui-local/DateRangePicker';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IsoPeriod, PeriodGridView } from '../../core/logic';
|
|
3
|
+
export interface PeriodGridProps {
|
|
4
|
+
view: PeriodGridView;
|
|
5
|
+
label: string;
|
|
6
|
+
multi?: boolean;
|
|
7
|
+
cellId: (period: IsoPeriod) => string;
|
|
8
|
+
cellText: (period: IsoPeriod) => string;
|
|
9
|
+
cellLabel: (period: IsoPeriod) => string;
|
|
10
|
+
onPick: (period: IsoPeriod) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const PeriodGrid: React.FC<PeriodGridProps>;
|
|
13
|
+
export default PeriodGrid;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DatePickerBaseProps, DateRangeValue, FieldChangeEvent, FieldHandle, FieldKeyboardConfig } from '../../core/types';
|
|
3
|
+
import { type PeriodMode } from '../../core/logic';
|
|
4
|
+
export declare const BOX_KEYBOARD: FieldKeyboardConfig;
|
|
5
|
+
export type PeriodPickerProps = DatePickerBaseProps & {
|
|
6
|
+
mode: PeriodMode;
|
|
7
|
+
range?: boolean;
|
|
8
|
+
value?: string | DateRangeValue;
|
|
9
|
+
onChange?: (event: FieldChangeEvent<string | DateRangeValue>) => void;
|
|
10
|
+
onApply?: (value: string | DateRangeValue) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const PeriodPicker: React.ForwardRefExoticComponent<DatePickerBaseProps & {
|
|
13
|
+
mode: PeriodMode;
|
|
14
|
+
range?: boolean;
|
|
15
|
+
value?: string | DateRangeValue;
|
|
16
|
+
onChange?: (event: FieldChangeEvent<string | DateRangeValue>) => void;
|
|
17
|
+
onApply?: (value: string | DateRangeValue) => void;
|
|
18
|
+
} & React.RefAttributes<FieldHandle>>;
|
|
19
|
+
export default PeriodPicker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as DatePicker } from './DatePicker';
|
|
2
2
|
export { default as Calendar } from './Calendar';
|
|
3
3
|
export type { CalendarProps } from './Calendar';
|
|
4
|
-
export type { DatePickerProps, DatePickerBaseProps, DatePickerSingleProps, DatePickerRangeProps, DateRangeValue, DateDisplayFormat, DateTextOrder, } from '../../core/types';
|
|
4
|
+
export type { DatePickerProps, DatePickerBaseProps, DatePickerSingleProps, DatePickerRangeProps, DateRangeValue, DatePickerMode, DateDisplayFormat, DateTextOrder, } from '../../core/types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type DialogSlotName = 'header' | 'footer';
|
|
2
|
+
export interface DialogSlots {
|
|
3
|
+
headerEl: HTMLElement | null;
|
|
4
|
+
footerEl: HTMLElement | null;
|
|
5
|
+
claim: (slot: DialogSlotName) => () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DialogSlotsContext: import("react").Context<DialogSlots | null>;
|
|
8
|
+
export declare const useDialogSlots: () => DialogSlots | null;
|
|
9
|
+
export declare function useDialogSlotClaim(slots: DialogSlots | null, slot: DialogSlotName, active: boolean): void;
|
|
@@ -12,6 +12,9 @@ export interface DropdownMenuItem {
|
|
|
12
12
|
groupLabel?: string;
|
|
13
13
|
divider?: boolean;
|
|
14
14
|
pane?: string;
|
|
15
|
+
closeOnSelect?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
15
18
|
}
|
|
16
19
|
export interface DropdownMenuIcon {
|
|
17
20
|
value: string;
|
|
@@ -21,6 +24,10 @@ export interface DropdownMenuIcon {
|
|
|
21
24
|
shortcut?: string;
|
|
22
25
|
disabled?: boolean;
|
|
23
26
|
pane?: string;
|
|
27
|
+
selected?: boolean;
|
|
28
|
+
closeOnSelect?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
24
31
|
}
|
|
25
32
|
export interface DropdownMenuPane {
|
|
26
33
|
id: string;
|
|
@@ -32,6 +39,7 @@ export interface DropdownMenuProps {
|
|
|
32
39
|
open?: boolean;
|
|
33
40
|
anchor?: FloatingAnchor | null;
|
|
34
41
|
onClose?: () => void;
|
|
42
|
+
onOpen?: () => void;
|
|
35
43
|
header?: React.ReactNode;
|
|
36
44
|
icons?: DropdownMenuIcon[];
|
|
37
45
|
panes?: DropdownMenuPane[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as FieldWrapper } from './FieldWrapper';
|
|
2
|
-
export type { FieldWrapperProps, FieldLayout, FieldSize, } from '../../core/types';
|
|
2
|
+
export type { FieldWrapperProps, FieldWidth, FieldLayout, FieldSize, } from '../../core/types';
|
|
@@ -9,4 +9,4 @@ export { useFieldChange } from './hooks/useFieldChange';
|
|
|
9
9
|
export { useFieldBlur } from './hooks/useFieldBlur';
|
|
10
10
|
export { useFieldValidation } from './hooks/useFieldValidation';
|
|
11
11
|
export { useFieldSelect } from './hooks/useFieldSelect';
|
|
12
|
-
export type { FieldsProps, FieldProps, FieldsBaseProps, FieldsWithSetState, FieldsWithOnChange, FieldDefinition, FieldsDefinition, FieldAuthorize, FieldTooltipProps, FieldComponentRegistry, FieldEditableTableProps, BaseFieldDefinition, InputFieldDefinition, SwitchFieldDefinition, SelectFieldDefinition, SuggestFieldDefinition, RadioFieldDefinition, CheckboxFieldDefinition, ButtonFieldDefinition, ChildFieldDefinition, EditableTableFieldDefinition, ChipInputFieldDefinition, ConditionOperator, ConditionCompareType, ConditionObject, ConditionRegexObject, ConditionFunction, ConditionSimpleKey, Condition, ConditionContext, NestedKeys, NestedValue, ResetKeyConfig, SelectCopyKeyConfig, ChangeContext, ChangeAdditionalDataContext, SelectAdditionalDataContext, EditableTableCustomPropContext, ErrorObject, TouchedObject, } from '../../core/types';
|
|
12
|
+
export type { FieldsProps, FieldProps, FieldsBaseProps, FieldsWithSetState, FieldsWithOnChange, FieldDefinition, FieldsDefinition, FieldAuthorize, FieldTooltipProps, FieldComponentRegistry, FieldEditableTableProps, BaseFieldDefinition, InputFieldDefinition, SwitchFieldDefinition, SelectFieldDefinition, SuggestFieldDefinition, RadioFieldDefinition, CheckboxFieldDefinition, ButtonFieldDefinition, ChildFieldDefinition, DateFieldDefinition, EditableTableFieldDefinition, ChipInputFieldDefinition, ConditionOperator, ConditionCompareType, ConditionObject, ConditionRegexObject, ConditionFunction, ConditionSimpleKey, Condition, ConditionContext, NestedKeys, NestedValue, ResetKeyConfig, SelectCopyKeyConfig, ChangeContext, ChangeAdditionalDataContext, SelectAdditionalDataContext, EditableTableCustomPropContext, ErrorObject, TouchedObject, } from '../../core/types';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ImageEditorOptions } from '../../core/logic/imageEditor.logic';
|
|
3
|
+
import type { ImageTransform, ImageTransformInput } from '../../core/logic/imageTransform.logic';
|
|
4
|
+
import { type ImageEditResult } from './imageRender';
|
|
5
|
+
export type ImageEditorResult = ImageEditResult;
|
|
6
|
+
export interface ImageEditorPanelContext {
|
|
7
|
+
transform: ImageTransform;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
getResult: () => Promise<ImageEditorResult>;
|
|
11
|
+
}
|
|
12
|
+
export interface ImageEditorProps extends ImageEditorOptions {
|
|
13
|
+
src: File | Blob | string;
|
|
14
|
+
onApply: (result: ImageEditorResult) => void | Promise<void>;
|
|
15
|
+
onCancel: () => void;
|
|
16
|
+
initialTransform?: ImageTransformInput;
|
|
17
|
+
panel?: React.ReactNode | ((context: ImageEditorPanelContext) => React.ReactNode);
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const ImageEditor: React.FC<ImageEditorProps>;
|
|
21
|
+
export default ImageEditor;
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ImageEditorOptions } from '../../core/logic/imageEditor.logic';
|
|
3
|
+
import { type ImageEditorProps } from './ImageEditor';
|
|
2
4
|
export interface ImagePickerItem {
|
|
3
5
|
id: string;
|
|
4
6
|
src: string;
|
|
5
7
|
alt?: string;
|
|
8
|
+
editSrc?: File | Blob | string;
|
|
6
9
|
}
|
|
10
|
+
export type ImagePickerEditorOptions = ImageEditorOptions & Pick<ImageEditorProps, 'panel'>;
|
|
7
11
|
export interface ImagePickerProps {
|
|
8
12
|
label?: React.ReactNode;
|
|
9
13
|
items: ImagePickerItem[];
|
|
10
14
|
onAdd: (files: File[]) => void;
|
|
11
|
-
onRemove
|
|
15
|
+
onRemove?: (id: string) => void;
|
|
16
|
+
onReplace?: (id: string, file: File) => void;
|
|
17
|
+
editable?: boolean;
|
|
18
|
+
editor?: ImagePickerEditorOptions;
|
|
19
|
+
onEdit?: (id: string) => void;
|
|
12
20
|
onOpen?: (index: number) => void;
|
|
13
21
|
max?: number;
|
|
22
|
+
dropZone?: boolean;
|
|
14
23
|
required?: boolean;
|
|
15
24
|
disabled?: boolean;
|
|
16
25
|
busy?: boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ImageTransform, type ImageOutputLimits, type ImageSize } from '../../core/logic/imageTransform.logic';
|
|
2
|
+
export type ImageFailure = 'unreadable' | 'not-found' | 'cors' | 'no-canvas' | 'encode';
|
|
3
|
+
export declare class ImagePrepareError extends Error {
|
|
4
|
+
readonly code: ImageFailure;
|
|
5
|
+
constructor(message: string, code?: ImageFailure);
|
|
6
|
+
}
|
|
7
|
+
export interface DecodedImage extends ImageSize {
|
|
8
|
+
source: CanvasImageSource;
|
|
9
|
+
close: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const decodeImageBlob: (file: Blob) => Promise<DecodedImage>;
|
|
12
|
+
export declare const decodeImageUrl: (url: string) => Promise<DecodedImage>;
|
|
13
|
+
export declare const decodeImageSource: (src: File | Blob | string) => Promise<DecodedImage>;
|
|
14
|
+
export declare const drawWholeImage: (image: DecodedImage, canvas: HTMLCanvasElement, width: number, height: number) => void;
|
|
15
|
+
export declare const drawTransformed: (image: DecodedImage, transform: ImageTransform, limits: ImageOutputLimits, background?: string) => {
|
|
16
|
+
canvas: HTMLCanvasElement;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const canvasToBlob: (canvas: HTMLCanvasElement, type: string, quality?: number) => Promise<Blob | null>;
|
|
21
|
+
export declare const backgroundFor: (type: string) => string | undefined;
|
|
22
|
+
export interface ImageEditResult {
|
|
23
|
+
blob: Blob;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
mimeType: string;
|
|
27
|
+
transform: ImageTransform;
|
|
28
|
+
}
|
|
29
|
+
export interface ImageEncodeOptions extends ImageOutputLimits {
|
|
30
|
+
mimeType?: string;
|
|
31
|
+
quality?: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const renderImageEdit: (image: DecodedImage, transform: ImageTransform, options: ImageEncodeOptions, sourceType?: string) => Promise<ImageEditResult>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { default as ImagePicker } from './ImagePicker';
|
|
2
|
-
export type { ImagePickerProps, ImagePickerItem } from './ImagePicker';
|
|
2
|
+
export type { ImagePickerProps, ImagePickerItem, ImagePickerEditorOptions } from './ImagePicker';
|
|
3
3
|
export { default as ImageStrip } from './ImageStrip';
|
|
4
4
|
export type { ImageStripProps, StripImage } from './ImageStrip';
|
|
5
5
|
export { default as ImageViewer } from './ImageViewer';
|
|
6
6
|
export type { ImageViewerProps, ViewerImage } from './ImageViewer';
|
|
7
|
+
export { default as ImageEditor } from './ImageEditor';
|
|
8
|
+
export type { ImageEditorProps, ImageEditorResult, ImageEditorPanelContext } from './ImageEditor';
|
|
7
9
|
export { prepareImage, ImagePrepareError } from './prepareImage';
|
|
8
10
|
export type { PrepareImageOptions, PreparedImage } from './prepareImage';
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { type ImageTransformInput } from '../../core/logic/imageTransform.logic';
|
|
2
|
+
import { ImagePrepareError } from './imageRender';
|
|
3
|
+
export { ImagePrepareError };
|
|
1
4
|
export interface PrepareImageOptions {
|
|
2
5
|
maxSide?: number;
|
|
3
6
|
thumbSide?: number;
|
|
4
7
|
quality?: number;
|
|
5
8
|
thumbQuality?: number;
|
|
6
9
|
maxInputBytes?: number;
|
|
10
|
+
transform?: ImageTransformInput;
|
|
7
11
|
}
|
|
8
12
|
export interface PreparedImage {
|
|
9
13
|
full: Blob;
|
|
@@ -13,7 +17,4 @@ export interface PreparedImage {
|
|
|
13
17
|
w: number;
|
|
14
18
|
h: number;
|
|
15
19
|
}
|
|
16
|
-
export declare class ImagePrepareError extends Error {
|
|
17
|
-
constructor(message: string);
|
|
18
|
-
}
|
|
19
20
|
export declare function prepareImage(file: File | Blob, options?: PrepareImageOptions): Promise<PreparedImage>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type LinkColor = 'primary' | 'neutral' | 'inherit';
|
|
3
|
+
export type LinkUnderline = 'always' | 'hover' | 'none';
|
|
4
|
+
export interface LinkOwnProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
color?: LinkColor;
|
|
7
|
+
underline?: LinkUnderline;
|
|
8
|
+
external?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export type LinkProps<E extends React.ElementType = 'a'> = LinkOwnProps & {
|
|
14
|
+
as?: E;
|
|
15
|
+
} & Omit<React.ComponentPropsWithoutRef<E>, keyof LinkOwnProps | 'as'>;
|
|
16
|
+
type LinkComponent = (<E extends React.ElementType = 'a'>(props: LinkProps<E> & {
|
|
17
|
+
ref?: React.ComponentPropsWithRef<E>['ref'];
|
|
18
|
+
}) => React.ReactElement | null) & {
|
|
19
|
+
displayName?: string;
|
|
20
|
+
};
|
|
21
|
+
declare const Link: LinkComponent;
|
|
22
|
+
export default Link;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NavItem } from '../../core/types';
|
|
3
|
+
export interface NavListProps {
|
|
4
|
+
items: NavItem[];
|
|
5
|
+
activeId?: string | null;
|
|
6
|
+
onSelect?: (item: NavItem, event: React.MouseEvent) => void;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
'aria-label'?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const NavList: React.FC<NavListProps>;
|
|
13
|
+
export default NavList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PageProgressProps {
|
|
3
|
+
active: boolean;
|
|
4
|
+
delay?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const PageProgress: React.FC<PageProgressProps>;
|
|
10
|
+
export default PageProgress;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type PaginationVariant = 'numbers' | 'simple';
|
|
3
|
+
export interface PaginationProps {
|
|
4
|
+
pageIndex: number;
|
|
5
|
+
onPageChange: (pageIndex: number) => void;
|
|
6
|
+
pageCount?: number;
|
|
7
|
+
total?: number;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
pageSizeOptions?: number[];
|
|
10
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
11
|
+
variant?: PaginationVariant;
|
|
12
|
+
siblings?: number;
|
|
13
|
+
showFirstLast?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
19
|
+
export default Pagination;
|