@quidgest/ui 0.10.1 → 0.12.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 (200) hide show
  1. package/dist/manifest/components.json +24 -0
  2. package/dist/ui.css +50 -2
  3. package/dist/ui.esm.js +728 -675
  4. package/dist/ui.js +8 -5
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +146 -131
  7. package/dist/ui.scss +59 -3
  8. package/esm/components/QButton/QButton.d.ts +92 -0
  9. package/esm/components/QButton/QButton.d.ts.map +1 -0
  10. package/esm/components/QButton/QButton.vue.js +87 -0
  11. package/esm/components/QButton/QButton.vue2.js +4 -0
  12. package/esm/components/QButton/index.d.ts +4 -0
  13. package/esm/components/QButton/index.d.ts.map +1 -0
  14. package/esm/components/QButtonGroup/QButtonGroup.d.ts +51 -0
  15. package/esm/components/QButtonGroup/QButtonGroup.d.ts.map +1 -0
  16. package/esm/components/QButtonGroup/QButtonGroup.vue.js +41 -0
  17. package/esm/components/QButtonGroup/QButtonGroup.vue2.js +4 -0
  18. package/esm/components/QButtonGroup/index.d.ts +4 -0
  19. package/esm/components/QButtonGroup/index.d.ts.map +1 -0
  20. package/esm/components/QButtonToggle/QButtonToggle.d.ts +81 -0
  21. package/esm/components/QButtonToggle/QButtonToggle.d.ts.map +1 -0
  22. package/esm/components/QButtonToggle/QButtonToggle.vue.js +58 -0
  23. package/esm/components/QButtonToggle/QButtonToggle.vue2.js +4 -0
  24. package/esm/components/QButtonToggle/index.d.ts +4 -0
  25. package/esm/components/QButtonToggle/index.d.ts.map +1 -0
  26. package/esm/components/QCombobox/QCombobox.d.ts +524 -0
  27. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -0
  28. package/esm/components/QCombobox/QCombobox.vue.js +381 -0
  29. package/esm/components/QCombobox/QCombobox.vue2.js +4 -0
  30. package/esm/components/QCombobox/index.d.ts +4 -0
  31. package/esm/components/QCombobox/index.d.ts.map +1 -0
  32. package/esm/components/QField/QField.d.ts +89 -0
  33. package/esm/components/QField/QField.d.ts.map +1 -0
  34. package/esm/components/QField/QField.vue.js +81 -0
  35. package/esm/components/QField/QField.vue2.js +4 -0
  36. package/esm/components/QField/index.d.ts +5 -0
  37. package/esm/components/QField/index.d.ts.map +1 -0
  38. package/esm/components/QField/index.js +6 -0
  39. package/esm/components/QIcon/InlineSvg.d.ts +110 -0
  40. package/esm/components/QIcon/InlineSvg.d.ts.map +1 -0
  41. package/esm/components/QIcon/InlineSvg.js +139 -0
  42. package/esm/components/QIcon/QIcon.d.ts +50 -0
  43. package/esm/components/QIcon/QIcon.d.ts.map +1 -0
  44. package/esm/components/QIcon/QIcon.vue.js +36 -0
  45. package/esm/components/QIcon/QIcon.vue2.js +4 -0
  46. package/esm/components/QIcon/QIconFont.d.ts +57 -0
  47. package/esm/components/QIcon/QIconFont.d.ts.map +1 -0
  48. package/esm/components/QIcon/QIconFont.vue.js +29 -0
  49. package/esm/components/QIcon/QIconFont.vue2.js +4 -0
  50. package/esm/components/QIcon/QIconImg.d.ts +38 -0
  51. package/esm/components/QIcon/QIconImg.d.ts.map +1 -0
  52. package/esm/components/QIcon/QIconImg.vue.js +22 -0
  53. package/esm/components/QIcon/QIconImg.vue2.js +4 -0
  54. package/esm/components/QIcon/QIconSvg.d.ts +72 -0
  55. package/esm/components/QIcon/QIconSvg.d.ts.map +1 -0
  56. package/esm/components/QIcon/QIconSvg.vue.js +34 -0
  57. package/esm/components/QIcon/QIconSvg.vue2.js +4 -0
  58. package/esm/components/QIcon/index.d.ts +8 -0
  59. package/esm/components/QIcon/index.d.ts.map +1 -0
  60. package/esm/components/QIcon/index.js +15 -0
  61. package/esm/components/QInputGroup/QInputGroup.d.ts +85 -0
  62. package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -0
  63. package/esm/components/QInputGroup/QInputGroup.vue.js +79 -0
  64. package/esm/components/QInputGroup/QInputGroup.vue2.js +4 -0
  65. package/esm/components/QInputGroup/index.d.ts +4 -0
  66. package/esm/components/QInputGroup/index.d.ts.map +1 -0
  67. package/esm/components/QLineLoader/QLineLoader.d.ts +32 -0
  68. package/esm/components/QLineLoader/QLineLoader.d.ts.map +1 -0
  69. package/esm/components/QLineLoader/QLineLoader.vue.js +22 -0
  70. package/esm/components/QLineLoader/QLineLoader.vue2.js +4 -0
  71. package/esm/components/QLineLoader/index.d.ts +4 -0
  72. package/esm/components/QLineLoader/index.d.ts.map +1 -0
  73. package/esm/components/QList/QList.d.ts +159 -0
  74. package/esm/components/QList/QList.d.ts.map +1 -0
  75. package/esm/components/QList/QList.vue.js +186 -0
  76. package/esm/components/QList/QList.vue2.js +4 -0
  77. package/esm/components/QList/QListItem.d.ts +82 -0
  78. package/esm/components/QList/QListItem.d.ts.map +1 -0
  79. package/esm/components/QList/QListItem.vue.js +75 -0
  80. package/esm/components/QList/QListItem.vue2.js +4 -0
  81. package/esm/components/QList/QListItemGroup.d.ts +43 -0
  82. package/esm/components/QList/QListItemGroup.d.ts.map +1 -0
  83. package/esm/components/QList/QListItemGroup.vue.js +29 -0
  84. package/esm/components/QList/QListItemGroup.vue2.js +4 -0
  85. package/esm/components/QList/index.d.ts +7 -0
  86. package/esm/components/QList/index.d.ts.map +1 -0
  87. package/esm/components/QList/index.js +12 -0
  88. package/esm/components/QOverlay/QOverlay.d.ts +236 -0
  89. package/esm/components/QOverlay/QOverlay.d.ts.map +1 -0
  90. package/esm/components/QOverlay/QOverlay.vue.js +250 -0
  91. package/esm/components/QOverlay/QOverlay.vue2.js +4 -0
  92. package/esm/components/QOverlay/index.d.ts +4 -0
  93. package/esm/components/QOverlay/index.d.ts.map +1 -0
  94. package/esm/components/QOverlay/index.js +6 -0
  95. package/esm/components/QPopover/QPopover.d.ts +132 -0
  96. package/esm/components/QPopover/QPopover.d.ts.map +1 -0
  97. package/esm/components/QPopover/QPopover.vue.js +71 -0
  98. package/esm/components/QPopover/QPopover.vue2.js +4 -0
  99. package/esm/components/QPopover/index.d.ts +4 -0
  100. package/esm/components/QPopover/index.d.ts.map +1 -0
  101. package/esm/components/QSelect/QSelect.d.ts +265 -0
  102. package/esm/components/QSelect/QSelect.d.ts.map +1 -0
  103. package/esm/components/QSelect/QSelect.vue.js +317 -0
  104. package/esm/components/QSelect/QSelect.vue2.js +4 -0
  105. package/esm/components/QSelect/index.d.ts +4 -0
  106. package/esm/components/QSelect/index.d.ts.map +1 -0
  107. package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts +46 -0
  108. package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts.map +1 -0
  109. package/esm/components/QSkeletonLoader/QSkeletonLoader.vue.js +39 -0
  110. package/esm/components/QSkeletonLoader/QSkeletonLoader.vue2.js +4 -0
  111. package/esm/components/QSkeletonLoader/index.d.ts +4 -0
  112. package/esm/components/QSkeletonLoader/index.d.ts.map +1 -0
  113. package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts +39 -0
  114. package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts.map +1 -0
  115. package/esm/components/QSpinnerLoader/QSpinnerLoader.vue.js +26 -0
  116. package/esm/components/QSpinnerLoader/QSpinnerLoader.vue2.js +4 -0
  117. package/esm/components/QSpinnerLoader/index.d.ts +4 -0
  118. package/esm/components/QSpinnerLoader/index.d.ts.map +1 -0
  119. package/esm/components/QSpinnerLoader/index.js +6 -0
  120. package/esm/components/QTextField/QTextField.d.ts +162 -0
  121. package/esm/components/QTextField/QTextField.d.ts.map +1 -0
  122. package/esm/components/QTextField/QTextField.vue.js +99 -0
  123. package/esm/components/QTextField/QTextField.vue2.js +4 -0
  124. package/esm/components/QTextField/index.d.ts +4 -0
  125. package/esm/components/QTextField/index.d.ts.map +1 -0
  126. package/esm/components/QTextField/index.js +6 -0
  127. package/esm/components/QThemeProvider/QThemeProvider.d.ts +25 -0
  128. package/esm/components/QThemeProvider/QThemeProvider.d.ts.map +1 -0
  129. package/esm/components/QThemeProvider/QThemeProvider.vue.js +24 -0
  130. package/esm/components/QThemeProvider/QThemeProvider.vue2.js +4 -0
  131. package/esm/components/QThemeProvider/index.d.ts +4 -0
  132. package/esm/components/QThemeProvider/index.d.ts.map +1 -0
  133. package/esm/components/QTooltip/QTooltip.d.ts +189 -0
  134. package/esm/components/QTooltip/QTooltip.d.ts.map +1 -0
  135. package/esm/components/QTooltip/QTooltip.vue.js +74 -0
  136. package/esm/components/QTooltip/QTooltip.vue2.js +4 -0
  137. package/esm/components/QTooltip/index.d.ts +4 -0
  138. package/esm/components/QTooltip/index.d.ts.map +1 -0
  139. package/esm/components/index.d.ts +18 -0
  140. package/esm/components/index.d.ts.map +1 -0
  141. package/esm/components/index.js +46 -0
  142. package/esm/composables/defaults.d.ts +25 -0
  143. package/esm/composables/defaults.d.ts.map +1 -0
  144. package/esm/composables/defaults.js +33 -0
  145. package/esm/composables/index.d.ts +2 -0
  146. package/esm/composables/index.d.ts.map +1 -0
  147. package/esm/composables/overlay.d.ts +116 -0
  148. package/esm/composables/overlay.d.ts.map +1 -0
  149. package/esm/composables/overlay.js +142 -0
  150. package/esm/composables/theme.d.ts +18 -0
  151. package/esm/composables/theme.d.ts.map +1 -0
  152. package/esm/composables/theme.js +20 -0
  153. package/esm/composables/uid.d.ts +8 -0
  154. package/esm/composables/uid.d.ts.map +1 -0
  155. package/esm/composables/uid.js +7 -0
  156. package/esm/framework.d.ts +29 -0
  157. package/esm/framework.d.ts.map +1 -0
  158. package/esm/framework.js +47 -0
  159. package/esm/index.d.ts +35 -0
  160. package/esm/index.d.ts.map +1 -0
  161. package/esm/index.js +12 -0
  162. package/esm/templates/index.d.ts +2 -0
  163. package/esm/templates/index.d.ts.map +1 -0
  164. package/esm/templates/index.js +5 -0
  165. package/esm/templates/theme.d.ts +5 -0
  166. package/esm/templates/theme.d.ts.map +1 -0
  167. package/esm/templates/theme.js +67 -0
  168. package/esm/types/primitive.d.ts +2 -0
  169. package/esm/types/primitive.d.ts.map +1 -0
  170. package/esm/utils/color.d.ts +105 -0
  171. package/esm/utils/color.d.ts.map +1 -0
  172. package/esm/utils/color.js +14 -0
  173. package/esm/utils/getCurrentInstance.d.ts +2 -0
  174. package/esm/utils/getCurrentInstance.d.ts.map +1 -0
  175. package/esm/utils/getElement.d.ts +6 -0
  176. package/esm/utils/getElement.d.ts.map +1 -0
  177. package/esm/utils/getElement.js +6 -0
  178. package/esm/utils/isEmpty.d.ts +2 -0
  179. package/esm/utils/isEmpty.d.ts.map +1 -0
  180. package/esm/utils/isEmpty.js +6 -0
  181. package/esm/utils/isObject.d.ts +2 -0
  182. package/esm/utils/isObject.d.ts.map +1 -0
  183. package/esm/utils/isObject.js +6 -0
  184. package/esm/utils/merge.d.ts +2 -0
  185. package/esm/utils/merge.d.ts.map +1 -0
  186. package/esm/utils/merge.js +21 -0
  187. package/esm/utils/setupPropsProxy.d.ts +12 -0
  188. package/esm/utils/setupPropsProxy.d.ts.map +1 -0
  189. package/esm/utils/setupPropsProxy.js +32 -0
  190. package/esm/utils/string.d.ts +7 -0
  191. package/esm/utils/string.d.ts.map +1 -0
  192. package/esm/utils/string.js +6 -0
  193. package/esm/utils/theme.d.ts +22 -0
  194. package/esm/utils/theme.d.ts.map +1 -0
  195. package/esm/utils/theme.js +40 -0
  196. package/package.json +46 -49
  197. package/dist/index.d.ts +0 -4044
  198. package/dist/ui.esm.js.map +0 -1
  199. package/dist/ui.js.map +0 -1
  200. package/dist/ui.min.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui.esm.js","sources":["../src/utils/isEmpty.ts","../src/utils/isObject.ts","../src/utils/merge.ts","../src/composables/defaults.ts","../src/composables/theme.ts","../src/templates/theme.ts","../src/utils/color.ts","../src/utils/string.ts","../src/utils/theme.ts","../src/framework.ts","../src/components/QSpinnerLoader/QSpinnerLoader.vue","../src/utils/setupPropsProxy.ts","../src/components/QSpinnerLoader/index.ts","../src/components/QButton/QButton.vue","../src/components/QButton/index.ts","../src/components/QButtonGroup/QButtonGroup.vue","../src/components/QButtonGroup/index.ts","../src/components/QButtonToggle/QButtonToggle.vue","../src/components/QButtonToggle/index.ts","../src/components/QIcon/QIcon.vue","../src/components/QIcon/QIconFont.vue","../src/components/QIcon/QIconImg.vue","../src/components/QIcon/InlineSvg.js","../src/components/QIcon/QIconSvg.vue","../src/components/QIcon/index.ts","../src/components/QList/QList.vue","../src/composables/uid.ts","../src/components/QList/QListItem.vue","../src/components/QList/QListItemGroup.vue","../src/components/QList/index.ts","../src/composables/overlay.ts","../src/utils/getElement.ts","../src/components/QOverlay/QOverlay.vue","../src/components/QOverlay/index.ts","../src/components/QField/QField.vue","../src/components/QField/index.ts","../src/components/QTextField/QTextField.vue","../src/components/QTextField/index.ts","../src/components/QCombobox/QCombobox.vue","../src/components/QCombobox/index.ts","../src/components/QInputGroup/QInputGroup.vue","../src/components/QInputGroup/index.ts","../src/components/QLineLoader/QLineLoader.vue","../src/components/QLineLoader/index.ts","../src/components/QPopover/QPopover.vue","../src/components/QPopover/index.ts","../src/components/QSelect/QSelect.vue","../src/components/QSelect/index.ts","../src/components/QThemeProvider/QThemeProvider.vue","../src/components/QThemeProvider/index.ts","../src/components/QTooltip/QTooltip.vue","../src/components/QTooltip/index.ts"],"sourcesContent":["export function isEmpty(object: unknown): boolean {\n\t// Check if the object is null or undefined\n\tif (object === null || object === undefined) {\n\t\treturn true\n\t}\n\n\t// Check if the object is a string or an array and if it is empty\n\tif (typeof object === 'string' || Array.isArray(object)) {\n\t\treturn object.length === 0\n\t}\n\n\t// Check if the object is an object and if it has no own properties\n\tif (typeof object === 'object') {\n\t\treturn Object.keys(object as Record<string, unknown>).length === 0\n\t}\n\n\t// If the object is not null, a string, an array, or an object, it's not empty\n\treturn false\n}\n","export function isObject(obj: unknown): obj is object {\n\treturn obj !== null && typeof obj === 'object' && !Array.isArray(obj)\n}\n","import { isObject } from './isObject'\n\nexport function merge(source: Record<string, unknown> = {}, target: Record<string, unknown> = {}) {\n\tconst out: Record<string, unknown> = {}\n\n\tfor (const key in source) {\n\t\tout[key] = source[key]\n\t}\n\n\tfor (const key in target) {\n\t\tconst sourceProperty = source[key]\n\t\tconst targetProperty = target[key]\n\n\t\t// Only continue deep merging if\n\t\t// both properties are objects\n\t\tif (isObject(sourceProperty) && isObject(targetProperty)) {\n\t\t\tout[key] = merge(\n\t\t\t\tsourceProperty as Record<string, unknown>,\n\t\t\t\ttargetProperty as Record<string, unknown>\n\t\t\t)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tout[key] = targetProperty\n\t}\n\n\treturn out\n}\n","// Types\nimport type { ComputedRef } from 'vue'\n\n// Utils\nimport { isEmpty } from '@/utils/isEmpty'\nimport { merge } from '@/utils/merge'\nimport { computed, getCurrentInstance, inject, provide, ref } from 'vue'\n\nexport const DEFAULTS_SYMBOL = 'q-defaults'\n\nexport type Defaults = Record<string | symbol, ComponentDefaults>\n\nexport type ComponentDefaults = Record<string | symbol, unknown>\n\nexport function useDefaults(): ComputedRef<ComponentDefaults | undefined> {\n\tconst vm = getCurrentInstance()\n\n\tif (!vm)\n\t\tthrow new Error('[Quidgest UI] useDefaults must be called from inside a setup function')\n\n\tconst component = vm.type.name ?? vm.type.__name\n\n\tif (!component) throw new Error('[Quidgest UI] Could not determine component name')\n\n\tconst defaults = injectDefaults()\n\n\tconst globalDefaults = defaults.value?.['Global']\n\tconst componentDefaults = defaults.value?.[component]\n\n\treturn computed(() => merge(globalDefaults, componentDefaults))\n}\n\n/**\n * Function to provide or update default values using the Vue.js `provide` function.\n * It takes a set of default values, merges them with the existing defaults (if any),\n * and then provides the merged defaults using the specified symbol.\n *\n * @param defaults - The default values to be provided or updated.\n */\nexport function provideDefaults(defaults: Defaults): void {\n\tif (isEmpty(defaults)) return\n\n\tconst currentDefaults = injectDefaults()\n\tconst providedDefaults = ref(defaults)\n\n\tconst newDefaults = computed(() => {\n\t\tif (isEmpty(providedDefaults.value)) return currentDefaults.value\n\t\treturn merge(currentDefaults.value, providedDefaults.value)\n\t})\n\n\tprovide(DEFAULTS_SYMBOL, newDefaults)\n}\n\n/**\n * Function to inject default values using the Vue.js `inject` function.\n * It retrieves the default values from the specified symbol and ensures\n * that the returned value is of type `ComputedRef<Defaults>`.\n *\n * @throws {Error} Throws an error if the defaults instance is not found.\n *\n * @returns {ComputedRef<Defaults>} A computed reference to the default values.\n */\nexport function injectDefaults(): ComputedRef<Defaults> {\n\tconst defaults = inject(DEFAULTS_SYMBOL, undefined) as ComputedRef<Defaults> | undefined\n\n\tif (!defaults) throw new Error('[Quidgest UI] Could not find defaults instance')\n\n\treturn defaults\n}\n","// Types\nimport type { ThemeInstance } from '@/framework'\n\n// Utils\nimport { inject, provide, ref } from 'vue'\n\nexport const THEME_SYMBOL = 'q-theme'\n\n/**\n * Custom hook for accessing the theme configuration in context.\n *\n * @returns The current theme configuration.\n */\nexport function useTheme(): ThemeInstance {\n\tconst theme: ThemeInstance | undefined = inject(THEME_SYMBOL)\n\n\tif (!theme) {\n\t\tthrow new Error('[Quidgest UI] Could not find theme instance')\n\t}\n\n\treturn theme\n}\n\n/**\n * Provides a theme with the specified name using the current theme configuration.\n *\n * @param name - The name of the theme to provide.\n *\n * @returns The active theme.\n */\nexport function provideTheme(name: string) {\n\tconst theme = useTheme()\n\n\tconst newTheme: ThemeInstance = {\n\t\tactiveTheme: ref(name),\n\t\tthemes: theme.themes\n\t}\n\n\tprovide(THEME_SYMBOL, newTheme)\n\n\treturn newTheme\n}\n","// Types\nimport type { ColorScheme } from '@/utils/color'\n\nexport const defaultLightColorScheme: ColorScheme = {\n\tprimary: '#008ad2',\n\tprimaryLight: '#cde5ff',\n\tprimaryDark: '#006398',\n\tsecondary: '#001d31',\n\thighlight: '#ff8241',\n\tinfo: '#17a2b8',\n\tinfoLight: '#bceff7',\n\tinfoDark: '#11798a',\n\tsuccess: '#28a745',\n\tsuccessLight: '#c2f0cd',\n\tsuccessDark: '#1e7d34',\n\twarning: '#ffa900',\n\twarningLight: '#ffeabf',\n\twarningDark: '#bf7f00',\n\tdanger: '#b71c1c',\n\tdangerLight: '#f7cccc',\n\tdangerDark: '#891515',\n\tbackground: '#fff',\n\tcontainer: '#fff',\n\tneutral: '#7c858d',\n\tneutralLight: '#c4c5ca',\n\tneutralDark: '#40474f',\n\tonBackground: '#202428',\n\tonPrimary: '#fff',\n\tonSecondary: '#fff',\n\tonHighlight: '#fff',\n\tonSuccess: '#fff',\n\tonWarning: '#fff',\n\tonDanger: '#fff',\n\tonInfo: '#fff'\n}\n\nexport const defaultDarkColorScheme: ColorScheme = {\n\tprimary: '#009ff5',\n\tprimaryLight: '#ade2ff',\n\tprimaryDark: '#164965',\n\tsecondary: '#003552',\n\thighlight: '#f65600',\n\tinfo: '#25cbe4',\n\tinfoLight: '#bceff7',\n\tinfoDark: '#225964',\n\tsuccess: '#3acf5d',\n\tsuccessLight: '#c2f0cd',\n\tsuccessDark: '#275738',\n\twarning: '#ffa900',\n\twarningLight: '#ffeabf',\n\twarningDark: '#5a471e',\n\tdanger: '#de2b2b',\n\tdangerLight: '#f7cccc',\n\tdangerDark: '#4d2528',\n\tbackground: '#202428',\n\tcontainer: '#202428',\n\tneutral: '#9299a0',\n\tneutralLight: '#dee1e3',\n\tneutralDark: '#41464a',\n\tonBackground: '#fff',\n\tonPrimary: '#fff',\n\tonSecondary: '#fff',\n\tonHighlight: '#fff',\n\tonSuccess: '#fff',\n\tonWarning: '#fff',\n\tonDanger: '#fff',\n\tonInfo: '#fff'\n}\n","export type ColorScheme = {\n\t// Brand\n\tprimary: string\n\tprimaryLight: string\n\tprimaryDark: string\n\tonPrimary: string\n\n\tsecondary: string\n\tonSecondary: string\n\n\thighlight: string\n\tonHighlight: string\n\n\t// Semantic\n\tinfo: string\n\tinfoLight: string\n\tinfoDark: string\n\tonInfo: string\n\n\tsuccess: string\n\tsuccessLight: string\n\tsuccessDark: string\n\tonSuccess: string\n\n\twarning: string\n\twarningLight: string\n\twarningDark: string\n\tonWarning: string\n\n\tdanger: string\n\tdangerLight: string\n\tdangerDark: string\n\tonDanger: string\n\n\t// Surface\n\tbackground: string\n\tonBackground: string\n\n\tcontainer: string\n\n\t// Neutral\n\tneutral: string\n\tneutralLight: string\n\tneutralDark: string\n}\n\n/**\n * Represents a color in RGB space.\n */\nexport type RGB = {\n\tr: number\n\tg: number\n\tb: number\n}\n\n/**\n * Represents a color in HSL space.\n */\nexport type HSL = {\n\th: number\n\ts: number\n\tl: number\n}\n\n/**\n * Checks if the given string represents a valid hexadecimal color code.\n * @param hexColorCode - The color code to validate.\n * @returns True if the color code is valid, false otherwise.\n */\nexport function isHexColorCodeValid(hexColorCode: string): boolean {\n\treturn /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(hexColorCode)\n}\n\n/**\n * Parses a color from a hex string.\n * @param color A hex string representing the color, e.g., \"#aabbcc\".\n * @returns A `RGB` object representing the parsed color.\n */\nexport function parseColor(color: string): RGB {\n\tif (!isHexColorCodeValid(color)) {\n\t\tthrow new Error('Invalid color format')\n\t}\n\n\t// Support short format (e.g., #abc)\n\tif (color.length === 4) {\n\t\tcolor = '#' + color[1] + color[1] + color[2] + color[2] + color[3] + color[3]\n\t}\n\n\tconst r = parseInt(color.slice(1, 3), 16)\n\tconst g = parseInt(color.slice(3, 5), 16)\n\tconst b = parseInt(color.slice(5, 7), 16)\n\n\treturn { r, g, b }\n}\n\n/**\n * Lightens a color by a specified amount.\n * @param rgb The color to lighten.\n * @param amount The amount to lighten the color by, in the range [0, 100].\n * @returns The lightened color.\n */\nexport function lighten(rgb: RGB, amount: number): RGB {\n\t// Check if the amount is within the required range\n\tif (amount < 0 || amount > 100) {\n\t\tthrow new Error('Amount must be in the range [0, 100]')\n\t} else if (amount === 0) {\n\t\treturn rgb\n\t}\n\n\tconst hsl = rgbToHsl(rgb)\n\tconst factor = amount / 100\n\thsl.l = hsl.l + factor * (100 - hsl.l)\n\treturn hslToRgb(hsl)\n}\n\n/**\n * Darkens a color by a specified amount.\n * @param rgb The color to darken.\n * @param amount The amount to darken the color by, in the range [0, 100].\n * @returns The darkened color.\n */\nexport function darken(rgb: RGB, amount: number): RGB {\n\t// Check if the amount is within the required range\n\tif (amount < 0 || amount > 100) {\n\t\tthrow new Error('Amount must be in the range [0, 100]')\n\t} else if (amount === 0) {\n\t\treturn rgb\n\t}\n\n\tconst hsl = rgbToHsl(rgb)\n\tconst factor = amount / 100\n\thsl.l = hsl.l - factor * hsl.l\n\treturn hslToRgb(hsl)\n}\n\n/**\n * Converts a `Color` object to a hex string.\n * @param rgb The color to convert.\n * @returns A hex string representing the color.\n */\nexport function colorToHex(rgb: RGB): string {\n\tconst r = rgb.r.toString(16).padStart(2, '0')\n\tconst g = rgb.g.toString(16).padStart(2, '0')\n\tconst b = rgb.b.toString(16).padStart(2, '0')\n\n\treturn `#${r}${g}${b}`\n}\n\n/**\n * Converts a color from RGB to HSL space.\n * @param color The color to convert.\n * @returns An object representing the color in HSL space.\n */\nexport function rgbToHsl(rgb: RGB): HSL {\n\tconst r = rgb.r / 255\n\tconst g = rgb.g / 255\n\tconst b = rgb.b / 255\n\n\tconst max = Math.max(r, g, b)\n\tconst min = Math.min(r, g, b)\n\tlet h = 0,\n\t\ts\n\tconst l = (max + min) / 2\n\n\tif (max === min) {\n\t\th = s = 0 // achromatic\n\t} else {\n\t\tconst d = max - min\n\t\ts = l > 0.5 ? d / (2 - max - min) : d / (max + min)\n\n\t\tswitch (max) {\n\t\t\tcase r:\n\t\t\t\th = (g - b) / d + (g < b ? 6 : 0)\n\t\t\t\tbreak\n\t\t\tcase g:\n\t\t\t\th = (b - r) / d + 2\n\t\t\t\tbreak\n\t\t\tcase b:\n\t\t\t\th = (r - g) / d + 4\n\t\t\t\tbreak\n\t\t}\n\n\t\th /= 6\n\t}\n\n\treturn {\n\t\th: Math.round(h * 360),\n\t\ts: Math.round(s * 100),\n\t\tl: Math.round(l * 100)\n\t}\n}\n\n/**\n * Converts a color from HSL to RGB space.\n * @param h The hue component of the color, in the range [0, 1].\n * @param s The saturation component of the color, in the range [0, 1].\n * @param l The lightness component of the color, in the range [0, 1].\n * @returns A `RGB` object representing the color in RGB space.\n */\nexport function hslToRgb(hsl: HSL): RGB {\n\tconst h = hsl.h / 360\n\tconst s = hsl.s / 100\n\tconst l = hsl.l / 100\n\n\tlet r, g, b\n\n\tif (s === 0) {\n\t\tr = g = b = l // achromatic\n\t} else {\n\t\tconst q = l < 0.5 ? l * (1 + s) : l + s - l * s\n\t\tconst p = 2 * l - q\n\n\t\tr = hueToRgb(p, q, h + 1 / 3)\n\t\tg = hueToRgb(p, q, h)\n\t\tb = hueToRgb(p, q, h - 1 / 3)\n\t}\n\n\treturn {\n\t\tr: Math.round(r * 255),\n\t\tg: Math.round(g * 255),\n\t\tb: Math.round(b * 255)\n\t}\n}\n\n/**\n * Helper function to convert a hue value to a corresponding RGB value.\n * @param p The first RGB component.\n * @param q The second RGB component.\n * @param t The hue value.\n * @returns The corresponding RGB value.\n */\nexport function hueToRgb(p: number, q: number, t: number): number {\n\tif (t < 0) t += 1\n\tif (t > 1) t -= 1\n\tif (t < 1 / 6) return p + (q - p) * 6 * t\n\tif (t < 1 / 2) return q\n\tif (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\n\treturn p\n}\n\nexport function getContrastingColor(luminance: number) {\n\t// Threshold value to determine whether to use white or black text\n\tconst threshold = 50\n\treturn luminance > threshold ? '#000' : '#fff'\n}\n\nexport function getComplementaryColor(color: string): string {\n\tconst rgb: RGB = parseColor(color)\n\n\t// Calculate the complementary color by subtracting each component from 255\n\trgb.r = 255 - rgb.r\n\trgb.g = 255 - rgb.g\n\trgb.b = 255 - rgb.b\n\n\t// Convert the r, g, b values back to a hex string and return it\n\treturn colorToHex(rgb)\n}\n","/**\n * Converts a string to kebab case.\n *\n * @param str The string to convert.\n */\nexport function toKebabCase(str: string) {\n\treturn str\n\t\t.replace(/([a-z])([A-Z])/g, '$1-$2')\n\t\t.replace(/([0-9])([A-Za-z])/g, '$1-$2')\n\t\t.replace(/([A-Za-z])([0-9])/g, '$1-$2')\n\t\t.toLowerCase()\n}\n","// Symbols\nimport { THEME_SYMBOL } from '@/composables/theme'\n\n// Types\nimport type { ThemeDefinition } from '@/framework'\nimport type { ColorScheme } from './color'\n\n// Utils\nimport { parseColor } from './color'\nimport { toKebabCase } from './string'\n\n/**\n * Gets or creates a style node for applying dynamic themes.\n *\n * @returns The style node used for dynamic themes.\n */\nexport function getThemeNode(): HTMLStyleElement {\n\tlet themeNode: HTMLStyleElement | null = document.getElementById(\n\t\tTHEME_SYMBOL\n\t) as HTMLStyleElement\n\n\tif (!themeNode) {\n\t\tthemeNode = document.createElement('style')\n\t\tthemeNode.id = THEME_SYMBOL\n\t\tdocument.head.appendChild(themeNode)\n\t}\n\n\treturn themeNode\n}\n\n/**\n * Generates and applies dynamic root-level styles based on the provided themes.\n *\n * @param themes - An array of theme definitions.\n */\nexport function generateRootStyle(themes: ThemeDefinition[]) {\n\tlet cssText = ''\n\t// Generate theme dynamic CSS\n\tfor (const theme of themes) {\n\t\tcssText += `.q-theme--${theme.name} {\\n`\n\t\tconst colors = theme.scheme\n\n\t\tlet color: keyof ColorScheme\n\t\tfor (color in colors) {\n\t\t\tconst value = colors[color]\n\n\t\t\tif (value) {\n\t\t\t\t// Generate HEX\n\t\t\t\tcssText += ` ${toProperty(color)}: ${value};\\n`\n\n\t\t\t\t// Generate RGB, useful to combine with alpha channel\n\t\t\t\tconst rgb = parseColor(value)\n\t\t\t\tcssText += ` ${toProperty(color)}-rgb: ${rgb.r} ${rgb.g} ${rgb.b};\\n`\n\t\t\t}\n\t\t}\n\t\tcssText += '}\\n'\n\t}\n\n\tconst themeNode = getThemeNode()\n\n\t// Set the CSS content for the style element\n\tthemeNode.textContent = cssText\n}\n\n/**\n * Converts a color property name to a CSS variable name.\n *\n * @param color - The color property name.\n * @returns The corresponding CSS variable name.\n */\nexport function toProperty(color: string) {\n\t// Prevent creation of broken tokens\n\tif (!color) {\n\t\treturn ''\n\t}\n\n\treturn `--q-theme-${toKebabCase(color)}`\n}\n","// Composables\nimport { DEFAULTS_SYMBOL } from '@/composables/defaults'\n\n// Symbols\nimport { THEME_SYMBOL } from '@/composables/theme'\n\n// Templates\nimport { defaultDarkColorScheme, defaultLightColorScheme } from './templates/theme'\n\n// Types\nimport type { Defaults } from '@/composables/defaults'\nimport type { App, Component, Plugin, Ref } from 'vue'\nimport type { ColorScheme } from './utils/color'\n\n// Utils\nimport { ref, watch } from 'vue'\nimport { generateRootStyle } from './utils/theme'\n\nexport type FrameworkConfig = {\n\tcomponents?: Record<string, Component>\n\tthemes?: AppThemes\n\tdefaults?: Defaults\n}\n\nexport type ThemeMode = 'light' | 'dark'\n\nexport type AppThemes = {\n\tdefaultTheme: string\n\tthemes: Array<{\n\t\tname: string\n\t\tmode: ThemeMode\n\t\tcolors?: Partial<ColorScheme>\n\t}>\n}\n\nexport type ThemeDefinition = {\n\tname: string\n\tmode: ThemeMode\n\tscheme: ColorScheme\n}\n\nexport type ThemeInstance = {\n\tactiveTheme: Ref<string>\n\tthemes: ThemeDefinition[]\n}\n\nexport function createFramework(config: FrameworkConfig = {}): Plugin {\n\tconst install = (app: App) => {\n\t\t// Install components\n\t\tconst components = config.components || {}\n\t\tfor (const name in components) {\n\t\t\tapp.component(name, components[name])\n\t\t}\n\n\t\t// Setup global defaults\n\t\tconst globalDefaults = config.defaults || {}\n\t\tapp.provide(DEFAULTS_SYMBOL, ref(globalDefaults))\n\n\t\t// Install themes\n\t\tinstallThemes(app, config.themes)\n\t}\n\n\treturn { install }\n}\n\nexport function installThemes(app: App, config?: AppThemes) {\n\tconst themes: ThemeDefinition[] = []\n\tlet defaultThemeName: string | undefined = undefined\n\n\tif (!config) {\n\t\t// No theme definition was provided, use default light theme\n\t\tdefaultThemeName = 'default'\n\n\t\tthemes.push({\n\t\t\tname: defaultThemeName,\n\t\t\tmode: 'light',\n\t\t\tscheme: defaultLightColorScheme\n\t\t})\n\t} else {\n\t\tfor (const theme of config.themes) {\n\t\t\t// Pick the corresponding default color scheme\n\t\t\tconst defaultColorScheme =\n\t\t\t\ttheme.mode === 'light' ? defaultLightColorScheme : defaultDarkColorScheme\n\n\t\t\t// Color scheme is potentially partial\n\t\t\t// Merge with default appropriate color scheme\n\t\t\tconst scheme = { ...defaultColorScheme, ...theme.colors }\n\n\t\t\tthemes.push({\n\t\t\t\tname: theme.name,\n\t\t\t\tmode: theme.mode,\n\t\t\t\tscheme: scheme\n\t\t\t})\n\n\t\t\tif (theme.name === config.defaultTheme) defaultThemeName = theme.name\n\t\t}\n\t}\n\n\t// At this point, if the default theme is null,\n\t// there's got to be an issue with the config that was provided\n\tif (defaultThemeName) {\n\t\tconst state = {\n\t\t\tactiveTheme: ref(defaultThemeName),\n\t\t\tthemes: themes\n\t\t}\n\n\t\t// Create a style node containing the theme classes\n\t\tgenerateRootStyle(themes)\n\n\t\t// Watch changes to the active theme\n\t\t// and applies the global theme class accordingly\n\t\twatch(state.activeTheme, applyGlobalThemeClass, { immediate: true })\n\n\t\t// Provide theme configuration\n\t\tapp.provide(THEME_SYMBOL, state)\n\t}\n}\n\nfunction applyGlobalThemeClass(themeName: string) {\n\tconst htmlElement = document.documentElement\n\n\t// Remove previous class\n\tconst classesList = Array.from(htmlElement.classList)\n\tconst filteredClasses = classesList.filter((className) => !className.startsWith('q-theme'))\n\thtmlElement.className = filteredClasses.join(' ')\n\n\t// Add new class\n\thtmlElement.classList.add(`q-theme--${themeName}`)\n}\n","<template>\n\t<div\n\t\t:class=\"['q-spinner-loader', props.class]\"\n\t\t:style=\"loaderStyle\"></div>\n</template>\n\n<script setup lang=\"ts\">\n\t// Utils\n\timport { computed } from 'vue'\n\n\texport type QSpinnerLoaderProps = {\n\t\t/**\n\t\t * The size of the loader, in pixels.\n\t\t */\n\t\tsize?: number\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QSpinnerLoaderProps>(), {\n\t\tsize: 48,\n\t\tclass: undefined\n\t})\n\n\tconst loaderStyle = computed(() => {\n\t\treturn {\n\t\t\t'font-size': props.size !== 48 ? `${props.size}px` : undefined\n\t\t}\n\t})\n</script>\n","// Composables\nimport { useDefaults } from '@/composables/defaults'\n\n// Types\nimport type { SetupContext, VNode } from 'vue'\n\n// Utils\nimport { getCurrentInstance } from 'vue'\nimport { isEmpty } from './isEmpty'\nimport { toKebabCase } from './string'\n\ntype LooseRequired<T> = {\n\t[P in keyof (T & Required<T>)]: T[P]\n}\n\ntype Component<Props> = {\n\tsetup?: (\n\t\tthis: void,\n\t\tprops: LooseRequired<Readonly<Props>>,\n\t\tctx: SetupContext<unknown>\n\t) => unknown\n}\n\nexport function propIsDefined(vnode: VNode, prop: string) {\n\tconst vprop = toKebabCase(prop)\n\n\tif (!vprop) {\n\t\treturn false\n\t}\n\n\treturn typeof vnode.props?.[vprop] !== 'undefined'\n}\n\nexport function setupPropsProxy<Props>(component: Component<Props>): Component<Props> {\n\tconst setup = component.setup\n\n\tif (!setup) return component\n\n\tcomponent.setup = (props, ctx) => {\n\t\tconst componentDefaults = useDefaults()\n\n\t\tif (isEmpty(componentDefaults.value)) return setup(props, ctx)\n\n\t\tconst vm = getCurrentInstance()\n\n\t\tif (vm === null) return setup(props, ctx)\n\n\t\tconst _props = new Proxy(props, {\n\t\t\tget(target, prop) {\n\t\t\t\tconst propValue = Reflect.get(target, prop)\n\t\t\t\tconst defaultValue = componentDefaults.value?.[prop]\n\n\t\t\t\tif (typeof prop === 'string' && !propIsDefined(vm.vnode, prop))\n\t\t\t\t\treturn defaultValue ?? propValue\n\t\t\t\treturn propValue\n\t\t\t}\n\t\t})\n\n\t\treturn setup(_props, ctx)\n\t}\n\n\treturn component\n}\n","// Components\nimport _QSpinnerLoader from './QSpinnerLoader.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QSpinnerLoader = setupPropsProxy(_QSpinnerLoader) as typeof _QSpinnerLoader\n\n// Export components\nexport { QSpinnerLoader }\n","<template>\n\t<button\n\t\ttype=\"button\"\n\t\t:class=\"classes\"\n\t\t:disabled=\"isDisabled\"\n\t\t@click.stop.prevent=\"onClick\">\n\t\t<div\n\t\t\tv-if=\"loading\"\n\t\t\tclass=\"q-btn__spinner\">\n\t\t\t<q-spinner-loader :size=\"20\" />\n\t\t</div>\n\t\t<span class=\"q-btn__content\">\n\t\t\t<template v-if=\"iconOnRight\">\n\t\t\t\t{{ props.label }}\n\t\t\t</template>\n\n\t\t\t<slot></slot>\n\n\t\t\t<template v-if=\"!iconOnRight\">\n\t\t\t\t{{ props.label }}\n\t\t\t</template>\n\t\t</span>\n\t</button>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QSpinnerLoader } from '@/components/QSpinnerLoader'\n\n\t// Utils\n\timport { computed } from 'vue'\n\n\texport type QButtonProps = {\n\t\t/**\n\t\t * Indicates whether the button is active or not.\n\t\t */\n\t\tactive?: boolean\n\n\t\t/**\n\t\t * The style of the button.\n\t\t */\n\t\tbStyle?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'plain'\n\n\t\t/**\n\t\t * The text content of the button.\n\t\t */\n\t\tlabel?: string\n\n\t\t/**\n\t\t * If true, the button is disabled and cannot be interacted with.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * If true, the button icon is displayed on the right side.\n\t\t */\n\t\ticonOnRight?: boolean\n\n\t\t/**\n\t\t * If true, the button has no borders.\n\t\t */\n\t\tborderless?: boolean\n\n\t\t/**\n\t\t * If true, the button has an elevated appearance.\n\t\t */\n\t\televated?: boolean\n\n\t\t/**\n\t\t * If true, the button spans the full width of its container.\n\t\t */\n\t\tblock?: boolean\n\n\t\t/**\n\t\t * If true, the button is in a loading state, indicating ongoing activity.\n\t\t */\n\t\tloading?: boolean\n\n\t\t/**\n\t\t * The size of the button, either 'regular' or 'small'.\n\t\t */\n\t\tsize?: 'regular' | 'small'\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QButtonProps>(), {\n\t\tbStyle: 'secondary',\n\t\tlabel: '',\n\t\tsize: 'regular',\n\t\tclass: undefined\n\t})\n\n\tconst emit = defineEmits<{\n\t\t(e: 'click', event: Event): void\n\t}>()\n\n\tconst isDisabled = computed(() => props.disabled || props.loading)\n\n\tfunction onClick(event: Event) {\n\t\tif (!isDisabled.value) emit('click', event)\n\t}\n\n\tconst classes = computed(() => {\n\t\tconst size = props.size !== 'regular' ? `q-btn--${props.size}` : undefined\n\n\t\treturn [\n\t\t\t'q-btn',\n\t\t\t`q-btn--${props.bStyle}`,\n\t\t\tsize,\n\t\t\t{\n\t\t\t\t'q-btn--active': props.active,\n\t\t\t\t'q-btn--borderless': props.borderless,\n\t\t\t\t'q-btn--elevated': props.elevated,\n\t\t\t\t'q-btn--block': props.block,\n\t\t\t\t'q-btn--loading': props.loading\n\t\t\t},\n\t\t\tprops.class\n\t\t]\n\t})\n</script>\n","// Components\nimport _QButton from './QButton.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QButton = setupPropsProxy(_QButton) as typeof _QButton\n\n// Export components\nexport { QButton }\n","<template>\n\t<div\n\t\t:class=\"[\n\t\t\t'q-btn-group',\n\t\t\t{\n\t\t\t\t'q-btn-group--elevated': props.elevated\n\t\t\t},\n\t\t\tprops.class\n\t\t]\">\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\n\t// Composables\n\timport { provideDefaults } from '@/composables/defaults'\n\n\t// Utils\n\timport { toRef } from 'vue'\n\n\texport type QButtonGroupProps = {\n\t\t/**\n\t\t * If true, the button group is disabled and cannot be interacted with.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * If true, the button group has no borders.\n\t\t */\n\t\tborderless?: boolean\n\n\t\t/**\n\t\t * If true, the button group an elevated appearance.\n\t\t */\n\t\televated?: boolean\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QButtonGroupProps>(), {\n\t\tclass: undefined\n\t})\n\n\tprovideDefaults({\n\t\tQButton: {\n\t\t\tbStyle: 'secondary',\n\t\t\tdisabled: toRef(props, 'disabled'),\n\t\t\tborderless: toRef(props, 'borderless'),\n\t\t\televated: false\n\t\t}\n\t})\n</script>\n","// Components\nimport _QButtonGroup from './QButtonGroup.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QButtonGroup = setupPropsProxy(_QButtonGroup) as typeof _QButtonGroup\n\n// Export components\nexport { QButtonGroup }\n","<template>\n\t<q-button-group\n\t\tb-style=\"secondary\"\n\t\t:class=\"props.class\"\n\t\t:disabled=\"props.disabled\"\n\t\t:borderless=\"props.borderless\"\n\t\t:elevated=\"props.elevated\">\n\t\t<q-button\n\t\t\tv-for=\"option in props.options\"\n\t\t\t:key=\"option.key\"\n\t\t\t:title=\"option.title\"\n\t\t\t:label=\"option.label\"\n\t\t\t:active=\"model === option.key\"\n\t\t\t@click=\"() => toggle(option)\">\n\t\t\t<slot :name=\"option.key\"></slot>\n\t\t</q-button>\n\t</q-button-group>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QButton } from '@/components/QButton'\n\timport { QButtonGroup } from '@/components/QButtonGroup'\n\n\texport type QButtonToggleOption = {\n\t\tkey: string\n\t\ttitle?: string\n\t\tlabel?: string\n\t}\n\n\texport type QButtonToggleProps = {\n\t\t/**\n\t\t * The list of available options to display\n\t\t */\n\t\toptions: QButtonToggleOption[]\n\n\t\t/**\n\t\t * Indicates if the button toggle is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * Indicates if the buttons' border should be removed.\n\t\t */\n\t\tborderless?: boolean\n\n\t\t/**\n\t\t * Indicates if the buttons should have an elevated appearance.\n\t\t */\n\t\televated?: boolean\n\n\t\t/**\n\t\t * Indicates if options can be deselected.\n\t\t */\n\t\trequired?: boolean\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = defineProps<QButtonToggleProps>()\n\n\tconst model = defineModel<string>()\n\n\tfunction toggle(option: QButtonToggleOption) {\n\t\tif (model.value === option.key && !props.required) model.value = undefined\n\t\telse model.value = option.key\n\t}\n</script>\n","// Components\nimport _QButtonToggle from './QButtonToggle.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QButtonToggle = setupPropsProxy(_QButtonToggle) as typeof _QButtonToggle\n\n// Export components\nexport { QButtonToggle }\n","<template>\n\t<component\n\t\t:is=\"component\"\n\t\t:class=\"props.class\"\n\t\t:icon=\"props.icon\"\n\t\t:size=\"props.size\" />\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QIconFont, QIconImg, QIconSvg } from '.'\n\n\t// Utils\n\timport { computed } from 'vue'\n\n\texport type Icon = {\n\t\t/**\n\t\t * The identifier of the icon.\n\t\t */\n\t\ticon: string\n\n\t\t/**\n\t\t * The type of resource.\n\t\t */\n\t\ttype?: 'svg' | 'font' | 'img'\n\n\t\t/**\n\t\t * The size of the icon, in pixels.\n\t\t */\n\t\tsize?: number\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<Icon>(), {\n\t\ttype: 'svg',\n\t\tsize: undefined,\n\t\tclass: undefined\n\t})\n\n\tconst component = computed(() => {\n\t\tswitch (props.type) {\n\t\t\tcase 'svg':\n\t\t\t\treturn QIconSvg\n\t\t\tcase 'font':\n\t\t\t\treturn QIconFont\n\t\t\tcase 'img':\n\t\t\t\treturn QIconImg\n\t\t\tdefault:\n\t\t\t\treturn undefined\n\t\t}\n\t})\n</script>\n","<template>\n\t<i\n\t\t:class=\"['q-icon', 'q-icon__font', libraryVariant, iconClass, props.class]\"\n\t\t:style=\"iconStyle\">\n\t</i>\n</template>\n\n<script setup lang=\"ts\">\n\t// Utils\n\timport { computed } from 'vue'\n\n\texport type QIconFontProps = {\n\t\t/**\n\t\t * The classname containing the content of the font icon.\n\t\t */\n\t\ticon: string\n\n\t\t/**\n\t\t * The name of the icon library.\n\t\t */\n\t\tlibrary?: string\n\n\t\t/**\n\t\t * The icon variant.\n\t\t */\n\t\tvariant?: string\n\n\t\t/**\n\t\t * The size of the icon, in pixels.\n\t\t */\n\t\tsize?: number\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QIconFontProps>(), {\n\t\tlibrary: '',\n\t\tvariant: '',\n\t\tsize: undefined,\n\t\tclass: undefined\n\t})\n\n\tconst libraryVariant = computed(() => {\n\t\tif (props.variant) return `${props.library}-${props.variant}`\n\t\treturn props.library\n\t})\n\n\tconst iconClass = computed(() => {\n\t\tif (props.library && props.icon) return `${props.library}-${props.icon}`\n\t\treturn props.icon\n\t})\n\n\tconst iconStyle = computed(() => {\n\t\treturn {\n\t\t\t'font-size': props.size !== undefined ? `${props.size}px` : undefined\n\t\t}\n\t})\n</script>\n","<template>\n\t<img\n\t\t:src=\"props.icon\"\n\t\t:class=\"['q-icon', 'q-icon__img', props.class]\"\n\t\t:style=\"iconStyle\" />\n</template>\n\n<script setup lang=\"ts\">\n\t// Utils\n\timport { computed } from 'vue'\n\n\tconst props = defineProps<{\n\t\t/**\n\t\t * The URL of the image to be used as the icon.\n\t\t */\n\t\ticon: string\n\n\t\t/**\n\t\t * The size of the icon, in pixels.\n\t\t */\n\t\tsize?: number\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}>()\n\n\tconst iconStyle = computed(() => {\n\t\treturn {\n\t\t\t'font-size': props.size !== undefined ? `${props.size}px` : undefined\n\t\t}\n\t})\n</script>\n","import { defineComponent, h } from 'vue'\n\n/** @type Record<string, PromiseWithState<Element>> */\nconst cache = {}\n\nexport default defineComponent({\n\tname: 'InlineSvg',\n\n\temits: {\n\t\tloaded: (payload) => typeof payload === 'object',\n\t\tunloaded: () => true,\n\t\terror: (payload) => typeof payload === 'object'\n\t},\n\n\tinheritAttrs: false,\n\n\trender() {\n\t\tif (!this.svgElSource) return null\n\n\t\tconst ctn = this.getSvgContent(this.svgElSource)\n\t\tif (!ctn) return h('div', this.$attrs)\n\n\t\tconst cprops = {}\n\t\t// source attrs\n\t\tthis.copySvgAttrs(cprops, this.svgElSource)\n\t\t// transformed attributes\n\t\tthis.copySvgAttrs(cprops, ctn)\n\t\t// component attrs and listeners\n\t\tthis.copyComponentAttrs(cprops, this.$attrs)\n\t\t// content\n\t\tcprops.innerHTML = ctn.innerHTML\n\n\t\treturn h('svg', cprops)\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The source URL of the SVG bundle.\n\t\t */\n\t\tsrc: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\n\t\t/**\n\t\t * The ID of the SVG symbol to be rendered.\n\t\t */\n\t\tsymbol: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\n\t\t/**\n\t\t * The title to be associated with the SVG.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\n\t\t/**\n\t\t * A function to transform the source SVG element before rendering.\n\t\t * If not provided, no transformation will be applied.\n\t\t */\n\t\ttransformSource: {\n\t\t\ttype: Function,\n\t\t\tdefault: undefined\n\t\t},\n\n\t\t/**\n\t\t * Determines whether to keep the existing SVG content visible during the loading of a new SVG.\n\t\t * Set to `false` to hide content during loading.\n\t\t */\n\t\tkeepDuringLoading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** @type SVGElement */\n\t\t\tsvgElSource: null\n\t\t}\n\t},\n\n\tasync mounted() {\n\t\t// generate `svgElSource`\n\t\tawait this.getSource(this.src)\n\t},\n\n\tmethods: {\n\t\tcopySvgAttrs(target, source) {\n\t\t\tconst attrs = source.attributes\n\t\t\tif (attrs) for (const a of attrs) target[a.name] = a.value\n\t\t},\n\n\t\tcopyComponentAttrs(target, source) {\n\t\t\tfor (const [key, value] of Object.entries(source))\n\t\t\t\tif (value !== false && value !== null && value !== undefined) target[key] = value\n\t\t},\n\n\t\tgetSvgContent(svgEl) {\n\t\t\tif (this.symbol) {\n\t\t\t\tsvgEl = svgEl.getElementById(this.symbol)\n\t\t\t\tif (!svgEl) return null\n\t\t\t}\n\n\t\t\tif (this.transformSource) {\n\t\t\t\tsvgEl = svgEl.cloneNode(true)\n\t\t\t\tsvgEl = this.transformSource(svgEl)\n\t\t\t}\n\n\t\t\tif (this.title) {\n\t\t\t\tif (!this.transformSource) svgEl = svgEl.cloneNode(true)\n\t\t\t\tsetTitle(svgEl, this.title)\n\t\t\t}\n\n\t\t\treturn svgEl\n\t\t},\n\n\t\t/**\n\t\t * Get svgElSource\n\t\t * @param {string} src\n\t\t */\n\t\tasync getSource(src) {\n\t\t\ttry {\n\t\t\t\t// Fill cache by src with promise\n\t\t\t\tif (!cache[src]) {\n\t\t\t\t\t// Download\n\t\t\t\t\tcache[src] = makePromiseState(this.download(src))\n\t\t\t\t}\n\n\t\t\t\t// Notify svg is unloaded\n\t\t\t\tif (this.svgElSource && cache[src].getIsPending() && !this.keepDuringLoading) {\n\t\t\t\t\tthis.svgElSource = null\n\t\t\t\t\tthis.$emit('unloaded')\n\t\t\t\t}\n\n\t\t\t\t// Inline svg when cached promise resolves\n\t\t\t\tconst svg = await cache[src]\n\t\t\t\tthis.svgElSource = svg\n\t\t\t\t// Wait to render\n\t\t\t\tawait this.$nextTick()\n\t\t\t\t// Notify\n\t\t\t\tthis.$emit('loaded', this.$el)\n\t\t\t} catch (err) {\n\t\t\t\t// Notify svg is unloaded\n\t\t\t\tif (this.svgElSource) {\n\t\t\t\t\tthis.svgElSource = null\n\t\t\t\t\tthis.$emit('unloaded')\n\t\t\t\t}\n\n\t\t\t\t// Remove cached rejected promise so next image can try load again\n\t\t\t\tdelete cache[src]\n\t\t\t\tthis.$emit('error', err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Get the contents of the SVG\n\t\t * @param {string} url\n\t\t * @returns {PromiseWithState<Element>}\n\t\t */\n\t\tasync download(url) {\n\t\t\tconst response = await fetch(url)\n\t\t\tif (!response.ok) throw new Error('Error loading SVG')\n\n\t\t\tconst text = await response.text()\n\t\t\tconst parser = new DOMParser()\n\t\t\tconst result = parser.parseFromString(text, 'text/xml')\n\t\t\tconst svgEl = result.getElementsByTagName('svg')[0]\n\n\t\t\tif (!svgEl) throw new Error('Loaded file is not a valid SVG')\n\n\t\t\t// Uncomment the following line if you want to apply any transformation to the SVG element\n\t\t\t// svgEl = this.transformSource(svgEl)\n\t\t\treturn svgEl\n\t\t}\n\t},\n\n\twatch: {\n\t\tsrc(newValue) {\n\t\t\t// re-generate cached svg (`svgElSource`)\n\t\t\tthis.getSource(newValue)\n\t\t}\n\t},\n\n\texpose: []\n})\n\n/**\n * Create or edit the <title> element of a SVG\n * @param {SVGElement} svg\n * @param {string} title\n */\nfunction setTitle(svg, title) {\n\tconst titleTags = svg.getElementsByTagName('title')\n\tif (titleTags.length) {\n\t\t// overwrite existing title\n\t\ttitleTags[0].textContent = title\n\t} else {\n\t\t// create a title element if one doesn't already exist\n\t\tconst titleEl = document.createElementNS('http://www.w3.org/2000/svg', 'title')\n\t\ttitleEl.textContent = title\n\t\t// svg.prepend(titleEl);\n\t\tsvg.insertBefore(titleEl, svg.firstChild)\n\t}\n}\n\n/**\n * This function allow you to modify a JS Promise by adding some status properties.\n * @template {any} T\n * @param {Promise<T>|PromiseWithState<T>} promise\n * @return {PromiseWithState<T>}\n */\nfunction makePromiseState(promise) {\n\t// Don't modify any promise that has been already modified.\n\tif (promise.getIsPending) return promise\n\n\t// Set initial state\n\tlet isPending = true\n\n\t// Observe the promise, saving the fulfillment in a closure scope.\n\tconst result = promise.then(\n\t\t(v) => {\n\t\t\tisPending = false\n\t\t\treturn v\n\t\t},\n\t\t(e) => {\n\t\t\tisPending = false\n\t\t\tthrow e\n\t\t}\n\t)\n\n\tresult.getIsPending = () => isPending\n\n\treturn result\n}\n","<template>\n\t<inline-svg\n\t\t:class=\"['q-icon', 'q-icon__svg', props.class]\"\n\t\t:src=\"props.bundle\"\n\t\t:symbol=\"props.icon\"\n\t\t:style=\"iconStyle\"\n\t\t@loaded=\"onLoaded\"\n\t\t@unloaded=\"onUnloaded\" />\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport InlineSvg from './InlineSvg.js'\n\n\t// Utils\n\timport { computed } from 'vue'\n\n\tconst props = withDefaults(\n\t\tdefineProps<{\n\t\t\t/**\n\t\t\t * The identifier of the SVG.\n\t\t\t */\n\t\t\ticon: string\n\n\t\t\t/**\n\t\t\t * The name of the SVG bundle.\n\t\t\t */\n\t\t\tbundle?: string\n\n\t\t\t/**\n\t\t\t * The size of the icon, in pixels.\n\t\t\t */\n\t\t\tsize?: number\n\n\t\t\t/**\n\t\t\t * Custom set of classes to apply to the component.\n\t\t\t */\n\t\t\tclass?: string | unknown[]\n\t\t}>(),\n\t\t{\n\t\t\tbundle: '',\n\t\t\tsize: undefined,\n\t\t\tclass: undefined\n\t\t}\n\t)\n\n\tconst emit = defineEmits<{\n\t\t(e: 'loaded', value: Element): void\n\t\t(e: 'unloaded'): void\n\t}>()\n\n\tconst iconStyle = computed(() => {\n\t\treturn {\n\t\t\t'font-size': props.size !== undefined ? `${props.size}px` : undefined\n\t\t}\n\t})\n\n\tfunction onLoaded(event: Element) {\n\t\temit('loaded', event)\n\t}\n\n\tfunction onUnloaded() {\n\t\temit('unloaded')\n\t}\n</script>\n","// Components\nimport _QIcon from './QIcon.vue'\nimport _QIconFont from './QIconFont.vue'\nimport _QIconImg from './QIconImg.vue'\nimport _QIconSvg from './QIconSvg.vue'\n\n// Types\nimport type { Icon } from './QIcon.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QIcon = setupPropsProxy(_QIcon) as typeof _QIcon\nconst QIconFont = setupPropsProxy(_QIconFont) as typeof _QIconFont\nconst QIconImg = setupPropsProxy(_QIconImg) as typeof _QIconImg\nconst QIconSvg = setupPropsProxy(_QIconSvg) as typeof _QIconSvg\n\n// Export components\nexport { QIcon, QIconFont, QIconImg, QIconSvg }\n\n// Export types\nexport type { Icon }\n","<template>\n\t<component\n\t\t:is=\"listTag\"\n\t\tref=\"listRef\"\n\t\t:class=\"['q-list', { 'q-list--disabled': props.disabled }, props.class]\"\n\t\trole=\"listbox\"\n\t\t:tabindex=\"props.disabled ? -1 : 0\"\n\t\t@focus=\"onFocus\"\n\t\t@mousedown=\"onMouseDown\"\n\t\t@mouseup=\"onMouseUp\"\n\t\t@keydown=\"onKeyDown\">\n\t\t<q-list-item-group\n\t\t\tv-for=\"group in groups\"\n\t\t\t:key=\"group.id\"\n\t\t\t:id=\"group.id\"\n\t\t\t:title=\"groups.length === 1 ? undefined : group.title\">\n\t\t\t<q-list-item\n\t\t\t\tv-for=\"item in getGroupItems(group.id)\"\n\t\t\t\t:key=\"item[props.itemValue]\"\n\t\t\t\t:value=\"item[props.itemValue]\"\n\t\t\t\t:label=\"item[props.itemLabel]\"\n\t\t\t\t:icon=\"item.icon\"\n\t\t\t\t:disabled=\"props.disabled || group.disabled || item.disabled\"\n\t\t\t\t:highlighted=\"props.highlighted === item[props.itemValue]\"\n\t\t\t\t:selected=\"model === item[props.itemValue]\"\n\t\t\t\t@select=\"onItemSelect\">\n\t\t\t\t<slot\n\t\t\t\t\tname=\"item\"\n\t\t\t\t\t:item=\"item\">\n\t\t\t\t</slot>\n\t\t\t</q-list-item>\n\t\t</q-list-item-group>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QListItem, QListItemGroup } from '.'\n\n\t// Types\n\timport type { Primitive } from '@/types/primitive'\n\timport type { ModelRef } from 'vue'\n\timport type { QListItemGroupProps, QListItemProps } from '.'\n\n\t// Utils\n\timport { computed, ref } from 'vue'\n\n\ttype Item = Omit<QListItemProps, 'value' | 'label'> & {\n\t\t// allow custom properties\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t[key: string]: any\n\t}\n\n\ttype Group = QListItemGroupProps & {\n\t\t/**\n\t\t * Whether the entire item group is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\t}\n\n\texport type QListProps = {\n\t\t/**\n\t\t * The value of the currently highlighted item.\n\t\t */\n\t\thighlighted?: Primitive\n\n\t\t/**\n\t\t * The list of available items for selection.\n\t\t */\n\t\titems: Item[]\n\n\t\t/**\n\t\t * The item groups used for organizing the available items.\n\t\t */\n\t\tgroups?: Group[]\n\n\t\t/**\n\t\t * The property of each item object that holds its value.\n\t\t */\n\t\titemValue?: string\n\n\t\t/**\n\t\t * The property of each item object that holds its title.\n\t\t */\n\t\titemLabel?: string\n\n\t\t/**\n\t\t * Indicates whether the list is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QListProps>(), {\n\t\thighlighted: undefined,\n\t\tgroups: () => [],\n\t\titemValue: 'key',\n\t\titemLabel: 'label',\n\t\tclass: undefined\n\t})\n\n\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t//@ts-ignore defineModel ignores TS types #9587\n\tconst model = defineModel({\n\t\ttype: [String, Number, Boolean, Symbol]\n\t}) as ModelRef<Primitive | undefined, string>\n\t//const model = defineModel<Primitive>()\n\n\tconst clicking = ref(false)\n\n\tconst listTag = computed(() => (groups.value.length > 1 ? 'div' : 'ul'))\n\tconst groups = computed<Group[]>(() => {\n\t\tif (props.groups.length) {\n\t\t\t// Ensure groups without items are not displayed.\n\t\t\treturn props.groups.filter((group) =>\n\t\t\t\tprops.items.some((item) => item.group === group.id)\n\t\t\t)\n\t\t}\n\n\t\t// Generate a default group without title\n\t\treturn [{ id: '', title: '' }]\n\t})\n\n\t// Template refs\n\tconst listRef = ref<HTMLElement | null>(null)\n\n\t/**\n\t * Handles the selection of a new value for the component.\n\t *\n\t * @param newVal - The new value to be selected.\n\t */\n\tfunction onItemSelect(newVal: Primitive): void {\n\t\tmodel.value = newVal\n\t}\n\n\t/**\n\t * Handles the 'mousedown' event.\n\t */\n\tfunction onMouseDown() {\n\t\tclicking.value = true\n\t}\n\n\t/**\n\t * Handles the 'mouseup' event.\n\t */\n\tfunction onMouseUp() {\n\t\tclicking.value = false\n\t}\n\n\t/**\n\t * Handles the 'focus' event and focuses on the appropriate item within the list.\n\t *\n\t * @param e - The FocusEvent representing the 'focus' event.\n\t */\n\tfunction onFocus(e: FocusEvent): void {\n\t\t// // If the focus event is triggered from within the list, do nothing.\n\t\tif (listRef.value?.contains(e.relatedTarget as Node)) {\n\t\t\treturn\n\t\t}\n\n\t\tlet targetIdx: number\n\n\t\t// Determine the target index based on the current value and the 'itemValue' prop.\n\t\tif (model.value) {\n\t\t\ttargetIdx = props.items.findIndex((item) => item[props.itemValue] === model.value)\n\t\t} else {\n\t\t\ttargetIdx = getFirstFocusableItemIndex()\n\t\t}\n\n\t\t// Scrolling on focus should be prevented\n\t\t// if user is currently something on the list.\n\t\tconst preventScroll = clicking.value\n\n\t\tfocusItem(targetIdx, preventScroll)\n\t}\n\n\t/**\n\t * Handles the 'keydown' event on the list\n\t * and performs actions based on the pressed key.\n\t *\n\t * @param e - The KeyboardEvent representing the keydown event.\n\t */\n\tfunction onKeyDown(e: KeyboardEvent): void {\n\t\tif (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {\n\t\t\te.preventDefault()\n\t\t}\n\n\t\tswitch (e.key) {\n\t\t\tcase 'ArrowDown':\n\t\t\t\tfocus('next')\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\tfocus('prev')\n\t\t\t\tbreak\n\t\t\tcase 'Home':\n\t\t\t\tfocus('first')\n\t\t\t\tbreak\n\t\t\tcase 'End':\n\t\t\t\tfocus('last')\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Sets focus on a specific HTML element based on the provided direction:\n\t *\n\t * - 'next': Focuses on the next focusable item.\n\t * - 'prev': Focuses on the previous focusable item.\n\t * - 'first': Focuses on the first focusable item.\n\t * - 'last': Focuses on the last focusable item.\n\t *\n\t * If the direction is not provided or is not recognized, no action is taken.\n\t *\n\t * @param direction - The direction in which to set focus ('next', 'prev', 'first', or 'last').\n\t */\n\tfunction focus(direction?: 'next' | 'prev' | 'first' | 'last'): void {\n\t\tswitch (direction) {\n\t\t\tcase 'next':\n\t\t\tcase 'prev':\n\t\t\t\tfocusItem(getActiveAdjacentItemIndex(direction))\n\t\t\t\tbreak\n\t\t\tcase 'first':\n\t\t\t\tfocusItem(getFirstFocusableItemIndex())\n\t\t\t\tbreak\n\t\t\tcase 'last':\n\t\t\t\tfocusItem(getLastFocusableItemIndex())\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Focuses on the HTML element at the specified index among the child elements.\n\t *\n\t * If the index is out of bounds or the element is inaccessible, no action is taken.\n\t *\n\t * @param itemIdx - The index of the HTML element to focus on.\n\t */\n\tfunction focusItem(itemIdx: number, preventScroll: boolean = false): void {\n\t\tconst children = getItems()\n\t\tchildren[itemIdx]?.focus({ preventScroll })\n\t}\n\n\t/**\n\t * Retrieves an array of child elements from a reference to a list element.\n\t *\n\t * If no child elements are found, an empty array is returned.\n\t *\n\t * @returns An array of HTMLElements representing the child elements, or an empty array if none are found.\n\t */\n\tfunction getItems(): HTMLElement[] {\n\t\tconst nodes = listRef.value?.querySelectorAll('li')\n\n\t\tif (!nodes) {\n\t\t\treturn []\n\t\t}\n\n\t\treturn Array.from(nodes) as HTMLElement[]\n\t}\n\n\tfunction getItem(idx: number): HTMLElement | undefined {\n\t\tconst items = getItems()\n\n\t\treturn items[idx]\n\t}\n\n\t/**\n\t * Retrieves the index of the currently active item among the provided array of HTML elements.\n\t *\n\t * @returns The index of the currently active item, or -1 if no active item is found.\n\t */\n\tfunction getActiveItemIndex(): number {\n\t\tconst items = getItems()\n\n\t\treturn items.indexOf(document.activeElement as HTMLElement)\n\t}\n\n\t/**\n\t * Retrieves the index of the first focusable item among the child elements.\n\t *\n\t * If no focusable item is found, it returns -1.\n\t *\n\t * @returns The index of the first focusable item or -1 if no focusable item is found.\n\t */\n\tfunction getFirstFocusableItemIndex(): number {\n\t\tconst items = getItems()\n\n\t\t// Find the first focusable item\n\t\tconst firstFocusableItem = items.find((item) => isFocusable(item))\n\n\t\treturn firstFocusableItem ? items.indexOf(firstFocusableItem) : -1\n\t}\n\n\t/**\n\t * Retrieves the index of the last focusable item among the child elements.\n\t *\n\t * If no focusable item is found, it returns -1.\n\t *\n\t * @returns The index of the last focusable item or -1 if no focusable item is found.\n\t */\n\tfunction getLastFocusableItemIndex(): number {\n\t\tconst items = getItems()\n\n\t\t// Reverse the array and find the last focusable item\n\t\tconst lastFocusableItem = [...items].reverse().find((item) => isFocusable(item))\n\n\t\treturn lastFocusableItem ? items.indexOf(lastFocusableItem) : -1\n\t}\n\n\t/**\n\t * Checks if the specified index is at the edge of the item list in the given direction.\n\t *\n\t * If the direction is 'prev', the function checks if the index is at the beginning of the list.\n\t * If the direction is 'next', the function checks if the index is at the end of the list.\n\t *\n\t * @param idx - The index to check.\n\t * @param direction - The direction in which to check the edge ('next' or 'prev').\n\t * @param items - The array of HTML elements representing the items.\n\t * @returns `true` if the index is at the edge in the specified direction, otherwise `false`.\n\t */\n\tfunction atTheEdge(idx: number, direction: 'next' | 'prev', items: HTMLElement[]): boolean {\n\t\treturn (\n\t\t\t(direction === 'prev' && idx === 0) ||\n\t\t\t(direction === 'next' && idx === items.length - 1)\n\t\t)\n\t}\n\n\t/**\n\t * Retrieves the index of the adjacent focusable item based on the specified direction\n\t * and currently active item.\n\t *\n\t * If the direction is 'next', the function finds the index of the next focusable item.\n\t * If the direction is 'prev', the function finds the index of the previous focusable item.\n\t *\n\t * @param direction - The direction in which to find the adjacent item ('next' or 'prev').\n\t * @returns The index of the adjacent focusable item or the index of the active item if at the edge.\n\t */\n\tfunction getActiveAdjacentItemIndex(direction: 'next' | 'prev'): number {\n\t\tconst idx = getActiveItemIndex()\n\n\t\treturn getAdjacentItemIndex(idx, direction)\n\t}\n\n\t/**\n\t * Retrieves the index of the adjacent focusable item based on the specified direction.\n\t *\n\t * If the direction is 'next', the function finds the index of the next focusable item.\n\t * If the direction is 'prev', the function finds the index of the previous focusable item.\n\t *\n\t * @param direction - The direction in which to find the adjacent item ('next' or 'prev').\n\t * @returns The index of the adjacent focusable item or the index of the active item if at the edge.\n\t */\n\tfunction getAdjacentItemIndex(idx: number, direction: 'next' | 'prev'): number {\n\t\tconst items = getItems()\n\n\t\t// If at the edge, return the index of the active item\n\t\tif (atTheEdge(idx, direction, items)) {\n\t\t\treturn idx\n\t\t}\n\n\t\t// Find the index of the next or previous focusable item\n\t\tlet adjacentIdx = idx + (direction === 'next' ? 1 : -1)\n\n\t\t// Continue searching until a focusable item is found\n\t\twhile (!isFocusable(items[adjacentIdx])) {\n\t\t\t// If at the edge, return the index of the active item\n\t\t\tif (atTheEdge(adjacentIdx, direction, items)) {\n\t\t\t\treturn idx\n\t\t\t}\n\n\t\t\t// Move to the next or previous index\n\t\t\tadjacentIdx += direction === 'next' ? 1 : -1\n\t\t}\n\n\t\treturn adjacentIdx\n\t}\n\n\t/**\n\t * Determines whether a list item is focusable.\n\t *\n\t * @param item - The HTML element to be checked for focusability.\n\t * @returns True if the element is focusable, false otherwise.\n\t */\n\tfunction isFocusable(item: HTMLElement): boolean {\n\t\treturn item.tabIndex === -2\n\t}\n\n\t/**\n\t * Retrieves items from a group or returns all items if no group is specified.\n\t *\n\t * If a group is provided, the function filters items based on their group property.\n\t * If no group is specified, all items are returned.\n\t *\n\t * @param group - The name of the group to filter items by. If not provided, all items are returned.\n\t * @returns An array of items either belonging to the specified group or all items if no group is specified.\n\t */\n\tfunction getGroupItems(group?: string) {\n\t\tif (!group) {\n\t\t\t// If no group is specified, return all items\n\t\t\treturn props.items\n\t\t}\n\n\t\t// Filter items by the specified group\n\t\treturn props.items.filter((item) => item.group === group)\n\t}\n\n\tdefineExpose({\n\t\tfocusItem,\n\t\tgetItem,\n\t\tgetAdjacentItemIndex,\n\t\tgetFirstFocusableItemIndex,\n\t\tgetLastFocusableItemIndex\n\t})\n</script>\n","// Counter to keep track of the number of generated IDs\nlet counter = 0\n\n/**\n * Custom hook to generate unique IDs.\n *\n * @param [componentId] - Optional component-specific ID.\n * @returns - A unique ID.\n */\nexport function useId(componentId?: string): string {\n\treturn componentId ? componentId : `uid-${++counter}`\n}\n","<template>\n\t<li\n\t\t:id=\"id\"\n\t\t:data-key=\"props.value\"\n\t\trole=\"option\"\n\t\t:tabindex=\"props.disabled ? undefined : -2\"\n\t\t:class=\"[\n\t\t\t'q-list-item',\n\t\t\t{\n\t\t\t\t'q-list-item--disabled': props.disabled,\n\t\t\t\t'q-list-item--selected': props.selected,\n\t\t\t\t'q-list-item--highlighted': props.highlighted\n\t\t\t}\n\t\t]\"\n\t\t:aria-label=\"props.label\"\n\t\t:aria-selected=\"props.disabled ? undefined : props.selected\"\n\t\t@keydown=\"onKeyDown\"\n\t\t@click.stop.prevent=\"onSelect\">\n\t\t<slot>\n\t\t\t<q-icon\n\t\t\t\tv-if=\"props.icon\"\n\t\t\t\tv-bind=\"props.icon\" />\n\t\t\t{{ props.label }}\n\t\t</slot>\n\t\t<div class=\"q-list-item__check-container\">\n\t\t\t<q-icon\n\t\t\t\tv-if=\"props.selected\"\n\t\t\t\tv-bind=\"props.icons.check\"\n\t\t\t\tclass=\"q-list-item__check\" />\n\t\t</div>\n\t</li>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QIcon } from '@/components/QIcon'\n\n\t// Types\n\timport type { Icon } from '@/components/QIcon'\n\timport type { Primitive } from '@/types/primitive'\n\n\t// Utils\n\timport { useId } from '@/composables/uid'\n\n\texport type ListItem = {\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t[key: string]: any\n\t\ticon?: Icon\n\t\tselected?: boolean\n\t\tgroup?: string\n\t\tdisabled?: boolean\n\t}\n\n\texport type Icons = typeof DEFAULT_ICONS\n\n\texport type QListItemProps = {\n\t\t/**\n\t\t * The value of the item.\n\t\t */\n\t\tvalue: Primitive\n\n\t\t/**\n\t\t * The label of the item.\n\t\t */\n\t\tlabel: string\n\n\t\t/**\n\t\t * The icon of the item.\n\t\t */\n\t\ticon?: Icon\n\n\t\t/**\n\t\t * Whether this item is selected.\n\t\t */\n\t\tselected?: boolean\n\n\t\t/**\n\t\t * Whether this item is highlighted.\n\t\t */\n\t\thighlighted?: boolean\n\n\t\t/**\n\t\t * The icons of the component.\n\t\t */\n\t\ticons?: Icons\n\n\t\t/**\n\t\t * Whether the item is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\t}\n\n\tconst props = withDefaults(defineProps<QListItemProps>(), {\n\t\ticon: undefined,\n\t\ticons: () => DEFAULT_ICONS\n\t})\n\n\tconst emit = defineEmits<{\n\t\t(e: 'select', value: Primitive): void\n\t}>()\n\n\tconst id = useId()\n\n\tfunction onSelect() {\n\t\tif (!props.disabled) emit('select', props.value)\n\t}\n\n\tfunction onKeyDown(e: KeyboardEvent) {\n\t\tif (e.key === 'Tab') onSelect()\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t\tonSelect()\n\t\t}\n\t}\n</script>\n\n<script lang=\"ts\">\n\t// The default icons of the component.\n\tconst DEFAULT_ICONS: Record<string, Icon> = {\n\t\tcheck: {\n\t\t\ticon: 'check'\n\t\t}\n\t}\n</script>\n","<template>\n\t<ul\n\t\tclass=\"q-list-item-group\"\n\t\trole=\"group\"\n\t\t:data-key=\"props.id\"\n\t\t:aria-labelledby=\"props.title ? uid : undefined\">\n\t\t<li\n\t\t\tv-if=\"props.title\"\n\t\t\t:id=\"uid\"\n\t\t\tclass=\"q-list-item-group__title\"\n\t\t\trole=\"presentation\">\n\t\t\t{{ props.title }}\n\t\t</li>\n\t\t<slot></slot>\n\t</ul>\n</template>\n\n<script setup lang=\"ts\">\n\t// Composables\n\timport { useId } from '@/composables/uid'\n\n\texport type QListItemGroupProps = {\n\t\t/**\n\t\t * The id of the group.\n\t\t */\n\t\tid: string\n\n\t\t/**\n\t\t * The title of the group.\n\t\t */\n\t\ttitle?: string\n\t}\n\n\tconst props = withDefaults(defineProps<QListItemGroupProps>(), {\n\t\ttitle: ''\n\t})\n\n\tconst uid = useId()\n</script>\n","// Components\nimport _QList from './QList.vue'\nimport _QListItem from './QListItem.vue'\nimport _QListItemGroup from './QListItemGroup.vue'\n\n// Types\nimport type { QListProps } from './QList.vue'\nimport type { QListItemProps } from './QListItem.vue'\nimport type { QListItemGroupProps } from './QListItemGroup.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QList = setupPropsProxy(_QList) as typeof _QList\nconst QListItem = setupPropsProxy(_QListItem) as typeof _QListItem\nconst QListItemGroup = setupPropsProxy(_QListItemGroup) as typeof _QListItemGroup\n\n// Export components\nexport { QList, QListItem, QListItemGroup }\n\n// Export types\nexport type { QListProps, QListItemProps, QListItemGroupProps }\n","/**\n * Appearance of the overlay.\n */\nexport type Appearance = 'regular' | 'inverted'\n\n/**\n * Triggering mechanism for the overlay.\n */\nexport type Trigger = 'hover' | 'click' | 'manual'\n\n/**\n * Axis along which position adjustments are made.\n */\nexport type Axis = 'x' | 'y'\n\n/**\n * Side of the overlay, relative to the anchor element.\n */\nexport type Side = 'top' | 'bottom' | 'left' | 'right'\n\n/**\n * Alignment of the overlay, along the alignment axis.\n */\nexport type Alignment = 'start' | 'end'\n\n/**\n * Placement of the overlay.\n * It can be a single side or a combination of side and alignment.\n * Example: 'top', 'bottom-start', 'left-end', etc.\n */\nexport type Placement = Side | `${Side}-${Alignment}`\n\n/**\n * Coordinates interface representing the position of an element.\n */\nexport interface Coords {\n\tx: number\n\ty: number\n}\n\n/**\n * Options for computing the position of the overlay.\n */\nexport type ComputePositionOptions = {\n\t/**\n\t * The preferred placement of the overlay.\n\t */\n\tplacement?: Placement\n\n\t/**\n\t * The offset to fine-tune the positioning of the overlay relative to the anchor element.\n\t */\n\toffset?: number\n\n\t/**\n\t * Whether to compute the position of the overlay arrow.\n\t */\n\tarrow?: boolean\n}\n\n/**\n * Result of computing the position of the overlay.\n */\nexport interface ComputePositionResult {\n\t/**\n\t * The computed coordinates for the overlay.\n\t */\n\toverlayCoords: Coords\n\n\t/**\n\t * The computed coordinates for the arrow.\n\t */\n\tarrowCoords?: Partial<Coords>\n\n\t/**\n\t * The chosen placement of the overlay.\n\t */\n\tplacement: Placement\n}\n\n// The minimum gap between the overlay and the viewport.\nconst gap = 8\n\n/**\n * Computes the position of an overlay relative to an anchor element,\n * optionally positioning an arrow element as well.\n * @param anchorEl The anchor element to which the overlay is positioned relative.\n * @param overlayEl The overlay element whose position is being computed.\n * @param arrowEl Optional. The arrow element whose position is being computed, if any.\n * @param options Optional. Additional options for computing the position.\n * @returns An object containing the computed overlay coordinates, arrow coordinates (if applicable),\n * and the chosen placement.\n */\nexport function computePosition(\n\tanchorEl: Element,\n\toverlayEl: Element,\n\tarrowEl?: Element,\n\toptions?: ComputePositionOptions\n): ComputePositionResult {\n\tconst offsetAmount = options?.offset ?? 0\n\tconst preferredPlacement = options?.placement ?? 'bottom'\n\n\tconst anchorRect = anchorEl.getBoundingClientRect()\n\tconst overlayRect = overlayEl.getBoundingClientRect()\n\tconst arrowRect = arrowEl?.getBoundingClientRect()\n\n\t// Flip the placement of the overlay to keep it in view.\n\tconst placement = flip(anchorRect, overlayRect, preferredPlacement, offsetAmount)\n\n\t// Compute the base overlay coordinates based on the chosen placement.\n\tconst baseOverlayCoords = getCoordsFromPlacement(anchorRect, overlayRect, placement)\n\n\t// Apply offset to the base coordinates, affecting the main axis.\n\tconst offsetOverlayCoords = offset(baseOverlayCoords, placement, offsetAmount)\n\n\t// Shift the overlay along the alignment axis to keep it in view.\n\tconst overlayCoords = shift(offsetOverlayCoords, overlayRect, placement)\n\n\t// Dynamically position the arrow element.\n\tlet arrowCoords: Partial<Coords> | undefined = undefined\n\tif (options?.arrow) {\n\t\tif (!arrowRect)\n\t\t\tthrow new Error('[Quidgest UI] The arrow element must exist to compute its position')\n\n\t\tarrowCoords = arrow(overlayCoords, anchorRect, overlayRect, arrowRect, placement)\n\t}\n\n\treturn { overlayCoords, arrowCoords, placement }\n}\n\n/**\n * Flips the placement of the overlay if it overflows on the main axis.\n * @param anchorRect The bounding rectangle of the anchor element.\n * @param overlayRect The bounding rectangle of the overlay element.\n * @param placement The initial placement of the overlay relative to the anchor element.\n * @param offset The offset of the overlay relative to the anchor element.\n * @returns The adjusted placement to prevent overflow, if necessary.\n */\nfunction flip(\n\tanchorRect: DOMRect,\n\toverlayRect: DOMRect,\n\tplacement: Placement,\n\toffset: number\n): Placement {\n\tconst overflowResult = computeMainAxisOverflow(anchorRect, overlayRect, placement, offset)\n\n\tif (isOutOfBounds(overflowResult)) {\n\t\tconst side = getSideFromPlacement(placement)\n\n\t\tconst oppositeSideMap = {\n\t\t\ttop: 'bottom',\n\t\t\tbottom: 'top',\n\t\t\tleft: 'right',\n\t\t\tright: 'left'\n\t\t} as const\n\n\t\tconst oppositeSide = oppositeSideMap[side]\n\n\t\tconst oppositeSideOverflowResult = computeMainAxisOverflow(\n\t\t\tanchorRect,\n\t\t\toverlayRect,\n\t\t\toppositeSide,\n\t\t\toffset\n\t\t)\n\n\t\t// If the opposite side is also overflown, just use the preferred placement.\n\t\tif (isOutOfBounds(oppositeSideOverflowResult)) {\n\t\t\treturn placement\n\t\t}\n\n\t\t// Get the preferred alignment from the preferred placement.\n\t\tconst preferredAlignment = getAlignmentFromPlacement(placement)\n\n\t\treturn preferredAlignment ? `${oppositeSide}-${preferredAlignment}` : oppositeSide\n\t}\n\n\t// Original placement is fine, use it.\n\treturn placement\n}\n\n/**\n * Shifts the overlay to keep it in view.\n * @param coords - The initial coordinates of the overlay element.\n * @param overlayRect - The dimensions of the overlay element's bounding rectangle.\n * @param placement - The placement of the overlay relative to the anchor.\n * @returns The adjusted coordinates of the overlay element after shifting.\n */\nfunction shift(coords: Coords, overlayRect: DOMRect, placement: Placement): Coords {\n\t// Shift is only applied along the alignment axis.\n\tconst alignmentAxis = getAlignmentAxis(placement)\n\n\t// Helper function to clamp a value within a specified range.\n\tconst clamp = (value: number, min: number, max: number): number => {\n\t\treturn Math.min(Math.max(value, min), max)\n\t}\n\n\tconst shiftedCoords = { ...coords }\n\n\tif (alignmentAxis === 'x') {\n\t\tshiftedCoords.x = clamp(coords.x, gap, window.innerWidth - overlayRect.width - gap)\n\t} else {\n\t\tshiftedCoords.y = clamp(coords.y, gap, window.innerHeight - overlayRect.height - gap)\n\t}\n\n\treturn shiftedCoords\n}\n\n/**\n * Calculates new coordinates for the overlay based on the specified placement and offset.\n * @param coords - The initial coordinates of the overlay element.\n * @param placement - The placement of the overlay relative to the anchor.\n * @param offset - The offset of the overlay relative to the anchor.\n * @returns The adjusted coordinates of the element after applying the offset.\n */\nfunction offset(coords: Coords, placement: Placement, offset: number): Coords {\n\tconst side = getSideFromPlacement(placement)\n\n\treturn {\n\t\tx: coords.x + (side === 'left' ? -offset : side === 'right' ? offset : 0),\n\t\ty: coords.y + (side === 'top' ? -offset : side === 'bottom' ? offset : 0)\n\t}\n}\n\n/**\n * Calculates the position of the arrow of the overlay.\n * @param overlayCoords - The computed coordinates for the overlay.\n * @param anchorRect - The bounding rectangle of the anchor element.\n * @param overlayRect - The bounding rectangle of the overlay element.\n * @param arrowRect - The bounding rectangle of the arrow element.\n * @param placement - The placement of the overlay relative to the anchor.\n * @returns An object with the position or undefined if arrow cannot be positioned.\n */\nfunction arrow(\n\toverlayCoords: Coords,\n\tanchorRect: DOMRect,\n\toverlayRect: DOMRect,\n\tarrowRect: DOMRect,\n\tplacement: Placement\n): Partial<Coords> | undefined {\n\tconst axis = getAlignmentAxis(placement)\n\n\tif (axis === 'y') {\n\t\tconst anchorCenter = anchorRect.top + anchorRect.height / 2,\n\t\t\toverlayCenter = overlayCoords.y + overlayRect.height / 2,\n\t\t\tdiff = overlayCenter - anchorCenter\n\n\t\t// + 2 to compensate for the borders\n\t\tconst y = overlayRect.height / 2 - diff - arrowRect.height / 2 + 2\n\n\t\tif (y > 0 && y < overlayRect.height - arrowRect.height) {\n\t\t\treturn {\n\t\t\t\ty\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst anchorCenter = anchorRect.left + anchorRect.width / 2,\n\t\t\toverlayCenter = overlayCoords.x + overlayRect.width / 2,\n\t\t\tdiff = overlayCenter - anchorCenter\n\n\t\t// + 2 to compensate for the borders\n\t\tconst x = overlayRect.width / 2 - diff - arrowRect.width / 2 + 2\n\n\t\tif (x > 0 && x < overlayRect.width - arrowRect.width) {\n\t\t\treturn {\n\t\t\t\tx\n\t\t\t}\n\t\t}\n\t}\n\n\t// Not possible to display the arrow.\n\treturn undefined\n}\n\n/**\n * Calculates the coordinates of the overlay based on the anchor element and placement.\n * @param anchorRect The bounding rectangle of the anchor element.\n * @param overlayRect The bounding rectangle of the overlay element.\n * @param placement The placement of the overlay relative to the anchor element.\n * @returns The coordinates (x, y) of the overlay.\n * @throws Error if an invalid placement value is provided.\n */\nfunction getCoordsFromPlacement(\n\tanchorRect: DOMRect,\n\toverlayRect: DOMRect,\n\tplacement: Placement\n): Coords {\n\tconst [side, alignment] = placement.split('-') as [Side, Alignment?]\n\n\t// Computes to alignment = middle\n\tconst commonX = anchorRect.x + anchorRect.width / 2 - overlayRect.width / 2\n\tconst commonY = anchorRect.y + anchorRect.height / 2 - overlayRect.height / 2\n\n\tlet coords: Coords\n\tswitch (side) {\n\t\tcase 'top':\n\t\t\tcoords = { x: commonX, y: anchorRect.y - overlayRect.height }\n\t\t\tbreak\n\t\tcase 'bottom':\n\t\t\tcoords = { x: commonX, y: anchorRect.y + anchorRect.height }\n\t\t\tbreak\n\t\tcase 'left':\n\t\t\tcoords = { x: anchorRect.x - overlayRect.width, y: commonY }\n\t\t\tbreak\n\t\tcase 'right':\n\t\t\tcoords = { x: anchorRect.x + anchorRect.width, y: commonY }\n\t\t\tbreak\n\t\tdefault:\n\t\t\tthrow new Error(`[Quidgest UI] Invalid placement value: ${placement}`)\n\t}\n\n\tif (!alignment) {\n\t\treturn coords\n\t}\n\n\tconst isVertical = getAlignmentAxis(placement) === 'y'\n\tconst alignLength = isVertical ? 'height' : 'width'\n\tconst alignmentAxis = getAlignmentAxis(placement)\n\tconst commonAlign = anchorRect[alignLength] / 2 - overlayRect[alignLength] / 2\n\n\tswitch (alignment) {\n\t\tcase 'start':\n\t\t\tcoords[alignmentAxis] -= commonAlign\n\t\t\tbreak\n\t\tcase 'end':\n\t\t\tcoords[alignmentAxis] += commonAlign\n\t\t\tbreak\n\t\tdefault:\n\t\t\tthrow new Error(`[Quidgest UI] Invalid alignment value: ${alignment}`)\n\t}\n\n\treturn coords\n}\n\n/**\n * Computes the overflow along the main axis for the overlay.\n * @param anchorRect - The bounding rectangle of the anchor element.\n * @param overlayRect - The bounding rectangle of the overlay element.\n * @param placement - The placement of the overlay relative to the anchor element.\n * @param offset - The offset of the overlay relative to the anchor.\n * @returns The overflow along the main axis. Negative value indicates overflow, while zero or positive value indicates no overflow.\n * @throws Error if the provided placement contains an invalid side value.\n */\nfunction computeMainAxisOverflow(\n\tanchorRect: DOMRect,\n\toverlayRect: DOMRect,\n\tplacement: Placement,\n\toffset: number\n) {\n\tconst side = getSideFromPlacement(placement)\n\n\tlet oob = 0\n\tswitch (side) {\n\t\tcase 'top':\n\t\t\toob = anchorRect.top - (overlayRect.height + offset)\n\t\t\tbreak\n\t\tcase 'bottom':\n\t\t\toob = window.innerHeight - anchorRect.bottom - (overlayRect.height + offset)\n\t\t\tbreak\n\t\tcase 'left':\n\t\t\toob = anchorRect.left - (overlayRect.width + offset)\n\t\t\tbreak\n\t\tcase 'right':\n\t\t\toob = window.innerWidth - anchorRect.right - (overlayRect.width + offset)\n\t\t\tbreak\n\t\tdefault:\n\t\t\tthrow new Error(`[Quidgest UI] Invalid side value: ${side}`)\n\t}\n\n\treturn oob\n}\n\n/** Utilities */\n\n/**\n * Returns the opposite axis of the given axis.\n * @param axis - The axis ('x' or 'y').\n * @returns The opposite axis ('y' if 'x' is given, and vice versa).\n */\nexport function getOppositeAxis(axis: Axis): Axis {\n\treturn axis === 'x' ? 'y' : 'x'\n}\n\n/**\n * Returns the main axis based on the placement.\n * @param placement - The placement of the overlay relative to the anchor.\n * @returns The main axis ('x' if placement is 'left' or 'right', otherwise 'y').\n */\nexport function getMainAxis(placement: Placement): Axis {\n\tconst side = getSideFromPlacement(placement)\n\treturn ['left', 'right'].includes(side) ? 'x' : 'y'\n}\n\n/**\n * Returns the alignment axis based on the placement.\n * @param placement - The placement of the overlay relative to the anchor.\n * @returns The alignment axis ('x' if main axis is 'y', and vice versa).\n */\nexport function getAlignmentAxis(placement: Placement): Axis {\n\treturn getOppositeAxis(getMainAxis(placement))\n}\n\n/**\n * Returns the side from the given placement.\n * @param placement - The placement of the overlay relative to the anchor.\n * @returns The side ('top', 'bottom', 'left', or 'right').\n */\nexport function getSideFromPlacement(placement: Placement): Side {\n\tconst [side] = placement.split('-') as [Side, Alignment?]\n\treturn side\n}\n\n/**\n * Returns the alignment from the given placement.\n * @param placement - The placement of the overlay relative to the anchor.\n * @returns The alignment ('start' or 'end') or undefined if not present.\n */\nexport function getAlignmentFromPlacement(placement: Placement): Alignment | undefined {\n\tconst [, alignment] = placement.split('-') as [Side, Alignment?]\n\treturn alignment\n}\n\n/**\n * Checks if the provided overflow result is out of bounds.\n * @param overflowResult The result of an overflow calculation.\n * @returns A boolean indicating whether the overflow result is out of bounds (true) or not (false).\n */\nexport function isOutOfBounds(overflowResult: number): boolean {\n\treturn overflowResult < 0\n}\n","export type Selector = string | HTMLElement\n\n/**\n * Gets a DOM element based on the provided selector.\n */\nexport function getElement(selector: Selector): HTMLElement | null {\n\tif (typeof selector === 'string')\n\t\t// Selector\n\t\treturn document.querySelector(selector)\n\t// HTMLElement\n\treturn selector\n}\n","<template>\n\t<teleport\n\t\t:disabled=\"(!model && !state.animating) || !props.attach\"\n\t\t:to=\"props.attach\">\n\t\t<div\n\t\t\tv-if=\"showUnderlay\"\n\t\t\t:class=\"[\n\t\t\t\t'q-overlay__underlay',\n\t\t\t\t{ 'q-overlay__underlay--blur': props.backdropBlur }\n\t\t\t]\"></div>\n\t\t<transition\n\t\t\t:name=\"props.transition\"\n\t\t\tappear\n\t\t\t@leave=\"onLeave\">\n\t\t\t<div\n\t\t\t\tv-if=\"model\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"overlayStyle\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"q-overlay__content\"\n\t\t\t\t\tref=\"overlayRef\"\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t:role=\"showUnderlay ? 'dialog' : undefined\"\n\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t@keydown.escape=\"onUserDismiss\"\n\t\t\t\t\t@blur=\"onUserDismiss\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"props.arrow\"\n\t\t\t\t\t\tref=\"arrowRef\"\n\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\tclass=\"q-overlay__arrow\"\n\t\t\t\t\t\t:style=\"arrowStyle\"></div>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</transition>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\n\t// Composables\n\timport { computePosition, getSideFromPlacement } from '@/composables/overlay'\n\n\t// Types\n\timport type { Appearance, Placement, Trigger } from '@/composables/overlay'\n\timport type { Selector } from '@/utils/getElement'\n\n\t// Utils\n\timport { getElement } from '@/utils/getElement'\n\timport { computed, nextTick, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue'\n\n\texport type QOverlayProps = {\n\t\t/**\n\t\t * The DOM element the overlay should be anchored to.\n\t\t */\n\t\tanchor?: Selector\n\n\t\t/**\n\t\t * The appearance of the overlay.\n\t\t * 'regular' uses body text color for background and body background color for text.\n\t\t * 'inverted' matches body color scheme.\n\t\t */\n\t\tappearance?: Appearance\n\n\t\t/**\n\t\t * Whether the overlay has an arrow pointing to the target.\n\t\t */\n\t\tarrow?: boolean\n\n\t\t/**\n\t\t * The DOM element the overlay should be teleported to.\n\t\t * Defaults to the body of the document.\n\t\t */\n\t\tattach?: string\n\n\t\t/**\n\t\t * Applies a backdrop blur effect behind the overlay.\n\t\t */\n\t\tbackdropBlur?: boolean\n\n\t\t/**\n\t\t * The delay in milliseconds before showing the overlay.\n\t\t */\n\t\tdelay?: number\n\n\t\t/**\n\t\t * Whether elements outside of the overlay can be interacted with.\n\t\t * Should be used with care and only in certain components, such as comboboxes,\n\t\t * with proper handling of the `focusout` event.\n\t\t */\n\t\tnonModal?: boolean\n\n\t\t/**\n\t\t * Whether to prevent scrolling while the overlay is open.\n\t\t */\n\t\tscrollLock?: boolean\n\n\t\t/**\n\t\t * Offset the overlay in the given amount of pixels.\n\t\t */\n\t\toffset?: number\n\n\t\t/**\n\t\t * If enabled, deactivation of the element will not occur upon clicking outside\n\t\t * or pressing the escape key.\n\t\t */\n\t\tpersistent?: boolean\n\n\t\t/**\n\t\t * The placement of the overlay.\n\t\t */\n\t\tplacement?: Placement\n\n\t\t/**\n\t\t * Whether to spy on the real-time position of the anchor,\n\t\t * to keep the position of the overlay up-to-date at all times.\n\t\t */\n\t\tspy?: boolean\n\n\t\t/**\n\t\t * The name of the transition to apply.\n\t\t */\n\t\ttransition?: string\n\n\t\t/**\n\t\t * The method to trigger the overlay.\n\t\t */\n\t\ttrigger?: Trigger\n\n\t\t/**\n\t\t * The width of the overlay.\n\t\t * Either is automatic, based on the overlay content,\n\t\t * or matches the overlay's anchor.\n\t\t */\n\t\twidth?: 'auto' | 'anchor'\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QOverlayProps>(), {\n\t\tanchor: undefined,\n\t\tappearance: 'regular',\n\t\tattach: 'body',\n\t\tdelay: 500,\n\t\toffset: 8,\n\t\tplacement: 'right',\n\t\ttransition: 'fade',\n\t\ttrigger: 'click',\n\t\twidth: 'auto',\n\t\tclass: undefined\n\t})\n\n\tconst emit = defineEmits<{\n\t\t(e: 'enter'): void\n\t\t(e: 'leave'): void\n\t}>()\n\n\tconst model = defineModel<boolean>()\n\n\tconst classes = computed(() => {\n\t\tconst side = getSideFromPlacement(state.placement)\n\t\treturn [\n\t\t\t'q-overlay',\n\t\t\t`q-overlay--${side}`,\n\t\t\t{\n\t\t\t\t'q-overlay--independent': props.anchor === undefined,\n\t\t\t\t'q-overlay--inverted': props.appearance === 'inverted'\n\t\t\t},\n\t\t\tprops.class\n\t\t]\n\t})\n\n\tconst showUnderlay = computed(() => (model.value || state.animating) && !props.nonModal)\n\n\tconst state = reactive({\n\t\tanimating: false,\n\t\ttop: 0,\n\t\tleft: 0,\n\t\twidth: 0 as number | undefined,\n\t\tplacement: props.placement\n\t})\n\n\tconst arrowState = reactive({\n\t\ttop: undefined as number | undefined,\n\t\tleft: undefined as number | undefined,\n\t\thidden: true\n\t})\n\n\tconst isReady = computed(() => state.top !== 0 && state.left !== 0)\n\n\twatch(model, () => (state.animating = true))\n\n\tconst overlayStyle = computed(() => {\n\t\tif (props.anchor === undefined) return undefined\n\n\t\tconst target = getAnchorElement(),\n\t\t\tmatchWidth = props.width === 'anchor',\n\t\t\twidth = matchWidth ? target?.getBoundingClientRect().width : undefined\n\n\t\treturn {\n\t\t\ttop: `${state.top}px`,\n\t\t\tleft: `${state.left}px`,\n\t\t\twidth: width !== undefined ? `${width}px` : undefined\n\t\t}\n\t})\n\n\tconst arrowStyle = computed(() => {\n\t\tif (!props.arrow) return undefined\n\n\t\treturn {\n\t\t\ttop: arrowState.top !== undefined ? `${arrowState.top}px` : undefined,\n\t\t\tleft: arrowState.left !== undefined ? `${arrowState.left}px` : undefined,\n\t\t\topacity: arrowState.hidden ? 0 : 1\n\t\t}\n\t})\n\n\t// Template refs\n\tconst arrowRef = ref<HTMLElement | null>(null)\n\tconst overlayRef = ref<HTMLElement | null>(null)\n\n\t/**\n\t * Reposition the overlay based on its size and the position of its anchor.\n\t */\n\tfunction repositionOverAnchor() {\n\t\tconst target = getAnchorElement()\n\n\t\t// Both target and overlay must be visible in order to reposition\n\t\tif (!target || !overlayRef.value) {\n\t\t\treturn\n\t\t}\n\n\t\tconst options = {\n\t\t\tplacement: props.placement,\n\t\t\twidth: props.width,\n\t\t\toffset: props.offset,\n\t\t\tarrow: props.arrow\n\t\t}\n\n\t\tconst result = computePosition(\n\t\t\ttarget,\n\t\t\toverlayRef.value,\n\t\t\tarrowRef?.value ?? undefined,\n\t\t\toptions\n\t\t)\n\n\t\tstate.left = result.overlayCoords.x\n\t\tstate.top = result.overlayCoords.y\n\t\tstate.placement = result.placement\n\n\t\tarrowState.hidden = result.arrowCoords === undefined\n\t\tif (result.arrowCoords) {\n\t\t\tarrowState.top = result.arrowCoords.y\n\t\t\tarrowState.left = result.arrowCoords.x\n\t\t}\n\t}\n\n\t// Setup reaction to changes in the position of the target element\n\twatch(\n\t\t() => props.placement,\n\t\t() => nextTick(repositionOverAnchor)\n\t)\n\n\t// Handle show/hide with the specified delay\n\tlet timeoutId: number | undefined = undefined\n\n\t/**\n\t * Show with a delay of 0.\n\t */\n\tfunction immediateShow() {\n\t\tshow(0)\n\t}\n\n\t/**\n\t * Show with the specified delay.\n\t */\n\tfunction delayedShow() {\n\t\tshow(props.delay)\n\t}\n\n\t/**\n\t * Show with a specified delay.\n\t * @param delay - The delay in milliseconds.\n\t */\n\tfunction show(delay: number) {\n\t\tif (!timeoutId) {\n\t\t\ttimeoutId = window.setTimeout(() => {\n\t\t\t\tmodel.value = true\n\t\t\t}, delay)\n\t\t}\n\t}\n\n\tfunction hide() {\n\t\tclearTimeout(timeoutId)\n\t\ttimeoutId = undefined\n\n\t\tmodel.value = false\n\n\t\tif (props.anchor && props.trigger === 'click') {\n\t\t\tconst el = getAnchorElement()\n\t\t\tel?.focus()\n\t\t}\n\t}\n\n\twatch(isReady, () => nextTick(onEnter))\n\n\tfunction onEnter() {\n\t\temit('enter')\n\t}\n\n\tlet animationTimeoutId: number | undefined = undefined\n\n\tfunction onLeave() {\n\t\twindow.clearTimeout(animationTimeoutId)\n\t\tanimationTimeoutId = window.setTimeout(() => (state.animating = false), 200)\n\n\t\temit('leave')\n\t}\n\n\tfunction getAnchorElement(): HTMLElement | null {\n\t\tif (!props.anchor) return null\n\n\t\treturn getElement(props.anchor)\n\t}\n\n\tlet observer: MutationObserver | undefined = undefined\n\n\tfunction addAnchorListeners() {\n\t\tconst anchor = getAnchorElement()\n\t\tif (!anchor) return\n\n\t\t// Observer to detect changes in the overlay target and reposition accordingly\n\t\tobserver = new MutationObserver(repositionOverAnchor)\n\t\tobserver.observe(anchor, {\n\t\t\tattributes: false,\n\t\t\tchildList: true,\n\t\t\tcharacterData: true,\n\t\t\tsubtree: true\n\t\t})\n\n\t\tswitch (props.trigger) {\n\t\t\tcase 'click':\n\t\t\t\tanchor.addEventListener('click', immediateShow)\n\t\t\t\tbreak\n\t\t\tcase 'hover':\n\t\t\t\tanchor.addEventListener('mouseenter', delayedShow)\n\t\t\t\tanchor.addEventListener('mouseleave', hide)\n\t\t\t\tanchor.addEventListener('focusin', immediateShow)\n\t\t\t\tanchor.addEventListener('focusout', hide)\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction removeAnchorListeners() {\n\t\tconst anchor = getAnchorElement()\n\t\tif (!anchor) return\n\n\t\tobserver?.disconnect()\n\n\t\tswitch (props.trigger) {\n\t\t\tcase 'click':\n\t\t\t\tanchor.removeEventListener('click', immediateShow)\n\t\t\t\tbreak\n\t\t\tcase 'hover':\n\t\t\t\tanchor.removeEventListener('mouseenter', delayedShow)\n\t\t\t\tanchor.removeEventListener('mouseleave', hide)\n\t\t\t\tanchor.removeEventListener('focusin', immediateShow)\n\t\t\t\tanchor.removeEventListener('focusout', hide)\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction addRepositionListeners() {\n\t\t// Handler to reposition overlay on window resize\n\t\twindow.addEventListener('resize', repositionOverAnchor)\n\t\tif (!props.scrollLock) window.addEventListener('scroll', repositionOverAnchor)\n\t}\n\n\tfunction removeRepositionListeners() {\n\t\twindow.removeEventListener('resize', repositionOverAnchor)\n\t\tif (!props.scrollLock) window.removeEventListener('scroll', repositionOverAnchor)\n\t}\n\n\tlet autoUpdateTimeoutId: number | undefined = undefined\n\n\tfunction autoUpdate() {\n\t\tconst anchor = getAnchorElement()\n\n\t\tif (anchor) {\n\t\t\t// Spy\n\t\t\trepositionOverAnchor()\n\n\t\t\t// Schedule next spy\n\t\t\tautoUpdateTimeoutId = window.setTimeout(autoUpdate, 100)\n\t\t} else {\n\t\t\t// Target was destroyed,\n\t\t\t// hide and destroy overlay as well\n\t\t\thide()\n\t\t}\n\t}\n\n\tfunction init() {\n\t\taddRepositionListeners()\n\n\t\tif (props.spy) {\n\t\t\tautoUpdate()\n\t\t} else {\n\t\t\trepositionOverAnchor()\n\t\t}\n\n\t\tif (props.scrollLock) {\n\t\t\tdocument.body.classList.add('no-scroll')\n\t\t}\n\n\t\tif (props.anchor === undefined || props.trigger === 'click') {\n\t\t\t// Must be done on nextTick to ensure DOM has the updated overlay position\n\t\t\tnextTick(() => overlayRef.value?.focus())\n\t\t}\n\t}\n\n\tfunction destroy() {\n\t\tremoveRepositionListeners()\n\n\t\tif (props.spy) {\n\t\t\tclearTimeout(autoUpdateTimeoutId)\n\t\t\tautoUpdateTimeoutId = undefined\n\t\t}\n\n\t\tif (props.scrollLock) {\n\t\t\tdocument.body.classList.remove('no-scroll')\n\t\t}\n\n\t\t// Resetting state will set isReady = false\n\t\tstate.top = 0\n\t\tstate.left = 0\n\t}\n\n\tfunction onUserDismiss() {\n\t\tif (props.persistent) return\n\n\t\thide()\n\t}\n\n\tonMounted(() => {\n\t\tnextTick(addAnchorListeners)\n\t})\n\n\tonBeforeUnmount(() => {\n\t\tremoveAnchorListeners()\n\t\tdestroy()\n\t})\n\n\twatch(\n\t\tmodel,\n\t\t(isVisible) => {\n\t\t\tnextTick(() => (isVisible ? init() : destroy()))\n\t\t},\n\t\t{ immediate: true }\n\t)\n\n\tdefineOptions({\n\t\tinheritAttrs: false\n\t})\n</script>\n","// Components\nimport _QOverlay from './QOverlay.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QOverlay = setupPropsProxy(_QOverlay) as typeof _QOverlay\n\n// Export components\nexport { QOverlay }\n","<template>\n\t<div\n\t\t:id=\"id\"\n\t\t:class=\"[\n\t\t\t'q-field',\n\t\t\t`q-field--${props.size}`,\n\t\t\t{\n\t\t\t\t'q-field--readonly': props.readonly,\n\t\t\t\t'q-field--disabled': props.disabled,\n\t\t\t\t'q-field--required': isRequired\n\t\t\t},\n\t\t\tprops.class\n\t\t]\">\n\t\t<div\n\t\t\tv-if=\"props.label\"\n\t\t\tclass=\"q-field__label\">\n\t\t\t<slot name=\"label.prepend\"></slot>\n\t\t\t<label :for=\"props.for\">\n\t\t\t\t{{ props.label }}\n\t\t\t</label>\n\t\t\t<slot name=\"label.append\"></slot>\n\t\t</div>\n\t\t<slot name=\"control\">\n\t\t\t<div\n\t\t\t\tclass=\"q-field__control\"\n\t\t\t\tref=\"fieldRef\"\n\t\t\t\tv-bind=\"$attrs\">\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"$slots.prepend\"\n\t\t\t\t\tclass=\"q-field__prepend\">\n\t\t\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"$slots.append\"\n\t\t\t\t\tclass=\"q-field__append\">\n\t\t\t\t\t<slot name=\"append\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</slot>\n\t\t<div\n\t\t\tv-if=\"$slots.extras\"\n\t\t\tclass=\"q-field__extras\">\n\t\t\t<slot name=\"extras\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\n\t// Composables\n\timport { useId } from '@/composables/uid'\n\n\t// Utils\n\timport { computed, ref } from 'vue'\n\n\texport type QFieldSize = 'mini' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'block'\n\n\texport type QFieldProps = {\n\t\t/**\n\t\t * The field unique identifier.\n\t\t */\n\t\tid?: string\n\n\t\t/**\n\t\t * The label of the input.\n\t\t */\n\t\tlabel?: string\n\n\t\t/**\n\t\t * The form field associated with the label.\n\t\t */\n\t\tfor?: string\n\n\t\t/**\n\t\t * The size category of the field.\n\t\t */\n\t\tsize?: QFieldSize\n\n\t\t/**\n\t\t * Whether the input is readonly.\n\t\t */\n\t\treadonly?: boolean\n\n\t\t/**\n\t\t * Whether the input is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * If set to true, an asterisk (*) is displayed\n\t\t * to indicate that the field is required.\n\t\t */\n\t\trequired?: boolean\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QFieldProps>(), {\n\t\tid: undefined,\n\t\tlabel: '',\n\t\tfor: undefined,\n\t\tsize: 'medium',\n\t\tclass: undefined\n\t})\n\n\tconst id = useId(props.id)\n\n\t// Template refs\n\tconst fieldRef = ref<HTMLElement | null>(null)\n\n\tconst isRequired = computed<boolean>(() => props.required && !props.readonly && !props.disabled)\n\n\tdefineExpose({\n\t\tfieldRef\n\t})\n\n\tdefineOptions({\n\t\tinheritAttrs: false\n\t})\n</script>\n","// Components\nimport _QField from './QField.vue'\n\nimport type { QFieldProps, QFieldSize } from './QField.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QField = setupPropsProxy(_QField) as typeof _QField\n\n// Export components\nexport { QField }\n\n// Export types\nexport type { QFieldProps, QFieldSize }\n","<template>\n\t<q-field\n\t\tref=\"fieldRef\"\n\t\t:class=\"['q-text-field', props.class]\"\n\t\t:for=\"id\"\n\t\t:label=\"props.label\"\n\t\t:size=\"props.size\"\n\t\t:readonly=\"props.readonly\"\n\t\t:disabled=\"props.disabled\"\n\t\t:required=\"props.required\">\n\t\t<template #label.prepend>\n\t\t\t<slot name=\"label.prepend\"></slot>\n\t\t</template>\n\t\t<template #label.append>\n\t\t\t<slot name=\"label.append\"></slot>\n\t\t</template>\n\t\t<template\n\t\t\tv-if=\"$slots.prepend\"\n\t\t\t#prepend>\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t</template>\n\t\t<input\n\t\t\tv-model=\"model\"\n\t\t\tref=\"inputRef\"\n\t\t\t:id=\"id\"\n\t\t\tclass=\"q-text-field__input\"\n\t\t\t:type=\"props.type\"\n\t\t\t:role=\"props.role\"\n\t\t\t:required=\"props.required\"\n\t\t\t:placeholder=\"placeholder\"\n\t\t\t:readonly=\"props.readonly\"\n\t\t\t:disabled=\"props.disabled\"\n\t\t\t:maxlength=\"props.maxLength\"\n\t\t\tv-bind=\"$attrs\" />\n\t\t<template\n\t\t\tv-if=\"$slots.append\"\n\t\t\t#append>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</template>\n\t\t<template\n\t\t\tv-if=\"$slots.extras\"\n\t\t\t#extras>\n\t\t\t<slot name=\"extras\"></slot>\n\t\t</template>\n\t</q-field>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QField } from '@/components/QField'\n\n\t// Composables\n\timport { useId } from '@/composables/uid'\n\n\t// Types\n\timport type { QFieldSize } from '@/components/QField'\n\n\t// Utils\n\timport { computed, ref } from 'vue'\n\n\texport type QTextFieldProps = {\n\t\t/**\n\t\t * The field unique identifier.\n\t\t */\n\t\tid?: string\n\n\t\t/**\n\t\t * The placeholder text for the text field.\n\t\t */\n\t\tplaceholder?: string\n\n\t\t/**\n\t\t * The label of the input.\n\t\t */\n\t\tlabel?: string\n\n\t\t/**\n\t\t * The size of the text field.\n\t\t */\n\t\tsize?: QFieldSize\n\n\t\t/**\n\t\t * If set, defines the maximum string length\n\t\t * that the user can enter into the text field.\n\t\t */\n\t\tmaxLength?: number\n\n\t\t/**\n\t\t * If set to true, the text field is read-only.\n\t\t */\n\t\treadonly?: boolean\n\n\t\t/**\n\t\t * If set to true, the text field is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * If set to true, an asterisk (*) is displayed\n\t\t * to indicate that the text field is required.\n\t\t */\n\t\trequired?: boolean\n\n\t\t/**\n\t\t * The role attribute to apply to the input.\n\t\t */\n\t\trole?: string\n\n\t\t/**\n\t\t * The type attribute to apply to the input.\n\t\t */\n\t\ttype?: string\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QTextFieldProps>(), {\n\t\tid: undefined,\n\t\tplaceholder: '',\n\t\tlabel: '',\n\t\tsize: undefined, // do not override child default\n\t\tmaxLength: undefined,\n\t\trole: undefined,\n\t\ttype: 'text',\n\t\tclass: undefined\n\t})\n\n\tconst model = defineModel<string>()\n\n\tconst id = useId(props.id)\n\n\t// Template refs\n\tconst fieldRef = ref<InstanceType<typeof QField> | null>(null)\n\tconst inputRef = ref<HTMLElement | null>(null)\n\n\tconst placeholder = computed<string>(() =>\n\t\tprops.readonly || props.disabled ? '' : props.placeholder\n\t)\n\n\tdefineExpose({\n\t\tfieldRef: computed(() => fieldRef.value?.fieldRef),\n\t\tinputRef: inputRef\n\t})\n\n\tdefineOptions({\n\t\tinheritAttrs: false\n\t})\n</script>\n","// Components\nimport _QTextField from './QTextField.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QTextField = setupPropsProxy(_QTextField) as typeof _QTextField\n\n// Export components\nexport { QTextField }\n","<template>\n\t<q-text-field\n\t\tv-model=\"search\"\n\t\t:id=\"props.id\"\n\t\t:label=\"props.label\"\n\t\t:required=\"props.required\"\n\t\tref=\"triggerEl\"\n\t\trole=\"combobox\"\n\t\t:placeholder=\"props.placeholder\"\n\t\t:class=\"[\n\t\t\t'q-combobox',\n\t\t\t{\n\t\t\t\t'q-combobox--readonly': props.readonly,\n\t\t\t\t'q-combobox--disabled': props.disabled,\n\t\t\t\t'q-combobox--expanded': open\n\t\t\t},\n\t\t\tprops.class\n\t\t]\"\n\t\t:readonly=\"props.readonly\"\n\t\t:disabled=\"props.disabled\"\n\t\t:data-loading=\"props.loading\"\n\t\tautocomplete=\"off\"\n\t\t:aria-expanded=\"open\"\n\t\taria-haspopup=\"listbox\"\n\t\taria-autocomplete=\"list\"\n\t\t:aria-activedescendant=\"activeDescendantId\"\n\t\t:size=\"props.size\"\n\t\t@click=\"showAndScrollIntoView\"\n\t\t@focusout=\"onFocusOut\"\n\t\t@keydown.stop=\"onKeydown\">\n\t\t<template #label.prepend>\n\t\t\t<slot name=\"label.prepend\"></slot>\n\t\t</template>\n\t\t<template #label.append>\n\t\t\t<slot name=\"label.append\"></slot>\n\t\t</template>\n\t\t<template\n\t\t\tv-if=\"$slots.prepend\"\n\t\t\t#prepend>\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t</template>\n\t\t<template #append>\n\t\t\t<slot name=\"append\"></slot>\n\t\t\t<q-button\n\t\t\t\tv-if=\"canClear && search\"\n\t\t\t\tclass=\"q-combobox__clear\"\n\t\t\t\tb-style=\"plain\"\n\t\t\t\tborderless\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\t@click=\"clear\">\n\t\t\t\t<q-icon v-bind=\"props.icons.clear\" />\n\t\t\t</q-button>\n\t\t\t<q-button\n\t\t\t\tv-if=\"!props.readonly\"\n\t\t\t\tref=\"toggleRef\"\n\t\t\t\tclass=\"q-combobox__chevron\"\n\t\t\t\tb-style=\"plain\"\n\t\t\t\tborderless\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\t:disabled=\"props.disabled\"\n\t\t\t\t@mousedown.stop.prevent=\"toggle\">\n\t\t\t\t<q-icon v-bind=\"props.icons.chevron\" />\n\t\t\t</q-button>\n\t\t</template>\n\t\t<template\n\t\t\tv-if=\"$slots.extras\"\n\t\t\t#extras>\n\t\t\t<slot name=\"extras\"></slot>\n\t\t</template>\n\t</q-text-field>\n\t<q-overlay\n\t\tv-model=\"open\"\n\t\tspy\n\t\tnon-modal\n\t\ttrigger=\"manual\"\n\t\tplacement=\"bottom-start\"\n\t\twidth=\"anchor\"\n\t\t:offset=\"4\"\n\t\t:anchor=\"triggerEl?.$el\"\n\t\t@enter=\"onOverlayEnter\"\n\t\t@leave=\"onOverlayLeave\">\n\t\t<div\n\t\t\tref=\"contentRef\"\n\t\t\tclass=\"q-select__body\"\n\t\t\tdata-testid=\"combobox-dropdown\"\n\t\t\t:data-key=\"props.id\"\n\t\t\t@focusout=\"onFocusOut\">\n\t\t\t<slot name=\"body.prepend\"></slot>\n\t\t\t<div\n\t\t\t\tv-if=\"props.loading\"\n\t\t\t\tclass=\"q-select__loader\">\n\t\t\t\t<q-spinner-loader :size=\"24\" />\n\t\t\t</div>\n\t\t\t<q-list\n\t\t\t\tv-else-if=\"visibleItems.length\"\n\t\t\t\tref=\"listRef\"\n\t\t\t\tclass=\"q-select__items\"\n\t\t\t\tv-model=\"model\"\n\t\t\t\t:highlighted=\"highlightedItem?.[props.itemValue]\"\n\t\t\t\t:items=\"visibleItems\"\n\t\t\t\t:groups=\"groups\"\n\t\t\t\t:item-label=\"props.itemLabel\"\n\t\t\t\t:item-value=\"props.itemValue\"\n\t\t\t\t@mouseup=\"onListMouseUp\"\n\t\t\t\t@update:model-value=\"acceptSuggestion\">\n\t\t\t\t<template #item=\"{ item }\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t:item=\"item\">\n\t\t\t\t\t</slot>\n\t\t\t\t</template>\n\t\t\t</q-list>\n\t\t\t<div\n\t\t\t\tv-else\n\t\t\t\tclass=\"q-select__loader\">\n\t\t\t\t{{ texts.noData }}\n\t\t\t</div>\n\t\t\t<slot name=\"body.append\"></slot>\n\t\t</div>\n\t</q-overlay>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QButton } from '@/components/QButton'\n\timport { QIcon } from '@/components/QIcon'\n\timport { QList } from '@/components/QList'\n\timport { QOverlay } from '@/components/QOverlay'\n\timport { QSpinnerLoader } from '@/components/QSpinnerLoader'\n\timport { QTextField } from '@/components/QTextField'\n\n\t// Types\n\timport type { QFieldSize } from '@/components/QField'\n\timport type { Icon } from '@/components/QIcon'\n\timport type { QListItemGroupProps, QListItemProps } from '@/components/QList'\n\timport type { Primitive } from '@/types/primitive'\n\timport type { ModelRef } from 'vue'\n\n\t// Utils\n\timport { computed, nextTick, onMounted, ref, watch } from 'vue'\n\n\texport type QComboboxProps = {\n\t\t/**\n\t\t * The field unique identifier.\n\t\t */\n\t\tid?: string\n\n\t\t/**\n\t\t * The placeholder text for the combobox.\n\t\t */\n\t\tplaceholder?: string\n\n\t\t/**\n\t\t * The nature of the autocomplete and selection mechanism.\n\t\t */\n\t\tselectionMode?: 'manual' | 'automatic'\n\n\t\t/**\n\t\t * The mode of the combobox filter.\n\t\t */\n\t\tfilterMode?: 'builtin' | 'manual'\n\n\t\t/**\n\t\t * The label of the input.\n\t\t */\n\t\tlabel?: string\n\n\t\t/**\n\t\t * Whether the value of the component can be cleared.\n\t\t */\n\t\tclearable?: boolean\n\n\t\t/**\n\t\t * Whether the field is readonly.\n\t\t */\n\t\treadonly?: boolean\n\n\t\t/**\n\t\t * Whether the field is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * If set to true, an asterisk (*) is displayed\n\t\t * to indicate that the field is required.\n\t\t */\n\t\trequired?: boolean\n\n\t\t/**\n\t\t * Whether the items of the list are being loaded.\n\t\t */\n\t\tloading?: boolean\n\n\t\t/**\n\t\t * The list of available items for selection.\n\t\t */\n\t\titems: (Omit<QListItemProps, 'value' | 'label'> & {\n\t\t\t// allow custom properties\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t[key: string]: any\n\t\t})[]\n\n\t\t/**\n\t\t * The item groups used for organizing the available items.\n\t\t */\n\t\tgroups?: (QListItemGroupProps & {\n\t\t\tid: string\n\t\t})[]\n\n\t\t/**\n\t\t * Property on each item that contains its value.\n\t\t */\n\t\titemValue?: string\n\n\t\t/**\n\t\t * Property on each item that contains its title.\n\t\t */\n\t\titemLabel?: string\n\n\t\t/**\n\t\t * The value to be used in comparisons,\n\t\t * used to check if the field has a selected item.\n\t\t */\n\t\temptyValue?: Primitive\n\n\t\t/**\n\t\t * The size category of the field.\n\t\t */\n\t\tsize?: QFieldSize\n\n\t\t/**\n\t\t * Necessary strings to be used in labels and buttons of the component.\n\t\t */\n\t\ttexts?: Texts\n\n\t\t/**\n\t\t * The icons of the component.\n\t\t */\n\t\ticons?: Icons\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QComboboxProps>(), {\n\t\tid: undefined,\n\t\tplaceholder: '',\n\t\tselectionMode: 'automatic',\n\t\tfilterMode: 'builtin',\n\t\tlabel: '',\n\t\tgroups: () => [],\n\t\titemValue: 'key',\n\t\titemLabel: 'label',\n\t\temptyValue: undefined,\n\t\tsize: undefined, // do not override child default\n\t\ttexts: () => DEFAULT_TEXTS,\n\t\ticons: () => DEFAULT_ICONS,\n\t\tclass: undefined\n\t})\n\n\tconst emit = defineEmits<{\n\t\t(e: 'before-show'): void\n\t\t(e: 'before-hide'): void\n\t\t(e: 'show'): void\n\t\t(e: 'hide'): void\n\t}>()\n\n\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t//@ts-ignore defineModel ignores TS types #9587\n\tconst model = defineModel({\n\t\ttype: [String, Number, Boolean, Symbol]\n\t}) as ModelRef<Primitive | undefined, string>\n\t//const model = defineModel<Primitive>()\n\n\tconst open = defineModel<boolean>('open')\n\tconst search = defineModel<string>('search', { default: '' })\n\n\tconst highlightedItemIdx = ref<number | undefined>(undefined)\n\n\t// Template refs\n\tconst triggerEl = ref<InstanceType<typeof QTextField> | null>(null)\n\tconst listRef = ref<InstanceType<typeof QList> | null>(null)\n\tconst toggleRef = ref<InstanceType<typeof QButton> | null>(null)\n\tconst contentRef = ref<HTMLElement | null>(null)\n\n\tonMounted(updateInputValue)\n\n\t/**\n\t * Whether the value of the text field can be cleared.\n\t */\n\tconst canClear = computed<boolean>(() => props.clearable && !props.readonly && !props.disabled)\n\n\t/**\n\t * The list of currently visible items.\n\t */\n\tconst visibleItems = computed(() => {\n\t\tif (props.filterMode === 'manual' || !isDirty.value) return props.items\n\n\t\treturn props.items?.filter((item) =>\n\t\t\titem[props.itemLabel].toLowerCase().startsWith(search.value.toLowerCase())\n\t\t)\n\t})\n\n\t/**\n\t * The currently selected item.\n\t */\n\tconst selectedItem = computed(() => {\n\t\treturn props.items?.find((item) => item[props.itemValue] === model.value)\n\t})\n\n\t/**\n\t * Whether the field has a selected item.\n\t */\n\tconst isEmpty = computed<boolean>(() => selectedItem.value === undefined)\n\n\t/**\n\t * The value of the currently highlighted item.\n\t */\n\tconst highlightedItem = computed(() => {\n\t\tconst index = highlightedItemIdx.value\n\n\t\tif (index !== undefined && visibleItems.value[index]) {\n\t\t\treturn visibleItems.value[index]\n\t\t}\n\n\t\treturn undefined\n\t})\n\n\tconst activeDescendantId = computed<string | undefined>(() => {\n\t\tif (highlightedItemIdx.value === undefined) {\n\t\t\treturn undefined\n\t\t}\n\n\t\tconst activeDescendant = listRef.value?.getItem(highlightedItemIdx.value)\n\t\treturn activeDescendant?.id\n\t})\n\n\t/**\n\t * Whether the input value is not empty and is different from the selected value.\n\t */\n\tconst isDirty = computed<boolean>(() => {\n\t\treturn search.value.length > 0 && search.value !== selectedItem.value?.[props.itemLabel]\n\t})\n\n\t/**\n\t * Accepts a suggestion by selecting a new value and hiding the combobox dropdown.\n\t *\n\t * @param newVal - The new value to be selected.\n\t */\n\tfunction acceptSuggestion(newVal: Primitive) {\n\t\t// Select the new value.\n\t\tmodel.value = newVal\n\n\t\t// Hide the combobox dropdown.\n\t\thide()\n\t}\n\n\t/**\n\t * Updates the input value based on the currently selected value.\n\t */\n\tfunction updateInputValue() {\n\t\tconst newVal = selectedItem.value?.[props.itemLabel] || ''\n\n\t\tif (search.value !== newVal) {\n\t\t\t// Update the input value with the label of the selected item,\n\t\t\t// or clear it if no item is selected.\n\t\t\tsearch.value = newVal\n\t\t}\n\t}\n\n\t/**\n\t * Displays the combobox dropdown if it is not currently open\n\t * and the combobox is not in a readonly or disabled state.\n\t */\n\tfunction show() {\n\t\t// Return early if the dropdown is already open\n\t\t// or if the combobox is in readonly or disabled state.\n\t\tif (open.value || props.readonly || props.disabled) return\n\n\t\temit('before-show')\n\t\topen.value = true\n\n\t\t// Ensure that the input is focused.\n\t\tfocusInput()\n\t}\n\n\t/**\n\t * Hides the combobox dropdown if it is currently open.\n\t *\n\t * The function emits the 'before-hide' event before closing the dropdown, sets the 'open' state\n\t * to false, and resets the internal state for the highlighted item index.\n\t */\n\tfunction hide() {\n\t\t// Return early if the dropdown is not open.\n\t\tif (!open.value) return\n\n\t\temit('before-hide')\n\t\topen.value = false\n\n\t\t// Reset internal state.\n\t\thighlightedItemIdx.value = undefined\n\t}\n\n\t/**\n\t * Toggles the visibility of the combobox dropdown.\n\t */\n\tfunction toggle() {\n\t\topen.value ? hide() : showAndScrollIntoView()\n\t}\n\n\t/**\n\t * Clears the selected value.\n\t */\n\tfunction clear() {\n\t\tif (!canClear.value) return\n\n\t\t// Clear the selected value.\n\t\tmodel.value = props.emptyValue\n\n\t\t// Reset internal state.\n\t\thighlightedItemIdx.value = undefined\n\n\t\t// Bring the focus back to the main input.\n\t\tfocusInput()\n\t}\n\n\t/**\n\t * Displays the combobox dropdown and scrolls the selected item into view.\n\t */\n\tfunction showAndScrollIntoView() {\n\t\t// Display the combobox dropdown\n\t\tshow()\n\n\t\t// If a selected item exists,\n\t\t// calculate its index among visible items and scroll it into view.\n\t\tif (selectedItem.value !== undefined) {\n\t\t\tconst selectedItemIdx = visibleItems.value.indexOf(selectedItem.value)\n\n\t\t\tif (selectedItemIdx !== -1) {\n\t\t\t\tnextTick(() => scrollIntoView(selectedItemIdx))\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handles the 'keydown' event on the combobox input\n\t * and performs actions based on the pressed key.\n\t *\n\t * @param e - The KeyboardEvent representing the keydown event.\n\t */\n\tfunction onKeydown(e: KeyboardEvent) {\n\t\tif (!e.key || props.readonly || props.disabled) return\n\n\t\tif (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t}\n\n\t\tif ('Escape' === e.key) {\n\t\t\t// Return the textfield value to its last correct state.\n\t\t\tupdateInputValue()\n\n\t\t\t// If the list is displayed, closes it.\n\t\t\tif (open.value) hide()\n\t\t} else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n\t\t\tif (!open.value) {\n\t\t\t\t// The focus is in the combobox.\n\t\t\t\tshow()\n\n\t\t\t\tnextTick(() => {\n\t\t\t\t\tif ('ArrowDown' === e.key) {\n\t\t\t\t\t\t// `Down Arrow`:\n\t\t\t\t\t\t// Either highlight the selected value\n\t\t\t\t\t\t// or the first focusable element in the popup.\n\t\t\t\t\t\thighlightDefault()\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// `Up Arrow`: Highlight the last focusable element in the popup.\n\t\t\t\t\t\thighlightLast()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\t// The focus is in the listbox popup.\n\t\t\t\tnextTick(() => {\n\t\t\t\t\tif (highlightedItemIdx.value === undefined) {\n\t\t\t\t\t\thighlightDefault()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst direction = 'ArrowDown' === e.key ? 'next' : 'prev'\n\t\t\t\t\t\thighlightNext(highlightedItemIdx.value, direction)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t} else if ('Enter' === e.key) {\n\t\t\t// Accepts the suggestion.\n\t\t\tif (highlightedItem.value === undefined) return\n\n\t\t\tacceptSuggestion(highlightedItem.value[props.itemValue])\n\t\t} else if ('Home' === e.key) {\n\t\t\t// Moves focus to the first option.\n\t\t\thighlightedItemIdx.value = listRef.value?.getFirstFocusableItemIndex()\n\t\t} else if ('End' === e.key) {\n\t\t\t// Moves focus to the last option.\n\t\t\thighlightedItemIdx.value = listRef.value?.getLastFocusableItemIndex()\n\t\t} else if (/^[a-z]$/i.test(e.key) || 'Backspace' === e.key) {\n\t\t\t// Display the popup once the user starts typing.\n\t\t\tshow()\n\t\t}\n\t}\n\n\t/**\n\t * Highlights the default item based on the currently selected value.\n\t */\n\tfunction highlightDefault() {\n\t\tif (!isEmpty.value) {\n\t\t\t// Attempt to find the index of the item with the currently selected value\n\t\t\t// among visible items.\n\t\t\tconst selectedItemIdx = visibleItems.value.findIndex(\n\t\t\t\t(item) => item[props.itemValue] === model.value\n\t\t\t)\n\n\t\t\t// If the selected value is not found among visible items,\n\t\t\t// set the index to the first focusable item.\n\t\t\tif (selectedItemIdx === -1) {\n\t\t\t\thighlightedItemIdx.value = listRef.value?.getFirstFocusableItemIndex()\n\t\t\t} else {\n\t\t\t\thighlightedItemIdx.value = selectedItemIdx\n\t\t\t}\n\t\t} else {\n\t\t\t// If there is no selected value,\n\t\t\t// set the index to the first focusable item.\n\t\t\thighlightedItemIdx.value = listRef.value?.getFirstFocusableItemIndex()\n\t\t}\n\t}\n\n\t/**\n\t * Highlights the last focusable item in the list.\n\t */\n\tfunction highlightLast() {\n\t\thighlightedItemIdx.value = listRef.value?.getLastFocusableItemIndex()\n\t}\n\n\t/**\n\t * Highlights the next or previous item based on the provided starting index and direction.\n\t *\n\t * @param from - The starting index for determining the next or previous highlighted item.\n\t * @param direction - The direction in which to highlight the next or previous item ('next' or 'prev').\n\t */\n\tfunction highlightNext(from: number, direction: 'next' | 'prev') {\n\t\thighlightedItemIdx.value = listRef.value?.getAdjacentItemIndex(from, direction)\n\t}\n\n\t/**\n\t * Handles the 'focusout' event for the combobox component.\n\t *\n\t * @param e - The FocusEvent representing the 'focusout' event.\n\t */\n\tfunction onFocusOut(e: FocusEvent) {\n\t\tconst blurFromToggle = toggleRef?.value?.$el === e.relatedTarget\n\t\tconst blurIntoInput = triggerEl?.value?.$el?.contains(e.relatedTarget as Node)\n\t\tconst blurIntoPopover = contentRef?.value?.contains(e.relatedTarget as Node)\n\n\t\tif (blurFromToggle || blurIntoPopover || blurIntoInput) {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t\treturn\n\t\t}\n\n\t\t// The combobox lost focus, the dropdown should close.\n\t\thide()\n\n\t\t// When the `clearable` prop is used,\n\t\t// clearing the input and navigating away from the combobox\n\t\t// should clear the selection.\n\t\tif (canClear.value && !search.value) {\n\t\t\tmodel.value = props.emptyValue\n\t\t}\n\n\t\t// Return the textfield value to its last correct state.\n\t\tupdateInputValue()\n\t}\n\n\t/**\n\t * Focuses the input element within the trigger element.\n\t */\n\tfunction focusInput() {\n\t\ttriggerEl.value?.inputRef?.focus()\n\t}\n\n\t/**\n\t * Handles the 'mouseup' event on the list by setting focus\n\t * to the input element within the trigger element.\n\t */\n\tfunction onListMouseUp() {\n\t\tfocusInput()\n\t}\n\n\t/**\n\t * Handles the enter event for the overlay element.\n\t */\n\tfunction onOverlayEnter() {\n\t\temit('show')\n\t}\n\n\t/**\n\t * Handles the leave event for the overlay element.\n\t */\n\tfunction onOverlayLeave() {\n\t\temit('hide')\n\t}\n\n\t/**\n\t * Scrolls the item at the specified index\n\t * into view within the combobox dropdown.\n\t *\n\t * @param idx - The index of the item to scroll into view.\n\t */\n\tfunction scrollIntoView(idx: number) {\n\t\tconst item = listRef.value?.getItem(idx)\n\n\t\t// Cannot use `scrollIntoView` as it causes the whole page to move,\n\t\t// which triggers `document.onscroll` that closes the dropdown.\n\t\tif (listRef.value) {\n\t\t\tlistRef.value.$el.scrollTop = item?.offsetTop\n\t\t}\n\t}\n\n\t/**\n\t * Recomputes input value on model value change.\n\t */\n\twatch(model, updateInputValue)\n\n\t/**\n\t * Updates input value of selected value on items change.\n\t */\n\twatch(\n\t\t() => props.items,\n\t\t(_, oldValue) => {\n\t\t\t// Nothing to do if nothing is selected.\n\t\t\tif (!isEmpty.value) {\n\t\t\t\t// Find the item by the current in the old set of items,\n\t\t\t\t// using the current model value.\n\t\t\t\tconst oldItem = oldValue.find((item) => item[props.itemValue] === model.value)\n\n\t\t\t\t// Update input value only if it matches the old item label.\n\t\t\t\tif (search.value === oldItem?.[props.itemLabel]) {\n\t\t\t\t\tupdateInputValue()\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{ deep: true }\n\t)\n\n\t/**\n\t * Ensures that the currently highlighted item scrolls into view when focused.\n\t */\n\twatch(highlightedItemIdx, (newVal) => {\n\t\tif (newVal !== undefined) {\n\t\t\tscrollIntoView(newVal)\n\t\t}\n\t})\n\n\t/**\n\t * Reacts to input value changes.\n\t */\n\twatch(search, (newVal) => {\n\t\tif (newVal && open.value && props.selectionMode === 'automatic') {\n\t\t\t// Either highlight the selected value\n\t\t\t// or the first focusable element in the popup.\n\t\t\tnextTick(highlightDefault)\n\t\t}\n\t})\n\n\t/**\n\t * Apply the default focus once done loading.\n\t */\n\twatch(\n\t\t() => props.loading,\n\t\t(newVal) => {\n\t\t\tif (!newVal && open.value) nextTick(highlightDefault)\n\t\t}\n\t)\n\n\tdefineExpose({\n\t\ttriggerEl\n\t})\n</script>\n\n<script lang=\"ts\">\n\t// The default texts of the component.\n\tconst DEFAULT_TEXTS = {\n\t\tnoData: 'No data available'\n\t}\n\n\t// The default icons of the component.\n\tconst DEFAULT_ICONS: Record<string, Icon> = {\n\t\tchevron: {\n\t\t\ticon: 'chevron-down'\n\t\t},\n\t\tclear: {\n\t\t\ticon: 'close'\n\t\t}\n\t}\n\n\ttype Texts = typeof DEFAULT_TEXTS\n\ttype Icons = typeof DEFAULT_ICONS\n</script>\n","// Components\nimport _QCombobox from './QCombobox.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QCombobox = setupPropsProxy(_QCombobox) as typeof _QCombobox\n\n// Export components\nexport { QCombobox }\n","<template>\n\t<q-field\n\t\t:id=\"props.id\"\n\t\t:class=\"['q-input-group', props.class]\"\n\t\t:label=\"props.label\"\n\t\t:required=\"props.required\"\n\t\t:size=\"props.size\">\n\t\t<div\n\t\t\tv-if=\"$slots.prepend || props.prependIcon\"\n\t\t\tclass=\"q-input-group__prepend\">\n\t\t\t<span v-if=\"props.prependIcon\">\n\t\t\t\t<q-icon v-bind=\"props.prependIcon\" />\n\t\t\t</span>\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t</div>\n\t\t<slot></slot>\n\t\t<div\n\t\t\tv-if=\"$slots.append || props.appendIcon\"\n\t\t\tclass=\"q-input-group__append\">\n\t\t\t<span v-if=\"props.appendIcon\">\n\t\t\t\t<q-icon v-bind=\"props.appendIcon\" />\n\t\t\t</span>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</div>\n\t\t<template\n\t\t\tv-if=\"$slots.extras\"\n\t\t\t#extras>\n\t\t\t<slot name=\"extras\"></slot>\n\t\t</template>\n\t</q-field>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QField } from '@/components/QField'\n\timport { QIcon } from '@/components/QIcon'\n\n\t// Composables\n\timport { provideDefaults } from '@/composables/defaults'\n\n\t// Types\n\timport type { QFieldSize } from '@/components/QField'\n\timport type { Icon } from '@/components/QIcon'\n\n\texport type QInputGroupProps = {\n\t\t/**\n\t\t * The field unique identifier.\n\t\t */\n\t\tid?: string\n\n\t\t/**\n\t\t * The label of the field.\n\t\t */\n\t\tlabel?: string\n\n\t\t/**\n\t\t * If set to true, an asterisk (*) is displayed\n\t\t * to indicate that the field is required.\n\t\t */\n\t\trequired?: boolean\n\n\t\t/**\n\t\t * An icon to add at the start of the field group.\n\t\t */\n\t\tprependIcon?: Icon\n\n\t\t/**\n\t\t * An icon to add at the end of the field group.\n\t\t */\n\t\tappendIcon?: Icon\n\n\t\t/**\n\t\t * The size category of the field.\n\t\t */\n\t\tsize?: QFieldSize\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QInputGroupProps>(), {\n\t\tid: undefined,\n\t\tlabel: '',\n\t\tprependIcon: undefined,\n\t\tappendIcon: undefined,\n\t\tsize: 'large',\n\t\tclass: undefined\n\t})\n\n\tprovideDefaults({\n\t\tQField: {\n\t\t\tsize: 'block'\n\t\t}\n\t})\n</script>\n","// Components\nimport _QInputGroup from './QInputGroup.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QInputGroup = setupPropsProxy(_QInputGroup) as typeof _QInputGroup\n\n// Export components\nexport { QInputGroup }\n","<template>\n\t<div :class=\"['q-line-loader', props.class]\"></div>\n</template>\n\n<script setup lang=\"ts\">\n\texport type QLineLoaderProps = {\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QLineLoaderProps>(), {\n\t\tclass: undefined\n\t})\n</script>\n","// Components\nimport _QLineLoader from './QLineLoader.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QLineLoader = setupPropsProxy(_QLineLoader) as typeof _QLineLoader\n\n// Export components\nexport { QLineLoader }\n","<template>\n\t<q-overlay\n\t\t:model-value=\"model\"\n\t\tclass=\"q-popover\"\n\t\ttrigger=\"click\"\n\t\t:anchor=\"props.anchor\"\n\t\t:arrow=\"props.arrow\"\n\t\t:attach=\"props.attach\"\n\t\t:disabled=\"props.disabled\"\n\t\t:placement=\"props.placement\">\n\t\t<h3\n\t\t\tv-if=\"props.title || $slots.header\"\n\t\t\tclass=\"q-popover__header\">\n\t\t\t{{ props.title }}\n\t\t\t<slot name=\"header\"></slot>\n\t\t</h3>\n\t\t<div\n\t\t\tv-if=\"props.text || $slots.body\"\n\t\t\tclass=\"q-popover__body\">\n\t\t\t<span\n\t\t\t\tv-if=\"props.html\"\n\t\t\t\tv-html=\"props.text\"></span>\n\t\t\t<span v-else>{{ props.text }}</span>\n\t\t\t<slot name=\"body\"></slot>\n\t\t</div>\n\t</q-overlay>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QOverlay } from '@/components/QOverlay'\n\n\t// Types\n\timport type { Placement } from '@/composables/overlay'\n\timport type { Selector } from '@/utils/getElement'\n\n\texport type QPopoverProps = {\n\t\t/**\n\t\t * The DOM element the popover should be anchored to.\n\t\t */\n\t\tanchor: Selector\n\n\t\t/**\n\t\t * Whether the popover has an arrow pointing to the target.\n\t\t */\n\t\tarrow?: boolean\n\n\t\t/**\n\t\t * The DOM element the popover should be teleported to.\n\t\t * Defaults to the body of the document.\n\t\t */\n\t\tattach?: string\n\n\t\t/**\n\t\t * Whether the popover is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * Whether the popover's content is treated as HTML.\n\t\t */\n\t\thtml?: boolean\n\n\t\t/**\n\t\t * The placement of the popover.\n\t\t */\n\t\tplacement?: Placement\n\n\t\t/**\n\t\t * The text of the popover.\n\t\t */\n\t\ttext: string\n\n\t\t/**\n\t\t * The title of the popover.\n\t\t */\n\t\ttitle?: string\n\t}\n\n\tconst props = withDefaults(defineProps<QPopoverProps>(), {\n\t\tarrow: true,\n\t\tattach: 'body',\n\t\thtml: true,\n\t\tplacement: 'right',\n\t\ttitle: ''\n\t})\n\n\tconst model = defineModel<boolean>()\n\n\tdefineOptions({\n\t\tinheritAttrs: false\n\t})\n</script>\n","// Components\nimport _QPopover from './QPopover.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QPopover = setupPropsProxy(_QPopover) as typeof _QPopover\n\n// Export components\nexport { QPopover }\n","<template>\n\t<q-field\n\t\t:id=\"props.id\"\n\t\t:label=\"props.label\"\n\t\t:required=\"props.required\"\n\t\tref=\"triggerEl\"\n\t\trole=\"combobox\"\n\t\t:tabindex=\"props.disabled ? -1 : 0\"\n\t\t:class=\"[\n\t\t\t'q-select',\n\t\t\t{\n\t\t\t\t'q-select--readonly': props.readonly,\n\t\t\t\t'q-select--disabled': props.disabled,\n\t\t\t\t'q-select--expanded': open\n\t\t\t},\n\t\t\tprops.class\n\t\t]\"\n\t\t:readonly=\"props.readonly\"\n\t\t:disabled=\"props.disabled\"\n\t\t:data-loading=\"props.loading\"\n\t\t:aria-expanded=\"open\"\n\t\taria-haspopup=\"listbox\"\n\t\t:size=\"props.size\"\n\t\t@click=\"toggle\"\n\t\t@keydown.stop=\"onKeydown\">\n\t\t<template\n\t\t\tv-if=\"selectedItem?.icon || $slots.prepend\"\n\t\t\t#prepend>\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<q-icon\n\t\t\t\tv-if=\"selectedItem?.icon\"\n\t\t\t\tv-bind=\"selectedItem?.icon\" />\n\t\t</template>\n\t\t<span\n\t\t\tv-if=\"!isEmpty\"\n\t\t\tclass=\"q-select__value\">\n\t\t\t{{ displayValue }}\n\t\t</span>\n\t\t<span\n\t\t\tv-else\n\t\t\tclass=\"q-select__placeholder\">\n\t\t\t<template v-if=\"!props.readonly && !props.disabled\">\n\t\t\t\t{{ texts.placeholder }}\n\t\t\t</template>\n\t\t</span>\n\t\t<template #append>\n\t\t\t<slot name=\"append\"></slot>\n\t\t\t<q-button\n\t\t\t\tv-if=\"canClear && model\"\n\t\t\t\tclass=\"q-select__clear\"\n\t\t\t\tb-style=\"plain\"\n\t\t\t\tborderless\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\t@click=\"clear\">\n\t\t\t\t<q-icon v-bind=\"props.icons.clear\" />\n\t\t\t</q-button>\n\t\t\t<q-button\n\t\t\t\tv-if=\"!props.readonly\"\n\t\t\t\tclass=\"q-select__chevron\"\n\t\t\t\tb-style=\"plain\"\n\t\t\t\tborderless\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\t:disabled=\"props.disabled\"\n\t\t\t\t@click=\"toggle\">\n\t\t\t\t<q-icon v-bind=\"props.icons.chevron\" />\n\t\t\t</q-button>\n\t\t</template>\n\t\t<template\n\t\t\tv-if=\"$slots.extras\"\n\t\t\t#extras>\n\t\t\t<slot name=\"extras\"></slot>\n\t\t</template>\n\t</q-field>\n\t<q-overlay\n\t\tv-model=\"open\"\n\t\tspy\n\t\ttrigger=\"manual\"\n\t\tplacement=\"bottom-start\"\n\t\twidth=\"anchor\"\n\t\tscroll-lock\n\t\t:anchor=\"triggerEl?.$el\"\n\t\t:offset=\"2\"\n\t\t@enter=\"onOverlayEnter\"\n\t\t@leave=\"onOverlayLeave\">\n\t\t<div\n\t\t\tref=\"contentRef\"\n\t\t\tdata-testid=\"combobox-dropdown\"\n\t\t\t:data-key=\"props.id\"\n\t\t\tclass=\"q-select__body\"\n\t\t\ttabindex=\"-1\"\n\t\t\t@focusout=\"onListFocusOut\"\n\t\t\t@keydown.stop=\"onKeydown\">\n\t\t\t<slot name=\"body.prepend\"></slot>\n\t\t\t<div\n\t\t\t\tv-if=\"props.loading\"\n\t\t\t\tclass=\"q-select__loader\">\n\t\t\t\t<q-spinner-loader :size=\"24\" />\n\t\t\t</div>\n\t\t\t<q-list\n\t\t\t\tv-else\n\t\t\t\tref=\"listRef\"\n\t\t\t\tclass=\"q-select__items\"\n\t\t\t\tv-model=\"model\"\n\t\t\t\t:items=\"props.items\"\n\t\t\t\t:groups=\"groups\"\n\t\t\t\t:item-label=\"props.itemLabel\"\n\t\t\t\t:item-value=\"props.itemValue\"\n\t\t\t\t@update:model-value=\"onSelect\">\n\t\t\t\t<template #item=\"{ item }\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t:item=\"item\">\n\t\t\t\t\t</slot>\n\t\t\t\t</template>\n\t\t\t</q-list>\n\t\t\t<slot name=\"body.append\"></slot>\n\t\t</div>\n\t</q-overlay>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QButton } from '@/components/QButton'\n\timport { QField } from '@/components/QField'\n\timport { QIcon } from '@/components/QIcon'\n\timport { QList } from '@/components/QList'\n\timport { QOverlay } from '@/components/QOverlay'\n\timport { QSpinnerLoader } from '@/components/QSpinnerLoader'\n\n\t// Types\n\timport type { QFieldSize } from '@/components/QField'\n\timport type { Icon } from '@/components/QIcon'\n\timport type { QListItemGroupProps, QListItemProps } from '@/components/QList'\n\timport type { Primitive } from '@/types/primitive'\n\timport type { ModelRef } from 'vue'\n\n\t// Utils\n\timport { computed, nextTick, ref, watch } from 'vue'\n\n\texport type QSelectProps = {\n\t\t/**\n\t\t * The field unique identifier.\n\t\t */\n\t\tid?: string\n\n\t\t/**\n\t\t * The label of the input.\n\t\t */\n\t\tlabel?: string\n\n\t\t/**\n\t\t * Whether the value of the component can be cleared.\n\t\t */\n\t\tclearable?: boolean\n\n\t\t/**\n\t\t * Whether the select is readonly.\n\t\t */\n\t\treadonly?: boolean\n\n\t\t/**\n\t\t * Whether the select is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * If set to true, an asterisk (*) is displayed\n\t\t * to indicate that the field is required.\n\t\t */\n\t\trequired?: boolean\n\n\t\t/**\n\t\t * Whether the items of the list are being loaded.\n\t\t */\n\t\tloading?: boolean\n\n\t\t/**\n\t\t * The icons of the component.\n\t\t */\n\t\ticons?: Icons\n\n\t\t/**\n\t\t * The list of available items for selection.\n\t\t */\n\t\titems: (Omit<QListItemProps, 'value' | 'label'> & {\n\t\t\t// allow custom properties\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t[key: string]: any\n\t\t})[]\n\n\t\t/**\n\t\t * The item groups used for organizing the available items.\n\t\t */\n\t\tgroups?: (QListItemGroupProps & {\n\t\t\tid: string\n\t\t})[]\n\n\t\t/**\n\t\t * Property on each item that contains its value.\n\t\t */\n\t\titemValue?: string\n\n\t\t/**\n\t\t * Property on each item that contains its title.\n\t\t */\n\t\titemLabel?: string\n\n\t\t/**\n\t\t * The value to be used in comparisons,\n\t\t * used to check if the field has a selected item.\n\t\t */\n\t\temptyValue?: Primitive\n\n\t\t/**\n\t\t * The size category of the input.\n\t\t */\n\t\tsize?: QFieldSize\n\n\t\t/**\n\t\t * Necessary strings to be used in labels and buttons of the component.\n\t\t */\n\t\ttexts?: Texts\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QSelectProps>(), {\n\t\tid: undefined,\n\t\tlabel: '',\n\t\ticons: () => DEFAULT_ICONS,\n\t\tgroups: () => [],\n\t\titemValue: 'key',\n\t\titemLabel: 'label',\n\t\temptyValue: undefined,\n\t\tsize: undefined, // do not override child default\n\t\ttexts: () => DEFAULT_TEXTS,\n\t\tclass: ''\n\t})\n\n\tconst emit = defineEmits<{\n\t\t(e: 'before-show'): void\n\t\t(e: 'before-hide'): void\n\t\t(e: 'show'): void\n\t\t(e: 'hide'): void\n\t}>()\n\n\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t//@ts-ignore defineModel ignores TS types #9587\n\tconst model = defineModel({\n\t\ttype: [String, Number, Boolean, Symbol]\n\t}) as ModelRef<Primitive | undefined, string>\n\t//const model = defineModel<Primitive>()\n\n\tconst open = ref(false)\n\tconst typed = ref('')\n\n\t// Template refs\n\tconst triggerEl = ref<InstanceType<typeof QField> | null>(null)\n\tconst listRef = ref<InstanceType<typeof QList> | null>(null)\n\tconst contentRef = ref<HTMLElement | null>(null)\n\n\t/**\n\t * Whether the field has a selected item.\n\t */\n\tconst isEmpty = computed<boolean>(() => selectedItem.value === undefined)\n\n\tconst selectedItem = computed(() =>\n\t\tprops.items?.find((item) => item[props.itemValue] === model.value)\n\t)\n\n\tconst displayValue = computed<string>(() =>\n\t\tselectedItem.value ? selectedItem.value[props.itemLabel] : ''\n\t)\n\n\tconst canClear = computed<boolean>(\n\t\t() => props.clearable && !props.readonly && !props.disabled && !props.loading\n\t)\n\n\tfunction onSelect(newVal: Primitive | undefined) {\n\t\tmodel.value = newVal\n\t\thide()\n\t}\n\n\tfunction clear() {\n\t\tif (!canClear.value) return\n\n\t\tonSelect(props.emptyValue)\n\t}\n\n\tfunction onListFocusOut(e: FocusEvent) {\n\t\t// Check if focus went to the dropdown element,\n\t\t// an element within it or the trigger element.\n\t\t// If not, the dropdown should close.\n\t\tif (\n\t\t\t!contentRef.value?.contains(e.relatedTarget as Node) &&\n\t\t\t!triggerEl.value?.fieldRef?.contains(e.relatedTarget as Node)\n\t\t)\n\t\t\thide()\n\t}\n\n\t/**\n\t * Displays the select dropdown if it is not currently open\n\t * and the select is not in a readonly or disabled state.\n\t */\n\tfunction show() {\n\t\tif (open.value) return\n\t\temit('before-show')\n\t\topen.value = true\n\t}\n\n\t/**\n\t * Hides the select dropdown if it is currently open.\n\t */\n\tfunction hide() {\n\t\tif (!open.value) return\n\t\temit('before-hide')\n\t\topen.value = false\n\t}\n\n\t/**\n\t * Toggles the visibility of the select dropdown.\n\t */\n\tfunction toggle() {\n\t\tif (props.readonly || props.disabled) return\n\n\t\topen.value ? hide() : show()\n\t}\n\n\tlet timeoutId: number | undefined = undefined\n\n\tfunction onKeydown(e: KeyboardEvent) {\n\t\tif (!e.key || props.readonly || props.disabled) return\n\n\t\t// Clear any existing timeout\n\t\twindow.clearTimeout(timeoutId)\n\n\t\tif (['Enter', ' ', 'ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t}\n\n\t\tif (['Enter', ' '].includes(e.key)) {\n\t\t\topen.value = true\n\t\t}\n\n\t\tif (['Escape', 'Tab'].includes(e.key)) {\n\t\t\tif (open.value) open.value = false\n\t\t\telse if (canClear.value && e.key === 'Escape') clear()\n\t\t}\n\n\t\tif (e.key === 'Delete' && props.clearable) {\n\t\t\tclear()\n\t\t}\n\n\t\tif (/^[a-z]$/i.test(e.key)) {\n\t\t\ttyped.value += e.key.toLowerCase()\n\n\t\t\t// Find the option that starts with the typed string\n\t\t\tfor (let i = 0; i < props.items.length; i++) {\n\t\t\t\tconst item = props.items[i]\n\t\t\t\tif (item[props.itemLabel].toLowerCase().startsWith(typed.value)) {\n\t\t\t\t\t// Select the matching option\n\t\t\t\t\tfocusItem(i)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Clear the typed string after a short delay\n\t\ttimeoutId = window.setTimeout(function () {\n\t\t\ttyped.value = ''\n\t\t}, 500)\n\t}\n\n\tfunction onOverlayEnter() {\n\t\tprops.loading ? contentRef.value?.focus() : focusList()\n\t\temit('show')\n\t}\n\n\tfunction onOverlayLeave() {\n\t\tfocusMainInput()\n\t\temit('hide')\n\t}\n\n\tfunction focusMainInput() {\n\t\ttriggerEl.value?.fieldRef?.focus()\n\t}\n\n\tfunction focusList() {\n\t\tlistRef.value?.$el.focus()\n\t}\n\n\tfunction focusItem(idx: number) {\n\t\tlistRef.value?.focusItem(idx)\n\t}\n\n\t/**\n\t * Focus the list once done loading.\n\t */\n\twatch(\n\t\t() => props.loading,\n\t\t(newVal) => {\n\t\t\tif (!newVal && open.value) nextTick(focusList)\n\t\t}\n\t)\n</script>\n\n<script lang=\"ts\">\n\t// The default texts of the component.\n\tconst DEFAULT_TEXTS = {\n\t\tplaceholder: 'Choose...'\n\t}\n\n\t// The default icons of the component.\n\tconst DEFAULT_ICONS: Record<string, Icon> = {\n\t\tchevron: {\n\t\t\ticon: 'chevron-down'\n\t\t},\n\t\tclear: {\n\t\t\ticon: 'close'\n\t\t}\n\t}\n\n\ttype Texts = typeof DEFAULT_TEXTS\n\ttype Icons = typeof DEFAULT_ICONS\n</script>\n","// Components\nimport _QSelect from './QSelect.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QSelect = setupPropsProxy(_QSelect) as typeof _QSelect\n\n// Export components\nexport { QSelect }\n","<template>\n\t<div :class=\"['q-theme-provider', `q-theme--${props.theme}`]\">\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\n\texport type QThemeProviderProps = {\n\t\t/**\n\t\t * The theme to apply to the downstream components.\n\t\t */\n\t\ttheme: string\n\t}\n\n\tconst props = defineProps<QThemeProviderProps>()\n</script>\n","// Components\nimport _QThemeProvider from './QThemeProvider.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QThemeProvider = setupPropsProxy(_QThemeProvider) as typeof _QThemeProvider\n\n// Export components\nexport { QThemeProvider }\n","<template>\n\t<slot\n\t\tname=\"anchor\"\n\t\t:props=\"{ 'aria-describedby': id }\">\n\t</slot>\n\t<q-overlay\n\t\t:model-value=\"model\"\n\t\t:anchor=\"props.anchor\"\n\t\trole=\"tooltip\"\n\t\tnon-modal\n\t\t:id=\"id\"\n\t\t:appearance=\"props.appearance\"\n\t\t:arrow=\"props.arrow\"\n\t\t:attach=\"props.attach\"\n\t\t:class=\"['q-tooltip', props.class]\"\n\t\t:delay=\"props.delay\"\n\t\t:disabled=\"props.disabled\"\n\t\t:placement=\"props.placement\"\n\t\t:trigger=\"props.trigger\">\n\t\t<span\n\t\t\tv-if=\"props.html\"\n\t\t\tv-html=\"props.text\">\n\t\t</span>\n\t\t<span v-else>\n\t\t\t{{ props.text }}\n\t\t</span>\n\t</q-overlay>\n</template>\n\n<script setup lang=\"ts\">\n\t// Components\n\timport { QOverlay } from '@/components/QOverlay'\n\n\t// Composables\n\timport { useId } from '@/composables/uid'\n\n\t// Types\n\timport type { Appearance, Placement, Trigger } from '@/composables/overlay'\n\timport type { Selector } from '@/utils/getElement'\n\n\texport type QTooltipProps = {\n\t\t/**\n\t\t * The tooltip unique identifier.\n\t\t */\n\t\tid?: string\n\n\t\t/**\n\t\t * The DOM element the tooltip should be anchored to.\n\t\t */\n\t\tanchor: Selector\n\n\t\t/**\n\t\t * The appearance of the tooltip.\n\t\t * 'regular' uses body text color for background and body background color for text.\n\t\t * 'inverted' matches body color scheme.\n\t\t */\n\t\tappearance?: Appearance\n\n\t\t/**\n\t\t * Whether the tooltip has an arrow pointing to the target.\n\t\t */\n\t\tarrow?: boolean\n\n\t\t/**\n\t\t * The DOM element the tooltip should be teleported to.\n\t\t * Defaults to the body of the document.\n\t\t */\n\t\tattach?: string\n\n\t\t/**\n\t\t * The delay in milliseconds before showing the tooltip.\n\t\t */\n\t\tdelay?: number\n\n\t\t/**\n\t\t * Whether the tooltip is disabled.\n\t\t */\n\t\tdisabled?: boolean\n\n\t\t/**\n\t\t * Whether the tooltip's content is treated as HTML.\n\t\t */\n\t\thtml?: boolean\n\n\t\t/**\n\t\t * The placement of the tooltip.\n\t\t */\n\t\tplacement?: Placement\n\n\t\t/**\n\t\t * The text of the tooltip.\n\t\t */\n\t\ttext: string\n\n\t\t/**\n\t\t * The method to trigger the overlay.\n\t\t */\n\t\ttrigger?: Trigger\n\n\t\t/**\n\t\t * Custom set of classes to apply to the component.\n\t\t */\n\t\tclass?: string | unknown[]\n\t}\n\n\tconst props = withDefaults(defineProps<QTooltipProps>(), {\n\t\tid: undefined,\n\t\tappearance: 'inverted',\n\t\tarrow: true,\n\t\tattach: 'body',\n\t\tdelay: 500,\n\t\thtml: true,\n\t\tplacement: 'right',\n\t\ttrigger: 'hover',\n\t\tclass: undefined\n\t})\n\n\tconst model = defineModel<boolean>()\n\n\tconst id = useId(props.id)\n</script>\n","// Components\nimport _QTooltip from './QTooltip.vue'\n\n// Utils\nimport { setupPropsProxy } from '@/utils/setupPropsProxy'\n\nconst QTooltip = setupPropsProxy(_QTooltip) as typeof _QTooltip\n\n// Export components\nexport { QTooltip }\n"],"names":["isEmpty","object","isObject","obj","merge","source","target","out","key","sourceProperty","targetProperty","DEFAULTS_SYMBOL","useDefaults","vm","getCurrentInstance","component","defaults","injectDefaults","globalDefaults","_a","componentDefaults","_b","computed","provideDefaults","currentDefaults","providedDefaults","ref","newDefaults","provide","inject","THEME_SYMBOL","useTheme","theme","provideTheme","name","newTheme","defaultLightColorScheme","defaultDarkColorScheme","isHexColorCodeValid","hexColorCode","parseColor","color","r","g","b","toKebabCase","str","getThemeNode","themeNode","generateRootStyle","themes","cssText","colors","value","toProperty","rgb","createFramework","config","app","components","installThemes","defaultThemeName","scheme","state","watch","applyGlobalThemeClass","themeName","htmlElement","filteredClasses","className","props","__props","loaderStyle","propIsDefined","vnode","prop","vprop","setupPropsProxy","setup","ctx","_props","propValue","defaultValue","QSpinnerLoader","_QSpinnerLoader","emit","__emit","isDisabled","onClick","event","classes","size","QButton","_QButton","toRef","QButtonGroup","_QButtonGroup","model","_useModel","toggle","option","QButtonToggle","_QButtonToggle","QIconSvg","QIconFont","QIconImg","libraryVariant","iconClass","iconStyle","cache","InlineSvg","defineComponent","payload","ctn","h","cprops","attrs","a","svgEl","setTitle","src","makePromiseState","svg","err","url","response","text","newValue","title","titleTags","titleEl","promise","isPending","result","v","e","onLoaded","onUnloaded","QIcon","_QIcon","_QIconFont","_QIconImg","_QIconSvg","clicking","listTag","groups","group","item","listRef","onItemSelect","newVal","onMouseDown","onMouseUp","onFocus","targetIdx","getFirstFocusableItemIndex","preventScroll","focusItem","onKeyDown","focus","direction","getActiveAdjacentItemIndex","getLastFocusableItemIndex","itemIdx","getItems","nodes","getItem","idx","getActiveItemIndex","items","firstFocusableItem","isFocusable","lastFocusableItem","atTheEdge","getAdjacentItemIndex","adjacentIdx","getGroupItems","__expose","counter","useId","componentId","DEFAULT_ICONS","id","onSelect","uid","QList","_QList","QListItem","_QListItem","QListItemGroup","_QListItemGroup","gap","computePosition","anchorEl","overlayEl","arrowEl","options","offsetAmount","preferredPlacement","anchorRect","overlayRect","arrowRect","placement","flip","baseOverlayCoords","getCoordsFromPlacement","offsetOverlayCoords","offset","overlayCoords","shift","arrowCoords","arrow","overflowResult","computeMainAxisOverflow","isOutOfBounds","side","getSideFromPlacement","oppositeSide","oppositeSideOverflowResult","preferredAlignment","getAlignmentFromPlacement","coords","alignmentAxis","getAlignmentAxis","clamp","min","max","shiftedCoords","anchorCenter","overlayCenter","diff","y","x","alignment","commonX","commonY","alignLength","commonAlign","oob","getOppositeAxis","axis","getMainAxis","getElement","selector","showUnderlay","reactive","arrowState","isReady","overlayStyle","getAnchorElement","matchWidth","width","arrowStyle","arrowRef","overlayRef","repositionOverAnchor","nextTick","timeoutId","immediateShow","show","delayedShow","delay","hide","el","onEnter","animationTimeoutId","onLeave","observer","addAnchorListeners","anchor","removeAnchorListeners","addRepositionListeners","removeRepositionListeners","autoUpdateTimeoutId","autoUpdate","init","destroy","onUserDismiss","onMounted","onBeforeUnmount","isVisible","QOverlay","_QOverlay","fieldRef","isRequired","QField","_QField","inputRef","placeholder","QTextField","_QTextField","DEFAULT_TEXTS","open","search","highlightedItemIdx","triggerEl","toggleRef","contentRef","updateInputValue","canClear","visibleItems","isDirty","selectedItem","highlightedItem","index","activeDescendantId","activeDescendant","acceptSuggestion","focusInput","showAndScrollIntoView","clear","selectedItemIdx","scrollIntoView","onKeydown","highlightDefault","highlightNext","highlightLast","from","onFocusOut","blurFromToggle","blurIntoInput","_c","blurIntoPopover","_d","onListMouseUp","onOverlayEnter","onOverlayLeave","_","oldValue","oldItem","QCombobox","_QCombobox","QInputGroup","_QInputGroup","QLineLoader","_QLineLoader","QPopover","_QPopover","typed","displayValue","onListFocusOut","i","focusList","focusMainInput","QSelect","_QSelect","QThemeProvider","_QThemeProvider","QTooltip","_QTooltip"],"mappings":";AAAO,SAASA,GAAQC,GAA0B;AAE7C,SAAAA,KAAW,OACP,KAIJ,OAAOA,KAAW,YAAY,MAAM,QAAQA,CAAM,IAC9CA,EAAO,WAAW,IAItB,OAAOA,KAAW,WACd,OAAO,K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