@indielayer/ui 2.0.0 → 2.1.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 (326) hide show
  1. package/docs/App.vue +19 -4
  2. package/docs/assets/css/tailwind.css +7 -1
  3. package/docs/components/Cookies.vue +3 -1
  4. package/docs/components/common/CodePreview.vue +1 -1
  5. package/docs/components/common/DocsCopyPage.vue +200 -0
  6. package/docs/components/common/DocumentPage.vue +76 -23
  7. package/docs/components/toolbar/ToolbarColorToggle.vue +29 -18
  8. package/docs/components/toolbar/ToolbarSearch.vue +4 -4
  9. package/docs/composables/useDocMeta.ts +63 -4
  10. package/docs/icons.ts +3 -0
  11. package/docs/main.ts +25 -26
  12. package/docs/pages/component/accordion/index.vue +2 -2
  13. package/docs/pages/component/alert/index.vue +2 -2
  14. package/docs/pages/component/avatar/index.vue +4 -4
  15. package/docs/pages/component/badge/index.vue +2 -2
  16. package/docs/pages/component/breadcrumbs/index.vue +2 -2
  17. package/docs/pages/component/button/button-group.vue +3 -3
  18. package/docs/pages/component/button/index.vue +14 -7
  19. package/docs/pages/component/button/tooltip.vue +10 -0
  20. package/docs/pages/component/card/index.vue +2 -2
  21. package/docs/pages/component/carousel/index.vue +2 -2
  22. package/docs/pages/component/checkbox/index.vue +5 -5
  23. package/docs/pages/component/container/index.vue +2 -2
  24. package/docs/pages/component/datepicker/index.vue +2 -2
  25. package/docs/pages/component/divider/index.vue +4 -4
  26. package/docs/pages/component/drawer/index.vue +2 -2
  27. package/docs/pages/component/empty/index.vue +3 -3
  28. package/docs/pages/component/form/index.vue +2 -2
  29. package/docs/pages/component/formGroup/index.vue +2 -2
  30. package/docs/pages/component/infiniteLoader/index.vue +3 -3
  31. package/docs/pages/component/input/index.vue +5 -5
  32. package/docs/pages/component/inputGroup/index.vue +3 -3
  33. package/docs/pages/component/inputGroup/validation.vue +6 -1
  34. package/docs/pages/component/link/index.vue +2 -2
  35. package/docs/pages/component/loader/index.vue +2 -2
  36. package/docs/pages/component/menu/index.vue +2 -2
  37. package/docs/pages/component/modal/index.vue +3 -3
  38. package/docs/pages/component/notifications/index.vue +2 -2
  39. package/docs/pages/component/pagination/index.vue +2 -2
  40. package/docs/pages/component/popover/index.vue +2 -2
  41. package/docs/pages/component/popover/usage.vue +14 -0
  42. package/docs/pages/component/progress/index.vue +3 -3
  43. package/docs/pages/component/qrCode/index.vue +2 -2
  44. package/docs/pages/component/radio/index.vue +3 -3
  45. package/docs/pages/component/scroll/index.vue +3 -3
  46. package/docs/pages/component/select/index.vue +5 -5
  47. package/docs/pages/component/skeleton/index.vue +2 -2
  48. package/docs/pages/component/slider/index.vue +2 -2
  49. package/docs/pages/component/spacer/index.vue +2 -2
  50. package/docs/pages/component/spinner/index.vue +3 -3
  51. package/docs/pages/component/table/index.vue +4 -4
  52. package/docs/pages/component/tabs/index.vue +2 -2
  53. package/docs/pages/component/tabs/usage.vue +26 -0
  54. package/docs/pages/component/tag/index.vue +2 -2
  55. package/docs/pages/component/textarea/index.vue +4 -4
  56. package/docs/pages/component/toggle/index.vue +4 -4
  57. package/docs/pages/component/upload/index.vue +2 -2
  58. package/docs/pages/component/upload/usage.vue +1 -0
  59. package/docs/pages/component/virtualGrid/index.vue +2 -2
  60. package/docs/pages/component/virtualList/index.vue +3 -3
  61. package/docs/pages/icons.vue +2 -2
  62. package/docs/router/index.ts +39 -44
  63. package/docs/search/components.json +1 -1
  64. package/docs/search/index.json +1 -1
  65. package/lib/common/buttonGroupRadius.d.ts +3 -0
  66. package/lib/common/buttonGroupRadius.js +6 -0
  67. package/lib/common/props.d.ts +1 -1
  68. package/lib/common/props.js +10 -9
  69. package/lib/components/accordion/Accordion.vue.d.ts +42 -9
  70. package/lib/components/accordion/Accordion.vue_vue_type_script_setup_true_lang.js +18 -6
  71. package/lib/components/accordion/AccordionItem.vue.d.ts +33 -6
  72. package/lib/components/accordion/AccordionItem.vue_vue_type_script_setup_true_lang.js +31 -6
  73. package/lib/components/alert/Alert.vue.d.ts +27 -6
  74. package/lib/components/alert/Alert.vue_vue_type_script_setup_true_lang.js +20 -6
  75. package/lib/components/avatar/Avatar.vue.d.ts +45 -9
  76. package/lib/components/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +17 -6
  77. package/lib/components/badge/Badge.vue.d.ts +54 -9
  78. package/lib/components/badge/Badge.vue_vue_type_script_setup_true_lang.js +26 -9
  79. package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +30 -6
  80. package/lib/components/breadcrumbs/Breadcrumbs.vue_vue_type_script_setup_true_lang.js +13 -5
  81. package/lib/components/button/Button.js +2 -2
  82. package/lib/components/button/Button.vue.d.ts +138 -28
  83. package/lib/components/button/Button.vue_vue_type_script_setup_true_lang.js +192 -70
  84. package/lib/components/button/ButtonGroup.js +4 -5
  85. package/lib/components/button/ButtonGroup.vue.d.ts +54 -10
  86. package/lib/components/button/ButtonGroup.vue_vue_type_script_setup_true_lang.js +30 -19
  87. package/lib/components/button/theme/Button.base.theme.js +6 -5
  88. package/lib/components/button/theme/Button.carbon.theme.js +6 -5
  89. package/lib/components/card/Card.vue.d.ts +3 -0
  90. package/lib/components/card/Card.vue_vue_type_script_setup_true_lang.js +4 -2
  91. package/lib/components/carousel/Carousel.vue.d.ts +21 -3
  92. package/lib/components/carousel/Carousel.vue_vue_type_script_setup_true_lang.js +23 -5
  93. package/lib/components/carousel/CarouselSlide.js +2 -2
  94. package/lib/components/carousel/CarouselSlide.vue.d.ts +3 -0
  95. package/lib/components/carousel/CarouselSlide.vue_vue_type_script_setup_true_lang.js +3 -1
  96. package/lib/components/carousel/{CarouselSlide.vue_vue_type_style_index_0_scoped_e90d2127_lang.module.js → CarouselSlide.vue_vue_type_style_index_0_scoped_4f559831_lang.module.js} +1 -1
  97. package/lib/components/checkbox/Checkbox.vue.d.ts +198 -45
  98. package/lib/components/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +20 -3
  99. package/lib/components/container/Container.vue.d.ts +6 -0
  100. package/lib/components/container/Container.vue_vue_type_script_setup_true_lang.js +5 -2
  101. package/lib/components/datepicker/Datepicker.vue.d.ts +462 -36
  102. package/lib/components/datepicker/Datepicker.vue_vue_type_script_setup_true_lang.js +294 -153
  103. package/lib/components/divider/Divider.vue.d.ts +12 -3
  104. package/lib/components/divider/Divider.vue_vue_type_script_setup_true_lang.js +6 -2
  105. package/lib/components/drawer/Drawer.vue.d.ts +39 -6
  106. package/lib/components/drawer/Drawer.vue_vue_type_script_setup_true_lang.js +30 -7
  107. package/lib/components/empty/Empty.vue.d.ts +30 -6
  108. package/lib/components/empty/Empty.vue_vue_type_script_setup_true_lang.js +17 -4
  109. package/lib/components/form/Form.vue.d.ts +48 -9
  110. package/lib/components/form/Form.vue_vue_type_script_setup_true_lang.js +34 -7
  111. package/lib/components/formGroup/FormGroup.vue.d.ts +171 -39
  112. package/lib/components/formGroup/FormGroup.vue_vue_type_script_setup_true_lang.js +15 -9
  113. package/lib/components/icon/Icon.vue.d.ts +9 -0
  114. package/lib/components/icon/Icon.vue_vue_type_script_setup_true_lang.js +6 -3
  115. package/lib/components/image/Image.vue.d.ts +12 -3
  116. package/lib/components/image/Image.vue_vue_type_script_setup_true_lang.js +5 -1
  117. package/lib/components/index.js +18 -18
  118. package/lib/components/input/Input.vue.d.ts +291 -66
  119. package/lib/components/input/Input.vue_vue_type_script_setup_true_lang.js +53 -15
  120. package/lib/components/inputFooter/InputFooter.vue.d.ts +48 -12
  121. package/lib/components/inputFooter/InputFooter.vue_vue_type_script_setup_true_lang.js +18 -5
  122. package/lib/components/inputGroup/InputGroup.vue.d.ts +171 -39
  123. package/lib/components/inputGroup/InputGroup.vue_vue_type_script_setup_true_lang.js +6 -1
  124. package/lib/components/label/Label.vue.d.ts +78 -18
  125. package/lib/components/label/Label.vue_vue_type_script_setup_true_lang.js +28 -8
  126. package/lib/components/link/Link.js +2 -2
  127. package/lib/components/link/Link.vue.d.ts +18 -3
  128. package/lib/components/link/Link.vue_vue_type_script_setup_true_lang.js +10 -5
  129. package/lib/components/loader/Loader.vue.d.ts +30 -6
  130. package/lib/components/loader/Loader.vue_vue_type_script_setup_true_lang.js +11 -3
  131. package/lib/components/menu/Menu.vue.d.ts +51 -9
  132. package/lib/components/menu/Menu.vue_vue_type_script_setup_true_lang.js +24 -8
  133. package/lib/components/menu/MenuItem.js +2 -2
  134. package/lib/components/menu/MenuItem.vue.d.ts +198 -45
  135. package/lib/components/menu/MenuItem.vue_vue_type_script_setup_true_lang.js +84 -23
  136. package/lib/components/menu/{MenuItem.vue_vue_type_style_index_0_scoped_2a6b7341_lang.module.js → MenuItem.vue_vue_type_style_index_0_scoped_5aebaff3_lang.module.js} +1 -1
  137. package/lib/components/modal/Modal.vue.d.ts +177 -39
  138. package/lib/components/modal/Modal.vue_vue_type_script_setup_true_lang.js +104 -23
  139. package/lib/components/notifications/Notifications.vue.d.ts +24 -0
  140. package/lib/components/notifications/Notifications.vue_vue_type_script_setup_true_lang.js +39 -12
  141. package/lib/components/pagination/Pagination.vue.d.ts +12 -0
  142. package/lib/components/pagination/Pagination.vue_vue_type_script_setup_true_lang.js +8 -4
  143. package/lib/components/pagination/PaginationItem.vue.d.ts +18 -3
  144. package/lib/components/pagination/PaginationItem.vue_vue_type_script_setup_true_lang.js +8 -3
  145. package/lib/components/popover/Popover.vue.d.ts +204 -45
  146. package/lib/components/popover/Popover.vue_vue_type_script_setup_true_lang.js +157 -66
  147. package/lib/components/popover/PopoverContainer.vue.d.ts +3 -0
  148. package/lib/components/popover/PopoverContainer.vue_vue_type_script_setup_true_lang.js +3 -1
  149. package/lib/components/popover/PopoverContentBoundary.js +5 -0
  150. package/lib/components/popover/PopoverContentBoundary.vue.d.ts +9 -0
  151. package/lib/components/popover/PopoverContentBoundary.vue_vue_type_script_setup_true_lang.js +18 -0
  152. package/lib/components/popover/theme/PopoverContainer.base.theme.js +1 -1
  153. package/lib/components/progress/Progress.vue.d.ts +9 -0
  154. package/lib/components/progress/Progress.vue_vue_type_script_setup_true_lang.js +7 -4
  155. package/lib/components/qrCode/QrCode.vue.d.ts +24 -3
  156. package/lib/components/qrCode/QrCode.vue_vue_type_script_setup_true_lang.js +13 -5
  157. package/lib/components/radio/Radio.vue.d.ts +186 -42
  158. package/lib/components/radio/Radio.vue_vue_type_script_setup_true_lang.js +10 -2
  159. package/lib/components/radioButton/RadioButton.vue.d.ts +186 -42
  160. package/lib/components/radioButton/RadioButton.vue_vue_type_script_setup_true_lang.js +9 -1
  161. package/lib/components/scroll/Scroll.vue.d.ts +3 -0
  162. package/lib/components/scroll/Scroll.vue_vue_type_script_setup_true_lang.js +9 -4
  163. package/lib/components/select/Select.vue.d.ts +633 -144
  164. package/lib/components/select/Select.vue_vue_type_script_setup_true_lang.js +224 -189
  165. package/lib/components/skeleton/Skeleton.vue.d.ts +6 -0
  166. package/lib/components/skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js +5 -2
  167. package/lib/components/slider/Slider.js +1 -1
  168. package/lib/components/slider/Slider.vue.d.ts +180 -39
  169. package/lib/components/slider/Slider.vue_vue_type_script_setup_true_lang.js +14 -3
  170. package/lib/components/spinner/Spinner.vue.d.ts +6 -0
  171. package/lib/components/spinner/Spinner.vue_vue_type_script_setup_true_lang.js +3 -1
  172. package/lib/components/stepper/Stepper.vue.d.ts +120 -24
  173. package/lib/components/stepper/Stepper.vue_vue_type_script_setup_true_lang.js +63 -15
  174. package/lib/components/tab/Tab.vue.d.ts +112 -31
  175. package/lib/components/tab/Tab.vue_vue_type_script_setup_true_lang.js +166 -95
  176. package/lib/components/tab/TabGroup.vue.d.ts +47 -12
  177. package/lib/components/tab/TabGroup.vue_vue_type_script_setup_true_lang.js +93 -49
  178. package/lib/components/tab/theme/Tab.base.theme.js +6 -6
  179. package/lib/components/tab/theme/Tab.carbon.theme.js +6 -6
  180. package/lib/components/tab/theme/TabGroup.base.theme.js +7 -7
  181. package/lib/components/tab/theme/TabGroup.carbon.theme.js +3 -3
  182. package/lib/components/table/Table.vue.d.ts +45 -9
  183. package/lib/components/table/Table.vue_vue_type_script_setup_true_lang.js +82 -27
  184. package/lib/components/table/TableCell.vue.d.ts +54 -12
  185. package/lib/components/table/TableCell.vue_vue_type_script_setup_true_lang.js +23 -8
  186. package/lib/components/table/TableHead.vue_vue_type_script_setup_true_lang.js +2 -1
  187. package/lib/components/table/TableHeader.vue.d.ts +18 -3
  188. package/lib/components/table/TableHeader.vue_vue_type_script_setup_true_lang.js +10 -4
  189. package/lib/components/table/TableRow.vue.d.ts +15 -3
  190. package/lib/components/table/TableRow.vue_vue_type_script_setup_true_lang.js +10 -5
  191. package/lib/components/tag/Tag.vue.d.ts +33 -6
  192. package/lib/components/tag/Tag.vue_vue_type_script_setup_true_lang.js +21 -7
  193. package/lib/components/textarea/Textarea.vue.d.ts +237 -54
  194. package/lib/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js +38 -13
  195. package/lib/components/themeProvider/ThemeProvider.vue.d.ts +10 -4
  196. package/lib/components/themeProvider/ThemeProvider.vue_vue_type_script_setup_true_lang.js +6 -1
  197. package/lib/components/toggle/Toggle.vue.d.ts +174 -39
  198. package/lib/components/toggle/Toggle.vue_vue_type_script_setup_true_lang.js +5 -1
  199. package/lib/components/tooltip/ToggleTip.vue.d.ts +24 -6
  200. package/lib/components/tooltip/ToggleTip.vue_vue_type_script_setup_true_lang.js +9 -2
  201. package/lib/components/tooltip/Tooltip.vue.d.ts +30 -6
  202. package/lib/components/tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +16 -4
  203. package/lib/components/upload/Upload.vue.d.ts +249 -57
  204. package/lib/components/upload/Upload.vue_vue_type_script_setup_true_lang.js +156 -125
  205. package/lib/components/upload/fileAccept.d.ts +6 -0
  206. package/lib/components/upload/fileAccept.js +17 -0
  207. package/lib/composables/useColors.d.ts +1 -0
  208. package/lib/composables/useColors.js +2 -1
  209. package/lib/composables/useCommon.d.ts +1 -0
  210. package/lib/composables/useCommon.js +2 -1
  211. package/lib/composables/useFocusTrap.js +1 -1
  212. package/lib/composables/useInputtable.d.ts +45 -10
  213. package/lib/composables/useInputtable.js +56 -14
  214. package/lib/composables/useInteractive.d.ts +13 -3
  215. package/lib/composables/useInteractive.js +14 -4
  216. package/lib/index.js +12 -12
  217. package/lib/index.umd.js +9 -10
  218. package/lib/themes/base/styles.d.ts +1 -1
  219. package/lib/themes/base/styles.js +1 -1
  220. package/lib/themes/carbon/styles.d.ts +1 -1
  221. package/lib/themes/carbon/styles.js +1 -1
  222. package/lib/version.d.ts +1 -1
  223. package/lib/version.js +1 -1
  224. package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue.d.ts +27 -16
  225. package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue_vue_type_script_setup_true_lang.js +25 -5
  226. package/lib/virtual/components/virtualGrid/VirtualGrid.vue.d.ts +108 -86
  227. package/lib/virtual/components/virtualGrid/VirtualGrid.vue_vue_type_script_setup_true_lang.js +91 -21
  228. package/lib/virtual/components/virtualList/VirtualList.vue.d.ts +62 -48
  229. package/lib/virtual/components/virtualList/VirtualList.vue_vue_type_script_setup_true_lang.js +64 -13
  230. package/lib/virtual/components/virtualList/useDynamicRowHeight.js +4 -3
  231. package/package.json +5 -3
  232. package/src/common/buttonGroupRadius.ts +16 -0
  233. package/src/common/props.ts +10 -9
  234. package/src/components/accordion/Accordion.vue +20 -4
  235. package/src/components/accordion/AccordionItem.vue +28 -3
  236. package/src/components/alert/Alert.vue +22 -6
  237. package/src/components/avatar/Avatar.vue +20 -5
  238. package/src/components/badge/Badge.vue +24 -5
  239. package/src/components/breadcrumbs/Breadcrumbs.vue +15 -5
  240. package/src/components/button/Button.vue +140 -5
  241. package/src/components/button/ButtonGroup.vue +41 -25
  242. package/src/components/button/__tests__/ Button.spec.ts +41 -0
  243. package/src/components/button/__tests__/ ButtonGroup.spec.ts +32 -0
  244. package/src/components/button/theme/Button.base.theme.ts +4 -1
  245. package/src/components/button/theme/Button.carbon.theme.ts +5 -4
  246. package/src/components/card/Card.vue +10 -2
  247. package/src/components/carousel/Carousel.vue +22 -2
  248. package/src/components/carousel/CarouselSlide.vue +6 -0
  249. package/src/components/checkbox/Checkbox.vue +22 -3
  250. package/src/components/container/Container.vue +10 -1
  251. package/src/components/datepicker/Datepicker.vue +466 -101
  252. package/src/components/datepicker/__tests__/Datepicker.spec.ts +31 -0
  253. package/src/components/divider/Divider.vue +9 -3
  254. package/src/components/drawer/Drawer.vue +27 -2
  255. package/src/components/empty/Empty.vue +18 -3
  256. package/src/components/form/Form.vue +32 -3
  257. package/src/components/formGroup/FormGroup.vue +12 -0
  258. package/src/components/icon/Icon.vue +4 -1
  259. package/src/components/image/Image.vue +8 -2
  260. package/src/components/input/Input.vue +54 -12
  261. package/src/components/inputFooter/InputFooter.vue +21 -6
  262. package/src/components/inputGroup/InputGroup.vue +12 -1
  263. package/src/components/label/Label.vue +31 -7
  264. package/src/components/link/Link.vue +16 -5
  265. package/src/components/loader/Loader.vue +10 -2
  266. package/src/components/menu/Menu.vue +23 -5
  267. package/src/components/menu/MenuItem.vue +78 -17
  268. package/src/components/modal/Modal.vue +90 -15
  269. package/src/components/notifications/Notifications.vue +23 -0
  270. package/src/components/notifications/__tests__/Notifications.spec.ts +44 -4
  271. package/src/components/pagination/Pagination.vue +9 -1
  272. package/src/components/pagination/PaginationItem.vue +11 -2
  273. package/src/components/popover/Popover.vue +113 -18
  274. package/src/components/popover/PopoverContainer.vue +9 -1
  275. package/src/components/popover/PopoverContentBoundary.vue +32 -0
  276. package/src/components/popover/__tests__/Popover.spec.ts +51 -0
  277. package/src/components/popover/theme/PopoverContainer.base.theme.ts +1 -1
  278. package/src/components/progress/Progress.vue +8 -3
  279. package/src/components/qrCode/QrCode.vue +9 -1
  280. package/src/components/radio/Radio.vue +16 -2
  281. package/src/components/radioButton/RadioButton.vue +15 -1
  282. package/src/components/scroll/Scroll.vue +15 -4
  283. package/src/components/select/Select.vue +53 -16
  284. package/src/components/skeleton/Skeleton.vue +3 -0
  285. package/src/components/slider/Slider.vue +15 -0
  286. package/src/components/spinner/Spinner.vue +2 -0
  287. package/src/components/stepper/Stepper.vue +57 -9
  288. package/src/components/tab/Tab.vue +153 -63
  289. package/src/components/tab/TabGroup.vue +110 -26
  290. package/src/components/tab/__tests__/Tab.spec.ts +53 -0
  291. package/src/components/tab/__tests__/TabGroup.spec.ts +113 -0
  292. package/src/components/tab/theme/Tab.base.theme.ts +24 -2
  293. package/src/components/tab/theme/Tab.carbon.theme.ts +30 -7
  294. package/src/components/tab/theme/TabGroup.base.theme.ts +12 -9
  295. package/src/components/tab/theme/TabGroup.carbon.theme.ts +6 -2
  296. package/src/components/table/Table.vue +76 -19
  297. package/src/components/table/TableCell.vue +25 -6
  298. package/src/components/table/TableHead.vue +9 -2
  299. package/src/components/table/TableHeader.vue +16 -3
  300. package/src/components/table/TableRow.vue +17 -5
  301. package/src/components/tag/Tag.vue +22 -6
  302. package/src/components/textarea/Textarea.vue +40 -11
  303. package/src/components/themeProvider/ThemeProvider.vue +22 -7
  304. package/src/components/toggle/Toggle.vue +9 -1
  305. package/src/components/tooltip/ToggleTip.vue +12 -3
  306. package/src/components/tooltip/Tooltip.vue +19 -3
  307. package/src/components/upload/Upload.vue +46 -16
  308. package/src/components/upload/__tests__/fileAccept.spec.ts +39 -0
  309. package/src/components/upload/fileAccept.ts +29 -0
  310. package/src/composables/useColors.ts +1 -0
  311. package/src/composables/useCommon.ts +1 -0
  312. package/src/composables/useFocusTrap.ts +3 -1
  313. package/src/composables/useInputtable.ts +66 -10
  314. package/src/composables/useInteractive.ts +13 -3
  315. package/src/themes/base/styles.ts +2 -3
  316. package/src/themes/carbon/styles.ts +2 -3
  317. package/src/version.ts +1 -1
  318. package/src/virtual/components/infiniteLoader/InfiniteLoader.vue +33 -1
  319. package/src/virtual/components/virtualGrid/VirtualGrid.vue +104 -10
  320. package/src/virtual/components/virtualList/VirtualList.vue +73 -8
  321. package/src/virtual/components/virtualList/useDynamicRowHeight.ts +9 -2
  322. package/volar.d.ts +3 -0
  323. package/docs/layouts/simple.vue +0 -5
  324. package/lib/components/button/ButtonGroup.vue_vue_type_style_index_0_lang.module.js +0 -7
  325. /package/lib/components/button/{Button.vue_vue_type_style_index_0_scoped_4402fde2_lang.module.js → Button.vue_vue_type_style_index_0_scoped_486cb9c0_lang.module.js} +0 -0
  326. /package/lib/components/link/{Link.vue_vue_type_style_index_0_scoped_8e0e4d08_lang.module.js → Link.vue_vue_type_style_index_0_scoped_3ee61e03_lang.module.js} +0 -0
