@quidgest/ui 0.18.0 → 0.20.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.
Files changed (164) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/dist/json/api.json +1328 -215
  3. package/dist/manifest/components.json +3 -1
  4. package/dist/ui.css +1448 -185
  5. package/dist/ui.esm.js +1448 -825
  6. package/dist/ui.js +1411 -788
  7. package/dist/ui.min.css +2 -1
  8. package/dist/ui.min.js +1411 -788
  9. package/dist/ui.scss +597 -157
  10. package/esm/components/QField/QField.d.ts.map +1 -1
  11. package/esm/components/QField/QField.vue.js +1 -1
  12. package/esm/components/QGrid/QCol.vue.js +1 -1
  13. package/esm/components/QInputGroup/QInputGroup.d.ts +147 -3
  14. package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
  15. package/esm/components/QInputGroup/QInputGroup.vue.js +32 -23
  16. package/esm/components/QInputGroup/index.d.ts +81 -4
  17. package/esm/components/QInputGroup/index.d.ts.map +1 -1
  18. package/esm/components/QList/QList.d.ts.map +1 -1
  19. package/esm/components/QList/QList.vue.js +3 -1
  20. package/esm/components/QList/QListItem.d.ts.map +1 -1
  21. package/esm/components/QList/QListItem.vue.js +24 -28
  22. package/esm/components/QList/types.d.ts +1 -1
  23. package/esm/components/QOverlay/types.d.ts +3 -1
  24. package/esm/components/QOverlay/types.d.ts.map +1 -1
  25. package/esm/components/QPhoneField/QPhoneField.d.ts +2263 -0
  26. package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -0
  27. package/esm/components/QPhoneField/QPhoneField.vue.js +478 -0
  28. package/esm/components/QPhoneField/QPhoneField2.vue.js +5 -0
  29. package/esm/components/QPhoneField/constants.d.ts +11 -0
  30. package/esm/components/QPhoneField/constants.d.ts.map +1 -0
  31. package/esm/components/QPhoneField/constants.js +14 -0
  32. package/esm/components/QPhoneField/index.d.ts +1253 -0
  33. package/esm/components/QPhoneField/index.d.ts.map +1 -0
  34. package/esm/components/QPhoneField/index.js +6 -0
  35. package/esm/components/QPhoneField/types.d.ts +108 -0
  36. package/esm/components/QPhoneField/types.d.ts.map +1 -0
  37. package/esm/components/{QGroupBox/QGroupBox.d.ts → QSection/QSection.d.ts} +4 -4
  38. package/esm/components/QSection/QSection.d.ts.map +1 -0
  39. package/esm/components/{QGroupBox/QGroupBox.vue.js → QSection/QSection.vue.js} +8 -8
  40. package/esm/components/QSection/QSection2.vue.js +5 -0
  41. package/esm/components/{QGroupBox → QSection}/index.d.ts +8 -8
  42. package/esm/components/QSection/index.d.ts.map +1 -0
  43. package/esm/components/QSection/index.js +6 -0
  44. package/esm/components/QSection/types.d.ts +32 -0
  45. package/esm/components/QSection/types.d.ts.map +1 -0
  46. package/esm/components/QSelect/QSelect.d.ts +16 -1
  47. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  48. package/esm/components/QSelect/QSelect.vue.js +158 -129
  49. package/esm/components/QSelect/index.d.ts +31 -3
  50. package/esm/components/QSelect/index.d.ts.map +1 -1
  51. package/esm/components/QSelect/types.d.ts +13 -0
  52. package/esm/components/QSelect/types.d.ts.map +1 -1
  53. package/esm/components/QSidebar/QSidebar.d.ts +53 -6
  54. package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
  55. package/esm/components/QSidebar/QSidebar.vue.js +76 -106
  56. package/esm/components/QSidebar/QSidebarAnchor.d.ts +24 -210
  57. package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
  58. package/esm/components/QSidebar/QSidebarAnchor.vue.js +47 -59
  59. package/esm/components/QSidebar/QSidebarItem.d.ts +213 -0
  60. package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -0
  61. package/esm/components/QSidebar/QSidebarItem.vue.js +130 -0
  62. package/esm/components/QSidebar/QSidebarItem2.vue.js +5 -0
  63. package/esm/components/QSidebar/QSidebarPanel.d.ts +1 -7
  64. package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
  65. package/esm/components/QSidebar/QSidebarPanel.vue.js +4 -10
  66. package/esm/components/QSidebar/context.d.ts +108 -0
  67. package/esm/components/QSidebar/context.d.ts.map +1 -0
  68. package/esm/components/QSidebar/context.js +4 -0
  69. package/esm/components/QSidebar/index.d.ts +166 -8
  70. package/esm/components/QSidebar/index.d.ts.map +1 -1
  71. package/esm/components/QSidebar/index.js +3 -2
  72. package/esm/components/QSidebar/types.d.ts +77 -42
  73. package/esm/components/QSidebar/types.d.ts.map +1 -1
  74. package/esm/components/QTabs/QTab.d.ts +1 -0
  75. package/esm/components/QTabs/QTab.d.ts.map +1 -1
  76. package/esm/components/QTabs/QTab.vue.js +2 -1
  77. package/esm/components/QTabs/QTabs.d.ts +2 -0
  78. package/esm/components/QTabs/QTabs.d.ts.map +1 -1
  79. package/esm/components/QTabs/QTabs.vue.js +125 -46
  80. package/esm/components/QTabs/context.d.ts +10 -3
  81. package/esm/components/QTabs/context.d.ts.map +1 -1
  82. package/esm/components/QTabs/index.d.ts +2 -0
  83. package/esm/components/QTabs/index.d.ts.map +1 -1
  84. package/esm/components/QTabs/types.d.ts +3 -1
  85. package/esm/components/QTabs/types.d.ts.map +1 -1
  86. package/esm/components/index.d.ts +2 -1
  87. package/esm/components/index.d.ts.map +1 -1
  88. package/esm/components/index.js +48 -45
  89. package/esm/composables/useDialog/index.d.ts +2 -88
  90. package/esm/composables/useDialog/index.d.ts.map +1 -1
  91. package/esm/composables/useDialog/index.js +6 -6
  92. package/esm/composables/useDialog/types.d.ts +14 -4
  93. package/esm/composables/useDialog/types.d.ts.map +1 -1
  94. package/esm/index.d.ts +3 -1
  95. package/esm/vendors/country-flag-icons/modules/countries.json.js +4 -0
  96. package/esm/vendors/country-flag-icons/modules/hasFlag.js +7 -0
  97. package/esm/vendors/libphonenumber-js/es6/AsYouType.js +312 -0
  98. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +142 -0
  99. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +145 -0
  100. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +45 -0
  101. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.js +258 -0
  102. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.util.js +57 -0
  103. package/esm/vendors/libphonenumber-js/es6/AsYouTypeParser.js +242 -0
  104. package/esm/vendors/libphonenumber-js/es6/AsYouTypeState.js +115 -0
  105. package/esm/vendors/libphonenumber-js/es6/ParseError.js +116 -0
  106. package/esm/vendors/libphonenumber-js/es6/PhoneNumber.js +164 -0
  107. package/esm/vendors/libphonenumber-js/es6/constants.js +4 -0
  108. package/esm/vendors/libphonenumber-js/es6/format.js +77 -0
  109. package/esm/vendors/libphonenumber-js/es6/formatIncompletePhoneNumber.js +7 -0
  110. package/esm/vendors/libphonenumber-js/es6/getCountries.js +7 -0
  111. package/esm/vendors/libphonenumber-js/es6/getExampleNumber.js +7 -0
  112. package/esm/vendors/libphonenumber-js/es6/helpers/RFC3966.js +9 -0
  113. package/esm/vendors/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +7 -0
  114. package/esm/vendors/libphonenumber-js/es6/helpers/checkNumberLength.js +21 -0
  115. package/esm/vendors/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +11 -0
  116. package/esm/vendors/libphonenumber-js/es6/helpers/extension/extractExtension.js +16 -0
  117. package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +36 -0
  118. package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
  119. package/esm/vendors/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +18 -0
  120. package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumber.js +27 -0
  121. package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
  122. package/esm/vendors/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -0
  123. package/esm/vendors/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +11 -0
  124. package/esm/vendors/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +13 -0
  125. package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +12 -0
  126. package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +43 -0
  127. package/esm/vendors/libphonenumber-js/es6/helpers/getIddPrefix.js +10 -0
  128. package/esm/vendors/libphonenumber-js/es6/helpers/getNumberType.js +61 -0
  129. package/esm/vendors/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +14 -0
  130. package/esm/vendors/libphonenumber-js/es6/helpers/isCallingCode.js +7 -0
  131. package/esm/vendors/libphonenumber-js/es6/helpers/isCountryCode.js +7 -0
  132. package/esm/vendors/libphonenumber-js/es6/helpers/isObject.js +7 -0
  133. package/esm/vendors/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +12 -0
  134. package/esm/vendors/libphonenumber-js/es6/helpers/matchesEntirely.js +6 -0
  135. package/esm/vendors/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
  136. package/esm/vendors/libphonenumber-js/es6/helpers/parseDigits.js +82 -0
  137. package/esm/vendors/libphonenumber-js/es6/helpers/stripIddPrefix.js +18 -0
  138. package/esm/vendors/libphonenumber-js/es6/isPossible.js +32 -0
  139. package/esm/vendors/libphonenumber-js/es6/isValid.js +11 -0
  140. package/esm/vendors/libphonenumber-js/es6/metadata.js +474 -0
  141. package/esm/vendors/libphonenumber-js/es6/normalizeArguments.js +110 -0
  142. package/esm/vendors/libphonenumber-js/es6/parse.js +103 -0
  143. package/esm/vendors/libphonenumber-js/es6/parseIncompletePhoneNumber.js +48 -0
  144. package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber.js +9 -0
  145. package/esm/vendors/libphonenumber-js/es6/parsePhoneNumberWithError_.js +58 -0
  146. package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber_.js +66 -0
  147. package/esm/vendors/libphonenumber-js/es6/tools/semver-compare.js +14 -0
  148. package/esm/vendors/libphonenumber-js/examples.mobile.json.js +250 -0
  149. package/esm/vendors/libphonenumber-js/max/exports/AsYouType.js +9 -0
  150. package/esm/vendors/libphonenumber-js/max/exports/formatIncompletePhoneNumber.js +8 -0
  151. package/esm/vendors/libphonenumber-js/max/exports/getCountries.js +8 -0
  152. package/esm/vendors/libphonenumber-js/max/exports/getCountryCallingCode.js +8 -0
  153. package/esm/vendors/libphonenumber-js/max/exports/getExampleNumber.js +8 -0
  154. package/esm/vendors/libphonenumber-js/max/exports/isSupportedCountry.js +8 -0
  155. package/esm/vendors/libphonenumber-js/max/exports/parsePhoneNumber.js +8 -0
  156. package/esm/vendors/libphonenumber-js/max/exports/withMetadataArgument.js +8 -0
  157. package/esm/vendors/libphonenumber-js/metadata.max.json.js +10489 -0
  158. package/package.json +9 -6
  159. package/esm/components/QGroupBox/QGroupBox.d.ts.map +0 -1
  160. package/esm/components/QGroupBox/QGroupBox2.vue.js +0 -5
  161. package/esm/components/QGroupBox/index.d.ts.map +0 -1
  162. package/esm/components/QGroupBox/index.js +0 -6
  163. package/esm/components/QGroupBox/types.d.ts +0 -32
  164. package/esm/components/QGroupBox/types.d.ts.map +0 -1
