oxy-uni-ui 1.0.1

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 (355) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/attributes.json +1 -0
  4. package/components/common/AbortablePromise.ts +28 -0
  5. package/components/common/abstracts/_config.scss +7 -0
  6. package/components/common/abstracts/_function.scss +89 -0
  7. package/components/common/abstracts/_mixin.scss +385 -0
  8. package/components/common/abstracts/variable.scss +974 -0
  9. package/components/common/base64.ts +29 -0
  10. package/components/common/canvasHelper.ts +49 -0
  11. package/components/common/clickoutside.ts +25 -0
  12. package/components/common/event.ts +8 -0
  13. package/components/common/interceptor.ts +43 -0
  14. package/components/common/props.ts +51 -0
  15. package/components/common/util.ts +778 -0
  16. package/components/composables/index.ts +11 -0
  17. package/components/composables/useCell.ts +13 -0
  18. package/components/composables/useChildren.ts +113 -0
  19. package/components/composables/useCountDown.ts +138 -0
  20. package/components/composables/useLockScroll.ts +37 -0
  21. package/components/composables/useParent.ts +41 -0
  22. package/components/composables/usePopover.ts +176 -0
  23. package/components/composables/useQueue.ts +52 -0
  24. package/components/composables/useRaf.ts +37 -0
  25. package/components/composables/useTouch.ts +43 -0
  26. package/components/composables/useTranslate.ts +12 -0
  27. package/components/composables/useUpload.ts +364 -0
  28. package/components/oxy-action-sheet/index.scss +204 -0
  29. package/components/oxy-action-sheet/oxy-action-sheet.vue +155 -0
  30. package/components/oxy-action-sheet/types.ts +118 -0
  31. package/components/oxy-backtop/index.scss +25 -0
  32. package/components/oxy-backtop/oxy-backtop.vue +45 -0
  33. package/components/oxy-backtop/types.ts +37 -0
  34. package/components/oxy-badge/index.scss +63 -0
  35. package/components/oxy-badge/oxy-badge.vue +61 -0
  36. package/components/oxy-badge/types.ts +41 -0
  37. package/components/oxy-button/index.scss +336 -0
  38. package/components/oxy-button/oxy-button.vue +195 -0
  39. package/components/oxy-button/types.ts +133 -0
  40. package/components/oxy-calendar/index.scss +158 -0
  41. package/components/oxy-calendar/oxy-calendar.vue +451 -0
  42. package/components/oxy-calendar/types.ts +217 -0
  43. package/components/oxy-calendar-view/index.scss +0 -0
  44. package/components/oxy-calendar-view/month/index.scss +162 -0
  45. package/components/oxy-calendar-view/month/month.vue +389 -0
  46. package/components/oxy-calendar-view/month/types.ts +20 -0
  47. package/components/oxy-calendar-view/monthPanel/index.scss +89 -0
  48. package/components/oxy-calendar-view/monthPanel/month-panel.vue +374 -0
  49. package/components/oxy-calendar-view/monthPanel/types.ts +48 -0
  50. package/components/oxy-calendar-view/oxy-calendar-view.vue +111 -0
  51. package/components/oxy-calendar-view/types.ts +109 -0
  52. package/components/oxy-calendar-view/utils.ts +429 -0
  53. package/components/oxy-calendar-view/year/index.scss +153 -0
  54. package/components/oxy-calendar-view/year/types.ts +20 -0
  55. package/components/oxy-calendar-view/year/year.vue +202 -0
  56. package/components/oxy-calendar-view/yearPanel/index.scss +24 -0
  57. package/components/oxy-calendar-view/yearPanel/types.ts +38 -0
  58. package/components/oxy-calendar-view/yearPanel/year-panel.vue +135 -0
  59. package/components/oxy-card/index.scss +71 -0
  60. package/components/oxy-card/oxy-card.vue +37 -0
  61. package/components/oxy-card/types.ts +30 -0
  62. package/components/oxy-cell/index.scss +206 -0
  63. package/components/oxy-cell/oxy-cell.vue +140 -0
  64. package/components/oxy-cell/types.ts +111 -0
  65. package/components/oxy-cell-group/index.scss +56 -0
  66. package/components/oxy-cell-group/oxy-cell-group.vue +45 -0
  67. package/components/oxy-cell-group/types.ts +32 -0
  68. package/components/oxy-checkbox/index.scss +285 -0
  69. package/components/oxy-checkbox/oxy-checkbox.vue +177 -0
  70. package/components/oxy-checkbox/types.ts +68 -0
  71. package/components/oxy-checkbox-group/index.scss +20 -0
  72. package/components/oxy-checkbox-group/oxy-checkbox-group.vue +100 -0
  73. package/components/oxy-checkbox-group/types.ts +59 -0
  74. package/components/oxy-circle/index.scss +18 -0
  75. package/components/oxy-circle/oxy-circle.vue +296 -0
  76. package/components/oxy-circle/types.ts +54 -0
  77. package/components/oxy-col/index.scss +19 -0
  78. package/components/oxy-col/oxy-col.vue +49 -0
  79. package/components/oxy-col/types.ts +15 -0
  80. package/components/oxy-col-picker/index.scss +168 -0
  81. package/components/oxy-col-picker/oxy-col-picker.vue +498 -0
  82. package/components/oxy-col-picker/types.ts +166 -0
  83. package/components/oxy-collapse/index.scss +55 -0
  84. package/components/oxy-collapse/oxy-collapse.vue +151 -0
  85. package/components/oxy-collapse/types.ts +58 -0
  86. package/components/oxy-collapse-item/index.scss +90 -0
  87. package/components/oxy-collapse-item/oxy-collapse-item.vue +171 -0
  88. package/components/oxy-collapse-item/types.ts +48 -0
  89. package/components/oxy-config-provider/oxy-config-provider.vue +73 -0
  90. package/components/oxy-config-provider/types.ts +1052 -0
  91. package/components/oxy-count-down/index.scss +15 -0
  92. package/components/oxy-count-down/oxy-count-down.vue +60 -0
  93. package/components/oxy-count-down/types.ts +41 -0
  94. package/components/oxy-count-down/utils.ts +52 -0
  95. package/components/oxy-count-to/index.scss +7 -0
  96. package/components/oxy-count-to/oxy-count-to.vue +125 -0
  97. package/components/oxy-count-to/types.ts +117 -0
  98. package/components/oxy-curtain/index.scss +85 -0
  99. package/components/oxy-curtain/oxy-curtain.vue +172 -0
  100. package/components/oxy-curtain/types.ts +73 -0
  101. package/components/oxy-datetime-picker/index.scss +164 -0
  102. package/components/oxy-datetime-picker/oxy-datetime-picker.vue +801 -0
  103. package/components/oxy-datetime-picker/types.ts +231 -0
  104. package/components/oxy-datetime-picker-view/oxy-datetime-picker-view.vue +499 -0
  105. package/components/oxy-datetime-picker-view/types.ts +120 -0
  106. package/components/oxy-datetime-picker-view/util.ts +30 -0
  107. package/components/oxy-design-uni/oxy-design-uni.vue +5 -0
  108. package/components/oxy-divider/index.scss +100 -0
  109. package/components/oxy-divider/oxy-divider.vue +52 -0
  110. package/components/oxy-divider/types.ts +35 -0
  111. package/components/oxy-drop-menu/index.scss +86 -0
  112. package/components/oxy-drop-menu/oxy-drop-menu.vue +166 -0
  113. package/components/oxy-drop-menu/types.ts +38 -0
  114. package/components/oxy-drop-menu-item/index.scss +66 -0
  115. package/components/oxy-drop-menu-item/oxy-drop-menu-item.vue +221 -0
  116. package/components/oxy-drop-menu-item/types.ts +94 -0
  117. package/components/oxy-fab/index.scss +116 -0
  118. package/components/oxy-fab/oxy-fab.vue +276 -0
  119. package/components/oxy-fab/types.ts +66 -0
  120. package/components/oxy-floating-panel/index.scss +64 -0
  121. package/components/oxy-floating-panel/oxy-floating-panel.vue +140 -0
  122. package/components/oxy-floating-panel/type.ts +32 -0
  123. package/components/oxy-form/oxy-form.vue +207 -0
  124. package/components/oxy-form/types.ts +76 -0
  125. package/components/oxy-form-item/index.scss +18 -0
  126. package/components/oxy-form-item/oxy-form-item.vue +56 -0
  127. package/components/oxy-form-item/types.ts +16 -0
  128. package/components/oxy-gap/index.scss +9 -0
  129. package/components/oxy-gap/oxy-gap.vue +36 -0
  130. package/components/oxy-gap/types.ts +17 -0
  131. package/components/oxy-grid/index.scss +9 -0
  132. package/components/oxy-grid/oxy-grid.vue +106 -0
  133. package/components/oxy-grid/types.ts +50 -0
  134. package/components/oxy-grid-item/index.scss +148 -0
  135. package/components/oxy-grid-item/oxy-grid-item.vue +176 -0
  136. package/components/oxy-grid-item/types.ts +77 -0
  137. package/components/oxy-icon/index.scss +1230 -0
  138. package/components/oxy-icon/oxy-icon.vue +53 -0
  139. package/components/oxy-icon/oxy-icons.ttf +0 -0
  140. package/components/oxy-icon/types.ts +21 -0
  141. package/components/oxy-img/index.scss +19 -0
  142. package/components/oxy-img/oxy-img.vue +81 -0
  143. package/components/oxy-img/types.ts +61 -0
  144. package/components/oxy-img-cropper/index.scss +231 -0
  145. package/components/oxy-img-cropper/oxy-img-cropper.vue +664 -0
  146. package/components/oxy-img-cropper/types.ts +76 -0
  147. package/components/oxy-index-anchor/index.scss +35 -0
  148. package/components/oxy-index-anchor/oxy-index-anchor.vue +55 -0
  149. package/components/oxy-index-anchor/type.ts +9 -0
  150. package/components/oxy-index-bar/index.scss +39 -0
  151. package/components/oxy-index-bar/oxy-index-bar.vue +156 -0
  152. package/components/oxy-index-bar/type.ts +23 -0
  153. package/components/oxy-input/index.scss +323 -0
  154. package/components/oxy-input/oxy-input.vue +300 -0
  155. package/components/oxy-input/placeholder.scss +21 -0
  156. package/components/oxy-input/types.ts +189 -0
  157. package/components/oxy-input-number/index.scss +132 -0
  158. package/components/oxy-input-number/oxy-input-number.vue +464 -0
  159. package/components/oxy-input-number/types.ts +101 -0
  160. package/components/oxy-keyboard/constants.ts +81 -0
  161. package/components/oxy-keyboard/index.scss +102 -0
  162. package/components/oxy-keyboard/key/index.scss +79 -0
  163. package/components/oxy-keyboard/key/index.vue +76 -0
  164. package/components/oxy-keyboard/key/types.ts +11 -0
  165. package/components/oxy-keyboard/oxy-keyboard.vue +206 -0
  166. package/components/oxy-keyboard/types.ts +92 -0
  167. package/components/oxy-loading/index.scss +37 -0
  168. package/components/oxy-loading/oxy-loading.vue +90 -0
  169. package/components/oxy-loading/types.ts +22 -0
  170. package/components/oxy-loadmore/index.scss +39 -0
  171. package/components/oxy-loadmore/oxy-loadmore.vue +59 -0
  172. package/components/oxy-loadmore/types.ts +30 -0
  173. package/components/oxy-message-box/index.scss +108 -0
  174. package/components/oxy-message-box/index.ts +87 -0
  175. package/components/oxy-message-box/oxy-message-box.vue +291 -0
  176. package/components/oxy-message-box/types.ts +132 -0
  177. package/components/oxy-navbar/index.scss +93 -0
  178. package/components/oxy-navbar/oxy-navbar.vue +111 -0
  179. package/components/oxy-navbar/types.ts +52 -0
  180. package/components/oxy-navbar-capsule/index.scss +66 -0
  181. package/components/oxy-navbar-capsule/oxy-navbar-capsule.vue +35 -0
  182. package/components/oxy-navbar-capsule/types.ts +8 -0
  183. package/components/oxy-notice-bar/index.scss +68 -0
  184. package/components/oxy-notice-bar/oxy-notice-bar.vue +266 -0
  185. package/components/oxy-notice-bar/types.ts +67 -0
  186. package/components/oxy-notify/index.scss +34 -0
  187. package/components/oxy-notify/index.ts +61 -0
  188. package/components/oxy-notify/oxy-notify.vue +85 -0
  189. package/components/oxy-notify/types.ts +66 -0
  190. package/components/oxy-number-keyboard/index.scss +78 -0
  191. package/components/oxy-number-keyboard/key/index.scss +81 -0
  192. package/components/oxy-number-keyboard/key/index.vue +78 -0
  193. package/components/oxy-number-keyboard/key/types.ts +11 -0
  194. package/components/oxy-number-keyboard/oxy-number-keyboard.vue +151 -0
  195. package/components/oxy-number-keyboard/types.ts +83 -0
  196. package/components/oxy-overlay/index.scss +17 -0
  197. package/components/oxy-overlay/oxy-overlay.vue +47 -0
  198. package/components/oxy-overlay/types.ts +25 -0
  199. package/components/oxy-pagination/index.scss +57 -0
  200. package/components/oxy-pagination/oxy-pagination.vue +110 -0
  201. package/components/oxy-pagination/types.ts +41 -0
  202. package/components/oxy-password-input/index.scss +124 -0
  203. package/components/oxy-password-input/oxy-password-input.vue +49 -0
  204. package/components/oxy-password-input/types.ts +33 -0
  205. package/components/oxy-picker/index.scss +110 -0
  206. package/components/oxy-picker/oxy-picker.vue +412 -0
  207. package/components/oxy-picker/types.ts +189 -0
  208. package/components/oxy-picker-view/index.scss +92 -0
  209. package/components/oxy-picker-view/oxy-picker-view.vue +369 -0
  210. package/components/oxy-picker-view/types.ts +152 -0
  211. package/components/oxy-popover/index.scss +116 -0
  212. package/components/oxy-popover/oxy-popover.vue +180 -0
  213. package/components/oxy-popover/types.ts +69 -0
  214. package/components/oxy-popup/index.scss +84 -0
  215. package/components/oxy-popup/oxy-popup.vue +169 -0
  216. package/components/oxy-popup/types.ts +95 -0
  217. package/components/oxy-progress/index.scss +68 -0
  218. package/components/oxy-progress/oxy-progress.vue +197 -0
  219. package/components/oxy-progress/types.ts +35 -0
  220. package/components/oxy-radio/index.scss +301 -0
  221. package/components/oxy-radio/oxy-radio.vue +118 -0
  222. package/components/oxy-radio/types.ts +42 -0
  223. package/components/oxy-radio-group/index.scss +23 -0
  224. package/components/oxy-radio-group/oxy-radio-group.vue +51 -0
  225. package/components/oxy-radio-group/types.ts +39 -0
  226. package/components/oxy-rate/index.scss +25 -0
  227. package/components/oxy-rate/oxy-rate.vue +178 -0
  228. package/components/oxy-rate/types.ts +103 -0
  229. package/components/oxy-resize/index.scss +27 -0
  230. package/components/oxy-resize/oxy-resize.vue +144 -0
  231. package/components/oxy-resize/types.ts +6 -0
  232. package/components/oxy-root-portal/oxy-root-portal.vue +50 -0
  233. package/components/oxy-row/index.scss +10 -0
  234. package/components/oxy-row/oxy-row.vue +42 -0
  235. package/components/oxy-row/types.ts +16 -0
  236. package/components/oxy-search/index.scss +148 -0
  237. package/components/oxy-search/oxy-search.vue +187 -0
  238. package/components/oxy-search/types.ts +93 -0
  239. package/components/oxy-segmented/index.scss +101 -0
  240. package/components/oxy-segmented/oxy-segmented.vue +143 -0
  241. package/components/oxy-segmented/types.ts +71 -0
  242. package/components/oxy-select-picker/index.scss +102 -0
  243. package/components/oxy-select-picker/oxy-select-picker.vue +432 -0
  244. package/components/oxy-select-picker/types.ts +123 -0
  245. package/components/oxy-sidebar/index.scss +25 -0
  246. package/components/oxy-sidebar/oxy-sidebar.vue +63 -0
  247. package/components/oxy-sidebar/types.ts +38 -0
  248. package/components/oxy-sidebar-item/index.scss +97 -0
  249. package/components/oxy-sidebar-item/oxy-sidebar-item.vue +116 -0
  250. package/components/oxy-sidebar-item/types.ts +31 -0
  251. package/components/oxy-signature/index.scss +31 -0
  252. package/components/oxy-signature/oxy-signature.vue +630 -0
  253. package/components/oxy-signature/types.ts +108 -0
  254. package/components/oxy-skeleton/index.scss +96 -0
  255. package/components/oxy-skeleton/index.ts +1 -0
  256. package/components/oxy-skeleton/oxy-skeleton.vue +110 -0
  257. package/components/oxy-skeleton/types.ts +69 -0
  258. package/components/oxy-slider/index.scss +98 -0
  259. package/components/oxy-slider/oxy-slider.vue +356 -0
  260. package/components/oxy-slider/types.ts +138 -0
  261. package/components/oxy-sort-button/index.scss +89 -0
  262. package/components/oxy-sort-button/oxy-sort-button.vue +69 -0
  263. package/components/oxy-sort-button/types.ts +43 -0
  264. package/components/oxy-status-tip/images/collect.png +0 -0
  265. package/components/oxy-status-tip/images/content.png +0 -0
  266. package/components/oxy-status-tip/images/network.png +0 -0
  267. package/components/oxy-status-tip/images/search.png +0 -0
  268. package/components/oxy-status-tip/index.scss +37 -0
  269. package/components/oxy-status-tip/oxy-status-tip.vue +71 -0
  270. package/components/oxy-status-tip/types.ts +50 -0
  271. package/components/oxy-step/index.scss +235 -0
  272. package/components/oxy-step/oxy-step.vue +150 -0
  273. package/components/oxy-step/types.ts +33 -0
  274. package/components/oxy-steps/index.scss +10 -0
  275. package/components/oxy-steps/oxy-steps.vue +28 -0
  276. package/components/oxy-steps/types.ts +50 -0
  277. package/components/oxy-sticky/index.scss +9 -0
  278. package/components/oxy-sticky/oxy-sticky.vue +190 -0
  279. package/components/oxy-sticky/types.ts +13 -0
  280. package/components/oxy-sticky-box/index.scss +6 -0
  281. package/components/oxy-sticky-box/oxy-sticky-box.vue +155 -0
  282. package/components/oxy-sticky-box/types.ts +11 -0
  283. package/components/oxy-swipe-action/index.scss +22 -0
  284. package/components/oxy-swipe-action/oxy-swipe-action.vue +294 -0
  285. package/components/oxy-swipe-action/types.ts +40 -0
  286. package/components/oxy-swiper/index.scss +53 -0
  287. package/components/oxy-swiper/oxy-swiper.vue +318 -0
  288. package/components/oxy-swiper/types.ts +264 -0
  289. package/components/oxy-swiper-nav/index.scss +159 -0
  290. package/components/oxy-swiper-nav/oxy-swiper-nav.vue +37 -0
  291. package/components/oxy-swiper-nav/types.ts +42 -0
  292. package/components/oxy-switch/index.scss +58 -0
  293. package/components/oxy-switch/oxy-switch.vue +83 -0
  294. package/components/oxy-switch/types.ts +58 -0
  295. package/components/oxy-tab/index.scss +16 -0
  296. package/components/oxy-tab/oxy-tab.vue +88 -0
  297. package/components/oxy-tab/types.ts +30 -0
  298. package/components/oxy-tabbar/index.scss +62 -0
  299. package/components/oxy-tabbar/oxy-tabbar.vue +91 -0
  300. package/components/oxy-tabbar/types.ts +73 -0
  301. package/components/oxy-tabbar-item/index.scss +55 -0
  302. package/components/oxy-tabbar-item/oxy-tabbar-item.vue +99 -0
  303. package/components/oxy-tabbar-item/types.ts +51 -0
  304. package/components/oxy-table/index.scss +163 -0
  305. package/components/oxy-table/oxy-table.vue +283 -0
  306. package/components/oxy-table/types.ts +58 -0
  307. package/components/oxy-table-col/index.scss +46 -0
  308. package/components/oxy-table-col/oxy-table-col.vue +149 -0
  309. package/components/oxy-table-col/types.ts +54 -0
  310. package/components/oxy-tabs/index.scss +299 -0
  311. package/components/oxy-tabs/oxy-tabs.vue +443 -0
  312. package/components/oxy-tabs/types.ts +107 -0
  313. package/components/oxy-tag/index.scss +115 -0
  314. package/components/oxy-tag/oxy-tag.vue +148 -0
  315. package/components/oxy-tag/types.ts +81 -0
  316. package/components/oxy-text/index.scss +37 -0
  317. package/components/oxy-text/oxy-text.vue +139 -0
  318. package/components/oxy-text/types.ts +98 -0
  319. package/components/oxy-textarea/index.scss +340 -0
  320. package/components/oxy-textarea/oxy-textarea.vue +296 -0
  321. package/components/oxy-textarea/placeholder.scss +20 -0
  322. package/components/oxy-textarea/types.ts +288 -0
  323. package/components/oxy-toast/index.scss +75 -0
  324. package/components/oxy-toast/index.ts +92 -0
  325. package/components/oxy-toast/oxy-toast.vue +198 -0
  326. package/components/oxy-toast/types.ts +181 -0
  327. package/components/oxy-tooltip/index.scss +66 -0
  328. package/components/oxy-tooltip/oxy-tooltip.vue +141 -0
  329. package/components/oxy-tooltip/types.ts +107 -0
  330. package/components/oxy-transition/index.scss +95 -0
  331. package/components/oxy-transition/oxy-transition.vue +232 -0
  332. package/components/oxy-transition/types.ts +98 -0
  333. package/components/oxy-upload/index.scss +175 -0
  334. package/components/oxy-upload/oxy-upload.vue +673 -0
  335. package/components/oxy-upload/types.ts +391 -0
  336. package/components/oxy-video-preview/index.scss +34 -0
  337. package/components/oxy-video-preview/oxy-video-preview.vue +72 -0
  338. package/components/oxy-video-preview/types.ts +23 -0
  339. package/components/oxy-watermark/index.scss +18 -0
  340. package/components/oxy-watermark/oxy-watermark.vue +486 -0
  341. package/components/oxy-watermark/types.ts +76 -0
  342. package/dayjs/constant.js +26 -0
  343. package/dayjs/index.d.ts +430 -0
  344. package/dayjs/index.js +542 -0
  345. package/dayjs/locale/en.js +13 -0
  346. package/dayjs/utils.js +59 -0
  347. package/global.d.ts +101 -0
  348. package/index.ts +12 -0
  349. package/locale/index.ts +32 -0
  350. package/locale/lang/ar-SA.ts +133 -0
  351. package/locale/lang/en-US.ts +133 -0
  352. package/locale/lang/zh-CN.ts +137 -0
  353. package/package.json +1 -0
  354. package/tags.json +1 -0
  355. package/web-types.json +1 -0
