@toife/vue 3.1.5 → 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 (388) 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 +24 -14
  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 -36
  161. package/src/components/app/app.vue +0 -52
  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 -116
  170. package/src/components/button/button.type.ts +0 -16
  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 -21
  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 -59
  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 -12
  229. package/src/components/field/field.type.ts +0 -43
  230. package/src/components/field/field.vue +0 -86
  231. package/src/components/field/index.ts +0 -2
  232. package/src/components/field/outline/index.ts +0 -1
  233. package/src/components/field/outline/outline.html +0 -36
  234. package/src/components/field/outline/outline.scss +0 -282
  235. package/src/components/field/outline/outline.vue +0 -294
  236. package/src/components/form-group/form-group.html +0 -3
  237. package/src/components/form-group/form-group.scss +0 -91
  238. package/src/components/form-group/form-group.type.ts +0 -5
  239. package/src/components/form-group/form-group.vue +0 -21
  240. package/src/components/form-group/index.ts +0 -2
  241. package/src/components/gesture-indicator/gesture-indicator.html +0 -1
  242. package/src/components/gesture-indicator/gesture-indicator.scss +0 -47
  243. package/src/components/gesture-indicator/gesture-indicator.type.ts +0 -5
  244. package/src/components/gesture-indicator/gesture-indicator.vue +0 -31
  245. package/src/components/gesture-indicator/index.ts +0 -1
  246. package/src/components/image/image.html +0 -1
  247. package/src/components/image/image.type.ts +0 -5
  248. package/src/components/image/image.vue +0 -29
  249. package/src/components/image/index.ts +0 -2
  250. package/src/components/index.ts +0 -31
  251. package/src/components/layout/flex/flex.html +0 -1
  252. package/src/components/layout/flex/flex.scss +0 -57
  253. package/src/components/layout/flex/flex.type.ts +0 -15
  254. package/src/components/layout/flex/flex.vue +0 -34
  255. package/src/components/layout/flex/index.ts +0 -2
  256. package/src/components/layout/flex-item/flex-item.html +0 -1
  257. package/src/components/layout/flex-item/flex-item.scss +0 -48
  258. package/src/components/layout/flex-item/flex-item.type.ts +0 -11
  259. package/src/components/layout/flex-item/flex-item.vue +0 -27
  260. package/src/components/layout/flex-item/index.ts +0 -2
  261. package/src/components/layout/grid/grid.html +0 -1
  262. package/src/components/layout/grid/grid.scss +0 -51
  263. package/src/components/layout/grid/grid.type.ts +0 -12
  264. package/src/components/layout/grid/grid.vue +0 -32
  265. package/src/components/layout/grid/index.ts +0 -2
  266. package/src/components/layout/grid-item/grid-item.html +0 -1
  267. package/src/components/layout/grid-item/grid-item.scss +0 -49
  268. package/src/components/layout/grid-item/grid-item.type.ts +0 -14
  269. package/src/components/layout/grid-item/grid-item.vue +0 -27
  270. package/src/components/layout/grid-item/index.ts +0 -2
  271. package/src/components/layout/index.ts +0 -4
  272. package/src/components/modal/index.ts +0 -2
  273. package/src/components/modal/modal.html +0 -20
  274. package/src/components/modal/modal.scss +0 -80
  275. package/src/components/modal/modal.type.ts +0 -21
  276. package/src/components/modal/modal.vue +0 -251
  277. package/src/components/page/index.ts +0 -1
  278. package/src/components/page/page.html +0 -3
  279. package/src/components/page/page.scss +0 -17
  280. package/src/components/page/page.vue +0 -10
  281. package/src/components/present/index.ts +0 -3
  282. package/src/components/present/present.composable.ts +0 -22
  283. package/src/components/present/present.html +0 -9
  284. package/src/components/present/present.scss +0 -81
  285. package/src/components/present/present.type.ts +0 -26
  286. package/src/components/present/present.vue +0 -198
  287. package/src/components/radio/index.ts +0 -2
  288. package/src/components/radio/radio/index.ts +0 -2
  289. package/src/components/radio/radio/radio.html +0 -11
  290. package/src/components/radio/radio/radio.scss +0 -142
  291. package/src/components/radio/radio/radio.type.ts +0 -15
  292. package/src/components/radio/radio/radio.vue +0 -87
  293. package/src/components/radio/radio-group/index.ts +0 -7
  294. package/src/components/radio/radio-group/radio-group.constants.ts +0 -1
  295. package/src/components/radio/radio-group/radio-group.html +0 -3
  296. package/src/components/radio/radio-group/radio-group.scss +0 -16
  297. package/src/components/radio/radio-group/radio-group.type.ts +0 -28
  298. package/src/components/radio/radio-group/radio-group.vue +0 -57
  299. package/src/components/refresher/index.ts +0 -2
  300. package/src/components/refresher/refresher.html +0 -3
  301. package/src/components/refresher/refresher.scss +0 -18
  302. package/src/components/refresher/refresher.type.ts +0 -16
  303. package/src/components/refresher/refresher.vue +0 -123
  304. package/src/components/route/index.ts +0 -5
  305. package/src/components/route/route-navigator/index.ts +0 -2
  306. package/src/components/route/route-navigator/route-navigator.html +0 -19
  307. package/src/components/route/route-navigator/route-navigator.scss +0 -127
  308. package/src/components/route/route-navigator/route-navigator.type.ts +0 -36
  309. package/src/components/route/route-navigator/route-navigator.vue +0 -275
  310. package/src/components/route/route-outlet/index.ts +0 -1
  311. package/src/components/route/route-outlet/route-outlet.html +0 -1
  312. package/src/components/route/route-outlet/route-outlet.vue +0 -39
  313. package/src/components/route/route-provider/index.ts +0 -3
  314. package/src/components/route/route-provider/route-provider.constant.ts +0 -1
  315. package/src/components/route/route-provider/route-provider.html +0 -1
  316. package/src/components/route/route-provider/route-provider.type.ts +0 -10
  317. package/src/components/route/route-provider/route-provider.vue +0 -20
  318. package/src/components/route/route-wrapper/index.ts +0 -3
  319. package/src/components/route/route-wrapper/route-wrapper.composable.ts +0 -49
  320. package/src/components/route/route-wrapper/route-wrapper.html +0 -3
  321. package/src/components/route/route-wrapper/route-wrapper.type.ts +0 -3
  322. package/src/components/route/route-wrapper/route-wrapper.vue +0 -45
  323. package/src/components/route/route.type.ts +0 -7
  324. package/src/components/route/route.util.ts +0 -9
  325. package/src/components/segmented-field/index.ts +0 -7
  326. package/src/components/segmented-field/segmented-field.html +0 -17
  327. package/src/components/segmented-field/segmented-field.scss +0 -53
  328. package/src/components/segmented-field/segmented-field.type.ts +0 -29
  329. package/src/components/segmented-field/segmented-field.vue +0 -145
  330. package/src/components/select/index.ts +0 -2
  331. package/src/components/select/select.html +0 -29
  332. package/src/components/select/select.scss +0 -129
  333. package/src/components/select/select.type.ts +0 -45
  334. package/src/components/select/select.vue +0 -119
  335. package/src/components/skeleton/index.ts +0 -2
  336. package/src/components/skeleton/skeleton.html +0 -1
  337. package/src/components/skeleton/skeleton.scss +0 -52
  338. package/src/components/skeleton/skeleton.type.ts +0 -7
  339. package/src/components/skeleton/skeleton.vue +0 -38
  340. package/src/components/slide-range/index.ts +0 -2
  341. package/src/components/slide-range/slide-range.html +0 -19
  342. package/src/components/slide-range/slide-range.scss +0 -161
  343. package/src/components/slide-range/slide-range.type.ts +0 -16
  344. package/src/components/slide-range/slide-range.vue +0 -229
  345. package/src/components/switch/index.ts +0 -2
  346. package/src/components/switch/switch.html +0 -14
  347. package/src/components/switch/switch.scss +0 -128
  348. package/src/components/switch/switch.type.ts +0 -19
  349. package/src/components/switch/switch.vue +0 -97
  350. package/src/components/tabs/index.ts +0 -2
  351. package/src/components/tabs/tab/index.ts +0 -2
  352. package/src/components/tabs/tab/tab.html +0 -5
  353. package/src/components/tabs/tab/tab.scss +0 -13
  354. package/src/components/tabs/tab/tab.type.ts +0 -5
  355. package/src/components/tabs/tab/tab.vue +0 -40
  356. package/src/components/tabs/tabs/index.ts +0 -10
  357. package/src/components/tabs/tabs/tabs.constants.ts +0 -1
  358. package/src/components/tabs/tabs/tabs.html +0 -3
  359. package/src/components/tabs/tabs/tabs.scss +0 -341
  360. package/src/components/tabs/tabs/tabs.type.ts +0 -39
  361. package/src/components/tabs/tabs/tabs.vue +0 -177
  362. package/src/components/toast/index.ts +0 -4
  363. package/src/components/toast/toast/index.ts +0 -1
  364. package/src/components/toast/toast/toast.html +0 -9
  365. package/src/components/toast/toast/toast.scss +0 -61
  366. package/src/components/toast/toast/toast.vue +0 -34
  367. package/src/components/toast/toast-content/index.ts +0 -1
  368. package/src/components/toast/toast-content/toast-content.html +0 -1
  369. package/src/components/toast/toast-content/toast-content.scss +0 -42
  370. package/src/components/toast/toast-content/toast-content.vue +0 -53
  371. package/src/components/toast/toast.composable.ts +0 -22
  372. package/src/components/toast/toast.type.ts +0 -25
  373. package/src/components/toolbar/index.ts +0 -2
  374. package/src/components/toolbar/toolbar.html +0 -3
  375. package/src/components/toolbar/toolbar.scss +0 -64
  376. package/src/components/toolbar/toolbar.type.ts +0 -7
  377. package/src/components/toolbar/toolbar.vue +0 -41
  378. package/src/env.d.ts +0 -7
  379. package/src/factory.ts +0 -152
  380. package/src/index.ts +0 -4
  381. package/src/type.ts +0 -4
  382. package/src/utils/element.md +0 -33
  383. package/src/utils/element.ts +0 -22
  384. package/src/utils/events.md +0 -29
  385. package/src/utils/events.ts +0 -18
  386. package/src/utils/index.ts +0 -3
  387. package/src/utils/style/index.ts +0 -57
  388. package/src/utils/style.md +0 -49