@@ -1,7 +1,9 @@
1
1
  declare const QSidebar: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
3
  modelValue?: string;
4
- } & import('./types').QSidebarAnchorProps & {
4
+ } & import('../../types/component').QBaseComponentProps & {
5
+ anchorWidth?: number;
6
+ showLabels?: boolean;
5
7
  position?: "left" | "right";
6
8
  }> & Readonly<{
7
9
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
@@ -19,7 +21,30 @@ declare const QSidebar: {
19
21
  }, import('vue').PublicProps, {
20
22
  position: "left" | "right";
21
23
  anchorWidth: number;
22
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
24
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
25
+ anchor: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
26
+ anchorWidth?: number;
27
+ modelValue?: string;
28
+ items: import('./context').SidebarItemRegistration[];
29
+ }> & Readonly<{}>, {
30
+ itemsEl: Readonly<import('vue').ShallowRef<HTMLElement | null>>;
31
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
32
+ items: HTMLDivElement;
33
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
34
+ P: {};
35
+ B: {};
36
+ D: {};
37
+ C: {};
38
+ M: {};
39
+ Defaults: {};
40
+ }, Readonly<{
41
+ anchorWidth?: number;
42
+ modelValue?: string;
43
+ items: import('./context').SidebarItemRegistration[];
44
+ }> & Readonly<{}>, {
45
+ itemsEl: Readonly<import('vue').ShallowRef<HTMLElement | null>>;
46
+ }, {}, {}, {}, {}> | null;
47
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
23
48
  P: {};
24
49
  B: {};
25
50
  D: {};
@@ -28,7 +53,9 @@ declare const QSidebar: {
28
53
  Defaults: {};
29
54
  }, Readonly<{
30
55
  modelValue?: string;
31
- } & import('./types').QSidebarAnchorProps & {
56
+ } & import('../../types/component').QBaseComponentProps & {
57
+ anchorWidth?: number;
58
+ showLabels?: boolean;
32
59
  position?: "left" | "right";
33
60
  }> & Readonly<{
34
61
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
@@ -45,7 +72,9 @@ declare const QSidebar: {
45
72
  __isSuspense?: never;
46
73
  } & import('vue').ComponentOptionsBase<Readonly<{
47
74
  modelValue?: string;
48
- } & import('./types').QSidebarAnchorProps & {
75
+ } & import('../../types/component').QBaseComponentProps & {
76
+ anchorWidth?: number;
77
+ showLabels?: boolean;
49
78
  position?: "left" | "right";
50
79
  }> & Readonly<{
51
80
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
@@ -64,10 +93,139 @@ declare const QSidebar: {
64
93
  position: "left" | "right";
65
94
  anchorWidth: number;
66
95
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
67
- $slots: Partial<Record<`anchor:${string}`, (_: {
68
- item: import('./types').QSidebarAnchorItemConfig;
69
- }) => any>> & Partial<Record<`header.prepend:${string}`, (_: {}) => any>> & Partial<Record<`header:${string}`, (_: {}) => any>> & Partial<Record<`header.append:${string}`, (_: {}) => any>> & Partial<Record<`content:${string}`, (_: {}) => any>> & Partial<Record<`footer:${string}`, (_: {}) => any>>;
96
+ $slots: {
97
+ default?(_: {}): any;
98
+ };
70
99
  });
71
- export { QSidebar };
100
+ declare const QSidebarItem: {
101
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QSidebarItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
102
+ showGrip: boolean;
103
+ initialWidth: import('./types').QSidebarPanelSize;
104
+ minWidth: import('./types').QSidebarPanelSize;
105
+ maxWidth: import('./types').QSidebarPanelSize;
106
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
107
+ anchor: ({
108
+ $: import('vue').ComponentInternalInstance;
109
+ $data: {};
110
+ $props: {
111
+ readonly modelValue?: boolean | undefined;
112
+ readonly id?: string | undefined;
113
+ readonly class?: string | unknown[] | undefined;
114
+ readonly label?: string | undefined;
115
+ readonly variant?: import('..').QButtonVariant | undefined;
116
+ readonly color?: string | undefined;
117
+ readonly borderless?: boolean | undefined;
118
+ readonly elevated?: boolean | undefined;
119
+ readonly block?: boolean | undefined;
120
+ readonly size?: import('..').QButtonSize | undefined;
121
+ readonly iconPos?: import('..').QButtonIconPosition | undefined;
122
+ readonly pill?: boolean | undefined;
123
+ readonly disabled?: boolean | undefined;
124
+ readonly loading?: boolean | undefined;
125
+ readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
126
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
127
+ $attrs: import('vue').Attrs;
128
+ $refs: {
129
+ [x: string]: unknown;
130
+ };
131
+ $slots: Readonly<{
132
+ [name: string]: import('vue').Slot<any> | undefined;
133
+ }>;
134
+ $root: import('vue').ComponentPublicInstance | null;
135
+ $parent: import('vue').ComponentPublicInstance | null;
136
+ $host: Element | null;
137
+ $emit: (event: "update:modelValue", value: boolean) => void;
138
+ $el: HTMLButtonElement;
139
+ $options: import('vue').ComponentOptionsBase<Readonly<{
140
+ modelValue?: boolean;
141
+ } & import('../../types/component').QBaseComponentProps & {
142
+ label?: string;
143
+ variant?: import('..').QButtonVariant;
144
+ color?: string;
145
+ borderless?: boolean;
146
+ elevated?: boolean;
147
+ block?: boolean;
148
+ size?: import('..').QButtonSize;
149
+ iconPos?: import('..').QButtonIconPosition;
150
+ pill?: boolean;
151
+ disabled?: boolean;
152
+ loading?: boolean;
153
+ }> & Readonly<{
154
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
155
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
156
+ "update:modelValue": (value: boolean) => any;
157
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
158
+ beforeCreate?: (() => void) | (() => void)[];
159
+ created?: (() => void) | (() => void)[];
160
+ beforeMount?: (() => void) | (() => void)[];
161
+ mounted?: (() => void) | (() => void)[];
162
+ beforeUpdate?: (() => void) | (() => void)[];
163
+ updated?: (() => void) | (() => void)[];
164
+ activated?: (() => void) | (() => void)[];
165
+ deactivated?: (() => void) | (() => void)[];
166
+ beforeDestroy?: (() => void) | (() => void)[];
167
+ beforeUnmount?: (() => void) | (() => void)[];
168
+ destroyed?: (() => void) | (() => void)[];
169
+ unmounted?: (() => void) | (() => void)[];
170
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
171
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
172
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
173
+ };
174
+ $forceUpdate: () => void;
175
+ $nextTick: typeof import('vue').nextTick;
176
+ $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;
177
+ } & Readonly<{}> & Omit<Readonly<{
178
+ modelValue?: boolean;
179
+ } & import('../../types/component').QBaseComponentProps & {
180
+ label?: string;
181
+ variant?: import('..').QButtonVariant;
182
+ color?: string;
183
+ borderless?: boolean;
184
+ elevated?: boolean;
185
+ block?: boolean;
186
+ size?: import('..').QButtonSize;
187
+ iconPos?: import('..').QButtonIconPosition;
188
+ pill?: boolean;
189
+ disabled?: boolean;
190
+ loading?: boolean;
191
+ }> & Readonly<{
192
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
193
+ }>, never> & {} & import('vue').ComponentCustomProperties & {} & {
194
+ $slots: {
195
+ default?(_: {}): any;
196
+ };
197
+ }) | null;
198
+ }, any, import('vue').ComponentProvideOptions, {
199
+ P: {};
200
+ B: {};
201
+ D: {};
202
+ C: {};
203
+ M: {};
204
+ Defaults: {};
205
+ }, Readonly<import('./types').QSidebarItemProps> & Readonly<{}>, {}, {}, {}, {}, {
206
+ showGrip: boolean;
207
+ initialWidth: import('./types').QSidebarPanelSize;
208
+ minWidth: import('./types').QSidebarPanelSize;
209
+ maxWidth: import('./types').QSidebarPanelSize;
210
+ }>;
211
+ __isFragment?: never;
212
+ __isTeleport?: never;
213
+ __isSuspense?: never;
214
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types').QSidebarItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
215
+ showGrip: boolean;
216
+ initialWidth: import('./types').QSidebarPanelSize;
217
+ minWidth: import('./types').QSidebarPanelSize;
218
+ maxWidth: import('./types').QSidebarPanelSize;
219
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
220
+ $slots: {
221
+ anchor?(_: {}): any;
222
+ 'header.prepend'?(_: {}): any;
223
+ header?(_: {}): any;
224
+ 'header.append'?(_: {}): any;
225
+ default?(_: {}): any;
226
+ footer?(_: {}): any;
227
+ };
228
+ });
229
+ export { QSidebar, QSidebarItem };
72
230
  export * from './types';
73
231
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6B,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,CAAA;AAGnB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6B,CAAA;AAC3C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAO0z0B,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAP/40B,CAAA;AAGnD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAA;AAGjC,cAAc,SAAS,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { setupPropsProxy as e } from "../../utils/setupPropsProxy.js";
2
2
  import t from "./QSidebar2.vue.js";
3
+ import n from "./QSidebarItem2.vue.js";
3
4
  //#region src/components/QSidebar/index.ts
4
- var n = e(t);
5
+ var r = e(t), i = e(n);
5
6
  //#endregion
6
- export { n as QSidebar };
7
+ export { r as QSidebar, i as QSidebarItem };
@@ -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
- * Properties for a sidebar item, extending the base item properties,
20
- * and adding options for resizability and panel dimensions.
8
+ * Internal panel properties used by {@link QSidebarPanel}.
21
9
  */
22
- export type QSidebarAnchorItemConfig = QSidebarAnchorItemBaseConfig & {
23
- /** Whether the panel is resizable by the user. */
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
- /** Whether to display the resize grip. Only applies if `resizable` is true. */
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
- * Properties for configuring the anchor section of the sidebar.
48
- * Includes the width of the anchor section and panel configurations.
37
+ * Props for the {@link QSidebarItem} component.
38
+ *
39
+ * @extends QBaseComponentProps
49
40
  */
50
- export type QSidebarAnchorProps = {
41
+ export type QSidebarItemProps = QBaseComponentProps & {
51
42
  /**
52
- * List of panels that can be anchored in the sidebar.
43
+ * Display title of the sidebar item.
53
44
  *
54
45
  * @category Content
55
46
  */
56
- panels?: QSidebarAnchorItemConfig[];
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,IAAI,EAAE,MAAM,UAAU,CAAA;AAEpC;;GAEG;AACH,KAAK,4BAA4B,GAAG;IACnC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,IAAI,CAAC,EAAE,IAAI,CAAA;CACX,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE5D;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,GAAG;IACrE,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yDAAyD;IACzD,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAChC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,GAAG;IACvE;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACjC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAEnC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAC3B,CAAA"}
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"}
@@ -4,6 +4,7 @@ declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: {
6
6
  'title.prepend'?(_: {}): any;
7
+ title?(_: {}): any;
7
8
  'title.append'?(_: {}): any;
8
9
  default?(_: {}): any;
9
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QTab.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTab.vue"],"names":[],"mappings":"AAyCA;AAqMC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAW3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAiJzC,iBAAS,cAAc;WAoHT,OAAO,IAA6B;;iCAbZ,GAAG;gCACJ,GAAG;yBACV,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmEqnX,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;EAnD3wX;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA6BioX,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;OArB1wX,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"}
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"}
@@ -65,6 +65,7 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
65
65
  j.register({
66
66
  value: M.value,
67
67
  disabled: R,
68
+ tabRef: I,
68
69
  focus: V,
69
70
  select: H
70
71
  });
@@ -91,7 +92,7 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
91
92
  }, {
92
93
  default: E(() => [f("span", O, [
93
94
  b(e.$slots, "title.prepend"),
94
- f("span", k, x(m.title), 1),
95
+ b(e.$slots, "title", {}, () => [f("span", k, x(m.title), 1)]),
95
96
  m.required ? (y(), l(C(r), {
96
97
  key: 0,
97
98
  announce: "",
@@ -9,6 +9,7 @@ declare function __VLS_template(): {
9
9
  default?(_: {}): any;
10
10
  };
11
11
  refs: {
12
+ tabListHost: HTMLDivElement;
12
13
  tabListEl: HTMLDivElement;
13
14
  };
14
15
  rootEl: HTMLDivElement;
@@ -23,6 +24,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
23
24
  direction: import('./types').QTabsDirection;
24
25
  align: import('./types').QTabsAlign;
25
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
+ tabListHost: HTMLDivElement;
26
28
  tabListEl: HTMLDivElement;
27
29
  }, HTMLDivElement>;
28
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1 +1 @@
1
- {"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAcA;AA6KC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAMzC,KAAK,WAAW,GAAG,UAAU,CAAC;AAkJ/B,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAqCT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAYD,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"}
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"}
@@ -1,11 +1,14 @@
1
1
  import { provideDefaults as e } from "../../composables/defaults.js";
2
2
  import { useGroup as t } from "../../composables/useGroup/index.js";
3
3
  import { TabsSymbol as n } from "./context.js";
4
- import { computed as r, createElementBlock as i, createElementVNode as a, defineComponent as o, mergeModels as s, normalizeClass as c, openBlock as l, provide as u, renderSlot as d, shallowRef as f, toRef as p, unref as m, useModel as h, useTemplateRef as g, watch as _ } from "vue";
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
5
  //#region src/components/QTabs/QTabs.vue?vue&type=script&setup=true&lang.ts
6
- var v = ["id"], y = ["aria-orientation"], b = { class: "q-tabs__panels" }, x = /*@__PURE__*/ o({
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({
7
10
  __name: "QTabs",
8
- props: /*@__PURE__*/ s({
11
+ props: /*@__PURE__*/ c({
9
12
  id: {},
10
13
  class: {},
11
14
  direction: { default: "horizontal" },
@@ -17,67 +20,143 @@ var v = ["id"], y = ["aria-orientation"], b = { class: "q-tabs__panels" }, x = /
17
20
  modelModifiers: {}
18
21
  }),
19
22
  emits: ["update:modelValue"],
20
- setup(o) {
21
- let s = o, x = h(o, "modelValue"), S = g("tabListEl"), C = f([]), { active: w } = t({
22
- active: x,
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,
23
31
  required: !0
24
32
  });
25
- _(w, (e) => {
26
- x.value = e;
27
- }), e({ QTab: { disabled: p(s, "disabled") } });
28
- let T = r(() => [
33
+ S(P, (e) => {
34
+ D.value = e;
35
+ }), e({ QTab: { disabled: v(c, "disabled") } });
36
+ let F = r(() => [
29
37
  "q-tabs",
30
- `q-tabs--${s.direction}`,
31
- `q-tabs--${s.variant}`,
32
- `q-tabs--align-${s.align}`,
33
- s.class
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
34
43
  ]);
35
- function E() {
36
- return C.value.filter((e) => !m(e.disabled));
44
+ function I(e) {
45
+ let t = e.tabRef.value;
46
+ return t ? "$el" in t ? t.$el : t : null;
37
47
  }
38
- function D() {
39
- let e = E();
40
- e.length && (e.some((e) => e.value === x.value) || (x.value = e[0].value));
48
+ function L() {
49
+ M.value = !1, j.value = {
50
+ ...j.value,
51
+ opacity: "0",
52
+ width: "0",
53
+ height: "0"
54
+ };
41
55
  }
42
- function O(e) {
43
- C.value = [...C.value, e], D();
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
+ });
44
85
  }
45
- function k(e) {
46
- C.value = C.value.filter((t) => t.value !== e);
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
+ }
47
100
  }
48
- function A(e, t) {
49
- let n = E();
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();
50
116
  if (!n.length) return;
51
117
  let r = n.findIndex((t) => t.value === e), i = n[r === -1 ? 0 : (r + t + n.length) % n.length];
52
118
  i.select(), i.focus();
53
119
  }
54
- function j() {
55
- let e = E()[0];
120
+ function G() {
121
+ let e = B()[0];
56
122
  e && (e.select(), e.focus());
57
123
  }
58
- function M() {
59
- let e = E(), t = e[e.length - 1];
124
+ function K() {
125
+ let e = B(), t = e[e.length - 1];
60
126
  t && (t.select(), t.focus());
61
127
  }
62
- return _(() => C.value.map((e) => [e.value, m(e.disabled)]), () => D()), u(n, {
63
- tabListEl: S,
64
- direction: r(() => s.direction),
65
- register: O,
66
- unregister: k,
67
- focusAdjacent: A,
68
- focusFirst: j,
69
- focusLast: M
70
- }), (e, t) => (l(), i("div", {
71
- id: s.id,
72
- class: c(T.value)
73
- }, [a("div", {
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", {
74
148
  ref_key: "tabListEl",
75
- ref: S,
76
- class: "q-tabs__list",
149
+ ref: k,
150
+ class: "q-tabs__tablist",
77
151
  role: "tablist",
78
- "aria-orientation": s.direction
79
- }, null, 8, y), a("div", b, [d(e.$slots, "default")])], 10, v));
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));
80
159
  }
81
160
  });
82
161
  //#endregion
83
- export { x as default };
162
+ export { D as default };