@indielayer/ui 0.0.0-dev-20240129122517 → 0.0.0-dev-20240205224808

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 (351) hide show
  1. package/docs/App.vue +25 -0
  2. package/docs/assets/css/hljs.css +302 -0
  3. package/docs/assets/css/tailwind.css +46 -0
  4. package/docs/assets/images/error.svg +1 -0
  5. package/docs/assets/images/logo.png +0 -0
  6. package/docs/assets/images/logo_mini.svg +10 -0
  7. package/docs/assets/images/logo_white.png +0 -0
  8. package/docs/assets/images/logo_word.svg +12 -0
  9. package/docs/assets/images/logo_word_dark.svg +12 -0
  10. package/docs/assets/images/photo1.jpeg +0 -0
  11. package/docs/assets/images/photo2.jpeg +0 -0
  12. package/docs/components/Cookies.vue +42 -0
  13. package/docs/components/common/CodePreview.vue +80 -0
  14. package/docs/components/common/CodeSnippet.vue +47 -0
  15. package/docs/components/common/CopyButton.vue +50 -0
  16. package/docs/components/common/DocumentPage.vue +285 -0
  17. package/docs/components/common/Indielayer-theme.json +702 -0
  18. package/docs/components/common/MultiSnippet.vue +26 -0
  19. package/docs/components/menu/DocsMenu.vue +96 -0
  20. package/docs/components/toolbar/PreToolbar.vue +16 -0
  21. package/docs/components/toolbar/Toolbar.vue +76 -0
  22. package/docs/components/toolbar/ToolbarColorToggle.vue +49 -0
  23. package/docs/icons.ts +61 -0
  24. package/docs/layouts/default.vue +33 -0
  25. package/docs/layouts/simple.vue +3 -0
  26. package/docs/main.ts +33 -0
  27. package/docs/pages/colors.vue +120 -0
  28. package/docs/pages/component/accordion/index.vue +29 -0
  29. package/docs/pages/component/accordion/usage.vue +30 -0
  30. package/docs/pages/component/alert/index.vue +29 -0
  31. package/docs/pages/component/alert/usage.vue +18 -0
  32. package/docs/pages/component/avatar/index.vue +43 -0
  33. package/docs/pages/component/avatar/size.vue +9 -0
  34. package/docs/pages/component/avatar/usage.vue +9 -0
  35. package/docs/pages/component/avatar/variants.vue +8 -0
  36. package/docs/pages/component/badge/index.vue +29 -0
  37. package/docs/pages/component/badge/usage.vue +50 -0
  38. package/docs/pages/component/breadcrumbs/index.vue +29 -0
  39. package/docs/pages/component/breadcrumbs/usage.vue +19 -0
  40. package/docs/pages/component/button/button-group.vue +22 -0
  41. package/docs/pages/component/button/icons.vue +9 -0
  42. package/docs/pages/component/button/index.vue +64 -0
  43. package/docs/pages/component/button/size.vue +9 -0
  44. package/docs/pages/component/button/states.vue +6 -0
  45. package/docs/pages/component/button/usage.vue +12 -0
  46. package/docs/pages/component/button/variants.vue +7 -0
  47. package/docs/pages/component/card/index.vue +29 -0
  48. package/docs/pages/component/card/usage.vue +6 -0
  49. package/docs/pages/component/carousel/index.vue +29 -0
  50. package/docs/pages/component/carousel/usage.vue +10 -0
  51. package/docs/pages/component/checkbox/index.vue +50 -0
  52. package/docs/pages/component/checkbox/size.vue +9 -0
  53. package/docs/pages/component/checkbox/states.vue +9 -0
  54. package/docs/pages/component/checkbox/usage.vue +15 -0
  55. package/docs/pages/component/checkbox/variants.vue +8 -0
  56. package/docs/pages/component/container/index.vue +29 -0
  57. package/docs/pages/component/container/usage.vue +3 -0
  58. package/docs/pages/component/divider/index.vue +43 -0
  59. package/docs/pages/component/divider/label.vue +12 -0
  60. package/docs/pages/component/divider/usage.vue +7 -0
  61. package/docs/pages/component/divider/vertical.vue +7 -0
  62. package/docs/pages/component/drawer/index.vue +29 -0
  63. package/docs/pages/component/drawer/usage.vue +56 -0
  64. package/docs/pages/component/form/index.vue +29 -0
  65. package/docs/pages/component/form/usage.vue +96 -0
  66. package/docs/pages/component/formGroup/index.vue +29 -0
  67. package/docs/pages/component/formGroup/usage.vue +47 -0
  68. package/docs/pages/component/icon/index.vue +36 -0
  69. package/docs/pages/component/icon/usage.vue +6 -0
  70. package/docs/pages/component/icon/variants.vue +14 -0
  71. package/docs/pages/component/image/index.vue +29 -0
  72. package/docs/pages/component/image/usage.vue +8 -0
  73. package/docs/pages/component/input/index.vue +50 -0
  74. package/docs/pages/component/input/size.vue +13 -0
  75. package/docs/pages/component/input/states.vue +12 -0
  76. package/docs/pages/component/input/usage.vue +14 -0
  77. package/docs/pages/component/input/variants.vue +18 -0
  78. package/docs/pages/component/link/index.vue +29 -0
  79. package/docs/pages/component/link/usage.vue +12 -0
  80. package/docs/pages/component/loader/index.vue +29 -0
  81. package/docs/pages/component/loader/usage.vue +7 -0
  82. package/docs/pages/component/menu/index.vue +29 -0
  83. package/docs/pages/component/menu/usage.vue +69 -0
  84. package/docs/pages/component/modal/composed.vue +78 -0
  85. package/docs/pages/component/modal/index.vue +36 -0
  86. package/docs/pages/component/modal/usage.vue +66 -0
  87. package/docs/pages/component/notifications/index.vue +29 -0
  88. package/docs/pages/component/notifications/usage.vue +56 -0
  89. package/docs/pages/component/pagination/index.vue +29 -0
  90. package/docs/pages/component/pagination/usage.vue +17 -0
  91. package/docs/pages/component/popover/index.vue +29 -0
  92. package/docs/pages/component/popover/usage.vue +21 -0
  93. package/docs/pages/component/progress/index.vue +36 -0
  94. package/docs/pages/component/progress/usage.vue +7 -0
  95. package/docs/pages/component/progress/variants.vue +18 -0
  96. package/docs/pages/component/radio/index.vue +50 -0
  97. package/docs/pages/component/radio/size.vue +15 -0
  98. package/docs/pages/component/radio/states.vue +13 -0
  99. package/docs/pages/component/radio/usage.vue +14 -0
  100. package/docs/pages/component/radio/variants.vue +39 -0
  101. package/docs/pages/component/scroll/horizontal.vue +14 -0
  102. package/docs/pages/component/scroll/index.vue +36 -0
  103. package/docs/pages/component/scroll/usage.vue +5 -0
  104. package/docs/pages/component/select/index.vue +43 -0
  105. package/docs/pages/component/select/states.vue +22 -0
  106. package/docs/pages/component/select/usage.vue +46 -0
  107. package/docs/pages/component/select/variants.vue +23 -0
  108. package/docs/pages/component/skeleton/index.vue +29 -0
  109. package/docs/pages/component/skeleton/usage.vue +10 -0
  110. package/docs/pages/component/slider/index.vue +29 -0
  111. package/docs/pages/component/slider/usage.vue +15 -0
  112. package/docs/pages/component/spacer/index.vue +29 -0
  113. package/docs/pages/component/spacer/usage.vue +8 -0
  114. package/docs/pages/component/spinner/index.vue +36 -0
  115. package/docs/pages/component/spinner/usage.vue +3 -0
  116. package/docs/pages/component/spinner/variants.vue +9 -0
  117. package/docs/pages/component/stepper/index.vue +29 -0
  118. package/docs/pages/component/stepper/usage.vue +21 -0
  119. package/docs/pages/component/table/index.vue +36 -0
  120. package/docs/pages/component/table/states.vue +28 -0
  121. package/docs/pages/component/table/usage.vue +107 -0
  122. package/docs/pages/component/tabs/index.vue +29 -0
  123. package/docs/pages/component/tabs/usage.vue +142 -0
  124. package/docs/pages/component/tag/index.vue +29 -0
  125. package/docs/pages/component/tag/usage.vue +27 -0
  126. package/docs/pages/component/textarea/index.vue +43 -0
  127. package/docs/pages/component/textarea/states.vue +13 -0
  128. package/docs/pages/component/textarea/usage.vue +19 -0
  129. package/docs/pages/component/textarea/variants.vue +15 -0
  130. package/docs/pages/component/toggle/index.vue +43 -0
  131. package/docs/pages/component/toggle/states.vue +13 -0
  132. package/docs/pages/component/toggle/usage.vue +12 -0
  133. package/docs/pages/component/toggle/variants.vue +15 -0
  134. package/docs/pages/component/tooltip/index.vue +29 -0
  135. package/docs/pages/component/tooltip/usage.vue +12 -0
  136. package/docs/pages/error.vue +6 -0
  137. package/docs/pages/icons.vue +101 -0
  138. package/docs/pages/index.vue +153 -0
  139. package/docs/pages/play.vue +7 -0
  140. package/docs/pages/typography.vue +91 -0
  141. package/docs/router/index.ts +77 -0
  142. package/exports/tailwind.preset.js +0 -1
  143. package/lib/components/accordion/Accordion.vue.d.ts +3 -0
  144. package/lib/components/accordion/Accordion.vue.js +7 -7
  145. package/lib/components/accordion/AccordionItem.vue.d.ts +1 -0
  146. package/lib/components/accordion/AccordionItem.vue.js +49 -47
  147. package/lib/components/accordion/index.d.ts +1 -1
  148. package/lib/components/accordion/theme/Accordion.carbon.theme.js +3 -6
  149. package/lib/components/accordion/theme/AccordionItem.base.theme.js +9 -9
  150. package/lib/components/accordion/theme/AccordionItem.carbon.theme.js +3 -14
  151. package/lib/components/badge/Badge.vue.js +7 -7
  152. package/lib/components/breadcrumbs/theme/Breadcrumbs.base.theme.js +1 -1
  153. package/lib/components/button/Button.vue.js +2 -2
  154. package/lib/components/button/Button.vue2.js +26 -26
  155. package/lib/components/button/theme/Button.base.theme.js +7 -7
  156. package/lib/components/card/theme/Card.base.theme.js +1 -1
  157. package/lib/components/carousel/CarouselSlide.vue.d.ts +19 -8
  158. package/lib/components/carousel/CarouselSlide.vue.js +2 -2
  159. package/lib/components/carousel/CarouselSlide.vue2.js +25 -18
  160. package/lib/components/checkbox/Checkbox.vue.d.ts +3 -0
  161. package/lib/components/checkbox/Checkbox.vue2.js +23 -23
  162. package/lib/components/checkbox/theme/Checkbox.base.theme.js +10 -10
  163. package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +2 -2
  164. package/lib/components/container/Container.vue.d.ts +13 -0
  165. package/lib/components/container/Container.vue.js +15 -11
  166. package/lib/components/container/theme/Container.base.theme.js +7 -4
  167. package/lib/components/divider/Divider.vue.js +14 -14
  168. package/lib/components/divider/theme/Divider.base.theme.js +2 -2
  169. package/lib/components/drawer/Drawer.vue.js +2 -2
  170. package/lib/components/drawer/theme/Drawer.base.theme.js +1 -1
  171. package/lib/components/form/Form.vue.js +1 -1
  172. package/lib/components/form/theme/Form.base.theme.js +5 -5
  173. package/lib/components/form/theme/Form.carbon.theme.js +4 -4
  174. package/lib/components/formGroup/FormGroup.vue.d.ts +3 -0
  175. package/lib/components/formGroup/FormGroup.vue.js +16 -15
  176. package/lib/components/formGroup/theme/FormGroup.base.theme.js +1 -1
  177. package/lib/components/icon/theme/Icon.base.theme.js +1 -1
  178. package/lib/components/index.js +108 -107
  179. package/lib/components/input/Input.vue.d.ts +3 -0
  180. package/lib/components/input/Input.vue.js +4 -3
  181. package/lib/components/input/theme/Input.base.theme.js +10 -10
  182. package/lib/components/input/theme/Input.carbon.theme.js +10 -10
  183. package/lib/components/inputFooter/theme/InputFooter.base.theme.js +3 -3
  184. package/lib/components/inputFooter/theme/InputFooter.carbon.theme.js +2 -2
  185. package/lib/components/label/Label.vue.d.ts +3 -0
  186. package/lib/components/label/Label.vue.js +26 -20
  187. package/lib/components/label/theme/Label.base.theme.js +2 -2
  188. package/lib/components/label/theme/Label.carbon.theme.js +3 -3
  189. package/lib/components/link/Link.vue.js +2 -2
  190. package/lib/components/link/Link.vue2.js +4 -4
  191. package/lib/components/loader/theme/Loader.base.theme.js +1 -1
  192. package/lib/components/loader/theme/Loader.carbon.theme.js +1 -1
  193. package/lib/components/menu/Menu.vue.js +22 -22
  194. package/lib/components/menu/theme/MenuItem.base.theme.js +22 -32
  195. package/lib/components/modal/Modal.vue.d.ts +5 -1
  196. package/lib/components/modal/Modal.vue.js +80 -74
  197. package/lib/components/modal/theme/Modal.base.theme.js +10 -10
  198. package/lib/components/modal/theme/Modal.carbon.theme.js +3 -3
  199. package/lib/components/notifications/Notifications.vue.js +1 -1
  200. package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
  201. package/lib/components/notifications/theme/Notifications.carbon.theme.js +3 -3
  202. package/lib/components/pagination/Pagination.vue.js +27 -27
  203. package/lib/components/popover/Popover.vue.d.ts +13 -0
  204. package/lib/components/popover/Popover.vue.js +13 -8
  205. package/lib/components/popover/Popover.vue2.js +3 -2
  206. package/lib/components/popover/Popover.vue3.js +2 -3
  207. package/lib/components/popover/theme/PopoverContainer.base.theme.js +4 -4
  208. package/lib/components/popover/theme/PopoverContainer.carbon.theme.js +4 -4
  209. package/lib/components/progress/Progress.vue.js +11 -11
  210. package/lib/components/progress/theme/Progress.base.theme.js +10 -10
  211. package/lib/components/radio/Radio.vue.d.ts +3 -0
  212. package/lib/components/radio/theme/Radio.base.theme.js +31 -31
  213. package/lib/components/radio/theme/Radio.carbon.theme.js +8 -8
  214. package/lib/components/select/Select.vue.d.ts +16 -0
  215. package/lib/components/select/Select.vue.js +93 -93
  216. package/lib/components/select/theme/Select.base.theme.js +11 -11
  217. package/lib/components/select/theme/Select.carbon.theme.js +10 -10
  218. package/lib/components/skeleton/theme/Skeleton.base.theme.js +1 -1
  219. package/lib/components/slider/Slider.vue.d.ts +3 -0
  220. package/lib/components/slider/Slider.vue.js +1 -1
  221. package/lib/components/slider/theme/Slider.carbon.theme.js +8 -8
  222. package/lib/components/stepper/Stepper.vue.js +14 -14
  223. package/lib/components/tab/Tab.vue.js +55 -54
  224. package/lib/components/tab/theme/TabGroup.base.theme.js +15 -15
  225. package/lib/components/tab/theme/TabGroup.carbon.theme.js +8 -8
  226. package/lib/components/table/Table.vue.js +192 -194
  227. package/lib/components/table/theme/Table.base.theme.js +3 -3
  228. package/lib/components/table/theme/Table.carbon.theme.js +7 -7
  229. package/lib/components/table/theme/TableHead.base.theme.js +1 -1
  230. package/lib/components/table/theme/TableHead.carbon.theme.js +1 -1
  231. package/lib/components/table/theme/TableHeader.base.theme.js +1 -1
  232. package/lib/components/table/theme/TableHeader.carbon.theme.js +2 -2
  233. package/lib/components/table/theme/TableRow.base.theme.js +3 -3
  234. package/lib/components/table/theme/TableRow.carbon.theme.js +3 -3
  235. package/lib/components/tag/Tag.vue.js +4 -4
  236. package/lib/components/textarea/Textarea.vue.d.ts +7 -0
  237. package/lib/components/textarea/Textarea.vue.js +23 -21
  238. package/lib/components/textarea/theme/Textarea.base.theme.js +6 -6
  239. package/lib/components/textarea/theme/Textarea.carbon.theme.js +6 -6
  240. package/lib/components/toggle/Toggle.vue.d.ts +3 -0
  241. package/lib/components/toggle/Toggle.vue.js +26 -26
  242. package/lib/components/toggle/theme/Toggle.base.theme.js +1 -1
  243. package/lib/components/tooltip/ToggleTip.vue.d.ts +14 -0
  244. package/lib/components/tooltip/ToggleTip.vue.js +29 -0
  245. package/lib/components/tooltip/ToggleTip.vue2.js +4 -0
  246. package/lib/components/tooltip/Tooltip.vue.d.ts +22 -3
  247. package/lib/components/tooltip/Tooltip.vue.js +26 -17
  248. package/lib/components/tooltip/__tests__/ToggleTip.spec.d.ts +1 -0
  249. package/lib/components/tooltip/index.d.ts +2 -0
  250. package/lib/composables/keys.d.ts +2 -2
  251. package/lib/composables/useColors.js +9 -9
  252. package/lib/composables/useInputtable.d.ts +1 -0
  253. package/lib/composables/useInputtable.js +20 -19
  254. package/lib/index.js +37 -35
  255. package/lib/index.umd.js +7 -3
  256. package/lib/tailwind.preset.js +0 -1
  257. package/lib/themes/base/index.js +3 -6
  258. package/lib/themes/base/styles.css.js +4 -0
  259. package/lib/version.d.ts +1 -1
  260. package/lib/version.js +1 -1
  261. package/package.json +4 -2
  262. package/src/components/accordion/Accordion.vue +5 -1
  263. package/src/components/accordion/AccordionItem.vue +5 -2
  264. package/src/components/accordion/index.ts +1 -1
  265. package/src/components/accordion/theme/Accordion.carbon.theme.ts +3 -5
  266. package/src/components/accordion/theme/AccordionItem.base.theme.ts +11 -8
  267. package/src/components/accordion/theme/AccordionItem.carbon.theme.ts +2 -30
  268. package/src/components/badge/Badge.vue +1 -1
  269. package/src/components/breadcrumbs/theme/Breadcrumbs.base.theme.ts +1 -1
  270. package/src/components/button/Button.vue +1 -1
  271. package/src/components/button/theme/Button.base.theme.ts +2 -2
  272. package/src/components/card/theme/Card.base.theme.ts +1 -1
  273. package/src/components/carousel/CarouselSlide.vue +9 -4
  274. package/src/components/checkbox/Checkbox.vue +1 -1
  275. package/src/components/checkbox/theme/Checkbox.base.theme.ts +9 -9
  276. package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +2 -2
  277. package/src/components/container/Container.vue +4 -0
  278. package/src/components/container/theme/Container.base.theme.ts +7 -1
  279. package/src/components/divider/Divider.vue +1 -1
  280. package/src/components/divider/theme/Divider.base.theme.ts +2 -2
  281. package/src/components/drawer/Drawer.vue +2 -2
  282. package/src/components/drawer/theme/Drawer.base.theme.ts +1 -1
  283. package/src/components/form/Form.vue +1 -1
  284. package/src/components/form/theme/Form.base.theme.ts +2 -2
  285. package/src/components/form/theme/Form.carbon.theme.ts +1 -1
  286. package/src/components/formGroup/FormGroup.vue +1 -0
  287. package/src/components/formGroup/theme/FormGroup.base.theme.ts +1 -1
  288. package/src/components/icon/theme/Icon.base.theme.ts +2 -2
  289. package/src/components/input/Input.vue +2 -1
  290. package/src/components/input/theme/Input.base.theme.ts +5 -5
  291. package/src/components/input/theme/Input.carbon.theme.ts +6 -6
  292. package/src/components/inputFooter/theme/InputFooter.base.theme.ts +3 -3
  293. package/src/components/inputFooter/theme/InputFooter.carbon.theme.ts +2 -2
  294. package/src/components/label/Label.vue +4 -1
  295. package/src/components/label/theme/Label.base.theme.ts +2 -2
  296. package/src/components/label/theme/Label.carbon.theme.ts +1 -3
  297. package/src/components/link/Link.vue +1 -1
  298. package/src/components/loader/theme/Loader.base.theme.ts +1 -1
  299. package/src/components/loader/theme/Loader.carbon.theme.ts +1 -1
  300. package/src/components/menu/Menu.vue +4 -4
  301. package/src/components/menu/theme/MenuItem.base.theme.ts +30 -34
  302. package/src/components/modal/Modal.vue +11 -4
  303. package/src/components/modal/theme/Modal.base.theme.ts +9 -6
  304. package/src/components/modal/theme/Modal.carbon.theme.ts +3 -3
  305. package/src/components/notifications/Notifications.vue +1 -1
  306. package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
  307. package/src/components/notifications/theme/Notifications.carbon.theme.ts +1 -1
  308. package/src/components/pagination/Pagination.vue +3 -3
  309. package/src/components/popover/Popover.vue +77 -2
  310. package/src/components/popover/theme/PopoverContainer.base.theme.ts +1 -1
  311. package/src/components/popover/theme/PopoverContainer.carbon.theme.ts +1 -1
  312. package/src/components/progress/Progress.vue +1 -1
  313. package/src/components/progress/theme/Progress.base.theme.ts +2 -2
  314. package/src/components/radio/theme/Radio.base.theme.ts +9 -9
  315. package/src/components/radio/theme/Radio.carbon.theme.ts +1 -1
  316. package/src/components/select/Select.vue +7 -7
  317. package/src/components/select/theme/Select.base.theme.ts +8 -8
  318. package/src/components/select/theme/Select.carbon.theme.ts +8 -8
  319. package/src/components/skeleton/theme/Skeleton.base.theme.ts +1 -1
  320. package/src/components/slider/Slider.vue +1 -1
  321. package/src/components/slider/theme/Slider.carbon.theme.ts +1 -1
  322. package/src/components/stepper/Stepper.vue +3 -3
  323. package/src/components/tab/Tab.vue +3 -3
  324. package/src/components/tab/theme/TabGroup.base.theme.ts +4 -4
  325. package/src/components/tab/theme/TabGroup.carbon.theme.ts +3 -3
  326. package/src/components/table/Table.vue +2 -0
  327. package/src/components/table/theme/Table.base.theme.ts +1 -1
  328. package/src/components/table/theme/Table.carbon.theme.ts +2 -2
  329. package/src/components/table/theme/TableHead.base.theme.ts +1 -1
  330. package/src/components/table/theme/TableHead.carbon.theme.ts +1 -1
  331. package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
  332. package/src/components/table/theme/TableHeader.carbon.theme.ts +2 -2
  333. package/src/components/table/theme/TableRow.base.theme.ts +3 -3
  334. package/src/components/table/theme/TableRow.carbon.theme.ts +3 -3
  335. package/src/components/tag/Tag.vue +1 -1
  336. package/src/components/textarea/Textarea.vue +3 -1
  337. package/src/components/textarea/theme/Textarea.base.theme.ts +5 -4
  338. package/src/components/textarea/theme/Textarea.carbon.theme.ts +5 -5
  339. package/src/components/toggle/Toggle.vue +3 -3
  340. package/src/components/toggle/theme/Toggle.base.theme.ts +1 -1
  341. package/src/components/tooltip/ToggleTip.vue +31 -0
  342. package/src/components/tooltip/Tooltip.vue +14 -4
  343. package/src/components/tooltip/__tests__/ToggleTip.spec.ts +11 -0
  344. package/src/components/tooltip/index.ts +3 -0
  345. package/src/composables/keys.ts +2 -2
  346. package/src/composables/useColors.ts +1 -1
  347. package/src/composables/useInputtable.ts +1 -0
  348. package/src/themes/base/index.ts +0 -3
  349. package/src/themes/base/styles.css +4 -0
  350. package/src/version.ts +1 -1
  351. package/volar.d.ts +1 -0
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  const selectProps = {
3
+ ...useColors.props('primary'),
3
4
  ...useCommon.props(),
4
5
  ...useInteractive.props(),
5
6
  ...useInputtable.props(),
@@ -33,6 +34,7 @@ export default {
33
34
  <script setup lang="ts">
34
35
  import { computed, ref, watch, type PropType, type ExtractPublicPropTypes, type Ref, nextTick, unref } from 'vue'
35
36
  import { useEventListener } from '@vueuse/core'
37
+ import { useColors } from '../../composables/useColors'
36
38
  import { useCommon } from '../../composables/useCommon'
37
39
  import { useInputtable } from '../../composables/useInputtable'
38
40
  import { useInteractive } from '../../composables/useInteractive'
@@ -325,6 +327,7 @@ defineExpose({ focus, blur, reset, validate, setError })
325
327
  className,
326
328
  classes.wrapper,
327
329
  ]"
330
+ :tooltip="tooltip"
328
331
  v-on="labelListeners"
329
332
  >
330
333
  <div class="relative">
@@ -347,7 +350,7 @@ defineExpose({ focus, blur, reset, validate, setError })
347
350
  <template v-else>
348
351
  <div
349
352
  v-if="placeholder"
350
- class="text-gray-400 dark:text-gray-500"
353
+ class="text-secondary-400 dark:text-secondary-500"
351
354
  >
352
355
  {{ placeholder }}
353
356
  </div>
@@ -357,10 +360,7 @@ defineExpose({ focus, blur, reset, validate, setError })
357
360
  <x-popover
358
361
  v-else
359
362
  ref="popoverRef"
360
- block
361
363
  :disabled="disabled || loading || readonly"
362
- :dismiss-on-click="!multiple"
363
- align="left"
364
364
  >
365
365
  <div
366
366
  :class="[classes.box]"
@@ -384,7 +384,7 @@ defineExpose({ focus, blur, reset, validate, setError })
384
384
  <template v-else>
385
385
  <div
386
386
  v-if="placeholder"
387
- class="text-gray-400 dark:text-gray-500"
387
+ class="text-secondary-400 dark:text-secondary-500"
388
388
  >
389
389
  {{ placeholder }}
390
390
  </div>
@@ -403,12 +403,12 @@ defineExpose({ focus, blur, reset, validate, setError })
403
403
  :size="size"
404
404
  :disabled="item.disabled"
405
405
  :selected="index === selectedIndex"
406
- color="primary"
406
+ :color="color"
407
407
  filled
408
408
  @click="() => !multiple && popoverRef?.hide()"
409
409
  />
410
410
  </template>
411
- <div v-else class="px-2 text-center text-gray-400">
411
+ <div v-else class="px-2 text-center text-secondary-400">
412
412
  No options
413
413
  </div>
414
414
  </x-popover-container>
@@ -5,9 +5,9 @@ const theme: SelectTheme = {
5
5
  wrapper: '',
6
6
 
7
7
  box: ({ props, data }) => {
8
- const classes = ['w-full border border-gray-300 dark:border-gray-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out rounded-md shadow-sm']
8
+ const classes = ['w-full border border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out rounded-md shadow-sm']
9
9
 
10
- if (!data.errorInternal && !props.disabled) classes.push('hover:border-gray-400 dark:hover:border-gray-500')
10
+ if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
11
11
 
12
12
  if (props.size === 'xs') classes.push('px-2 py-1 text-xs')
13
13
  else if (props.size === 'sm') classes.push('px-2 py-2 text-sm')
@@ -15,11 +15,11 @@ const theme: SelectTheme = {
15
15
  else if (props.size === 'xl') classes.push('px-5 py-4 text-xl')
16
16
  else classes.push('px-3 py-2')
17
17
 
18
- if (props.disabled) classes.push('bg-gray-100 dark:bg-gray-900 text-gray-500 cursor-not-allowed')
19
- else classes.push('bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200')
18
+ if (props.disabled) classes.push('bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed')
19
+ else classes.push('bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
20
20
 
21
21
  if (data.errorInternal) {
22
- classes.push('border-red-500 dark:border-red-400 group-focus:outline-red-500')
22
+ classes.push('border-error-500 dark:border-error-400 group-focus:outline-error-500')
23
23
  } else if (!props.disabled) {
24
24
  classes.push('group-focus:outline-[color:var(--x-select-border)]')
25
25
  }
@@ -27,7 +27,7 @@ const theme: SelectTheme = {
27
27
  return classes
28
28
  },
29
29
 
30
- content: 'py-1 max-h-72 overflow-y-auto',
30
+ content: 'p-1 max-h-72 overflow-y-auto',
31
31
 
32
32
  iconWrapper: 'pointer-events-none absolute inset-y-0 right-0 flex items-center px-2',
33
33
 
@@ -39,8 +39,8 @@ const theme: SelectTheme = {
39
39
  else if (props.size === 'xl') classes.push('h-7 w-7')
40
40
  else classes.push('h-5 w-5')
41
41
 
42
- if (props.disabled) classes.push('text-gray-300 dark:text-gray-500')
43
- else classes.push('text-gray-500 dark:text-gray-400')
42
+ if (props.disabled) classes.push('text-secondary-300 dark:text-secondary-500')
43
+ else classes.push('text-secondary-500 dark:text-secondary-400')
44
44
 
45
45
  return classes
46
46
  },
@@ -5,24 +5,24 @@ const theme: SelectTheme = {
5
5
  wrapper: '',
6
6
 
7
7
  box: ({ props, data }) => {
8
- const classes = ['w-full border-b text-sm px-4 border-gray-300 dark:border-gray-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out']
8
+ const classes = ['w-full border-b text-sm px-4 border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out']
9
9
 
10
- if (!data.errorInternal && !props.disabled) classes.push('hover:border-gray-400 dark:hover:border-gray-500')
10
+ if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
11
11
 
12
12
  if (props.size === 'xs' || props.size === 'sm') classes.push('py-1.5')
13
13
  else if (props.size === 'lg' || props.size === 'xl') classes.push('py-3.5')
14
14
  else classes.push('py-2.5')
15
15
 
16
16
  if (props.disabled) {
17
- classes.push('bg-gray-100 dark:bg-gray-900 text-gray-300 cursor-not-allowed')
17
+ classes.push('bg-secondary-100 dark:bg-secondary-900 text-secondary-300 cursor-not-allowed')
18
18
  } else if (props.readonly) {
19
- classes.push('bg-white dark:bg-gray-900 text-gray-700')
19
+ classes.push('bg-white dark:bg-secondary-900 text-secondary-700')
20
20
  } else {
21
- classes.push('bg-gray-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200')
21
+ classes.push('bg-secondary-50 dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
22
22
  }
23
23
 
24
24
  if (data.errorInternal) {
25
- classes.push('border-red-500 dark:border-red-400 group-focus:outline-red-500')
25
+ classes.push('border-error-500 dark:border-error-400 group-focus:outline-error-500')
26
26
  } else if (!props.disabled) {
27
27
  classes.push('group-focus:outline-[color:var(--x-select-border)]')
28
28
  }
@@ -37,8 +37,8 @@ const theme: SelectTheme = {
37
37
  icon: ({ props }) => {
38
38
  const classes = ['h-5 w-5']
39
39
 
40
- if (props.disabled) classes.push('text-gray-300 dark:text-gray-500')
41
- else classes.push('text-gray-500 dark:text-gray-400')
40
+ if (props.disabled) classes.push('text-secondary-300 dark:text-secondary-500')
41
+ else classes.push('text-secondary-500 dark:text-secondary-400')
42
42
 
43
43
  return classes
44
44
  },
@@ -3,7 +3,7 @@ import type { SkeletonTheme } from '../Skeleton.vue'
3
3
  const theme: SkeletonTheme = {
4
4
  classes: {
5
5
  wrapper: ({ props }) => {
6
- const classes = ['animate-pulse bg-gray-300 dark:bg-gray-600']
6
+ const classes = ['animate-pulse bg-secondary-300 dark:bg-secondary-600']
7
7
 
8
8
  if (props.shape === 'circle') classes.push('w-8 h-8 rounded-full')
9
9
  else classes.push('rounded-md')
@@ -211,6 +211,6 @@ defineExpose({ focus, blur, reset, validate, setError })
211
211
  <slot name="suffix" :value="value"></slot>
212
212
  </div>
213
213
 
214
- <p v-if="errorInternal" class="text-sm text-red-500 mt-1" v-text="errorInternal"></p>
214
+ <p v-if="errorInternal" class="text-sm text-error-500 mt-1" v-text="errorInternal"></p>
215
215
  </x-label>
216
216
  </template>
@@ -4,7 +4,7 @@ const theme: SliderTheme = {
4
4
  classes: {
5
5
  wrapper: '',
6
6
 
7
- drag: 'w-[16px] h-[16px] -mt-[11px] -ml-[8px] rounded-full bg-gray-900',
7
+ drag: 'w-[16px] h-[16px] -mt-[11px] -ml-[8px] rounded-full bg-secondary-900 dark:bg-secondary-100',
8
8
  },
9
9
 
10
10
  styles: ({ props, colors, css }) => {
@@ -116,7 +116,7 @@ const { styles, classes, className } = useTheme('Stepper', {}, props)
116
116
  :key="index"
117
117
  :class="[classes.step, {
118
118
  'cursor-pointer': interactive && !step.disabled,
119
- 'text-gray-400 dark:text-gray-600': step.disabled,
119
+ 'text-secondary-400 dark:text-secondary-600': step.disabled,
120
120
  'flex-1': grow,
121
121
  }]"
122
122
  :disabled="step.disabled || !interactive"
@@ -125,7 +125,7 @@ const { styles, classes, className } = useTheme('Stepper', {}, props)
125
125
  <div class="overflow-hidden">
126
126
  <div
127
127
  class="h-0.5 w-full mb-2"
128
- :class="[step.status === 'complete' || step.status === 'incomplete' ? 'bg-primary-500' : 'bg-gray-200 dark:bg-gray-700']"
128
+ :class="[step.status === 'complete' || step.status === 'incomplete' ? 'bg-primary-500' : 'bg-secondary-200 dark:bg-secondary-700']"
129
129
  ></div>
130
130
  <div class="flex items-start pr-4">
131
131
  <x-icon
@@ -138,7 +138,7 @@ const { styles, classes, className } = useTheme('Stepper', {}, props)
138
138
  />
139
139
  <div class="grid text-left">
140
140
  <div class="text-sm truncate">{{ step.label }}</div>
141
- <div v-if="step.description" class="text-xs text-gray-500">{{ step.description }}</div>
141
+ <div v-if="step.description" class="text-xs text-secondary-500">{{ step.description }}</div>
142
142
  </div>
143
143
  </div>
144
144
  </div>
@@ -139,7 +139,7 @@ const { styles, classes, className } = useTheme('Tab', {}, ref({
139
139
  'text-[color:var(--x-tab-group-text)] dark:text-[color:var(--x-tab-group-dark-text)]': selected,
140
140
  'cursor-pointer': !disabled,
141
141
  'cursor-not-allowed': disabled,
142
- 'cursor-not-allowed text-gray-500': disabled && !selected,
142
+ 'cursor-not-allowed text-secondary-500': disabled && !selected,
143
143
  },
144
144
  ]"
145
145
  :aria-disabled="disabled ? 'true' : undefined"
@@ -165,13 +165,13 @@ const { styles, classes, className } = useTheme('Tab', {}, ref({
165
165
  v-if="removable"
166
166
  size="sm"
167
167
  :icon="closeIcon"
168
- class="ml-2 cursor-pointer hover:text-gray-700 dark:hover:text-gray-500 transition-colors duration-150"
168
+ class="ml-2 cursor-pointer hover:text-secondary-700 dark:hover:text-secondary-500 transition-colors duration-150"
169
169
  @click="(e: Event) => $emit('remove', e)"
170
170
  />
171
171
  </div>
172
172
  </slot>
173
173
  <teleport v-if="selected && teleportTo" :to="teleportTo">
174
- <div role="tabpanel" :class="classes.tabpanel">
174
+ <div v-if="$slots.default" role="tabpanel" :class="classes.tabpanel">
175
175
  <slot></slot>
176
176
  </div>
177
177
  </teleport>
@@ -9,7 +9,7 @@ const theme: TabGroupTheme = {
9
9
 
10
10
  if (!props.fullWidth) c.push('!w-fit')
11
11
  if (props.variant === 'block') c.push('rounded-md')
12
- if (props.variant === 'block' && !props.ghost) c.push('bg-slate-100 dark:bg-gray-800 p-1')
12
+ if (props.variant === 'block' && !props.ghost) c.push('bg-secondary-100 dark:bg-secondary-800 p-1')
13
13
 
14
14
  return c
15
15
  },
@@ -17,7 +17,7 @@ const theme: TabGroupTheme = {
17
17
  list: ({ props }) => {
18
18
  const c = ['flex min-w-full w-fit']
19
19
 
20
- if (props.variant === 'line') c.push('border-b border-gray-200 dark:border-gray-700')
20
+ if (props.variant === 'line') c.push('border-b border-secondary-200 dark:border-secondary-700')
21
21
  if (props.variant === 'line' && !props.grow) c.push('space-x-8')
22
22
  if (props.variant === 'block') c.push('z-[1]')
23
23
  if (props.align === 'center') c.push('justify-center')
@@ -38,7 +38,7 @@ const theme: TabGroupTheme = {
38
38
  },
39
39
 
40
40
  styles: ({ props, colors, css }) => {
41
- const gray = colors.getPalette('gray')
41
+ const secondary = colors.getPalette('secondary')
42
42
  const color = colors.getPalette(props.color)
43
43
 
44
44
  return css.variables({
@@ -46,7 +46,7 @@ const theme: TabGroupTheme = {
46
46
  bg: props.ghost ? color[50] : '#fff',
47
47
  dark: {
48
48
  text: color[400],
49
- bg: props.ghost ? color[900] : gray[700],
49
+ bg: props.ghost ? color[900] : secondary[700],
50
50
  },
51
51
  })
52
52
  },
@@ -9,7 +9,7 @@ const theme: TabGroupTheme = {
9
9
 
10
10
  if (!props.fullWidth) c.push('!w-fit')
11
11
  if (props.variant === 'block') c.push('')
12
- if (props.variant === 'block' && !props.ghost) c.push('bg-gray-200 dark:bg-gray-800')
12
+ if (props.variant === 'block' && !props.ghost) c.push('bg-secondary-200 dark:bg-secondary-800')
13
13
 
14
14
  return c
15
15
  },
@@ -17,7 +17,7 @@ const theme: TabGroupTheme = {
17
17
  list: ({ props }) => {
18
18
  const c = ['flex min-w-full w-fit']
19
19
 
20
- if (props.variant === 'line') c.push('border-b border-gray-200 dark:border-gray-700')
20
+ if (props.variant === 'line') c.push('border-b border-secondary-200 dark:border-secondary-700')
21
21
  if (props.variant === 'line' && !props.grow) c.push('')
22
22
  if (props.variant === 'block') c.push('z-[1] py-1.5')
23
23
  if (props.align === 'center') c.push('justify-center')
@@ -31,7 +31,7 @@ const theme: TabGroupTheme = {
31
31
 
32
32
  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
33
 
34
- if (props.variant === 'block') c.push('border-t-2 border-[color:var(--x-tab-group-text)] dark:border-[color:var(--x-tab-group-dark-text)] h-full top-0 bg-gray-100 dark:bg-gray-700')
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')
35
35
 
36
36
  return c
37
37
  },
@@ -66,6 +66,8 @@ import XSpinner from '../spinner/Spinner.vue'
66
66
  import XSkeleton from '../skeleton/Skeleton.vue'
67
67
  import type { SkeletonShape } from '../skeleton/Skeleton.vue'
68
68
 
69
+ import XIcon from '../icon/Icon.vue'
70
+
69
71
  import { chevronDownIcon } from '../../common/icons'
70
72
 
71
73
  const props = defineProps({
@@ -16,7 +16,7 @@ const theme: TableTheme = {
16
16
  return classes
17
17
  },
18
18
 
19
- loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-gray-300 dark:bg-gray-600 rounded opacity-30',
19
+ loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-secondary-300 dark:bg-secondary-600 rounded opacity-30',
20
20
  },
21
21
  }
22
22
 
@@ -2,7 +2,7 @@ import type { TableTheme } from '../Table.vue'
2
2
 
3
3
  const theme: TableTheme = {
4
4
  classes: {
5
- wrapper: 'w-full h-full shadow-sm overflow-x-auto text-sm bg-white dark:bg-gray-800',
5
+ wrapper: 'w-full h-full shadow-sm overflow-x-auto text-sm bg-white dark:bg-secondary-800',
6
6
 
7
7
  table: ({ props }) => {
8
8
  const classes = ['w-full relative']
@@ -16,7 +16,7 @@ const theme: TableTheme = {
16
16
  return classes
17
17
  },
18
18
 
19
- loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-gray-300 dark:bg-gray-600 rounded opacity-30',
19
+ loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-secondary-300 dark:bg-secondary-600 rounded opacity-30',
20
20
  },
21
21
  }
22
22
 
@@ -3,7 +3,7 @@ import type { TableHeadTheme } from '../TableHead.vue'
3
3
  const theme: TableHeadTheme = {
4
4
  classes: {
5
5
  thead: 'align-bottom',
6
- row: 'text-sm text-gray-600 dark:text-gray-400 border-b',
6
+ row: 'text-sm text-secondary-600 dark:text-secondary-400 border-b',
7
7
  },
8
8
  }
9
9
 
@@ -3,7 +3,7 @@ import type { TableHeadTheme } from '../TableHead.vue'
3
3
  const theme: TableHeadTheme = {
4
4
  classes: {
5
5
  thead: 'align-bottom',
6
- row: 'text-gray-900 dark:text-gray-50',
6
+ row: 'text-secondary-900 dark:text-secondary-50',
7
7
  },
8
8
  }
9
9
 
@@ -5,7 +5,7 @@ const theme: TableHeaderTheme = {
5
5
  th: ({ props }) => {
6
6
  const classes = ['relative py-2 font-semibold tracking-widest uppercase text-xs px-3']
7
7
 
8
- if (props.sortable) classes.push('cursor-pointer hover:text-gray-800 dark:hover:text-gray-300 transition-colors duration-150 ease-in-out')
8
+ if (props.sortable) classes.push('cursor-pointer hover:text-secondary-800 dark:hover:text-secondary-300 transition-colors duration-150 ease-in-out')
9
9
 
10
10
  if (props.stickyHeader) classes.push('sticky top-0')
11
11
 
@@ -3,9 +3,9 @@ import type { TableHeaderTheme } from '../TableHeader.vue'
3
3
  const theme: TableHeaderTheme = {
4
4
  classes: {
5
5
  th: ({ props }) => {
6
- const classes = ['relative py-3.5 font-semibold text-sm px-3 bg-gray-200 dark:bg-gray-700 select-none']
6
+ const classes = ['relative py-3.5 font-semibold text-sm px-3 bg-secondary-200 dark:bg-secondary-700 select-none']
7
7
 
8
- if (props.sortable) classes.push('cursor-pointer hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-150 ease-in-out pr-5')
8
+ if (props.sortable) classes.push('cursor-pointer hover:bg-secondary-300 dark:hover:bg-secondary-600 transition-colors duration-150 ease-in-out pr-5')
9
9
 
10
10
  if (props.stickyHeader) classes.push('sticky top-0')
11
11
 
@@ -6,12 +6,12 @@ const theme: TableRowTheme = {
6
6
  const classes = []
7
7
 
8
8
  if (props.striped) {
9
- classes.push('odd:bg-gray-50 dark:odd:bg-gray-800')
9
+ classes.push('odd:bg-secondary-50 dark:odd:bg-secondary-800')
10
10
  } else {
11
- classes.push('border-b border-gray-200 dark:border-gray-700')
11
+ classes.push('border-b border-secondary-200 dark:border-secondary-700')
12
12
  }
13
13
 
14
- if (props.pointer) classes.push('hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer')
14
+ if (props.pointer) classes.push('hover:bg-secondary-50 dark:hover:bg-secondary-700 cursor-pointer')
15
15
 
16
16
  return classes
17
17
  },
@@ -6,12 +6,12 @@ const theme: TableRowTheme = {
6
6
  const classes = []
7
7
 
8
8
  if (props.striped) {
9
- classes.push('odd:bg-gray-50 dark:odd:bg-gray-800')
9
+ classes.push('odd:bg-secondary-50 dark:odd:bg-secondary-800')
10
10
  } else {
11
- classes.push('border-b border-gray-200 dark:border-gray-700')
11
+ classes.push('border-b border-secondary-200 dark:border-secondary-700')
12
12
  }
13
13
 
14
- if (props.pointer) classes.push('hover:bg-gray-50 dark:hover:bg-gray-600 cursor-pointer')
14
+ if (props.pointer) classes.push('hover:bg-secondary-50 dark:hover:bg-secondary-600 cursor-pointer')
15
15
 
16
16
  return classes
17
17
  },
@@ -70,7 +70,7 @@ const { styles, classes, className } = useTheme('Tag', {}, props)
70
70
  <x-icon
71
71
  :size="closeIconSize"
72
72
  :icon="closeIcon"
73
- class="ml-1.5 cursor-pointer hover:text-gray-700 transition-colors duration-150"
73
+ class="ml-1.5 cursor-pointer hover:text-secondary-700 transition-colors duration-150"
74
74
  @click="(e: Event) => $emit('remove', e)"
75
75
  />
76
76
  </span>
@@ -19,6 +19,7 @@ const textareaProps = {
19
19
  adjustToText: Boolean,
20
20
  preventEnter: Boolean,
21
21
  block: Boolean,
22
+ resizable: Boolean,
22
23
  }
23
24
 
24
25
  export type TextareaProps = ExtractPublicPropTypes<typeof textareaProps>
@@ -114,6 +115,7 @@ defineExpose({ focus, blur, reset, validate, setError })
114
115
  className,
115
116
  classes.wrapper,
116
117
  ]"
118
+ :tooltip="tooltip"
117
119
  >
118
120
  <textarea
119
121
  :id="id"
@@ -123,7 +125,7 @@ defineExpose({ focus, blur, reset, validate, setError })
123
125
  :class="[
124
126
  classes.input,
125
127
  errorInternal
126
- ? 'border-red-500 dark:border-red-400 focus:outline-red-500'
128
+ ? 'border-error-500 dark:border-error-400 focus:outline-error-500'
127
129
  : 'focus:outline-[color:var(--x-textarea-border)]',
128
130
  ]"
129
131
  :disabled="disabled"
@@ -5,9 +5,10 @@ const theme: TextareaTheme = {
5
5
  wrapper: '',
6
6
 
7
7
  input: ({ props, data }) => {
8
- const classes = ['resize-none appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 outline-transparent outline outline-2 outline-offset-[-1px] transition duration-150 ease-in-out border-gray-300 dark:border-gray-700 border shadow-sm rounded-md']
8
+ const classes = ['appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border shadow-sm rounded-md']
9
9
 
10
- if (!data.errorInternal && !props.disabled) classes.push('hover:border-gray-400 dark:hover:border-gray-500')
10
+ if (!props.resizable) classes.push('resize-none')
11
+ if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
11
12
 
12
13
  if (props.size === 'xs') classes.push('px-2 py-1 text-xs')
13
14
  else if (props.size === 'sm') classes.push('px-2 py-2 text-sm')
@@ -16,8 +17,8 @@ const theme: TextareaTheme = {
16
17
  else classes.push('px-3 py-2')
17
18
 
18
19
  classes.push(props.disabled
19
- ? 'bg-gray-100 dark:bg-gray-900 text-gray-500 cursor-not-allowed'
20
- : 'bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200')
20
+ ? 'bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed'
21
+ : 'bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
21
22
 
22
23
  return classes
23
24
  },
@@ -5,20 +5,20 @@ const theme: TextareaTheme = {
5
5
  wrapper: '',
6
6
 
7
7
  input: ({ props, data }) => {
8
- const classes = ['resize-none appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 outline-transparent outline outline-2 outline-offset-[-1px] transition duration-150 ease-in-out border-gray-300 dark:border-gray-700 border-b text-sm px-4']
8
+ const classes = ['resize-none appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border-b text-sm px-4']
9
9
 
10
- if (!data.errorInternal && !props.disabled) classes.push('hover:border-gray-400 dark:hover:border-gray-500')
10
+ if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
11
11
 
12
12
  if (props.size === 'xs' || props.size === 'sm') classes.push('py-1.5')
13
13
  else if (props.size === 'lg' || props.size === 'xl') classes.push('py-3.5')
14
14
  else classes.push('py-2.5')
15
15
 
16
16
  if (props.disabled) {
17
- classes.push('bg-gray-100 dark:bg-gray-900 text-gray-300 cursor-not-allowed')
17
+ classes.push('bg-secondary-100 dark:bg-secondary-900 text-secondary-300 cursor-not-allowed')
18
18
  } else if (props.readonly) {
19
- classes.push('bg-white dark:bg-gray-900 text-gray-700')
19
+ classes.push('bg-white dark:bg-secondary-900 text-secondary-700')
20
20
  } else {
21
- classes.push('bg-gray-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200')
21
+ classes.push('bg-secondary-50 dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
22
22
  }
23
23
 
24
24
  return classes
@@ -76,8 +76,8 @@ defineExpose({ focus, blur, reset, validate, setError })
76
76
  :style="styles"
77
77
  :class="{
78
78
  [`shadow-lg shadow-${color}-500/50`]: glow && modelValue,
79
- 'bg-gray-300 dark:bg-gray-500': !disabled && !checked && !loading,
80
- 'bg-gray-100 dark:bg-gray-700': disabled || loading,
79
+ 'bg-secondary-300 dark:bg-secondary-500': !disabled && !checked && !loading,
80
+ 'bg-secondary-100 dark:bg-secondary-700': disabled || loading,
81
81
  'bg-[color:var(--x-toggle-bg)] dark:bg-[color:var(--x-toggle-dark-bg)]': !disabled && checked,
82
82
  }"
83
83
  >
@@ -102,7 +102,7 @@ defineExpose({ focus, blur, reset, validate, setError })
102
102
  'translate-x-full': checked,
103
103
  'shadow': !disabled
104
104
  },
105
- disabled ? 'bg-gray-50 dark:bg-gray-800' : 'bg-white dark:bg-gray-800'
105
+ disabled ? 'bg-secondary-50 dark:bg-secondary-800' : 'bg-white dark:bg-secondary-800'
106
106
  ]"
107
107
  ></div>
108
108
  </div>
@@ -5,7 +5,7 @@ const theme: ToggleTheme = {
5
5
  wrapper: '',
6
6
 
7
7
  label: ({ props }) => {
8
- const c = 'font-medium text-gray-800 dark:text-gray-200'
8
+ const c = 'font-medium text-secondary-800 dark:text-secondary-200'
9
9
 
10
10
  if (props.size === 'xs') return c + ' text-xs'
11
11
  else if (props.size === 'sm') return c + ' text-sm'
@@ -0,0 +1,31 @@
1
+ <script lang="ts">
2
+ const toggleTipProps = {
3
+ content: String,
4
+ icon: String,
5
+ }
6
+
7
+ export type ToggleTipProps = ExtractPublicPropTypes<typeof toggleTipProps>
8
+
9
+ export default { name: 'XToggleTip' }
10
+ </script>
11
+
12
+ <script setup lang="ts">
13
+ import { computed, type ExtractPublicPropTypes } from 'vue'
14
+ import XTooltip from './Tooltip.vue'
15
+ import XIcon from '../icon/Icon.vue'
16
+
17
+ import { infoIcon } from '../../common/icons'
18
+
19
+ const props = defineProps(toggleTipProps)
20
+
21
+ const computedIcon = computed(() => props.icon || infoIcon)
22
+ </script>
23
+
24
+ <template>
25
+ <x-tooltip placement="auto">
26
+ <x-icon :icon="computedIcon" class="text-secondary-500 dark:text-secondary-300 cursor-pointer" />
27
+ <template #tooltip>
28
+ <div v-html="content"></div>
29
+ </template>
30
+ </x-tooltip>
31
+ </template>
@@ -1,5 +1,12 @@
1
1
  <script lang="ts">
2
- const tooltipProps = {}
2
+ const tooltipProps = {
3
+ placement: {
4
+ type: String as PropType<PopoverPlacement>,
5
+ default: 'bottom',
6
+ },
7
+ }
8
+
9
+ export type PopoverPlacement = Placement
3
10
 
4
11
  export type TooltipProps = ExtractPublicPropTypes<typeof tooltipProps>
5
12
 
@@ -7,17 +14,20 @@ export default { name: 'XTooltip' }
7
14
  </script>
8
15
 
9
16
  <script setup lang="ts">
10
- import type { ExtractPublicPropTypes } from 'vue'
17
+ import type { ExtractPublicPropTypes, PropType } from 'vue'
11
18
  import XPopover from '../../components/popover/Popover.vue'
12
19
  import XPopoverContainer from '../../components/popover/PopoverContainer.vue'
20
+ import { type Placement } from 'floating-vue'
21
+
22
+ const props = defineProps(tooltipProps)
13
23
  </script>
14
24
 
15
25
  <template>
16
- <x-popover :triggers="['hover']" class="inline-block">
26
+ <x-popover :triggers="['hover', 'click']" class="inline-block" :hide-arrow="false" :placement="placement">
17
27
  <slot></slot>
18
28
  <template #content>
19
29
  <div class="dark">
20
- <x-popover-container class="p-2 text-white text-sm w-max max-w-xs">
30
+ <x-popover-container class="p-2 text-white text-xs w-max max-w-xs">
21
31
  <slot name="tooltip"></slot>
22
32
  </x-popover-container>
23
33
  </div>
@@ -0,0 +1,11 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { mount } from '@vue/test-utils'
3
+ import ToggleTip from '../ToggleTip.vue'
4
+
5
+ describe('ToggleTip', () => {
6
+ it('renders without errors', () => {
7
+ const wrapper = mount(ToggleTip)
8
+
9
+ expect(wrapper.vm).toBeTruthy()
10
+ })
11
+ })
@@ -1,2 +1,5 @@
1
1
  export { default as XTooltip } from './Tooltip.vue'
2
2
  export type { TooltipProps } from './Tooltip.vue'
3
+
4
+ export { default as XToggleTip } from './ToggleTip.vue'
5
+ export type { ToggleTipProps } from './ToggleTip.vue'