@octans/ui 1.0.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/LICENSE +21 -0
- package/README.md +226 -0
- package/bin/octans-icons.mjs +208 -0
- package/dist/components/ActionList/ActionList.vue.d.ts +77 -0
- package/dist/components/ActionList/ActionListButton.vue.d.ts +85 -0
- package/dist/components/ActionList/ActionListMenu.vue.d.ts +18 -0
- package/dist/components/ActionList/index.d.ts +1 -0
- package/dist/components/AppFrame/AppFrame.vue.d.ts +26 -0
- package/dist/components/AppFrame/context.d.ts +40 -0
- package/dist/components/AppFrame/index.d.ts +3 -0
- package/dist/components/AppFrame/types.d.ts +52 -0
- package/dist/components/Badge/Badge.vue.d.ts +125 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Banner/Banner.vue.d.ts +239 -0
- package/dist/components/Banner/index.d.ts +1 -0
- package/dist/components/Button/Button.vue.d.ts +284 -0
- package/dist/components/Button/ButtonGroup.vue.d.ts +44 -0
- package/dist/components/Button/ButtonGroupItem.vue.d.ts +5 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Calendar/Calendar.vue.d.ts +15 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/types.d.ts +39 -0
- package/dist/components/CalendarHeatmap/CalendarHeatmap.vue.d.ts +21 -0
- package/dist/components/CalendarHeatmap/index.d.ts +2 -0
- package/dist/components/CalendarHeatmap/types.d.ts +168 -0
- package/dist/components/Caption/Caption.vue.d.ts +5 -0
- package/dist/components/Caption/index.d.ts +1 -0
- package/dist/components/Card/Card.vue.d.ts +82 -0
- package/dist/components/Card/CardSection.vue.d.ts +89 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/utils.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.vue.d.ts +171 -0
- package/dist/components/Checkbox/CheckboxControl.vue.d.ts +59 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Choice/Choice.vue.d.ts +102 -0
- package/dist/components/Choice/index.d.ts +1 -0
- package/dist/components/ChoiceList/ChoiceList.vue.d.ts +199 -0
- package/dist/components/ChoiceList/index.d.ts +2 -0
- package/dist/components/ChoiceList/types.d.ts +31 -0
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts +18 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/types.d.ts +62 -0
- package/dist/components/ColorSelector/ColorSelector.vue.d.ts +34 -0
- package/dist/components/ColorSelector/index.d.ts +2 -0
- package/dist/components/ColorSelector/types.d.ts +143 -0
- package/dist/components/DataTable/BulkActions.vue.d.ts +282 -0
- package/dist/components/DataTable/DataTable.vue.d.ts +40 -0
- package/dist/components/DataTable/DataTableFooter.vue.d.ts +22 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/types.d.ts +249 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts +17 -0
- package/dist/components/DatePicker/index.d.ts +4 -0
- package/dist/components/DatePicker/types.d.ts +57 -0
- package/dist/components/Divider/Divider.vue.d.ts +20 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/types.d.ts +76 -0
- package/dist/components/EventDelegator/EventDelegator.vue.d.ts +18 -0
- package/dist/components/EventDelegator/index.d.ts +1 -0
- package/dist/components/EventDelegator/utils.d.ts +25 -0
- package/dist/components/FileInput/DropZone.vue.d.ts +67 -0
- package/dist/components/FileInput/FileInput.vue.d.ts +422 -0
- package/dist/components/FileInput/ItemList.vue.d.ts +109 -0
- package/dist/components/FileInput/index.d.ts +1 -0
- package/dist/components/FileInput/utils.d.ts +15 -0
- package/dist/components/Filters/FilterActions.vue.d.ts +236 -0
- package/dist/components/Filters/FilterItem.vue.d.ts +813 -0
- package/dist/components/Filters/Filters.vue.d.ts +1627 -0
- package/dist/components/Filters/index.d.ts +1 -0
- package/dist/components/Filters/utils.d.ts +1 -0
- package/dist/components/FooterHelp/FooterHelp.vue.d.ts +16 -0
- package/dist/components/FooterHelp/index.d.ts +1 -0
- package/dist/components/FormLayout/FormLayout.vue.d.ts +5 -0
- package/dist/components/FormLayout/FormLayoutGroup.vue.d.ts +17 -0
- package/dist/components/FormLayout/index.d.ts +2 -0
- package/dist/components/Formatter/Formatter.vue.d.ts +42 -0
- package/dist/components/Formatter/index.d.ts +1 -0
- package/dist/components/GlobalNav/GlobalNav.vue.d.ts +33 -0
- package/dist/components/GlobalNav/index.d.ts +2 -0
- package/dist/components/GlobalNav/types.d.ts +64 -0
- package/dist/components/GradientPicker/GradientPicker.vue.d.ts +20 -0
- package/dist/components/GradientPicker/index.d.ts +2 -0
- package/dist/components/GradientPicker/types.d.ts +74 -0
- package/dist/components/Heading/Heading.vue.d.ts +18 -0
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Icon/Icon.vue.d.ts +112 -0
- package/dist/components/Icon/iconBundle.d.ts +1 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/InlineError/InlineError.vue.d.ts +6 -0
- package/dist/components/InlineError/index.d.ts +1 -0
- package/dist/components/Labelled/Labelled.vue.d.ts +110 -0
- package/dist/components/Labelled/index.d.ts +1 -0
- package/dist/components/Layout/Layout.vue.d.ts +13 -0
- package/dist/components/Layout/LayoutSection.vue.d.ts +16 -0
- package/dist/components/Layout/LayoutSectionAnnotated.vue.d.ts +34 -0
- package/dist/components/Layout/index.d.ts +3 -0
- package/dist/components/LineClamper/LineClamper.vue.d.ts +16 -0
- package/dist/components/LineClamper/index.d.ts +2 -0
- package/dist/components/LineClamper/types.d.ts +7 -0
- package/dist/components/Link/Link.vue.d.ts +19 -0
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/List/List.vue.d.ts +15 -0
- package/dist/components/List/ListItem.vue.d.ts +16 -0
- package/dist/components/List/index.d.ts +3 -0
- package/dist/components/List/types.d.ts +51 -0
- package/dist/components/LoaderOverlay/LoaderOverlay.vue.d.ts +18 -0
- package/dist/components/LoaderOverlay/host.d.ts +6 -0
- package/dist/components/LoaderOverlay/index.d.ts +26 -0
- package/dist/components/LoaderOverlay/store.d.ts +7 -0
- package/dist/components/LoaderOverlay/types.d.ts +24 -0
- package/dist/components/LoadingBar/LoadingBar.vue.d.ts +7 -0
- package/dist/components/LoadingBar/host.d.ts +6 -0
- package/dist/components/LoadingBar/index.d.ts +28 -0
- package/dist/components/LoadingBar/store.d.ts +6 -0
- package/dist/components/LoadingBar/types.d.ts +16 -0
- package/dist/components/MaybeMountingPortal/MaybeMountingPortal.vue.d.ts +53 -0
- package/dist/components/MaybeMountingPortal/index.d.ts +1 -0
- package/dist/components/MaybeRouterLink/MaybeRouterLink.vue.d.ts +34 -0
- package/dist/components/MaybeRouterLink/index.d.ts +2 -0
- package/dist/components/MaybeRouterLink/types.d.ts +49 -0
- package/dist/components/Modal/Modal.vue.d.ts +28 -0
- package/dist/components/Modal/ModalBackdrop.vue.d.ts +12 -0
- package/dist/components/Modal/ModalHost.vue.d.ts +3 -0
- package/dist/components/Modal/ModalStackItem.vue.d.ts +14 -0
- package/dist/components/Modal/api/AlertModal.vue.d.ts +10 -0
- package/dist/components/Modal/api/Base.d.ts +12 -0
- package/dist/components/Modal/api/ConfirmModal.vue.d.ts +10 -0
- package/dist/components/Modal/api/GenericModal.vue.d.ts +10 -0
- package/dist/components/Modal/api/PromptModal.vue.d.ts +10 -0
- package/dist/components/Modal/api/types.d.ts +110 -0
- package/dist/components/Modal/host.d.ts +2 -0
- package/dist/components/Modal/index.d.ts +10 -0
- package/dist/components/Modal/manager.d.ts +80 -0
- package/dist/components/Modal/types.d.ts +49 -0
- package/dist/components/NavField/NavField.vue.d.ts +223 -0
- package/dist/components/NavField/index.d.ts +1 -0
- package/dist/components/Navigation/Navigation.vue.d.ts +47 -0
- package/dist/components/Navigation/components/Item.vue.d.ts +10 -0
- package/dist/components/Navigation/components/Section.vue.d.ts +13 -0
- package/dist/components/Navigation/index.d.ts +2 -0
- package/dist/components/Navigation/types.d.ts +117 -0
- package/dist/components/OtpInput/OtpInput.vue.d.ts +21 -0
- package/dist/components/OtpInput/index.d.ts +2 -0
- package/dist/components/OtpInput/types.d.ts +87 -0
- package/dist/components/Page/Page.vue.d.ts +34 -0
- package/dist/components/Page/index.d.ts +2 -0
- package/dist/components/Page/types.d.ts +75 -0
- package/dist/components/PageActions/PageActions.vue.d.ts +6 -0
- package/dist/components/PageActions/index.d.ts +2 -0
- package/dist/components/PageActions/types.d.ts +17 -0
- package/dist/components/Pagination/Pagination.vue.d.ts +22 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Popper/Popper.vue.d.ts +45 -0
- package/dist/components/Popper/index.d.ts +2 -0
- package/dist/components/Popper/types.d.ts +29 -0
- package/dist/components/PreventAutoComplete/PreventAutoComplete.vue.d.ts +24 -0
- package/dist/components/PreventAutoComplete/index.d.ts +1 -0
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +48 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.vue.d.ts +143 -0
- package/dist/components/RadioButton/RadioButtonControl.vue.d.ts +50 -0
- package/dist/components/RadioButton/index.d.ts +2 -0
- package/dist/components/RangeSlider/RangeSlider.vue.d.ts +303 -0
- package/dist/components/RangeSlider/index.d.ts +1 -0
- package/dist/components/Rating/Rating.vue.d.ts +20 -0
- package/dist/components/Rating/index.d.ts +2 -0
- package/dist/components/Rating/types.d.ts +78 -0
- package/dist/components/ResourceList/ResourceItem.vue.d.ts +17 -0
- package/dist/components/ResourceList/ResourceList.vue.d.ts +19 -0
- package/dist/components/ResourceList/index.d.ts +3 -0
- package/dist/components/ResourceList/types.d.ts +19 -0
- package/dist/components/SaveBar/SaveBar.vue.d.ts +15 -0
- package/dist/components/SaveBar/index.d.ts +4 -0
- package/dist/components/SaveBar/store.d.ts +56 -0
- package/dist/components/SaveBar/types.d.ts +42 -0
- package/dist/components/SaveBarController/SaveBarController.vue.d.ts +40 -0
- package/dist/components/SaveBarController/index.d.ts +1 -0
- package/dist/components/ScrollPane/ScrollPane.vue.d.ts +24 -0
- package/dist/components/ScrollPane/index.d.ts +2 -0
- package/dist/components/ScrollPane/types.d.ts +64 -0
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +39 -0
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/SegmentedControl/types.d.ts +119 -0
- package/dist/components/Select/Select.vue.d.ts +901 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Sheet/Sheet.vue.d.ts +41 -0
- package/dist/components/Sheet/index.d.ts +2 -0
- package/dist/components/Sheet/manager.d.ts +34 -0
- package/dist/components/Sheet/types.d.ts +92 -0
- package/dist/components/SkeletonBodyText/SkeletonBodyText.vue.d.ts +17 -0
- package/dist/components/SkeletonBodyText/index.d.ts +1 -0
- package/dist/components/SkeletonCard/SkeletonCard.vue.d.ts +34 -0
- package/dist/components/SkeletonCard/index.d.ts +1 -0
- package/dist/components/SkeletonDisplayText/SkeletonDisplayText.vue.d.ts +17 -0
- package/dist/components/SkeletonDisplayText/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.vue.d.ts +52 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Splitter/Splitter.vue.d.ts +60 -0
- package/dist/components/Splitter/index.d.ts +2 -0
- package/dist/components/Splitter/types.d.ts +177 -0
- package/dist/components/Stack/Stack.vue.d.ts +130 -0
- package/dist/components/Stack/StackItem.vue.d.ts +23 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/StatGroup/Stat.vue.d.ts +16 -0
- package/dist/components/StatGroup/StatGroup.vue.d.ts +17 -0
- package/dist/components/StatGroup/index.d.ts +3 -0
- package/dist/components/StatGroup/types.d.ts +42 -0
- package/dist/components/Sticky/Sticky.vue.d.ts +27 -0
- package/dist/components/Sticky/index.d.ts +2 -0
- package/dist/components/Sticky/types.d.ts +24 -0
- package/dist/components/SyntaxHighlighter/SyntaxHighlighter.vue.d.ts +12 -0
- package/dist/components/SyntaxHighlighter/index.d.ts +2 -0
- package/dist/components/SyntaxHighlighter/types.d.ts +10 -0
- package/dist/components/Tabs/Tabs.vue.d.ts +23 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/types.d.ts +19 -0
- package/dist/components/Tag/Tag.vue.d.ts +29 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/TextContainer/TextContainer.vue.d.ts +13 -0
- package/dist/components/TextContainer/index.d.ts +1 -0
- package/dist/components/TextField/TextField.vue.d.ts +38 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/TextField/types.d.ts +130 -0
- package/dist/components/TextStyle/TextStyle.vue.d.ts +15 -0
- package/dist/components/TextStyle/index.d.ts +1 -0
- package/dist/components/Thumbnail/Thumbnail.vue.d.ts +17 -0
- package/dist/components/Thumbnail/index.d.ts +2 -0
- package/dist/components/Thumbnail/types.d.ts +32 -0
- package/dist/components/TimePicker/TimePicker.vue.d.ts +25 -0
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/TimePicker/types.d.ts +90 -0
- package/dist/components/TimezonePicker/TimezonePicker.vue.d.ts +15 -0
- package/dist/components/TimezonePicker/index.d.ts +2 -0
- package/dist/components/TimezonePicker/types.d.ts +50 -0
- package/dist/components/TimezonePicker/zoneCountries.d.ts +2 -0
- package/dist/components/ToastManager/ProgressBar.vue.d.ts +8 -0
- package/dist/components/ToastManager/Toast.vue.d.ts +14 -0
- package/dist/components/ToastManager/ToastManager.vue.d.ts +19 -0
- package/dist/components/ToastManager/host.d.ts +14 -0
- package/dist/components/ToastManager/index.d.ts +24 -0
- package/dist/components/ToastManager/manager.d.ts +45 -0
- package/dist/components/ToastManager/types.d.ts +44 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.vue.d.ts +35 -0
- package/dist/components/ToggleSwitch/index.d.ts +2 -0
- package/dist/components/ToggleSwitch/types.d.ts +84 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts +20 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/UiProvider/UiProvider.vue.d.ts +16 -0
- package/dist/components/UiProvider/index.d.ts +2 -0
- package/dist/components/UiProvider/types.d.ts +2 -0
- package/dist/components/UiProvider/utils.d.ts +5 -0
- package/dist/components/UnstyledLink/UnstyledLink.vue.d.ts +5 -0
- package/dist/components/UnstyledLink/index.d.ts +1 -0
- package/dist/components/all.d.ts +92 -0
- package/dist/components/types.d.ts +74 -0
- package/dist/globalExtensions.d.ts +7 -0
- package/dist/i18n/en.json.d.ts +60 -0
- package/dist/lib.d.ts +67 -0
- package/dist/lib.umd.d.ts +1 -0
- package/dist/style.css +2 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/ui.js +20051 -0
- package/dist/ui.umd.js +10 -0
- package/dist/utils/autoHost.d.ts +27 -0
- package/dist/utils/color.d.ts +112 -0
- package/dist/utils/colorRamp.d.ts +51 -0
- package/dist/utils/createTheme.d.ts +52 -0
- package/dist/utils/customTheme.d.ts +73 -0
- package/dist/utils/date.d.ts +4 -0
- package/dist/utils/debounce.d.ts +3 -0
- package/dist/utils/deferredPromise.d.ts +6 -0
- package/dist/utils/format.d.ts +9 -0
- package/dist/utils/fuzzy.d.ts +33 -0
- package/dist/utils/gradient.d.ts +83 -0
- package/dist/utils/index.d.ts +31 -0
- package/dist/utils/loader.d.ts +1 -0
- package/dist/utils/positionPanel.d.ts +32 -0
- package/dist/utils/radix.d.ts +6 -0
- package/dist/utils/theme.d.ts +42 -0
- package/dist/utils/timezone.d.ts +66 -0
- package/dist/utils/tokens.d.ts +62 -0
- package/dist/utils/translate.d.ts +27 -0
- package/dist/zoneCountries-CWZGMHyp.js +353 -0
- package/package.json +120 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { ActionWithSubjectType } from '../types';
|
|
2
|
+
interface DataTableFormatContextType {
|
|
3
|
+
currency: string;
|
|
4
|
+
locale: string;
|
|
5
|
+
timezone: string;
|
|
6
|
+
}
|
|
7
|
+
export type DataTableColumnFormatFuncType = (content: any, row: any, forTotal?: boolean) => string | null;
|
|
8
|
+
export interface DataTableColumnType {
|
|
9
|
+
key: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
format?: string | DataTableColumnFormatFuncType;
|
|
13
|
+
formatString?: string;
|
|
14
|
+
formatFunc?: DataTableColumnFormatFuncType;
|
|
15
|
+
formatContext?: (row: object, forTotal: boolean) => Partial<DataTableFormatContextType>;
|
|
16
|
+
width?: number;
|
|
17
|
+
minWidth?: number;
|
|
18
|
+
maxWidth?: number;
|
|
19
|
+
fixed?: boolean;
|
|
20
|
+
sortable?: boolean;
|
|
21
|
+
wrap?: boolean;
|
|
22
|
+
index?: number;
|
|
23
|
+
classes?: Array<string | false>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An action at the end of a single row. Its `onAction` receives that row.
|
|
27
|
+
*/
|
|
28
|
+
export type DataTableRowActionItemType<R extends Record<string, any>> = ActionWithSubjectType<R>;
|
|
29
|
+
/**
|
|
30
|
+
* An action shown once rows are selected. Its `onAction` receives every
|
|
31
|
+
* selected row, as an array.
|
|
32
|
+
*/
|
|
33
|
+
export type DataTableBulkActionType<R extends Record<string, any>> = ActionWithSubjectType<R[]>;
|
|
34
|
+
export type DataTableRowActionType<R extends Record<string, any>> = DataTableRowActionItemType<R>[] | ((row: R, index: number) => DataTableRowActionItemType<R>[]);
|
|
35
|
+
export type DataTableLoadingStateType = {
|
|
36
|
+
totals: boolean;
|
|
37
|
+
rows: boolean;
|
|
38
|
+
footer: boolean;
|
|
39
|
+
};
|
|
40
|
+
export type DataTablePaginationType = {
|
|
41
|
+
offset: number;
|
|
42
|
+
updateOffset: (offset: number) => void;
|
|
43
|
+
limit: number;
|
|
44
|
+
updateLimit: (limit: number) => void;
|
|
45
|
+
pageSizes?: number[];
|
|
46
|
+
total?: number;
|
|
47
|
+
summary?: string;
|
|
48
|
+
};
|
|
49
|
+
export type DataTableSortType = {
|
|
50
|
+
column: string;
|
|
51
|
+
direction: 'asc' | 'desc';
|
|
52
|
+
};
|
|
53
|
+
export type InterPropsType<Row extends Record<string, any> = Record<string, any>> = {
|
|
54
|
+
/**
|
|
55
|
+
* An array of Columns.
|
|
56
|
+
*
|
|
57
|
+
* ```ts
|
|
58
|
+
* interface Column {
|
|
59
|
+
* key: string
|
|
60
|
+
* label: string
|
|
61
|
+
* // @See Formatter
|
|
62
|
+
* // A function can be provided to format the cell value directly, it is
|
|
63
|
+
* // called with (value, row, forTotal) and should return a string.
|
|
64
|
+
* format?: FormatType | FormatFunc
|
|
65
|
+
* // As above, an alternative to passing a function as `format`.
|
|
66
|
+
* // type FormatFunc =
|
|
67
|
+
* // (value: any, row: object, forTotal?: boolean) => string | null
|
|
68
|
+
* formatFunc?: FormatFunc
|
|
69
|
+
* // Allows overriding the format context for the current cell.
|
|
70
|
+
* // @See Formatter
|
|
71
|
+
* formatContext?: (row: object, forTotal: boolean) => Partial<FormatContext>
|
|
72
|
+
* // Shortcut for setting minWidth and maxWidth to same value.
|
|
73
|
+
* width?: number
|
|
74
|
+
* // Minimum column width in pixels.
|
|
75
|
+
* minWidth?: number
|
|
76
|
+
* // Maximum column width in pixels.
|
|
77
|
+
* maxWidth?: number
|
|
78
|
+
* // Fixes the column in place, only applies to first column.
|
|
79
|
+
* fixed?: boolean
|
|
80
|
+
* sortable?: boolean
|
|
81
|
+
* // Wraps any overflowing content in the column instead of truncating it.
|
|
82
|
+
* // Combine with `minWidth` option to prevent column from being made
|
|
83
|
+
* // infinitely narrow.
|
|
84
|
+
* wrap?: boolean
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
columns: DataTableColumnType[];
|
|
89
|
+
/**
|
|
90
|
+
* An array of row data objects to display.
|
|
91
|
+
*
|
|
92
|
+
* - Each row should have a unique `id` property.
|
|
93
|
+
* - Data will be displayed in the order provided.
|
|
94
|
+
* - If client-side pagination is used, the data table will truncate rows as neccessary.
|
|
95
|
+
* - If server-side pagination is used, you are responsible for pagination.
|
|
96
|
+
*/
|
|
97
|
+
rows: Row[];
|
|
98
|
+
/**
|
|
99
|
+
* An array of actions to display at the end of each row.
|
|
100
|
+
*
|
|
101
|
+
* A function can be provided that will be called once for each row to
|
|
102
|
+
* customize the action on a per-row basis.
|
|
103
|
+
*
|
|
104
|
+
* When necessary the action colum will collapse into an action list
|
|
105
|
+
* and stay fixed to the right edge to improve accessibility.
|
|
106
|
+
*
|
|
107
|
+
* **`onAction` receives the row it belongs to.**
|
|
108
|
+
*
|
|
109
|
+
* ```ts
|
|
110
|
+
* interface DataTableRowActionItemType<Row> {
|
|
111
|
+
* label: string
|
|
112
|
+
* // See <Icon> component.
|
|
113
|
+
* icon?: string
|
|
114
|
+
* disabled?: boolean
|
|
115
|
+
* url?: string
|
|
116
|
+
* external?: boolean
|
|
117
|
+
* onAction?(row: Row): void
|
|
118
|
+
* }
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
rowActions?: DataTableRowActionType<Row>;
|
|
122
|
+
/**
|
|
123
|
+
* An array of actions to display when the user selects one or more rows.
|
|
124
|
+
*
|
|
125
|
+
* **`onAction` receives an array of the selected row data objects.**
|
|
126
|
+
*
|
|
127
|
+
* ```ts
|
|
128
|
+
* interface DataTableBulkActionType<Row> {
|
|
129
|
+
* label: string
|
|
130
|
+
* // See <Icon> component.
|
|
131
|
+
* icon?: string
|
|
132
|
+
* disabled?: boolean
|
|
133
|
+
* url?: string
|
|
134
|
+
* external?: boolean
|
|
135
|
+
* onAction?(rows: Row[]): void
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
bulkActions?: DataTableBulkActionType<Row>[];
|
|
140
|
+
/**
|
|
141
|
+
* An array containing all the row IDs that are selected.
|
|
142
|
+
* The `update:selectedIds` event is emitted whenever the user changes the
|
|
143
|
+
* selection.
|
|
144
|
+
*/
|
|
145
|
+
selectedIds?: number[];
|
|
146
|
+
/**
|
|
147
|
+
* Splits the data in the table into multiple pages if the number of rows
|
|
148
|
+
* exceeds the page limit.
|
|
149
|
+
*
|
|
150
|
+
* ```ts
|
|
151
|
+
* interface PaginationType {
|
|
152
|
+
* offset: number
|
|
153
|
+
* // Callback method to invoke with the new offset value when the user
|
|
154
|
+
* // changes a page.
|
|
155
|
+
* updateOffset(number): void
|
|
156
|
+
* // The number of rows to show per page.
|
|
157
|
+
* limit: number
|
|
158
|
+
* // Callback method to invoke with the new limit value when the user
|
|
159
|
+
* // changes the page size.
|
|
160
|
+
* updateLimit(number): void
|
|
161
|
+
* // An array of page sizes (limits) the user can choose from.
|
|
162
|
+
* // See `Pagination` component for defaults and options.
|
|
163
|
+
* pageSizes: number[]
|
|
164
|
+
* // Defaults to rows.total.
|
|
165
|
+
* // If the total provided is greater than the current number of rows
|
|
166
|
+
* // then the table will render in "server-side" mode where it shows all
|
|
167
|
+
* // rows and leaves handing of the pagination up to you.
|
|
168
|
+
* total?: number
|
|
169
|
+
* // Localized footer summary, defaults to "Showing {range} of {total}"
|
|
170
|
+
* summary?: string
|
|
171
|
+
* }
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
pagination?: DataTablePaginationType;
|
|
175
|
+
/**
|
|
176
|
+
* If `true` then all numeric columns will be automatically summed.
|
|
177
|
+
*
|
|
178
|
+
* If an array is provided then it will use these numbers for the totals.
|
|
179
|
+
* Use empty strings as placeholders for columns with no total.
|
|
180
|
+
*
|
|
181
|
+
* For example the follow array would manually show totals of 50 and 100 for
|
|
182
|
+
* the second and forth columns and format them based on the column format.
|
|
183
|
+
*
|
|
184
|
+
* ```js
|
|
185
|
+
* ['', 50, '', 100]
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* **Note:** The first column can never have a total.
|
|
189
|
+
*/
|
|
190
|
+
totals?: boolean | number[] | string[];
|
|
191
|
+
/**
|
|
192
|
+
* Controls loading states for parts of the table. Accepts an object or boolean.
|
|
193
|
+
* Passing `true` is the same as using `{rows: true}`.
|
|
194
|
+
*
|
|
195
|
+
* ```ts
|
|
196
|
+
* interface LoadingStates {
|
|
197
|
+
* // Shows skeleton text where headers totals should be.
|
|
198
|
+
* totals: boolean
|
|
199
|
+
* // Shows a spinner centered on the table and dims all content.
|
|
200
|
+
* rows: boolean
|
|
201
|
+
* // Shows skeleton text in the footer.
|
|
202
|
+
* footer: boolean
|
|
203
|
+
* }
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
loading?: boolean | DataTableLoadingStateType;
|
|
207
|
+
/**
|
|
208
|
+
* Text to show when there are no rows to display.
|
|
209
|
+
*/
|
|
210
|
+
emptyText?: string;
|
|
211
|
+
/**
|
|
212
|
+
* The current column to sort by and its direction.
|
|
213
|
+
*
|
|
214
|
+
* ```ts
|
|
215
|
+
* interface SortType {
|
|
216
|
+
* column: string
|
|
217
|
+
* direction: string // asc | desc
|
|
218
|
+
* }
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
sort?: DataTableSortType;
|
|
222
|
+
/**
|
|
223
|
+
* Renders rows in compact form.
|
|
224
|
+
*/
|
|
225
|
+
compact?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* The minimum width in pixels which the DataTable must be for row actions
|
|
228
|
+
* to be displayed inline. When the DataTable is smaller than this width the
|
|
229
|
+
* actions are collapsed into a dropdown menu.
|
|
230
|
+
*/
|
|
231
|
+
actionCollapseThreshold?: number;
|
|
232
|
+
/**
|
|
233
|
+
* The maximum number of actions to display inline before collapsing into a
|
|
234
|
+
* dropdown menu.
|
|
235
|
+
* @default 3
|
|
236
|
+
*/
|
|
237
|
+
maxPersistActions?: number;
|
|
238
|
+
/**
|
|
239
|
+
* The maximum width in pixels which the DataTable must be for row actions
|
|
240
|
+
* to be displayed inline. When the DataTable is smaller than this width the
|
|
241
|
+
* actions are collapsed into a dropdown menu.
|
|
242
|
+
*/
|
|
243
|
+
fixedColumnDisableThreshold?: number;
|
|
244
|
+
/**
|
|
245
|
+
* Disables the scroll bounce effect.
|
|
246
|
+
*/
|
|
247
|
+
disableScrollBounce?: boolean;
|
|
248
|
+
};
|
|
249
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DatePickerProps } from './types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<DatePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
"update:modelValue": (v: string | null) => any;
|
|
4
|
+
}, string, import('vue').PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
5
|
+
"onUpdate:modelValue"?: ((v: string | null) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
type: "datetime" | "date" | "month" | "year";
|
|
9
|
+
autoOpen: boolean;
|
|
10
|
+
readonly: boolean;
|
|
11
|
+
modelFormat: string;
|
|
12
|
+
minTime: string;
|
|
13
|
+
maxTime: string;
|
|
14
|
+
clearable: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface DatePickerProps {
|
|
3
|
+
label?: string | false;
|
|
4
|
+
error?: string | false | null;
|
|
5
|
+
/**
|
|
6
|
+
* Help text to show below the control.
|
|
7
|
+
*/
|
|
8
|
+
helpText?: string | false;
|
|
9
|
+
/**
|
|
10
|
+
* Renders help text as raw HTML. Use with caution.
|
|
11
|
+
*/
|
|
12
|
+
helpTextHtml?: string | false;
|
|
13
|
+
/**
|
|
14
|
+
* Renders a help icon next to the label which links to an external page.
|
|
15
|
+
*/
|
|
16
|
+
helpLink?: string | false;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
readonly?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The type of picker
|
|
22
|
+
*/
|
|
23
|
+
type?: 'datetime' | 'date' | 'month' | 'year';
|
|
24
|
+
/**
|
|
25
|
+
* The model date value formatted according to `modelFormat`. Parts of the
|
|
26
|
+
* date may be truncated depending on the `type` being used.
|
|
27
|
+
*/
|
|
28
|
+
modelValue?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Format of the underling value.
|
|
31
|
+
*
|
|
32
|
+
* @see https://day.js.org/docs/en/display/format
|
|
33
|
+
*/
|
|
34
|
+
modelFormat?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Provide a filter function to disable specific dates. The function is
|
|
37
|
+
* passed a Dayjs instance.
|
|
38
|
+
*/
|
|
39
|
+
disableDate?: (d: Dayjs) => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Restricts the minimum time that can be selected.
|
|
42
|
+
*/
|
|
43
|
+
minTime?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Restricts the maximum time that can be selected.
|
|
46
|
+
*/
|
|
47
|
+
maxTime?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Shows a button at the end of the date input which allows the value to be
|
|
50
|
+
* cleared.
|
|
51
|
+
*/
|
|
52
|
+
clearable?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* If set to `false` will not automatically display the picker.
|
|
55
|
+
*/
|
|
56
|
+
autoOpen?: boolean;
|
|
57
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DividerProps } from './types';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<DividerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DividerProps> & Readonly<{}>, {
|
|
7
|
+
placement: import('./types').DividerPlacementType;
|
|
8
|
+
dashed: boolean;
|
|
9
|
+
vertical: boolean;
|
|
10
|
+
spacing: import('./types').DividerSpacingType;
|
|
11
|
+
bleed: boolean | number | string;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How much room the divider keeps around itself.
|
|
3
|
+
*
|
|
4
|
+
* The scale is `Stack`'s, deliberately — a screen built from both should have
|
|
5
|
+
* one rhythm, not two that nearly agree. Leaving it unset is the same 16px
|
|
6
|
+
* `Stack` uses by default.
|
|
7
|
+
*/
|
|
8
|
+
export type DividerSpacingType = 'none' | 'extraTight' | 'tight' | 'loose' | 'extraLoose';
|
|
9
|
+
/**
|
|
10
|
+
* Where the label sits along the line.
|
|
11
|
+
*
|
|
12
|
+
* `left` and `right` keep a short run of line on the near side; `start` and
|
|
13
|
+
* `end` put the label outside the line entirely, so it begins or ends the
|
|
14
|
+
* divider.
|
|
15
|
+
*
|
|
16
|
+
* ```
|
|
17
|
+
* start Label ─────────────────────
|
|
18
|
+
* left ──── Label ────────────────
|
|
19
|
+
* center ───────── Label ───────────
|
|
20
|
+
* right ──────────────── Label ────
|
|
21
|
+
* end ───────────────────── Label
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* The row follows the writing direction, so under `dir="rtl"` every one of
|
|
25
|
+
* these mirrors — `left` and `start` sit where reading begins, on the right.
|
|
26
|
+
*/
|
|
27
|
+
export type DividerPlacementType = 'start' | 'left' | 'center' | 'right' | 'end';
|
|
28
|
+
export interface DividerProps {
|
|
29
|
+
/**
|
|
30
|
+
* Draws the rule down instead of across, for separating things sitting side
|
|
31
|
+
* by side. It takes the height of whatever it is stacked against — inside a
|
|
32
|
+
* `Stack` that is the tallest item — and falls back to one line of text where
|
|
33
|
+
* there is nothing to stretch to.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
vertical?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Room left on both sides of the line: above and below when horizontal,
|
|
40
|
+
* left and right when vertical.
|
|
41
|
+
*
|
|
42
|
+
* Margins, not padding, so a divider between two elements that already have
|
|
43
|
+
* their own spacing collapses into it rather than adding to it.
|
|
44
|
+
*
|
|
45
|
+
* @default undefined (16px)
|
|
46
|
+
*/
|
|
47
|
+
spacing?: DividerSpacingType;
|
|
48
|
+
/**
|
|
49
|
+
* Where the label sits, when there is one. Ignored without slot content,
|
|
50
|
+
* since there is nothing to place.
|
|
51
|
+
*
|
|
52
|
+
* `'start'` and `'end'` drop the line on the label's near side altogether,
|
|
53
|
+
* rather than leaving the short run `'left'` and `'right'` keep.
|
|
54
|
+
*
|
|
55
|
+
* @default 'center'
|
|
56
|
+
*/
|
|
57
|
+
placement?: DividerPlacementType;
|
|
58
|
+
/**
|
|
59
|
+
* Draws the line dashed. A shortcut for `--Divider-style`, which also takes
|
|
60
|
+
* `dotted` or anything else `border-style` accepts.
|
|
61
|
+
*
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
dashed?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Pulls the line out through its container's padding so it meets the edges —
|
|
67
|
+
* what a divider inside a `CardSection` usually wants, since the card's own
|
|
68
|
+
* section rules run edge to edge.
|
|
69
|
+
*
|
|
70
|
+
* `true` uses 16px, matching `CardSection`'s padding. A number is pixels and
|
|
71
|
+
* a string is any CSS length, for containers padded differently.
|
|
72
|
+
*
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
bleed?: boolean | number | string;
|
|
76
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface EventDelegatorProps {
|
|
2
|
+
target?: 'window' | 'document';
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<EventDelegatorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EventDelegatorProps> & Readonly<{}>, {
|
|
9
|
+
target: "window" | "document";
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EventDelegator } from './EventDelegator.vue';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A DOM event handler as it arrives from `$attrs`.
|
|
3
|
+
*
|
|
4
|
+
* The delegator only ever invokes these with the event itself, so this is the
|
|
5
|
+
* whole contract — it is deliberately narrower than the handler a caller may
|
|
6
|
+
* have written.
|
|
7
|
+
*/
|
|
8
|
+
export type EventHandler = (event: Event) => void;
|
|
9
|
+
export interface Listener {
|
|
10
|
+
name: string;
|
|
11
|
+
handler: EventHandler;
|
|
12
|
+
options: ListenerOptions;
|
|
13
|
+
remove?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface ListenerOptions {
|
|
16
|
+
capture: boolean;
|
|
17
|
+
passive: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function normalizeEvent(name: string): {
|
|
20
|
+
once: boolean;
|
|
21
|
+
capture: boolean;
|
|
22
|
+
passive: boolean;
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function createEventListener(name: string, target: EventTarget, handler: EventHandler): Listener;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
multiple: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {
|
|
9
|
+
isDragging: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
}, {}, {
|
|
12
|
+
$t: typeof import('../../utils/translate').translate;
|
|
13
|
+
onClick(event: MouseEvent): void;
|
|
14
|
+
onDrop(event: DragEvent): void;
|
|
15
|
+
onDragEnter(): void;
|
|
16
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
multiple: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {
|
|
22
|
+
multiple: boolean;
|
|
23
|
+
}, {}, {
|
|
24
|
+
Icon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
25
|
+
icon: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
size: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
contained: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
};
|
|
34
|
+
badge: {
|
|
35
|
+
type: import('vue').PropType<import('../types').IconBadgeStatusType>;
|
|
36
|
+
};
|
|
37
|
+
badgeIcon: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
badgeColor: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
};
|
|
43
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
46
|
+
icon: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
};
|
|
52
|
+
contained: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
};
|
|
55
|
+
badge: {
|
|
56
|
+
type: import('vue').PropType<import('../types').IconBadgeStatusType>;
|
|
57
|
+
};
|
|
58
|
+
badgeIcon: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
};
|
|
61
|
+
badgeColor: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
}>> & Readonly<{}>, {
|
|
65
|
+
contained: boolean;
|
|
66
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
67
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|