@toife/vue 3.1.6 → 3.2.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 (385) hide show
  1. package/README.md +1 -52
  2. package/dist/components/action/action.composable.d.ts +44 -0
  3. package/dist/components/action/action.vue.d.ts +16 -0
  4. package/dist/components/action/index.d.ts +2 -0
  5. package/dist/components/app/app.vue.d.ts +11 -0
  6. package/dist/components/app/index.d.ts +1 -0
  7. package/dist/components/avatar/avatar.vue.d.ts +8 -0
  8. package/dist/components/avatar/index.d.ts +1 -0
  9. package/dist/components/button/button.vue.d.ts +9 -0
  10. package/dist/components/button/index.d.ts +1 -0
  11. package/dist/components/cable/cable.vue.d.ts +6 -0
  12. package/dist/components/cable/index.d.ts +1 -0
  13. package/dist/components/card/card/card.vue.d.ts +7 -0
  14. package/dist/components/card/card/index.d.ts +1 -0
  15. package/dist/components/card/card-body/card-body.vue.d.ts +2 -0
  16. package/dist/components/card/card-body/index.d.ts +1 -0
  17. package/dist/components/card/card-footer/card-footer.vue.d.ts +2 -0
  18. package/dist/components/card/card-footer/index.d.ts +1 -0
  19. package/dist/components/card/card-header/card-header.vue.d.ts +2 -0
  20. package/dist/components/card/card-header/index.d.ts +1 -0
  21. package/dist/components/card/index.d.ts +4 -0
  22. package/dist/components/checkbox/checkbox.vue.d.ts +18 -0
  23. package/dist/components/checkbox/index.d.ts +1 -0
  24. package/dist/components/collapse/collapse.vue.d.ts +12 -0
  25. package/dist/components/collapse/index.d.ts +1 -0
  26. package/dist/components/container/container.vue.d.ts +2 -0
  27. package/dist/components/container/index.d.ts +1 -0
  28. package/dist/components/decision-modal/decision-modal.composable.d.ts +46 -0
  29. package/dist/components/decision-modal/decision-modal.vue.d.ts +16 -0
  30. package/dist/components/decision-modal/index.d.ts +2 -0
  31. package/dist/components/divider/divider.vue.d.ts +5 -0
  32. package/dist/components/divider/index.d.ts +1 -0
  33. package/dist/components/dropdown/dropdown.vue.d.ts +20 -0
  34. package/dist/components/dropdown/index.d.ts +1 -0
  35. package/dist/components/field/field.vue.d.ts +30 -0
  36. package/dist/components/field/index.d.ts +1 -0
  37. package/dist/components/form-group/form-group.vue.d.ts +5 -0
  38. package/dist/components/form-group/index.d.ts +1 -0
  39. package/dist/components/gesture-indicator/gesture-indicator.vue.d.ts +6 -0
  40. package/dist/components/gesture-indicator/index.d.ts +1 -0
  41. package/dist/components/image/image.vue.d.ts +3 -0
  42. package/dist/components/image/index.d.ts +1 -0
  43. package/dist/components/index.d.ts +32 -0
  44. package/dist/components/layout/flex/flex.vue.d.ts +5 -0
  45. package/dist/components/layout/flex/index.d.ts +1 -0
  46. package/dist/components/layout/flex-item/flex-item.vue.d.ts +5 -0
  47. package/dist/components/layout/flex-item/index.d.ts +1 -0
  48. package/dist/components/layout/grid/grid.vue.d.ts +5 -0
  49. package/dist/components/layout/grid/index.d.ts +1 -0
  50. package/dist/components/layout/grid-item/grid-item.vue.d.ts +5 -0
  51. package/dist/components/layout/grid-item/index.d.ts +1 -0
  52. package/dist/components/layout/index.d.ts +4 -0
  53. package/dist/components/modal/index.d.ts +1 -0
  54. package/dist/components/modal/modal.vue.d.ts +17 -0
  55. package/dist/components/page/index.d.ts +1 -0
  56. package/dist/components/page/page.vue.d.ts +2 -0
  57. package/dist/components/present/index.d.ts +2 -0
  58. package/dist/components/present/present.composable.d.ts +5 -0
  59. package/dist/components/present/present.vue.d.ts +18 -0
  60. package/dist/components/radio/index.d.ts +2 -0
  61. package/dist/components/radio/radio/index.d.ts +1 -0
  62. package/dist/components/radio/radio/radio.vue.d.ts +7 -0
  63. package/dist/components/radio/radio-group/index.d.ts +1 -0
  64. package/dist/components/radio/radio-group/radio-group.vue.d.ts +13 -0
  65. package/dist/components/refresher/index.d.ts +1 -0
  66. package/dist/components/refresher/refresher.vue.d.ts +12 -0
  67. package/dist/components/route/index.d.ts +5 -0
  68. package/dist/components/route/route-navigator/index.d.ts +1 -0
  69. package/dist/components/route/route-navigator/route-navigator.vue.d.ts +11 -0
  70. package/dist/components/route/route-outlet/index.d.ts +1 -0
  71. package/dist/components/route/route-outlet/route-outlet.vue.d.ts +5 -0
  72. package/dist/components/route/route-provider/index.d.ts +1 -0
  73. package/dist/components/route/route-provider/route-provider.vue.d.ts +3 -0
  74. package/dist/components/route/route-wrapper/index.d.ts +2 -0
  75. package/dist/components/route/route-wrapper/route-wrapper.composable.d.ts +6 -0
  76. package/dist/components/route/route-wrapper/route-wrapper.vue.d.ts +5 -0
  77. package/dist/components/route/route.util.d.ts +3 -0
  78. package/dist/components/segmented-field/index.d.ts +1 -0
  79. package/dist/components/segmented-field/segmented-field.vue.d.ts +28 -0
  80. package/dist/components/select/index.d.ts +1 -0
  81. package/dist/components/select/select.vue.d.ts +19 -0
  82. package/dist/components/skeleton/index.d.ts +1 -0
  83. package/dist/components/skeleton/skeleton.vue.d.ts +6 -0
  84. package/dist/components/slide-range/index.d.ts +1 -0
  85. package/dist/components/slide-range/slide-range.vue.d.ts +17 -0
  86. package/dist/components/switch/index.d.ts +1 -0
  87. package/dist/components/switch/switch.vue.d.ts +13 -0
  88. package/dist/components/tabs/index.d.ts +2 -0
  89. package/dist/components/tabs/tab/index.d.ts +1 -0
  90. package/dist/components/tabs/tab/tab.vue.d.ts +5 -0
  91. package/dist/components/tabs/tabs/index.d.ts +1 -0
  92. package/dist/components/tabs/tabs/tabs.vue.d.ts +14 -0
  93. package/dist/components/tag/index.d.ts +1 -0
  94. package/dist/components/tag/tag.vue.d.ts +6 -0
  95. package/dist/components/toast/index.d.ts +3 -0
  96. package/dist/components/toast/toast/index.d.ts +1 -0
  97. package/dist/components/toast/toast/toast.vue.d.ts +5 -0
  98. package/dist/components/toast/toast-content/index.d.ts +1 -0
  99. package/dist/components/toast/toast-content/toast-content.vue.d.ts +11 -0
  100. package/dist/components/toast/toast.composable.d.ts +22 -0
  101. package/dist/components/toolbar/index.d.ts +1 -0
  102. package/dist/components/toolbar/toolbar.vue.d.ts +7 -0
  103. package/dist/factory.d.ts +38 -0
  104. package/dist/index.d.ts +3 -0
  105. package/dist/index.es.js +3491 -0
  106. package/dist/index.umd.js +1 -0
  107. package/dist/shared/provider-state.d.ts +5 -0
  108. package/dist/styles/action.css +1 -0
  109. package/dist/styles/app.css +1 -0
  110. package/dist/styles/avatar.css +1 -0
  111. package/dist/styles/button.css +1 -0
  112. package/dist/styles/cable.css +1 -0
  113. package/dist/styles/card-body.css +1 -0
  114. package/dist/styles/card-footer.css +1 -0
  115. package/dist/styles/card-header.css +1 -0
  116. package/dist/styles/card.css +1 -0
  117. package/dist/styles/checkbox.css +1 -0
  118. package/dist/styles/collapse.css +1 -0
  119. package/dist/styles/container.css +1 -0
  120. package/dist/styles/decision-modal.css +1 -0
  121. package/dist/styles/divider.css +1 -0
  122. package/dist/styles/dropdown.css +1 -0
  123. package/dist/styles/field.css +1 -0
  124. package/dist/styles/flex-item.css +1 -0
  125. package/dist/styles/flex.css +1 -0
  126. package/dist/styles/form-group.css +1 -0
  127. package/dist/styles/gesture-indicator.css +1 -0
  128. package/dist/styles/grid-item.css +1 -0
  129. package/dist/styles/grid.css +1 -0
  130. package/dist/styles/index.css +40 -0
  131. package/dist/styles/modal.css +1 -0
  132. package/dist/styles/page.css +1 -0
  133. package/dist/styles/present.css +1 -0
  134. package/dist/styles/radio-group.css +1 -0
  135. package/dist/styles/radio.css +1 -0
  136. package/dist/styles/refresher.css +1 -0
  137. package/dist/styles/route-navigator.css +1 -0
  138. package/dist/styles/segmented-field.css +1 -0
  139. package/dist/styles/select.css +1 -0
  140. package/dist/styles/skeleton.css +1 -0
  141. package/dist/styles/slide-range.css +1 -0
  142. package/dist/styles/switch.css +1 -0
  143. package/dist/styles/tab.css +1 -0
  144. package/dist/styles/tabs.css +1 -0
  145. package/dist/styles/tag.css +1 -0
  146. package/dist/styles/toast-content.css +1 -0
  147. package/dist/styles/toast.css +1 -0
  148. package/dist/styles/toolbar.css +1 -0
  149. package/dist/types.d.ts +4 -0
  150. package/package.json +23 -13
  151. package/src/components/action/action.composable.ts +0 -32
  152. package/src/components/action/action.html +0 -25
  153. package/src/components/action/action.scss +0 -106
  154. package/src/components/action/action.type.ts +0 -44
  155. package/src/components/action/action.vue +0 -72
  156. package/src/components/action/index.ts +0 -9
  157. package/src/components/app/app.constants.ts +0 -1
  158. package/src/components/app/app.html +0 -24
  159. package/src/components/app/app.scss +0 -27
  160. package/src/components/app/app.type.ts +0 -30
  161. package/src/components/app/app.vue +0 -46
  162. package/src/components/app/index.ts +0 -3
  163. package/src/components/avatar/avatar.html +0 -3
  164. package/src/components/avatar/avatar.scss +0 -45
  165. package/src/components/avatar/avatar.type.ts +0 -8
  166. package/src/components/avatar/avatar.vue +0 -44
  167. package/src/components/avatar/index.ts +0 -2
  168. package/src/components/button/button.html +0 -6
  169. package/src/components/button/button.scss +0 -124
  170. package/src/components/button/button.type.ts +0 -14
  171. package/src/components/button/button.vue +0 -61
  172. package/src/components/button/index.ts +0 -2
  173. package/src/components/cable/cable.constants.ts +0 -1
  174. package/src/components/cable/cable.html +0 -3
  175. package/src/components/cable/cable.scss +0 -37
  176. package/src/components/cable/cable.type.ts +0 -11
  177. package/src/components/cable/cable.vue +0 -33
  178. package/src/components/cable/index.ts +0 -3
  179. package/src/components/card/card/card.constants.ts +0 -1
  180. package/src/components/card/card/card.html +0 -3
  181. package/src/components/card/card/card.scss +0 -37
  182. package/src/components/card/card/card.type.ts +0 -14
  183. package/src/components/card/card/card.vue +0 -62
  184. package/src/components/card/card/index.ts +0 -3
  185. package/src/components/card/card-body/card-body.html +0 -3
  186. package/src/components/card/card-body/card-body.scss +0 -23
  187. package/src/components/card/card-body/card-body.vue +0 -9
  188. package/src/components/card/card-body/index.ts +0 -1
  189. package/src/components/card/card-footer/card-footer.html +0 -3
  190. package/src/components/card/card-footer/card-footer.scss +0 -32
  191. package/src/components/card/card-footer/card-footer.vue +0 -25
  192. package/src/components/card/card-footer/index.ts +0 -1
  193. package/src/components/card/card-header/card-header.html +0 -3
  194. package/src/components/card/card-header/card-header.scss +0 -32
  195. package/src/components/card/card-header/card-header.vue +0 -25
  196. package/src/components/card/card-header/index.ts +0 -1
  197. package/src/components/card/index.ts +0 -4
  198. package/src/components/checkbox/checkbox.html +0 -12
  199. package/src/components/checkbox/checkbox.scss +0 -150
  200. package/src/components/checkbox/checkbox.type.ts +0 -19
  201. package/src/components/checkbox/checkbox.vue +0 -80
  202. package/src/components/checkbox/index.ts +0 -2
  203. package/src/components/collapse/collapse.html +0 -16
  204. package/src/components/collapse/collapse.scss +0 -56
  205. package/src/components/collapse/collapse.type.ts +0 -11
  206. package/src/components/collapse/collapse.vue +0 -127
  207. package/src/components/collapse/index.ts +0 -2
  208. package/src/components/container/container.html +0 -1
  209. package/src/components/container/container.scss +0 -10
  210. package/src/components/container/container.vue +0 -10
  211. package/src/components/container/index.ts +0 -1
  212. package/src/components/decision-modal/decision-modal.composable.ts +0 -33
  213. package/src/components/decision-modal/decision-modal.html +0 -29
  214. package/src/components/decision-modal/decision-modal.scss +0 -144
  215. package/src/components/decision-modal/decision-modal.type.ts +0 -35
  216. package/src/components/decision-modal/decision-modal.vue +0 -96
  217. package/src/components/decision-modal/index.ts +0 -9
  218. package/src/components/divider/divider.html +0 -1
  219. package/src/components/divider/divider.scss +0 -29
  220. package/src/components/divider/divider.type.ts +0 -6
  221. package/src/components/divider/divider.vue +0 -31
  222. package/src/components/divider/index.ts +0 -2
  223. package/src/components/dropdown/dropdown.html +0 -6
  224. package/src/components/dropdown/dropdown.scss +0 -71
  225. package/src/components/dropdown/dropdown.type.ts +0 -22
  226. package/src/components/dropdown/dropdown.vue +0 -111
  227. package/src/components/dropdown/index.ts +0 -2
  228. package/src/components/field/field.html +0 -31
  229. package/src/components/field/field.scss +0 -184
  230. package/src/components/field/field.type.ts +0 -43
  231. package/src/components/field/field.vue +0 -123
  232. package/src/components/field/index.ts +0 -2
  233. package/src/components/form-group/form-group.html +0 -3
  234. package/src/components/form-group/form-group.scss +0 -91
  235. package/src/components/form-group/form-group.type.ts +0 -5
  236. package/src/components/form-group/form-group.vue +0 -21
  237. package/src/components/form-group/index.ts +0 -2
  238. package/src/components/gesture-indicator/gesture-indicator.html +0 -1
  239. package/src/components/gesture-indicator/gesture-indicator.scss +0 -47
  240. package/src/components/gesture-indicator/gesture-indicator.type.ts +0 -5
  241. package/src/components/gesture-indicator/gesture-indicator.vue +0 -31
  242. package/src/components/gesture-indicator/index.ts +0 -1
  243. package/src/components/image/image.html +0 -1
  244. package/src/components/image/image.type.ts +0 -5
  245. package/src/components/image/image.vue +0 -29
  246. package/src/components/image/index.ts +0 -2
  247. package/src/components/index.ts +0 -31
  248. package/src/components/layout/flex/flex.html +0 -1
  249. package/src/components/layout/flex/flex.scss +0 -57
  250. package/src/components/layout/flex/flex.type.ts +0 -15
  251. package/src/components/layout/flex/flex.vue +0 -34
  252. package/src/components/layout/flex/index.ts +0 -2
  253. package/src/components/layout/flex-item/flex-item.html +0 -1
  254. package/src/components/layout/flex-item/flex-item.scss +0 -48
  255. package/src/components/layout/flex-item/flex-item.type.ts +0 -11
  256. package/src/components/layout/flex-item/flex-item.vue +0 -27
  257. package/src/components/layout/flex-item/index.ts +0 -2
  258. package/src/components/layout/grid/grid.html +0 -1
  259. package/src/components/layout/grid/grid.scss +0 -51
  260. package/src/components/layout/grid/grid.type.ts +0 -12
  261. package/src/components/layout/grid/grid.vue +0 -32
  262. package/src/components/layout/grid/index.ts +0 -2
  263. package/src/components/layout/grid-item/grid-item.html +0 -1
  264. package/src/components/layout/grid-item/grid-item.scss +0 -49
  265. package/src/components/layout/grid-item/grid-item.type.ts +0 -14
  266. package/src/components/layout/grid-item/grid-item.vue +0 -27
  267. package/src/components/layout/grid-item/index.ts +0 -2
  268. package/src/components/layout/index.ts +0 -4
  269. package/src/components/modal/index.ts +0 -2
  270. package/src/components/modal/modal.html +0 -20
  271. package/src/components/modal/modal.scss +0 -80
  272. package/src/components/modal/modal.type.ts +0 -21
  273. package/src/components/modal/modal.vue +0 -251
  274. package/src/components/page/index.ts +0 -1
  275. package/src/components/page/page.html +0 -3
  276. package/src/components/page/page.scss +0 -17
  277. package/src/components/page/page.vue +0 -10
  278. package/src/components/present/index.ts +0 -3
  279. package/src/components/present/present.composable.ts +0 -22
  280. package/src/components/present/present.html +0 -9
  281. package/src/components/present/present.scss +0 -81
  282. package/src/components/present/present.type.ts +0 -26
  283. package/src/components/present/present.vue +0 -198
  284. package/src/components/radio/index.ts +0 -2
  285. package/src/components/radio/radio/index.ts +0 -2
  286. package/src/components/radio/radio/radio.html +0 -11
  287. package/src/components/radio/radio/radio.scss +0 -142
  288. package/src/components/radio/radio/radio.type.ts +0 -13
  289. package/src/components/radio/radio/radio.vue +0 -87
  290. package/src/components/radio/radio-group/index.ts +0 -7
  291. package/src/components/radio/radio-group/radio-group.constants.ts +0 -1
  292. package/src/components/radio/radio-group/radio-group.html +0 -3
  293. package/src/components/radio/radio-group/radio-group.scss +0 -16
  294. package/src/components/radio/radio-group/radio-group.type.ts +0 -28
  295. package/src/components/radio/radio-group/radio-group.vue +0 -57
  296. package/src/components/refresher/index.ts +0 -2
  297. package/src/components/refresher/refresher.html +0 -3
  298. package/src/components/refresher/refresher.scss +0 -18
  299. package/src/components/refresher/refresher.type.ts +0 -16
  300. package/src/components/refresher/refresher.vue +0 -123
  301. package/src/components/route/index.ts +0 -5
  302. package/src/components/route/route-navigator/index.ts +0 -2
  303. package/src/components/route/route-navigator/route-navigator.html +0 -19
  304. package/src/components/route/route-navigator/route-navigator.scss +0 -127
  305. package/src/components/route/route-navigator/route-navigator.type.ts +0 -36
  306. package/src/components/route/route-navigator/route-navigator.vue +0 -275
  307. package/src/components/route/route-outlet/index.ts +0 -1
  308. package/src/components/route/route-outlet/route-outlet.html +0 -1
  309. package/src/components/route/route-outlet/route-outlet.vue +0 -39
  310. package/src/components/route/route-provider/index.ts +0 -3
  311. package/src/components/route/route-provider/route-provider.constant.ts +0 -1
  312. package/src/components/route/route-provider/route-provider.html +0 -1
  313. package/src/components/route/route-provider/route-provider.type.ts +0 -10
  314. package/src/components/route/route-provider/route-provider.vue +0 -20
  315. package/src/components/route/route-wrapper/index.ts +0 -3
  316. package/src/components/route/route-wrapper/route-wrapper.composable.ts +0 -49
  317. package/src/components/route/route-wrapper/route-wrapper.html +0 -3
  318. package/src/components/route/route-wrapper/route-wrapper.type.ts +0 -3
  319. package/src/components/route/route-wrapper/route-wrapper.vue +0 -45
  320. package/src/components/route/route.type.ts +0 -7
  321. package/src/components/route/route.util.ts +0 -9
  322. package/src/components/segmented-field/index.ts +0 -7
  323. package/src/components/segmented-field/segmented-field.html +0 -17
  324. package/src/components/segmented-field/segmented-field.scss +0 -53
  325. package/src/components/segmented-field/segmented-field.type.ts +0 -29
  326. package/src/components/segmented-field/segmented-field.vue +0 -145
  327. package/src/components/select/index.ts +0 -2
  328. package/src/components/select/select.html +0 -29
  329. package/src/components/select/select.scss +0 -129
  330. package/src/components/select/select.type.ts +0 -45
  331. package/src/components/select/select.vue +0 -119
  332. package/src/components/skeleton/index.ts +0 -2
  333. package/src/components/skeleton/skeleton.html +0 -1
  334. package/src/components/skeleton/skeleton.scss +0 -52
  335. package/src/components/skeleton/skeleton.type.ts +0 -7
  336. package/src/components/skeleton/skeleton.vue +0 -38
  337. package/src/components/slide-range/index.ts +0 -2
  338. package/src/components/slide-range/slide-range.html +0 -19
  339. package/src/components/slide-range/slide-range.scss +0 -164
  340. package/src/components/slide-range/slide-range.type.ts +0 -16
  341. package/src/components/slide-range/slide-range.vue +0 -230
  342. package/src/components/switch/index.ts +0 -2
  343. package/src/components/switch/switch.html +0 -14
  344. package/src/components/switch/switch.scss +0 -128
  345. package/src/components/switch/switch.type.ts +0 -17
  346. package/src/components/switch/switch.vue +0 -97
  347. package/src/components/tabs/index.ts +0 -2
  348. package/src/components/tabs/tab/index.ts +0 -2
  349. package/src/components/tabs/tab/tab.html +0 -5
  350. package/src/components/tabs/tab/tab.scss +0 -13
  351. package/src/components/tabs/tab/tab.type.ts +0 -5
  352. package/src/components/tabs/tab/tab.vue +0 -40
  353. package/src/components/tabs/tabs/index.ts +0 -10
  354. package/src/components/tabs/tabs/tabs.constants.ts +0 -1
  355. package/src/components/tabs/tabs/tabs.html +0 -3
  356. package/src/components/tabs/tabs/tabs.scss +0 -337
  357. package/src/components/tabs/tabs/tabs.type.ts +0 -38
  358. package/src/components/tabs/tabs/tabs.vue +0 -177
  359. package/src/components/toast/index.ts +0 -4
  360. package/src/components/toast/toast/index.ts +0 -1
  361. package/src/components/toast/toast/toast.html +0 -9
  362. package/src/components/toast/toast/toast.scss +0 -61
  363. package/src/components/toast/toast/toast.vue +0 -34
  364. package/src/components/toast/toast-content/index.ts +0 -1
  365. package/src/components/toast/toast-content/toast-content.html +0 -1
  366. package/src/components/toast/toast-content/toast-content.scss +0 -42
  367. package/src/components/toast/toast-content/toast-content.vue +0 -53
  368. package/src/components/toast/toast.composable.ts +0 -22
  369. package/src/components/toast/toast.type.ts +0 -25
  370. package/src/components/toolbar/index.ts +0 -2
  371. package/src/components/toolbar/toolbar.html +0 -3
  372. package/src/components/toolbar/toolbar.scss +0 -64
  373. package/src/components/toolbar/toolbar.type.ts +0 -7
  374. package/src/components/toolbar/toolbar.vue +0 -41
  375. package/src/env.d.ts +0 -7
  376. package/src/factory.ts +0 -152
  377. package/src/index.ts +0 -4
  378. package/src/type.ts +0 -4
  379. package/src/utils/element.md +0 -33
  380. package/src/utils/element.ts +0 -22
  381. package/src/utils/events.md +0 -29
  382. package/src/utils/events.ts +0 -18
  383. package/src/utils/index.ts +0 -3
  384. package/src/utils/style/index.ts +0 -57
  385. package/src/utils/style.md +0 -49
