@db-ux/v-core-components 5.5.0 → 5.6.1
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 +47 -0
- package/agent/Icon.md +14 -13
- package/agent/LoadingIndicator.md +57 -0
- package/agent/_instructions.md +1 -0
- package/dist/components/control-panel-navigation-item-group/model.d.ts +25 -0
- package/dist/components/dialog/dialog.vue.d.ts +30 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog/model.d.ts +36 -0
- package/dist/components/dialog-footer/dialog-footer.vue.d.ts +18 -0
- package/dist/components/dialog-footer/index.d.ts +1 -0
- package/dist/components/dialog-footer/model.d.ts +5 -0
- package/dist/components/dialog-header/dialog-header.vue.d.ts +26 -0
- package/dist/components/dialog-header/index.d.ts +1 -0
- package/dist/components/dialog-header/model.d.ts +10 -0
- package/dist/components/drawer/drawer.vue.d.ts +3 -0
- package/dist/components/drawer/model.d.ts +11 -9
- package/dist/components/drawer-header/model.d.ts +3 -2
- package/dist/components/loading-indicator/examples/_timeout.data.d.ts +6 -0
- package/dist/components/loading-indicator/index.d.ts +1 -0
- package/dist/components/loading-indicator/loading-indicator.vue.d.ts +41 -0
- package/dist/components/loading-indicator/model.d.ts +93 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/model.d.ts +117 -0
- package/dist/components/pagination/pagination.vue.d.ts +31 -0
- package/dist/components/pagination-item/index.d.ts +1 -0
- package/dist/components/pagination-item/model.d.ts +5 -0
- package/dist/components/pagination-item/pagination-item.vue.d.ts +14 -0
- package/dist/components/popover/popover.vue.d.ts +1 -1
- package/dist/components/tooltip/tooltip.vue.d.ts +1 -1
- package/dist/db-ux.es.js +2243 -1495
- package/dist/db-ux.umd.js +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/shared/constants.d.ts +4 -0
- package/dist/shared/model.d.ts +43 -4
- package/dist/utils/dialog/index.d.ts +77 -0
- package/dist/utils/dialog/ponyfill.d.ts +55 -0
- package/dist/utils/document-keydown-listener.d.ts +8 -0
- package/package.json +8 -8
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { GlobalProps, GlobalState, SizeProps } from '../../shared/model.js';
|
|
2
|
+
/**
|
|
3
|
+
* A single item the option/`items` API generates. `page` is the one-based page
|
|
4
|
+
* number, `layout` decides whether the collapsing hides it, and `ellipsis` holds the
|
|
5
|
+
* gap tokens it borders. This describes what the pagination writes onto the DOM; it is
|
|
6
|
+
* not a prop the consumer sets.
|
|
7
|
+
*/
|
|
8
|
+
export type PaginationItemType = {
|
|
9
|
+
page: number;
|
|
10
|
+
layout: 'always' | 'wide';
|
|
11
|
+
/**
|
|
12
|
+
* Space separated gap tokens (`wide-before`, `wide-after`,
|
|
13
|
+
* `collapsed-before`, `collapsed-after`). Every layout marks its own gaps,
|
|
14
|
+
* because a marker inherits the visibility of the page that carries it - one
|
|
15
|
+
* hidden below the breakpoint would take its ellipsis with it. One token per
|
|
16
|
+
* side, so a page standing between two gaps carries two of them instead of a
|
|
17
|
+
* value meaning both.
|
|
18
|
+
*/
|
|
19
|
+
ellipsis?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
label?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Identity of the item across page changes. Keying by list position instead
|
|
24
|
+
* would move the focus to an adjacent page whenever the window shifts, because
|
|
25
|
+
* the framework reuses the element for whatever page now sits at that position.
|
|
26
|
+
*/
|
|
27
|
+
key: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* An entry of the `items` prop. A consumer who drives the pagination through data
|
|
31
|
+
* rather than composed children passes these; `disabled` greys a single page out,
|
|
32
|
+
* which the design otherwise cannot express.
|
|
33
|
+
*/
|
|
34
|
+
export type PaginationItemOption = {
|
|
35
|
+
disabled?: boolean | string;
|
|
36
|
+
label?: string;
|
|
37
|
+
};
|
|
38
|
+
export type DBPaginationDefaultProps = {
|
|
39
|
+
/**
|
|
40
|
+
* One-based number of the currently active page. Defaults to `1`.
|
|
41
|
+
*/
|
|
42
|
+
currentPage?: number | string;
|
|
43
|
+
/**
|
|
44
|
+
* Total number of records across all pages. With `pageSize` it decides the page
|
|
45
|
+
* count. Defaults to `0`.
|
|
46
|
+
*/
|
|
47
|
+
totalCount?: number | string;
|
|
48
|
+
/**
|
|
49
|
+
* Number of records on one page. Defaults to `10`.
|
|
50
|
+
*/
|
|
51
|
+
pageSize?: number | string;
|
|
52
|
+
/**
|
|
53
|
+
* Number of page buttons shown on each side of the current page.
|
|
54
|
+
*/
|
|
55
|
+
siblingCount?: number | string;
|
|
56
|
+
/**
|
|
57
|
+
* Number of page buttons always shown at the start and end. Below the collapsing
|
|
58
|
+
* breakpoint at most one page is pinned per end, whatever this says - the
|
|
59
|
+
* collapsed layout exists to be narrow.
|
|
60
|
+
*/
|
|
61
|
+
boundaryCount?: number | string;
|
|
62
|
+
/**
|
|
63
|
+
* Per-page options for the data-driven API, one entry per page. Lets a single
|
|
64
|
+
* page be disabled. When omitted the pagination derives the pages from
|
|
65
|
+
* `totalCount` and `pageSize`.
|
|
66
|
+
*/
|
|
67
|
+
items?: PaginationItemOption[];
|
|
68
|
+
/**
|
|
69
|
+
* Accessible label for the pagination navigation landmark.
|
|
70
|
+
*/
|
|
71
|
+
label?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Accessible label for the previous-page button.
|
|
74
|
+
*/
|
|
75
|
+
previousLabel?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Accessible label for the next-page button.
|
|
78
|
+
*/
|
|
79
|
+
nextLabel?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Accessible page-button label. `{page}` and `{totalPages}` are replaced. The
|
|
82
|
+
* visible text of a page is only its number, so the context lives in this label.
|
|
83
|
+
*/
|
|
84
|
+
pageLabel?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Informs the parent that a different page was requested. The parent must
|
|
87
|
+
* update `currentPage`; the component never changes it internally.
|
|
88
|
+
*/
|
|
89
|
+
onPageChange?: (page: number) => void;
|
|
90
|
+
};
|
|
91
|
+
export type DBPaginationProps = DBPaginationDefaultProps & GlobalProps & SizeProps;
|
|
92
|
+
export type DBPaginationDefaultState = {
|
|
93
|
+
getInteger: (value: number | string | undefined, fallback: number, minimum: number) => number;
|
|
94
|
+
getRange: (start: number, end: number) => number[];
|
|
95
|
+
isDataDriven: () => boolean;
|
|
96
|
+
getTotalPages: () => number;
|
|
97
|
+
getCurrentPage: () => number;
|
|
98
|
+
isPageDisabled: (page: number) => boolean;
|
|
99
|
+
getStepPage: (direction: number) => number;
|
|
100
|
+
getPages: (siblingCount: number) => number[];
|
|
101
|
+
getCollapsedPages: () => number[];
|
|
102
|
+
getPaginationItems: () => PaginationItemType[];
|
|
103
|
+
getEllipsisTokens: (layout: string, pages: number[], page: number, totalPages: number) => string[];
|
|
104
|
+
getPageText: (page: number) => string;
|
|
105
|
+
getPageLabel: (page: number) => string;
|
|
106
|
+
applyItem: (item: any, page: number, description: any) => void;
|
|
107
|
+
syncItems: () => void;
|
|
108
|
+
_setupObserver: () => void;
|
|
109
|
+
_observer: any;
|
|
110
|
+
_pendingRafId: number | null;
|
|
111
|
+
isModifiedLinkClick: (event: any) => boolean;
|
|
112
|
+
preventCurrentPageNavigation: (event: any) => void;
|
|
113
|
+
handleClick: (event: any) => void;
|
|
114
|
+
stepToPage: (page: number) => void;
|
|
115
|
+
handlePageChange: (page: number) => void;
|
|
116
|
+
};
|
|
117
|
+
export type DBPaginationState = DBPaginationDefaultState & GlobalState;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DBPaginationProps } from "./model.js";
|
|
2
|
+
declare var __VLS_6: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBPaginationProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<DBPaginationProps> & Readonly<{}>, {
|
|
7
|
+
id: string;
|
|
8
|
+
children: any;
|
|
9
|
+
className: string;
|
|
10
|
+
propOverrides: import("../../index.js", { with: { "resolution-mode": "import" } }).PropOverridesType;
|
|
11
|
+
label: string;
|
|
12
|
+
items: import("./model.js", { with: { "resolution-mode": "import" } }).PaginationItemOption[];
|
|
13
|
+
size: import("../../index.js", { with: { "resolution-mode": "import" } }).SizeType;
|
|
14
|
+
currentPage: number | string;
|
|
15
|
+
totalCount: number | string;
|
|
16
|
+
pageSize: number | string;
|
|
17
|
+
siblingCount: number | string;
|
|
18
|
+
boundaryCount: number | string;
|
|
19
|
+
previousLabel: string;
|
|
20
|
+
nextLabel: string;
|
|
21
|
+
pageLabel: string;
|
|
22
|
+
onPageChange: (page: number) => void;
|
|
23
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBPaginationItem } from './pagination-item.vue';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GlobalProps, GlobalState, TextProps } from '../../shared/model.js';
|
|
2
|
+
export type DBPaginationItemDefaultProps = {};
|
|
3
|
+
export type DBPaginationItemProps = DBPaginationItemDefaultProps & GlobalProps & TextProps;
|
|
4
|
+
export type DBPaginationItemDefaultState = {};
|
|
5
|
+
export type DBPaginationItemState = DBPaginationItemDefaultState & GlobalState;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DBPaginationItemProps } from "./model.js";
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBPaginationItemProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<DBPaginationItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBPopoverP
|
|
|
15
15
|
width: import("../../index.js", { with: { "resolution-mode": "import" } }).PopoverWidthType;
|
|
16
16
|
spacing: import("../../index.js", { with: { "resolution-mode": "import" } }).SpacingType | string;
|
|
17
17
|
forceAbsolute: boolean | string;
|
|
18
|
-
delay: import("../../index.js", { with: { "resolution-mode": "import" } }).PopoverDelayType;
|
|
19
18
|
animation: boolean | string;
|
|
19
|
+
delay: import("../../index.js", { with: { "resolution-mode": "import" } }).PopoverDelayType;
|
|
20
20
|
gap: boolean | string;
|
|
21
21
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -16,8 +16,8 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBTooltipP
|
|
|
16
16
|
width: import("../../shared/model.js", { with: { "resolution-mode": "import" } }).PopoverWidthType;
|
|
17
17
|
forceAbsolute: boolean | string;
|
|
18
18
|
showArrow: boolean | string;
|
|
19
|
-
delay: import("../../shared/model.js", { with: { "resolution-mode": "import" } }).PopoverDelayType;
|
|
20
19
|
animation: boolean | string;
|
|
20
|
+
delay: import("../../shared/model.js", { with: { "resolution-mode": "import" } }).PopoverDelayType;
|
|
21
21
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|