@teammodlr/ui-kit 2.0.24 → 2.0.27

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 (390) hide show
  1. package/env.d.ts +1 -1
  2. package/lib/__storybook__/argTypes.d.ts +40 -40
  3. package/lib/__storybook__/createStory.d.ts +8 -8
  4. package/lib/__storybook__/index.d.ts +2 -2
  5. package/lib/components/avatar/Avatar.vue.d.ts +56 -56
  6. package/lib/components/avatar/style/Avatar.css.d.ts +9 -9
  7. package/lib/components/avatar/style/index.d.ts +1 -1
  8. package/lib/components/avatargroup/AvatarGroup.vue.d.ts +49 -49
  9. package/lib/components/avatargroup/style/AvatarGroup.css.d.ts +2 -2
  10. package/lib/components/avatargroup/style/index.d.ts +1 -1
  11. package/lib/components/avatargroup/symbol.d.ts +13 -13
  12. package/lib/components/badge/Badge.vue.d.ts +30 -30
  13. package/lib/components/badge/style/Badge.css.d.ts +4 -4
  14. package/lib/components/badge/style/index.d.ts +1 -1
  15. package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +34 -34
  16. package/lib/components/breadcrumb/BreadcrumbItem.vue.d.ts +29 -29
  17. package/lib/components/breadcrumb/style/Breadcrumb.css.d.ts +4 -4
  18. package/lib/components/breadcrumb/style/index.d.ts +1 -1
  19. package/lib/components/breadcrumb/symbol.d.ts +13 -13
  20. package/lib/components/button/Button.vue.d.ts +141 -141
  21. package/lib/components/button/style/Button.css.d.ts +25 -25
  22. package/lib/components/button/style/index.d.ts +1 -1
  23. package/lib/components/buttongroup/ButtonGroup.vue.d.ts +18 -18
  24. package/lib/components/buttongroup/style/ButtonGroup.css.d.ts +2 -2
  25. package/lib/components/buttongroup/style/index.d.ts +1 -1
  26. package/lib/components/buttongroup/symbol.d.ts +6 -6
  27. package/lib/components/checkbox/Checkbox.vue.d.ts +94 -94
  28. package/lib/components/checkbox/style/Checkbox.css.d.ts +16 -16
  29. package/lib/components/checkbox/style/index.d.ts +1 -1
  30. package/lib/components/colorpicker/ColorPicker.vue.d.ts +77 -77
  31. package/lib/components/colorpicker/style/ColorPicker.css.d.ts +10 -10
  32. package/lib/components/colorpicker/style/index.d.ts +1 -1
  33. package/lib/components/colorpicker/utils.d.ts +16 -16
  34. package/lib/components/dropdown/Dropdown.vue.d.ts +122 -122
  35. package/lib/components/dropdown/DropdownItem.vue.d.ts +78 -78
  36. package/lib/components/dropdown/DropdownList.vue.d.ts +5 -5
  37. package/lib/components/dropdown/DropdownSeperator.vue.d.ts +4 -4
  38. package/lib/components/dropdown/DropdownWrapper.vue.d.ts +2 -2
  39. package/lib/components/dropdown/hooks.d.ts +2 -2
  40. package/lib/components/dropdown/style/Dropdown.css.d.ts +6 -6
  41. package/lib/components/dropdown/style/index.d.ts +1 -1
  42. package/lib/components/dropdown/symbol.d.ts +6 -6
  43. package/lib/components/form/Form.vue.d.ts +75 -75
  44. package/lib/components/form/style/Form.css.d.ts +4 -4
  45. package/lib/components/form/style/index.d.ts +2 -2
  46. package/lib/components/form/symbol.d.ts +9 -9
  47. package/lib/components/image/Image.vue.d.ts +50 -50
  48. package/lib/components/index.d.ts +41 -40
  49. package/lib/components/input/Input.vue.d.ts +142 -142
  50. package/lib/components/input/style/Input.css.d.ts +23 -23
  51. package/lib/components/input/style/index.d.ts +1 -1
  52. package/lib/components/link/Link.vue.d.ts +51 -51
  53. package/lib/components/messageprovider/Message.vue.d.ts +73 -73
  54. package/lib/components/messageprovider/MessageProvider.vue.d.ts +52 -52
  55. package/lib/components/messageprovider/style/Message.css.d.ts +12 -12
  56. package/lib/components/messageprovider/style/index.d.ts +1 -1
  57. package/lib/components/messageprovider/types.d.ts +29 -29
  58. package/lib/components/messageprovider/useMessage.d.ts +2 -2
  59. package/lib/components/modal/Modal.vue.d.ts +52 -52
  60. package/lib/components/modal/style/Modal.css.d.ts +21 -21
  61. package/lib/components/modal/style/index.d.ts +1 -1
  62. package/lib/components/pagination/Pagination.vue.d.ts +84 -84
  63. package/lib/components/pagination/style/Pagination.css.d.ts +10 -10
  64. package/lib/components/pagination/style/index.d.ts +1 -1
  65. package/lib/components/radio/Radio.vue.d.ts +85 -85
  66. package/lib/components/radio/style/Checkbox.css.d.ts +16 -16
  67. package/lib/components/radio/style/index.d.ts +1 -1
  68. package/lib/components/radiobutton/RadioButton.vue.d.ts +98 -98
  69. package/lib/components/radiobutton/style/RadioButton.css.d.ts +14 -14
  70. package/lib/components/radiobutton/style/index.d.ts +1 -1
  71. package/lib/components/radiobuttongroup/RadioButtonGroup.vue.d.ts +48 -48
  72. package/lib/components/radiobuttongroup/style/RadioButtonGroup.css.d.ts +3 -3
  73. package/lib/components/radiobuttongroup/style/index.d.ts +1 -1
  74. package/lib/components/radiobuttongroup/symbol.d.ts +9 -9
  75. package/lib/components/select/Select.vue.d.ts +194 -194
  76. package/lib/components/select/style/Select.css.d.ts +31 -31
  77. package/lib/components/select/style/index.d.ts +1 -1
  78. package/lib/components/skeleton/Skeleton.vue.d.ts +33 -33
  79. package/lib/components/skeleton/style/Skeleton.css.d.ts +8 -8
  80. package/lib/components/skeleton/style/index.d.ts +2 -2
  81. package/lib/components/slider/Slider.vue.d.ts +32 -32
  82. package/lib/components/slider/style/Slider.css.d.ts +4 -4
  83. package/lib/components/slider/style/index.d.ts +1 -1
  84. package/lib/components/tab/Tab.vue.d.ts +41 -41
  85. package/lib/components/tab/TabGroup.vue.d.ts +43 -43
  86. package/lib/components/table/Table.vue.d.ts +62 -62
  87. package/lib/components/table/TableBody.vue.d.ts +2 -2
  88. package/lib/components/table/TableCell.vue.d.ts +2 -2
  89. package/lib/components/table/TableHead.vue.d.ts +30 -30
  90. package/lib/components/table/TableHeadRow.vue.d.ts +2 -2
  91. package/lib/components/table/TableRow.vue.d.ts +2 -2
  92. package/lib/components/table/style/Table.css.d.ts +4 -4
  93. package/lib/components/table/style/index.d.ts +1 -1
  94. package/lib/components/table/types/index.d.ts +6 -6
  95. package/lib/components/tag/Tag.vue.d.ts +44 -44
  96. package/lib/components/tag/style/Tag.css.d.ts +11 -11
  97. package/lib/components/tag/style/index.d.ts +1 -1
  98. package/lib/components/textarea/TextArea.vue.d.ts +137 -137
  99. package/lib/components/textarea/style/TextArea.css.d.ts +19 -19
  100. package/lib/components/textarea/style/index.d.ts +1 -1
  101. package/lib/components/toggle/Toggle.vue.d.ts +85 -0
  102. package/lib/components/toggle/style/Toggle.css.d.ts +7 -0
  103. package/lib/components/toggle/style/index.d.ts +1 -0
  104. package/lib/components/tooltip/Tooltip.vue.d.ts +71 -71
  105. package/lib/components/tooltip/style/Tooltip.css.d.ts +10 -10
  106. package/lib/components/tooltip/style/index.d.ts +1 -1
  107. package/lib/components/transfer/Transfer.vue.d.ts +67 -67
  108. package/lib/components/transfer/style/Transfer.css.d.ts +7 -7
  109. package/lib/components/transfer/style/index.d.ts +1 -1
  110. package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +73 -73
  111. package/lib/components/virtualscroll/style/VirtualScroll.css.d.ts +1 -1
  112. package/lib/components/virtualscroll/style/index.d.ts +1 -1
  113. package/lib/composables/element.d.ts +2 -2
  114. package/lib/composables/index.d.ts +3 -3
  115. package/lib/composables/useCachedUid.d.ts +13 -13
  116. package/lib/composables/useEventListener.d.ts +1 -1
  117. package/lib/composables/useInput.d.ts +36 -36
  118. package/lib/composables/useInteractive.d.ts +15 -15
  119. package/lib/composables/useIsServer.d.ts +1 -1
  120. package/lib/composables/useMount.d.ts +13 -13
  121. package/lib/composables/usePopper.d.ts +31 -31
  122. package/lib/composables/useZIndex.d.ts +8 -8
  123. package/lib/create.d.ts +9 -9
  124. package/lib/index.cjs.js +4 -4
  125. package/lib/index.d.ts +5 -5
  126. package/lib/index.es.js +1923 -1812
  127. package/lib/install.d.ts +4 -4
  128. package/lib/nuxt.js +33 -33
  129. package/lib/nuxt.plugin.js +8 -8
  130. package/lib/style.css +1 -1
  131. package/lib/styles/theme.css.d.ts +167 -167
  132. package/lib/styles/typography.css.d.ts +22 -22
  133. package/lib/types/props.d.ts +3 -3
  134. package/package.json +2 -2
  135. package/src/__storybook__/argTypes.ts +61 -61
  136. package/src/__storybook__/createStory.ts +15 -15
  137. package/src/__storybook__/index.ts +2 -2
  138. package/src/components/avatar/Avatar.vue +109 -109
  139. package/src/components/avatar/examples/basic.vue +6 -6
  140. package/src/components/avatar/examples/custom-size.vue +7 -7
  141. package/src/components/avatar/examples/index.stories.ts +28 -28
  142. package/src/components/avatar/examples/index.ts +5 -5
  143. package/src/components/avatar/examples/sizes.vue +33 -33
  144. package/src/components/avatar/examples/slots.vue +7 -7
  145. package/src/components/avatar/examples/variants.vue +18 -18
  146. package/src/components/avatar/style/Avatar.css.ts +92 -92
  147. package/src/components/avatar/style/index.ts +1 -1
  148. package/src/components/avatargroup/AvatarGroup.css +8 -8
  149. package/src/components/avatargroup/AvatarGroup.vue +71 -71
  150. package/src/components/avatargroup/examples/basic.vue +37 -37
  151. package/src/components/avatargroup/examples/index.stories.ts +24 -24
  152. package/src/components/avatargroup/examples/index.ts +1 -1
  153. package/src/components/avatargroup/style/AvatarGroup.css.ts +21 -21
  154. package/src/components/avatargroup/style/index.ts +1 -1
  155. package/src/components/avatargroup/symbol.ts +16 -16
  156. package/src/components/badge/Badge.css +128 -128
  157. package/src/components/badge/Badge.vue +43 -43
  158. package/src/components/badge/examples/basic.vue +10 -10
  159. package/src/components/badge/examples/index.stories.ts +21 -21
  160. package/src/components/badge/examples/index.ts +1 -1
  161. package/src/components/badge/style/Badge.css.ts +135 -135
  162. package/src/components/badge/style/index.ts +1 -1
  163. package/src/components/breadcrumb/Breadcrumb.css +46 -46
  164. package/src/components/breadcrumb/Breadcrumb.vue +58 -58
  165. package/src/components/breadcrumb/BreadcrumbItem.vue +72 -72
  166. package/src/components/breadcrumb/examples/basic.vue +7 -7
  167. package/src/components/breadcrumb/examples/index.stories.ts +20 -20
  168. package/src/components/breadcrumb/examples/index.ts +1 -1
  169. package/src/components/breadcrumb/style/Breadcrumb.css.ts +39 -39
  170. package/src/components/breadcrumb/symbol.ts +16 -16
  171. package/src/components/button/Button-old.css +378 -378
  172. package/src/components/button/Button.vue +203 -203
  173. package/src/components/button/examples/basic.vue +3 -3
  174. package/src/components/button/examples/disabled.vue +3 -3
  175. package/src/components/button/examples/icon-left.vue +12 -12
  176. package/src/components/button/examples/icon.vue +9 -9
  177. package/src/components/button/examples/index.stories.ts +35 -35
  178. package/src/components/button/examples/index.ts +8 -8
  179. package/src/components/button/examples/rounded.vue +7 -7
  180. package/src/components/button/examples/size.vue +7 -7
  181. package/src/components/button/examples/variants-secondary.vue +10 -10
  182. package/src/components/button/examples/variants.vue +10 -10
  183. package/src/components/button/style/Button.css.ts +677 -677
  184. package/src/components/button/style/index.ts +1 -1
  185. package/src/components/buttongroup/ButtonGroup.vue +36 -36
  186. package/src/components/buttongroup/examples/basic.vue +9 -9
  187. package/src/components/buttongroup/examples/icon-group.vue +21 -21
  188. package/src/components/buttongroup/examples/index.stories.ts +22 -22
  189. package/src/components/buttongroup/examples/index.ts +2 -2
  190. package/src/components/buttongroup/style/ButtonGroup.css.ts +39 -39
  191. package/src/components/buttongroup/style/index.ts +1 -1
  192. package/src/components/buttongroup/symbol.ts +7 -7
  193. package/src/components/checkbox/Checkbox.css +185 -185
  194. package/src/components/checkbox/Checkbox.vue +156 -156
  195. package/src/components/checkbox/examples/basic.vue +9 -9
  196. package/src/components/checkbox/examples/index.stories.ts +21 -21
  197. package/src/components/checkbox/examples/index.ts +3 -3
  198. package/src/components/checkbox/examples/slot.vue +11 -11
  199. package/src/components/checkbox/style/Checkbox.css.ts +140 -140
  200. package/src/components/checkbox/style/index.ts +1 -1
  201. package/src/components/colorpicker/ColorPicker.vue +324 -324
  202. package/src/components/colorpicker/examples/basic.vue +2 -2
  203. package/src/components/colorpicker/examples/index.stories.ts +17 -17
  204. package/src/components/colorpicker/style/ColorPicker.css.ts +116 -116
  205. package/src/components/colorpicker/style/index.ts +1 -1
  206. package/src/components/colorpicker/utils.ts +187 -187
  207. package/src/components/dropdown/Dropdown.vue +263 -263
  208. package/src/components/dropdown/DropdownItem.vue +134 -134
  209. package/src/components/dropdown/DropdownList.vue +20 -20
  210. package/src/components/dropdown/DropdownSeperator.vue +22 -22
  211. package/src/components/dropdown/DropdownWrapper.vue +18 -18
  212. package/src/components/dropdown/examples/basic.vue +73 -73
  213. package/src/components/dropdown/examples/context.vue +71 -71
  214. package/src/components/dropdown/examples/index.stories.ts +28 -28
  215. package/src/components/dropdown/examples/index.ts +3 -3
  216. package/src/components/dropdown/hooks.ts +30 -30
  217. package/src/components/dropdown/style/Dropdown.css.ts +54 -54
  218. package/src/components/dropdown/style/index.ts +1 -1
  219. package/src/components/dropdown/symbol.ts +7 -7
  220. package/src/components/form/Form.vue +153 -153
  221. package/src/components/form/examples/basic.vue +75 -75
  222. package/src/components/form/examples/index.stories.ts +25 -25
  223. package/src/components/form/examples/index.ts +1 -1
  224. package/src/components/form/style/Form.css.ts +22 -22
  225. package/src/components/form/style/index.ts +1 -1
  226. package/src/components/form/symbol.ts +10 -10
  227. package/src/components/image/Image.vue +71 -71
  228. package/src/components/image/examples/basic.vue +5 -5
  229. package/src/components/image/examples/index.stories.ts +12 -12
  230. package/src/components/image/examples/index.ts +1 -1
  231. package/src/components/index.ts +40 -39
  232. package/src/components/input/Input.css +173 -173
  233. package/src/components/input/Input.vue +218 -218
  234. package/src/components/input/examples/basic.vue +8 -8
  235. package/src/components/input/examples/index.stories.ts +24 -24
  236. package/src/components/input/examples/index.ts +4 -4
  237. package/src/components/input/examples/prefix.vue +9 -9
  238. package/src/components/input/examples/sizes.vue +9 -9
  239. package/src/components/input/examples/suffix.vue +9 -9
  240. package/src/components/input/style/Input.css.ts +221 -221
  241. package/src/components/input/style/index.ts +1 -1
  242. package/src/components/link/Link.css +147 -147
  243. package/src/components/link/Link.vue +53 -53
  244. package/src/components/link/examples/basic.vue +3 -3
  245. package/src/components/link/examples/index.stories.ts +20 -20
  246. package/src/components/link/examples/index.ts +1 -1
  247. package/src/components/messageprovider/Message.vue +123 -123
  248. package/src/components/messageprovider/MessageProvider.css +23 -23
  249. package/src/components/messageprovider/MessageProvider.vue +144 -144
  250. package/src/components/messageprovider/examples/basic.vue +70 -70
  251. package/src/components/messageprovider/examples/index.stories.ts +29 -29
  252. package/src/components/messageprovider/examples/index.ts +2 -2
  253. package/src/components/messageprovider/examples/update.vue +34 -34
  254. package/src/components/messageprovider/examples/wrapper.vue +9 -9
  255. package/src/components/messageprovider/style/Message.css.ts +109 -109
  256. package/src/components/messageprovider/style/index.ts +1 -1
  257. package/src/components/messageprovider/types.ts +47 -47
  258. package/src/components/messageprovider/useMessage.ts +12 -12
  259. package/src/components/modal/Modal.vue +125 -125
  260. package/src/components/modal/examples/basic.vue +40 -40
  261. package/src/components/modal/examples/index.stories.ts +20 -20
  262. package/src/components/modal/examples/index.ts +2 -2
  263. package/src/components/modal/examples/modal-form.vue +99 -99
  264. package/src/components/modal/style/Modal.css.ts +257 -257
  265. package/src/components/modal/style/index.ts +1 -1
  266. package/src/components/pagination/Pagination.vue +237 -237
  267. package/src/components/pagination/examples/basic.vue +17 -17
  268. package/src/components/pagination/examples/index.stories.ts +14 -14
  269. package/src/components/pagination/style/Pagination.css.ts +87 -87
  270. package/src/components/pagination/style/index.ts +1 -1
  271. package/src/components/radio/Checkbox.css +185 -185
  272. package/src/components/radio/Radio.vue +137 -137
  273. package/src/components/radio/examples/basic.vue +9 -9
  274. package/src/components/radio/examples/index.stories.ts +19 -19
  275. package/src/components/radio/examples/index.ts +2 -2
  276. package/src/components/radio/style/Checkbox.css.ts +131 -131
  277. package/src/components/radio/style/index.ts +1 -1
  278. package/src/components/radiobutton/RadioButton.vue +131 -131
  279. package/src/components/radiobutton/style/RadioButton.css.ts +183 -183
  280. package/src/components/radiobutton/style/index.ts +1 -1
  281. package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
  282. package/src/components/radiobuttongroup/examples/basic.vue +16 -16
  283. package/src/components/radiobuttongroup/examples/index.stories.ts +22 -22
  284. package/src/components/radiobuttongroup/examples/index.ts +2 -2
  285. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +36 -36
  286. package/src/components/radiobuttongroup/symbol.ts +10 -10
  287. package/src/components/select/Select.vue +569 -569
  288. package/src/components/select/examples/basic.vue +20 -20
  289. package/src/components/select/examples/index.stories.ts +22 -22
  290. package/src/components/select/examples/index.ts +3 -3
  291. package/src/components/select/examples/multiple.vue +21 -21
  292. package/src/components/select/examples/searchable.vue +20 -20
  293. package/src/components/select/style/Select.css.ts +261 -261
  294. package/src/components/select/style/index.ts +1 -1
  295. package/src/components/skeleton/Skeleton.css +73 -73
  296. package/src/components/skeleton/Skeleton.vue +55 -55
  297. package/src/components/skeleton/examples/basic.vue +3 -3
  298. package/src/components/skeleton/examples/index.stories.ts +17 -17
  299. package/src/components/skeleton/examples/index.ts +2 -2
  300. package/src/components/skeleton/examples/post.vue +8 -8
  301. package/src/components/skeleton/style/Skeleton.css.ts +56 -56
  302. package/src/components/skeleton/style/index.ts +1 -1
  303. package/src/components/slider/Slider.vue +76 -76
  304. package/src/components/slider/style/Slider.css.ts +42 -42
  305. package/src/components/slider/style/index.ts +1 -1
  306. package/src/components/tab/Tab.css +113 -113
  307. package/src/components/tab/Tab.vue +98 -98
  308. package/src/components/tab/TabGroup.vue +90 -90
  309. package/src/components/tab/examples/basic.vue +19 -19
  310. package/src/components/tab/examples/index.stories.ts +25 -25
  311. package/src/components/tab/examples/index.ts +2 -2
  312. package/src/components/tab/examples/vertical.vue +19 -19
  313. package/src/components/table/Table.vue +119 -124
  314. package/src/components/table/TableBody.vue +13 -13
  315. package/src/components/table/TableCell.vue +13 -13
  316. package/src/components/table/TableHead.vue +46 -46
  317. package/src/components/table/TableHeadRow.vue +15 -15
  318. package/src/components/table/TableRow.vue +13 -13
  319. package/src/components/table/examples/basic.vue +55 -55
  320. package/src/components/table/examples/empty.vue +44 -44
  321. package/src/components/table/examples/index.stories.ts +20 -20
  322. package/src/components/table/examples/index.ts +2 -2
  323. package/src/components/table/style/Table.css.ts +80 -80
  324. package/src/components/table/types/index.ts +6 -6
  325. package/src/components/tag/Tag.vue +66 -66
  326. package/src/components/tag/examples/basic.vue +5 -5
  327. package/src/components/tag/examples/index.stories.ts +22 -22
  328. package/src/components/tag/examples/index.ts +1 -1
  329. package/src/components/tag/style/Tag.css.ts +79 -79
  330. package/src/components/tag/style/index.ts +1 -1
  331. package/src/components/textarea/TextArea.css +173 -173
  332. package/src/components/textarea/TextArea.vue +181 -181
  333. package/src/components/textarea/examples/basic.vue +8 -8
  334. package/src/components/textarea/examples/index.stories.ts +18 -18
  335. package/src/components/textarea/style/TextArea.css.ts +189 -189
  336. package/src/components/textarea/style/index.ts +1 -1
  337. package/src/components/toggle/Toggle.vue +132 -0
  338. package/src/components/toggle/examples/basic.vue +9 -0
  339. package/src/components/toggle/examples/index.stories.ts +20 -0
  340. package/src/components/toggle/examples/index.ts +3 -0
  341. package/src/components/toggle/examples/slot.vue +11 -0
  342. package/src/components/toggle/style/Toggle.css.ts +135 -0
  343. package/src/components/toggle/style/index.ts +1 -0
  344. package/src/components/tooltip/Tooltip.css +43 -43
  345. package/src/components/tooltip/Tooltip.vue +118 -118
  346. package/src/components/tooltip/examples/basic.vue +5 -5
  347. package/src/components/tooltip/examples/index.stories.ts +22 -22
  348. package/src/components/tooltip/examples/index.ts +2 -2
  349. package/src/components/tooltip/examples/placement.vue +9 -9
  350. package/src/components/tooltip/style/Tooltip.css.ts +91 -91
  351. package/src/components/tooltip/style/index.ts +1 -1
  352. package/src/components/transfer/Transfer.vue +143 -143
  353. package/src/components/transfer/examples/basic.vue +20 -20
  354. package/src/components/transfer/examples/index.stories.ts +15 -15
  355. package/src/components/transfer/examples/index.ts +1 -1
  356. package/src/components/transfer/style/Transfer.css.ts +67 -67
  357. package/src/components/transfer/style/index.ts +1 -1
  358. package/src/components/virtualscroll/VirtualScroll.css +13 -13
  359. package/src/components/virtualscroll/VirtualScroll.vue +166 -166
  360. package/src/components/virtualscroll/examples/basic.vue +31 -31
  361. package/src/components/virtualscroll/examples/index.stories.ts +15 -15
  362. package/src/components/virtualscroll/examples/index.ts +1 -1
  363. package/src/components/virtualscroll/style/VirtualScroll.css.ts +18 -18
  364. package/src/components/virtualscroll/style/index.ts +1 -1
  365. package/src/composables/element.ts +13 -13
  366. package/src/composables/index.ts +2 -2
  367. package/src/composables/useCachedUid.ts +48 -48
  368. package/src/composables/useEventListener.ts +14 -14
  369. package/src/composables/useInput.ts +129 -129
  370. package/src/composables/useInteractive.ts +19 -19
  371. package/src/composables/useIsServer.ts +7 -7
  372. package/src/composables/useMount.ts +43 -43
  373. package/src/composables/usePopper.ts +194 -194
  374. package/src/composables/useZIndex.ts +30 -30
  375. package/src/create.ts +34 -34
  376. package/src/css/components.css +16 -15
  377. package/src/css/index.css +4 -4
  378. package/src/css/transitions.css +40 -40
  379. package/src/css/variables.css +80 -80
  380. package/src/examples/cards/cards.stories.ts +9 -9
  381. package/src/examples/cards/sidebar.vue +262 -262
  382. package/src/exports/nuxt.js +33 -33
  383. package/src/exports/nuxt.plugin.js +8 -8
  384. package/src/index.ts +7 -7
  385. package/src/install.ts +8 -8
  386. package/src/shims-vue.d.ts +6 -6
  387. package/src/styles/theme.css.ts +170 -170
  388. package/src/styles/typography.css.ts +91 -91
  389. package/src/types/props.ts +5 -5
  390. package/volar.d.ts +16 -16
