@esportsplus/ui 0.51.7 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/README.md +53 -9
  2. package/build/components/accordion/index.d.ts +6 -18
  3. package/build/components/accordion/index.js +10 -36
  4. package/build/components/accordion/scss/index.scss +1 -1
  5. package/build/components/anchor/scss/index.scss +1 -1
  6. package/build/components/button/scss/index.scss +1 -1
  7. package/build/components/card/scss/index.scss +1 -1
  8. package/build/components/checkbox/index.d.ts +12 -12
  9. package/build/components/checkbox/index.js +63 -31
  10. package/build/components/checkbox/scss/index.scss +1 -1
  11. package/build/components/checkbox/svg/check.svg +1 -0
  12. package/build/components/clipboard/copy.d.ts +11 -0
  13. package/build/components/clipboard/copy.js +49 -0
  14. package/build/components/clipboard/index.d.ts +1437 -1228
  15. package/build/components/clipboard/index.js +3 -1
  16. package/build/components/clipboard/onclick.d.ts +4 -38
  17. package/build/components/clipboard/onclick.js +10 -10
  18. package/build/components/counter/index.js +58 -66
  19. package/build/components/counter/scss/index.scss +1 -1
  20. package/build/components/form/action.js +8 -8
  21. package/build/components/form/index.d.ts +4 -4
  22. package/build/components/form/input.d.ts +4 -4
  23. package/build/components/form/input.js +3 -3
  24. package/build/components/grid/scss/index.scss +1 -1
  25. package/build/components/icon/index.d.ts +2 -19
  26. package/build/components/icon/index.js +8 -8
  27. package/build/components/icon/scss/index.scss +1 -1
  28. package/build/components/index.d.ts +1 -11
  29. package/build/components/index.js +1 -11
  30. package/build/components/input/index.d.ts +1 -1
  31. package/build/components/input/index.js +11 -11
  32. package/build/components/input/scss/index.scss +1 -1
  33. package/build/components/link/scss/index.scss +1 -1
  34. package/build/components/loading/index.js +5 -5
  35. package/build/components/modal/scss/index.scss +1 -1
  36. package/build/components/normalize/scss/index.scss +1 -1
  37. package/build/components/overlay/index.d.ts +2 -18
  38. package/build/components/overlay/index.js +11 -5
  39. package/build/components/overlay/scss/index.scss +1 -1
  40. package/build/components/page/scss/index.scss +1 -1
  41. package/build/components/radio/index.d.ts +1436 -4
  42. package/build/components/radio/index.js +0 -1
  43. package/build/components/range/index.d.ts +1 -1
  44. package/build/components/range/index.js +13 -13
  45. package/build/components/range/scss/index.scss +1 -1
  46. package/build/components/root/scss/index.scss +1 -1
  47. package/build/components/select/index.d.ts +7 -53
  48. package/build/components/select/index.js +82 -100
  49. package/build/components/select/scss/index.scss +1 -1
  50. package/build/components/sidebar/index.d.ts +2 -18
  51. package/build/components/sidebar/index.js +11 -5
  52. package/build/components/sidebar/scss/index.scss +1 -1
  53. package/build/components/switch/index.d.ts +1436 -4
  54. package/build/components/switch/index.js +0 -1
  55. package/build/components/tabs/scss/index.scss +2 -0
  56. package/build/components/text/scss/index.scss +1 -1
  57. package/build/components/textarea/index.d.ts +719 -6
  58. package/build/components/textarea/index.js +37 -15
  59. package/build/components/textarea/scss/index.scss +1 -1
  60. package/build/components/toast/index.d.ts +9 -0
  61. package/build/components/toast/index.js +157 -0
  62. package/build/components/toast/manager.d.ts +60 -0
  63. package/build/components/toast/manager.js +203 -0
  64. package/build/components/toast/scss/index.scss +2 -0
  65. package/build/components/toast/svg/check.svg +1 -0
  66. package/build/components/toast/svg/chevron.svg +1 -0
  67. package/build/components/toast/svg/close.svg +1 -0
  68. package/build/components/toast/svg/copy.svg +1 -0
  69. package/build/components/toast/svg/error.svg +1 -0
  70. package/build/components/toast/svg/info.svg +1 -0
  71. package/build/components/toast/svg/loading.svg +1 -0
  72. package/build/components/toast/svg/success.svg +1 -0
  73. package/build/components/toast/svg/warning.svg +1 -0
  74. package/build/components/tooltip/index.d.ts +2151 -2544
  75. package/build/components/tooltip/menu.d.ts +2 -18
  76. package/build/components/tooltip/menu.js +38 -24
  77. package/build/components/tooltip/onclick.d.ts +717 -1229
  78. package/build/components/tooltip/onclick.js +18 -54
  79. package/build/components/tooltip/onhover.d.ts +713 -20
  80. package/build/components/tooltip/onhover.js +11 -11
  81. package/build/components/tooltip/scss/index.scss +1 -1
  82. package/build/components/typewriter/index.d.ts +2 -19
  83. package/build/components/typewriter/index.js +10 -10
  84. package/build/css-utilities/background/scss/index.scss +1 -1
  85. package/build/css-utilities/border/scss/index.scss +1 -1
  86. package/build/css-utilities/color/scss/index.scss +1 -1
  87. package/build/css-utilities/font/geist/scss/Geist-Italic-Variable.woff2 +0 -0
  88. package/build/css-utilities/font/geist/scss/Geist-Variable.woff2 +0 -0
  89. package/build/css-utilities/font/geist/scss/GeistMono-Italic-Variable.woff2 +0 -0
  90. package/build/css-utilities/font/geist/scss/GeistMono-Variable.woff2 +0 -0
  91. package/build/css-utilities/font/geist/scss/index.scss +2 -0
  92. package/build/css-utilities/font/montserrat/index.d.ts +1 -0
  93. package/build/css-utilities/font/montserrat/index.js +1 -0
  94. package/build/css-utilities/font/montserrat/scss/index.scss +2 -0
  95. package/build/css-utilities/index.scss +1 -1
  96. package/build/css-utilities/inline/scss/index.scss +1 -1
  97. package/build/css-utilities/scrollbar/scss/index.scss +2 -0
  98. package/build/css-utilities/tabular/scss/index.scss +2 -0
  99. package/build/css-utilities/text/scss/index.scss +1 -1
  100. package/build/themes/dark/index.d.ts +0 -2
  101. package/build/themes/dark/index.js +0 -2
  102. package/build/themes/dark/input.d.ts +708 -114
  103. package/build/themes/dark/select.d.ts +732 -1456
  104. package/build/themes/dark/select.js +7 -5
  105. package/build/themes/dark/textarea.d.ts +716 -119
  106. package/package.json +20 -20
  107. package/pnpm-workspace.yaml +12 -8
  108. package/scripts/css-variables.test.mjs +50 -0
  109. package/scripts/sort-scss.md +57 -0
  110. package/scripts/sort-scss.mjs +233 -0
  111. package/scripts/sort-scss.test.mjs +217 -0
  112. package/src/components/accordion/index.ts +7 -30
  113. package/src/components/accordion/scss/index.scss +9 -12
  114. package/src/components/anchor/scss/index.scss +2 -2
  115. package/src/components/button/scss/index.scss +23 -57
  116. package/src/components/button/scss/variables.scss +1 -19
  117. package/src/components/card/scss/index.scss +11 -46
  118. package/src/components/card/scss/variables.scss +1 -2
  119. package/src/components/checkbox/index.ts +27 -26
  120. package/src/components/checkbox/scss/index.scss +86 -28
  121. package/src/components/checkbox/scss/variables.scss +71 -30
  122. package/src/components/checkbox/svg/check.svg +1 -0
  123. package/src/components/clipboard/copy.ts +60 -0
  124. package/src/components/clipboard/index.ts +3 -1
  125. package/src/components/clipboard/onclick.ts +3 -4
  126. package/src/components/counter/index.ts +57 -57
  127. package/src/components/counter/scss/index.scss +4 -5
  128. package/src/components/counter/scss/variables.scss +0 -1
  129. package/src/components/form/input.ts +6 -5
  130. package/src/components/grid/scss/index.scss +1 -1
  131. package/src/components/icon/index.ts +2 -3
  132. package/src/components/icon/scss/variables.scss +0 -1
  133. package/src/components/index.ts +2 -12
  134. package/src/components/input/index.ts +1 -1
  135. package/src/components/input/scss/index.scss +8 -7
  136. package/src/components/input/scss/variables.scss +0 -1
  137. package/src/components/link/scss/index.scss +9 -34
  138. package/src/components/link/scss/variables.scss +0 -12
  139. package/src/components/modal/scss/index.scss +4 -4
  140. package/src/components/normalize/scss/index.scss +0 -1
  141. package/src/components/overlay/index.ts +9 -5
  142. package/src/components/overlay/scss/index.scss +0 -1
  143. package/src/components/page/scss/index.scss +1 -7
  144. package/src/components/page/scss/variables.scss +0 -2
  145. package/src/components/radio/index.ts +0 -1
  146. package/src/components/range/index.ts +1 -1
  147. package/src/components/range/scss/index.scss +5 -5
  148. package/src/components/root/scss/index.scss +44 -39
  149. package/src/components/root/scss/variables.scss +38 -69
  150. package/src/components/select/index.ts +80 -109
  151. package/src/components/select/scss/index.scss +10 -7
  152. package/src/components/select/scss/variables.scss +0 -1
  153. package/src/components/sidebar/index.ts +9 -5
  154. package/src/components/sidebar/scss/index.scss +3 -4
  155. package/src/components/switch/index.ts +1 -2
  156. package/src/components/tabs/scss/index.scss +62 -0
  157. package/src/components/tabs/scss/variables.scss +4 -0
  158. package/src/components/text/scss/index.scss +8 -1
  159. package/src/components/text/scss/variables.scss +5 -3
  160. package/src/components/textarea/index.ts +38 -5
  161. package/src/components/textarea/scss/index.scss +24 -13
  162. package/src/components/textarea/scss/variables.scss +0 -1
  163. package/src/components/toast/index.ts +188 -0
  164. package/src/components/toast/manager.ts +312 -0
  165. package/src/components/toast/scss/index.scss +276 -0
  166. package/src/components/toast/scss/variables.scss +19 -0
  167. package/src/components/toast/svg/check.svg +1 -0
  168. package/src/components/toast/svg/chevron.svg +1 -0
  169. package/src/components/toast/svg/close.svg +1 -0
  170. package/src/components/toast/svg/copy.svg +1 -0
  171. package/src/components/toast/svg/error.svg +1 -0
  172. package/src/components/toast/svg/info.svg +1 -0
  173. package/src/components/toast/svg/loading.svg +1 -0
  174. package/src/components/toast/svg/success.svg +1 -0
  175. package/src/components/toast/svg/warning.svg +1 -0
  176. package/src/components/tooltip/menu.ts +8 -4
  177. package/src/components/tooltip/onclick.ts +13 -70
  178. package/src/components/tooltip/onhover.ts +2 -3
  179. package/src/components/tooltip/scss/index.scss +2 -3
  180. package/src/components/typewriter/index.ts +2 -3
  181. package/src/css-utilities/background/scss/variables.scss +2 -2
  182. package/src/css-utilities/border/scss/index.scss +1 -27
  183. package/src/css-utilities/border/scss/variables.scss +3 -34
  184. package/src/css-utilities/color/scss/variables.scss +2 -6
  185. package/src/css-utilities/font/geist/scss/Geist-Italic-Variable.woff2 +0 -0
  186. package/src/css-utilities/font/geist/scss/Geist-Variable.woff2 +0 -0
  187. package/src/css-utilities/font/geist/scss/GeistMono-Italic-Variable.woff2 +0 -0
  188. package/src/css-utilities/font/geist/scss/GeistMono-Variable.woff2 +0 -0
  189. package/src/css-utilities/font/geist/scss/index.scss +55 -0
  190. package/src/css-utilities/font/montserrat/index.ts +1 -0
  191. package/src/{fonts → css-utilities/font}/montserrat/scss/index.scss +15 -0
  192. package/src/css-utilities/index.scss +7 -12
  193. package/src/css-utilities/inline/scss/index.scss +0 -1
  194. package/src/css-utilities/scrollbar/scss/index.scss +95 -0
  195. package/src/css-utilities/scrollbar/scss/variables.scss +5 -0
  196. package/src/css-utilities/tabular/scss/index.scss +3 -0
  197. package/src/css-utilities/text/scss/index.scss +30 -71
  198. package/src/lib/scss/css-variables.scss +29 -5
  199. package/src/themes/dark/index.ts +0 -2
  200. package/src/themes/dark/select.ts +7 -5
  201. package/src/tokens/index.scss +1 -3
  202. package/src/tokens/scss/border-radius.scss +1 -6
  203. package/src/tokens/scss/color.scss +14 -14
  204. package/src/tokens/scss/font-size.scss +12 -11
  205. package/src/tokens/scss/scale.scss +22 -0
  206. package/src/tokens/scss/size.scss +19 -9
  207. package/src/tokens/scss/spacer.scss +9 -9
  208. package/src/tokens/scss/transition.scss +4 -0
  209. package/storage/svg/arrow-left.svg +1 -0
  210. package/storage/svg/arrow-right.svg +1 -0
  211. package/storage/svg/bolt.svg +1 -0
  212. package/storage/svg/book.svg +1 -0
  213. package/storage/svg/cube.svg +1 -0
  214. package/storage/svg/github.svg +1 -0
  215. package/storage/svg/info.svg +1 -0
  216. package/storage/svg/palette.svg +1 -0
  217. package/storage/svg/search.svg +2 -0
  218. package/storage/svg/star.svg +1 -0
  219. package/storage/svg/type.svg +1 -0
  220. package/tsconfig.json +6 -2
  221. package/vite-env.d.ts +1 -0
  222. package/vite.config.ts +78 -72
  223. package/build/components/alert/index.d.ts +0 -19
  224. package/build/components/alert/index.js +0 -151
  225. package/build/components/alert/scss/index.scss +0 -2
  226. package/build/components/alert/svg/check.svg +0 -11
  227. package/build/components/alert/svg/close.svg +0 -12
  228. package/build/components/alert/svg/error.svg +0 -18
  229. package/build/components/back/index.d.ts +0 -18
  230. package/build/components/back/index.js +0 -16
  231. package/build/components/back/scss/index.scss +0 -2
  232. package/build/components/back/svg/arrow.svg +0 -15
  233. package/build/components/bubble/scss/index.scss +0 -2
  234. package/build/components/button/index.d.ts +0 -103
  235. package/build/components/button/index.js +0 -60
  236. package/build/components/ellipsis/index.d.ts +0 -4
  237. package/build/components/ellipsis/index.js +0 -8
  238. package/build/components/ellipsis/scss/index.scss +0 -2
  239. package/build/components/frame/index.d.ts +0 -20
  240. package/build/components/frame/index.js +0 -7
  241. package/build/components/frame/scss/index.scss +0 -2
  242. package/build/components/highlight/index.d.ts +0 -22
  243. package/build/components/highlight/index.js +0 -56
  244. package/build/components/highlight/scss/index.scss +0 -2
  245. package/build/components/loader/index.d.ts +0 -22
  246. package/build/components/loader/index.js +0 -78
  247. package/build/components/loader/scss/index.scss +0 -2
  248. package/build/components/radio/scss/index.scss +0 -2
  249. package/build/components/root/index.d.ts +0 -7
  250. package/build/components/root/index.js +0 -4
  251. package/build/components/root/onclick.d.ts +0 -5
  252. package/build/components/root/onclick.js +0 -12
  253. package/build/components/scrollbar/index.d.ts +0 -27
  254. package/build/components/scrollbar/index.js +0 -56
  255. package/build/components/scrollbar/scss/index.scss +0 -2
  256. package/build/components/site/index.d.ts +0 -20
  257. package/build/components/site/index.js +0 -9
  258. package/build/components/site/scss/index.scss +0 -2
  259. package/build/components/switch/scss/index.scss +0 -2
  260. package/build/components/template/index.d.ts +0 -14
  261. package/build/components/template/index.js +0 -21
  262. package/build/css-utilities/[margin,padding]/scss/index.scss +0 -2
  263. package/build/css-utilities/error/scss/index.scss +0 -2
  264. package/build/css-utilities/flicker/scss/index.scss +0 -2
  265. package/build/css-utilities/focus/scss/index.scss +0 -2
  266. package/build/css-utilities/gap/scss/index.scss +0 -2
  267. package/build/css-utilities/line-height/scss/index.scss +0 -2
  268. package/build/css-utilities/pointer/scss/index.scss +0 -2
  269. package/build/css-utilities/scroller/scss/index.scss +0 -2
  270. package/build/css-utilities/size/scss/index.scss +0 -2
  271. package/build/css-utilities/viewport/scss/index.scss +0 -2
  272. package/build/css-utilities/width/scss/index.scss +0 -2
  273. package/build/fonts/index.d.ts +0 -1
  274. package/build/fonts/index.js +0 -1
  275. package/build/fonts/montserrat/scss/index.scss +0 -2
  276. package/build/themes/dark/alert.d.ts +0 -11
  277. package/build/themes/dark/alert.js +0 -20
  278. package/build/themes/dark/back.d.ts +0 -15
  279. package/build/themes/dark/back.js +0 -7
  280. package/build/themes/dark/button/scss/index.scss +0 -2
  281. package/build/themes/dark/link/scss/index.scss +0 -2
  282. package/src/components/accordion/scss/variables.scss +0 -9
  283. package/src/components/alert/index.ts +0 -165
  284. package/src/components/alert/scss/index.scss +0 -25
  285. package/src/components/alert/scss/variables.scss +0 -3
  286. package/src/components/alert/svg/check.svg +0 -11
  287. package/src/components/alert/svg/close.svg +0 -12
  288. package/src/components/alert/svg/error.svg +0 -18
  289. package/src/components/back/index.ts +0 -21
  290. package/src/components/back/scss/index.scss +0 -17
  291. package/src/components/back/svg/arrow.svg +0 -15
  292. package/src/components/bubble/scss/index.scss +0 -32
  293. package/src/components/bubble/scss/variables.scss +0 -20
  294. package/src/components/button/index.ts +0 -54
  295. package/src/components/ellipsis/index.ts +0 -11
  296. package/src/components/ellipsis/scss/index.scss +0 -30
  297. package/src/components/ellipsis/scss/variables.scss +0 -5
  298. package/src/components/frame/index.ts +0 -9
  299. package/src/components/frame/scss/index.scss +0 -39
  300. package/src/components/frame/scss/variables.scss +0 -4
  301. package/src/components/highlight/index.ts +0 -67
  302. package/src/components/highlight/scss/index.scss +0 -7
  303. package/src/components/highlight/scss/variables.scss +0 -4
  304. package/src/components/loader/index.ts +0 -81
  305. package/src/components/loader/scss/index.scss +0 -71
  306. package/src/components/loader/scss/variables.scss +0 -6
  307. package/src/components/radio/scss/index.scss +0 -50
  308. package/src/components/radio/scss/variables.scss +0 -67
  309. package/src/components/root/index.ts +0 -6
  310. package/src/components/root/onclick.ts +0 -20
  311. package/src/components/scrollbar/index.ts +0 -70
  312. package/src/components/scrollbar/scss/index.scss +0 -82
  313. package/src/components/scrollbar/scss/variables.scss +0 -6
  314. package/src/components/site/index.ts +0 -11
  315. package/src/components/site/scss/index.scss +0 -3
  316. package/src/components/switch/scss/index.scss +0 -48
  317. package/src/components/switch/scss/variables.scss +0 -74
  318. package/src/components/template/index.ts +0 -40
  319. package/src/css-utilities/[margin,padding]/scss/index.scss +0 -43
  320. package/src/css-utilities/[margin,padding]/scss/variables.scss +0 -54
  321. package/src/css-utilities/error/scss/index.scss +0 -24
  322. package/src/css-utilities/error/scss/variables.scss +0 -3
  323. package/src/css-utilities/flicker/scss/index.scss +0 -15
  324. package/src/css-utilities/flicker/scss/variables.scss +0 -5
  325. package/src/css-utilities/focus/scss/index.scss +0 -7
  326. package/src/css-utilities/focus/scss/variables.scss +0 -5
  327. package/src/css-utilities/gap/scss/index.scss +0 -13
  328. package/src/css-utilities/gap/scss/variables.scss +0 -39
  329. package/src/css-utilities/line-height/scss/index.scss +0 -1
  330. package/src/css-utilities/line-height/scss/variables.scss +0 -10
  331. package/src/css-utilities/pointer/scss/index.scss +0 -5
  332. package/src/css-utilities/scroller/scss/index.scss +0 -8
  333. package/src/css-utilities/scroller/scss/variables.scss +0 -4
  334. package/src/css-utilities/size/scss/index.scss +0 -1
  335. package/src/css-utilities/size/scss/variables.scss +0 -12
  336. package/src/css-utilities/text/scss/variables.scss +0 -31
  337. package/src/css-utilities/viewport/scss/index.scss +0 -5
  338. package/src/css-utilities/width/scss/index.scss +0 -5
  339. package/src/css-utilities/width/scss/variables.scss +0 -9
  340. package/src/fonts/index.ts +0 -1
  341. package/src/themes/dark/alert.ts +0 -23
  342. package/src/themes/dark/back.ts +0 -9
  343. package/src/themes/dark/button/scss/index.scss +0 -46
  344. package/src/themes/dark/link/scss/index.scss +0 -26
  345. package/src/tokens/scss/font-weight.scss +0 -6
  346. package/src/tokens/scss/line-height.scss +0 -6
  347. package/src/tokens/scss/transition-duration.scss +0 -1
  348. /package/build/{fonts/montserrat → css-utilities/font/geist}/index.d.ts +0 -0
  349. /package/build/{fonts/montserrat → css-utilities/font/geist}/index.js +0 -0
  350. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff +0 -0
  351. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff2 +0 -0
  352. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
  353. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
  354. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff +0 -0
  355. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff2 +0 -0
  356. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff +0 -0
  357. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff2 +0 -0
  358. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
  359. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
  360. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff +0 -0
  361. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff2 +0 -0
  362. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff +0 -0
  363. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
  364. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
  365. /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
  366. /package/src/{fonts/montserrat → css-utilities/font/geist}/index.ts +0 -0
  367. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff +0 -0
  368. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff2 +0 -0
  369. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
  370. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
  371. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff +0 -0
  372. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff2 +0 -0
  373. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff +0 -0
  374. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff2 +0 -0
  375. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
  376. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
  377. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff +0 -0
  378. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff2 +0 -0
  379. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff +0 -0
  380. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
  381. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
  382. /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
