loseta 0.15.0 → 0.17.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 (375) hide show
  1. package/package.json +1 -1
  2. package/registry/components/alert-dialog.css +7 -0
  3. package/registry/components/alert.css +2 -0
  4. package/registry/components/avatar.css +11 -2
  5. package/registry/components/badge.css +4 -7
  6. package/registry/components/breadcrumb.css +9 -1
  7. package/registry/components/button-group.css +33 -18
  8. package/registry/components/button.css +6 -0
  9. package/registry/components/calendar.css +39 -0
  10. package/registry/components/card.css +5 -0
  11. package/registry/components/checkbox.css +17 -2
  12. package/registry/components/command.css +7 -0
  13. package/registry/components/context-menu.css +8 -0
  14. package/registry/components/dialog.css +24 -1
  15. package/registry/components/drawer.css +4 -0
  16. package/registry/components/empty.css +2 -0
  17. package/registry/components/field.css +8 -3
  18. package/registry/components/input-group.css +12 -1
  19. package/registry/components/input-otp.css +106 -7
  20. package/registry/components/input.css +5 -0
  21. package/registry/components/kbd.css +8 -0
  22. package/registry/components/native-select.css +6 -0
  23. package/registry/components/navigation-menu.css +18 -1
  24. package/registry/components/radio.css +19 -4
  25. package/registry/components/select.css +3 -0
  26. package/registry/components/sheet.css +10 -0
  27. package/registry/components/sidebar.css +68 -0
  28. package/registry/components/slider.css +1 -1
  29. package/registry/components/switch.css +14 -0
  30. package/registry/components/table.css +4 -4
  31. package/registry/components/textarea.css +6 -0
  32. package/registry/components/toggle-group.css +8 -0
  33. package/registry/components/tooltip.css +329 -150
  34. package/registry/examples/alert-dialog.html +133 -7
  35. package/registry/examples/alert.html +50 -3
  36. package/registry/examples/aspect-ratio.html +5 -0
  37. package/registry/examples/attachment.html +12 -0
  38. package/registry/examples/avatar.html +49 -4
  39. package/registry/examples/badge.html +40 -0
  40. package/registry/examples/breadcrumb.html +86 -6
  41. package/registry/examples/bubble.html +5 -0
  42. package/registry/examples/button-group.html +140 -12
  43. package/registry/examples/button.html +60 -15
  44. package/registry/examples/calendar.html +687 -51
  45. package/registry/examples/card.html +190 -4
  46. package/registry/examples/checkbox.html +107 -4
  47. package/registry/examples/code-block.html +5 -0
  48. package/registry/examples/combobox.html +13 -0
  49. package/registry/examples/command.html +322 -1
  50. package/registry/examples/context-menu.html +170 -1
  51. package/registry/examples/dialog.html +166 -5
  52. package/registry/examples/drawer.html +198 -10
  53. package/registry/examples/dropdown-menu.html +259 -2
  54. package/registry/examples/empty.html +107 -1
  55. package/registry/examples/field.html +232 -0
  56. package/registry/examples/input-group.html +101 -5
  57. package/registry/examples/input-otp.html +180 -3
  58. package/registry/examples/input.html +75 -4
  59. package/registry/examples/item.html +12 -0
  60. package/registry/examples/kbd.html +90 -2
  61. package/registry/examples/marker.html +6 -0
  62. package/registry/examples/menubar.html +338 -9
  63. package/registry/examples/message.html +16 -0
  64. package/registry/examples/native-select.html +83 -2
  65. package/registry/examples/navigation-menu.html +166 -17
  66. package/registry/examples/popover.html +153 -6
  67. package/registry/examples/progress.html +66 -3
  68. package/registry/examples/questionnaire.html +33 -0
  69. package/registry/examples/radio.html +121 -9
  70. package/registry/examples/resizable.html +11 -0
  71. package/registry/examples/scroll-area.html +9 -0
  72. package/registry/examples/select.html +199 -6
  73. package/registry/examples/separator.html +3 -0
  74. package/registry/examples/sheet.html +205 -7
  75. package/registry/examples/sidebar.html +377 -1
  76. package/registry/examples/slider.html +52 -5
  77. package/registry/examples/spinner.html +3 -0
  78. package/registry/examples/switch.html +68 -0
  79. package/registry/examples/table.html +192 -8
  80. package/registry/examples/textarea.html +33 -3
  81. package/registry/examples/toggle-group.html +72 -12
  82. package/registry/examples/toggle.html +34 -7
  83. package/registry/examples/tooltip.html +105 -3
  84. package/registry/examples/trace.html +13 -1
  85. package/registry/primitives/menu.css +25 -3
  86. package/registry/primitives/popover.css +38 -6
  87. package/registry/registry.json +149 -38
  88. package/registry/styles/luma/accordion.css +1 -1
  89. package/registry/styles/luma/alert-dialog.css +8 -0
  90. package/registry/styles/luma/alert.css +1 -17
  91. package/registry/styles/luma/avatar.css +44 -1
  92. package/registry/styles/luma/badge.css +28 -0
  93. package/registry/styles/luma/breadcrumb.css +2 -1
  94. package/registry/styles/luma/button-group.css +5 -17
  95. package/registry/styles/luma/button.css +8 -8
  96. package/registry/styles/luma/calendar.css +62 -0
  97. package/registry/styles/luma/card.css +9 -27
  98. package/registry/styles/luma/checkbox.css +6 -0
  99. package/registry/styles/luma/collapsible.css +1 -1
  100. package/registry/styles/luma/command.css +6 -0
  101. package/registry/styles/luma/drawer.css +8 -0
  102. package/registry/styles/luma/empty.css +2 -4
  103. package/registry/styles/luma/field.css +1 -1
  104. package/registry/styles/luma/input-group.css +14 -2
  105. package/registry/styles/luma/input-otp.css +81 -30
  106. package/registry/styles/luma/input.css +5 -0
  107. package/registry/styles/luma/kbd.css +1 -1
  108. package/registry/styles/luma/label.css +4 -0
  109. package/registry/styles/luma/menubar.css +1 -1
  110. package/registry/styles/luma/native-select.css +9 -2
  111. package/registry/styles/luma/navigation-menu.css +11 -0
  112. package/registry/styles/luma/primitives/listbox.css +8 -0
  113. package/registry/styles/luma/primitives/menu.css +8 -4
  114. package/registry/styles/luma/progress.css +26 -1
  115. package/registry/styles/luma/radio.css +3 -1
  116. package/registry/styles/luma/select.css +7 -2
  117. package/registry/styles/luma/sheet.css +20 -0
  118. package/registry/styles/luma/sidebar.css +114 -1
  119. package/registry/styles/luma/switch.css +39 -10
  120. package/registry/styles/luma/table.css +6 -2
  121. package/registry/styles/luma/textarea.css +5 -0
  122. package/registry/styles/luma/toggle-group.css +11 -0
  123. package/registry/styles/luma/tooltip.css +29 -16
  124. package/registry/styles/lyra/accordion.css +1 -1
  125. package/registry/styles/lyra/alert-dialog.css +8 -0
  126. package/registry/styles/lyra/alert.css +1 -17
  127. package/registry/styles/lyra/avatar.css +44 -1
  128. package/registry/styles/lyra/badge.css +28 -0
  129. package/registry/styles/lyra/breadcrumb.css +2 -1
  130. package/registry/styles/lyra/button-group.css +5 -17
  131. package/registry/styles/lyra/button.css +8 -8
  132. package/registry/styles/lyra/calendar.css +62 -0
  133. package/registry/styles/lyra/card.css +9 -27
  134. package/registry/styles/lyra/checkbox.css +6 -0
  135. package/registry/styles/lyra/collapsible.css +1 -1
  136. package/registry/styles/lyra/command.css +6 -0
  137. package/registry/styles/lyra/drawer.css +8 -0
  138. package/registry/styles/lyra/empty.css +2 -4
  139. package/registry/styles/lyra/field.css +1 -1
  140. package/registry/styles/lyra/input-group.css +15 -3
  141. package/registry/styles/lyra/input-otp.css +81 -30
  142. package/registry/styles/lyra/input.css +5 -0
  143. package/registry/styles/lyra/kbd.css +1 -1
  144. package/registry/styles/lyra/label.css +4 -0
  145. package/registry/styles/lyra/menubar.css +1 -1
  146. package/registry/styles/lyra/native-select.css +6 -1
  147. package/registry/styles/lyra/navigation-menu.css +11 -0
  148. package/registry/styles/lyra/primitives/listbox.css +8 -0
  149. package/registry/styles/lyra/primitives/menu.css +8 -4
  150. package/registry/styles/lyra/progress.css +26 -1
  151. package/registry/styles/lyra/radio.css +3 -1
  152. package/registry/styles/lyra/select.css +6 -1
  153. package/registry/styles/lyra/sheet.css +20 -0
  154. package/registry/styles/lyra/sidebar.css +114 -1
  155. package/registry/styles/lyra/switch.css +37 -8
  156. package/registry/styles/lyra/table.css +6 -2
  157. package/registry/styles/lyra/textarea.css +5 -1
  158. package/registry/styles/lyra/tooltip.css +29 -16
  159. package/registry/styles/maia/accordion.css +1 -1
  160. package/registry/styles/maia/alert-dialog.css +8 -0
  161. package/registry/styles/maia/alert.css +1 -17
  162. package/registry/styles/maia/avatar.css +44 -1
  163. package/registry/styles/maia/badge.css +29 -0
  164. package/registry/styles/maia/breadcrumb.css +2 -1
  165. package/registry/styles/maia/button-group.css +5 -17
  166. package/registry/styles/maia/button.css +8 -8
  167. package/registry/styles/maia/calendar.css +62 -0
  168. package/registry/styles/maia/card.css +9 -27
  169. package/registry/styles/maia/checkbox.css +6 -0
  170. package/registry/styles/maia/collapsible.css +1 -1
  171. package/registry/styles/maia/command.css +6 -0
  172. package/registry/styles/maia/drawer.css +8 -0
  173. package/registry/styles/maia/empty.css +2 -4
  174. package/registry/styles/maia/field.css +1 -1
  175. package/registry/styles/maia/input-group.css +14 -2
  176. package/registry/styles/maia/input-otp.css +81 -30
  177. package/registry/styles/maia/input.css +5 -0
  178. package/registry/styles/maia/kbd.css +1 -1
  179. package/registry/styles/maia/label.css +4 -0
  180. package/registry/styles/maia/menubar.css +1 -1
  181. package/registry/styles/maia/native-select.css +9 -2
  182. package/registry/styles/maia/navigation-menu.css +11 -0
  183. package/registry/styles/maia/primitives/listbox.css +8 -0
  184. package/registry/styles/maia/primitives/menu.css +8 -4
  185. package/registry/styles/maia/progress.css +26 -1
  186. package/registry/styles/maia/radio.css +3 -1
  187. package/registry/styles/maia/select.css +7 -2
  188. package/registry/styles/maia/sheet.css +20 -0
  189. package/registry/styles/maia/sidebar.css +114 -1
  190. package/registry/styles/maia/switch.css +37 -8
  191. package/registry/styles/maia/table.css +6 -2
  192. package/registry/styles/maia/textarea.css +5 -0
  193. package/registry/styles/maia/toggle-group.css +11 -0
  194. package/registry/styles/maia/tooltip.css +29 -16
  195. package/registry/styles/mira/accordion.css +1 -1
  196. package/registry/styles/mira/alert-dialog.css +8 -0
  197. package/registry/styles/mira/alert.css +1 -17
  198. package/registry/styles/mira/avatar.css +44 -1
  199. package/registry/styles/mira/badge.css +32 -0
  200. package/registry/styles/mira/breadcrumb.css +2 -1
  201. package/registry/styles/mira/button-group.css +5 -17
  202. package/registry/styles/mira/button.css +8 -8
  203. package/registry/styles/mira/calendar.css +62 -0
  204. package/registry/styles/mira/card.css +9 -27
  205. package/registry/styles/mira/checkbox.css +6 -0
  206. package/registry/styles/mira/collapsible.css +1 -1
  207. package/registry/styles/mira/command.css +6 -0
  208. package/registry/styles/mira/drawer.css +8 -0
  209. package/registry/styles/mira/empty.css +2 -4
  210. package/registry/styles/mira/field.css +1 -1
  211. package/registry/styles/mira/input-group.css +14 -2
  212. package/registry/styles/mira/input-otp.css +81 -30
  213. package/registry/styles/mira/input.css +7 -2
  214. package/registry/styles/mira/kbd.css +1 -1
  215. package/registry/styles/mira/label.css +4 -0
  216. package/registry/styles/mira/menubar.css +1 -1
  217. package/registry/styles/mira/native-select.css +7 -2
  218. package/registry/styles/mira/navigation-menu.css +11 -0
  219. package/registry/styles/mira/primitives/listbox.css +8 -0
  220. package/registry/styles/mira/primitives/menu.css +8 -4
  221. package/registry/styles/mira/progress.css +26 -1
  222. package/registry/styles/mira/radio.css +3 -1
  223. package/registry/styles/mira/select.css +7 -2
  224. package/registry/styles/mira/sheet.css +20 -0
  225. package/registry/styles/mira/sidebar.css +113 -0
  226. package/registry/styles/mira/switch.css +39 -10
  227. package/registry/styles/mira/table.css +7 -3
  228. package/registry/styles/mira/textarea.css +6 -2
  229. package/registry/styles/mira/toggle-group.css +11 -0
  230. package/registry/styles/mira/tooltip.css +29 -16
  231. package/registry/styles/nova/accordion.css +1 -1
  232. package/registry/styles/nova/alert-dialog.css +8 -0
  233. package/registry/styles/nova/alert.css +1 -17
  234. package/registry/styles/nova/avatar.css +44 -1
  235. package/registry/styles/nova/badge.css +28 -0
  236. package/registry/styles/nova/breadcrumb.css +2 -1
  237. package/registry/styles/nova/button-group.css +5 -17
  238. package/registry/styles/nova/button.css +8 -8
  239. package/registry/styles/nova/calendar.css +62 -0
  240. package/registry/styles/nova/card.css +9 -27
  241. package/registry/styles/nova/checkbox.css +6 -0
  242. package/registry/styles/nova/collapsible.css +1 -1
  243. package/registry/styles/nova/command.css +8 -0
  244. package/registry/styles/nova/drawer.css +8 -0
  245. package/registry/styles/nova/empty.css +2 -4
  246. package/registry/styles/nova/field.css +1 -1
  247. package/registry/styles/nova/input-group.css +15 -3
  248. package/registry/styles/nova/input-otp.css +81 -30
  249. package/registry/styles/nova/input.css +5 -0
  250. package/registry/styles/nova/kbd.css +1 -1
  251. package/registry/styles/nova/label.css +4 -0
  252. package/registry/styles/nova/menubar.css +1 -1
  253. package/registry/styles/nova/native-select.css +9 -2
  254. package/registry/styles/nova/navigation-menu.css +11 -0
  255. package/registry/styles/nova/primitives/listbox.css +8 -0
  256. package/registry/styles/nova/primitives/menu.css +8 -4
  257. package/registry/styles/nova/progress.css +26 -1
  258. package/registry/styles/nova/radio.css +3 -1
  259. package/registry/styles/nova/select.css +7 -2
  260. package/registry/styles/nova/sheet.css +20 -0
  261. package/registry/styles/nova/sidebar.css +114 -1
  262. package/registry/styles/nova/switch.css +37 -8
  263. package/registry/styles/nova/table.css +6 -2
  264. package/registry/styles/nova/textarea.css +5 -0
  265. package/registry/styles/nova/toggle.css +2 -0
  266. package/registry/styles/nova/tooltip.css +29 -16
  267. package/registry/styles/rhea/accordion.css +1 -1
  268. package/registry/styles/rhea/alert-dialog.css +8 -0
  269. package/registry/styles/rhea/alert.css +1 -17
  270. package/registry/styles/rhea/avatar.css +44 -1
  271. package/registry/styles/rhea/badge.css +28 -0
  272. package/registry/styles/rhea/breadcrumb.css +2 -1
  273. package/registry/styles/rhea/button-group.css +5 -17
  274. package/registry/styles/rhea/button.css +8 -8
  275. package/registry/styles/rhea/calendar.css +62 -0
  276. package/registry/styles/rhea/card.css +9 -27
  277. package/registry/styles/rhea/checkbox.css +6 -0
  278. package/registry/styles/rhea/collapsible.css +1 -1
  279. package/registry/styles/rhea/command.css +6 -0
  280. package/registry/styles/rhea/drawer.css +8 -0
  281. package/registry/styles/rhea/empty.css +2 -4
  282. package/registry/styles/rhea/field.css +1 -1
  283. package/registry/styles/rhea/input-group.css +15 -3
  284. package/registry/styles/rhea/input-otp.css +81 -30
  285. package/registry/styles/rhea/input.css +5 -0
  286. package/registry/styles/rhea/kbd.css +1 -1
  287. package/registry/styles/rhea/label.css +4 -0
  288. package/registry/styles/rhea/menubar.css +1 -1
  289. package/registry/styles/rhea/native-select.css +9 -2
  290. package/registry/styles/rhea/navigation-menu.css +11 -0
  291. package/registry/styles/rhea/primitives/listbox.css +8 -0
  292. package/registry/styles/rhea/primitives/menu.css +8 -4
  293. package/registry/styles/rhea/primitives/popover.css +1 -1
  294. package/registry/styles/rhea/progress.css +25 -0
  295. package/registry/styles/rhea/radio.css +3 -1
  296. package/registry/styles/rhea/select.css +7 -2
  297. package/registry/styles/rhea/sheet.css +20 -0
  298. package/registry/styles/rhea/sidebar.css +114 -1
  299. package/registry/styles/rhea/switch.css +39 -10
  300. package/registry/styles/rhea/table.css +6 -2
  301. package/registry/styles/rhea/textarea.css +5 -0
  302. package/registry/styles/rhea/toggle-group.css +11 -0
  303. package/registry/styles/rhea/tooltip.css +29 -16
  304. package/registry/styles/sera/accordion.css +1 -1
  305. package/registry/styles/sera/alert-dialog.css +8 -0
  306. package/registry/styles/sera/alert.css +1 -17
  307. package/registry/styles/sera/avatar.css +44 -1
  308. package/registry/styles/sera/badge.css +29 -1
  309. package/registry/styles/sera/breadcrumb.css +2 -1
  310. package/registry/styles/sera/button-group.css +5 -17
  311. package/registry/styles/sera/button.css +8 -8
  312. package/registry/styles/sera/calendar.css +66 -0
  313. package/registry/styles/sera/card.css +9 -27
  314. package/registry/styles/sera/checkbox.css +6 -0
  315. package/registry/styles/sera/collapsible.css +1 -1
  316. package/registry/styles/sera/command.css +6 -0
  317. package/registry/styles/sera/drawer.css +8 -0
  318. package/registry/styles/sera/empty.css +2 -4
  319. package/registry/styles/sera/field.css +1 -1
  320. package/registry/styles/sera/input-group.css +14 -2
  321. package/registry/styles/sera/input-otp.css +82 -31
  322. package/registry/styles/sera/input.css +5 -0
  323. package/registry/styles/sera/kbd.css +1 -1
  324. package/registry/styles/sera/label.css +4 -0
  325. package/registry/styles/sera/menubar.css +1 -1
  326. package/registry/styles/sera/native-select.css +9 -2
  327. package/registry/styles/sera/navigation-menu.css +11 -0
  328. package/registry/styles/sera/primitives/listbox.css +8 -0
  329. package/registry/styles/sera/primitives/menu.css +8 -4
  330. package/registry/styles/sera/progress.css +26 -1
  331. package/registry/styles/sera/radio.css +3 -1
  332. package/registry/styles/sera/select.css +7 -2
  333. package/registry/styles/sera/sheet.css +20 -0
  334. package/registry/styles/sera/sidebar.css +117 -0
  335. package/registry/styles/sera/switch.css +37 -8
  336. package/registry/styles/sera/table.css +6 -2
  337. package/registry/styles/sera/textarea.css +5 -0
  338. package/registry/styles/sera/toggle-group.css +10 -0
  339. package/registry/styles/sera/tooltip.css +29 -16
  340. package/registry/styles/vega/accordion.css +1 -1
  341. package/registry/styles/vega/alert-dialog.css +8 -0
  342. package/registry/styles/vega/alert.css +1 -17
  343. package/registry/styles/vega/avatar.css +44 -1
  344. package/registry/styles/vega/badge.css +28 -0
  345. package/registry/styles/vega/breadcrumb.css +2 -1
  346. package/registry/styles/vega/button-group.css +5 -17
  347. package/registry/styles/vega/button.css +8 -8
  348. package/registry/styles/vega/calendar.css +62 -0
  349. package/registry/styles/vega/card.css +9 -27
  350. package/registry/styles/vega/checkbox.css +6 -0
  351. package/registry/styles/vega/collapsible.css +1 -1
  352. package/registry/styles/vega/command.css +6 -0
  353. package/registry/styles/vega/drawer.css +8 -0
  354. package/registry/styles/vega/empty.css +2 -4
  355. package/registry/styles/vega/field.css +1 -1
  356. package/registry/styles/vega/input-group.css +14 -2
  357. package/registry/styles/vega/input-otp.css +81 -30
  358. package/registry/styles/vega/input.css +5 -0
  359. package/registry/styles/vega/kbd.css +1 -1
  360. package/registry/styles/vega/label.css +4 -0
  361. package/registry/styles/vega/menubar.css +1 -1
  362. package/registry/styles/vega/native-select.css +9 -2
  363. package/registry/styles/vega/navigation-menu.css +11 -0
  364. package/registry/styles/vega/primitives/listbox.css +8 -0
  365. package/registry/styles/vega/primitives/menu.css +8 -4
  366. package/registry/styles/vega/progress.css +26 -1
  367. package/registry/styles/vega/radio.css +3 -1
  368. package/registry/styles/vega/select.css +7 -2
  369. package/registry/styles/vega/sheet.css +20 -0
  370. package/registry/styles/vega/sidebar.css +114 -1
  371. package/registry/styles/vega/switch.css +37 -8
  372. package/registry/styles/vega/table.css +6 -2
  373. package/registry/styles/vega/textarea.css +5 -0
  374. package/registry/styles/vega/toggle-group.css +11 -0
  375. package/registry/styles/vega/tooltip.css +29 -16
