@db-ux/v-core-components 4.14.0 → 5.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/CHANGELOG.md +28 -0
- package/agent/Drawer.md +0 -8
- package/agent/TabItem.md +2 -2
- package/agent/Tabs.md +23 -20
- package/agent/_instructions.md +1 -1
- package/dist/components/drawer/drawer.vue.d.ts +7 -7
- package/dist/components/drawer/model.d.ts +20 -5
- package/dist/components/drawer-footer/drawer-footer.vue.d.ts +18 -0
- package/dist/components/drawer-footer/index.d.ts +1 -0
- package/dist/components/drawer-footer/model.d.ts +5 -0
- package/dist/components/drawer-header/drawer-header.vue.d.ts +26 -0
- package/dist/components/drawer-header/index.d.ts +1 -0
- package/dist/components/drawer-header/model.d.ts +9 -0
- package/dist/components/header/header.vue.d.ts +3 -2
- package/dist/components/header/model.d.ts +5 -1
- package/dist/components/stack/model.d.ts +1 -1
- package/dist/components/tab-item/model.d.ts +24 -13
- package/dist/components/tab-item/tab-item.vue.d.ts +5 -12
- package/dist/components/tab-list/model.d.ts +5 -5
- package/dist/components/tab-list/tab-list.vue.d.ts +3 -1
- package/dist/components/tab-panel/model.d.ts +6 -4
- package/dist/components/tab-panel/tab-panel.vue.d.ts +1 -7
- package/dist/components/tabs/model.d.ts +93 -18
- package/dist/components/tabs/tabs.vue.d.ts +13 -13
- package/dist/db-ux.es.js +1108 -720
- package/dist/db-ux.umd.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/shared/model.d.ts +12 -20
- package/dist/utils/index.d.ts +9 -0
- package/package.json +5 -5
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AlignmentType, GlobalProps, InitializedState, OrientationProps, WidthType } from '../../shared/model.js';
|
|
2
2
|
import type { DBTabItemProps } from '../tab-item/model.js';
|
|
3
3
|
import type { DBTabPanelProps } from '../tab-panel/model.js';
|
|
4
|
+
export type TabItemAlignmentType = AlignmentType;
|
|
5
|
+
export type TabItemAlignmentProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Define the tab-item alignment in full width
|
|
8
|
+
*/
|
|
9
|
+
tabItemAlignment?: TabItemAlignmentType | string;
|
|
10
|
+
};
|
|
4
11
|
export declare const TabsBehaviorList: readonly ["scrollbar", "arrows"];
|
|
5
12
|
export type TabsBehaviorType = (typeof TabsBehaviorList)[number];
|
|
6
13
|
export declare const TabsInitialSelectedModeList: readonly ["auto", "manually"];
|
|
7
14
|
export type TabsInitialSelectedModeType = (typeof TabsInitialSelectedModeList)[number];
|
|
8
|
-
export type DBSimpleTabProps = DBTabItemProps & DBTabPanelProps
|
|
15
|
+
export type DBSimpleTabProps = DBTabItemProps & DBTabPanelProps & {
|
|
16
|
+
/**
|
|
17
|
+
* Accessible label for icon-only tabs (rendered as aria-label on the tab button).
|
|
18
|
+
*/
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
};
|
|
9
21
|
export type DBTabsDefaultProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Change amount of distance if you click on an arrow, only available with behavior="arrows"
|
|
24
|
+
*/
|
|
25
|
+
arrowScrollDistance?: number | string;
|
|
10
26
|
/**
|
|
11
27
|
* Show a scrollbar or buttons with arrows to navigate for horizontal tabs with overflow visible
|
|
12
28
|
*/
|
|
@@ -15,45 +31,104 @@ export type DBTabsDefaultProps = {
|
|
|
15
31
|
* Default behavior is auto selecting the first tab, change selected tab by index
|
|
16
32
|
*/
|
|
17
33
|
initialSelectedIndex?: number | string;
|
|
34
|
+
/**
|
|
35
|
+
* Controlled active tab index. When set, the component becomes controlled:
|
|
36
|
+
* the consumer is responsible for updating this value in the onIndexChange handler.
|
|
37
|
+
* Takes precedence over initialSelectedIndex after mount.
|
|
38
|
+
*/
|
|
39
|
+
activeIndex?: number | string;
|
|
18
40
|
/**
|
|
19
41
|
* Default behavior is auto selecting the first tab, disable it with 'manually'
|
|
20
42
|
*/
|
|
21
43
|
initialSelectedMode?: TabsInitialSelectedModeType;
|
|
22
44
|
/**
|
|
23
|
-
*
|
|
45
|
+
* Accessible label for the tab bar (used as aria-label on the tablist).
|
|
24
46
|
*/
|
|
25
|
-
|
|
47
|
+
label?: string;
|
|
26
48
|
/**
|
|
27
49
|
* Provide simple tabs with label + text as content
|
|
28
50
|
*/
|
|
29
51
|
tabs?: DBSimpleTabProps[] | string;
|
|
52
|
+
/**
|
|
53
|
+
* Width of the tab-items. Auto width based on tab-item size, full width based on parent elements width.
|
|
54
|
+
*/
|
|
55
|
+
tabItemWidth?: WidthType | string;
|
|
56
|
+
/**
|
|
57
|
+
* Accessible label for the "scroll towards start" button (i18n). Only used with behavior="arrows".
|
|
58
|
+
*/
|
|
59
|
+
scrollStartLabel?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Accessible label for the "scroll towards end" button (i18n). Only used with behavior="arrows".
|
|
62
|
+
*/
|
|
63
|
+
scrollEndLabel?: string;
|
|
30
64
|
};
|
|
31
65
|
export type DBTabsEventProps = {
|
|
32
66
|
/**
|
|
33
67
|
* Informs the user if the current tab index has changed.
|
|
34
68
|
*/
|
|
35
|
-
indexChange?: (index
|
|
69
|
+
indexChange?: (index: number) => void;
|
|
36
70
|
/**
|
|
37
71
|
* Informs the user if the current tab index has changed.
|
|
38
72
|
*/
|
|
39
|
-
onIndexChange?: (index
|
|
73
|
+
onIndexChange?: (index: number) => void;
|
|
40
74
|
/**
|
|
41
|
-
*
|
|
75
|
+
* Fires when the active tab changes and a `value` prop is set on the tab items.
|
|
76
|
+
* Payload is the `value` string of the newly active tab item, or undefined
|
|
77
|
+
* if the tab item has no `value` prop set.
|
|
78
|
+
* Use this for form binding (e.g. Angular FormControl, React controlled state).
|
|
42
79
|
*/
|
|
43
|
-
|
|
80
|
+
valueChange?: (value?: string) => void;
|
|
44
81
|
/**
|
|
45
|
-
*
|
|
82
|
+
* Fires when the active tab changes and a `value` prop is set on the tab items.
|
|
83
|
+
* Payload is the `value` string of the newly active tab item, or undefined
|
|
84
|
+
* if the tab item has no `value` prop set.
|
|
85
|
+
* Use this for form binding (e.g. Angular FormControl, React controlled state).
|
|
46
86
|
*/
|
|
47
|
-
|
|
87
|
+
onValueChange?: (value?: string) => void;
|
|
48
88
|
};
|
|
49
|
-
export type DBTabsProps = DBTabsDefaultProps & GlobalProps & OrientationProps &
|
|
89
|
+
export type DBTabsProps = DBTabsDefaultProps & GlobalProps & OrientationProps & TabItemAlignmentProps & DBTabsEventProps;
|
|
50
90
|
export type DBTabsDefaultState = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
91
|
+
_id?: string;
|
|
92
|
+
_appliedLabel?: string;
|
|
93
|
+
resetIds: () => void;
|
|
94
|
+
_getScrollContainer: () => Element | null;
|
|
95
|
+
scroll: (toStart?: boolean) => void;
|
|
96
|
+
showScrollStart?: boolean;
|
|
97
|
+
showScrollEnd?: boolean;
|
|
98
|
+
_isRtl: () => boolean;
|
|
99
|
+
evaluateScrollButtons: (tabList: Element) => void;
|
|
100
|
+
getTabs: () => DBSimpleTabProps[];
|
|
101
|
+
getInitialIndex: () => number;
|
|
102
|
+
getRenderIndex: () => number;
|
|
103
|
+
getRenderFocusIndex: () => number;
|
|
104
|
+
getActiveChildIndex: () => number;
|
|
105
|
+
shouldUseActiveChild: (hashApplied: boolean) => boolean;
|
|
106
|
+
moveRovingTabindex: (focusIndex: number) => void;
|
|
107
|
+
_isOwnedPanel: (panel: HTMLElement) => boolean;
|
|
54
108
|
initTabList: () => void;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
109
|
+
_teardownScrollHandlers: () => void;
|
|
110
|
+
_resolveHashIndex: () => {
|
|
111
|
+
startIndex: number;
|
|
112
|
+
hashApplied: boolean;
|
|
113
|
+
};
|
|
114
|
+
_setupObserver: () => void;
|
|
115
|
+
initTabs: () => void;
|
|
116
|
+
syncSelection: (activeIndex?: number) => void;
|
|
117
|
+
_tabButtons: HTMLElement[];
|
|
118
|
+
_tabPanels: HTMLElement[];
|
|
119
|
+
_resizeObserver?: ResizeObserver | null;
|
|
120
|
+
_observer?: MutationObserver | null;
|
|
121
|
+
_pendingRafId: number | null;
|
|
122
|
+
_scrollListener: {
|
|
123
|
+
fn: () => void;
|
|
124
|
+
} | null;
|
|
125
|
+
_focusgroupSupported: boolean;
|
|
126
|
+
_activeIndex: number;
|
|
127
|
+
activateTab: (index: number) => void;
|
|
128
|
+
getTabId: (index: number | string) => string | undefined;
|
|
129
|
+
getPanelId: (index: number | string) => string | undefined;
|
|
130
|
+
getBaseId: () => string | undefined;
|
|
131
|
+
handleClick: (event: any) => void;
|
|
132
|
+
handleKeyDown: (event: any) => void;
|
|
58
133
|
};
|
|
59
|
-
export type DBTabsState = DBTabsDefaultState & InitializedState
|
|
134
|
+
export type DBTabsState = DBTabsDefaultState & InitializedState;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { InputEvent } from "../../shared/model.js";
|
|
2
1
|
import { DBSimpleTabProps, DBTabsProps } from "./model.js";
|
|
3
|
-
declare var
|
|
2
|
+
declare var __VLS_24: {};
|
|
4
3
|
type __VLS_Slots = {} & {
|
|
5
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_24) => any;
|
|
6
5
|
};
|
|
7
6
|
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBTabsProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<DBTabsProps> & Readonly<{}>, {
|
|
8
7
|
id: string;
|
|
9
8
|
children: any;
|
|
10
9
|
className: string;
|
|
11
|
-
propOverrides: import("../../
|
|
12
|
-
|
|
10
|
+
propOverrides: import("../../index.js", { with: { "resolution-mode": "import" } }).PropOverridesType;
|
|
11
|
+
label: string;
|
|
13
12
|
behavior: import("./model.js", { with: { "resolution-mode": "import" } }).TabsBehaviorType;
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
orientation: import("../../index.js", { with: { "resolution-mode": "import" } }).OrientationType;
|
|
14
|
+
arrowScrollDistance: number | string;
|
|
16
15
|
initialSelectedIndex: number | string;
|
|
16
|
+
activeIndex: number | string;
|
|
17
17
|
initialSelectedMode: import("./model.js", { with: { "resolution-mode": "import" } }).TabsInitialSelectedModeType;
|
|
18
18
|
tabs: DBSimpleTabProps[] | string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
onIndexChange: (index
|
|
24
|
-
|
|
19
|
+
tabItemWidth: import("../../index.js", { with: { "resolution-mode": "import" } }).WidthType | string;
|
|
20
|
+
scrollStartLabel: string;
|
|
21
|
+
scrollEndLabel: string;
|
|
22
|
+
tabItemAlignment: import("./model.js", { with: { "resolution-mode": "import" } }).TabItemAlignmentType | string;
|
|
23
|
+
onIndexChange: (index: number) => void;
|
|
24
|
+
onValueChange: (value?: string) => void;
|
|
25
25
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|