@@ -1,5 +0,0 @@
1
- // Type definitions
2
- export type TabProps = {
3
- value?: string;
4
- disabled?: boolean;
5
- };
@@ -1,40 +0,0 @@
1
- <template src="./tab.html"></template>
2
- <style lang="scss" src="./tab.scss" scoped></style>
3
- <script lang="ts" setup>
4
- import { computed, inject } from "vue";
5
- import { Button as CustomButton } from "../../button";
6
- import { type TabProps } from "./tab.type";
7
- import { cssPrefix } from "../../../utils";
8
- import { type TabsProviderState, TABS_PROVIDER_STATE_KEY } from "../tabs";
9
-
10
- // Component setup (props, emits, injects)
11
- // ----------------------------------------------------------------------------
12
- const props = withDefaults(defineProps<TabProps>(), {
13
- disabled: false,
14
- });
15
- const tabsState = inject<TabsProviderState>(TABS_PROVIDER_STATE_KEY);
16
-
17
- // Computed properties
18
- // ----------------------------------------------------------------------------
19
- const role = computed(() => tabsState?.role.value || "");
20
- const shape = computed(() => tabsState?.shape.value || "");
21
- const size = computed(() => tabsState?.size.value || "standard");
22
- const isActive = computed(() => tabsState?.activeValue.value === props.value);
23
- const tabAttrs = computed(() => {
24
- return {
25
- class: [
26
- cssPrefix("tab"),
27
- {
28
- active: isActive.value,
29
- },
30
- ],
31
- };
32
- });
33
-
34
- // Methods
35
- // ----------------------------------------------------------------------------
36
- const handleClick = () => {
37
- if (props.disabled) return;
38
- tabsState?.setValue(props.value || "");
39
- };
40
- </script>
@@ -1,10 +0,0 @@
1
- export { default as Tabs } from "./tabs.vue";
2
- export type {
3
- TabsProps,
4
- TabsEmit,
5
- TabsProviderState,
6
- TabsVariant,
7
- TabsPlacement,
8
- TabsSize,
9
- } from "./tabs.type";
10
- export { TABS_PROVIDER_STATE_KEY } from "./tabs.constants";
@@ -1 +0,0 @@
1
- export const TABS_PROVIDER_STATE_KEY = "tabs-state";
@@ -1,3 +0,0 @@
1
- <ul ref="container" v-bind="tabsAttrs">
2
- <slot />
3
- </ul>
@@ -1,337 +0,0 @@
1
- @use "@toife/sass-layer" as sass;
2
-
3
- // Class name
4
- $tabs: sass.fn-naming-prefix("tabs");
5
- $tab: sass.fn-naming-prefix("tab");
6
- $button: sass.fn-naming-prefix("button");
7
-
8
- // Property name - layer: tabs
9
- // Underline
10
- $tabs-underline-color: sass.fn-naming-var("tabs", "underline", "color");
11
- $tabs-underline-color-active: sass.fn-naming-var("tabs", "underline", "color", "active");
12
- $tabs-underline-color-hover: sass.fn-naming-var("tabs", "underline", "color", "hover");
13
- $tabs-underline-color-focus: sass.fn-naming-var("tabs", "underline", "color", "focus");
14
- $tabs-underline-color-disabled: sass.fn-naming-var("tabs", "underline", "color", "disabled");
15
- $tabs-underline-border-color: sass.fn-naming-var("tabs", "underline", "border-color");
16
- $tabs-underline-border-color-active: sass.fn-naming-var(
17
- "tabs",
18
- "underline",
19
- "border-color",
20
- "active"
21
- );
22
- $tabs-underline-border-color-hover: sass.fn-naming-var(
23
- "tabs",
24
- "underline",
25
- "border-color",
26
- "hover"
27
- );
28
- $tabs-underline-border-color-focus: sass.fn-naming-var(
29
- "tabs",
30
- "underline",
31
- "border-color",
32
- "focus"
33
- );
34
- $tabs-underline-border-color-disabled: sass.fn-naming-var(
35
- "tabs",
36
- "underline",
37
- "border-color",
38
- "disabled"
39
- );
40
-
41
- // Fill
42
- $tabs-fill-color: sass.fn-naming-var("tabs", "fill", "color");
43
- $tabs-fill-color-active: sass.fn-naming-var("tabs", "fill", "color", "active");
44
- $tabs-fill-color-hover: sass.fn-naming-var("tabs", "fill", "color", "hover");
45
- $tabs-fill-color-focus: sass.fn-naming-var("tabs", "fill", "color", "focus");
46
- $tabs-fill-color-disabled: sass.fn-naming-var("tabs", "fill", "color", "disabled");
47
- $tabs-fill-background-color: sass.fn-naming-var("tabs", "fill", "background-color");
48
- $tabs-fill-background-color-active: sass.fn-naming-var(
49
- "tabs",
50
- "fill",
51
- "background-color",
52
- "active"
53
- );
54
- $tabs-fill-background-color-hover: sass.fn-naming-var("tabs", "fill", "background-color", "hover");
55
- $tabs-fill-background-color-focus: sass.fn-naming-var("tabs", "fill", "background-color", "focus");
56
- $tabs-fill-background-color-disabled: sass.fn-naming-var(
57
- "tabs",
58
- "fill",
59
- "background-color",
60
- "disabled"
61
- );
62
- $tabs-fill-border-color: sass.fn-naming-var("tabs", "fill", "border-color");
63
- $tabs-fill-border-color-active: sass.fn-naming-var("tabs", "fill", "border-color", "active");
64
- $tabs-fill-border-color-hover: sass.fn-naming-var("tabs", "fill", "border-color", "hover");
65
- $tabs-fill-border-color-focus: sass.fn-naming-var("tabs", "fill", "border-color", "focus");
66
- $tabs-fill-border-color-disabled: sass.fn-naming-var("tabs", "fill", "border-color", "disabled");
67
-
68
- // Text
69
- $tabs-text-color: sass.fn-naming-var("tabs", "text", "color");
70
- $tabs-text-color-active: sass.fn-naming-var("tabs", "text", "color", "active");
71
- $tabs-text-color-hover: sass.fn-naming-var("tabs", "text", "color", "hover");
72
- $tabs-text-color-focus: sass.fn-naming-var("tabs", "text", "color", "focus");
73
- $tabs-text-color-disabled: sass.fn-naming-var("tabs", "text", "color", "disabled");
74
-
75
- $radius-ratio: sass.fn-naming-var("radius-ratio");
76
- $border-width: sass.fn-naming-var("stroke", "width");
77
- $transition-duration: sass.fn-naming-var("duration");
78
- $radius-size: sass.fn-naming-var("radius-size");
79
- // layer: highlight (indicator geometry)
80
- $highlight-top: sass.fn-naming-var("tabs", "highlight", "top");
81
- $highlight-left: sass.fn-naming-var("tabs", "highlight", "left");
82
- $highlight-width: sass.fn-naming-var("tabs", "highlight", "width");
83
- $highlight-height: sass.fn-naming-var("tabs", "highlight", "height");
84
- $highlight-space-x: sass.fn-naming-var("tabs", "highlight", "space-x");
85
- $highlight-space-y: sass.fn-naming-var("tabs", "highlight", "space-y");
86
-
87
- .#{$tabs} {
88
- display: flex;
89
- align-items: center;
90
- position: relative;
91
- margin: 0;
92
- list-style: none;
93
- border: none;
94
- overflow-y: hidden;
95
- overflow-x: hidden;
96
-
97
- > * {
98
- z-index: 1;
99
- }
100
-
101
- &:not(.text) {
102
- &::before {
103
- content: "";
104
- z-index: 1;
105
- display: block;
106
- position: absolute;
107
- top: 0;
108
- left: 0;
109
- width: #{$highlight-width};
110
- height: #{$highlight-height};
111
- transform: translate(#{$highlight-left}, #{$highlight-top});
112
- box-sizing: border-box;
113
- border-radius: calc(
114
- min(#{$highlight-width}, #{$highlight-height}, #{$radius-size}) * #{$radius-ratio}
115
- );
116
- }
117
- }
118
-
119
- &.top-start,
120
- &.bottom-start,
121
- &.left-start,
122
- &.right-start {
123
- justify-content: flex-start;
124
- }
125
-
126
- &.top-end,
127
- &.bottom-end,
128
- &.left-end,
129
- &.right-end {
130
- justify-content: flex-end;
131
- }
132
-
133
- &.top-center,
134
- &.bottom-center,
135
- &.left-center,
136
- &.right-center {
137
- justify-content: center;
138
- }
139
-
140
- // Direction
141
- &.top-start,
142
- &.top-center,
143
- &.top-end,
144
- &.bottom-start,
145
- &.bottom-center,
146
- &.bottom-end {
147
- flex-direction: row;
148
- height: fit-content;
149
- width: 100%;
150
- padding-top: #{$highlight-space-y};
151
- padding-bottom: #{$highlight-space-y};
152
- overflow-x: auto;
153
-
154
- > * {
155
- height: 100%;
156
- }
157
- }
158
-
159
- &.left-start,
160
- &.left-center,
161
- &.left-end,
162
- &.right-start,
163
- &.right-center,
164
- &.right-end {
165
- padding-left: #{$highlight-space-x};
166
- padding-right: #{$highlight-space-x};
167
- flex-direction: column;
168
- width: fit-content;
169
- height: 100%;
170
- overflow-y: auto;
171
-
172
- > * {
173
- width: 100%;
174
- }
175
- }
176
-
177
- &.underline {
178
- &::before {
179
- background-color: rgba(#{$tabs-underline-border-color-active});
180
- }
181
-
182
- :deep(.#{$tab}) {
183
- .#{$button} {
184
- color: rgba(#{$tabs-underline-color});
185
- background-color: transparent !important;
186
- }
187
-
188
- &.active {
189
- .#{$button} {
190
- color: rgba(#{$tabs-underline-color-active});
191
- }
192
- }
193
-
194
- &:hover,
195
- &.hover {
196
- .#{$button} {
197
- color: rgba(#{$tabs-underline-color-hover});
198
- }
199
- }
200
-
201
- &:focus,
202
- &.focus {
203
- .#{$button} {
204
- color: rgba(#{$tabs-underline-color-focus});
205
- }
206
- }
207
-
208
- &:disabled,
209
- &.disabled {
210
- .#{$button} {
211
- color: rgba(#{$tabs-underline-color-disabled});
212
- }
213
- }
214
- }
215
- }
216
-
217
- &.fill {
218
- &::before {
219
- background-color: rgba(#{$tabs-fill-background-color-active});
220
- }
221
-
222
- :deep(.#{$tab}) {
223
- .#{$button} {
224
- color: rgba(#{$tabs-fill-color});
225
- background-color: rgba(#{$tabs-fill-background-color});
226
- }
227
-
228
- &.active {
229
- .#{$button} {
230
- color: rgba(#{$tabs-fill-color-active});
231
- background-color: transparent !important;
232
- }
233
- }
234
-
235
- &:hover,
236
- &.hover {
237
- .#{$button} {
238
- color: rgba(#{$tabs-fill-color-hover});
239
- background-color: rgba(#{$tabs-fill-background-color-hover});
240
- }
241
- }
242
-
243
- &:focus,
244
- &.focus {
245
- .#{$button} {
246
- color: rgba(#{$tabs-fill-color-focus});
247
- background-color: rgba(#{$tabs-fill-background-color-focus});
248
- }
249
- }
250
-
251
- &:disabled,
252
- &.disabled {
253
- .#{$button} {
254
- color: rgba(#{$tabs-fill-color-disabled});
255
- background-color: rgba(#{$tabs-fill-background-color-disabled});
256
- }
257
- }
258
- }
259
- }
260
-
261
- &.text {
262
- :deep(.#{$tab}) {
263
- .#{$button} {
264
- color: rgba(#{$tabs-text-color});
265
- background-color: transparent;
266
- }
267
-
268
- &.active {
269
- .#{$button} {
270
- color: rgba(#{$tabs-text-color-active});
271
- }
272
- }
273
-
274
- &:hover,
275
- &.hover {
276
- .#{$button} {
277
- color: rgba(#{$tabs-text-color-hover});
278
- }
279
- }
280
-
281
- &:focus,
282
- &.focus {
283
- .#{$button} {
284
- color: rgba(#{$tabs-text-color-focus});
285
- }
286
- }
287
-
288
- &:disabled,
289
- &.disabled {
290
- .#{$button} {
291
- color: rgba(#{$tabs-text-color-disabled});
292
- }
293
- }
294
- }
295
- }
296
-
297
- &.transition {
298
- transition:
299
- box-shadow #{$transition-duration} ease,
300
- border-color #{$transition-duration} ease,
301
- background-color #{$transition-duration} ease,
302
- color #{$transition-duration} ease,
303
- border-radius #{$transition-duration} ease;
304
-
305
- &::before {
306
- transition:
307
- background-color #{$transition-duration} ease,
308
- color #{$transition-duration} ease,
309
- border-color #{$transition-duration} ease,
310
- border-radius #{$transition-duration} ease,
311
- transform #{$transition-duration} ease,
312
- width #{$transition-duration} ease,
313
- height #{$transition-duration} ease;
314
- }
315
-
316
- :deep(.#{$tab}) {
317
- .#{$button} {
318
- transition:
319
- box-shadow #{$transition-duration} ease,
320
- border-color #{$transition-duration} ease,
321
- background-color #{$transition-duration} ease,
322
- color #{$transition-duration} ease,
323
- border-radius #{$transition-duration} ease;
324
- }
325
- }
326
- }
327
-
328
- :deep(.#{$tab}) {
329
- display: flex;
330
- justify-content: center;
331
- align-items: center;
332
-
333
- .#{$button} {
334
- cursor: pointer;
335
- }
336
- }
337
- }
@@ -1,38 +0,0 @@
1
- import { ComputedRef } from "vue";
2
-
3
- export type TabsVariant = "fill" | "underline" | "text";
4
- export type TabsSize = string;
5
- export type TabsPlacement =
6
- | "top-start"
7
- | "top-end"
8
- | "bottom-start"
9
- | "bottom-end"
10
- | "left-start"
11
- | "left-end"
12
- | "right-start"
13
- | "right-end";
14
-
15
- // Type definitions
16
- export type TabsProps = {
17
- placement?: TabsPlacement;
18
- variant?: TabsVariant;
19
- role?: string;
20
- modelValue?: string;
21
- border?: number[];
22
- margin?: number[];
23
- shape?: string;
24
- transition?: boolean;
25
- size?: TabsSize;
26
- };
27
-
28
- export type TabsEmit = {
29
- (e: "update:modelValue", value: string): void;
30
- };
31
-
32
- export type TabsProviderState = {
33
- activeValue: ComputedRef<string>;
34
- role: ComputedRef<string>;
35
- shape: ComputedRef<string>;
36
- size: ComputedRef<TabsSize>;
37
- setValue: (val: string) => void;
38
- };
@@ -1,177 +0,0 @@
1
- <style lang="scss" src="./tabs.scss" scoped></style>
2
- <template src="./tabs.html"></template>
3
- <script lang="ts" setup>
4
- import { computed, inject, nextTick, onMounted, onUnmounted, provide, ref, watch } from "vue";
5
- import { type TabsProps, type TabsEmit, type TabsProviderState } from "./tabs.type";
6
- import { cssProperty, cssPrefix } from "../../../utils";
7
- import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../../app";
8
- import { TABS_PROVIDER_STATE_KEY } from "./tabs.constants";
9
-
10
- // Component setup (props, emits, injects)
11
- // ----------------------------------------------------------------------------
12
- const props = withDefaults(defineProps<TabsProps>(), {
13
- placement: "top-start",
14
- margin: () => [0, 0],
15
- border: () => [2, 0],
16
- transition: true,
17
- size: "standard",
18
- });
19
- const emit = defineEmits<TabsEmit>();
20
- const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
21
-
22
- // Reactive state
23
- // ----------------------------------------------------------------------------
24
- const width = ref(0);
25
- const height = ref(0);
26
- const top = ref(0);
27
- const left = ref(0);
28
- const container = ref();
29
- const isFirstRender = ref(true);
30
-
31
- // Computed properties
32
- // ----------------------------------------------------------------------------
33
- const role = computed(() => {
34
- return props.role || appState?.role.value || "";
35
- });
36
-
37
- const shape = computed(() => {
38
- return props.shape || appState?.shape.value || "";
39
- });
40
-
41
- const size = computed(() => {
42
- return props.size;
43
- });
44
-
45
- const activeValue = computed(() => {
46
- return props.modelValue || "";
47
- });
48
-
49
- const tabsAttrs = computed(() => {
50
- let l = left.value;
51
- let t = top.value;
52
- let w = width.value;
53
- let h = height.value;
54
-
55
- t = t - props.margin[0];
56
- l = l - props.margin[1];
57
- h = h + props.margin[0] * 2;
58
- w = w + props.margin[1] * 2;
59
-
60
- if (props.variant === "underline") {
61
- // Underline variant: align the highlight strip for top vs bottom tab bars
62
- if (props.placement.startsWith("top-")) {
63
- t = h - props.border[0];
64
- }
65
-
66
- if (props.placement.startsWith("bottom-")) {
67
- t = 0;
68
- }
69
-
70
- if (props.placement.startsWith("top-") || props.placement.startsWith("bottom-")) {
71
- h = props.border[0] + 0.5;
72
-
73
- if (props.border[1]) {
74
- l += (w - props.border[1]) / 2;
75
- w = props.border[1];
76
- }
77
- }
78
-
79
- // Left, Right
80
- if (props.placement.startsWith("left-")) {
81
- l = w - props.border[0];
82
- }
83
-
84
- if (props.placement.startsWith("right-")) {
85
- l = 0;
86
- }
87
-
88
- if (props.placement.startsWith("left-") || props.placement.startsWith("right-")) {
89
- w = props.border[0];
90
-
91
- if (props.border[1]) {
92
- t += (h - props.border[1]) / 2;
93
- h = props.border[1];
94
- }
95
- }
96
- }
97
-
98
- return {
99
- class: [
100
- cssPrefix(["layer", "tabs"]),
101
- cssPrefix(["role", role.value]),
102
- cssPrefix(["shape", shape.value]),
103
- cssPrefix("tabs"),
104
- props.variant,
105
- props.placement,
106
- {
107
- transition: isFirstRender.value ? false : props.transition,
108
- },
109
- ],
110
- style: {
111
- [cssProperty("tabs-highlight-top")]: typeof t === "string" ? t : t + "px",
112
- [cssProperty("tabs-highlight-left")]: typeof l === "string" ? l : l + "px",
113
- [cssProperty("tabs-highlight-width")]: typeof w === "string" ? w : w + "px",
114
- [cssProperty("tabs-highlight-height")]: typeof h === "string" ? h : h + "px",
115
- [cssProperty("tabs-highlight-space-x")]: (props.margin[1] > 0 ? props.margin[1] : 0) + "px",
116
- [cssProperty("tabs-highlight-space-y")]: (props.margin[0] > 0 ? props.margin[0] : 0) + "px",
117
- },
118
- };
119
- });
120
-
121
- // Methods
122
- // ----------------------------------------------------------------------------
123
- const calcPosition = () => {
124
- let active = container.value.querySelector(".active");
125
- if (active) {
126
- width.value = active.offsetWidth;
127
- height.value = active.offsetHeight;
128
- left.value =
129
- active.getBoundingClientRect().left -
130
- container.value.getBoundingClientRect().left +
131
- container.value.scrollLeft;
132
- top.value =
133
- active.getBoundingClientRect().top -
134
- container.value.getBoundingClientRect().top +
135
- container.value.scrollTop;
136
- }
137
- };
138
-
139
- const checkRender = async () => {
140
- await nextTick();
141
- calcPosition();
142
- };
143
-
144
- // Lifecycle
145
- // ----------------------------------------------------------------------------
146
- watch(
147
- () => props.modelValue,
148
- () => {
149
- checkRender();
150
- }
151
- );
152
-
153
- onMounted(() => {
154
- checkRender();
155
- window.addEventListener("resize", calcPosition);
156
-
157
- setTimeout(() => {
158
- isFirstRender.value = false;
159
- }, 500);
160
- });
161
-
162
- onUnmounted(() => {
163
- window.removeEventListener("resize", calcPosition);
164
- });
165
-
166
- // Provide / expose (public API)
167
- // ----------------------------------------------------------------------------
168
- provide<TabsProviderState>(TABS_PROVIDER_STATE_KEY, {
169
- activeValue,
170
- role,
171
- shape,
172
- size,
173
- setValue: (val: unknown) => {
174
- emit("update:modelValue", val as string);
175
- },
176
- });
177
- </script>
@@ -1,4 +0,0 @@
1
- export * from "./toast";
2
- export * from "./toast-content";
3
- export * from "./toast.composable";
4
- export * from "./toast.type";
@@ -1 +0,0 @@
1
- export { default as Toast } from "./toast.vue";
@@ -1,9 +0,0 @@
1
- <div v-bind="toastAttrs" v-if="toastMessages.length > 0">
2
- <slot name="content">
3
- <ToastContent
4
- v-for="(msg, index) in toastMessages"
5
- v-bind="msg"
6
- @close="dismiss(msg.id)"
7
- ></ToastContent>
8
- </slot>
9
- </div>
@@ -1,61 +0,0 @@
1
- @use "@toife/sass-layer" as sass;
2
-
3
- // Class name
4
- $toast: sass.fn-naming-prefix("toast");
5
- $toastContent: sass.fn-naming-prefix("toast-content");
6
-
7
- // Properties
8
- $max-width: sass.fn-naming-var("overlay", "max-width");
9
- $space-x: sass.fn-naming-var("spacing", "x");
10
- $safe-area-right: sass.fn-naming-var("safe-area", "right");
11
- $safe-area-left: sass.fn-naming-var("safe-area", "left");
12
- $safe-area-bottom: sass.fn-naming-var("safe-area", "bottom");
13
- $safe-area-top: sass.fn-naming-var("safe-area", "top");
14
-
15
- .#{$toast} {
16
- width: fit-content;
17
- height: fit-content;
18
- max-width: #{$max-width};
19
- position: absolute;
20
- z-index: 10000;
21
- font-size: 0.8em;
22
- line-height: 0.8em;
23
- display: flex;
24
- flex-direction: column;
25
- gap: #{$space-x};
26
-
27
- &.bottom-start {
28
- bottom: calc(#{$safe-area-bottom} + #{$space-x} * 4);
29
- left: calc(#{$space-x} * 4);
30
- }
31
-
32
- &.bottom-center {
33
- bottom: calc(#{$safe-area-bottom} + #{$space-x} * 4);
34
- left: 50%;
35
- transform: translateX(-50%);
36
- }
37
-
38
- &.bottom-end {
39
- bottom: calc(#{$safe-area-bottom} + #{$space-x} * 4);
40
- right: calc(#{$space-x} * 4);
41
- }
42
-
43
- &.top-start {
44
- top: calc(#{$safe-area-top} + #{$space-x} * 4);
45
- left: calc(#{$space-x} * 4);
46
- flex-direction: column-reverse;
47
- }
48
-
49
- &.top-center {
50
- top: calc(#{$safe-area-top} + #{$space-x} * 4);
51
- left: 50%;
52
- transform: translateX(-50%);
53
- flex-direction: column-reverse;
54
- }
55
-
56
- &.top-end {
57
- top: calc(#{$safe-area-top} + #{$space-x} * 4);
58
- right: calc(#{$space-x} * 4);
59
- flex-direction: column-reverse;
60
- }
61
- }