@@ -1,255 +1,434 @@
1
1
  /* Tooltip */
2
2
  @layer loseta.components {
3
- .tooltip[data-tooltip] {
3
+ .tooltip {
4
4
  position: relative;
5
+ display: inline-block;
5
6
 
6
- &:before {
7
+ &[data-tooltip]::before,
8
+ & > [data-slot='content'] {
7
9
  pointer-events: none;
8
10
  visibility: hidden;
9
11
  position: absolute;
10
12
  z-index: 60;
11
- width: fit-content;
12
- max-width: 20rem;
13
- transform-origin: var(--transform-origin);
14
- scale: 95% 95%;
15
- overflow: hidden;
16
- text-overflow: ellipsis;
17
- white-space: nowrap;
13
+ inline-size: max-content;
14
+ max-inline-size: 20rem;
15
+ white-space: normal;
18
16
  opacity: 0%;
19
- transition-property: all;
17
+ scale: 95% 95%;
18
+ transition-property: opacity, scale, visibility;
20
19
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
21
20
  transition-duration: 150ms;
21
+ }
22
+
23
+ &[data-tooltip]::before {
22
24
  content: attr(data-tooltip);
23
25
  }
24
26
 
25
- &:is(:hover, :focus-visible):before {
26
- visibility: visible;
27
- opacity: 100%;
27
+ &:has(> [data-slot='content'])[data-tooltip]::before {
28
+ content: none;
29
+ }
30
+
31
+ &::after {
32
+ pointer-events: none;
33
+ visibility: hidden;
34
+ position: absolute;
35
+ z-index: 60;
36
+ width: 0.625rem;
37
+ height: 0.25rem;
38
+ opacity: 0%;
39
+ scale: 95% 95%;
40
+ transition-property: opacity, scale, visibility;
41
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
42
+ transition-duration: 150ms;
43
+ -webkit-mask-image: var(--tooltip-tail);
44
+ mask-image: var(--tooltip-tail);
45
+ -webkit-mask-repeat: no-repeat;
46
+ mask-repeat: no-repeat;
47
+ -webkit-mask-position: -1px 0;
48
+ mask-position: -1px 0;
49
+ --tooltip-tail: url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");
50
+ content: '';
51
+ }
52
+
53
+ &:is(
54
+ :has(> [data-slot='content']:not(:empty)),
55
+ :not(:has(> [data-slot='content']))[data-tooltip]:not([data-tooltip=''])
56
+ ):is(:hover, :has(:focus-visible)) {
57
+ &::before,
58
+ & > [data-slot='content'] {
59
+ visibility: visible;
60
+ opacity: 100%;
61
+ scale: 100% 100%;
62
+ }
63
+
64
+ &::after {
65
+ visibility: visible;
66
+ opacity: 100%;
67
+ scale: 100% 100%;
68
+ }
28
69
  }
29
70
 
30
71
  &:not([data-side]),
31
72
  &[data-side='top'] {
32
- &::before {
73
+ &::before,
74
+ & > [data-slot='content'] {
33
75
  bottom: 100%;
34
76
  margin-bottom: 0.375rem;
35
- translate: 0 0.5rem;
77
+ transform-origin: bottom;
78
+ }
79
+
80
+ &:not([data-align]),
81
+ &[data-align='center'] {
82
+ &::before,
83
+ & > [data-slot='content'] {
84
+ inset-inline-start: 50%;
85
+ translate: -50%;
86
+ }
87
+ }
88
+
89
+ &[data-align='start'] {
90
+ &::before,
91
+ & > [data-slot='content'] {
92
+ inset-inline-start: 0;
93
+ }
94
+ }
95
+
96
+ &[data-align='end'] {
97
+ &::before,
98
+ & > [data-slot='content'] {
99
+ inset-inline-end: 0;
100
+ }
101
+ }
102
+
103
+ &::after {
104
+ bottom: calc(100% + 0.25rem);
105
+ }
106
+
107
+ &:not([data-align]),
108
+ &[data-align='center'] {
109
+ &::after {
110
+ inset-inline-start: 50%;
111
+ translate: -50%;
112
+ }
113
+ }
114
+
115
+ &[data-align='start']::after {
116
+ inset-inline-start: max(0.75rem, var(--tooltip-radius, 0px));
117
+ }
118
+
119
+ &[data-align='end']::after {
120
+ inset-inline-end: max(0.75rem, var(--tooltip-radius, 0px));
36
121
  }
37
122
  }
38
123
 
39
124
  &[data-side='bottom'] {
40
- &::before {
125
+ &::before,
126
+ & > [data-slot='content'] {
41
127
  top: 100%;
42
128
  margin-top: 0.375rem;
43
- translate: 0 -0.5rem;
129
+ transform-origin: top;
130
+ }
131
+
132
+ &:not([data-align]),
133
+ &[data-align='center'] {
134
+ &::before,
135
+ & > [data-slot='content'] {
136
+ inset-inline-start: 50%;
137
+ translate: -50%;
138
+ }
44
139
  }
45
- }
46
140
 
47
- &:not([data-side]),
48
- &[data-side='top'],
49
- &[data-side='bottom'] {
50
141
  &[data-align='start'] {
51
- &::before {
52
- left: 0;
142
+ &::before,
143
+ & > [data-slot='content'] {
144
+ inset-inline-start: 0;
53
145
  }
54
146
  }
147
+
55
148
  &[data-align='end'] {
56
- &::before {
57
- right: 0;
149
+ &::before,
150
+ & > [data-slot='content'] {
151
+ inset-inline-end: 0;
58
152
  }
59
153
  }
154
+
155
+ &::after {
156
+ top: calc(100% + 0.25rem);
157
+ rotate: 180deg;
158
+ }
159
+
60
160
  &:not([data-align]),
61
161
  &[data-align='center'] {
62
- &::before {
63
- left: 50%;
162
+ &::after {
163
+ inset-inline-start: 50%;
64
164
  translate: -50%;
65
165
  }
66
166
  }
167
+
168
+ &[data-align='start']::after {
169
+ inset-inline-start: max(0.75rem, var(--tooltip-radius, 0px));
170
+ }
171
+
172
+ &[data-align='end']::after {
173
+ inset-inline-end: max(0.75rem, var(--tooltip-radius, 0px));
174
+ }
67
175
  }
68
176
 
69
177
  &[data-side='left'] {
70
- &::before {
178
+ &::before,
179
+ & > [data-slot='content'] {
71
180
  right: 100%;
72
181
  margin-right: 0.375rem;
73
- translate: 0.5rem;
182
+ transform-origin: right;
74
183
  }
75
- }
76
184
 
77
- &[data-side='right'] {
78
- &::before {
79
- left: 100%;
80
- margin-left: 0.375rem;
81
- translate: -0.5rem;
185
+ &:not([data-align]),
186
+ &[data-align='center'] {
187
+ &::before,
188
+ & > [data-slot='content'] {
189
+ inset-block-start: 50%;
190
+ translate: 0 -50%;
191
+ }
82
192
  }
83
- }
84
193
 
85
- &[data-side='inline-start'] {
86
- &::before {
87
- right: 100%;
88
- margin-right: 0.375rem;
89
- translate: 0.5rem;
194
+ &[data-align='start'] {
195
+ &::before,
196
+ & > [data-slot='content'] {
197
+ inset-block-start: 0;
198
+ }
90
199
  }
91
- }
92
200
 
93
- &[data-side='inline-start']:dir(rtl) {
94
- &::before {
95
- right: auto;
96
- left: 100%;
97
- margin-right: 0;
98
- margin-left: 0.375rem;
99
- translate: -0.5rem;
201
+ &[data-align='end'] {
202
+ &::before,
203
+ & > [data-slot='content'] {
204
+ inset-block-end: 0;
205
+ }
206
+ }
207
+
208
+ &::after {
209
+ right: calc(100% + 1px);
210
+ inset-block-start: 50%;
211
+ translate: 0 -50%;
212
+ rotate: -90deg;
213
+ }
214
+
215
+ &[data-align='start']::after {
216
+ inset-block-start: calc(
217
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
218
+ );
219
+ inset-block-end: auto;
220
+ translate: 0;
221
+ }
222
+
223
+ &[data-align='end']::after {
224
+ inset-block-start: auto;
225
+ inset-block-end: calc(
226
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
227
+ );
228
+ translate: 0;
100
229
  }
101
230
  }
102
231
 
103
- &[data-side='inline-end'] {
104
- &::before {
232
+ &[data-side='right'] {
233
+ &::before,
234
+ & > [data-slot='content'] {
105
235
  left: 100%;
106
236
  margin-left: 0.375rem;
107
- translate: -0.5rem;
237
+ transform-origin: left;
108
238
  }
109
- }
110
239
 
111
- &[data-side='inline-end']:dir(rtl) {
112
- &::before {
113
- right: 100%;
114
- left: auto;
115
- margin-right: 0.375rem;
116
- margin-left: 0;
117
- translate: 0.5rem;
240
+ &:not([data-align]),
241
+ &[data-align='center'] {
242
+ &::before,
243
+ & > [data-slot='content'] {
244
+ inset-block-start: 50%;
245
+ translate: 0 -50%;
246
+ }
118
247
  }
119
- }
120
248
 
121
- &[data-side='left'],
122
- &[data-side='right'],
123
- &[data-side='inline-start'],
124
- &[data-side='inline-end'] {
125
249
  &[data-align='start'] {
126
- &::before {
127
- top: 0;
250
+ &::before,
251
+ & > [data-slot='content'] {
252
+ inset-block-start: 0;
128
253
  }
129
254
  }
255
+
130
256
  &[data-align='end'] {
131
- &::before {
132
- bottom: 0;
257
+ &::before,
258
+ & > [data-slot='content'] {
259
+ inset-block-end: 0;
133
260
  }
134
261
  }
262
+
263
+ &::after {
264
+ left: calc(100% + 1px);
265
+ inset-block-start: 50%;
266
+ translate: 0 -50%;
267
+ rotate: 90deg;
268
+ }
269
+
270
+ &[data-align='start']::after {
271
+ inset-block-start: calc(
272
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
273
+ );
274
+ inset-block-end: auto;
275
+ translate: 0;
276
+ }
277
+
278
+ &[data-align='end']::after {
279
+ inset-block-start: auto;
280
+ inset-block-end: calc(
281
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
282
+ );
283
+ translate: 0;
284
+ }
285
+ }
286
+
287
+ &[data-side='inline-start'] {
288
+ &::before,
289
+ & > [data-slot='content'] {
290
+ inset-inline-end: 100%;
291
+ margin-inline-end: 0.375rem;
292
+ transform-origin: right;
293
+ }
294
+
135
295
  &:not([data-align]),
136
296
  &[data-align='center'] {
137
- &::before {
138
- top: 50%;
297
+ &::before,
298
+ & > [data-slot='content'] {
299
+ inset-block-start: 50%;
139
300
  translate: 0 -50%;
140
301
  }
141
302
  }
142
- }
143
-
144
- &[data-arrow]::after {
145
- pointer-events: none;
146
- visibility: hidden;
147
- position: absolute;
148
- z-index: 60;
149
- width: 0.625rem;
150
- height: 0.625rem;
151
- rotate: 45deg;
152
- opacity: 0%;
153
- transition-property: opacity, visibility;
154
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
155
- transition-duration: 150ms;
156
- content: '';
157
- }
158
303
 
159
- &[data-arrow]:is(:hover, :focus-visible)::after {
160
- visibility: visible;
161
- opacity: 100%;
162
- }
304
+ &[data-align='start'] {
305
+ &::before,
306
+ & > [data-slot='content'] {
307
+ inset-block-start: 0;
308
+ }
309
+ }
163
310
 
164
- &:not([data-side]),
165
- &[data-side='top'] {
166
- &[data-arrow]::after {
167
- bottom: calc(100% + 0.375rem);
168
- translate: 0 50%;
311
+ &[data-align='end'] {
312
+ &::before,
313
+ & > [data-slot='content'] {
314
+ inset-block-end: 0;
315
+ }
169
316
  }
170
317
 
171
- &[data-arrow]:not([data-align])::after,
172
- &[data-arrow][data-align='center']::after {
173
- left: 50%;
174
- translate: -50% 50%;
318
+ &::after {
319
+ inset-inline-end: calc(100% + 1px);
320
+ inset-block-start: 50%;
321
+ translate: 0 -50%;
322
+ rotate: -90deg;
175
323
  }
176
324
 
177
- &[data-arrow][data-align='start']::after {
178
- left: 0.75rem;
325
+ &[data-align='start']::after {
326
+ inset-block-start: calc(
327
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
328
+ );
329
+ inset-block-end: auto;
330
+ translate: 0;
179
331
  }
180
332
 
181
- &[data-arrow][data-align='end']::after {
182
- right: 0.75rem;
333
+ &[data-align='end']::after {
334
+ inset-block-start: auto;
335
+ inset-block-end: calc(
336
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
337
+ );
338
+ translate: 0;
183
339
  }
184
340
  }
185
341
 
186
- &[data-side='bottom'] {
187
- &[data-arrow]::after {
188
- top: calc(100% + 0.375rem);
189
- translate: 0 -50%;
342
+ &[data-side='inline-start']:dir(rtl) {
343
+ &::before,
344
+ & > [data-slot='content'] {
345
+ transform-origin: left;
190
346
  }
191
347
 
192
- &[data-arrow]:not([data-align])::after,
193
- &[data-arrow][data-align='center']::after {
194
- left: 50%;
195
- translate: -50% -50%;
348
+ &::after {
349
+ rotate: 90deg;
196
350
  }
351
+ }
197
352
 
198
- &[data-arrow][data-align='start']::after {
199
- left: 0.75rem;
353
+ &[data-side='inline-end'] {
354
+ &::before,
355
+ & > [data-slot='content'] {
356
+ inset-inline-start: 100%;
357
+ margin-inline-start: 0.375rem;
358
+ transform-origin: left;
200
359
  }
201
360
 
202
- &[data-arrow][data-align='end']::after {
203
- right: 0.75rem;
361
+ &:not([data-align]),
362
+ &[data-align='center'] {
363
+ &::before,
364
+ & > [data-slot='content'] {
365
+ inset-block-start: 50%;
366
+ translate: 0 -50%;
367
+ }
204
368
  }
205
- }
206
369
 
207
- &[data-side='left'] {
208
- &[data-arrow]::after {
209
- right: calc(100% + 0.375rem);
210
- top: 50%;
211
- translate: 50% -50%;
370
+ &[data-align='start'] {
371
+ &::before,
372
+ & > [data-slot='content'] {
373
+ inset-block-start: 0;
374
+ }
212
375
  }
213
- }
214
376
 
215
- &[data-side='right'] {
216
- &[data-arrow]::after {
217
- left: calc(100% + 0.375rem);
218
- top: 50%;
219
- translate: -50% -50%;
377
+ &[data-align='end'] {
378
+ &::before,
379
+ & > [data-slot='content'] {
380
+ inset-block-end: 0;
381
+ }
220
382
  }
221
- }
222
383
 
223
- &[data-side='inline-start'] {
224
- &[data-arrow]::after {
225
- right: calc(100% + 0.375rem);
226
- top: 50%;
227
- translate: 50% -50%;
384
+ &::after {
385
+ inset-inline-start: calc(100% + 1px);
386
+ inset-block-start: 50%;
387
+ translate: 0 -50%;
388
+ rotate: 90deg;
228
389
  }
229
- }
230
390
 
231
- &[data-side='inline-start']:dir(rtl) {
232
- &[data-arrow]::after {
233
- right: auto;
234
- left: calc(100% + 0.375rem);
235
- translate: -50% -50%;
391
+ &[data-align='start']::after {
392
+ inset-block-start: calc(
393
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
394
+ );
395
+ inset-block-end: auto;
396
+ translate: 0;
236
397
  }
237
- }
238
398
 
239
- &[data-side='inline-end'] {
240
- &[data-arrow]::after {
241
- left: calc(100% + 0.375rem);
242
- top: 50%;
243
- translate: -50% -50%;
399
+ &[data-align='end']::after {
400
+ inset-block-start: auto;
401
+ inset-block-end: calc(
402
+ max(0.75rem, var(--tooltip-radius, 0px)) + 3px
403
+ );
404
+ translate: 0;
244
405
  }
245
406
  }
246
407
 
247
408
  &[data-side='inline-end']:dir(rtl) {
248
- &[data-arrow]::after {
249
- right: calc(100% + 0.375rem);
250
- left: auto;
251
- translate: 50% -50%;
409
+ &::before,
410
+ & > [data-slot='content'] {
411
+ transform-origin: right;
252
412
  }
413
+
414
+ &::after {
415
+ rotate: -90deg;
416
+ }
417
+ }
418
+ }
419
+
420
+ @media (forced-colors: active) {
421
+ .tooltip[data-tooltip]::before,
422
+ .tooltip > [data-slot='content'] {
423
+ outline: 1px solid;
424
+ }
425
+ }
426
+
427
+ @media (prefers-reduced-motion: reduce) {
428
+ .tooltip[data-tooltip]::before,
429
+ .tooltip > [data-slot='content'],
430
+ .tooltip::after {
431
+ transition-duration: 0s;
253
432
  }
254
433
  }
255
434
  }