@@ -1,677 +1,677 @@
1
- import {createVar, globalKeyframes, globalStyle, style, styleVariants} from "@vanilla-extract/css";
2
- import {themeVars} from "../../../styles/theme.css";
3
-
4
- const sizes = {
5
- xs: '22px',
6
- sm: '28px',
7
- md: '36px',
8
- lg: '40px',
9
- xl: '45px',
10
- };
11
-
12
- const borderRadiuses = {
13
- xs: '2px',
14
- sm: '3px',
15
- md: '4px',
16
- lg: '6px',
17
- xl: '8px',
18
- };
19
-
20
- const padding = {
21
- xs: `0 ${themeVars.space[1]}`,
22
- sm: `0 ${themeVars.space[2]}`,
23
- md: `0 ${themeVars.space[3]}`,
24
- lg: `0 ${themeVars.space[3]}`,
25
- xl: `0 ${themeVars.space[4]}`,
26
- }
27
-
28
- export const vars = {
29
- height: createVar(),
30
- radius: createVar(),
31
- padding: createVar(),
32
- backgroundColor: createVar(),
33
- borderColor: createVar(),
34
- boxShadowColor: createVar(),
35
- color: createVar(),
36
- }
37
-
38
- export const base = style({
39
- alignItems: 'center',
40
- boxSizing: 'border-box',
41
- display: 'inline-flex',
42
- fontSize: themeVars.fontSize.base,
43
- fontWeight: "500",
44
- maxWidth: '100%',
45
- width: 'auto',
46
- position: 'relative',
47
- textAlign: 'center',
48
- textDecoration: 'none',
49
- verticalAlign: 'middle',
50
- whiteSpace: 'nowrap',
51
- justifyContent: 'center',
52
- height: vars.height,
53
- lineHeight: vars.height,
54
- borderRadius: vars.radius,
55
- padding: vars.padding,
56
- zIndex: "auto",
57
- backgroundColor: vars.backgroundColor,
58
- border: 0,
59
- color: vars.color,
60
- transition: `color .2s ${themeVars.transition.default},
61
- background-color .25s ${themeVars.transition.default},
62
- box-shadow .25s ${themeVars.transition.default},
63
- border-color .25s ${themeVars.transition.default}`,
64
- fontFamily: 'inherit',
65
- ':hover': {
66
- cursor: 'pointer',
67
- },
68
- ':focus': {
69
- outline: 'none',
70
- }
71
- });
72
-
73
- export const variant = styleVariants({
74
- primary: {
75
- vars: {
76
- [vars.backgroundColor]: themeVars.color.blue[500],
77
- [vars.borderColor]: themeVars.color.blue[500],
78
- [vars.boxShadowColor]: themeVars.color.blue[500],
79
- [vars.color]: '#FFFFFF',
80
- },
81
- ':hover': {
82
- vars: {
83
- [vars.backgroundColor]: themeVars.color.blue[600],
84
- [vars.borderColor]: themeVars.color.blue[600],
85
- },
86
- },
87
- ':focus': {
88
- vars: {
89
- [vars.borderColor]: themeVars.color.blue[500],
90
- }
91
- }
92
- },
93
- dark: {
94
- vars: {
95
- [vars.backgroundColor]: themeVars.color.saxe[700],
96
- [vars.borderColor]: themeVars.color.saxe[700],
97
- [vars.boxShadowColor]: themeVars.color.saxe[700],
98
- [vars.color]: '#FFFFFF',
99
- },
100
- ':hover': {
101
- vars: {
102
- [vars.backgroundColor]: themeVars.color.saxe[800],
103
- [vars.borderColor]: themeVars.color.saxe[800],
104
- },
105
- },
106
- ':focus': {
107
- vars: {
108
- [vars.borderColor]: themeVars.color.saxe[900],
109
- }
110
- }
111
- },
112
- default: {
113
- vars: {
114
- [vars.color]: themeVars.color.font.text,
115
- [vars.backgroundColor]: 'white',
116
- [vars.boxShadowColor]: themeVars.color.blue[500],
117
- [vars.borderColor]: themeVars.color.gray[300],
118
- },
119
- ':hover': {
120
- vars: {
121
- [vars.color]: themeVars.color.blue[500],
122
- [vars.borderColor]: themeVars.color.blue[500]
123
- },
124
- },
125
- ':focus': {
126
- vars: {
127
- [vars.color]: themeVars.color.blue[500],
128
- [vars.borderColor]: themeVars.color.blue[500],
129
- }
130
- }
131
- },
132
- tertiary: {
133
- vars: {
134
- [vars.color]: themeVars.color.font.default,
135
- [vars.backgroundColor]: themeVars.color.gray[100],
136
- [vars.boxShadowColor]: themeVars.color.blue[100],
137
- [vars.borderColor]: themeVars.color.gray[300],
138
- },
139
- ':hover': {
140
- vars: {
141
- [vars.color]: themeVars.color.font.default,
142
- [vars.backgroundColor]: themeVars.color.gray[250],
143
- [vars.borderColor]: themeVars.color.gray[300]
144
- },
145
- },
146
- ':focus': {
147
- vars: {
148
- [vars.color]: themeVars.color.font.text,
149
- [vars.backgroundColor]: themeVars.color.gray[200],
150
- [vars.borderColor]: themeVars.color.gray[300]
151
- }
152
- }
153
- },
154
- success: {
155
- vars: {
156
- [vars.backgroundColor]: themeVars.color.green[500],
157
- [vars.borderColor]: themeVars.color.green[500],
158
- [vars.boxShadowColor]: themeVars.color.green[500],
159
- [vars.color]: '#FFFFFF',
160
- },
161
- ':hover': {
162
- vars: {
163
- [vars.backgroundColor]: themeVars.color.green[600],
164
- [vars.borderColor]: themeVars.color.green[600],
165
- [vars.color]: '#FFFFFF',
166
- },
167
- },
168
- ':focus': {
169
- vars: {
170
- [vars.borderColor]: themeVars.color.green[600],
171
- [vars.backgroundColor]: themeVars.color.green[600],
172
- }
173
- }
174
- },
175
- warning: {
176
- vars: {
177
- [vars.backgroundColor]: themeVars.color.amber[400],
178
- [vars.borderColor]: themeVars.color.amber[400],
179
- [vars.boxShadowColor]: themeVars.color.amber[400],
180
- [vars.color]: themeVars.color.gray[800],
181
- },
182
- ':hover': {
183
- vars: {
184
- [vars.backgroundColor]: themeVars.color.amber[500],
185
- [vars.borderColor]: themeVars.color.amber[500],
186
- [vars.color]: themeVars.color.gray[900],
187
- },
188
- },
189
- ':focus': {
190
- vars: {
191
- [vars.borderColor]: themeVars.color.amber[500],
192
- [vars.backgroundColor]: themeVars.color.amber[500],
193
- }
194
- }
195
- },
196
- error: {
197
- vars: {
198
- [vars.backgroundColor]: themeVars.color.red[500],
199
- [vars.borderColor]: themeVars.color.red[500],
200
- [vars.boxShadowColor]: themeVars.color.red[500],
201
- [vars.color]: '#FFFFFF',
202
- },
203
- ':hover': {
204
- vars: {
205
- [vars.backgroundColor]: themeVars.color.red[600],
206
- [vars.borderColor]: themeVars.color.red[600],
207
- },
208
- },
209
- ':focus': {
210
- vars: {
211
- [vars.borderColor]: themeVars.color.red[600],
212
- [vars.backgroundColor]: themeVars.color.red[600],
213
- }
214
- }
215
- },
216
- });
217
-
218
- export const secondary = styleVariants({
219
- primary: {
220
- vars: {
221
- [vars.backgroundColor]: themeVars.color.blue[100],
222
- [vars.borderColor]: themeVars.color.blue[100],
223
- [vars.color]: themeVars.color.blue[500],
224
- },
225
- ':hover': {
226
- vars: {
227
- [vars.backgroundColor]: themeVars.color.blue[200],
228
- [vars.borderColor]: themeVars.color.blue[200],
229
- [vars.color]: themeVars.color.blue[600],
230
- },
231
- },
232
- ':focus': {
233
- vars: {
234
- [vars.backgroundColor]: themeVars.color.blue[200],
235
- [vars.borderColor]: themeVars.color.blue[200],
236
- [vars.color]: themeVars.color.blue[600],
237
- },
238
- }
239
- },
240
- dark: {
241
- vars: {
242
- [vars.backgroundColor]: themeVars.color.saxe[100],
243
- [vars.borderColor]: themeVars.color.saxe[100],
244
- [vars.color]: themeVars.color.saxe[700],
245
- },
246
- ':hover': {
247
- vars: {
248
- [vars.backgroundColor]: themeVars.color.saxe[200],
249
- [vars.borderColor]: themeVars.color.saxe[200],
250
- [vars.color]: themeVars.color.saxe[800],
251
- },
252
- },
253
- ':focus': {
254
- vars: {
255
- [vars.backgroundColor]: themeVars.color.saxe[200],
256
- [vars.borderColor]: themeVars.color.saxe[200],
257
- [vars.color]: themeVars.color.saxe[800],
258
- },
259
- }
260
- },
261
- default: {
262
- vars: {
263
- [vars.backgroundColor]: themeVars.color.gray[100],
264
- [vars.borderColor]: themeVars.color.gray[100],
265
- [vars.color]: themeVars.color.gray[500],
266
- },
267
- ':hover': {
268
- vars: {
269
- [vars.backgroundColor]: themeVars.color.gray[200],
270
- [vars.borderColor]: themeVars.color.gray[200],
271
- [vars.color]: themeVars.color.gray[600],
272
- },
273
- },
274
- ':focus': {
275
- vars: {
276
- [vars.backgroundColor]: themeVars.color.gray[200],
277
- [vars.borderColor]: themeVars.color.gray[200],
278
- [vars.color]: themeVars.color.gray[600],
279
- },
280
- }
281
- },
282
- tertiary: {
283
- vars: {
284
- [vars.backgroundColor]: themeVars.color.gray[100],
285
- [vars.borderColor]: themeVars.color.gray[100],
286
- [vars.color]: themeVars.color.gray[400],
287
- },
288
- ':hover': {
289
- vars: {
290
- [vars.backgroundColor]: themeVars.color.gray[200],
291
- [vars.borderColor]: themeVars.color.gray[200],
292
- [vars.color]: themeVars.color.gray[500],
293
- },
294
- },
295
- ':focus': {
296
- vars: {
297
- [vars.backgroundColor]: themeVars.color.gray[200],
298
- [vars.borderColor]: themeVars.color.gray[200],
299
- [vars.color]: themeVars.color.gray[500],
300
- },
301
- }
302
- },
303
- success: {
304
- vars: {
305
- [vars.backgroundColor]: themeVars.color.green[100],
306
- [vars.borderColor]: themeVars.color.green[100],
307
- [vars.color]: themeVars.color.green[600],
308
- },
309
- ':hover': {
310
- vars: {
311
- [vars.backgroundColor]: themeVars.color.green[200],
312
- [vars.borderColor]: themeVars.color.green[200],
313
- [vars.color]: themeVars.color.green[700],
314
- },
315
- },
316
- ':focus': {
317
- vars: {
318
- [vars.backgroundColor]: themeVars.color.green[200],
319
- [vars.borderColor]: themeVars.color.green[200],
320
- [vars.color]: themeVars.color.green[700],
321
- },
322
- }
323
- },
324
- warning: {
325
- vars: {
326
- [vars.backgroundColor]: themeVars.color.amber[100],
327
- [vars.borderColor]: themeVars.color.amber[100],
328
- [vars.color]: themeVars.color.amber[600],
329
- },
330
- ':hover': {
331
- vars: {
332
- [vars.backgroundColor]: themeVars.color.amber[200],
333
- [vars.borderColor]: themeVars.color.amber[200],
334
- [vars.color]: themeVars.color.amber[700],
335
- },
336
- },
337
- ':focus': {
338
- vars: {
339
- [vars.backgroundColor]: themeVars.color.amber[200],
340
- [vars.borderColor]: themeVars.color.amber[200],
341
- [vars.color]: themeVars.color.amber[700],
342
- },
343
- }
344
- },
345
- error: {
346
- vars: {
347
- [vars.backgroundColor]: themeVars.color.red[100],
348
- [vars.borderColor]: themeVars.color.red[100],
349
- [vars.color]: themeVars.color.red[500],
350
- },
351
- ':hover': {
352
- vars: {
353
- [vars.backgroundColor]: themeVars.color.red[200],
354
- [vars.borderColor]: themeVars.color.red[200],
355
- [vars.color]: themeVars.color.red[600],
356
- },
357
- },
358
- ':focus': {
359
- vars: {
360
- [vars.backgroundColor]: themeVars.color.red[200],
361
- [vars.borderColor]: themeVars.color.red[200],
362
- [vars.color]: themeVars.color.red[600],
363
- },
364
- }
365
- },
366
- });
367
-
368
- export const link = styleVariants({
369
- primary: {
370
- vars: {
371
- [vars.backgroundColor]: 'transparent',
372
- [vars.borderColor]: 'transparent',
373
- [vars.color]: themeVars.color.blue[500],
374
- },
375
- ':hover': {
376
- vars: {
377
- [vars.backgroundColor]: 'transparent',
378
- [vars.borderColor]: 'transparent',
379
- [vars.color]: themeVars.color.blue[600],
380
- },
381
- textDecoration: 'underline',
382
- }
383
- },
384
- dark: {
385
- vars: {
386
- [vars.backgroundColor]: 'transparent',
387
- [vars.borderColor]: 'transparent',
388
- [vars.color]: themeVars.color.saxe[800],
389
- },
390
- ':hover': {
391
- vars: {
392
- [vars.backgroundColor]: 'transparent',
393
- [vars.borderColor]: 'transparent',
394
- [vars.color]: themeVars.color.saxe[900],
395
- },
396
- textDecoration: 'underline',
397
- }
398
- },
399
- default: {
400
- vars: {
401
- [vars.backgroundColor]: 'transparent',
402
- [vars.borderColor]: 'transparent',
403
- [vars.color]: themeVars.color.gray[500],
404
- },
405
- ':hover': {
406
- vars: {
407
- [vars.backgroundColor]: 'transparent',
408
- [vars.borderColor]: 'transparent',
409
- [vars.color]: themeVars.color.gray[600],
410
- },
411
- textDecoration: 'underline',
412
- }
413
- },
414
- tertiary: {
415
- vars: {
416
- [vars.backgroundColor]: 'transparent',
417
- [vars.borderColor]: 'transparent',
418
- [vars.color]: themeVars.color.gray[400],
419
- },
420
- ':hover': {
421
- vars: {
422
- [vars.backgroundColor]: 'transparent',
423
- [vars.borderColor]: 'transparent',
424
- [vars.color]: themeVars.color.gray[500],
425
- },
426
- textDecoration: 'underline',
427
- }
428
- },
429
- success: {
430
- vars: {
431
- [vars.backgroundColor]: 'transparent',
432
- [vars.borderColor]: 'transparent',
433
- [vars.color]: themeVars.color.green[500],
434
- },
435
- ':hover': {
436
- vars: {
437
- [vars.backgroundColor]: 'transparent',
438
- [vars.borderColor]: 'transparent',
439
- [vars.color]: themeVars.color.green[600],
440
- },
441
- textDecoration: 'underline',
442
- }
443
- },
444
- warning: {
445
- vars: {
446
- [vars.backgroundColor]: 'transparent',
447
- [vars.borderColor]: 'transparent',
448
- [vars.color]: themeVars.color.amber[600],
449
- },
450
- ':hover': {
451
- vars: {
452
- [vars.backgroundColor]: 'transparent',
453
- [vars.borderColor]: 'transparent',
454
- [vars.color]: themeVars.color.amber[700],
455
- },
456
- textDecoration: 'underline',
457
- }
458
- },
459
- error: {
460
- vars: {
461
- [vars.backgroundColor]: 'transparent',
462
- [vars.borderColor]: 'transparent',
463
- [vars.color]: themeVars.color.red[500],
464
- },
465
- ':hover': {
466
- vars: {
467
- [vars.backgroundColor]: 'transparent',
468
- [vars.borderColor]: 'transparent',
469
- [vars.color]: themeVars.color.red[600],
470
- },
471
- textDecoration: 'underline',
472
- }
473
- },
474
- });
475
-
476
- export const size = styleVariants({
477
- xs: {
478
- vars: {
479
- [vars.height]: sizes.xs,
480
- [vars.radius]: borderRadiuses.xs,
481
- [vars.padding]: padding.xs,
482
- },
483
- fontSize: themeVars.fontSize.small,
484
- },
485
- sm: {
486
- vars: {
487
- [vars.height]: sizes.sm,
488
- [vars.radius]: borderRadiuses.sm,
489
- [vars.padding]: padding.sm,
490
- },
491
- fontSize: themeVars.fontSize.small,
492
- },
493
- md: {
494
- vars: {
495
- [vars.height]: sizes.md,
496
- [vars.radius]: borderRadiuses.md,
497
- [vars.padding]: padding.md,
498
- },
499
- },
500
- lg: {
501
- vars: {
502
- [vars.height]: sizes.lg,
503
- [vars.radius]: borderRadiuses.lg,
504
- [vars.padding]: padding.lg,
505
- },
506
- fontSize: themeVars.fontSize.large,
507
- },
508
- xl: {
509
- vars: {
510
- [vars.height]: sizes.xl,
511
- [vars.radius]: borderRadiuses.xl,
512
- [vars.padding]: padding.xl,
513
- },
514
- fontSize: themeVars.fontSize.large,
515
- },
516
- });
517
-
518
- const baseBorder = style({
519
- position: 'absolute',
520
- top: 0,
521
- left: 0,
522
- bottom: 0,
523
- right: 0,
524
- pointerEvents: 'none',
525
- borderRadius: 'inherit',
526
- transition: 'border-color 0.2s ease-in-out',
527
- });
528
-
529
- export const border = style([
530
- baseBorder,
531
- {
532
- border: `1px solid ${vars.borderColor}`,
533
- }
534
- ]);
535
-
536
- export const borderState = style([
537
- baseBorder,
538
- {
539
- border: `1px solid transparent`,
540
- zIndex: 1
541
- }
542
- ]);
543
-
544
- globalStyle(`${base}:hover ${border}, ${base}:focus ${border}`, {
545
- borderColor: "transparent",
546
- });
547
-
548
- globalStyle(`${base}:hover ${borderState}, ${base}:focus ${borderState}`, {
549
- borderColor: vars.borderColor,
550
- });
551
-
552
- export const wave = style({
553
- position: 'absolute',
554
- top: 0,
555
- left: 0,
556
- bottom: 0,
557
- right: 0,
558
- pointerEvents: 'none',
559
- borderRadius: 'inherit',
560
- animationIterationCount: 1,
561
- animationDuration: '0.5s',
562
- zIndex: 1,
563
- animationTimingFunction: 'cubic-bezier(0.4, 0, 0.15, 1), cubic-bezier(0.4, 0, 0.4, 1)',
564
- });
565
-
566
- const buttonWaveGrow = 'button-wave-grow';
567
-
568
- globalKeyframes(buttonWaveGrow, {
569
- 'from': {
570
- boxShadow: `0 0 0.5px 0 ${vars.boxShadowColor}`
571
- },
572
- 'to': {
573
- boxShadow: `0 0 0.5px 4.4px ${vars.boxShadowColor}`
574
- }
575
- });
576
-
577
- const buttonWaveOpacity = 'button-wave-opacity';
578
-
579
- globalKeyframes(buttonWaveOpacity, {
580
- '0%': {
581
- opacity: 0.5
582
- },
583
- '90%': {
584
- opacity: 0
585
- },
586
- '100%': {
587
- opacity: 0
588
- }
589
- });
590
-
591
- export const waveActive = style({
592
- zIndex: 1,
593
- animationName: `${buttonWaveGrow}, ${buttonWaveOpacity}`,
594
- });
595
-
596
- export const iconButton = style({
597
- display: 'flex',
598
- flexGrow: 0,
599
- flexShrink: 0,
600
- fontSize: 0,
601
- lineHeight: 0,
602
- userSelect: 'none',
603
- padding: 'initial',
604
- height: vars.height,
605
- width: vars.height,
606
- });
607
-
608
- export const icon = style({
609
- display: 'flex',
610
- flexGrow: 0,
611
- flexShrink: 0,
612
- fontSize: 0,
613
- lineHeight: 0,
614
- userSelect: 'none'
615
- });
616
-
617
- globalStyle(`${icon} > svg`, {
618
- overflow: 'hidden',
619
- pointerEvents: 'none',
620
- maxWidth: '100%',
621
- maxHeight: '100%',
622
- verticalAlign: 'middle'
623
- });
624
-
625
- export const iconLeft = style([icon, {
626
- marginRight: themeVars.space[2],
627
- position: 'relative'
628
- }]);
629
-
630
- export const iconRight = style({
631
- marginLeft: themeVars.space[2],
632
- });
633
-
634
- export const rounded = style({
635
- borderRadius: '9999px',
636
- });
637
-
638
- export const block = style({
639
- display: 'flex',
640
- width: '100%',
641
- });
642
-
643
- const spinAround = 'spin-around';
644
-
645
- globalKeyframes(spinAround, {
646
- '0%': {
647
- transform: "rotate(0deg)"
648
- },
649
- '100%': {
650
- transform: "rotate(360deg)"
651
- }
652
- });
653
-
654
- export const loading = style({
655
- pointerEvents: 'none',
656
- color: "transparent",
657
- userSelect: 'none',
658
- opacity: 0.75,
659
- selectors: {
660
- [`&:after`]: {
661
- transition: "all 0.2s ease-in-out",
662
- position: "absolute",
663
- animationIterationCount: "infinite",
664
- animationDuration: '0.75s',
665
- animationTimingFunction: 'cubic-bezier(0.8, 0.5, 0.4, 0)',
666
- animationName: spinAround,
667
- borderRadius: themeVars.rounded.full,
668
- borderColor: `transparent transparent ${vars.color} ${vars.color}`,
669
- borderStyle: `solid`,
670
- borderWidth: `2px`,
671
- content: "",
672
- display: `block`,
673
- height: `1em`,
674
- width: `1em`,
675
- }
676
- }
677
- });
1
+ import {createVar, globalKeyframes, globalStyle, style, styleVariants} from "@vanilla-extract/css";
2
+ import {themeVars} from "../../../styles/theme.css";
3
+
4
+ const sizes = {
5
+ xs: '22px',
6
+ sm: '28px',
7
+ md: '36px',
8
+ lg: '40px',
9
+ xl: '45px',
10
+ };
11
+
12
+ const borderRadiuses = {
13
+ xs: '2px',
14
+ sm: '3px',
15
+ md: '4px',
16
+ lg: '6px',
17
+ xl: '8px',
18
+ };
19
+
20
+ const padding = {
21
+ xs: `0 ${themeVars.space[1]}`,
22
+ sm: `0 ${themeVars.space[2]}`,
23
+ md: `0 ${themeVars.space[3]}`,
24
+ lg: `0 ${themeVars.space[3]}`,
25
+ xl: `0 ${themeVars.space[4]}`,
26
+ }
27
+
28
+ export const vars = {
29
+ height: createVar(),
30
+ radius: createVar(),
31
+ padding: createVar(),
32
+ backgroundColor: createVar(),
33
+ borderColor: createVar(),
34
+ boxShadowColor: createVar(),
35
+ color: createVar(),
36
+ }
37
+
38
+ export const base = style({
39
+ alignItems: 'center',
40
+ boxSizing: 'border-box',
41
+ display: 'inline-flex',
42
+ fontSize: themeVars.fontSize.base,
43
+ fontWeight: "500",
44
+ maxWidth: '100%',
45
+ width: 'auto',
46
+ position: 'relative',
47
+ textAlign: 'center',
48
+ textDecoration: 'none',
49
+ verticalAlign: 'middle',
50
+ whiteSpace: 'nowrap',
51
+ justifyContent: 'center',
52
+ height: vars.height,
53
+ lineHeight: vars.height,
54
+ borderRadius: vars.radius,
55
+ padding: vars.padding,
56
+ zIndex: "auto",
57
+ backgroundColor: vars.backgroundColor,
58
+ border: 0,
59
+ color: vars.color,
60
+ transition: `color .2s ${themeVars.transition.default},
61
+ background-color .25s ${themeVars.transition.default},
62
+ box-shadow .25s ${themeVars.transition.default},
63
+ border-color .25s ${themeVars.transition.default}`,
64
+ fontFamily: 'inherit',
65
+ ':hover': {
66
+ cursor: 'pointer',
67
+ },
68
+ ':focus': {
69
+ outline: 'none',
70
+ }
71
+ });
72
+
73
+ export const variant = styleVariants({
74
+ primary: {
75
+ vars: {
76
+ [vars.backgroundColor]: themeVars.color.blue[500],
77
+ [vars.borderColor]: themeVars.color.blue[500],
78
+ [vars.boxShadowColor]: themeVars.color.blue[500],
79
+ [vars.color]: '#FFFFFF',
80
+ },
81
+ ':hover': {
82
+ vars: {
83
+ [vars.backgroundColor]: themeVars.color.blue[600],
84
+ [vars.borderColor]: themeVars.color.blue[600],
85
+ },
86
+ },
87
+ ':focus': {
88
+ vars: {
89
+ [vars.borderColor]: themeVars.color.blue[500],
90
+ }
91
+ }
92
+ },
93
+ dark: {
94
+ vars: {
95
+ [vars.backgroundColor]: themeVars.color.saxe[700],
96
+ [vars.borderColor]: themeVars.color.saxe[700],
97
+ [vars.boxShadowColor]: themeVars.color.saxe[700],
98
+ [vars.color]: '#FFFFFF',
99
+ },
100
+ ':hover': {
101
+ vars: {
102
+ [vars.backgroundColor]: themeVars.color.saxe[800],
103
+ [vars.borderColor]: themeVars.color.saxe[800],
104
+ },
105
+ },
106
+ ':focus': {
107
+ vars: {
108
+ [vars.borderColor]: themeVars.color.saxe[900],
109
+ }
110
+ }
111
+ },
112
+ default: {
113
+ vars: {
114
+ [vars.color]: themeVars.color.font.text,
115
+ [vars.backgroundColor]: 'white',
116
+ [vars.boxShadowColor]: themeVars.color.blue[500],
117
+ [vars.borderColor]: themeVars.color.gray[300],
118
+ },
119
+ ':hover': {
120
+ vars: {
121
+ [vars.color]: themeVars.color.blue[500],
122
+ [vars.borderColor]: themeVars.color.blue[500]
123
+ },
124
+ },
125
+ ':focus': {
126
+ vars: {
127
+ [vars.color]: themeVars.color.blue[500],
128
+ [vars.borderColor]: themeVars.color.blue[500],
129
+ }
130
+ }
131
+ },
132
+ tertiary: {
133
+ vars: {
134
+ [vars.color]: themeVars.color.font.default,
135
+ [vars.backgroundColor]: themeVars.color.gray[100],
136
+ [vars.boxShadowColor]: themeVars.color.blue[100],
137
+ [vars.borderColor]: themeVars.color.gray[300],
138
+ },
139
+ ':hover': {
140
+ vars: {
141
+ [vars.color]: themeVars.color.font.default,
142
+ [vars.backgroundColor]: themeVars.color.gray[250],
143
+ [vars.borderColor]: themeVars.color.gray[300]
144
+ },
145
+ },
146
+ ':focus': {
147
+ vars: {
148
+ [vars.color]: themeVars.color.font.text,
149
+ [vars.backgroundColor]: themeVars.color.gray[200],
150
+ [vars.borderColor]: themeVars.color.gray[300]
151
+ }
152
+ }
153
+ },
154
+ success: {
155
+ vars: {
156
+ [vars.backgroundColor]: themeVars.color.green[500],
157
+ [vars.borderColor]: themeVars.color.green[500],
158
+ [vars.boxShadowColor]: themeVars.color.green[500],
159
+ [vars.color]: '#FFFFFF',
160
+ },
161
+ ':hover': {
162
+ vars: {
163
+ [vars.backgroundColor]: themeVars.color.green[600],
164
+ [vars.borderColor]: themeVars.color.green[600],
165
+ [vars.color]: '#FFFFFF',
166
+ },
167
+ },
168
+ ':focus': {
169
+ vars: {
170
+ [vars.borderColor]: themeVars.color.green[600],
171
+ [vars.backgroundColor]: themeVars.color.green[600],
172
+ }
173
+ }
174
+ },
175
+ warning: {
176
+ vars: {
177
+ [vars.backgroundColor]: themeVars.color.amber[400],
178
+ [vars.borderColor]: themeVars.color.amber[400],
179
+ [vars.boxShadowColor]: themeVars.color.amber[400],
180
+ [vars.color]: themeVars.color.gray[800],
181
+ },
182
+ ':hover': {
183
+ vars: {
184
+ [vars.backgroundColor]: themeVars.color.amber[500],
185
+ [vars.borderColor]: themeVars.color.amber[500],
186
+ [vars.color]: themeVars.color.gray[900],
187
+ },
188
+ },
189
+ ':focus': {
190
+ vars: {
191
+ [vars.borderColor]: themeVars.color.amber[500],
192
+ [vars.backgroundColor]: themeVars.color.amber[500],
193
+ }
194
+ }
195
+ },
196
+ error: {
197
+ vars: {
198
+ [vars.backgroundColor]: themeVars.color.red[500],
199
+ [vars.borderColor]: themeVars.color.red[500],
200
+ [vars.boxShadowColor]: themeVars.color.red[500],
201
+ [vars.color]: '#FFFFFF',
202
+ },
203
+ ':hover': {
204
+ vars: {
205
+ [vars.backgroundColor]: themeVars.color.red[600],
206
+ [vars.borderColor]: themeVars.color.red[600],
207
+ },
208
+ },
209
+ ':focus': {
210
+ vars: {
211
+ [vars.borderColor]: themeVars.color.red[600],
212
+ [vars.backgroundColor]: themeVars.color.red[600],
213
+ }
214
+ }
215
+ },
216
+ });
217
+
218
+ export const secondary = styleVariants({
219
+ primary: {
220
+ vars: {
221
+ [vars.backgroundColor]: themeVars.color.blue[100],
222
+ [vars.borderColor]: themeVars.color.blue[100],
223
+ [vars.color]: themeVars.color.blue[500],
224
+ },
225
+ ':hover': {
226
+ vars: {
227
+ [vars.backgroundColor]: themeVars.color.blue[200],
228
+ [vars.borderColor]: themeVars.color.blue[200],
229
+ [vars.color]: themeVars.color.blue[600],
230
+ },
231
+ },
232
+ ':focus': {
233
+ vars: {
234
+ [vars.backgroundColor]: themeVars.color.blue[200],
235
+ [vars.borderColor]: themeVars.color.blue[200],
236
+ [vars.color]: themeVars.color.blue[600],
237
+ },
238
+ }
239
+ },
240
+ dark: {
241
+ vars: {
242
+ [vars.backgroundColor]: themeVars.color.saxe[100],
243
+ [vars.borderColor]: themeVars.color.saxe[100],
244
+ [vars.color]: themeVars.color.saxe[700],
245
+ },
246
+ ':hover': {
247
+ vars: {
248
+ [vars.backgroundColor]: themeVars.color.saxe[200],
249
+ [vars.borderColor]: themeVars.color.saxe[200],
250
+ [vars.color]: themeVars.color.saxe[800],
251
+ },
252
+ },
253
+ ':focus': {
254
+ vars: {
255
+ [vars.backgroundColor]: themeVars.color.saxe[200],
256
+ [vars.borderColor]: themeVars.color.saxe[200],
257
+ [vars.color]: themeVars.color.saxe[800],
258
+ },
259
+ }
260
+ },
261
+ default: {
262
+ vars: {
263
+ [vars.backgroundColor]: themeVars.color.gray[100],
264
+ [vars.borderColor]: themeVars.color.gray[100],
265
+ [vars.color]: themeVars.color.gray[500],
266
+ },
267
+ ':hover': {
268
+ vars: {
269
+ [vars.backgroundColor]: themeVars.color.gray[200],
270
+ [vars.borderColor]: themeVars.color.gray[200],
271
+ [vars.color]: themeVars.color.gray[600],
272
+ },
273
+ },
274
+ ':focus': {
275
+ vars: {
276
+ [vars.backgroundColor]: themeVars.color.gray[200],
277
+ [vars.borderColor]: themeVars.color.gray[200],
278
+ [vars.color]: themeVars.color.gray[600],
279
+ },
280
+ }
281
+ },
282
+ tertiary: {
283
+ vars: {
284
+ [vars.backgroundColor]: themeVars.color.gray[100],
285
+ [vars.borderColor]: themeVars.color.gray[100],
286
+ [vars.color]: themeVars.color.gray[400],
287
+ },
288
+ ':hover': {
289
+ vars: {
290
+ [vars.backgroundColor]: themeVars.color.gray[200],
291
+ [vars.borderColor]: themeVars.color.gray[200],
292
+ [vars.color]: themeVars.color.gray[500],
293
+ },
294
+ },
295
+ ':focus': {
296
+ vars: {
297
+ [vars.backgroundColor]: themeVars.color.gray[200],
298
+ [vars.borderColor]: themeVars.color.gray[200],
299
+ [vars.color]: themeVars.color.gray[500],
300
+ },
301
+ }
302
+ },
303
+ success: {
304
+ vars: {
305
+ [vars.backgroundColor]: themeVars.color.green[100],
306
+ [vars.borderColor]: themeVars.color.green[100],
307
+ [vars.color]: themeVars.color.green[600],
308
+ },
309
+ ':hover': {
310
+ vars: {
311
+ [vars.backgroundColor]: themeVars.color.green[200],
312
+ [vars.borderColor]: themeVars.color.green[200],
313
+ [vars.color]: themeVars.color.green[700],
314
+ },
315
+ },
316
+ ':focus': {
317
+ vars: {
318
+ [vars.backgroundColor]: themeVars.color.green[200],
319
+ [vars.borderColor]: themeVars.color.green[200],
320
+ [vars.color]: themeVars.color.green[700],
321
+ },
322
+ }
323
+ },
324
+ warning: {
325
+ vars: {
326
+ [vars.backgroundColor]: themeVars.color.amber[100],
327
+ [vars.borderColor]: themeVars.color.amber[100],
328
+ [vars.color]: themeVars.color.amber[600],
329
+ },
330
+ ':hover': {
331
+ vars: {
332
+ [vars.backgroundColor]: themeVars.color.amber[200],
333
+ [vars.borderColor]: themeVars.color.amber[200],
334
+ [vars.color]: themeVars.color.amber[700],
335
+ },
336
+ },
337
+ ':focus': {
338
+ vars: {
339
+ [vars.backgroundColor]: themeVars.color.amber[200],
340
+ [vars.borderColor]: themeVars.color.amber[200],
341
+ [vars.color]: themeVars.color.amber[700],
342
+ },
343
+ }
344
+ },
345
+ error: {
346
+ vars: {
347
+ [vars.backgroundColor]: themeVars.color.red[100],
348
+ [vars.borderColor]: themeVars.color.red[100],
349
+ [vars.color]: themeVars.color.red[500],
350
+ },
351
+ ':hover': {
352
+ vars: {
353
+ [vars.backgroundColor]: themeVars.color.red[200],
354
+ [vars.borderColor]: themeVars.color.red[200],
355
+ [vars.color]: themeVars.color.red[600],
356
+ },
357
+ },
358
+ ':focus': {
359
+ vars: {
360
+ [vars.backgroundColor]: themeVars.color.red[200],
361
+ [vars.borderColor]: themeVars.color.red[200],
362
+ [vars.color]: themeVars.color.red[600],
363
+ },
364
+ }
365
+ },
366
+ });
367
+
368
+ export const link = styleVariants({
369
+ primary: {
370
+ vars: {
371
+ [vars.backgroundColor]: 'transparent',
372
+ [vars.borderColor]: 'transparent',
373
+ [vars.color]: themeVars.color.blue[500],
374
+ },
375
+ ':hover': {
376
+ vars: {
377
+ [vars.backgroundColor]: 'transparent',
378
+ [vars.borderColor]: 'transparent',
379
+ [vars.color]: themeVars.color.blue[600],
380
+ },
381
+ textDecoration: 'underline',
382
+ }
383
+ },
384
+ dark: {
385
+ vars: {
386
+ [vars.backgroundColor]: 'transparent',
387
+ [vars.borderColor]: 'transparent',
388
+ [vars.color]: themeVars.color.saxe[800],
389
+ },
390
+ ':hover': {
391
+ vars: {
392
+ [vars.backgroundColor]: 'transparent',
393
+ [vars.borderColor]: 'transparent',
394
+ [vars.color]: themeVars.color.saxe[900],
395
+ },
396
+ textDecoration: 'underline',
397
+ }
398
+ },
399
+ default: {
400
+ vars: {
401
+ [vars.backgroundColor]: 'transparent',
402
+ [vars.borderColor]: 'transparent',
403
+ [vars.color]: themeVars.color.gray[500],
404
+ },
405
+ ':hover': {
406
+ vars: {
407
+ [vars.backgroundColor]: 'transparent',
408
+ [vars.borderColor]: 'transparent',
409
+ [vars.color]: themeVars.color.gray[600],
410
+ },
411
+ textDecoration: 'underline',
412
+ }
413
+ },
414
+ tertiary: {
415
+ vars: {
416
+ [vars.backgroundColor]: 'transparent',
417
+ [vars.borderColor]: 'transparent',
418
+ [vars.color]: themeVars.color.gray[400],
419
+ },
420
+ ':hover': {
421
+ vars: {
422
+ [vars.backgroundColor]: 'transparent',
423
+ [vars.borderColor]: 'transparent',
424
+ [vars.color]: themeVars.color.gray[500],
425
+ },
426
+ textDecoration: 'underline',
427
+ }
428
+ },
429
+ success: {
430
+ vars: {
431
+ [vars.backgroundColor]: 'transparent',
432
+ [vars.borderColor]: 'transparent',
433
+ [vars.color]: themeVars.color.green[500],
434
+ },
435
+ ':hover': {
436
+ vars: {
437
+ [vars.backgroundColor]: 'transparent',
438
+ [vars.borderColor]: 'transparent',
439
+ [vars.color]: themeVars.color.green[600],
440
+ },
441
+ textDecoration: 'underline',
442
+ }
443
+ },
444
+ warning: {
445
+ vars: {
446
+ [vars.backgroundColor]: 'transparent',
447
+ [vars.borderColor]: 'transparent',
448
+ [vars.color]: themeVars.color.amber[600],
449
+ },
450
+ ':hover': {
451
+ vars: {
452
+ [vars.backgroundColor]: 'transparent',
453
+ [vars.borderColor]: 'transparent',
454
+ [vars.color]: themeVars.color.amber[700],
455
+ },
456
+ textDecoration: 'underline',
457
+ }
458
+ },
459
+ error: {
460
+ vars: {
461
+ [vars.backgroundColor]: 'transparent',
462
+ [vars.borderColor]: 'transparent',
463
+ [vars.color]: themeVars.color.red[500],
464
+ },
465
+ ':hover': {
466
+ vars: {
467
+ [vars.backgroundColor]: 'transparent',
468
+ [vars.borderColor]: 'transparent',
469
+ [vars.color]: themeVars.color.red[600],
470
+ },
471
+ textDecoration: 'underline',
472
+ }
473
+ },
474
+ });
475
+
476
+ export const size = styleVariants({
477
+ xs: {
478
+ vars: {
479
+ [vars.height]: sizes.xs,
480
+ [vars.radius]: borderRadiuses.xs,
481
+ [vars.padding]: padding.xs,
482
+ },
483
+ fontSize: themeVars.fontSize.small,
484
+ },
485
+ sm: {
486
+ vars: {
487
+ [vars.height]: sizes.sm,
488
+ [vars.radius]: borderRadiuses.sm,
489
+ [vars.padding]: padding.sm,
490
+ },
491
+ fontSize: themeVars.fontSize.small,
492
+ },
493
+ md: {
494
+ vars: {
495
+ [vars.height]: sizes.md,
496
+ [vars.radius]: borderRadiuses.md,
497
+ [vars.padding]: padding.md,
498
+ },
499
+ },
500
+ lg: {
501
+ vars: {
502
+ [vars.height]: sizes.lg,
503
+ [vars.radius]: borderRadiuses.lg,
504
+ [vars.padding]: padding.lg,
505
+ },
506
+ fontSize: themeVars.fontSize.large,
507
+ },
508
+ xl: {
509
+ vars: {
510
+ [vars.height]: sizes.xl,
511
+ [vars.radius]: borderRadiuses.xl,
512
+ [vars.padding]: padding.xl,
513
+ },
514
+ fontSize: themeVars.fontSize.large,
515
+ },
516
+ });
517
+
518
+ const baseBorder = style({
519
+ position: 'absolute',
520
+ top: 0,
521
+ left: 0,
522
+ bottom: 0,
523
+ right: 0,
524
+ pointerEvents: 'none',
525
+ borderRadius: 'inherit',
526
+ transition: 'border-color 0.2s ease-in-out',
527
+ });
528
+
529
+ export const border = style([
530
+ baseBorder,
531
+ {
532
+ border: `1px solid ${vars.borderColor}`,
533
+ }
534
+ ]);
535
+
536
+ export const borderState = style([
537
+ baseBorder,
538
+ {
539
+ border: `1px solid transparent`,
540
+ zIndex: 1
541
+ }
542
+ ]);
543
+
544
+ globalStyle(`${base}:hover ${border}, ${base}:focus ${border}`, {
545
+ borderColor: "transparent",
546
+ });
547
+
548
+ globalStyle(`${base}:hover ${borderState}, ${base}:focus ${borderState}`, {
549
+ borderColor: vars.borderColor,
550
+ });
551
+
552
+ export const wave = style({
553
+ position: 'absolute',
554
+ top: 0,
555
+ left: 0,
556
+ bottom: 0,
557
+ right: 0,
558
+ pointerEvents: 'none',
559
+ borderRadius: 'inherit',
560
+ animationIterationCount: 1,
561
+ animationDuration: '0.5s',
562
+ zIndex: 1,
563
+ animationTimingFunction: 'cubic-bezier(0.4, 0, 0.15, 1), cubic-bezier(0.4, 0, 0.4, 1)',
564
+ });
565
+
566
+ const buttonWaveGrow = 'button-wave-grow';
567
+
568
+ globalKeyframes(buttonWaveGrow, {
569
+ 'from': {
570
+ boxShadow: `0 0 0.5px 0 ${vars.boxShadowColor}`
571
+ },
572
+ 'to': {
573
+ boxShadow: `0 0 0.5px 4.4px ${vars.boxShadowColor}`
574
+ }
575
+ });
576
+
577
+ const buttonWaveOpacity = 'button-wave-opacity';
578
+
579
+ globalKeyframes(buttonWaveOpacity, {
580
+ '0%': {
581
+ opacity: 0.5
582
+ },
583
+ '90%': {
584
+ opacity: 0
585
+ },
586
+ '100%': {
587
+ opacity: 0
588
+ }
589
+ });
590
+
591
+ export const waveActive = style({
592
+ zIndex: 1,
593
+ animationName: `${buttonWaveGrow}, ${buttonWaveOpacity}`,
594
+ });
595
+
596
+ export const iconButton = style({
597
+ display: 'flex',
598
+ flexGrow: 0,
599
+ flexShrink: 0,
600
+ fontSize: 0,
601
+ lineHeight: 0,
602
+ userSelect: 'none',
603
+ padding: 'initial',
604
+ height: vars.height,
605
+ width: vars.height,
606
+ });
607
+
608
+ export const icon = style({
609
+ display: 'flex',
610
+ flexGrow: 0,
611
+ flexShrink: 0,
612
+ fontSize: 0,
613
+ lineHeight: 0,
614
+ userSelect: 'none'
615
+ });
616
+
617
+ globalStyle(`${icon} > svg`, {
618
+ overflow: 'hidden',
619
+ pointerEvents: 'none',
620
+ maxWidth: '100%',
621
+ maxHeight: '100%',
622
+ verticalAlign: 'middle'
623
+ });
624
+
625
+ export const iconLeft = style([icon, {
626
+ marginRight: themeVars.space[2],
627
+ position: 'relative'
628
+ }]);
629
+
630
+ export const iconRight = style({
631
+ marginLeft: themeVars.space[2],
632
+ });
633
+
634
+ export const rounded = style({
635
+ borderRadius: '9999px',
636
+ });
637
+
638
+ export const block = style({
639
+ display: 'flex',
640
+ width: '100%',
641
+ });
642
+
643
+ const spinAround = 'spin-around';
644
+
645
+ globalKeyframes(spinAround, {
646
+ '0%': {
647
+ transform: "rotate(0deg)"
648
+ },
649
+ '100%': {
650
+ transform: "rotate(360deg)"
651
+ }
652
+ });
653
+
654
+ export const loading = style({
655
+ pointerEvents: 'none',
656
+ color: "transparent",
657
+ userSelect: 'none',
658
+ opacity: 0.75,
659
+ selectors: {
660
+ [`&:after`]: {
661
+ transition: "all 0.2s ease-in-out",
662
+ position: "absolute",
663
+ animationIterationCount: "infinite",
664
+ animationDuration: '0.75s',
665
+ animationTimingFunction: 'cubic-bezier(0.8, 0.5, 0.4, 0)',
666
+ animationName: spinAround,
667
+ borderRadius: themeVars.rounded.full,
668
+ borderColor: `transparent transparent ${vars.color} ${vars.color}`,
669
+ borderStyle: `solid`,
670
+ borderWidth: `2px`,
671
+ content: "",
672
+ display: `block`,
673
+ height: `1em`,
674
+ width: `1em`,
675
+ }
676
+ }
677
+ });