@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
@@ -1,5 +1,24 @@
1
1
  import type { TabTheme } from '../Tab.vue'
2
2
 
3
+ const compactSizeClasses = (size: string | undefined, iconOnly: boolean) => {
4
+ if (iconOnly) {
5
+ // Explicit h/w so width cannot collapse under flex/`w-full` conflicts.
6
+ if (size === 'xs') return 'h-6 w-6'
7
+ if (size === 'sm') return 'h-7 w-7'
8
+ if (size === 'lg') return 'h-10 w-10'
9
+ if (size === 'xl') return 'h-11 w-11'
10
+
11
+ return 'h-7 w-7'
12
+ }
13
+
14
+ if (size === 'xs') return 'text-xs min-h-6'
15
+ if (size === 'sm') return 'text-sm min-h-7'
16
+ if (size === 'lg') return 'text-lg min-h-10'
17
+ if (size === 'xl') return 'text-xl min-h-11'
18
+
19
+ return 'text-sm min-h-7'
20
+ }
21
+
3
22
  const theme: TabTheme = {
4
23
  classes: {
5
24
  wrapper: ({ props, data }) => {
@@ -8,7 +27,10 @@ const theme: TabTheme = {
8
27
  if (data.variant === 'line') c.push('py-2')
9
28
  if (data.variant === 'block') c.push('py-1 px-8')
10
29
 
11
- if (props.size === 'xs') c.push('text-xs')
30
+ if (data.variant === 'compact') {
31
+ if (data.showLabel) c.push('px-2.5')
32
+ c.push(compactSizeClasses(props.size, !data.showLabel))
33
+ } else if (props.size === 'xs') c.push('text-xs')
12
34
  else if (props.size === 'sm') c.push('text-sm')
13
35
  else if (props.size === 'lg') c.push('text-lg')
14
36
  else if (props.size === 'xl') c.push('text-xl')
@@ -20,7 +42,7 @@ const theme: TabTheme = {
20
42
 
21
43
  label: 'font-medium',
22
44
 
23
- icon: 'mr-1.5',
45
+ icon: ({ data }) => (data.showLabel ? 'mr-1.5' : ''),
24
46
 
25
47
  tabpanel: 'py-2',
26
48
  },
@@ -1,16 +1,39 @@
1
1
  import type { TabTheme } from '../Tab.vue'
2
2
 
3
+ const compactSizeClasses = (size: string | undefined, iconOnly: boolean) => {
4
+ if (iconOnly) {
5
+ // Explicit h/w so width cannot collapse under flex/`w-full` conflicts.
6
+ if (size === 'xs') return 'h-6 w-6'
7
+ if (size === 'sm') return 'h-7 w-7'
8
+ if (size === 'lg') return 'h-10 w-10'
9
+ if (size === 'xl') return 'h-11 w-11'
10
+
11
+ return 'h-7 w-7'
12
+ }
13
+
14
+ if (size === 'xs') return 'text-xs min-h-6'
15
+ if (size === 'sm') return 'text-sm min-h-7'
16
+ if (size === 'lg') return 'text-lg min-h-10'
17
+ if (size === 'xl') return 'text-xl min-h-11'
18
+
19
+ return 'text-sm min-h-7'
20
+ }
21
+
3
22
  const theme: TabTheme = {
4
23
  classes: {
5
24
  wrapper: ({ props, data }) => {
6
- const c = ['py-2 transition-colors duration-150 ease-in-out whitespace-nowrap text-left']
25
+ const c = ['transition-colors duration-150 ease-in-out whitespace-nowrap text-left']
7
26
 
8
- if (data.variant === 'block') c.push('px-4')
9
- else c.push('px-4')
27
+ if (data.variant === 'compact') {
28
+ if (data.showLabel) c.push('px-2.5')
29
+ c.push(compactSizeClasses(props.size, !data.showLabel))
30
+ } else {
31
+ c.push('py-2 px-4')
10
32
 
11
- if (props.size === 'lg') c.push('text-lg')
12
- else if (props.size === 'xl') c.push('text-xl')
13
- else c.push('text-sm')
33
+ if (props.size === 'lg') c.push('text-lg')
34
+ else if (props.size === 'xl') c.push('text-xl')
35
+ else c.push('text-sm')
36
+ }
14
37
 
15
38
  return c
16
39
  },
@@ -25,7 +48,7 @@ const theme: TabTheme = {
25
48
  return c
26
49
  },
27
50
 
28
- icon: 'mr-1.5',
51
+ icon: ({ data }) => (data.showLabel ? 'mr-1.5' : ''),
29
52
 
30
53
  tabpanel: 'py-4',
31
54
  },
@@ -7,9 +7,10 @@ const theme: TabGroupTheme = {
7
7
  scroller: ({ props }) => {
8
8
  const c = ['']
9
9
 
10
- if (!props.fullWidth) c.push('!w-fit')
11
- if (props.variant === 'block') c.push('rounded-lg')
12
- if (props.variant === 'block' && !props.ghost) c.push('bg-secondary-100 dark:bg-secondary-800 p-1')
10
+ if (!props.fullWidth || props.variant === 'compact') c.push('!w-fit')
11
+ if (props.variant === 'block' || props.variant === 'compact') c.push('rounded-lg')
12
+ if (props.variant === 'block' && !props.ghost) c.push('bg-secondary-200/80 dark:bg-secondary-800 p-1')
13
+ if (props.variant === 'compact' && !props.ghost) c.push('bg-secondary-200/80 dark:bg-secondary-800 p-1')
13
14
 
14
15
  return c
15
16
  },
@@ -19,7 +20,7 @@ const theme: TabGroupTheme = {
19
20
 
20
21
  if (props.variant === 'line') c.push('border-b border-secondary-200 dark:border-secondary-700')
21
22
  if (props.variant === 'line' && !props.grow) c.push('space-x-8')
22
- if (props.variant === 'block') c.push('z-[1]')
23
+ if (props.variant === 'block' || props.variant === 'compact') c.push('z-[1] space-x-1')
23
24
  if (props.align === 'center') c.push('justify-center')
24
25
  if (props.align === 'right') c.push('justify-end')
25
26
 
@@ -31,7 +32,9 @@ const theme: TabGroupTheme = {
31
32
 
32
33
  if (props.variant === 'line') c.push('h-[2px] -mt-[2px] bg-[color:var(--x-tab-group-text)] dark:bg-[color:var(--x-tab-group-dark-text)]')
33
34
 
34
- if (props.variant === 'block') c.push('rounded-md h-full top-0 bg-[color:var(--x-tab-group-bg)] dark:bg-[color:var(--x-tab-group-dark-bg)]')
35
+ if (props.variant === 'block' || props.variant === 'compact') {
36
+ c.push('rounded-md h-full top-0 bg-[color:var(--x-tab-group-bg)] dark:bg-[color:var(--x-tab-group-dark-bg)]')
37
+ }
35
38
 
36
39
  return c
37
40
  },
@@ -42,11 +45,11 @@ const theme: TabGroupTheme = {
42
45
  const color = colors.getPalette(props.color)
43
46
 
44
47
  return css.variables({
45
- text: color[600],
46
- bg: props.ghost ? color[50] : '#fff',
48
+ text: color[700],
49
+ bg: props.ghost ? color[100] : '#fff',
47
50
  dark: {
48
- text: color[400],
49
- bg: props.ghost ? color[900] : secondary[700],
51
+ text: color[300],
52
+ bg: props.ghost ? secondary[700] : secondary[700],
50
53
  },
51
54
  })
52
55
  },
@@ -7,9 +7,10 @@ const theme: TabGroupTheme = {
7
7
  scroller: ({ props }) => {
8
8
  const c = ['']
9
9
 
10
- if (!props.fullWidth) c.push('!w-fit')
10
+ if (!props.fullWidth || props.variant === 'compact') c.push('!w-fit')
11
11
  if (props.variant === 'block') c.push('')
12
12
  if (props.variant === 'block' && !props.ghost) c.push('bg-secondary-200 dark:bg-secondary-800')
13
+ if (props.variant === 'compact' && !props.ghost) c.push('bg-secondary-200 dark:bg-secondary-800')
13
14
 
14
15
  return c
15
16
  },
@@ -20,6 +21,7 @@ const theme: TabGroupTheme = {
20
21
  if (props.variant === 'line') c.push('border-b border-secondary-200 dark:border-secondary-700')
21
22
  if (props.variant === 'line' && !props.grow) c.push('')
22
23
  if (props.variant === 'block') c.push('z-[1] py-1.5')
24
+ if (props.variant === 'compact') c.push('z-[1] py-0.5')
23
25
  if (props.align === 'center') c.push('justify-center')
24
26
  if (props.align === 'right') c.push('justify-end')
25
27
 
@@ -31,7 +33,9 @@ const theme: TabGroupTheme = {
31
33
 
32
34
  if (props.variant === 'line') c.push('h-[2px] -mt-[2px] bg-[color:var(--x-tab-group-text)] dark:bg-[color:var(--x-tab-group-dark-text)]')
33
35
 
34
- if (props.variant === 'block') c.push('border-t-2 border-solid border-[color:var(--x-tab-group-text)] dark:border-[color:var(--x-tab-group-dark-text)] h-full top-0 bg-secondary-100 dark:bg-secondary-700')
36
+ if (props.variant === 'block' || props.variant === 'compact') {
37
+ c.push('border-t-2 border-solid border-[color:var(--x-tab-group-text)] dark:border-[color:var(--x-tab-group-dark-text)] h-full top-0 bg-secondary-100 dark:bg-secondary-700')
38
+ }
35
39
 
36
40
  return c
37
41
  },
@@ -5,57 +5,93 @@ const tableProps = {
5
5
  headers: {
6
6
  type: Array as PropType<TableHeader[]>,
7
7
  default: () => [],
8
+ description: 'Column definitions (text, value, sortable, align, width, etc.).',
8
9
  },
9
10
  items: {
10
11
  type: Array,
11
12
  default: () => [],
13
+ description: 'Row data array. Cell values resolve from each header `value` path.',
12
14
  },
13
15
  sort: {
14
16
  type: Array as PropType<string[]>,
15
17
  default: () => [],
18
+ description: 'Active sort entries as `column,-1|1` (use with `v-model:sort`).',
19
+ },
20
+ sortMultiple: optionalBooleanProp('Allow sorting by multiple columns at once.'),
21
+ loading: {
22
+ type: Boolean,
23
+ description: 'Shows loading rows (skeletons) and a spinner overlay.',
24
+ },
25
+ loadingSkeleton: {
26
+ type: Boolean,
27
+ description: 'When set, loading rows use skeleton placeholders.',
16
28
  },
17
- sortMultiple: optionalBooleanProp(),
18
- loading: Boolean,
19
- loadingSkeleton: Boolean,
20
29
  loadingLines: {
21
30
  type: [Number, String],
22
31
  default: 3,
32
+ description: 'Number of skeleton rows shown while loading.',
23
33
  },
24
- error: Boolean,
25
- dense: optionalBooleanProp(),
26
- fixed: optionalBooleanProp(),
27
- striped: optionalBooleanProp(),
28
- pointer: optionalBooleanProp(),
34
+ error: {
35
+ type: Boolean,
36
+ description: 'Shows the error slot instead of rows.',
37
+ },
38
+ dense: optionalBooleanProp('Compact cell padding.'),
39
+ fixed: optionalBooleanProp('Fixed table layout for consistent column widths.'),
40
+ striped: optionalBooleanProp('Alternating row background colors.'),
41
+ pointer: optionalBooleanProp('Pointer cursor on rows (also set when `toFn` or `hrefFn` is used).'),
29
42
  scrollable: {
30
43
  type: Boolean,
31
44
  default: true,
45
+ description: 'Enables horizontal overflow scrolling for wide tables.',
32
46
  },
33
47
  stickyHeader: {
34
48
  type: Boolean,
35
49
  default: true,
50
+ description: 'Keeps the header row sticky while scrolling.',
51
+ },
52
+ expandable: optionalBooleanProp('Adds an expand control and `expanded-row` slot per row.'),
53
+ virtualList: optionalBooleanProp('Virtualizes rows for large datasets.'),
54
+ virtualListOffsetTop: {
55
+ type: Number,
56
+ description: 'Top spacer offset (px) when using virtual list.',
57
+ },
58
+ virtualListOffsetBottom: {
59
+ type: Number,
60
+ description: 'Bottom spacer offset (px) when using virtual list.',
36
61
  },
37
- expandable: optionalBooleanProp(),
38
- virtualList: optionalBooleanProp(),
39
- virtualListOffsetTop: Number,
40
- virtualListOffsetBottom: Number,
41
62
  virtualListItemHeight: {
42
63
  type: Number,
43
64
  default: 54,
65
+ description: 'Fixed row height (px) for virtual list measurement.',
44
66
  },
45
67
  virtualListOverscan: {
46
68
  type: Number,
47
69
  default: 10,
70
+ description: 'Extra rows rendered above/below the viewport when virtualized.',
71
+ },
72
+ keyProp: {
73
+ type: String,
74
+ description: 'Item property used as the stable row key (falls back to index).',
48
75
  },
49
- keyProp: String,
50
- selectable: optionalBooleanProp(),
51
- singleSelect: optionalBooleanProp(),
76
+ selectable: optionalBooleanProp('Enables row selection (`v-model:selected`).'),
77
+ singleSelect: optionalBooleanProp('Select only one row at a time.'),
52
78
  autoClearSelected: {
53
79
  type: Boolean,
54
80
  default: true,
81
+ description: 'Clears selection entries that no longer exist in `items`.',
82
+ },
83
+ toFn: {
84
+ type: Function as PropType<(item: unknown) => string | Record<string, unknown> | undefined>,
85
+ description: 'Returns a Vue Router location to make each cell a link.',
86
+ },
87
+ hrefFn: {
88
+ type: Function as PropType<(item: unknown) => string>,
89
+ description: 'Returns an href to make each cell an anchor.',
90
+ },
91
+ hrefTarget: {
92
+ type: String as PropType<'_blank' | '_self' | '_parent' | '_top'>,
93
+ description: 'Target for links created by `hrefFn`.',
55
94
  },
56
- toFn: Function as PropType<(item: unknown) => string | Record<string, unknown> | undefined>,
57
- hrefFn: Function as PropType<(item: unknown) => string>,
58
- hrefTarget: String as PropType<'_blank' | '_self' | '_parent' | '_top'>,
59
95
  }
60
96
 
61
97
  export type TableHeader = {
@@ -75,7 +111,28 @@ export type TableProps = ExtractPublicPropTypes<typeof tableProps>
75
111
  type InternalClasses = 'wrapper' | 'table' | 'loadingWrapper'
76
112
  export interface TableTheme extends ThemeComponent<TableProps, InternalClasses> {}
77
113
 
78
- export default { name: 'XTable' }
114
+ export default {
115
+ name: 'XTable',
116
+ docs: {
117
+ slots: {
118
+ title: 'Optional title above the table.',
119
+ actions: 'Optional actions above the table.',
120
+ 'header-[column]': 'Header cell content for a column (`header-{value}`).',
121
+ 'item-[column]': 'Cell content for a column (`item-{value}`).',
122
+ 'loading-[column]': 'Loading cell content for a column (`loading-{value}`).',
123
+ 'footer-[column]': 'Footer cell content for a column (`footer-{value}`).',
124
+ footer: 'Custom footer (`tfoot`); overrides per-column footer slots when provided.',
125
+ empty: 'Content when there are no items.',
126
+ error: 'Content when `error` is true.',
127
+ 'expanded-row': 'Expanded content for a row when `expandable` is set.',
128
+ },
129
+ emits: {
130
+ 'update:sort': 'Emitted when sort changes (`v-model:sort`).',
131
+ 'update:selected': 'Emitted when selection changes (`v-model:selected`).',
132
+ 'click-row': 'Emitted when a row is clicked; payload is `(item, index)`.',
133
+ },
134
+ },
135
+ }
79
136
  </script>
80
137
 
81
138
  <script setup lang="ts" generic="T">
@@ -9,18 +9,32 @@ const tableCellProps = {
9
9
  textAlign: {
10
10
  type: String as PropType<TableCellTextAlign>,
11
11
  validator: (value: string) => validators.textAlign.includes(value as any),
12
+ description: 'Horizontal text alignment.',
13
+ },
14
+ truncate: optionalBooleanProp('Truncates overflowing cell content with an ellipsis.'),
15
+ dense: optionalBooleanProp('Compact cell padding.'),
16
+ width: {
17
+ type: [String, Number],
18
+ description: 'Fixed cell width (number is treated as px).',
12
19
  },
13
- truncate: optionalBooleanProp(),
14
- dense: optionalBooleanProp(),
15
- width: [String, Number],
16
20
  verticalAlign: {
17
21
  type: String as PropType<TableCellVerticalAlign>,
18
22
  default: 'middle',
19
23
  validator: (value: string) => validators.verticalAlign.includes(value as any),
24
+ description: 'Vertical alignment of cell content.',
25
+ },
26
+ to: {
27
+ type: [String, Object],
28
+ description: 'Vue Router location; wraps cell content in a router-link.',
29
+ },
30
+ href: {
31
+ type: String,
32
+ description: 'Anchor href; wraps cell content in a link.',
33
+ },
34
+ target: {
35
+ type: String as PropType<'_blank' | '_self' | '_parent' | '_top'>,
36
+ description: 'Link target when `href` or `to` is set.',
20
37
  },
21
- to: [String, Object],
22
- href: String,
23
- target: String as PropType<'_blank' | '_self' | '_parent' | '_top'>,
24
38
  }
25
39
 
26
40
  export type TableCellTextAlign = typeof validators.textAlign[number]
@@ -33,6 +47,11 @@ export interface TableCellTheme extends ThemeComponent<TableCellProps, InternalC
33
47
  export default {
34
48
  name: 'XTableCell',
35
49
  validators,
50
+ docs: {
51
+ slots: {
52
+ default: 'Cell content.',
53
+ },
54
+ },
36
55
  }
37
56
  </script>
38
57
 
@@ -2,7 +2,7 @@
2
2
  import { optionalBooleanProp } from '../../common/props'
3
3
 
4
4
  const tableHeadProps = {
5
- stickyHeader: optionalBooleanProp(),
5
+ stickyHeader: optionalBooleanProp('Keeps the header row sticky while the table scrolls.'),
6
6
  }
7
7
 
8
8
  export type TableHeadProps = ExtractPublicPropTypes<typeof tableHeadProps>
@@ -10,7 +10,14 @@ export type TableHeadProps = ExtractPublicPropTypes<typeof tableHeadProps>
10
10
  type InternalClasses = 'thead' | 'row'
11
11
  export interface TableHeadTheme extends ThemeComponent<TableHeadProps, InternalClasses> {}
12
12
 
13
- export default { name: 'XTableHead' }
13
+ export default {
14
+ name: 'XTableHead',
15
+ docs: {
16
+ slots: {
17
+ default: 'Header cells (`x-table-header` children).',
18
+ },
19
+ },
20
+ }
14
21
  </script>
15
22
 
16
23
  <script setup lang="ts">
@@ -10,14 +10,19 @@ const tableHeaderProps = {
10
10
  sort: {
11
11
  type: Number as PropType<TableHeaderSort>,
12
12
  validator: (value: number) => validators.sort.includes(value as any),
13
+ description: 'Current sort direction: `1` ascending, `-1` descending, or unset.',
13
14
  },
14
- sortable: optionalBooleanProp(),
15
+ sortable: optionalBooleanProp('Shows the sort icon and enables sort interaction.'),
15
16
  textAlign: {
16
17
  type: String as PropType<TableHeaderAlign>,
17
18
  default: 'left',
18
19
  validator: (value: string) => validators.textAlign.includes(value as any),
20
+ description: 'Horizontal alignment of the header label.',
21
+ },
22
+ tooltip: {
23
+ type: String,
24
+ description: 'Optional tooltip shown next to the header label.',
19
25
  },
20
- tooltip: String,
21
26
  }
22
27
 
23
28
  export type TableHeaderSort = typeof validators.sort[number]
@@ -27,7 +32,15 @@ export type TableHeaderProps = ExtractPublicPropTypes<typeof tableHeaderProps>
27
32
  type InternalClasses = 'th' | 'sortIcon' | 'header'
28
33
  export interface TableHeaderTheme extends ThemeComponent<TableHeaderProps, InternalClasses> {}
29
34
 
30
- export default { name: 'XTableHeader', validators }
35
+ export default {
36
+ name: 'XTableHeader',
37
+ validators,
38
+ docs: {
39
+ slots: {
40
+ default: 'Header label content.',
41
+ },
42
+ },
43
+ }
31
44
  </script>
32
45
 
33
46
  <script setup lang="ts">
@@ -6,14 +6,18 @@ const validators = {
6
6
  }
7
7
 
8
8
  const tableRowProps = {
9
- pointer: optionalBooleanProp(),
10
- striped: optionalBooleanProp(),
11
- selected: Boolean,
12
- singleSelect: optionalBooleanProp(),
9
+ pointer: optionalBooleanProp('Pointer cursor on the row.'),
10
+ striped: optionalBooleanProp('Applies striped row styling.'),
11
+ selected: {
12
+ type: Boolean,
13
+ description: 'Marks the row as selected.',
14
+ },
15
+ singleSelect: optionalBooleanProp('Single-select styling for the selected row.'),
13
16
  verticalAlign: {
14
17
  type: String as PropType<'baseline' | 'bottom' | 'middle' | 'text-bottom' | 'text-top' | 'top'>,
15
18
  default: 'top',
16
19
  validator: (value: string) => validators.verticalAlign.includes(value),
20
+ description: 'Vertical alignment for cells in the row.',
17
21
  },
18
22
  }
19
23
 
@@ -22,7 +26,15 @@ export type TableRowProps = ExtractPublicPropTypes<typeof tableRowProps>
22
26
  type InternalClasses = 'row'
23
27
  export interface TableRowTheme extends ThemeComponent<TableRowProps, InternalClasses> {}
24
28
 
25
- export default { name: 'XTableRow', validators }
29
+ export default {
30
+ name: 'XTableRow',
31
+ validators,
32
+ docs: {
33
+ slots: {
34
+ default: 'Row cells (`x-table-cell` children).',
35
+ },
36
+ },
37
+ }
26
38
  </script>
27
39
 
28
40
  <script setup lang="ts">
@@ -7,13 +7,20 @@ const tagProps = {
7
7
  tag: {
8
8
  type: String,
9
9
  default: 'span',
10
+ description: 'Root element tag. Becomes an anchor or router-link when `href` or `to` is set.',
11
+ },
12
+ rounded: optionalBooleanProp('Fully rounded corners (pill shape).'),
13
+ removable: optionalBooleanProp('Shows a remove control that emits `remove`.'),
14
+ outlined: optionalBooleanProp('Outline style with a transparent fill.'),
15
+ filled: optionalBooleanProp('Filled style using the theme color.'),
16
+ disabled: {
17
+ type: Boolean,
18
+ description: 'Disables the remove control and applies disabled styling.',
19
+ },
20
+ to: {
21
+ type: [String, Object],
22
+ description: 'Vue Router location; renders as a link when set.',
10
23
  },
11
- rounded: optionalBooleanProp(),
12
- removable: optionalBooleanProp(),
13
- outlined: optionalBooleanProp(),
14
- filled: optionalBooleanProp(),
15
- disabled: Boolean,
16
- to: [String, Object],
17
24
  }
18
25
 
19
26
  export type TagProps = ExtractPublicPropTypes<typeof tagProps>
@@ -26,6 +33,15 @@ export default {
26
33
  validators: {
27
34
  ...useCommon.validators(),
28
35
  },
36
+ docs: {
37
+ slots: {
38
+ default: 'Tag label and content.',
39
+ prefix: 'Content shown before the label.',
40
+ },
41
+ emits: {
42
+ remove: 'Emitted when the remove icon is clicked.',
43
+ },
44
+ },
29
45
  }
30
46
  </script>
31
47
 
@@ -8,22 +8,39 @@ const textareaProps = {
8
8
  dir: {
9
9
  type: String,
10
10
  default: 'ltr',
11
+ description: 'Text direction for the textarea (`ltr` or `rtl`).',
11
12
  },
12
13
  rows: {
13
14
  type: [Number, String],
14
15
  default: 2,
16
+ description: 'Visible number of text lines.',
15
17
  },
16
- max: [Number, String],
17
- maxlength: [Number, String],
18
- min: [Number, String],
19
- minlength: [Number, String],
20
- placeholder: String,
21
- adjustToText: optionalBooleanProp(),
22
- preventEnter: optionalBooleanProp(),
23
- block: optionalBooleanProp(),
24
- resizable: optionalBooleanProp(),
25
- showCounter: optionalBooleanProp(),
26
- clearable: optionalBooleanProp(),
18
+ max: {
19
+ type: [Number, String],
20
+ description: 'Native `max` attribute when applicable.',
21
+ },
22
+ maxlength: {
23
+ type: [Number, String],
24
+ description: 'Maximum character length for the value.',
25
+ },
26
+ min: {
27
+ type: [Number, String],
28
+ description: 'Native `min` attribute when applicable.',
29
+ },
30
+ minlength: {
31
+ type: [Number, String],
32
+ description: 'Minimum character length for the value.',
33
+ },
34
+ placeholder: {
35
+ type: String,
36
+ description: 'Placeholder text shown when the value is empty.',
37
+ },
38
+ adjustToText: optionalBooleanProp('Auto-grows the height to fit the content.'),
39
+ preventEnter: optionalBooleanProp('Prevents the Enter key from inserting a newline.'),
40
+ block: optionalBooleanProp('Stretches to the full width of the parent.'),
41
+ resizable: optionalBooleanProp('Allows the user to resize the textarea.'),
42
+ showCounter: optionalBooleanProp('Shows a character counter in the footer.'),
43
+ clearable: optionalBooleanProp('Shows a clear button when the value is not empty.'),
27
44
  }
28
45
 
29
46
  export type TextareaProps = ExtractPublicPropTypes<typeof textareaProps>
@@ -38,6 +55,18 @@ export default {
38
55
  validators: {
39
56
  ...useCommon.validators(),
40
57
  },
58
+ docs: {
59
+ slots: {
60
+ prefix: 'Content before the textarea (left adornment).',
61
+ suffix: 'Content after the textarea (right adornment).',
62
+ },
63
+ emits: {
64
+ ...useInputtable.emitDocs(),
65
+ },
66
+ methods: {
67
+ ...useInputtable.methodDocs(),
68
+ },
69
+ },
41
70
  }
42
71
  </script>
43
72
 
@@ -1,18 +1,33 @@
1
1
  <script lang="ts">
2
- export default { name: 'XThemeProvider' }
2
+ import type { PropType } from 'vue'
3
+ import type { UITheme } from '../../theme'
4
+
5
+ const themeProviderProps = {
6
+ theme: {
7
+ type: Object as PropType<UITheme>,
8
+ description: 'Theme object provided to descendant components.',
9
+ },
10
+ }
11
+
12
+ export default {
13
+ name: 'XThemeProvider',
14
+ docs: {
15
+ slots: {
16
+ default: 'Content that receives the provided theme.',
17
+ },
18
+ },
19
+ }
3
20
  </script>
4
21
 
5
22
  <script setup lang="ts">
6
- import { watchEffect, ref, inject, provide, type PropType, unref } from 'vue'
23
+ import { watchEffect, ref, inject, provide, unref } from 'vue'
7
24
  import { injectThemeKey } from '../../composables/keys'
8
- import { injectThemeStyles, type UITheme } from '../../theme'
25
+ import { injectThemeStyles } from '../../theme'
9
26
 
10
- const props = defineProps({
11
- theme: Object as PropType<UITheme>,
12
- })
27
+ const props = defineProps(themeProviderProps)
13
28
 
14
29
  const initialTheme = inject(injectThemeKey, {})
15
- const theme = ref<UITheme>(props.theme || unref(initialTheme) || {})
30
+ const theme = ref(props.theme || unref(initialTheme) || {})
16
31
 
17
32
  provide(injectThemeKey, theme)
18
33
 
@@ -6,7 +6,7 @@ const toggleProps = {
6
6
  ...useColors.props('primary'),
7
7
  ...useInteractive.props(),
8
8
  ...useInputtable.props(),
9
- glow: optionalBooleanProp(),
9
+ glow: optionalBooleanProp('Soft colored glow when the toggle is on.'),
10
10
  }
11
11
 
12
12
  export type ToggleProps = ExtractPublicPropTypes<typeof toggleProps>
@@ -19,6 +19,14 @@ export default {
19
19
  validators: {
20
20
  ...useCommon.validators(),
21
21
  },
22
+ docs: {
23
+ emits: {
24
+ ...useInputtable.emitDocs(false),
25
+ },
26
+ methods: {
27
+ ...useInputtable.methodDocs(),
28
+ },
29
+ },
22
30
  }
23
31
  </script>
24
32