@@ -1,128 +0,0 @@
1
- @use "@toife/sass-layer" as sass;
2
-
3
- // Classes
4
- $switch: sass.fn-naming-prefix("switch");
5
- $switch-icon: sass.fn-naming-prefix("switch-icon");
6
- $switch-wrapper: sass.fn-naming-prefix("switch-wrapper");
7
-
8
- // Property name - layer: switch (track + thumb; states like button + inactive)
9
- $switch-background-color-off: sass.fn-naming-var("switch", "background-color", "off");
10
- $switch-background-color-on: sass.fn-naming-var("switch", "background-color", "on");
11
- $switch-background-color-disabled: sass.fn-naming-var("switch", "background-color", "disabled");
12
-
13
- $switch-color-on: sass.fn-naming-var("switch", "color", "on");
14
- $switch-color-off: sass.fn-naming-var("switch", "color", "off");
15
- $switch-color-disabled: sass.fn-naming-var("switch", "color", "disabled");
16
-
17
- $switch-box-shadow-color-focus: sass.fn-naming-var("switch", "box-shadow-color", "focus");
18
-
19
- $transition-duration: sass.fn-naming-var("motion", "duration");
20
- $radius-ratio: sass.fn-naming-var("radius-ratio");
21
- $spacing-x: sass.fn-naming-var("spacing", "x");
22
- $size-control-mark-size: sass.fn-naming-var("control-mark-size");
23
- $radius-size: sass.fn-naming-var("radius-size");
24
- $icon-size: calc(#{$size-control-mark-size} - #{$size-control-mark-size} * 0.2);
25
- $bounce-ratio: sass.fn-naming-var("switch", "bounce", "ratio");
26
-
27
- .#{$switch-wrapper} {
28
- display: inline-flex;
29
- gap: calc(#{$spacing-x} * 2);
30
- align-items: center;
31
- cursor: pointer;
32
- box-shadow: none !important;
33
-
34
- &.transition {
35
- .#{$switch},
36
- .#{$switch-icon} {
37
- transition:
38
- background-color #{$transition-duration} ease,
39
- color #{$transition-duration} ease,
40
- border-color #{$transition-duration} ease,
41
- border-radius #{$transition-duration} ease,
42
- box-shadow #{$transition-duration} ease,
43
- transform #{$transition-duration} ease;
44
- }
45
- }
46
-
47
- .#{$switch} {
48
- height: #{$size-control-mark-size};
49
- aspect-ratio: 14/8;
50
- position: relative;
51
- border-radius: calc(min(#{$size-control-mark-size}, #{$radius-size}) * #{$radius-ratio});
52
-
53
- .#{$switch-icon} {
54
- width: #{$icon-size};
55
- height: #{$icon-size};
56
- position: absolute;
57
- top: 0;
58
- border-radius: calc(min(#{$icon-size}, #{$radius-size}) * #{$radius-ratio});
59
- margin: calc(#{$size-control-mark-size} * 0.1);
60
- }
61
- }
62
-
63
- &.disabled {
64
- cursor: not-allowed;
65
-
66
- .#{$switch} {
67
- background-color: rgba(#{$switch-background-color-disabled});
68
- cursor: not-allowed;
69
- opacity: 0.3;
70
-
71
- .#{$switch-icon} {
72
- background-color: rgba(#{$switch-color-disabled});
73
- }
74
- }
75
- }
76
-
77
- &.readonly {
78
- cursor: default;
79
-
80
- .#{$switch} {
81
- cursor: default;
82
- }
83
- }
84
-
85
- &:not(.on) {
86
- .#{$switch} {
87
- background-color: rgba(#{$switch-background-color-off});
88
-
89
- .#{$switch-icon} {
90
- background-color: rgba(#{$switch-color-off});
91
- left: 0;
92
- }
93
- }
94
- }
95
-
96
- &.on {
97
- .#{$switch} {
98
- background-color: rgba(#{$switch-background-color-on});
99
-
100
- .#{$switch-icon} {
101
- right: 0;
102
- animation: shrink #{$transition-duration} linear;
103
- animation-fill-mode: forwards;
104
- background-color: rgba(#{$switch-color-on});
105
- }
106
- }
107
- }
108
-
109
- &.focus {
110
- &.shadow {
111
- .#{$switch} {
112
- box-shadow: 0 0 0 0.25rem rgba(#{$switch-box-shadow-color-focus}, 0.25);
113
- }
114
- }
115
- }
116
- }
117
-
118
- @keyframes shrink {
119
- 0% {
120
- transform: scale(1);
121
- }
122
- 50% {
123
- transform: scale(#{$bounce-ratio});
124
- }
125
- 100% {
126
- transform: scale(1);
127
- }
128
- }
@@ -1,19 +0,0 @@
1
- import { AppSize } from "../app";
2
-
3
- export type SwitchSize = AppSize;
4
-
5
- // Type definitions
6
- export type SwitchProps = {
7
- modelValue?: boolean;
8
- role?: string;
9
- size?: SwitchSize;
10
- shape?: string;
11
- disabled?: boolean;
12
- readonly?: boolean;
13
- shadow?: boolean;
14
- bounce?: number | string;
15
- };
16
-
17
- export type SwitchEmit = {
18
- (e: "update:modelValue", value: boolean): void;
19
- };
@@ -1,97 +0,0 @@
1
- <style lang="scss" src="./switch.scss" scoped></style>
2
- <template src="./switch.html"></template>
3
- <script lang="ts" setup>
4
- import { computed, inject, ref, onMounted } from "vue";
5
- import type { SwitchProps, SwitchEmit } from "./switch.type";
6
- import { cssPrefix, cssProperty } from "../../utils";
7
- import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../app";
8
-
9
- // Component setup (props, emits, injects)
10
- // ----------------------------------------------------------------------------
11
- const props = withDefaults(defineProps<SwitchProps>(), {
12
- modelValue: false,
13
- size: "standard",
14
- readonly: false,
15
- shadow: undefined,
16
- bounce: 1.5,
17
- });
18
- const emit = defineEmits<SwitchEmit>();
19
- const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
20
-
21
- // Reactive state
22
- // ----------------------------------------------------------------------------
23
- const isFocused = ref(false);
24
- const isFirstRender = ref(true);
25
-
26
- // Computed properties
27
- // ----------------------------------------------------------------------------
28
- const switchWrapperAttrs = computed(() => {
29
- const shadow = (props?.shadow !== undefined ? props.shadow : appState?.shadow.value) ?? false;
30
- return {
31
- class: [
32
- cssPrefix("switch-wrapper"),
33
- {
34
- disabled: props.disabled,
35
- readonly: props.readonly,
36
- shadow: shadow && !props.disabled && isFocused.value,
37
- focus: isFocused.value,
38
- on: props.modelValue,
39
- },
40
- {
41
- transition: isFirstRender.value ? false : true,
42
- },
43
- ],
44
- style: {
45
- [cssProperty(["switch", "bounce", "ratio"])]: props.bounce,
46
- },
47
- };
48
- });
49
-
50
- const switchAttrs = computed(() => {
51
- const shape = props.shape || appState?.shape.value || "";
52
- const baseRole = appState?.role.value || "";
53
- const role = props.role || baseRole;
54
- return {
55
- class: [
56
- cssPrefix(["layer", "switch"]),
57
- cssPrefix(["role", role]),
58
- cssPrefix(["shape", shape]),
59
- cssPrefix(["size", props.size]),
60
- cssPrefix("switch"),
61
- ],
62
- };
63
- });
64
-
65
- const switchIconAttrs = {
66
- class: [cssPrefix("switch-icon")],
67
- } as const;
68
-
69
- // Methods
70
- // ----------------------------------------------------------------------------
71
- const onSwitch = () => {
72
- if (props.disabled || props.readonly) return;
73
- emit("update:modelValue", !props.modelValue);
74
- };
75
-
76
- const onFocus = () => {
77
- if (props.disabled || props.readonly) return;
78
- isFocused.value = true;
79
- };
80
-
81
- const onBlur = () => {
82
- if (props.disabled || props.readonly) return;
83
- isFocused.value = false;
84
- };
85
-
86
- const onKeydown = (e: KeyboardEvent) => {
87
- if (e.key !== " " && e.key !== "Enter") return;
88
- e.preventDefault();
89
- onSwitch();
90
- };
91
-
92
- onMounted(() => {
93
- setTimeout(() => {
94
- isFirstRender.value = false;
95
- }, 500);
96
- });
97
- </script>
@@ -1,2 +0,0 @@
1
- export * from "./tabs";
2
- export * from "./tab";
@@ -1,2 +0,0 @@
1
- export { default as Tab } from "./tab.vue";
2
- export type { TabProps } from "./tab.type";
@@ -1,5 +0,0 @@
1
- <li v-bind="tabAttrs">
2
- <CustomButton block :role="role" :shape="shape" :size="size" @click="handleClick">
3
- <slot />
4
- </CustomButton>
5
- </li>
@@ -1,13 +0,0 @@
1
- @use "@toife/sass-layer" as sass;
2
-
3
- $button: sass.fn-naming-prefix("button");
4
-
5
- .#{$button} {
6
- background-color: none;
7
- border: none;
8
-
9
- &:focus,
10
- &:active {
11
- outline: none;
12
- }
13
- }
@@ -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,341 +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("motion", "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
- display: flex;
318
- justify-content: center;
319
- align-items: center;
320
-
321
- .#{$button} {
322
- transition:
323
- box-shadow #{$transition-duration} ease,
324
- border-color #{$transition-duration} ease,
325
- background-color #{$transition-duration} ease,
326
- color #{$transition-duration} ease,
327
- border-radius #{$transition-duration} ease;
328
- }
329
- }
330
- }
331
-
332
- :deep(.#{$tab}) {
333
- display: flex;
334
- justify-content: center;
335
- align-items: center;
336
-
337
- .#{$button} {
338
- cursor: pointer;
339
- }
340
- }
341
- }