@@ -0,0 +1,312 @@
1
+ import { effect, reactive, ReactiveArray } from '@esportsplus/reactivity';
2
+ import { type Renderable } from '@esportsplus/template';
3
+
4
+
5
+ type Action = {
6
+ label: string;
7
+ onclick: () => void;
8
+ };
9
+
10
+ type Options = {
11
+ action?: Action;
12
+ description?: Renderable<unknown> | string;
13
+ dismissible?: boolean;
14
+ duration?: number;
15
+ id?: string;
16
+ priority?: 'low' | 'high';
17
+ };
18
+
19
+ type Status = 'ending' | 'starting' | 'visible';
20
+
21
+ type Timer = {
22
+ handle: ReturnType<typeof setTimeout> | undefined;
23
+ remaining: number;
24
+ started: number;
25
+ };
26
+
27
+ type Toast = {
28
+ action?: Action;
29
+ createdAt: number;
30
+ description?: Renderable<unknown> | string;
31
+ dismissible: boolean;
32
+ duration: number;
33
+ height: number;
34
+ id: string;
35
+ priority: 'low' | 'high';
36
+ status: Status;
37
+ title: Renderable<unknown> | string;
38
+ type: Type;
39
+ };
40
+
41
+ type Type = 'success' | 'error' | 'info' | 'warning' | 'loading' | 'message';
42
+
43
+
44
+ const DURATIONS: Record<Type, number> = {
45
+ error: 6000,
46
+ info: 4000,
47
+ loading: 0,
48
+ message: 4000,
49
+ success: 4000,
50
+ warning: 6000
51
+ };
52
+
53
+ const EXIT_DURATION = 300;
54
+
55
+
56
+ let counter = 0,
57
+ paused = false,
58
+ timers = new Map<string, Timer>();
59
+
60
+
61
+ function buildVisibleToastLayout(toasts: Toast[]): {
62
+ frontmostHeight: number;
63
+ items: { offsetY: number, toast: Toast, visibleIndex: number }[];
64
+ } {
65
+ // Two parallel cursors:
66
+ // - `full*` advances on every toast, so an ending toast keeps the slot it
67
+ // occupied before dismissal and its exit transform originates from the
68
+ // correct position (otherwise it would snap to Y=0 and slide diagonally).
69
+ // - `live*` advances only on non-ending toasts, so live toasts reflow past
70
+ // the vacated slot in parallel with the exit animation instead of
71
+ // waiting for it to finish (which caused a visible "stop and bump").
72
+ let fullIndex = 0,
73
+ fullOffsetY = 0,
74
+ liveIndex = 0,
75
+ liveOffsetY = 0,
76
+ items = toasts.map((toast) => {
77
+ let height = normalizeToastHeight(toast.height),
78
+ item;
79
+
80
+ if (toast.status === 'ending') {
81
+ item = {
82
+ offsetY: fullOffsetY,
83
+ toast,
84
+ visibleIndex: fullIndex
85
+ };
86
+
87
+ fullOffsetY += height;
88
+ fullIndex += 1;
89
+
90
+ return item;
91
+ }
92
+
93
+ item = {
94
+ offsetY: liveOffsetY,
95
+ toast,
96
+ visibleIndex: liveIndex
97
+ };
98
+
99
+ fullOffsetY += height;
100
+ fullIndex += 1;
101
+ liveOffsetY += height;
102
+ liveIndex += 1;
103
+
104
+ return item;
105
+ }),
106
+ frontmostLiveToast = toasts.find((toast) => toast.status !== 'ending');
107
+
108
+ return {
109
+ frontmostHeight: normalizeToastHeight(frontmostLiveToast?.height),
110
+ items
111
+ };
112
+ }
113
+
114
+ function clearTimer(id: string) {
115
+ let timer = timers.get(id);
116
+
117
+ if (!timer) {
118
+ return;
119
+ }
120
+
121
+ if (timer.handle !== undefined) {
122
+ clearTimeout(timer.handle);
123
+ }
124
+
125
+ timers.delete(id);
126
+ }
127
+
128
+ function create(type: Type, title: Renderable<unknown> | string, options: Options = {}): string {
129
+ let id = options.id ?? `toast-${++counter}`,
130
+ toast = reactive({
131
+ action: options.action,
132
+ createdAt: Date.now(),
133
+ description: options.description,
134
+ dismissible: options.dismissible ?? true,
135
+ duration: options.duration ?? DURATIONS[type],
136
+ height: 0,
137
+ id,
138
+ priority: options.priority ?? 'low',
139
+ status: 'starting' as Status,
140
+ title,
141
+ type
142
+ }) as Toast;
143
+
144
+ toasts.push(toast);
145
+
146
+ queueMicrotask(() => {
147
+ if (toast.status === 'starting' && toasts.includes(toast)) {
148
+ toast.status = 'visible';
149
+ }
150
+ });
151
+
152
+ if (type !== 'loading' && toast.duration > 0) {
153
+ schedule(toast);
154
+ }
155
+
156
+ return id;
157
+ }
158
+
159
+ function dismiss(id: string) {
160
+ let toast = toasts.find((value) => value.id === id);
161
+
162
+ if (!toast || toast.status === 'ending') {
163
+ return;
164
+ }
165
+
166
+ clearTimer(id);
167
+
168
+ toast.status = 'ending';
169
+
170
+ setTimeout(() => remove(id), EXIT_DURATION);
171
+ }
172
+
173
+ function normalizeToastHeight(height: number | null | undefined): number {
174
+ return typeof height === 'number' && Number.isFinite(height) && height > 0 ? height : 0;
175
+ }
176
+
177
+ function pause() {
178
+ for (let timer of timers.values()) {
179
+ if (timer.handle === undefined) {
180
+ continue;
181
+ }
182
+
183
+ clearTimeout(timer.handle);
184
+
185
+ timer.remaining = Math.max(0, timer.remaining - (performance.now() - timer.started));
186
+ timer.handle = undefined;
187
+ }
188
+ }
189
+
190
+ function remove(id: string) {
191
+ let index = toasts.findIndex((toast) => toast.id === id);
192
+
193
+ clearTimer(id);
194
+
195
+ if (index !== -1) {
196
+ toasts.splice(index, 1);
197
+ }
198
+ }
199
+
200
+ function resume() {
201
+ for (let [id, timer] of timers) {
202
+ if (timer.handle !== undefined) {
203
+ continue;
204
+ }
205
+
206
+ timer.started = performance.now();
207
+ timer.handle = setTimeout(() => dismiss(id), timer.remaining);
208
+ }
209
+ }
210
+
211
+ function schedule(toast: Toast) {
212
+ if (toast.duration <= 0) {
213
+ return;
214
+ }
215
+
216
+ if (state.active) {
217
+ timers.set(toast.id, {
218
+ handle: undefined,
219
+ remaining: toast.duration,
220
+ started: 0
221
+ });
222
+
223
+ return;
224
+ }
225
+
226
+ timers.set(toast.id, {
227
+ handle: setTimeout(() => dismiss(toast.id), toast.duration),
228
+ remaining: toast.duration,
229
+ started: performance.now()
230
+ });
231
+ }
232
+
233
+ function update(id: string, options: Options) {
234
+ let toast = toasts.find((value) => value.id === id);
235
+
236
+ if (!toast) {
237
+ return;
238
+ }
239
+
240
+ if (options.action !== undefined) {
241
+ toast.action = options.action;
242
+ }
243
+
244
+ if (options.description !== undefined) {
245
+ toast.description = options.description;
246
+ }
247
+
248
+ if (options.dismissible !== undefined) {
249
+ toast.dismissible = options.dismissible;
250
+ }
251
+
252
+ if (options.priority !== undefined) {
253
+ toast.priority = options.priority;
254
+ }
255
+
256
+ if (options.duration !== undefined) {
257
+ toast.duration = options.duration;
258
+
259
+ clearTimer(id);
260
+
261
+ if (toast.type !== 'loading' && toast.duration > 0 && toast.status !== 'ending') {
262
+ schedule(toast);
263
+ }
264
+ }
265
+ }
266
+
267
+
268
+ const state = reactive({ active: false });
269
+
270
+ const toasts = new ReactiveArray<Toast>();
271
+
272
+ effect(() => {
273
+ let active = state.active;
274
+
275
+ if (active === paused) {
276
+ return;
277
+ }
278
+
279
+ paused = active;
280
+
281
+ if (active) {
282
+ pause();
283
+ }
284
+ else {
285
+ resume();
286
+ }
287
+ });
288
+
289
+ const toast = {
290
+ dismiss: (id?: string) => {
291
+ if (id === undefined) {
292
+ for (let value of [...toasts]) {
293
+ dismiss(value.id);
294
+ }
295
+
296
+ return;
297
+ }
298
+
299
+ dismiss(id);
300
+ },
301
+ error: (title: Renderable<unknown> | string, options?: Options) => create('error', title, options),
302
+ info: (title: Renderable<unknown> | string, options?: Options) => create('info', title, options),
303
+ loading: (title: Renderable<unknown> | string, options?: Options) => create('loading', title, options),
304
+ message: (title: Renderable<unknown> | string, options?: Options) => create('message', title, options),
305
+ success: (title: Renderable<unknown> | string, options?: Options) => create('success', title, options),
306
+ update,
307
+ warning: (title: Renderable<unknown> | string, options?: Options) => create('warning', title, options)
308
+ };
309
+
310
+
311
+ export { buildVisibleToastLayout, remove, state, toast, toasts };
312
+ export type { Options, Toast, Type };
@@ -0,0 +1,276 @@
1
+ @use '/lib';
2
+ @use '/tokens';
3
+ @use 'variables';
4
+
5
+ .toaster {
6
+ bottom: auto;
7
+ left: auto;
8
+ position: fixed;
9
+ right: auto;
10
+ top: auto;
11
+ width: min(360px, calc(100% - (var(--toast-inset) * 2)));
12
+ z-index: 9999;
13
+
14
+ &[data-position^='top'] {
15
+ top: var(--toast-inset);
16
+ }
17
+
18
+ &[data-position^='bottom'] {
19
+ bottom: var(--toast-inset);
20
+ }
21
+
22
+ &[data-position$='left'] {
23
+ left: var(--toast-inset);
24
+ }
25
+
26
+ &[data-position$='right'] {
27
+ right: var(--toast-inset);
28
+ }
29
+
30
+ &[data-position$='center'] {
31
+ left: 50%;
32
+ transform: translateX(-50%);
33
+ }
34
+ }
35
+
36
+
37
+ .toast {
38
+ background: var(--background);
39
+ border: 1px solid var(--color-border-400);
40
+ border-radius: var(--border-radius-500);
41
+ box-shadow: var(--box-shadow-300);
42
+ color: var(--color-text-400);
43
+ left: 0;
44
+ overflow: visible;
45
+ position: absolute;
46
+ right: 0;
47
+ transform: translateX(var(--toast-swipe-x)) translateY(calc(var(--toast-swipe-y) + (var(--toast-index) * var(--toast-peek)) + (var(--toast-shrink) * var(--toast-calc-height)))) scale(var(--toast-scale));
48
+ transition:
49
+ transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
50
+ opacity 0.3s,
51
+ height 0.2s;
52
+ user-select: none;
53
+ width: 100%;
54
+ z-index: calc(9999 - var(--toast-index, 0));
55
+
56
+
57
+ [data-position*='top'] & {
58
+ bottom: auto;
59
+ top: 0;
60
+ transform-origin: top;
61
+ }
62
+
63
+ [data-position*='bottom'] & {
64
+ --toast-calc-offset-y: calc((var(--toast-offset-y, 0px) * -1) + (var(--toast-index, 0) * var(--toast-gap) * -1) + var(--toast-swipe-y, 0px));
65
+ bottom: 0;
66
+ top: auto;
67
+ transform: translateX(var(--toast-swipe-x)) translateY(calc(var(--toast-swipe-y) - (var(--toast-index) * var(--toast-peek)) - (var(--toast-shrink) * var(--toast-calc-height)))) scale(var(--toast-scale));
68
+ transform-origin: bottom;
69
+ }
70
+
71
+
72
+ // Invisible hit-area bridging the gap between stacked toasts while collapsed.
73
+ &::after {
74
+ content: '';
75
+ height: calc(var(--toast-gap) + 1px);
76
+ left: 0;
77
+ position: absolute;
78
+ width: 100%;
79
+ }
80
+
81
+ [data-position*='top'] &::after {
82
+ top: 100%;
83
+ }
84
+
85
+ [data-position*='bottom'] &::after {
86
+ bottom: 100%;
87
+ }
88
+
89
+
90
+ &-action {
91
+ flex-shrink: 0;
92
+ }
93
+
94
+ &-close {
95
+ align-items: center;
96
+ background: var(--background);
97
+ border: 1px solid var(--color-border-400);
98
+ border-radius: 100%;
99
+ color: var(--color-text-500);
100
+ display: flex;
101
+ height: var(--size-500);
102
+ justify-content: center;
103
+ position: absolute;
104
+ right: calc(var(--size-200) * -1);
105
+ top: calc(var(--size-200) * -1);
106
+ width: var(--size-500);
107
+ z-index: 1;
108
+ }
109
+
110
+ &-content {
111
+ align-items: center;
112
+ display: flex;
113
+ gap: var(--size-300);
114
+ justify-content: space-between;
115
+ min-height: 0;
116
+ opacity: max(0, 1 - var(--toast-index, 0));
117
+ overflow-x: clip;
118
+ overflow-y: visible;
119
+ padding: var(--size-400);
120
+ transition: opacity 0.3s;
121
+ }
122
+
123
+ &-copy {
124
+ align-items: center;
125
+ display: inline-flex;
126
+ justify-content: center;
127
+ }
128
+
129
+ &-description {
130
+ color: var(--color-text-300);
131
+ overflow-wrap: anywhere;
132
+
133
+ &--clamp {
134
+ -webkit-box-orient: vertical;
135
+ -webkit-line-clamp: 4;
136
+ display: -webkit-box;
137
+ line-clamp: 4;
138
+ overflow: hidden;
139
+ }
140
+ }
141
+
142
+ &-details {
143
+ margin-top: var(--size-200);
144
+ max-height: 160px;
145
+ overflow-y: auto;
146
+ }
147
+
148
+ &-details-toggle {
149
+ align-items: center;
150
+ cursor: pointer;
151
+ display: flex;
152
+ gap: var(--size-200);
153
+ }
154
+
155
+ &-icon {
156
+ color: var(--toast-color);
157
+ flex-shrink: 0;
158
+ height: 18px;
159
+ width: 18px;
160
+ }
161
+
162
+ &-title {
163
+ font-weight: var(--font-weight-400);
164
+ overflow-wrap: anywhere;
165
+ }
166
+
167
+
168
+ &--error {
169
+ --toast-color: var(--color-red-400);
170
+
171
+ border-color: color-mix(in oklab, var(--toast-color) 30%, var(--color-border-400));
172
+ }
173
+
174
+ &--warning {
175
+ --toast-color: var(--color-yellow-400);
176
+
177
+ border-color: color-mix(in oklab, var(--toast-color) 30%, var(--color-border-400));
178
+ }
179
+
180
+ &--success {
181
+ --toast-color: var(--color-green-400);
182
+
183
+ border-color: color-mix(in oklab, var(--toast-color) 30%, var(--color-border-400));
184
+ }
185
+
186
+ &--info {
187
+ --toast-color: var(--color-blue-400);
188
+
189
+ border-color: color-mix(in oklab, var(--toast-color) 30%, var(--color-border-400));
190
+ }
191
+
192
+ &--loading {
193
+ --toast-color: var(--color-grey-500);
194
+
195
+ border-color: color-mix(in oklab, var(--toast-color) 30%, var(--color-border-400));
196
+
197
+ .toast-icon {
198
+ animation: toast-spin 1s linear infinite;
199
+ }
200
+ }
201
+
202
+ &--message {
203
+ --toast-color: var(--color-text-300);
204
+
205
+ border-color: color-mix(in oklab, var(--toast-color) 30%, var(--color-border-400));
206
+ }
207
+ }
208
+
209
+
210
+ // active (viewport hovered): everything fans out to its own measured offset.
211
+ .toaster.--active .toast {
212
+ height: auto;
213
+ transform: translateX(var(--toast-swipe-x)) translateY(var(--toast-calc-offset-y));
214
+ }
215
+
216
+ .toaster.--active .toast-content {
217
+ opacity: 1;
218
+ }
219
+
220
+
221
+ // Entering: start off-screen (faded) and let the base transform animate in.
222
+ .toaster .toast.toast--starting {
223
+ opacity: 0;
224
+ }
225
+
226
+ .toaster[data-position*='top'] .toast.toast--starting {
227
+ transform: translateY(-120%);
228
+ }
229
+
230
+ .toaster[data-position*='bottom'] .toast.toast--starting {
231
+ transform: translateY(120%);
232
+ }
233
+
234
+
235
+ // Leaving: fade, then slide toward the matching viewport edge (or the swipe
236
+ // direction the gesture reported).
237
+ .toaster .toast.toast--ending {
238
+ opacity: 0;
239
+ }
240
+
241
+ .toaster[data-position*='top'] .toast.toast--ending {
242
+ transform: translateY(calc(-100% - var(--toast-inset)));
243
+ }
244
+
245
+ .toaster[data-position*='bottom'] .toast.toast--ending {
246
+ transform: translateY(calc(100% + var(--toast-inset)));
247
+ }
248
+
249
+ .toaster .toast.toast--ending[data-swipe-direction='left'] {
250
+ transform: translateX(calc(var(--toast-swipe-x) - 100% - var(--toast-inset))) translateY(var(--toast-calc-offset-y));
251
+ }
252
+
253
+ .toaster .toast.toast--ending[data-swipe-direction='right'] {
254
+ transform: translateX(calc(var(--toast-swipe-x) + 100% + var(--toast-inset))) translateY(var(--toast-calc-offset-y));
255
+ }
256
+
257
+ .toaster .toast.toast--ending[data-swipe-direction='up'] {
258
+ transform: translateY(calc(var(--toast-swipe-y) - 100% - var(--toast-inset)));
259
+ }
260
+
261
+ .toaster .toast.toast--ending[data-swipe-direction='down'] {
262
+ transform: translateY(calc(var(--toast-swipe-y) + 100% + var(--toast-inset)));
263
+ }
264
+
265
+
266
+ // Following the finger: never ease the transform during a swipe.
267
+ .toast--swiping {
268
+ transition: none;
269
+ }
270
+
271
+
272
+ @keyframes toast-spin {
273
+ to {
274
+ transform: rotate(360deg);
275
+ }
276
+ }
@@ -0,0 +1,19 @@
1
+ .toaster {
2
+ --toast-gap: var(--size-300);
3
+ --toast-inset: var(--size-500);
4
+ --toast-peek: var(--size-300);
5
+ }
6
+
7
+
8
+ .toast {
9
+ --toast-calc-height: max(var(--toast-frontmost-height, var(--toast-height, 0px)), var(--toast-height, 0px));
10
+ --toast-calc-offset-y: calc(var(--toast-offset-y, 0px) + (var(--toast-index, 0) * var(--toast-gap)) + var(--toast-swipe-y, 0px));
11
+ --toast-color: var(--color-text-300);
12
+ --toast-height: 0px;
13
+ --toast-index: 0;
14
+ --toast-offset-y: 0px;
15
+ --toast-scale: max(0, 1 - (var(--toast-index, 0) * 0.06));
16
+ --toast-shrink: calc(1 - var(--toast-scale));
17
+ --toast-swipe-x: 0px;
18
+ --toast-swipe-y: 0px;
19
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>
@@ -1,6 +1,6 @@
1
- import { html, type Attributes, type Renderable } from '@esportsplus/template';
1
+ import { component, html, type Attributes, type Renderable } from '@esportsplus/template';
2
+ import { reactive } from '@esportsplus/reactivity';
2
3
  import { omit } from '@esportsplus/utilities';
3
- import template from '~/components/template';
4
4
  import onclick from './onclick';
5
5
 
6
6
 
@@ -20,21 +20,25 @@ const OMIT_OPTION = ['content'];
20
20
  const OMIT_TOOLTIP_CONTENT = ['direction'];
21
21
 
22
22
 
23
- export default template.factory<A>(
23
+ export default component<A>(
24
24
  (attributes, content) => {
25
25
  let options = attributes.options,
26
26
  option = attributes.option,
27
+ state = attributes.state || reactive({ active: false }),
27
28
  tooltipContent = attributes?.['tooltip-content'],
28
29
  tooltipContentDirection = tooltipContent?.direction || 'nw';
29
30
 
30
31
  return onclick(
31
- omit(attributes, OMIT),
32
+ { ...omit(attributes, OMIT), state },
32
33
  html`
33
34
  ${content}
34
35
 
35
36
  <div
36
37
  class='tooltip-content ${`tooltip-content--${tooltipContentDirection}`}'
37
38
  ${tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT)}
39
+ ${{
40
+ inert: () => !state.active
41
+ }}
38
42
  >
39
43
  ${options.map((o) => {
40
44
  if (o.href) {