@@ -0,0 +1,443 @@
1
+ <template>
2
+ <template v-if="sticky">
3
+ <oxy-sticky-box>
4
+ <view
5
+ :class="`oxy-tabs ${customClass} ${innerSlidable ? 'is-slide' : ''} ${mapNum < children.length && mapNum !== 0 ? 'is-map' : ''}`"
6
+ :style="customStyle"
7
+ >
8
+ <oxy-sticky :offset-top="offsetTop">
9
+ <view class="oxy-tabs__nav oxy-tabs__nav--sticky">
10
+ <view class="oxy-tabs__nav--wrap">
11
+ <scroll-view :scroll-x="innerSlidable" scroll-with-animation :scroll-left="state.scrollLeft">
12
+ <view class="oxy-tabs__nav-container">
13
+ <view
14
+ @click="handleSelect(index)"
15
+ v-for="(item, index) in children"
16
+ :key="index"
17
+ :class="`oxy-tabs__nav-item ${state.activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`"
18
+ :style="state.activeIndex === index ? (color ? 'color:' + color : '') : inactiveColor ? 'color:' + inactiveColor : ''"
19
+ >
20
+ <oxy-badge v-if="item.badgeProps" v-bind="item.badgeProps">
21
+ <text class="oxy-tabs__nav-item-text">{{ item.title }}</text>
22
+ </oxy-badge>
23
+ <text v-else class="oxy-tabs__nav-item-text">{{ item.title }}</text>
24
+
25
+ <view class="oxy-tabs__line oxy-tabs__line--inner" v-if="state.activeIndex === index && state.useInnerLine"></view>
26
+ </view>
27
+ <view class="oxy-tabs__line" :style="state.lineStyle"></view>
28
+ </view>
29
+ </scroll-view>
30
+ </view>
31
+ <view class="oxy-tabs__map" v-if="mapNum < children.length && mapNum !== 0">
32
+ <view :class="`oxy-tabs__map-btn ${state.animating ? 'is-open' : ''}`" @click="toggleMap">
33
+ <view :class="`oxy-tabs__map-arrow ${state.animating ? 'is-open' : ''}`">
34
+ <oxy-icon name="arrow-down" />
35
+ </view>
36
+ </view>
37
+ <view class="oxy-tabs__map-header" :style="`${state.mapShow ? '' : 'display:none;'} ${state.animating ? 'opacity:1;' : ''}`">
38
+ {{ mapTitle || translate('all') }}
39
+ </view>
40
+ <view :class="`oxy-tabs__map-body ${state.animating ? 'is-open' : ''}`" :style="state.mapShow ? '' : 'display:none'">
41
+ <view class="oxy-tabs__map-nav-item" v-for="(item, index) in children" :key="index" @click="handleSelect(index)">
42
+ <view
43
+ :class="`oxy-tabs__map-nav-btn ${state.activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`"
44
+ :style="
45
+ state.activeIndex === index
46
+ ? color
47
+ ? 'color:' + color + ';border-color:' + color
48
+ : ''
49
+ : inactiveColor
50
+ ? 'color:' + inactiveColor
51
+ : ''
52
+ "
53
+ >
54
+ {{ item.title }}
55
+ </view>
56
+ </view>
57
+ </view>
58
+ </view>
59
+ </view>
60
+ </oxy-sticky>
61
+
62
+ <view class="oxy-tabs__container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" @touchcancel="onTouchEnd">
63
+ <view :class="['oxy-tabs__body', animated ? 'is-animated' : '']" :style="bodyStyle">
64
+ <slot />
65
+ </view>
66
+ </view>
67
+
68
+ <view
69
+ class="oxy-tabs__mask"
70
+ :style="`${state.mapShow ? '' : 'display:none;'} ${state.animating ? 'opacity:1;' : ''}`"
71
+ @click="toggleMap"
72
+ ></view>
73
+ </view>
74
+ </oxy-sticky-box>
75
+ </template>
76
+
77
+ <template v-else>
78
+ <view :class="`oxy-tabs ${customClass} ${innerSlidable ? 'is-slide' : ''} ${mapNum < children.length && mapNum !== 0 ? 'is-map' : ''}`">
79
+ <view class="oxy-tabs__nav">
80
+ <view class="oxy-tabs__nav--wrap">
81
+ <scroll-view :scroll-x="innerSlidable" scroll-with-animation :scroll-left="state.scrollLeft">
82
+ <view class="oxy-tabs__nav-container">
83
+ <view
84
+ v-for="(item, index) in children"
85
+ @click="handleSelect(index)"
86
+ :key="index"
87
+ :class="`oxy-tabs__nav-item ${state.activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`"
88
+ :style="state.activeIndex === index ? (color ? 'color:' + color : '') : inactiveColor ? 'color:' + inactiveColor : ''"
89
+ >
90
+ <oxy-badge custom-class="oxy-tabs__nav-item-badge" v-if="item.badgeProps" v-bind="item.badgeProps">
91
+ <text class="oxy-tabs__nav-item-text">{{ item.title }}</text>
92
+ </oxy-badge>
93
+ <text v-else class="oxy-tabs__nav-item-text">{{ item.title }}</text>
94
+ <view class="oxy-tabs__line oxy-tabs__line--inner" v-if="state.activeIndex === index && state.useInnerLine"></view>
95
+ </view>
96
+ <view class="oxy-tabs__line" :style="state.lineStyle"></view>
97
+ </view>
98
+ </scroll-view>
99
+ </view>
100
+ <view class="oxy-tabs__map" v-if="mapNum < children.length && mapNum !== 0">
101
+ <view class="oxy-tabs__map-btn" @click="toggleMap">
102
+ <view :class="`oxy-tabs__map-arrow ${state.animating ? 'is-open' : ''}`">
103
+ <oxy-icon name="arrow-down" />
104
+ </view>
105
+ </view>
106
+ <view class="oxy-tabs__map-header" :style="`${state.mapShow ? '' : 'display:none;'} ${state.animating ? 'opacity:1;' : ''}`">
107
+ {{ mapTitle || translate('all') }}
108
+ </view>
109
+ <view :class="`oxy-tabs__map-body ${state.animating ? 'is-open' : ''}`" :style="state.mapShow ? '' : 'display:none'">
110
+ <view class="oxy-tabs__map-nav-item" v-for="(item, index) in children" :key="index" @click="handleSelect(index)">
111
+ <view :class="`oxy-tabs__map-nav-btn ${state.activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`">
112
+ {{ item.title }}
113
+ </view>
114
+ </view>
115
+ </view>
116
+ </view>
117
+ </view>
118
+
119
+ <view class="oxy-tabs__container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" @touchcancel="onTouchEnd">
120
+ <view :class="['oxy-tabs__body', animated ? 'is-animated' : '']" :style="bodyStyle">
121
+ <slot />
122
+ </view>
123
+ </view>
124
+
125
+ <view
126
+ class="oxy-tabs__mask"
127
+ :style="`${state.mapShow ? '' : 'display:none;'} ${state.animating ? 'opacity:1' : ''}`"
128
+ @click="toggleMap"
129
+ ></view>
130
+ </view>
131
+ </template>
132
+ </template>
133
+ <script lang="ts">
134
+ export default {
135
+ name: 'oxy-tabs',
136
+ options: {
137
+ addGlobalClass: true,
138
+ virtualHost: true,
139
+ styleIsolation: 'shared'
140
+ }
141
+ }
142
+ </script>
143
+ <script lang="ts" setup>
144
+ import OxyIcon from '../oxy-icon/oxy-icon.vue'
145
+ import OxySticky from '../oxy-sticky/oxy-sticky.vue'
146
+ import OxyStickyBox from '../oxy-sticky-box/oxy-sticky-box.vue'
147
+ import { computed, getCurrentInstance, onMounted, watch, nextTick, reactive, type CSSProperties, type ComponentInstance } from 'vue'
148
+ import { addUnit, checkNumRange, debounce, getRect, isDef, isNumber, isString, objToStyle } from '../common/util'
149
+ import { useTouch } from '../composables/useTouch'
150
+ import { TABS_KEY, tabsProps, type TabsExpose } from './types'
151
+ import { useChildren } from '../composables/useChildren'
152
+ import { useTranslate } from '../composables/useTranslate'
153
+
154
+ const $item = '.oxy-tabs__nav-item'
155
+ const $itemText = '.oxy-tabs__nav-item-text'
156
+ const $container = '.oxy-tabs__nav-container'
157
+
158
+ const props = defineProps(tabsProps)
159
+ const emit = defineEmits(['change', 'disabled', 'click', 'update:modelValue'])
160
+
161
+ const { translate } = useTranslate('tabs')
162
+
163
+ const state = reactive({
164
+ activeIndex: 0, // 选中值的索引,默认第一个
165
+ lineStyle: 'display:none;', // 激活项边框线样式
166
+ useInnerLine: false, // 是否使用内部激活项边框线,当外部激活下划线未成功渲染时显示内部定位的
167
+ inited: false, // 是否初始化
168
+ animating: false, // 是否动画中
169
+ mapShow: false, // map的开关
170
+ scrollLeft: 0 // scroll-view偏移量
171
+ })
172
+
173
+ const { children, linkChildren } = useChildren(TABS_KEY)
174
+ linkChildren({ state, props })
175
+
176
+ const { proxy } = getCurrentInstance() as any
177
+
178
+ const touch = useTouch()
179
+
180
+ const innerSlidable = computed(() => {
181
+ return props.slidable === 'always' || children.length > props.slidableNum
182
+ })
183
+
184
+ const bodyStyle = computed(() => {
185
+ if (!props.animated) {
186
+ return ''
187
+ }
188
+
189
+ return objToStyle({
190
+ left: -100 * state.activeIndex + '%',
191
+ 'transition-duration': props.duration + 'ms',
192
+ '-webkit-transition-duration': props.duration + 'ms'
193
+ })
194
+ })
195
+
196
+ const getTabName = (tab: ComponentInstance<any>, index: number) => {
197
+ return isDef(tab.name) ? tab.name : index
198
+ }
199
+
200
+ /**
201
+ * 更新激活项
202
+ * @param value 激活值
203
+ * @param init 是否已初始化
204
+ * @param setScroll // 是否设置scroll-view滚动
205
+ */
206
+ const updateActive = (value: number | string = 0, init: boolean = false, setScroll: boolean = true) => {
207
+ // 没有tab子元素,不执行任何操作
208
+ if (children.length === 0) return
209
+
210
+ value = getActiveIndex(value)
211
+ // 被禁用,不执行任何操作
212
+ if (children[value].disabled) return
213
+ state.activeIndex = value
214
+ if (setScroll) {
215
+ updateLineStyle(init === false)
216
+ scrollIntoView()
217
+ }
218
+ setActiveTab()
219
+ }
220
+
221
+ /**
222
+ * @description 修改选中的tab Index
223
+ * @param {String |Number } value - radio绑定的value或者tab索引,默认值0
224
+ * @param {Boolean } init - 是否伴随初始化操作
225
+ */
226
+ const setActive = debounce(updateActive, 100, { leading: true })
227
+
228
+ watch(
229
+ () => props.modelValue,
230
+ (newValue) => {
231
+ if (!isNumber(newValue) && !isString(newValue)) {
232
+ console.error('[Oxy ui] error(oxy-tabs): the type of value should be number or string')
233
+ }
234
+ // 保证不为非空字符串,小于0的数字
235
+ if (newValue === '' || !isDef(newValue)) {
236
+ // eslint-disable-next-line quotes
237
+ console.error("[Oxy ui] error(oxy-tabs): tabs's value cannot be '' null or undefined")
238
+ }
239
+ if (typeof newValue === 'number' && newValue < 0) {
240
+ // eslint-disable-next-line quotes
241
+ console.error("[Oxy ui] error(oxy-tabs): tabs's value cannot be less than zero")
242
+ }
243
+ },
244
+ {
245
+ immediate: true,
246
+ deep: true
247
+ }
248
+ )
249
+
250
+ watch(
251
+ () => props.modelValue,
252
+ (newValue) => {
253
+ const index = getActiveIndex(newValue)
254
+ setActive(newValue, false, index !== state.activeIndex)
255
+ },
256
+ {
257
+ immediate: false,
258
+ deep: true
259
+ }
260
+ )
261
+
262
+ watch(
263
+ () => children.length,
264
+ () => {
265
+ if (state.inited) {
266
+ nextTick(() => {
267
+ setActive(props.modelValue)
268
+ })
269
+ }
270
+ }
271
+ )
272
+
273
+ watch(
274
+ () => props.slidableNum,
275
+ (newValue) => {
276
+ checkNumRange(newValue, 'slidableNum')
277
+ }
278
+ )
279
+
280
+ watch(
281
+ () => props.mapNum,
282
+ (newValue) => {
283
+ checkNumRange(newValue, 'mapNum')
284
+ }
285
+ )
286
+
287
+ onMounted(() => {
288
+ state.inited = true
289
+ nextTick(() => {
290
+ updateActive(props.modelValue, true)
291
+ state.useInnerLine = true
292
+ })
293
+ })
294
+
295
+ function toggleMap() {
296
+ if (state.mapShow) {
297
+ state.animating = false
298
+ setTimeout(() => {
299
+ state.mapShow = false
300
+ }, 300)
301
+ } else {
302
+ state.mapShow = true
303
+ setTimeout(() => {
304
+ state.animating = true
305
+ }, 100)
306
+ }
307
+ }
308
+
309
+ /**
310
+ * 更新 underline的偏移量
311
+ * @param animation 是否开启动画
312
+ */
313
+ async function updateLineStyle(animation: boolean = true) {
314
+ if (!state.inited) return
315
+ const { autoLineWidth, lineWidth, lineHeight } = props
316
+ try {
317
+ const lineStyle: CSSProperties = {}
318
+ if (isDef(lineWidth)) {
319
+ lineStyle.width = addUnit(lineWidth)
320
+ } else {
321
+ if (autoLineWidth) {
322
+ const textRects = await getRect($itemText, true, proxy)
323
+ const textWidth = Number(textRects[state.activeIndex].width)
324
+ lineStyle.width = addUnit(textWidth)
325
+ }
326
+ }
327
+ if (isDef(lineHeight)) {
328
+ lineStyle.height = addUnit(lineHeight)
329
+ lineStyle.borderRadius = `calc(${addUnit(lineHeight)} / 2)`
330
+ }
331
+ const rects = await getRect($item, true, proxy)
332
+ const rect = rects[state.activeIndex]
333
+ let left = rects.slice(0, state.activeIndex).reduce((prev, curr) => prev + Number(curr.width), 0) + Number(rect.width) / 2
334
+ if (left) {
335
+ lineStyle.transform = `translateX(${left}px) translateX(-50%)`
336
+ if (animation) {
337
+ lineStyle.transition = 'width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);'
338
+ }
339
+ state.useInnerLine = false
340
+ state.lineStyle = objToStyle(lineStyle)
341
+ }
342
+ } catch (error) {
343
+ console.error('[Oxy ui] error(oxy-tabs): update line style failed', error)
344
+ }
345
+ }
346
+
347
+ function setActiveTab() {
348
+ if (!state.inited) return
349
+ const name = getTabName(children[state.activeIndex], state.activeIndex)
350
+ if (name !== props.modelValue) {
351
+ emit('change', {
352
+ index: state.activeIndex,
353
+ name: name
354
+ })
355
+ emit('update:modelValue', name)
356
+ }
357
+ }
358
+
359
+ function scrollIntoView() {
360
+ if (!state.inited) return
361
+ Promise.all([getRect($item, true, proxy), getRect($container, false, proxy)]).then(([navItemsRects, navRect]) => {
362
+ // 选中元素
363
+ const selectItem = navItemsRects[state.activeIndex]
364
+ // 选中元素之前的节点的宽度总和
365
+ const offsetLeft = (navItemsRects as any).slice(0, state.activeIndex).reduce((prev: any, curr: any) => prev + curr.width, 0)
366
+ // scroll-view滑动到selectItem的偏移量
367
+ const left = offsetLeft - ((navRect as any).width - Number(selectItem.width)) / 2
368
+ if (left === state.scrollLeft) {
369
+ state.scrollLeft = left + Math.random() / 10000
370
+ } else {
371
+ state.scrollLeft = left
372
+ }
373
+ })
374
+ }
375
+
376
+ /**
377
+ * @description 单击tab的处理
378
+ * @param index
379
+ */
380
+ function handleSelect(index: number) {
381
+ if (index === undefined) return
382
+ const { disabled } = children[index]
383
+ const name = getTabName(children[index], index)
384
+
385
+ if (disabled) {
386
+ emit('disabled', {
387
+ index,
388
+ name
389
+ })
390
+ return
391
+ }
392
+ state.mapShow && toggleMap()
393
+ setActive(index)
394
+ emit('click', {
395
+ index,
396
+ name
397
+ })
398
+ }
399
+ function onTouchStart(event: any) {
400
+ if (!props.swipeable) return
401
+ touch.touchStart(event)
402
+ }
403
+ function onTouchMove(event: any) {
404
+ if (!props.swipeable) return
405
+ touch.touchMove(event)
406
+ }
407
+ function onTouchEnd() {
408
+ if (!props.swipeable) return
409
+ const { direction, deltaX, offsetX } = touch
410
+ const minSwipeDistance = 50
411
+ if (direction.value === 'horizontal' && offsetX.value >= minSwipeDistance) {
412
+ if (deltaX.value > 0 && state.activeIndex !== 0) {
413
+ setActive(state.activeIndex - 1)
414
+ } else if (deltaX.value < 0 && state.activeIndex !== children.length - 1) {
415
+ setActive(state.activeIndex + 1)
416
+ }
417
+ }
418
+ }
419
+ function getActiveIndex(value: number | string) {
420
+ // name代表的索引超过了children长度的边界,自动用0兜底
421
+ if (isNumber(value) && value >= children.length) {
422
+ // eslint-disable-next-line prettier/prettier
423
+ console.error('[Oxy ui] warning(oxy-tabs): the type of tabs\' value is Number shouldn\'t be less than its children')
424
+ value = 0
425
+ }
426
+ // 如果是字符串直接匹配,匹配不到用0兜底
427
+ if (isString(value)) {
428
+ const index = children.findIndex((item) => item.name === value)
429
+ value = index === -1 ? 0 : index
430
+ }
431
+
432
+ return value
433
+ }
434
+
435
+ defineExpose<TabsExpose>({
436
+ setActive,
437
+ scrollIntoView,
438
+ updateLineStyle
439
+ })
440
+ </script>
441
+ <style lang="scss" scoped>
442
+ @import './index.scss';
443
+ </style>
@@ -0,0 +1,107 @@
1
+ import { type ComponentPublicInstance, type ExtractPropTypes, type InjectionKey } from 'vue'
2
+ import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp, numericProp } from '../common/props'
3
+
4
+ export type TabsProvide = {
5
+ state: {
6
+ activeIndex: number
7
+ lineStyle: string // 激活项边框线样式
8
+ inited: boolean // 是否初始化
9
+ animating: boolean // 是否动画中
10
+ mapShow: boolean // map的开关
11
+ scrollLeft: number // scroll-view偏移量
12
+ }
13
+ props: Partial<TabsProps>
14
+ }
15
+
16
+ export type TabsSlidable = 'auto' | 'always'
17
+
18
+ export const TABS_KEY: InjectionKey<TabsProvide> = Symbol('oxy-tabs')
19
+
20
+ export const tabsProps = {
21
+ ...baseProps,
22
+ /**
23
+ * 绑定值
24
+ */
25
+ modelValue: makeNumericProp(0),
26
+ /**
27
+ * 标签数超过阈值可滑动
28
+ */
29
+ slidableNum: makeNumberProp(6),
30
+ /**
31
+ * 标签数超过阈值显示导航地图
32
+ */
33
+ mapNum: makeNumberProp(10),
34
+ /**
35
+ * 导航地图的标题
36
+ */
37
+ mapTitle: String,
38
+ /**
39
+ * 粘性布局
40
+ */
41
+ sticky: makeBooleanProp(false),
42
+ /**
43
+ * 粘性布局吸顶位置
44
+ */
45
+ offsetTop: makeNumberProp(0),
46
+ /**
47
+ * 开启手势滑动
48
+ */
49
+ swipeable: makeBooleanProp(false),
50
+ /**
51
+ * 自动调整底部条宽度,设置了 lineWidth 后无效
52
+ */
53
+ autoLineWidth: makeBooleanProp(false),
54
+ /**
55
+ * 底部条宽度,单位像素
56
+ */
57
+ lineWidth: numericProp,
58
+ /**
59
+ * 底部条高度,单位像素
60
+ */
61
+ lineHeight: numericProp,
62
+ /**
63
+ * 颜色
64
+ */
65
+ color: makeStringProp(''),
66
+ /**
67
+ * 非活动状态颜色
68
+ */
69
+ inactiveColor: makeStringProp(''),
70
+ /**
71
+ * 是否开启切换标签内容时的过渡动画
72
+ */
73
+ animated: makeBooleanProp(false),
74
+ /**
75
+ * 切换动画过渡时间,单位毫秒
76
+ */
77
+ duration: makeNumberProp(300),
78
+ /**
79
+ * 是否开启滚动导航
80
+ * 可选值:'auto' | 'always'
81
+ * @default auto
82
+ */
83
+ slidable: makeStringProp<TabsSlidable>('auto')
84
+ }
85
+
86
+ export type TabsExpose = {
87
+ /**
88
+ * 设置激活项
89
+ * @param value 激活值
90
+ * @param init 是否已初始化
91
+ * @param setScroll 是否设置scroll-view滚动
92
+ */
93
+ setActive: (value: number | string, init: boolean, setScroll: boolean) => void
94
+ /**
95
+ * 使选中项滚动到可视区域
96
+ */
97
+ scrollIntoView: () => void
98
+ /**
99
+ * 更新激活项边框线样式
100
+ * @param animation 是否开启动画,默认开启
101
+ */
102
+ updateLineStyle: (animation?: boolean) => void
103
+ }
104
+
105
+ export type TabsProps = ExtractPropTypes<typeof tabsProps>
106
+
107
+ export type TabsInstance = ComponentPublicInstance<TabsProps, TabsExpose>
@@ -0,0 +1,115 @@
1
+ @import '../common/abstracts/variable';
2
+ @import '../common/abstracts/mixin';
3
+
4
+ @mixin tag-type-style ($normalColor, $normalBg) {
5
+ background: $normalBg;
6
+
7
+ @include when(plain) {
8
+ background: transparent;
9
+ color: $normalColor;
10
+ border: 1px solid $normalColor;
11
+ padding: 0 4px;
12
+ }
13
+ @include when(round) {
14
+ line-height: 1.2;
15
+ font-size: $-tag-fs;
16
+ padding: 4px 11px;
17
+ background: transparent;
18
+ color: if($normalColor != $-tag-info-color, $normalColor, $-tag-round-color);
19
+ border: 1px solid if($normalColor != $-tag-info-color, $normalColor, $-tag-round-border-color);
20
+ border-radius: $-tag-round-radius;
21
+ }
22
+ @include when(mark) {
23
+ padding: 1px 6px;
24
+ border-radius: $-tag-mark-radius;
25
+
26
+ @include when(plain) {
27
+ padding: 0 6px;
28
+ }
29
+ }
30
+ @include when(active) {
31
+ color: $-tag-primary-color;
32
+ border-color: $-tag-primary-color;
33
+ }
34
+ }
35
+ @include b(tag) {
36
+ font-size: $-tag-small-fs;
37
+ display: inline-block;
38
+ color: $-tag-color;
39
+ padding: 0 3px;
40
+ border-radius: 2px;
41
+ transition: opacity .3s;
42
+ vertical-align: middle;
43
+ line-height: initial;
44
+
45
+ @include when(default) {
46
+ @include tag-type-style($-tag-info-color, $-tag-info-bg);
47
+ }
48
+ @include when(primary) {
49
+ @include tag-type-style($-tag-primary-color, $-tag-primary-bg);
50
+ }
51
+ @include when(danger) {
52
+ @include tag-type-style($-tag-danger-color, $-tag-danger-bg);
53
+ }
54
+ @include when(warning) {
55
+ @include tag-type-style($-tag-warning-color, $-tag-warning-bg);
56
+ }
57
+ @include when(success) {
58
+ @include tag-type-style($-tag-success-color, $-tag-success-bg);
59
+ }
60
+ @include when(icon) {
61
+ font-size: $-tag-fs;
62
+ line-height: 1.2;
63
+ padding: 2px 5px;
64
+ }
65
+ @include when(dynamic) {
66
+ box-sizing: border-box;
67
+ width: 88px;
68
+ transition: .3s;
69
+
70
+ &:active {
71
+ color: $-tag-primary-color;
72
+ border-color: $-tag-primary-color;
73
+ }
74
+ }
75
+ @include when(dynamic-input) {
76
+ border-color: $-tag-primary-color;
77
+ }
78
+ @include edeep(icon) {
79
+ display: inline-block;
80
+ margin-right: 4px;
81
+ font-size: $-tag-fs;
82
+ line-height: 1.2;
83
+ vertical-align: baseline;
84
+ }
85
+ @include e(text) {
86
+ display: inline-block;
87
+ vertical-align: text-top;
88
+ }
89
+ @include e(add-text) {
90
+ width: 60px;
91
+ height: 14px;
92
+ min-height: 14px;
93
+ display: inline-block;
94
+ font-size: $-tag-fs;
95
+ vertical-align: middle;
96
+ padding: 0;
97
+ }
98
+ @include e(close) {
99
+ display: inline-block;
100
+ margin-left: 24px;
101
+ margin-right: -4px;
102
+ font-size: $-tag-close-size;
103
+ height: 14px;
104
+ line-height: 1.1;
105
+ vertical-align: text-bottom;
106
+ color: $-tag-close-color;
107
+
108
+ &:active {
109
+ color: $-tag-close-active-color;
110
+ }
111
+ }
112
+ @include edeep(add) {
113
+ vertical-align: bottom;
114
+ }
115
+ }