@quidgest/ui 0.17.9 → 0.19.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 +79 -0
- package/dist/json/api.json +302 -143
- package/dist/manifest/components.json +4 -1
- package/dist/ui.css +460 -167
- package/dist/ui.esm.js +618 -631
- package/dist/ui.js +490 -504
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +490 -504
- package/dist/ui.scss +439 -167
- package/esm/components/QAccordion/QAccordionItem.vue.js +1 -0
- package/esm/components/QCarousel/QCarousel.vue.js +1 -1
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +2 -0
- package/esm/components/QCollapsible/QCollapsible.d.ts +2 -1
- package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.vue.js +50 -47
- package/esm/components/QCollapsible/constants.d.ts +6 -0
- package/esm/components/QCollapsible/constants.d.ts.map +1 -1
- package/esm/components/QCollapsible/constants.js +3 -2
- package/esm/components/QCollapsible/index.d.ts +6 -0
- package/esm/components/QCollapsible/index.d.ts.map +1 -1
- package/esm/components/QCollapsible/types.d.ts +11 -1
- package/esm/components/QCollapsible/types.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +505 -597
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +32 -16
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +179 -86
- package/esm/components/QDropdownMenu/types.d.ts +6 -0
- package/esm/components/QDropdownMenu/types.d.ts.map +1 -1
- package/esm/components/QField/types.d.ts +3 -0
- package/esm/components/QField/types.d.ts.map +1 -1
- package/esm/components/QGrid/QCol.vue.js +1 -1
- package/esm/components/QLabel/QLabel.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.vue.js +19 -17
- package/esm/components/QLabel/types.d.ts +3 -0
- package/esm/components/QLabel/types.d.ts.map +1 -1
- package/esm/components/{QGroupBox/QGroupBox.d.ts → QSection/QSection.d.ts} +4 -4
- package/esm/components/QSection/QSection.d.ts.map +1 -0
- package/esm/components/{QGroupBox/QGroupBox.vue.js → QSection/QSection.vue.js} +8 -8
- package/esm/components/QSection/QSection2.vue.js +5 -0
- package/esm/components/{QGroupBox → QSection}/index.d.ts +8 -8
- package/esm/components/QSection/index.d.ts.map +1 -0
- package/esm/components/QSection/index.js +6 -0
- package/esm/components/QSection/types.d.ts +32 -0
- package/esm/components/QSection/types.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebar.d.ts +53 -6
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +76 -106
- package/esm/components/QSidebar/QSidebarAnchor.d.ts +24 -210
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +47 -59
- package/esm/components/QSidebar/QSidebarItem.d.ts +213 -0
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebarItem.vue.js +130 -0
- package/esm/components/QSidebar/QSidebarItem2.vue.js +5 -0
- package/esm/components/QSidebar/QSidebarPanel.d.ts +1 -7
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.vue.js +4 -10
- package/esm/components/QSidebar/context.d.ts +108 -0
- package/esm/components/QSidebar/context.d.ts.map +1 -0
- package/esm/components/QSidebar/context.js +4 -0
- package/esm/components/QSidebar/index.d.ts +166 -8
- package/esm/components/QSidebar/index.d.ts.map +1 -1
- package/esm/components/QSidebar/index.js +3 -2
- package/esm/components/QSidebar/types.d.ts +77 -42
- package/esm/components/QSidebar/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts +173 -0
- package/esm/components/QTabs/QTab.d.ts.map +1 -0
- package/esm/components/QTabs/QTab.vue.js +123 -0
- package/esm/components/QTabs/QTab2.vue.js +5 -0
- package/esm/components/QTabs/QTabs.d.ts +37 -0
- package/esm/components/QTabs/QTabs.d.ts.map +1 -0
- package/esm/components/QTabs/QTabs.vue.js +162 -0
- package/esm/components/QTabs/QTabs2.vue.js +5 -0
- package/esm/components/QTabs/constants.d.ts +5 -0
- package/esm/components/QTabs/constants.d.ts.map +1 -0
- package/esm/components/QTabs/context.d.ts +85 -0
- package/esm/components/QTabs/context.d.ts.map +1 -0
- package/esm/components/QTabs/context.js +4 -0
- package/esm/components/QTabs/index.d.ts +166 -0
- package/esm/components/QTabs/index.d.ts.map +1 -0
- package/esm/components/QTabs/index.js +7 -0
- package/esm/components/QTabs/types.d.ts +108 -0
- package/esm/components/QTabs/types.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.d.ts +7 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.vue.js +24 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator2.vue.js +5 -0
- package/esm/components/__internal__/QRequiredIndicator/constants.d.ts +7 -0
- package/esm/components/__internal__/QRequiredIndicator/constants.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/constants.js +4 -0
- package/esm/components/__internal__/QRequiredIndicator/index.d.ts +6 -0
- package/esm/components/__internal__/QRequiredIndicator/index.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/index.js +6 -0
- package/esm/components/__internal__/QRequiredIndicator/types.d.ts +18 -0
- package/esm/components/__internal__/QRequiredIndicator/types.d.ts.map +1 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts +10 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts.map +1 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.vue.js +31 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle2.vue.js +5 -0
- package/esm/components/__internal__/QSafeTriangle/index.d.ts +10 -0
- package/esm/components/__internal__/QSafeTriangle/index.d.ts.map +1 -0
- package/esm/components/__internal__/QSafeTriangle/index.js +6 -0
- package/esm/components/__internal__/QSafeTriangle/types.d.ts +33 -0
- package/esm/components/__internal__/QSafeTriangle/types.d.ts.map +1 -0
- package/esm/components/index.d.ts +2 -1
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +41 -37
- package/esm/composables/useSafeTriangle/index.d.ts +31 -0
- package/esm/composables/useSafeTriangle/index.d.ts.map +1 -0
- package/esm/composables/useSafeTriangle/index.js +87 -0
- package/esm/index.d.ts +4 -1
- package/esm/utils/date.d.ts +36 -1
- package/esm/utils/date.d.ts.map +1 -1
- package/esm/utils/date.js +90 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +30 -24
- package/esm/utils/mask.d.ts +17 -0
- package/esm/utils/mask.d.ts.map +1 -0
- package/esm/utils/mask.js +154 -0
- package/esm/utils/safeTriangle.d.ts +68 -0
- package/esm/utils/safeTriangle.d.ts.map +1 -0
- package/esm/utils/safeTriangle.js +83 -0
- package/package.json +7 -6
- package/esm/components/QGroupBox/QGroupBox.d.ts.map +0 -1
- package/esm/components/QGroupBox/QGroupBox2.vue.js +0 -5
- package/esm/components/QGroupBox/index.d.ts.map +0 -1
- package/esm/components/QGroupBox/index.js +0 -6
- package/esm/components/QGroupBox/types.d.ts +0 -32
- package/esm/components/QGroupBox/types.d.ts.map +0 -1
- package/esm/composables/useInputMask/index.d.ts +0 -50
- package/esm/composables/useInputMask/index.d.ts.map +0 -1
- package/esm/composables/useInputMask/index.js +0 -408
|
@@ -1,41 +1,31 @@
|
|
|
1
|
+
import { QBaseComponentProps } from '../../types/component';
|
|
1
2
|
import { Icon } from '../QIcon';
|
|
2
|
-
/**
|
|
3
|
-
* Defines the base properties for a sidebar anchor item.
|
|
4
|
-
*/
|
|
5
|
-
type QSidebarAnchorItemBaseConfig = {
|
|
6
|
-
/** Unique identifier for the sidebar item. */
|
|
7
|
-
id: string;
|
|
8
|
-
/** Display title of the sidebar item. */
|
|
9
|
-
title: string;
|
|
10
|
-
/** Optional icon to be displayed alongside the title. */
|
|
11
|
-
icon?: Icon;
|
|
12
|
-
};
|
|
13
3
|
/**
|
|
14
4
|
* Predefined panel size options for the sidebar.
|
|
15
|
-
* These sizes help maintain a consistent and adjustable sidebar layout.
|
|
16
5
|
*/
|
|
17
|
-
export type QSidebarPanelSize = 'small' | 'medium' | 'large';
|
|
6
|
+
export type QSidebarPanelSize = 'small' | 'medium' | 'large' | 'xlarge' | 'block';
|
|
18
7
|
/**
|
|
19
|
-
*
|
|
20
|
-
* and adding options for resizability and panel dimensions.
|
|
8
|
+
* Internal panel properties used by {@link QSidebarPanel}.
|
|
21
9
|
*/
|
|
22
|
-
export type
|
|
23
|
-
/**
|
|
10
|
+
export type QSidebarPanelProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Display title of the panel header.
|
|
13
|
+
*
|
|
14
|
+
* @category Content
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the panel is resizable by the user.
|
|
19
|
+
*
|
|
20
|
+
* @category Behavior
|
|
21
|
+
*/
|
|
24
22
|
resizable?: boolean;
|
|
25
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Whether to display the resize grip. Only applies if `resizable` is true.
|
|
25
|
+
*
|
|
26
|
+
* @category Presentation
|
|
27
|
+
*/
|
|
26
28
|
showGrip?: boolean;
|
|
27
|
-
/** Initial panel width using predefined size options. */
|
|
28
|
-
initialWidth?: QSidebarPanelSize;
|
|
29
|
-
/** Minimum allowed width for the panel (by predefined size). */
|
|
30
|
-
minWidth?: QSidebarPanelSize;
|
|
31
|
-
/** Maximum allowed width for the panel (by predefined size). */
|
|
32
|
-
maxWidth?: QSidebarPanelSize;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Extended panel properties used internally for rendering active panel views.
|
|
36
|
-
* Inherits from `QSidebarAnchorItemProps` with adjustments for resize position.
|
|
37
|
-
*/
|
|
38
|
-
export type QSidebarPanelProps = Omit<QSidebarAnchorItemConfig, 'id'> & {
|
|
39
29
|
/**
|
|
40
30
|
* Position of the resize grip relative to the panel.
|
|
41
31
|
*
|
|
@@ -44,16 +34,68 @@ export type QSidebarPanelProps = Omit<QSidebarAnchorItemConfig, 'id'> & {
|
|
|
44
34
|
resizePosition?: 'left' | 'right';
|
|
45
35
|
};
|
|
46
36
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
37
|
+
* Props for the {@link QSidebarItem} component.
|
|
38
|
+
*
|
|
39
|
+
* @extends QBaseComponentProps
|
|
49
40
|
*/
|
|
50
|
-
export type
|
|
41
|
+
export type QSidebarItemProps = QBaseComponentProps & {
|
|
51
42
|
/**
|
|
52
|
-
*
|
|
43
|
+
* Display title of the sidebar item.
|
|
53
44
|
*
|
|
54
45
|
* @category Content
|
|
55
46
|
*/
|
|
56
|
-
|
|
47
|
+
title?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Optional icon to be displayed alongside the title.
|
|
50
|
+
*
|
|
51
|
+
* @category Content
|
|
52
|
+
*/
|
|
53
|
+
icon?: Icon;
|
|
54
|
+
/**
|
|
55
|
+
* Identity used by `v-model` on `QSidebar`.
|
|
56
|
+
*
|
|
57
|
+
* Auto-generated when omitted; prefer an explicit value for controlled usage.
|
|
58
|
+
*
|
|
59
|
+
* @category Identification
|
|
60
|
+
*/
|
|
61
|
+
value?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Whether the panel is resizable by the user.
|
|
64
|
+
*
|
|
65
|
+
* @category Behavior
|
|
66
|
+
*/
|
|
67
|
+
resizable?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether to display the resize grip. Only applies if `resizable` is true.
|
|
70
|
+
*
|
|
71
|
+
* @category Presentation
|
|
72
|
+
*/
|
|
73
|
+
showGrip?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Initial panel width using predefined size options.
|
|
76
|
+
*
|
|
77
|
+
* @category Presentation
|
|
78
|
+
*/
|
|
79
|
+
initialWidth?: QSidebarPanelSize;
|
|
80
|
+
/**
|
|
81
|
+
* Minimum allowed width for the panel (by predefined size).
|
|
82
|
+
*
|
|
83
|
+
* @category Presentation
|
|
84
|
+
*/
|
|
85
|
+
minWidth?: QSidebarPanelSize;
|
|
86
|
+
/**
|
|
87
|
+
* Maximum allowed width for the panel (by predefined size).
|
|
88
|
+
*
|
|
89
|
+
* @category Presentation
|
|
90
|
+
*/
|
|
91
|
+
maxWidth?: QSidebarPanelSize;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Props for the {@link QSidebar} component.
|
|
95
|
+
*
|
|
96
|
+
* @extends QBaseComponentProps
|
|
97
|
+
*/
|
|
98
|
+
export type QSidebarProps = QBaseComponentProps & {
|
|
57
99
|
/**
|
|
58
100
|
* Width of the anchor section (in pixels).
|
|
59
101
|
*
|
|
@@ -66,12 +108,6 @@ export type QSidebarAnchorProps = {
|
|
|
66
108
|
* @category Presentation
|
|
67
109
|
*/
|
|
68
110
|
showLabels?: boolean;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Complete set of props for the `QSidebar` component, combining anchor section props
|
|
72
|
-
* with additional sidebar position configuration.
|
|
73
|
-
*/
|
|
74
|
-
export type QSidebarProps = QSidebarAnchorProps & {
|
|
75
111
|
/**
|
|
76
112
|
* Position of the sidebar on the screen. Can be either 'left' or 'right'.
|
|
77
113
|
*
|
|
@@ -79,5 +115,4 @@ export type QSidebarProps = QSidebarAnchorProps & {
|
|
|
79
115
|
*/
|
|
80
116
|
position?: 'left' | 'right';
|
|
81
117
|
};
|
|
82
|
-
export {};
|
|
83
118
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAEpC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACjC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACrD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC5B,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAC3B,CAAA"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { DEFAULT_TEXTS } from './constants';
|
|
2
|
+
import { QTabProps } from './types';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: {
|
|
6
|
+
'title.prepend'?(_: {}): any;
|
|
7
|
+
title?(_: {}): any;
|
|
8
|
+
'title.append'?(_: {}): any;
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
tabBtn: ({
|
|
13
|
+
$: import('vue').ComponentInternalInstance;
|
|
14
|
+
$data: {};
|
|
15
|
+
$props: {
|
|
16
|
+
readonly id?: string | undefined;
|
|
17
|
+
readonly class?: string | unknown[] | undefined;
|
|
18
|
+
readonly label?: string | undefined;
|
|
19
|
+
readonly variant?: import('..').QButtonVariant | undefined;
|
|
20
|
+
readonly color?: string | undefined;
|
|
21
|
+
readonly borderless?: boolean | undefined;
|
|
22
|
+
readonly elevated?: boolean | undefined;
|
|
23
|
+
readonly block?: boolean | undefined;
|
|
24
|
+
readonly size?: import('..').QButtonSize | undefined;
|
|
25
|
+
readonly iconPos?: import('..').QButtonIconPosition | undefined;
|
|
26
|
+
readonly pill?: boolean | undefined;
|
|
27
|
+
readonly disabled?: boolean | undefined;
|
|
28
|
+
readonly loading?: boolean | undefined;
|
|
29
|
+
readonly onClick?: ((event: Event) => any) | undefined;
|
|
30
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
31
|
+
$attrs: import('vue').Attrs;
|
|
32
|
+
$refs: {
|
|
33
|
+
[x: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
$slots: Readonly<{
|
|
36
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
39
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
40
|
+
$host: Element | null;
|
|
41
|
+
$emit: (event: "click", event: Event) => void;
|
|
42
|
+
$el: HTMLButtonElement;
|
|
43
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('..').QButtonProps> & Readonly<{
|
|
44
|
+
onClick?: ((event: Event) => any) | undefined;
|
|
45
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
46
|
+
click: (event: Event) => any;
|
|
47
|
+
}, string, {
|
|
48
|
+
size: import('..').QButtonSize;
|
|
49
|
+
variant: import('..').QButtonVariant;
|
|
50
|
+
color: string;
|
|
51
|
+
iconPos: import('..').QButtonIconPosition;
|
|
52
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
53
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
54
|
+
created?: (() => void) | (() => void)[];
|
|
55
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
56
|
+
mounted?: (() => void) | (() => void)[];
|
|
57
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
58
|
+
updated?: (() => void) | (() => void)[];
|
|
59
|
+
activated?: (() => void) | (() => void)[];
|
|
60
|
+
deactivated?: (() => void) | (() => void)[];
|
|
61
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
62
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
63
|
+
destroyed?: (() => void) | (() => void)[];
|
|
64
|
+
unmounted?: (() => void) | (() => void)[];
|
|
65
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
66
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
67
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
68
|
+
};
|
|
69
|
+
$forceUpdate: () => void;
|
|
70
|
+
$nextTick: typeof import('vue').nextTick;
|
|
71
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
72
|
+
} & Readonly<{
|
|
73
|
+
size: import('..').QButtonSize;
|
|
74
|
+
variant: import('..').QButtonVariant;
|
|
75
|
+
color: string;
|
|
76
|
+
iconPos: import('..').QButtonIconPosition;
|
|
77
|
+
}> & Omit<Readonly<import('..').QButtonProps> & Readonly<{
|
|
78
|
+
onClick?: ((event: Event) => any) | undefined;
|
|
79
|
+
}>, "size" | "variant" | "color" | "iconPos"> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
80
|
+
$slots: {
|
|
81
|
+
default?(_: {}): any;
|
|
82
|
+
append?(_: {}): any;
|
|
83
|
+
};
|
|
84
|
+
}) | null;
|
|
85
|
+
};
|
|
86
|
+
rootEl: any;
|
|
87
|
+
};
|
|
88
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
89
|
+
declare const __VLS_component: import('vue').DefineComponent<QTabProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QTabProps> & Readonly<{}>, {
|
|
90
|
+
texts: typeof DEFAULT_TEXTS;
|
|
91
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
92
|
+
tabBtn: ({
|
|
93
|
+
$: import('vue').ComponentInternalInstance;
|
|
94
|
+
$data: {};
|
|
95
|
+
$props: {
|
|
96
|
+
readonly id?: string | undefined;
|
|
97
|
+
readonly class?: string | unknown[] | undefined;
|
|
98
|
+
readonly label?: string | undefined;
|
|
99
|
+
readonly variant?: import('..').QButtonVariant | undefined;
|
|
100
|
+
readonly color?: string | undefined;
|
|
101
|
+
readonly borderless?: boolean | undefined;
|
|
102
|
+
readonly elevated?: boolean | undefined;
|
|
103
|
+
readonly block?: boolean | undefined;
|
|
104
|
+
readonly size?: import('..').QButtonSize | undefined;
|
|
105
|
+
readonly iconPos?: import('..').QButtonIconPosition | undefined;
|
|
106
|
+
readonly pill?: boolean | undefined;
|
|
107
|
+
readonly disabled?: boolean | undefined;
|
|
108
|
+
readonly loading?: boolean | undefined;
|
|
109
|
+
readonly onClick?: ((event: Event) => any) | undefined;
|
|
110
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
111
|
+
$attrs: import('vue').Attrs;
|
|
112
|
+
$refs: {
|
|
113
|
+
[x: string]: unknown;
|
|
114
|
+
};
|
|
115
|
+
$slots: Readonly<{
|
|
116
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
119
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
120
|
+
$host: Element | null;
|
|
121
|
+
$emit: (event: "click", event: Event) => void;
|
|
122
|
+
$el: HTMLButtonElement;
|
|
123
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('..').QButtonProps> & Readonly<{
|
|
124
|
+
onClick?: ((event: Event) => any) | undefined;
|
|
125
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
126
|
+
click: (event: Event) => any;
|
|
127
|
+
}, string, {
|
|
128
|
+
size: import('..').QButtonSize;
|
|
129
|
+
variant: import('..').QButtonVariant;
|
|
130
|
+
color: string;
|
|
131
|
+
iconPos: import('..').QButtonIconPosition;
|
|
132
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
133
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
134
|
+
created?: (() => void) | (() => void)[];
|
|
135
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
136
|
+
mounted?: (() => void) | (() => void)[];
|
|
137
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
138
|
+
updated?: (() => void) | (() => void)[];
|
|
139
|
+
activated?: (() => void) | (() => void)[];
|
|
140
|
+
deactivated?: (() => void) | (() => void)[];
|
|
141
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
142
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
143
|
+
destroyed?: (() => void) | (() => void)[];
|
|
144
|
+
unmounted?: (() => void) | (() => void)[];
|
|
145
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
146
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
147
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
148
|
+
};
|
|
149
|
+
$forceUpdate: () => void;
|
|
150
|
+
$nextTick: typeof import('vue').nextTick;
|
|
151
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
152
|
+
} & Readonly<{
|
|
153
|
+
size: import('..').QButtonSize;
|
|
154
|
+
variant: import('..').QButtonVariant;
|
|
155
|
+
color: string;
|
|
156
|
+
iconPos: import('..').QButtonIconPosition;
|
|
157
|
+
}> & Omit<Readonly<import('..').QButtonProps> & Readonly<{
|
|
158
|
+
onClick?: ((event: Event) => any) | undefined;
|
|
159
|
+
}>, "size" | "variant" | "color" | "iconPos"> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
160
|
+
$slots: {
|
|
161
|
+
default?(_: {}): any;
|
|
162
|
+
append?(_: {}): any;
|
|
163
|
+
};
|
|
164
|
+
}) | null;
|
|
165
|
+
}, any>;
|
|
166
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
167
|
+
export default _default;
|
|
168
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
169
|
+
new (): {
|
|
170
|
+
$slots: S;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
//# sourceMappingURL=QTab.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QTab.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTab.vue"],"names":[],"mappings":"AA6CA;AA0MC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAW3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAkJzC,iBAAS,cAAc;WAwHT,OAAO,IAA6B;;iCAdZ,GAAG;uBACb,GAAG;gCACM,GAAG;yBACV,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmEy8W,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;EAnD/lX;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA6Bq9W,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;OArB9lX,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { useGroupItem as e } from "../../composables/useGroup/index.js";
|
|
2
|
+
import { DEFAULT_TEXTS as t } from "../__internal__/QRequiredIndicator/constants.js";
|
|
3
|
+
import { QButton as n } from "../QButton/index.js";
|
|
4
|
+
import { QRequiredIndicator as r } from "../__internal__/QRequiredIndicator/index.js";
|
|
5
|
+
import { useId as i } from "../../composables/uid.js";
|
|
6
|
+
import { TabsSymbol as a } from "./context.js";
|
|
7
|
+
import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeMount as _, onBeforeUnmount as v, openBlock as y, renderSlot as b, toDisplayString as x, toRef as S, unref as C, useTemplateRef as w, vShow as T, withCtx as E, withDirectives as D } from "vue";
|
|
8
|
+
//#region src/components/QTabs/QTab.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
|
|
10
|
+
"id",
|
|
11
|
+
"aria-labelledby",
|
|
12
|
+
"tabindex"
|
|
13
|
+
], j = /*@__PURE__*/ m({
|
|
14
|
+
__name: "QTab",
|
|
15
|
+
props: {
|
|
16
|
+
id: {},
|
|
17
|
+
class: {},
|
|
18
|
+
title: {},
|
|
19
|
+
required: { type: Boolean },
|
|
20
|
+
disabled: { type: Boolean },
|
|
21
|
+
value: {},
|
|
22
|
+
texts: { default: () => t }
|
|
23
|
+
},
|
|
24
|
+
setup(t) {
|
|
25
|
+
let m = t, j = h(a, void 0);
|
|
26
|
+
if (!j) throw Error("QTab: Failed to retrieve tabs context. Ensure the component is used within a QTabs context.");
|
|
27
|
+
let M = i(S(m, "value")), N = i(), P = i(), F = e(M);
|
|
28
|
+
if (!F) throw Error("QTab: Failed to retrieve group item. Ensure the component is used within a QTabs context.");
|
|
29
|
+
let I = w("tabBtn"), L = c(() => j.tabListEl.value), R = c(() => !!m.disabled), z = c(() => {
|
|
30
|
+
if (!R.value) return F.isActive.value ? 0 : -1;
|
|
31
|
+
}), B = c(() => [
|
|
32
|
+
"q-tab",
|
|
33
|
+
{
|
|
34
|
+
"q-tab--active": F.isActive.value,
|
|
35
|
+
"q-tab--disabled": R.value
|
|
36
|
+
},
|
|
37
|
+
m.class
|
|
38
|
+
]);
|
|
39
|
+
function V() {
|
|
40
|
+
(I.value?.$el)?.focus?.();
|
|
41
|
+
}
|
|
42
|
+
function H() {
|
|
43
|
+
R.value || F?.isActive.value || F?.toggle();
|
|
44
|
+
}
|
|
45
|
+
function U() {
|
|
46
|
+
H();
|
|
47
|
+
}
|
|
48
|
+
function W(e) {
|
|
49
|
+
let t = j?.direction.value === "horizontal";
|
|
50
|
+
if (t && e.key === "ArrowRight" || !t && e.key === "ArrowDown") {
|
|
51
|
+
e.preventDefault(), j?.focusAdjacent(M.value, 1);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (t && e.key === "ArrowLeft" || !t && e.key === "ArrowUp") {
|
|
55
|
+
e.preventDefault(), j?.focusAdjacent(M.value, -1);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (e.key === "Home") {
|
|
59
|
+
e.preventDefault(), j?.focusFirst();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
e.key === "End" && (e.preventDefault(), j?.focusLast());
|
|
63
|
+
}
|
|
64
|
+
return _(() => {
|
|
65
|
+
j.register({
|
|
66
|
+
value: M.value,
|
|
67
|
+
disabled: R,
|
|
68
|
+
tabRef: I,
|
|
69
|
+
focus: V,
|
|
70
|
+
select: H
|
|
71
|
+
});
|
|
72
|
+
}), v(() => {
|
|
73
|
+
j.unregister(M.value);
|
|
74
|
+
}), (e, t) => (y(), d(o, null, [L.value ? (y(), l(s, {
|
|
75
|
+
key: 0,
|
|
76
|
+
to: L.value
|
|
77
|
+
}, [p(C(n), {
|
|
78
|
+
id: C(N),
|
|
79
|
+
ref: "tabBtn",
|
|
80
|
+
borderless: "",
|
|
81
|
+
role: "tab",
|
|
82
|
+
variant: "text",
|
|
83
|
+
class: g(B.value),
|
|
84
|
+
disabled: R.value,
|
|
85
|
+
"data-value": C(M),
|
|
86
|
+
"aria-selected": C(F).isActive.value,
|
|
87
|
+
"aria-controls": C(P),
|
|
88
|
+
"aria-required": m.required || void 0,
|
|
89
|
+
tabindex: z.value,
|
|
90
|
+
onClick: U,
|
|
91
|
+
onKeydown: W
|
|
92
|
+
}, {
|
|
93
|
+
default: E(() => [f("span", O, [
|
|
94
|
+
b(e.$slots, "title.prepend"),
|
|
95
|
+
b(e.$slots, "title", {}, () => [f("span", k, x(m.title), 1)]),
|
|
96
|
+
m.required ? (y(), l(C(r), {
|
|
97
|
+
key: 0,
|
|
98
|
+
announce: "",
|
|
99
|
+
texts: m.texts
|
|
100
|
+
}, null, 8, ["texts"])) : u("v-if", !0),
|
|
101
|
+
b(e.$slots, "title.append")
|
|
102
|
+
])]),
|
|
103
|
+
_: 3
|
|
104
|
+
}, 8, [
|
|
105
|
+
"id",
|
|
106
|
+
"class",
|
|
107
|
+
"disabled",
|
|
108
|
+
"data-value",
|
|
109
|
+
"aria-selected",
|
|
110
|
+
"aria-controls",
|
|
111
|
+
"aria-required",
|
|
112
|
+
"tabindex"
|
|
113
|
+
])], 8, ["to"])) : u("v-if", !0), D(f("div", {
|
|
114
|
+
id: C(P),
|
|
115
|
+
class: "q-tabs__panel",
|
|
116
|
+
role: "tabpanel",
|
|
117
|
+
"aria-labelledby": C(N),
|
|
118
|
+
tabindex: C(F).isActive.value ? 0 : void 0
|
|
119
|
+
}, [b(e.$slots, "default")], 8, A), [[T, C(F).isActive.value]])], 64));
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
//#endregion
|
|
123
|
+
export { j as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { QTabsProps } from './types';
|
|
2
|
+
type __VLS_Props = QTabsProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: string;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
tabListHost: HTMLDivElement;
|
|
13
|
+
tabListEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
rootEl: HTMLDivElement;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: string) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
variant: import('./types').QTabsVariant;
|
|
24
|
+
direction: import('./types').QTabsDirection;
|
|
25
|
+
align: import('./types').QTabsAlign;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
|
+
tabListHost: HTMLDivElement;
|
|
28
|
+
tabListEl: HTMLDivElement;
|
|
29
|
+
}, HTMLDivElement>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=QTabs.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAuBA;AAyVC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAiBzC,KAAK,WAAW,GAAG,UAAU,CAAC;AA0S/B,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;yBAZrB,GAAG;;;;;;;EAiB/B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;kBAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { provideDefaults as e } from "../../composables/defaults.js";
|
|
2
|
+
import { useGroup as t } from "../../composables/useGroup/index.js";
|
|
3
|
+
import { TabsSymbol as n } from "./context.js";
|
|
4
|
+
import { computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, mergeModels as c, nextTick as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, openBlock as p, provide as m, ref as h, renderSlot as g, shallowRef as _, toRef as v, unref as y, useModel as b, useTemplateRef as x, watch as S } from "vue";
|
|
5
|
+
//#region src/components/QTabs/QTabs.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var C = ["id"], w = {
|
|
7
|
+
ref: "tabListHost",
|
|
8
|
+
class: "q-tabs__list"
|
|
9
|
+
}, T = ["aria-orientation"], E = { class: "q-tabs__panels" }, D = /*@__PURE__*/ s({
|
|
10
|
+
__name: "QTabs",
|
|
11
|
+
props: /*@__PURE__*/ c({
|
|
12
|
+
id: {},
|
|
13
|
+
class: {},
|
|
14
|
+
direction: { default: "horizontal" },
|
|
15
|
+
align: { default: "start" },
|
|
16
|
+
variant: { default: "line" },
|
|
17
|
+
disabled: { type: Boolean }
|
|
18
|
+
}, {
|
|
19
|
+
modelValue: {},
|
|
20
|
+
modelModifiers: {}
|
|
21
|
+
}),
|
|
22
|
+
emits: ["update:modelValue"],
|
|
23
|
+
setup(s) {
|
|
24
|
+
let c = s, D = b(s, "modelValue"), O = x("tabListHost"), k = x("tabListEl"), A = _([]), j = h({
|
|
25
|
+
width: "0",
|
|
26
|
+
height: "0",
|
|
27
|
+
transform: "translate(0, 0)",
|
|
28
|
+
opacity: "0"
|
|
29
|
+
}), M = h(!1), N = null, { active: P } = t({
|
|
30
|
+
active: D,
|
|
31
|
+
required: !0
|
|
32
|
+
});
|
|
33
|
+
S(P, (e) => {
|
|
34
|
+
D.value = e;
|
|
35
|
+
}), e({ QTab: { disabled: v(c, "disabled") } });
|
|
36
|
+
let F = r(() => [
|
|
37
|
+
"q-tabs",
|
|
38
|
+
`q-tabs--${c.direction}`,
|
|
39
|
+
`q-tabs--${c.variant}`,
|
|
40
|
+
`q-tabs--align-${c.align}`,
|
|
41
|
+
M.value ? "q-tabs--indicator-ready" : void 0,
|
|
42
|
+
c.class
|
|
43
|
+
]);
|
|
44
|
+
function I(e) {
|
|
45
|
+
let t = e.tabRef.value;
|
|
46
|
+
return t ? "$el" in t ? t.$el : t : null;
|
|
47
|
+
}
|
|
48
|
+
function L() {
|
|
49
|
+
M.value = !1, j.value = {
|
|
50
|
+
...j.value,
|
|
51
|
+
opacity: "0",
|
|
52
|
+
width: "0",
|
|
53
|
+
height: "0"
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function R() {
|
|
57
|
+
if (c.variant !== "line" || !D.value) {
|
|
58
|
+
L();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
let e = A.value.find((e) => e.value === D.value);
|
|
62
|
+
if (!e) {
|
|
63
|
+
L();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
let t = I(e);
|
|
67
|
+
if (!t) {
|
|
68
|
+
L();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
let n = c.direction === "horizontal", r = M.value;
|
|
72
|
+
n ? j.value = {
|
|
73
|
+
width: `${t.offsetWidth}px`,
|
|
74
|
+
height: "4px",
|
|
75
|
+
transform: `translate(${t.offsetLeft}px, 0)`,
|
|
76
|
+
opacity: "1"
|
|
77
|
+
} : j.value = {
|
|
78
|
+
width: "4px",
|
|
79
|
+
height: `${t.offsetHeight}px`,
|
|
80
|
+
transform: `translate(0, ${t.offsetTop}px)`,
|
|
81
|
+
opacity: "1"
|
|
82
|
+
}, r || l(() => {
|
|
83
|
+
j.value.opacity === "1" && (M.value = !0);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function z() {
|
|
87
|
+
if (c.variant !== "line") {
|
|
88
|
+
N?.disconnect();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
N ? N.disconnect() : N = new ResizeObserver(() => {
|
|
92
|
+
R();
|
|
93
|
+
});
|
|
94
|
+
let e = O.value;
|
|
95
|
+
e && N.observe(e);
|
|
96
|
+
for (let e of A.value) {
|
|
97
|
+
let t = I(e);
|
|
98
|
+
t && N.observe(t);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function B() {
|
|
102
|
+
return A.value.filter((e) => !y(e.disabled));
|
|
103
|
+
}
|
|
104
|
+
function V() {
|
|
105
|
+
let e = B();
|
|
106
|
+
e.length && (e.some((e) => e.value === D.value) || (D.value = e[0].value));
|
|
107
|
+
}
|
|
108
|
+
function H(e) {
|
|
109
|
+
A.value = [...A.value, e], V();
|
|
110
|
+
}
|
|
111
|
+
function U(e) {
|
|
112
|
+
A.value = A.value.filter((t) => t.value !== e);
|
|
113
|
+
}
|
|
114
|
+
function W(e, t) {
|
|
115
|
+
let n = B();
|
|
116
|
+
if (!n.length) return;
|
|
117
|
+
let r = n.findIndex((t) => t.value === e), i = n[r === -1 ? 0 : (r + t + n.length) % n.length];
|
|
118
|
+
i.select(), i.focus();
|
|
119
|
+
}
|
|
120
|
+
function G() {
|
|
121
|
+
let e = B()[0];
|
|
122
|
+
e && (e.select(), e.focus());
|
|
123
|
+
}
|
|
124
|
+
function K() {
|
|
125
|
+
let e = B(), t = e[e.length - 1];
|
|
126
|
+
t && (t.select(), t.focus());
|
|
127
|
+
}
|
|
128
|
+
return S(() => A.value.map((e) => [e.value, y(e.disabled)]), () => V()), S(() => [
|
|
129
|
+
D.value,
|
|
130
|
+
A.value.length,
|
|
131
|
+
c.direction,
|
|
132
|
+
c.variant,
|
|
133
|
+
c.align
|
|
134
|
+
], () => l(R), { immediate: !0 }), S(() => [A.value.length, c.variant], () => l(z), { immediate: !0 }), f(() => {
|
|
135
|
+
N?.disconnect(), N = null;
|
|
136
|
+
}), m(n, {
|
|
137
|
+
tabListEl: k,
|
|
138
|
+
direction: r(() => c.direction),
|
|
139
|
+
register: H,
|
|
140
|
+
unregister: U,
|
|
141
|
+
focusAdjacent: W,
|
|
142
|
+
focusFirst: G,
|
|
143
|
+
focusLast: K
|
|
144
|
+
}), (e, t) => (p(), a("div", {
|
|
145
|
+
id: c.id,
|
|
146
|
+
class: u(F.value)
|
|
147
|
+
}, [o("div", w, [o("div", {
|
|
148
|
+
ref_key: "tabListEl",
|
|
149
|
+
ref: k,
|
|
150
|
+
class: "q-tabs__tablist",
|
|
151
|
+
role: "tablist",
|
|
152
|
+
"aria-orientation": c.direction
|
|
153
|
+
}, null, 8, T), c.variant === "line" ? (p(), a("div", {
|
|
154
|
+
key: 0,
|
|
155
|
+
class: "q-tabs__indicator",
|
|
156
|
+
"aria-hidden": "true",
|
|
157
|
+
style: d(j.value)
|
|
158
|
+
}, null, 4)) : i("v-if", !0)], 512), o("div", E, [g(e.$slots, "default")])], 10, C));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
//#endregion
|
|
162
|
+
export { D as default };
|