@@ -6,32 +6,82 @@ import { useCommon as i } from "../../composables/useCommon.js";
6
6
  import a from "../icon/Icon.js";
7
7
  import { closeIcon as o } from "../../common/icons.js";
8
8
  import s from "../link/Link.js";
9
- import { useMutationObserver as c } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.34_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
10
- import { Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, defineComponent as h, inject as g, normalizeClass as _, normalizeStyle as v, onMounted as y, openBlock as b, reactive as x, ref as S, renderSlot as C, resolveDynamicComponent as w, toDisplayString as T, unref as E, withCtx as D } from "vue";
9
+ import c from "../tooltip/Tooltip.js";
10
+ import { useMutationObserver as l } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.34_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
11
+ import { Teleport as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as g, createTextVNode as _, defineComponent as v, inject as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, openBlock as w, reactive as T, ref as E, renderSlot as D, resolveDynamicComponent as O, toDisplayString as k, unref as A, withCtx as j } from "vue";
11
12
  //#region src/components/tab/Tab.vue?vue&type=script&setup=true&lang.ts
12
- var O = {
13
+ var M = {
13
14
  ...i.props(),
14
- value: { type: [String, Number] },
15
+ size: {
16
+ type: String,
17
+ validator: (e) => i.validators().size.includes(e),
18
+ description: "Tab size. Falls back to the parent tab group size when omitted."
19
+ },
20
+ value: {
21
+ type: [String, Number],
22
+ description: "Value used to select this tab in the group."
23
+ },
15
24
  tag: {
16
25
  type: String,
17
- default: "button"
26
+ default: "button",
27
+ description: "Root element tag when not using `to`."
18
28
  },
19
- to: [String, Object],
20
- label: String,
21
- icon: String,
22
- disabled: Boolean,
23
- exact: Boolean,
24
- removable: r()
25
- }, k = /* @__PURE__ */ h({
29
+ to: {
30
+ type: [String, Object],
31
+ description: "Vue Router location; renders as a link when set."
32
+ },
33
+ label: {
34
+ type: String,
35
+ description: "Visible label. Defaults to `value` when omitted."
36
+ },
37
+ icon: {
38
+ type: String,
39
+ description: "Icon name shown before the label."
40
+ },
41
+ tooltip: {
42
+ type: String,
43
+ description: "Tooltip text. Prefer the tooltip slot for custom content."
44
+ },
45
+ tooltipPosition: {
46
+ type: String,
47
+ default: "top",
48
+ description: "Tooltip placement relative to the tab."
49
+ },
50
+ disabled: {
51
+ type: Boolean,
52
+ description: "Prevents selecting this tab."
53
+ },
54
+ exact: {
55
+ type: Boolean,
56
+ description: "Requires exact route match when using `to`."
57
+ },
58
+ removable: r("Shows a remove control that emits `remove`.")
59
+ }, N = /* @__PURE__ */ v({
26
60
  name: "XTab",
27
61
  validators: { ...i.validators() },
28
- props: O,
62
+ docs: {
63
+ slots: {
64
+ default: "Tab panel content shown when this tab is selected.",
65
+ tab: "Custom tab trigger content. Slot props: label, value, size, icon.",
66
+ tooltip: "Custom tooltip content; overrides the `tooltip` prop."
67
+ },
68
+ emits: { remove: "Emitted when the remove control is clicked." }
69
+ },
70
+ props: M,
29
71
  emits: ["remove"],
30
72
  setup(r) {
31
- let i = r, h = t("Tab", i), O = u(() => j.value?.$el?.href || i.value), k = u(() => i.label || i.value), A = S(null), j = S(null), M = g(e, {
32
- tabsContentRef: S(null),
73
+ let i = r, v = t("Tab", i), M = d(() => L.value?.$el?.href || i.value), N = d(() => !(i.icon && (i.label === void 0 || i.label === ""))), P = d(() => i.label || i.value), F = d(() => {
74
+ if (!N.value) {
75
+ if (i.tooltip) return i.tooltip;
76
+ if (i.label) return i.label;
77
+ if (M.value !== void 0 && M.value !== null) return String(M.value);
78
+ }
79
+ }), I = E(null), L = E(null), R = y(e, {
80
+ tabsContentRef: E(null),
33
81
  activateTab: () => {},
34
- state: x({
82
+ registerTab: () => {},
83
+ unregisterTab: () => {},
84
+ state: T({
35
85
  active: void 0,
36
86
  variant: "line",
37
87
  ghost: !1,
@@ -40,100 +90,121 @@ var O = {
40
90
  size: "md",
41
91
  color: "primary"
42
92
  })
43
- }), N = u(() => M.state.exact || i.exact), P = u(() => i.size || M.state.size);
44
- y(() => {
45
- A.value = M.tabsContentRef.value, i.to && j.value && (F(), c(j.value.$el, F, {
93
+ }), z = d(() => R.state.exact || i.exact), B = d(() => i.size ?? R.state.size ?? "md");
94
+ C(() => {
95
+ I.value = R.tabsContentRef.value, M.value !== void 0 && R.registerTab(M.value), i.to && L.value && (V(), l(L.value.$el, V, {
46
96
  attributes: !0,
47
97
  attributeFilter: ["class"]
48
98
  }));
99
+ }), S(() => {
100
+ M.value !== void 0 && R.unregisterTab(M.value);
49
101
  });
50
- function F() {
51
- j.value && j.value.$el && i.to && j.value.$el.classList.contains(N.value ? "router-link-exact-active" : "router-link-active") && M.activateTab(O.value);
102
+ function V() {
103
+ L.value && L.value.$el && i.to && L.value.$el.classList.contains(z.value ? "router-link-exact-active" : "router-link-active") && R.activateTab(M.value);
52
104
  }
53
- let I = u(() => M.state.active === O.value), L = u(() => M.state.color);
54
- function R(e) {
105
+ let H = d(() => R.state.active === M.value), U = d(() => R.state.color);
106
+ function W(e) {
55
107
  if (i.disabled) {
56
108
  e.preventDefault(), e.stopPropagation();
57
109
  return;
58
110
  }
59
- !i.to && O.value !== void 0 && M.activateTab(O.value);
111
+ !i.to && M.value !== void 0 && R.activateTab(M.value);
60
112
  }
61
- let { styles: z, classes: B, className: V } = n("Tab", {}, S({
113
+ let G = d(() => R.state.variant === "block" || R.state.variant === "compact"), { styles: K, classes: q, className: J } = n("Tab", {}, d(() => ({
62
114
  ...i,
63
- size: P.value,
64
- exact: N.value
65
- }), {
66
- ...M.state,
67
- selected: I
115
+ size: B.value,
116
+ exact: z.value
117
+ })), {
118
+ ...R.state,
119
+ selected: H,
120
+ showLabel: N
68
121
  });
69
- return (e, t) => (b(), d(w(e.to ? s : e.tag), {
70
- ref_key: "elRef",
71
- ref: j,
72
- type: e.tag === "button" ? "button" : void 0,
73
- "data-value": O.value,
74
- to: e.to,
75
- color: I.value ? L.value : void 0,
76
- style: v([E(z), e.to && I.value && E(M).state.variant === "block" ? "--x-link-text: var(--x-tab-group-text); --x-link-text-hover: var(--x-tab-group-text);" : ""]),
77
- class: _([
78
- E(V),
79
- E(B).wrapper,
80
- "shrink-0",
81
- {
82
- "flex-1": E(M).state.grow,
83
- "text-[color:var(--x-tab-group-text)] dark:text-[color:var(--x-tab-group-dark-text)]": I.value,
84
- "cursor-pointer": !e.disabled,
85
- "cursor-not-allowed": e.disabled,
86
- "cursor-not-allowed text-secondary-500": e.disabled && !I.value
87
- }
88
- ]),
89
- "aria-disabled": e.disabled ? "true" : void 0,
90
- "aria-selected": I.value ? "true" : "false",
91
- onClick: R
92
- }, {
93
- default: D(() => [C(e.$slots, "tab", {
94
- label: e.label,
95
- value: e.value,
96
- size: P.value,
97
- icon: e.icon
98
- }, () => [m("div", { class: _(E(B).content) }, [
99
- e.icon ? (b(), d(a, {
122
+ return (e, t) => (w(), f(c, {
123
+ position: e.tooltipPosition,
124
+ "data-value": M.value,
125
+ class: b(["shrink-0", { "flex-1": A(R).state.grow }])
126
+ }, g({
127
+ default: j(() => [(w(), f(O(e.to ? s : e.tag), {
128
+ ref_key: "elRef",
129
+ ref: L,
130
+ type: e.tag === "button" ? "button" : void 0,
131
+ to: e.to,
132
+ color: H.value ? U.value : void 0,
133
+ style: x([A(K), e.to && H.value && G.value ? "--x-link-text: var(--x-tab-group-text); --x-link-text-hover: var(--x-tab-group-text);" : ""]),
134
+ class: b([
135
+ A(J),
136
+ A(q).wrapper,
137
+ "flex items-center justify-center",
138
+ {
139
+ "w-full": A(R).state.grow,
140
+ "text-[color:var(--x-tab-group-text)] dark:text-[color:var(--x-tab-group-dark-text)]": H.value,
141
+ "cursor-pointer": !e.disabled,
142
+ "cursor-not-allowed": e.disabled,
143
+ "cursor-not-allowed text-secondary-500": e.disabled && !H.value
144
+ }
145
+ ]),
146
+ "aria-label": F.value,
147
+ "aria-disabled": e.disabled ? "true" : void 0,
148
+ "aria-selected": H.value ? "true" : "false",
149
+ onClick: W
150
+ }, {
151
+ default: j(() => [D(e.$slots, "tab", {
152
+ label: e.label,
153
+ value: e.value,
154
+ size: B.value,
155
+ icon: e.icon
156
+ }, () => [h("div", { class: b(A(q).content) }, [
157
+ e.icon ? (w(), f(a, {
158
+ key: 0,
159
+ icon: e.icon,
160
+ size: B.value,
161
+ class: b(A(q).icon)
162
+ }, null, 8, [
163
+ "icon",
164
+ "size",
165
+ "class"
166
+ ])) : p("", !0),
167
+ N.value ? (w(), m("div", {
168
+ key: 1,
169
+ class: b(A(q).label)
170
+ }, k(P.value), 3)) : p("", !0),
171
+ A(v).removable ? (w(), f(a, {
172
+ key: 2,
173
+ size: "sm",
174
+ icon: A(o),
175
+ class: "ml-2 cursor-pointer hover:text-secondary-700 dark:hover:text-secondary-500 transition-colors duration-150",
176
+ onClick: t[0] ||= (t) => e.$emit("remove", t)
177
+ }, null, 8, ["icon"])) : p("", !0)
178
+ ], 2)]), H.value && I.value ? (w(), f(u, {
179
+ key: 0,
180
+ to: I.value
181
+ }, [e.$slots.default ? (w(), m("div", {
100
182
  key: 0,
101
- icon: e.icon,
102
- size: P.value,
103
- class: _(E(B).icon)
104
- }, null, 8, [
105
- "icon",
106
- "size",
107
- "class"
108
- ])) : f("", !0),
109
- m("div", { class: _(E(B).label) }, T(k.value), 3),
110
- E(h).removable ? (b(), d(a, {
111
- key: 1,
112
- size: "sm",
113
- icon: E(o),
114
- class: "ml-2 cursor-pointer hover:text-secondary-700 dark:hover:text-secondary-500 transition-colors duration-150",
115
- onClick: t[0] ||= (t) => e.$emit("remove", t)
116
- }, null, 8, ["icon"])) : f("", !0)
117
- ], 2)]), I.value && A.value ? (b(), d(l, {
118
- key: 0,
119
- to: A.value
120
- }, [e.$slots.default ? (b(), p("div", {
121
- key: 0,
122
- role: "tabpanel",
123
- class: _(E(B).tabpanel)
124
- }, [C(e.$slots, "default")], 2)) : f("", !0)], 8, ["to"])) : f("", !0)]),
125
- _: 3
126
- }, 8, [
127
- "type",
183
+ role: "tabpanel",
184
+ class: b(A(q).tabpanel)
185
+ }, [D(e.$slots, "default")], 2)) : p("", !0)], 8, ["to"])) : p("", !0)]),
186
+ _: 3
187
+ }, 8, [
188
+ "type",
189
+ "to",
190
+ "color",
191
+ "style",
192
+ "class",
193
+ "aria-label",
194
+ "aria-disabled",
195
+ "aria-selected"
196
+ ]))]),
197
+ _: 2
198
+ }, [e.$slots.tooltip || e.tooltip ? {
199
+ name: "tooltip",
200
+ fn: j(() => [D(e.$slots, "tooltip", {}, () => [_(k(e.tooltip), 1)])]),
201
+ key: "0"
202
+ } : void 0]), 1032, [
203
+ "position",
128
204
  "data-value",
129
- "to",
130
- "color",
131
- "style",
132
- "class",
133
- "aria-disabled",
134
- "aria-selected"
205
+ "class"
135
206
  ]));
136
207
  }
137
208
  });
138
209
  //#endregion
139
- export { k as default };
210
+ export { N as default };
@@ -2,40 +2,53 @@ import { type PropType, type ExtractPublicPropTypes, type Ref } from 'vue';
2
2
  import { type Size } from '../../composables/useCommon';
3
3
  import { type ThemeComponent } from '../../composables/useTheme';
4
4
  declare const validators: {
5
- variant: readonly ["line", "block"];
5
+ variant: readonly ["line", "block", "compact"];
6
6
  align: readonly ["left", "center", "right"];
7
7
  size: string[];
8
8
  };
9
9
  declare const tabGroupProps: {
10
- modelValue: (StringConstructor | NumberConstructor)[];
10
+ modelValue: {
11
+ type: (StringConstructor | NumberConstructor)[];
12
+ description: string;
13
+ };
11
14
  variant: {
12
- type: PropType<"block" | "line">;
15
+ type: PropType<"block" | "line" | "compact">;
13
16
  default: string;
17
+ description: string;
14
18
  };
15
19
  align: {
16
20
  type: PropType<"left" | "right" | "center">;
17
21
  default: string;
22
+ description: string;
18
23
  };
19
24
  ghost: import("vue").Prop<boolean | undefined>;
20
25
  grow: import("vue").Prop<boolean | undefined>;
21
- exact: BooleanConstructor;
26
+ exact: {
27
+ type: BooleanConstructor;
28
+ description: string;
29
+ };
22
30
  fullWidth: {
23
31
  type: BooleanConstructor;
24
32
  default: boolean;
33
+ description: string;
25
34
  };
26
35
  color: {
27
36
  readonly type: StringConstructor;
28
37
  readonly default: string | undefined;
38
+ readonly description: "Theme or CSS color used for the control accents.";
29
39
  };
30
40
  size: {
31
41
  readonly type: PropType<Size>;
32
42
  readonly default: "md";
33
43
  readonly validator: (value: string) => boolean;
44
+ readonly description: "Control size. One of xs, sm, md, lg, xl.";
34
45
  };
35
46
  };
36
47
  export type TabGroupInjection = {
37
48
  tabsContentRef: Ref<HTMLElement | null>;
38
- activateTab: (tab: string | number) => void;
49
+ activateTab: (tab: string | number | null) => void;
50
+ registerTab: (tab: string | number) => void;
51
+ unregisterTab: (tab: string | number) => void;
39
52
  state: {
40
53
  active: string | number | undefined;
41
54
  variant: TabGroupVariant;
@@ -53,56 +66,78 @@ type InternalClasses = 'wrapper' | 'list' | 'tracker' | 'scroller';
53
66
  export interface TabGroupTheme extends ThemeComponent<TabGroupProps, InternalClasses> {
54
67
  }
55
68
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
56
- modelValue: (StringConstructor | NumberConstructor)[];
69
+ modelValue: {
70
+ type: (StringConstructor | NumberConstructor)[];
71
+ description: string;
72
+ };
57
73
  variant: {
58
- type: PropType<"block" | "line">;
74
+ type: PropType<"block" | "line" | "compact">;
59
75
  default: string;
76
+ description: string;
60
77
  };
61
78
  align: {
62
79
  type: PropType<"left" | "right" | "center">;
63
80
  default: string;
81
+ description: string;
64
82
  };
65
83
  ghost: import("vue").Prop<boolean | undefined>;
66
84
  grow: import("vue").Prop<boolean | undefined>;
67
- exact: BooleanConstructor;
85
+ exact: {
86
+ type: BooleanConstructor;
87
+ description: string;
88
+ };
68
89
  fullWidth: {
69
90
  type: BooleanConstructor;
70
91
  default: boolean;
92
+ description: string;
71
93
  };
72
94
  color: {
73
95
  readonly type: StringConstructor;
74
96
  readonly default: string | undefined;
97
+ readonly description: "Theme or CSS color used for the control accents.";
75
98
  };
76
99
  size: {
77
100
  readonly type: PropType<Size>;
78
101
  readonly default: "md";
79
102
  readonly validator: (value: string) => boolean;
103
+ readonly description: "Control size. One of xs, sm, md, lg, xl.";
80
104
  };
81
105
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
82
- modelValue: (StringConstructor | NumberConstructor)[];
106
+ modelValue: {
107
+ type: (StringConstructor | NumberConstructor)[];
108
+ description: string;
109
+ };
83
110
  variant: {
84
- type: PropType<"block" | "line">;
111
+ type: PropType<"block" | "line" | "compact">;
85
112
  default: string;
113
+ description: string;
86
114
  };
87
115
  align: {
88
116
  type: PropType<"left" | "right" | "center">;
89
117
  default: string;
118
+ description: string;
90
119
  };
91
120
  ghost: import("vue").Prop<boolean | undefined>;
92
121
  grow: import("vue").Prop<boolean | undefined>;
93
- exact: BooleanConstructor;
122
+ exact: {
123
+ type: BooleanConstructor;
124
+ description: string;
125
+ };
94
126
  fullWidth: {
95
127
  type: BooleanConstructor;
96
128
  default: boolean;
129
+ description: string;
97
130
  };
98
131
  color: {
99
132
  readonly type: StringConstructor;
100
133
  readonly default: string | undefined;
134
+ readonly description: "Theme or CSS color used for the control accents.";
101
135
  };
102
136
  size: {
103
137
  readonly type: PropType<Size>;
104
138
  readonly default: "md";
105
139
  readonly validator: (value: string) => boolean;
140
+ readonly description: "Control size. One of xs, sm, md, lg, xl.";
106
141
  };
107
142
  }>> & Readonly<{
108
143
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -111,7 +146,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
111
146
  size: Size;
112
147
  align: "left" | "right" | "center";
113
148
  exact: boolean;
114
- variant: "block" | "line";
149
+ variant: "block" | "line" | "compact";
115
150
  fullWidth: boolean;
116
151
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
117
152
  default?(_: {}): any;
@@ -9,114 +9,158 @@ import { useMutationObserver as s, useResizeObserver as c } from "../../node_mod
9
9
  import l from "../scroll/Scroll.js";
10
10
  import { computed as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onMounted as v, openBlock as y, provide as b, reactive as x, ref as S, renderSlot as C, unref as w, vShow as T, watch as E, watchEffect as D, withCtx as O, withDirectives as k } from "vue";
11
11
  //#region src/components/tab/TabGroup.vue?vue&type=script&setup=true&lang.ts
12
- var A = /* @__PURE__ */ m({
12
+ var A = { class: "relative overflow-x-clip" }, j = /* @__PURE__ */ m({
13
13
  name: "XTabGroup",
14
14
  validators: {
15
15
  ...a.validators(),
16
- variant: ["line", "block"],
16
+ variant: [
17
+ "line",
18
+ "block",
19
+ "compact"
20
+ ],
17
21
  align: [
18
22
  "left",
19
23
  "center",
20
24
  "right"
21
25
  ]
22
26
  },
27
+ docs: {
28
+ slots: { default: "Tab triggers (typically x-tab children)." },
29
+ emits: { "update:modelValue": "Emitted when the active tab changes (v-model)." }
30
+ },
23
31
  props: {
24
32
  ...a.props(),
25
33
  ...n.props("primary"),
26
- modelValue: [String, Number],
34
+ modelValue: {
35
+ type: [String, Number],
36
+ description: "Active tab value (v-model)."
37
+ },
27
38
  variant: {
28
39
  type: String,
29
- default: "line"
40
+ default: "line",
41
+ description: "Visual style of the tab list (line, block, or compact)."
30
42
  },
31
43
  align: {
32
44
  type: String,
33
- default: "left"
45
+ default: "left",
46
+ description: "Horizontal alignment of tabs in the list."
47
+ },
48
+ ghost: i("Subtle styling with less background emphasis."),
49
+ grow: i("Stretches tabs to fill the list width."),
50
+ exact: {
51
+ type: Boolean,
52
+ description: "Default exact route matching for linked tabs."
34
53
  },
35
- ghost: i(),
36
- grow: i(),
37
- exact: Boolean,
38
54
  fullWidth: {
39
55
  type: Boolean,
40
- default: !0
56
+ default: !0,
57
+ description: "Stretches the tab list to the container width."
41
58
  }
42
59
  },
43
60
  emits: ["update:modelValue"],
44
61
  setup(n, { emit: i }) {
45
- let a = n, m = t("TabGroup", a), A = i, j = S(null), M = S(null), N = S(null), P = S(null), F = S(null), I = S();
62
+ let a = n, m = t("TabGroup", a), j = i, M = S(null), N = S(null), P = S(null), F = S(null), I = S(null), L = S();
46
63
  D(() => {
47
- I.value = a.modelValue;
64
+ L.value = a.modelValue;
48
65
  });
49
- let L = x({
50
- active: u(() => I.value),
66
+ let R = x({
67
+ active: u(() => L.value),
51
68
  variant: u(() => a.variant),
52
69
  ghost: u(() => m.value.ghost ?? !1),
53
70
  grow: u(() => m.value.grow ?? !1),
54
71
  exact: u(() => a.exact),
55
72
  size: u(() => a.size),
56
73
  color: u(() => a.color)
57
- });
58
- function R(e) {
59
- I.value = e, A("update:modelValue", e);
74
+ }), z = S(!0), B = [];
75
+ function V(e) {
76
+ L.value = e, j("update:modelValue", e);
77
+ }
78
+ function H(e) {
79
+ B.includes(e) || B.push(e);
80
+ }
81
+ function U(e) {
82
+ let t = B.indexOf(e);
83
+ if (t === -1 || (B.splice(t, 1), L.value !== e)) return;
84
+ let n = B[Math.min(t, B.length - 1)];
85
+ n === void 0 ? (V(null), z.value = !1) : V(n);
60
86
  }
61
87
  b(e, {
62
- tabsContentRef: F,
63
- activateTab: R,
64
- state: L
88
+ tabsContentRef: I,
89
+ activateTab: V,
90
+ registerTab: H,
91
+ unregisterTab: U,
92
+ state: R
65
93
  });
66
- let z = o(async (e) => {
67
- if (e === void 0) return;
94
+ let W = o(async (e) => {
95
+ if (e == null) {
96
+ z.value = !1;
97
+ return;
98
+ }
68
99
  await h();
69
- let t = P.value?.querySelector(`[data-value="${e}"]`);
70
- if (!t || !N.value || (N.value.style.left = `${t.offsetLeft}px`, N.value.style.width = `${t.offsetWidth}px`, !P.value || !j.value)) return;
71
- let n = t.offsetLeft - (P.value.getBoundingClientRect().width - t.getBoundingClientRect().width) / 2;
72
- j.value.scrollEl && j.value.scrollEl.scrollTo({
73
- left: n,
100
+ let t = F.value?.querySelector(`[data-value="${e}"]`);
101
+ if (!t || !P.value) {
102
+ z.value = !1;
103
+ return;
104
+ }
105
+ if (z.value = !0, P.value.style.left = `${t.offsetLeft}px`, P.value.style.width = `${t.offsetWidth}px`, !F.value || !M.value?.scrollEl) return;
106
+ let n = M.value.scrollEl, r = Math.max(0, F.value.scrollWidth - n.clientWidth), i = n.scrollLeft, a = i + n.clientWidth, o = t.offsetLeft, s = o + t.offsetWidth, c = o >= i && s <= a;
107
+ if (r <= 0) {
108
+ n.scrollLeft !== 0 && n.scrollTo({ left: 0 }), n.dispatchEvent(new CustomEvent("scroll"));
109
+ return;
110
+ }
111
+ if (c) {
112
+ n.dispatchEvent(new CustomEvent("scroll"));
113
+ return;
114
+ }
115
+ let l = i;
116
+ o < i ? l = o : s > a && (l = s - n.clientWidth), l = Math.max(0, Math.min(l, r)), l === i ? n.dispatchEvent(new CustomEvent("scroll")) : n.scrollTo({
117
+ left: l,
74
118
  behavior: "smooth"
75
119
  });
76
- }, 100, !0), B = S(!0);
77
- function V() {
78
- P.value?.querySelector(".router-link-active") ? B.value = !0 : (R(null), B.value = !1);
120
+ }, 100, !0);
121
+ function G() {
122
+ F.value?.querySelector(".router-link-active") ? z.value = !0 : (V(null), z.value = !1);
79
123
  }
80
- E(() => I.value, (e) => {
81
- z(e);
124
+ E(() => L.value, (e) => {
125
+ W(e);
82
126
  }), v(() => {
83
- P.value?.querySelector(".x-link") && s(P.value, V, {
127
+ F.value?.querySelector(".x-link") && s(F.value, G, {
84
128
  attributes: !0,
85
129
  subtree: !0,
86
130
  attributeFilter: ["class"]
87
- }), z(I.value);
88
- }), c(P, () => {
89
- z(I.value);
131
+ }), W(L.value);
132
+ }), c(F, () => {
133
+ W(L.value);
90
134
  });
91
- let { styles: H, classes: U, className: W } = r("TabGroup", {}, a);
135
+ let { styles: K, classes: q, className: J } = r("TabGroup", {}, a);
92
136
  return (e, t) => (y(), d("div", null, [f("div", {
93
137
  ref_key: "wrapperRef",
94
- ref: M,
95
- class: g(["relative", [w(W), w(U).wrapper]]),
96
- style: _(w(H))
138
+ ref: N,
139
+ class: g(["relative", [w(J), w(q).wrapper]]),
140
+ style: _(w(K))
97
141
  }, [p(l, {
98
142
  ref_key: "scrollRef",
99
- ref: j,
143
+ ref: M,
100
144
  scrollbar: !1,
101
145
  horizontal: "",
102
146
  mousewheel: "",
103
- class: g(w(U).scroller)
147
+ class: g(w(q).scroller)
104
148
  }, {
105
- default: O(() => [f("div", {
149
+ default: O(() => [f("div", A, [f("div", {
106
150
  ref_key: "tabsRef",
107
- ref: P,
108
- class: g(["relative", w(U).list])
151
+ ref: F,
152
+ class: g(["relative", w(q).list])
109
153
  }, [C(e.$slots, "default")], 2), k(f("div", {
110
154
  ref_key: "trackerRef",
111
- ref: N,
112
- class: g(w(U).tracker)
113
- }, null, 2), [[T, B.value]])]),
155
+ ref: P,
156
+ class: g(["pointer-events-none", w(q).tracker])
157
+ }, null, 2), [[T, z.value]])])]),
114
158
  _: 3
115
159
  }, 8, ["class"])], 6), f("div", {
116
160
  ref_key: "tabsContentRef",
117
- ref: F
161
+ ref: I
118
162
  }, null, 512)]));
119
163
  }
120
164
  });
121
165
  //#endregion
122
- export { A as default };
166
+ export { j as default };