plass-ui 0.0.1 → 1.0.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 (408) hide show
  1. package/dist/components/accordion/PlAccordion.d.ts +98 -0
  2. package/dist/components/accordion/PlAccordion.js +131 -0
  3. package/dist/components/accordion/index.d.ts +2 -0
  4. package/dist/components/accordion/index.js +1 -0
  5. package/dist/components/alert/PlAlert.d.ts +50 -0
  6. package/dist/components/alert/PlAlert.js +109 -0
  7. package/dist/components/alert/index.d.ts +2 -0
  8. package/dist/components/alert/index.js +1 -0
  9. package/dist/components/animate-appear/PlAnimateAppear.d.ts +55 -0
  10. package/dist/components/animate-appear/PlAnimateAppear.js +71 -0
  11. package/dist/components/animate-appear/index.d.ts +2 -0
  12. package/dist/components/animate-appear/index.js +1 -0
  13. package/dist/components/animate-blink/PlAnimateBlink.d.ts +30 -0
  14. package/dist/components/animate-blink/PlAnimateBlink.js +47 -0
  15. package/dist/components/animate-blink/index.d.ts +2 -0
  16. package/dist/components/animate-blink/index.js +1 -0
  17. package/dist/components/animate-fade/PlAnimateFade.d.ts +35 -0
  18. package/dist/components/animate-fade/PlAnimateFade.js +48 -0
  19. package/dist/components/animate-fade/index.d.ts +2 -0
  20. package/dist/components/animate-fade/index.js +1 -0
  21. package/dist/components/animate-grow/PlAnimateGrow.d.ts +45 -0
  22. package/dist/components/animate-grow/PlAnimateGrow.js +49 -0
  23. package/dist/components/animate-grow/index.d.ts +2 -0
  24. package/dist/components/animate-grow/index.js +1 -0
  25. package/dist/components/animate-headline/PlAnimateHeadline.d.ts +55 -0
  26. package/dist/components/animate-headline/PlAnimateHeadline.js +120 -0
  27. package/dist/components/animate-headline/index.d.ts +2 -0
  28. package/dist/components/animate-headline/index.js +1 -0
  29. package/dist/components/animate-lighting/PlAnimateLighting.d.ts +67 -0
  30. package/dist/components/animate-lighting/PlAnimateLighting.js +65 -0
  31. package/dist/components/animate-lighting/index.d.ts +2 -0
  32. package/dist/components/animate-lighting/index.js +1 -0
  33. package/dist/components/animate-marquee/PlAnimateMarquee.d.ts +65 -0
  34. package/dist/components/animate-marquee/PlAnimateMarquee.js +94 -0
  35. package/dist/components/animate-marquee/index.d.ts +2 -0
  36. package/dist/components/animate-marquee/index.js +1 -0
  37. package/dist/components/animate-rotate/PlAnimateRotate.d.ts +52 -0
  38. package/dist/components/animate-rotate/PlAnimateRotate.js +50 -0
  39. package/dist/components/animate-rotate/index.d.ts +2 -0
  40. package/dist/components/animate-rotate/index.js +1 -0
  41. package/dist/components/animate-slide/PlAnimateSlide.d.ts +47 -0
  42. package/dist/components/animate-slide/PlAnimateSlide.js +49 -0
  43. package/dist/components/animate-slide/index.d.ts +2 -0
  44. package/dist/components/animate-slide/index.js +1 -0
  45. package/dist/components/animate-typing/PlAnimateTyping.d.ts +56 -0
  46. package/dist/components/animate-typing/PlAnimateTyping.js +177 -0
  47. package/dist/components/animate-typing/index.d.ts +2 -0
  48. package/dist/components/animate-typing/index.js +1 -0
  49. package/dist/components/animate-zoom/PlAnimateZoom.d.ts +37 -0
  50. package/dist/components/animate-zoom/PlAnimateZoom.js +45 -0
  51. package/dist/components/animate-zoom/index.d.ts +2 -0
  52. package/dist/components/animate-zoom/index.js +1 -0
  53. package/dist/components/aspect-ratio/PlAspectRatio.d.ts +64 -0
  54. package/dist/components/aspect-ratio/PlAspectRatio.js +58 -0
  55. package/dist/components/aspect-ratio/index.d.ts +2 -0
  56. package/dist/components/aspect-ratio/index.js +1 -0
  57. package/dist/components/avatar/PlAvatar.d.ts +102 -0
  58. package/dist/components/avatar/PlAvatar.js +121 -0
  59. package/dist/components/avatar/index.d.ts +2 -0
  60. package/dist/components/avatar/index.js +1 -0
  61. package/dist/components/badge/PlBadge.d.ts +86 -0
  62. package/dist/components/badge/PlBadge.js +168 -0
  63. package/dist/components/badge/index.d.ts +2 -0
  64. package/dist/components/badge/index.js +1 -0
  65. package/dist/components/blockquote/PlBlockquote.d.ts +64 -0
  66. package/dist/components/blockquote/PlBlockquote.js +112 -0
  67. package/dist/components/blockquote/index.d.ts +2 -0
  68. package/dist/components/blockquote/index.js +1 -0
  69. package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +111 -0
  70. package/dist/components/bottom-navigation/PlBottomNavigation.js +141 -0
  71. package/dist/components/bottom-navigation/index.d.ts +2 -0
  72. package/dist/components/bottom-navigation/index.js +1 -0
  73. package/dist/components/box/PlBox.d.ts +50 -0
  74. package/dist/components/box/PlBox.js +46 -0
  75. package/dist/components/box/index.d.ts +2 -0
  76. package/dist/components/box/index.js +1 -0
  77. package/dist/components/breadcrumb/PlBreadcrumb.d.ts +138 -0
  78. package/dist/components/breadcrumb/PlBreadcrumb.js +201 -0
  79. package/dist/components/breadcrumb/index.d.ts +2 -0
  80. package/dist/components/breadcrumb/index.js +1 -0
  81. package/dist/components/button/{Button.d.ts → PlButton.d.ts} +3 -3
  82. package/dist/components/button/PlButton.js +196 -0
  83. package/dist/components/button/index.d.ts +2 -2
  84. package/dist/components/button/index.js +1 -1
  85. package/dist/components/button-group/PlButtonGroup.d.ts +32 -0
  86. package/dist/components/button-group/PlButtonGroup.js +64 -0
  87. package/dist/components/button-group/index.d.ts +2 -0
  88. package/dist/components/button-group/index.js +1 -0
  89. package/dist/components/card/PlCard.d.ts +81 -0
  90. package/dist/components/card/PlCard.js +102 -0
  91. package/dist/components/card/index.d.ts +2 -0
  92. package/dist/components/card/index.js +1 -0
  93. package/dist/components/carousel/PlCarousel.d.ts +78 -0
  94. package/dist/components/carousel/PlCarousel.js +177 -0
  95. package/dist/components/carousel/index.d.ts +2 -0
  96. package/dist/components/carousel/index.js +1 -0
  97. package/dist/components/chat-bubble/PlChatBubble.d.ts +127 -0
  98. package/dist/components/chat-bubble/PlChatBubble.js +206 -0
  99. package/dist/components/chat-bubble/index.d.ts +2 -0
  100. package/dist/components/chat-bubble/index.js +1 -0
  101. package/dist/components/checkbox/PlCheckbox.d.ts +39 -0
  102. package/dist/components/checkbox/PlCheckbox.js +100 -0
  103. package/dist/components/checkbox/index.d.ts +2 -0
  104. package/dist/components/checkbox/index.js +1 -0
  105. package/dist/components/chip/PlChip.d.ts +55 -0
  106. package/dist/components/chip/PlChip.js +144 -0
  107. package/dist/components/chip/index.d.ts +2 -0
  108. package/dist/components/chip/index.js +1 -0
  109. package/dist/components/collapsible/PlCollapsible.d.ts +84 -0
  110. package/dist/components/collapsible/PlCollapsible.js +65 -0
  111. package/dist/components/collapsible/index.d.ts +2 -0
  112. package/dist/components/collapsible/index.js +1 -0
  113. package/dist/components/combobox/PlCombobox.d.ts +140 -0
  114. package/dist/components/combobox/PlCombobox.js +199 -0
  115. package/dist/components/combobox/index.d.ts +2 -0
  116. package/dist/components/combobox/index.js +1 -0
  117. package/dist/components/container/PlContainer.d.ts +66 -0
  118. package/dist/components/container/PlContainer.js +47 -0
  119. package/dist/components/container/index.d.ts +2 -0
  120. package/dist/components/container/index.js +1 -0
  121. package/dist/components/date-picker/PlDatePicker.d.ts +73 -0
  122. package/dist/components/date-picker/PlDatePicker.js +87 -0
  123. package/dist/components/date-picker/index.d.ts +2 -0
  124. package/dist/components/date-picker/index.js +1 -0
  125. package/dist/components/date-range-picker/PlDateRangePicker.d.ts +91 -0
  126. package/dist/components/date-range-picker/PlDateRangePicker.js +152 -0
  127. package/dist/components/date-range-picker/index.d.ts +2 -0
  128. package/dist/components/date-range-picker/index.js +1 -0
  129. package/dist/components/date-time-picker/PlDateTimePicker.d.ts +74 -0
  130. package/dist/components/date-time-picker/PlDateTimePicker.js +106 -0
  131. package/dist/components/date-time-picker/index.d.ts +2 -0
  132. package/dist/components/date-time-picker/index.js +1 -0
  133. package/dist/components/divider/PlDivider.d.ts +73 -0
  134. package/dist/components/divider/PlDivider.js +107 -0
  135. package/dist/components/divider/index.d.ts +2 -0
  136. package/dist/components/divider/index.js +1 -0
  137. package/dist/components/drawer/PlDrawer.d.ts +144 -0
  138. package/dist/components/drawer/PlDrawer.js +190 -0
  139. package/dist/components/drawer/index.d.ts +2 -0
  140. package/dist/components/drawer/index.js +1 -0
  141. package/dist/components/file-picker/PlFilePicker.d.ts +105 -0
  142. package/dist/components/file-picker/PlFilePicker.js +274 -0
  143. package/dist/components/file-picker/index.d.ts +2 -0
  144. package/dist/components/file-picker/index.js +1 -0
  145. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +118 -0
  146. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +291 -0
  147. package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
  148. package/dist/components/floating-bottom-navigation/index.js +1 -0
  149. package/dist/components/grid/PlGrid.d.ts +67 -0
  150. package/dist/components/grid/PlGrid.js +51 -0
  151. package/dist/components/grid/PlGridItem.d.ts +50 -0
  152. package/dist/components/grid/PlGridItem.js +34 -0
  153. package/dist/components/grid/index.d.ts +4 -0
  154. package/dist/components/grid/index.js +2 -0
  155. package/dist/components/highlight/PlHighlight.d.ts +90 -0
  156. package/dist/components/highlight/PlHighlight.js +185 -0
  157. package/dist/components/highlight/index.d.ts +2 -0
  158. package/dist/components/highlight/index.js +1 -0
  159. package/dist/components/hot-keys/PlHotKeys.d.ts +93 -0
  160. package/dist/components/hot-keys/PlHotKeys.js +294 -0
  161. package/dist/components/hot-keys/index.d.ts +2 -0
  162. package/dist/components/hot-keys/index.js +1 -0
  163. package/dist/components/icon/PlIcon.d.ts +62 -0
  164. package/dist/components/icon/PlIcon.js +58 -0
  165. package/dist/components/icon/index.d.ts +2 -0
  166. package/dist/components/icon/index.js +1 -0
  167. package/dist/components/icon-button/PlIconButton.d.ts +39 -0
  168. package/dist/components/icon-button/PlIconButton.js +37 -0
  169. package/dist/components/icon-button/index.d.ts +2 -0
  170. package/dist/components/icon-button/index.js +1 -0
  171. package/dist/components/list/PlList.d.ts +82 -0
  172. package/dist/components/list/PlList.js +160 -0
  173. package/dist/components/list/index.d.ts +2 -0
  174. package/dist/components/list/index.js +1 -0
  175. package/dist/components/menu/PlMenu.d.ts +210 -0
  176. package/dist/components/menu/PlMenu.js +209 -0
  177. package/dist/components/menu/index.d.ts +2 -0
  178. package/dist/components/menu/index.js +1 -0
  179. package/dist/components/modal/PlModal.d.ts +112 -0
  180. package/dist/components/modal/PlModal.js +150 -0
  181. package/dist/components/modal/index.d.ts +2 -0
  182. package/dist/components/modal/index.js +1 -0
  183. package/dist/components/number-field/PlNumberField.d.ts +133 -0
  184. package/dist/components/number-field/PlNumberField.js +111 -0
  185. package/dist/components/number-field/index.d.ts +2 -0
  186. package/dist/components/number-field/index.js +1 -0
  187. package/dist/components/otp-field/PlOtpField.d.ts +82 -0
  188. package/dist/components/otp-field/PlOtpField.js +109 -0
  189. package/dist/components/otp-field/index.d.ts +2 -0
  190. package/dist/components/otp-field/index.js +1 -0
  191. package/dist/components/overlay/PlOverlay.d.ts +96 -0
  192. package/dist/components/overlay/PlOverlay.js +77 -0
  193. package/dist/components/overlay/index.d.ts +2 -0
  194. package/dist/components/overlay/index.js +1 -0
  195. package/dist/components/pagination/PlPagination.d.ts +88 -0
  196. package/dist/components/pagination/PlPagination.js +159 -0
  197. package/dist/components/pagination/index.d.ts +2 -0
  198. package/dist/components/pagination/index.js +1 -0
  199. package/dist/components/panes/PlPanes.d.ts +79 -0
  200. package/dist/components/panes/PlPanes.js +324 -0
  201. package/dist/components/panes/index.d.ts +2 -0
  202. package/dist/components/panes/index.js +1 -0
  203. package/dist/components/pill/PlPill.d.ts +81 -0
  204. package/dist/components/pill/PlPill.js +154 -0
  205. package/dist/components/pill/index.d.ts +2 -0
  206. package/dist/components/pill/index.js +1 -0
  207. package/dist/components/popover/PlPopover.d.ts +107 -0
  208. package/dist/components/popover/PlPopover.js +113 -0
  209. package/dist/components/popover/index.d.ts +2 -0
  210. package/dist/components/popover/index.js +1 -0
  211. package/dist/components/progress-box/PlProgressBox.d.ts +32 -0
  212. package/dist/components/progress-box/PlProgressBox.js +34 -0
  213. package/dist/components/progress-box/index.d.ts +2 -0
  214. package/dist/components/progress-box/index.js +1 -0
  215. package/dist/components/progress-circular/PlProgressCircular.d.ts +22 -0
  216. package/dist/components/progress-circular/PlProgressCircular.js +47 -0
  217. package/dist/components/progress-circular/index.d.ts +2 -0
  218. package/dist/components/progress-circular/index.js +1 -0
  219. package/dist/components/progress-linear/PlProgressLinear.d.ts +31 -0
  220. package/dist/components/progress-linear/PlProgressLinear.js +40 -0
  221. package/dist/components/progress-linear/index.d.ts +2 -0
  222. package/dist/components/progress-linear/index.js +1 -0
  223. package/dist/components/radio-group/PlRadioGroup.d.ts +54 -0
  224. package/dist/components/radio-group/PlRadioGroup.js +99 -0
  225. package/dist/components/radio-group/index.d.ts +2 -0
  226. package/dist/components/radio-group/index.js +1 -0
  227. package/dist/components/rating/PlRating.d.ts +90 -0
  228. package/dist/components/rating/PlRating.js +101 -0
  229. package/dist/components/rating/index.d.ts +2 -0
  230. package/dist/components/rating/index.js +1 -0
  231. package/dist/components/scroll-zone/PlScrollZone.d.ts +132 -0
  232. package/dist/components/scroll-zone/PlScrollZone.js +411 -0
  233. package/dist/components/scroll-zone/index.d.ts +2 -0
  234. package/dist/components/scroll-zone/index.js +1 -0
  235. package/dist/components/segmented-button/PlSegmentedButton.d.ts +79 -0
  236. package/dist/components/segmented-button/PlSegmentedButton.js +206 -0
  237. package/dist/components/segmented-button/index.d.ts +2 -0
  238. package/dist/components/segmented-button/index.js +1 -0
  239. package/dist/components/select/PlSelect.d.ts +77 -0
  240. package/dist/components/select/PlSelect.js +115 -0
  241. package/dist/components/select/index.d.ts +2 -0
  242. package/dist/components/select/index.js +1 -0
  243. package/dist/components/skeleton/PlSkeleton.d.ts +73 -0
  244. package/dist/components/skeleton/PlSkeleton.js +142 -0
  245. package/dist/components/skeleton/index.d.ts +2 -0
  246. package/dist/components/skeleton/index.js +1 -0
  247. package/dist/components/slider/PlSlider.d.ts +44 -0
  248. package/dist/components/slider/PlSlider.js +132 -0
  249. package/dist/components/slider/index.d.ts +2 -0
  250. package/dist/components/slider/index.js +1 -0
  251. package/dist/components/spoiler/PlSpoiler.d.ts +84 -0
  252. package/dist/components/spoiler/PlSpoiler.js +74 -0
  253. package/dist/components/spoiler/index.d.ts +2 -0
  254. package/dist/components/spoiler/index.js +1 -0
  255. package/dist/components/switch/PlSwitch.d.ts +42 -0
  256. package/dist/components/switch/PlSwitch.js +131 -0
  257. package/dist/components/switch/index.d.ts +2 -0
  258. package/dist/components/switch/index.js +1 -0
  259. package/dist/components/table/PlTable.d.ts +112 -0
  260. package/dist/components/table/PlTable.js +210 -0
  261. package/dist/components/table/index.d.ts +2 -0
  262. package/dist/components/table/index.js +1 -0
  263. package/dist/components/tabs/PlTabs.d.ts +94 -0
  264. package/dist/components/tabs/PlTabs.js +182 -0
  265. package/dist/components/tabs/index.d.ts +2 -0
  266. package/dist/components/tabs/index.js +1 -0
  267. package/dist/components/text-field/{TextField.d.ts → PlTextField.d.ts} +5 -5
  268. package/dist/components/text-field/PlTextField.js +126 -0
  269. package/dist/components/text-field/index.d.ts +2 -2
  270. package/dist/components/text-field/index.js +1 -1
  271. package/dist/components/text-link/PlTextLink.d.ts +80 -0
  272. package/dist/components/text-link/PlTextLink.js +136 -0
  273. package/dist/components/text-link/index.d.ts +2 -0
  274. package/dist/components/text-link/index.js +1 -0
  275. package/dist/components/time-picker/PlTimePicker.d.ts +88 -0
  276. package/dist/components/time-picker/PlTimePicker.js +97 -0
  277. package/dist/components/time-picker/index.d.ts +2 -0
  278. package/dist/components/time-picker/index.js +1 -0
  279. package/dist/components/timeline/PlTimeline.d.ts +98 -0
  280. package/dist/components/timeline/PlTimeline.js +207 -0
  281. package/dist/components/timeline/index.d.ts +2 -0
  282. package/dist/components/timeline/index.js +1 -0
  283. package/dist/components/toast/PlToast.d.ts +122 -0
  284. package/dist/components/toast/PlToast.js +174 -0
  285. package/dist/components/toast/index.d.ts +2 -0
  286. package/dist/components/toast/index.js +1 -0
  287. package/dist/components/toolbar/PlToolbar.d.ts +68 -0
  288. package/dist/components/toolbar/PlToolbar.js +65 -0
  289. package/dist/components/toolbar/index.d.ts +2 -0
  290. package/dist/components/toolbar/index.js +1 -0
  291. package/dist/components/tooltip/PlTooltip.d.ts +92 -0
  292. package/dist/components/tooltip/PlTooltip.js +117 -0
  293. package/dist/components/tooltip/index.d.ts +2 -0
  294. package/dist/components/tooltip/index.js +1 -0
  295. package/dist/components/typography/PlTypography.d.ts +66 -0
  296. package/dist/components/typography/PlTypography.js +143 -0
  297. package/dist/components/typography/index.d.ts +2 -0
  298. package/dist/components/typography/index.js +1 -0
  299. package/dist/css/accordion.css +2 -0
  300. package/dist/css/alert.css +2 -0
  301. package/dist/css/animate-appear.css +2 -0
  302. package/dist/css/animate-blink.css +2 -0
  303. package/dist/css/animate-fade.css +2 -0
  304. package/dist/css/animate-grow.css +2 -0
  305. package/dist/css/animate-headline.css +2 -0
  306. package/dist/css/animate-lighting.css +2 -0
  307. package/dist/css/animate-marquee.css +2 -0
  308. package/dist/css/animate-rotate.css +2 -0
  309. package/dist/css/animate-slide.css +2 -0
  310. package/dist/css/animate-typing.css +2 -0
  311. package/dist/css/animate-zoom.css +2 -0
  312. package/dist/css/aspect-ratio.css +2 -0
  313. package/dist/css/avatar.css +2 -0
  314. package/dist/css/badge.css +2 -0
  315. package/dist/css/base.css +4 -0
  316. package/dist/css/blockquote.css +2 -0
  317. package/dist/css/bottom-navigation.css +2 -0
  318. package/dist/css/box.css +2 -0
  319. package/dist/css/breadcrumb.css +2 -0
  320. package/dist/css/button-group.css +2 -0
  321. package/dist/css/button.css +2 -0
  322. package/dist/css/card.css +2 -0
  323. package/dist/css/carousel.css +2 -0
  324. package/dist/css/chat-bubble.css +2 -0
  325. package/dist/css/checkbox.css +2 -0
  326. package/dist/css/chip.css +2 -0
  327. package/dist/css/collapsible.css +2 -0
  328. package/dist/css/combobox.css +2 -0
  329. package/dist/css/container.css +2 -0
  330. package/dist/css/date-picker.css +2 -0
  331. package/dist/css/date-range-picker.css +2 -0
  332. package/dist/css/date-time-picker.css +2 -0
  333. package/dist/css/divider.css +2 -0
  334. package/dist/css/drawer.css +2 -0
  335. package/dist/css/file-picker.css +2 -0
  336. package/dist/css/floating-bottom-navigation.css +2 -0
  337. package/dist/css/grid.css +2 -0
  338. package/dist/css/highlight.css +2 -0
  339. package/dist/css/hot-keys.css +2 -0
  340. package/dist/css/icon-button.css +2 -0
  341. package/dist/css/icon.css +2 -0
  342. package/dist/css/list.css +2 -0
  343. package/dist/css/menu.css +2 -0
  344. package/dist/css/modal.css +2 -0
  345. package/dist/css/number-field.css +2 -0
  346. package/dist/css/otp-field.css +2 -0
  347. package/dist/css/overlay.css +2 -0
  348. package/dist/css/pagination.css +2 -0
  349. package/dist/css/panes.css +2 -0
  350. package/dist/css/pill.css +2 -0
  351. package/dist/css/popover.css +2 -0
  352. package/dist/css/progress-box.css +2 -0
  353. package/dist/css/progress-circular.css +2 -0
  354. package/dist/css/progress-linear.css +2 -0
  355. package/dist/css/radio-group.css +2 -0
  356. package/dist/css/rating.css +2 -0
  357. package/dist/css/scroll-zone.css +2 -0
  358. package/dist/css/segmented-button.css +2 -0
  359. package/dist/css/select.css +2 -0
  360. package/dist/css/skeleton.css +2 -0
  361. package/dist/css/slider.css +2 -0
  362. package/dist/css/spoiler.css +2 -0
  363. package/dist/css/switch.css +2 -0
  364. package/dist/css/table.css +2 -0
  365. package/dist/css/tabs.css +2 -0
  366. package/dist/css/text-field.css +2 -0
  367. package/dist/css/text-link.css +2 -0
  368. package/dist/css/time-picker.css +2 -0
  369. package/dist/css/timeline.css +2 -0
  370. package/dist/css/toast.css +2 -0
  371. package/dist/css/toolbar.css +2 -0
  372. package/dist/css/tooltip.css +2 -0
  373. package/dist/css/typography.css +2 -0
  374. package/dist/index.d.ts +75 -3
  375. package/dist/index.js +75 -1
  376. package/dist/internal/animate.d.ts +161 -0
  377. package/dist/internal/animate.js +318 -0
  378. package/dist/internal/button-group.d.ts +27 -0
  379. package/dist/internal/button-group.js +19 -0
  380. package/dist/internal/calendar.d.ts +148 -0
  381. package/dist/internal/calendar.js +501 -0
  382. package/dist/internal/date.d.ts +173 -0
  383. package/dist/internal/date.js +353 -0
  384. package/dist/internal/format.d.ts +24 -0
  385. package/dist/internal/format.js +41 -0
  386. package/dist/internal/grid.d.ts +67 -0
  387. package/dist/internal/grid.js +143 -0
  388. package/dist/internal/icons.d.ts +86 -1
  389. package/dist/internal/icons.js +138 -1
  390. package/dist/internal/menu.d.ts +20 -0
  391. package/dist/internal/menu.js +18 -0
  392. package/dist/internal/picker.d.ts +118 -0
  393. package/dist/internal/picker.js +139 -0
  394. package/dist/internal/progress.d.ts +145 -0
  395. package/dist/internal/progress.js +167 -0
  396. package/dist/internal/sizer.d.ts +32 -0
  397. package/dist/internal/sizer.js +35 -0
  398. package/dist/internal/styles.d.ts +198 -8
  399. package/dist/internal/styles.js +636 -1
  400. package/dist/styles.css +1 -1
  401. package/dist/tailwind.css +899 -125
  402. package/dist/tokens.css +1275 -0
  403. package/dist/types.d.ts +150 -8
  404. package/dist/types.js +1 -1
  405. package/package.json +31 -27
  406. package/README.md +0 -111
  407. package/dist/components/button/Button.js +0 -1
  408. package/dist/components/text-field/TextField.js +0 -1
@@ -0,0 +1,1275 @@
1
+ /**
2
+ * Plass design tokens.
3
+ *
4
+ * This file ships as `plass-ui/tailwind.css`, for a project that runs Tailwind
5
+ * itself and wants the components' utilities generated in the same pass as its
6
+ * own:
7
+ *
8
+ * @import 'tailwindcss';
9
+ * @import 'plass-ui/tailwind.css';
10
+ *
11
+ * Two lines, and no `@source` of their own — the `@source` below does that job.
12
+ *
13
+ * A project with no Tailwind imports `plass-ui/styles.css` instead, which is this
14
+ * file plus a reset plus the compiled utilities, built by
15
+ * `scripts/build-styles.mjs` from `src/standalone.css`. The tokens below are
16
+ * the same in both.
17
+ *
18
+ * Components never hardcode a colour; they map a `color` prop onto the `--p-*`
19
+ * local slots and let the cascade resolve the rest.
20
+ *
21
+ * Dark mode responds to `prefers-color-scheme`, and can be forced either way
22
+ * with `.dark` / `[data-theme='dark'|'light']` on any ancestor.
23
+ *
24
+ * The surface model is **a key of tinted glass resting on a clear sheet**: a
25
+ * control is a smooth two-stop gradient with a drop shadow tinted by its own
26
+ * colour and a bloom of light that follows the pointer across it; everything
27
+ * that holds content is a translucent, heavily blurred sheet with a white
28
+ * hairline around it. Depth is carried by the gradient, not by a highlight.
29
+ */
30
+
31
+ /*
32
+ * The components' classes are Tailwind utilities, so Tailwind has to see the
33
+ * files that spell them out — otherwise every component renders unstyled.
34
+ *
35
+ * `@source` resolves relative to the file it is written in, not to whatever
36
+ * imported it. In a consumer's install that is `node_modules/plass-ui/dist/`, next
37
+ * to the compiled components; in this repository it is `src/`, next to the
38
+ * `.tsx`. One line covers both, and an explicitly registered source is scanned
39
+ * even inside `node_modules`, which automatic detection skips.
40
+ *
41
+ * This is why consumers do not need an `@source '../node_modules/plass-ui'` of
42
+ * their own — a path that would depend on where their CSS file happens to sit.
43
+ */
44
+ /* No `@source` here: this file is the tokens on their own.
45
+ * Register the components you import — `plass-ui/css/base.css` plus one
46
+ * `plass-ui/css/<component>.css` per component — or import
47
+ * `plass-ui/tailwind.css` instead, which scans all of them. */
48
+
49
+ /* ---------------------------------------------------------------------------
50
+ * The colour families
51
+ *
52
+ * These sit outside every theme block on purpose, and it is the one place Plass
53
+ * departs hardest from the libraries it was learned from: **a key's own colour
54
+ * does not change with the theme.** What changes is the sheet it rests on, the
55
+ * glass around it, and the `accent` — the one value that has to be *read* off a
56
+ * surface rather than looked at.
57
+ *
58
+ * Three values are hand-picked per family and everything else is derived with
59
+ * `color-mix()`, so **adding a colour family is two edits**: one entry in
60
+ * `PlassColor` and three lines here (plus its `accent` in each theme).
61
+ *
62
+ * `solid` and `solid-to` are the two ends of the gradient, at 135° — the
63
+ * top-left corner and the bottom-right one. They are a **hue sweep at one
64
+ * lightness**, not a shade: primary runs indigo to azure, danger vermilion to
65
+ * rose, success green to teal, info blue to cyan. Nothing gets lighter and
66
+ * nothing gets darker.
67
+ *
68
+ * That is the whole reason there is no highlight layer over the top of a
69
+ * control. A gradient that darkens toward one corner is a moulded object
70
+ * catching a lamp, and it needs a specular highlight to finish the illusion —
71
+ * which is what made every filled control read as lacquer. A gradient that
72
+ * *turns* is a piece of tinted glass, and it needs nothing else.
73
+ *
74
+ * Both ends clear 4.5:1 against their own `on-solid`, and they sit as close to
75
+ * that floor as the arithmetic allows: every one of them is within 0.15 of 4.5,
76
+ * because a family held further above the floor than it has to be is a family
77
+ * that is darker than it has to be. `warning` is the exception on both counts —
78
+ * its ink is dark, so it runs the other way and has room to spare.
79
+ * ------------------------------------------------------------------------- */
80
+
81
+ :root {
82
+ --plass-primary-solid: #3f63f2;
83
+ --plass-primary-solid-to: #1b78cb;
84
+ --plass-primary-on-solid: #ffffff;
85
+
86
+ --plass-secondary-solid: #6b7488;
87
+ --plass-secondary-solid-to: #59637a;
88
+ --plass-secondary-on-solid: #ffffff;
89
+
90
+ --plass-success-solid: #1b8649;
91
+ --plass-success-solid-to: #12866a;
92
+ --plass-success-on-solid: #ffffff;
93
+
94
+ /* The one family with dark ink, and the one whose sweep is a change of
95
+ lightness rather than of hue — amber has nowhere to turn that is still
96
+ amber. White on it does not reach 4.5:1 at any lightness worth the name,
97
+ and changing the ink is the right answer; distorting the family to preserve
98
+ a white label is not. */
99
+ --plass-warning-solid: #f0a63e;
100
+ --plass-warning-solid-to: #d98613;
101
+ --plass-warning-on-solid: #3b2405;
102
+
103
+ --plass-danger-solid: #d04246;
104
+ --plass-danger-solid-to: #d53c54;
105
+ --plass-danger-on-solid: #ffffff;
106
+
107
+ --plass-info-solid: #2379bd;
108
+ --plass-info-solid-to: #157aa9;
109
+ --plass-info-on-solid: #ffffff;
110
+ }
111
+
112
+ /* ---------------------------------------------------------------------------
113
+ * Light theme (default)
114
+ *
115
+ * `.light` and `[data-theme='light']` carry the same block rather than only
116
+ * `:root`, because forcing light has to work on a nested element too — a
117
+ * preview box inside a dark page has nowhere else to get these values from.
118
+ * Everything here that is not a colour (the radii, the motion) is identical in
119
+ * both themes, so re-declaring it costs a duplicate that resolves to what was
120
+ * inherited anyway.
121
+ * ------------------------------------------------------------------------- */
122
+
123
+ :root,
124
+ .light,
125
+ [data-theme='light'] {
126
+ /* Neutral surfaces and content */
127
+ --plass-surface: #ffffff;
128
+ --plass-fg: #1b1e27;
129
+ --plass-muted-fg: #5b6376;
130
+ --plass-border: #d5deef;
131
+
132
+ /* The page a Plass screen is laid on. Not used by any component — a library
133
+ has no business painting the body — but it is what the docs, the demos and
134
+ the focus ring's offset are drawn against, and it is the backdrop the glass
135
+ was tuned over. */
136
+ --plass-bg-from: #eef2fb;
137
+ --plass-bg-to: #dfe8f8;
138
+
139
+ /* Glass ---------------------------------------------------------------
140
+
141
+ Three strengths of one translucent sheet, and the ladder is **opacity
142
+ rather than lightness**: as a surface is engaged it holds more light,
143
+ instead of turning grey.
144
+
145
+ Undyed on purpose. A sheet holds other people's content, which arrives
146
+ with its own colours; tinting it puts every one of them on a background
147
+ they were not chosen against. The family shows up in the hairline, the
148
+ focus ring and the caret, and the glass stays clear. */
149
+ --plass-glass: rgb(255 255 255 / 0.62);
150
+ --plass-glass-hover: rgb(255 255 255 / 0.76);
151
+ --plass-glass-press: rgb(255 255 255 / 0.88);
152
+ --plass-glass-line: rgb(255 255 255 / 0.6);
153
+
154
+ /* The marks a sheet makes on *itself*, and the one place the glass ladder
155
+ above cannot be used.
156
+
157
+ `--plass-glass-line` is white light on a cut edge: it reads because the
158
+ pane behind it is the page wash. Turn it inward — a rule between two table
159
+ rows, a groove a switch runs in, a striped row — and it is white on white,
160
+ which is nothing at all. Every one of these is therefore a *neutral ink*
161
+ laid on the surface rather than more light: the same blue-grey the border
162
+ is, at the weight the job needs, and it reads on a white card and on the
163
+ wash alike.
164
+
165
+ `divider` rules one row off the next. `stripe` is the wash on every other
166
+ one. `track` is the groove a thumb runs along — a switch's, a slider's —
167
+ and it is the one of the three that has to be seen from across a room,
168
+ because a switch nobody can find in its off state is a switch that only
169
+ exists half the time. */
170
+ --plass-divider: rgb(20 40 90 / 0.1);
171
+ --plass-stripe: rgb(20 40 90 / 0.03);
172
+ --plass-track: rgb(20 40 90 / 0.14);
173
+
174
+ /* How hard the backdrop is blurred, and how much colour is pulled out of it.
175
+ 22px is a deliberate, generous smear: unlike a frosted-acrylic language,
176
+ Plass is not trying to let you read what is behind the sheet — it is trying
177
+ to make the sheet look thick. Below about 14px the glass reads as a flat
178
+ white box with an alpha on it. */
179
+ --plass-blur: blur(22px) saturate(160%);
180
+
181
+ /* The light lying along the top edge of a sheet. There is one of these and it
182
+ belongs to **glass only**: a pane has a real cut edge for light to catch.
183
+ A gradient key does not get one — a bright line across the top of a filled
184
+ control is the single thing that makes it read as moulded plastic, and the
185
+ gradient is already saying everything about the form that needs saying.
186
+ There is deliberately no dark bevel underneath either. */
187
+ --plass-gloss-glass: inset 0 1px 0 rgb(255 255 255 / 0.55);
188
+
189
+ /* A well cut into the glass — what a filled field is drawn as. The only
190
+ inset shadow in the library that goes *downward*. */
191
+ --plass-well: inset 0 1px 2px rgb(20 40 90 / 0.1);
192
+
193
+ /* The bloom that follows the pointer across a control, and the brighter flash
194
+ the moment it is pressed. These are the two colours `.plass-glow` reads on
195
+ a *filled* surface; a glass or a ghost control uses its own family tint
196
+ instead, because white light on a near-white sheet is invisible.
197
+
198
+ The flash is only a shade brighter than the bloom it replaces: the press is
199
+ carried by the whole control dimming, and this is the highlight riding on
200
+ top of it rather than the effect itself. */
201
+ --plass-glow-on-fill: rgb(255 255 255 / 0.18);
202
+ --plass-flash-on-fill: rgb(255 255 255 / 0.26);
203
+
204
+ /* Elevation, and how strongly a key's own colour bleeds into the shadow it
205
+ casts. The ambient is a blue-grey rather than black: a neutral shadow over
206
+ a blue-tinted page reads as dirt — and it is faint, because the tint below
207
+ is what a control's shadow is actually made of. */
208
+ --plass-shadow-ambient: rgb(20 40 90 / 0.1);
209
+ --plass-tint-strength: 35%;
210
+
211
+ /* The scrim behind a modal surface. */
212
+ --plass-scrim: rgb(16 24 40 / 0.4);
213
+
214
+ /* Corner radius: roughly 30% of the control height, and roughly constant in
215
+ feel across the ladder — a Plass corner is a moulded fillet, not a pill and
216
+ not a chamfer. */
217
+ --plass-radius-xs: 0.5rem;
218
+ --plass-radius-sm: 0.625rem;
219
+ --plass-radius-md: 0.75rem;
220
+ --plass-radius-lg: 0.875rem;
221
+ --plass-radius-xl: 1rem;
222
+
223
+ /* Motion. One duration, one curve, and the same both ways — a key going down
224
+ and a key coming back up are the same spring. */
225
+ --plass-ease: cubic-bezier(0.16, 0.9, 0.3, 1);
226
+ --plass-duration: 150ms;
227
+ --plass-duration-slow: 260ms;
228
+
229
+ /* Readable on a surface. This is the one family value that is per-theme,
230
+ because it is the one that has to be read rather than looked at. */
231
+ --plass-primary-accent: #2c49d6;
232
+ --plass-secondary-accent: #46506a;
233
+ --plass-success-accent: #146b41;
234
+ --plass-warning-accent: #96600c;
235
+ --plass-danger-accent: #bb3339;
236
+ --plass-info-accent: #1668ae;
237
+ }
238
+
239
+ /* ---------------------------------------------------------------------------
240
+ * Dark theme
241
+ *
242
+ * The fills do not move — see the note above the families. What moves is the
243
+ * ground under them: the glass loses its white and becomes a smoked pane, the
244
+ * shadow goes black and deepens, and the accents lighten far enough to be read
245
+ * off the dark sheet.
246
+ * ------------------------------------------------------------------------- */
247
+
248
+ @media (prefers-color-scheme: dark) {
249
+ :root:not(.light):not([data-theme='light']) {
250
+ --plass-surface: #141b30;
251
+ --plass-fg: #e7eaf3;
252
+ --plass-muted-fg: #99a2ba;
253
+ --plass-border: rgb(255 255 255 / 0.12);
254
+
255
+ --plass-bg-from: #111731;
256
+ --plass-bg-to: #0a0e1c;
257
+
258
+ --plass-glass: rgb(255 255 255 / 0.07);
259
+ --plass-glass-hover: rgb(255 255 255 / 0.11);
260
+ --plass-glass-press: rgb(255 255 255 / 0.15);
261
+ --plass-glass-line: rgb(255 255 255 / 0.12);
262
+
263
+ --plass-divider: rgb(255 255 255 / 0.1);
264
+ --plass-stripe: rgb(255 255 255 / 0.035);
265
+ --plass-track: rgb(255 255 255 / 0.16);
266
+
267
+ --plass-blur: blur(22px) saturate(150%);
268
+
269
+ --plass-gloss-glass: inset 0 1px 0 rgb(255 255 255 / 0.1);
270
+
271
+ --plass-well: inset 0 1px 2px rgb(0 0 0 / 0.45);
272
+
273
+ --plass-glow-on-fill: rgb(255 255 255 / 0.15);
274
+ --plass-flash-on-fill: rgb(255 255 255 / 0.22);
275
+
276
+ /* A tinted shadow has almost nothing to sit on over a near-black page, so
277
+ the tint is turned up rather than the shadow being made bigger. */
278
+ --plass-shadow-ambient: rgb(0 0 0 / 0.42);
279
+ --plass-tint-strength: 55%;
280
+
281
+ --plass-scrim: rgb(0 0 0 / 0.6);
282
+
283
+ --plass-primary-accent: #93a8ff;
284
+ --plass-secondary-accent: #aab3c6;
285
+ --plass-success-accent: #4fd08d;
286
+ --plass-warning-accent: #f2b74e;
287
+ --plass-danger-accent: #ff8a8f;
288
+ --plass-info-accent: #5fb4ee;
289
+ }
290
+ }
291
+
292
+ .dark,
293
+ [data-theme='dark'] {
294
+ --plass-surface: #141b30;
295
+ --plass-fg: #e7eaf3;
296
+ --plass-muted-fg: #99a2ba;
297
+ --plass-border: rgb(255 255 255 / 0.12);
298
+
299
+ --plass-bg-from: #111731;
300
+ --plass-bg-to: #0a0e1c;
301
+
302
+ --plass-glass: rgb(255 255 255 / 0.07);
303
+ --plass-glass-hover: rgb(255 255 255 / 0.11);
304
+ --plass-glass-press: rgb(255 255 255 / 0.15);
305
+ --plass-glass-line: rgb(255 255 255 / 0.12);
306
+
307
+ --plass-divider: rgb(255 255 255 / 0.1);
308
+ --plass-stripe: rgb(255 255 255 / 0.035);
309
+ --plass-track: rgb(255 255 255 / 0.16);
310
+
311
+ --plass-blur: blur(22px) saturate(150%);
312
+
313
+ --plass-gloss-glass: inset 0 1px 0 rgb(255 255 255 / 0.1);
314
+
315
+ --plass-well: inset 0 1px 2px rgb(0 0 0 / 0.45);
316
+
317
+ --plass-glow-on-fill: rgb(255 255 255 / 0.15);
318
+ --plass-flash-on-fill: rgb(255 255 255 / 0.22);
319
+
320
+ --plass-shadow-ambient: rgb(0 0 0 / 0.42);
321
+ --plass-tint-strength: 55%;
322
+
323
+ --plass-scrim: rgb(0 0 0 / 0.6);
324
+
325
+ --plass-primary-accent: #93a8ff;
326
+ --plass-secondary-accent: #aab3c6;
327
+ --plass-success-accent: #4fd08d;
328
+ --plass-warning-accent: #f2b74e;
329
+ --plass-danger-accent: #ff8a8f;
330
+ --plass-info-accent: #5fb4ee;
331
+ }
332
+
333
+ /* ---------------------------------------------------------------------------
334
+ * Derived tokens
335
+ *
336
+ * Gradients, glows, tints, hairlines and focus rings are all one base colour at
337
+ * different strengths, so they are computed rather than hand-picked per theme.
338
+ *
339
+ * **This block is repeated for every theme root**, because a custom property
340
+ * resolves its `var()`s on the element that declares it — declaring these only
341
+ * on `:root` would freeze `--plass-*-tint` to the light theme's
342
+ * `--plass-tint-strength` inside a `.dark` subtree.
343
+ * ------------------------------------------------------------------------- */
344
+
345
+ :root,
346
+ .dark,
347
+ .light,
348
+ [data-theme='dark'],
349
+ [data-theme='light'] {
350
+ /* The elevation ladder. Neutral, wide and faint — it climbs by *blur* far
351
+ more than by offset, because a surface that moves 20px down the page when
352
+ it is raised has left the sheet, and everything in this library is still
353
+ sitting on one. A control's shadow is mostly the tint below rather than
354
+ this; what this adds is the small amount of grey that says the sheet is
355
+ above the page rather than printed on it. */
356
+ --plass-shadow-0: 0 0 #0000;
357
+ --plass-shadow-1: 0 4px 14px -3px var(--plass-shadow-ambient);
358
+ --plass-shadow-2: 0 8px 24px -5px var(--plass-shadow-ambient);
359
+ --plass-shadow-3: 0 14px 36px -9px var(--plass-shadow-ambient);
360
+ --plass-shadow-4: 0 22px 52px -13px var(--plass-shadow-ambient);
361
+
362
+ /* The fill: the family's two ends, swept across the control at 135deg.
363
+
364
+ Two stops and not three, and a *sweep* rather than a shade. Three stops
365
+ with a light one at the corner is how a moulded key is drawn, and a moulded
366
+ key was the wrong object — it needs a highlight over the top of it to
367
+ finish the illusion, and that highlight is what made every control look
368
+ lacquered. Two ends that turn in hue do the same work with none of the
369
+ shine, which is also the more modern of the two pictures.
370
+
371
+ 135deg is the one direction the whole library agrees on. */
372
+ --plass-primary-fill: linear-gradient(
373
+ 135deg,
374
+ var(--plass-primary-solid) 0%,
375
+ var(--plass-primary-solid-to) 100%
376
+ );
377
+ --plass-primary-tint: color-mix(
378
+ in srgb,
379
+ var(--plass-primary-solid) var(--plass-tint-strength),
380
+ transparent
381
+ );
382
+ --plass-primary-soft: color-mix(in srgb, var(--plass-primary-accent) 10%, transparent);
383
+ --plass-primary-soft-hover: color-mix(in srgb, var(--plass-primary-accent) 18%, transparent);
384
+ --plass-primary-soft-press: color-mix(in srgb, var(--plass-primary-accent) 26%, transparent);
385
+ --plass-primary-line: color-mix(in srgb, var(--plass-primary-accent) 30%, transparent);
386
+ --plass-primary-line-hover: color-mix(in srgb, var(--plass-primary-accent) 48%, transparent);
387
+ --plass-primary-ring: color-mix(in srgb, var(--plass-primary-solid) 55%, transparent);
388
+
389
+ --plass-secondary-fill: linear-gradient(
390
+ 135deg,
391
+ var(--plass-secondary-solid) 0%,
392
+ var(--plass-secondary-solid-to) 100%
393
+ );
394
+ --plass-secondary-tint: color-mix(
395
+ in srgb,
396
+ var(--plass-secondary-solid) var(--plass-tint-strength),
397
+ transparent
398
+ );
399
+ --plass-secondary-soft: color-mix(in srgb, var(--plass-secondary-accent) 10%, transparent);
400
+ --plass-secondary-soft-hover: color-mix(in srgb, var(--plass-secondary-accent) 18%, transparent);
401
+ --plass-secondary-soft-press: color-mix(in srgb, var(--plass-secondary-accent) 26%, transparent);
402
+ --plass-secondary-line: color-mix(in srgb, var(--plass-secondary-accent) 30%, transparent);
403
+ --plass-secondary-line-hover: color-mix(in srgb, var(--plass-secondary-accent) 48%, transparent);
404
+ --plass-secondary-ring: color-mix(in srgb, var(--plass-secondary-solid) 55%, transparent);
405
+
406
+ --plass-success-fill: linear-gradient(
407
+ 135deg,
408
+ var(--plass-success-solid) 0%,
409
+ var(--plass-success-solid-to) 100%
410
+ );
411
+ --plass-success-tint: color-mix(
412
+ in srgb,
413
+ var(--plass-success-solid) var(--plass-tint-strength),
414
+ transparent
415
+ );
416
+ --plass-success-soft: color-mix(in srgb, var(--plass-success-accent) 10%, transparent);
417
+ --plass-success-soft-hover: color-mix(in srgb, var(--plass-success-accent) 18%, transparent);
418
+ --plass-success-soft-press: color-mix(in srgb, var(--plass-success-accent) 26%, transparent);
419
+ --plass-success-line: color-mix(in srgb, var(--plass-success-accent) 30%, transparent);
420
+ --plass-success-line-hover: color-mix(in srgb, var(--plass-success-accent) 48%, transparent);
421
+ --plass-success-ring: color-mix(in srgb, var(--plass-success-solid) 55%, transparent);
422
+
423
+ --plass-warning-fill: linear-gradient(
424
+ 135deg,
425
+ var(--plass-warning-solid) 0%,
426
+ var(--plass-warning-solid-to) 100%
427
+ );
428
+ --plass-warning-tint: color-mix(
429
+ in srgb,
430
+ var(--plass-warning-solid) var(--plass-tint-strength),
431
+ transparent
432
+ );
433
+ --plass-warning-soft: color-mix(in srgb, var(--plass-warning-accent) 12%, transparent);
434
+ --plass-warning-soft-hover: color-mix(in srgb, var(--plass-warning-accent) 20%, transparent);
435
+ --plass-warning-soft-press: color-mix(in srgb, var(--plass-warning-accent) 28%, transparent);
436
+ --plass-warning-line: color-mix(in srgb, var(--plass-warning-accent) 34%, transparent);
437
+ --plass-warning-line-hover: color-mix(in srgb, var(--plass-warning-accent) 52%, transparent);
438
+ --plass-warning-ring: color-mix(in srgb, var(--plass-warning-solid) 55%, transparent);
439
+
440
+ --plass-danger-fill: linear-gradient(
441
+ 135deg,
442
+ var(--plass-danger-solid) 0%,
443
+ var(--plass-danger-solid-to) 100%
444
+ );
445
+ --plass-danger-tint: color-mix(
446
+ in srgb,
447
+ var(--plass-danger-solid) var(--plass-tint-strength),
448
+ transparent
449
+ );
450
+ --plass-danger-soft: color-mix(in srgb, var(--plass-danger-accent) 10%, transparent);
451
+ --plass-danger-soft-hover: color-mix(in srgb, var(--plass-danger-accent) 18%, transparent);
452
+ --plass-danger-soft-press: color-mix(in srgb, var(--plass-danger-accent) 26%, transparent);
453
+ --plass-danger-line: color-mix(in srgb, var(--plass-danger-accent) 30%, transparent);
454
+ --plass-danger-line-hover: color-mix(in srgb, var(--plass-danger-accent) 48%, transparent);
455
+ --plass-danger-ring: color-mix(in srgb, var(--plass-danger-solid) 55%, transparent);
456
+
457
+ --plass-info-fill: linear-gradient(
458
+ 135deg,
459
+ var(--plass-info-solid) 0%,
460
+ var(--plass-info-solid-to) 100%
461
+ );
462
+ --plass-info-tint: color-mix(
463
+ in srgb,
464
+ var(--plass-info-solid) var(--plass-tint-strength),
465
+ transparent
466
+ );
467
+ --plass-info-soft: color-mix(in srgb, var(--plass-info-accent) 10%, transparent);
468
+ --plass-info-soft-hover: color-mix(in srgb, var(--plass-info-accent) 18%, transparent);
469
+ --plass-info-soft-press: color-mix(in srgb, var(--plass-info-accent) 26%, transparent);
470
+ --plass-info-line: color-mix(in srgb, var(--plass-info-accent) 30%, transparent);
471
+ --plass-info-line-hover: color-mix(in srgb, var(--plass-info-accent) 48%, transparent);
472
+ --plass-info-ring: color-mix(in srgb, var(--plass-info-solid) 55%, transparent);
473
+ }
474
+
475
+ /* ---------------------------------------------------------------------------
476
+ * Sheet titles
477
+ *
478
+ * A `title` is styled by the element the component renders around it, so a
479
+ * plain string needs nothing. But a sheet that belongs in the document outline
480
+ * has to be given a real heading, `title={<h2>…</h2>}`, and that heading
481
+ * arrives with the browser's own 1.5em bold and its margins, which would ignore
482
+ * the type scale just set.
483
+ *
484
+ * This is in CSS rather than in Tailwind because the selector is the point:
485
+ * `[&_:where(h1,h2,h3,h4,h5,h6)]:[font:inherit]` is expressible and nobody
486
+ * would want to read it twice.
487
+ * ------------------------------------------------------------------------- */
488
+
489
+ .plass-title :where(h1, h2, h3, h4, h5, h6) {
490
+ font: inherit;
491
+ margin: 0;
492
+ }
493
+
494
+ /* ---------------------------------------------------------------------------
495
+ * Links
496
+ *
497
+ * `<a>` is, with `<td>`, one of the two tags a host stylesheet still styles by
498
+ * name — `.prose a`, `.vp-doc a`, every CSS framework — and all of those are a
499
+ * class plus a type, which outranks a plain one-class utility. A PlTextLink
500
+ * that lost its line and its colour inside a `.prose` block would have lost the
501
+ * only two things it is.
502
+ *
503
+ * So the selector is doubled. `.plass-link.plass-link` is two classes and
504
+ * matches nothing extra, which puts these declarations above a host's `a` rule
505
+ * and still below anything a caller writes with two classes of their own. Only
506
+ * the invariants are here — the parts of a link that no prop changes. The
507
+ * colour and whether the line is drawn at all stay in the component, written
508
+ * through the same doubled class.
509
+ *
510
+ * The thickness has a `max()` floor because a hairline that lands between two
511
+ * device pixels is antialiased into a grey smudge: 0.055em is a real line from
512
+ * about 18px up, and 1px below that.
513
+ * ------------------------------------------------------------------------- */
514
+
515
+ .plass-link.plass-link {
516
+ font-weight: inherit;
517
+ text-decoration-thickness: max(1px, 0.055em);
518
+ text-underline-offset: 0.2em;
519
+ text-underline-position: from-font;
520
+ text-decoration-color: var(--p-underline);
521
+ }
522
+
523
+ .plass-link.plass-link:hover {
524
+ text-decoration-color: var(--p-underline-hover);
525
+ }
526
+
527
+ /* ---------------------------------------------------------------------------
528
+ * Interaction light
529
+ *
530
+ * Two stacked layers on an interactive surface, both reading `--p-mx`/`--p-my`
531
+ * — the pointer position, written straight to the element's inline style on
532
+ * `pointermove` — and both no-ops until those slots have colour in them.
533
+ *
534
+ * This is the one thing a conventional toolkit's controls do not do, and it is
535
+ * here because a surface made of glass should answer where it is being touched. It replaces
536
+ * a static specular highlight that used to sit over every filled control: a
537
+ * highlight that is always on is a claim about a lamp somewhere off-screen,
538
+ * and it read as lacquer. Light that arrives with the pointer is a claim about
539
+ * the pointer, which is true.
540
+ *
541
+ * It lives in CSS rather than in Tailwind arbitrary variants because the
542
+ * selectors are pseudo-elements carrying gradients: `[&::before]:[background:
543
+ * radial-gradient(...)]` is technically expressible and completely unreadable.
544
+ *
545
+ * Cost per hovered control: two composited layers and a gradient repaint of one
546
+ * small box, on frames the pointer already moved in. Nothing reflows, and React
547
+ * never re-renders — the component writes the two custom properties directly.
548
+ * ------------------------------------------------------------------------- */
549
+
550
+ .plass-glow::before,
551
+ .plass-glow::after {
552
+ content: '';
553
+ position: absolute;
554
+ inset: 0;
555
+ border-radius: inherit;
556
+ pointer-events: none;
557
+ opacity: 0;
558
+ }
559
+
560
+ /* The bloom trailing the pointer across the surface. */
561
+ .plass-glow::before {
562
+ background: radial-gradient(
563
+ 6rem circle at var(--p-mx, 50%) var(--p-my, 50%),
564
+ var(--p-glow, transparent),
565
+ transparent 70%
566
+ );
567
+ transition: opacity 240ms var(--plass-ease);
568
+ }
569
+
570
+ @media (hover: hover) {
571
+ .plass-glow:hover::before {
572
+ opacity: 1;
573
+ }
574
+ }
575
+
576
+ /*
577
+ * The press, and the release afterglow. The asymmetry is the whole trick: 0ms
578
+ * in, ~700ms out, so the flash lands on the frame of the press and is still
579
+ * visibly draining a beat after the finger lifts. No JavaScript, no ripple
580
+ * element, no timers.
581
+ *
582
+ * This layer is also what carries the effect on a touch screen, where there is
583
+ * no hover at all: `:active` holds for as long as the finger is down, and
584
+ * `pointermove` keeps writing the coordinates, so the light follows a finger
585
+ * dragged across the control.
586
+ */
587
+ .plass-glow::after {
588
+ background: radial-gradient(
589
+ 5rem circle at var(--p-mx, 50%) var(--p-my, 50%),
590
+ var(--p-flash, transparent),
591
+ transparent 72%
592
+ );
593
+ transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1);
594
+ }
595
+
596
+ .plass-glow:active::after {
597
+ opacity: 1;
598
+ transition-duration: 0ms;
599
+ }
600
+
601
+ /* ---------------------------------------------------------------------------
602
+ * The three dots in a bubble somebody is typing into
603
+ *
604
+ * Colour only. The dots never move, so a message being written does not bounce
605
+ * in a thread somebody else is reading — the same restraint every other
606
+ * indeterminate indicator here keeps, and the reason the spinner is the one
607
+ * thing in the library allowed to turn.
608
+ *
609
+ * `currentColor` throughout, because a bubble's ink is `--p-on-solid` on a
610
+ * filled surface and the page's own on the other two, and the dots have to be
611
+ * legible on both. The delay is carried per dot in `--p-i`.
612
+ * ------------------------------------------------------------------------- */
613
+
614
+ @keyframes plass-typing {
615
+ 0%,
616
+ 60%,
617
+ 100% {
618
+ background-color: color-mix(in oklab, currentColor 28%, transparent);
619
+ }
620
+ 30% {
621
+ background-color: currentColor;
622
+ }
623
+ }
624
+
625
+ .plass-typing-dot {
626
+ background-color: color-mix(in oklab, currentColor 28%, transparent);
627
+ animation: plass-typing 1.25s var(--plass-ease) infinite;
628
+ animation-delay: calc(var(--p-i, 0) * 160ms);
629
+ }
630
+
631
+ /* ---------------------------------------------------------------------------
632
+ * The three indeterminate indicators
633
+ *
634
+ * A determinate bar, ring or row of plates needs nothing here: it is a width, a
635
+ * dash offset and a set of opacities, all of which the component writes. This
636
+ * is the other case — something is happening and nobody knows how much of it is
637
+ * left — and an indicator that does not move while saying so is a decoration.
638
+ *
639
+ * They are in CSS rather than in Tailwind for the reason `.plass-glow` is: a
640
+ * keyframe is not a variant, so there is nothing to express one with.
641
+ *
642
+ * Two rules hold across all three. **Nothing changes the paint.** A Plass fill is a gradient and
643
+ * a gradient cannot be interpolated, so what moves is a length or an opacity and
644
+ * the fill itself is either there or not. And **the segment travels on
645
+ * `inset-inline-start`**, not on a `transform` — the same trade the skeleton's
646
+ * highlight makes, and for the same two reasons: it runs the other way under RTL
647
+ * without being told, and the layout pass it costs is confined to a box with
648
+ * nothing in it.
649
+ * ------------------------------------------------------------------------- */
650
+
651
+ @keyframes plass-progress-sweep {
652
+ from {
653
+ inset-inline-start: -45%;
654
+ }
655
+ to {
656
+ inset-inline-start: 100%;
657
+ }
658
+ }
659
+
660
+ .plass-progress-sweep {
661
+ position: absolute;
662
+ inset-block: 0;
663
+ inline-size: 45%;
664
+ animation: plass-progress-sweep 1.15s var(--plass-ease) infinite;
665
+ }
666
+
667
+ /* The one place the library turns something, and the exception is the same one
668
+ the spinner already has: an indeterminate indicator that holds still says the
669
+ opposite of what it is for. `rotate` rather than `transform`, so nothing else
670
+ on the element is overwritten. */
671
+ @keyframes plass-ring-spin {
672
+ to {
673
+ rotate: 360deg;
674
+ }
675
+ }
676
+
677
+ .plass-ring-spin {
678
+ transform-origin: center;
679
+ animation: plass-ring-spin 900ms linear infinite;
680
+ }
681
+
682
+ /*
683
+ * The plates light in sequence, each held back by its own index.
684
+ *
685
+ * The gradient is on the layer underneath at full strength the whole time and
686
+ * what cycles is its `opacity`, which is what lets a plate light *in* rather
687
+ * than snapping: `background-image` has no interpolation between a gradient and
688
+ * nothing. The plates never move — a row of them reads as a surface being
689
+ * written to rather than as something bouncing in the corner of a page somebody
690
+ * is reading.
691
+ */
692
+ @keyframes plass-plate-wave {
693
+ 0%,
694
+ 70%,
695
+ 100% {
696
+ opacity: 0;
697
+ }
698
+ 35% {
699
+ opacity: 1;
700
+ }
701
+ }
702
+
703
+ .plass-plate-wave {
704
+ animation: plass-plate-wave 1.2s var(--plass-ease) infinite;
705
+ animation-delay: calc(var(--p-i, 0) * 120ms);
706
+ }
707
+
708
+ /* The reduced-motion stand-in for the travelling segment: it stops travelling,
709
+ fills the groove, and breathes instead. */
710
+ @keyframes plass-progress-pulse {
711
+ 0%,
712
+ 100% {
713
+ opacity: 0.4;
714
+ }
715
+ 50% {
716
+ opacity: 1;
717
+ }
718
+ }
719
+
720
+ /* ---------------------------------------------------------------------------
721
+ * The travelling highlight on a placeholder
722
+ *
723
+ * `inset-inline-start` rather than a `transform`, which is the same trade the
724
+ * rest of the library makes and for the same two reasons: it runs the other way
725
+ * under RTL without being told, and the layout pass it costs is confined to a
726
+ * box with nothing in it.
727
+ *
728
+ * A pseudo-element rather than a child, so a `PlSkeleton` is one element per
729
+ * shape and a stack of ten lines is ten nodes rather than twenty. The gradient
730
+ * is symmetric, so it needs no direction of its own.
731
+ *
732
+ * This is in CSS rather than in Tailwind for the reason `.plass-glow` is: a
733
+ * keyframe is not a Tailwind variant, so there is nothing to express one with.
734
+ * ------------------------------------------------------------------------- */
735
+
736
+ @keyframes plass-skeleton-sweep {
737
+ from {
738
+ inset-inline-start: -60%;
739
+ }
740
+ to {
741
+ inset-inline-start: 100%;
742
+ }
743
+ }
744
+
745
+ .plass-skeleton::after {
746
+ content: '';
747
+ position: absolute;
748
+ inset-block: 0;
749
+ inline-size: 60%;
750
+ background-image: linear-gradient(90deg, transparent, var(--p-soft-press), transparent);
751
+ animation: plass-skeleton-sweep 1.5s var(--plass-ease) infinite;
752
+ }
753
+
754
+ /* The reduced-motion stand-in: the highlight stops travelling and the whole
755
+ placeholder breathes instead. Colour, which is the axis every other state in
756
+ the library already uses. */
757
+ @keyframes plass-skeleton-pulse {
758
+ 0%,
759
+ 100% {
760
+ background-color: transparent;
761
+ }
762
+ 50% {
763
+ background-color: var(--p-soft-press);
764
+ }
765
+ }
766
+
767
+ /* ---------------------------------------------------------------------------
768
+ * The grid
769
+ *
770
+ * `PlGrid` is a flex row and `PlGridItem` is a width in it, which is the shape
771
+ * a twelve-column grid has had since long before CSS had one of its own — and
772
+ * still the only shape where an item can carry a start offset without an
773
+ * explicit line number, and where the row can be told to stop wrapping.
774
+ *
775
+ * This is real CSS rather than Tailwind for the reason the rest of this file
776
+ * is: `columns` is a number a caller picks and `span` changes at four widths,
777
+ * so the class name would have to be assembled at runtime — and a class name
778
+ * assembled at runtime is a class name Tailwind never sees. The per-instance
779
+ * numbers arrive as inline `--p-*` slots, exactly as colours do, and the
780
+ * arithmetic lives here once.
781
+ *
782
+ * `min(span, columns)` is the clamp: `span={99}` fills its row instead of
783
+ * overflowing the page, which is what the caller meant.
784
+ *
785
+ * Every slot cascades upward — each breakpoint falls back through the ones
786
+ * below it — so `span={{ md: 6 }}` sets one custom property and not five. The
787
+ * chains get long at `xl`; that is the cost of keeping the DOM lean, and it is
788
+ * paid once here rather than on every grid item in a consumer's app.
789
+ *
790
+ * The widths are Tailwind's own breakpoints, so a Plass grid and an `md:`
791
+ * utility change at the same moment.
792
+ * ------------------------------------------------------------------------- */
793
+
794
+ .plass-grid {
795
+ --p-cols: var(--p-cols-xs, 12);
796
+ --p-gap-x: var(--p-gap-x-xs, 0px);
797
+ --p-gap-y: var(--p-gap-y-xs, 0px);
798
+ }
799
+
800
+ .plass-grid-item {
801
+ --p-span: var(--p-span-xs, var(--p-cols, 12));
802
+ --p-offset: var(--p-offset-xs, 0);
803
+
804
+ /* One column plus one gutter. `--p-cols` and `--p-gap-x` are inherited from
805
+ the grid, so this re-resolves on its own at every breakpoint. */
806
+ --p-track: calc((100% + var(--p-gap-x, 0px)) / var(--p-cols, 12));
807
+
808
+ /* Inseparable from the width below them: `flex` stops the row from resizing
809
+ the item, `min-width` stops a long unbroken word from doing the same, and
810
+ `box-sizing` is what makes the percentage mean the whole item. */
811
+ box-sizing: border-box;
812
+ flex: 0 0 auto;
813
+ min-width: 0;
814
+ width: calc(var(--p-track) * min(var(--p-span), var(--p-cols, 12)) - var(--p-gap-x, 0px));
815
+ margin-inline-start: calc(var(--p-track) * min(var(--p-offset), var(--p-cols, 12)));
816
+ }
817
+
818
+ @media (width >= 40rem) {
819
+ .plass-grid {
820
+ --p-cols: var(--p-cols-sm, var(--p-cols-xs, 12));
821
+ --p-gap-x: var(--p-gap-x-sm, var(--p-gap-x-xs, 0px));
822
+ --p-gap-y: var(--p-gap-y-sm, var(--p-gap-y-xs, 0px));
823
+ }
824
+
825
+ .plass-grid-item {
826
+ --p-span: var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12)));
827
+ --p-offset: var(--p-offset-sm, var(--p-offset-xs, 0));
828
+ }
829
+ }
830
+
831
+ @media (width >= 48rem) {
832
+ .plass-grid {
833
+ --p-cols: var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12)));
834
+ --p-gap-x: var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px)));
835
+ --p-gap-y: var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px)));
836
+ }
837
+
838
+ .plass-grid-item {
839
+ --p-span: var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12))));
840
+ --p-offset: var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0)));
841
+ }
842
+ }
843
+
844
+ @media (width >= 64rem) {
845
+ .plass-grid {
846
+ --p-cols: var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))));
847
+ --p-gap-x: var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))));
848
+ --p-gap-y: var(--p-gap-y-lg, var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px))));
849
+ }
850
+
851
+ .plass-grid-item {
852
+ --p-span: var(
853
+ --p-span-lg,
854
+ var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12))))
855
+ );
856
+ --p-offset: var(--p-offset-lg, var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0))));
857
+ }
858
+ }
859
+
860
+ @media (width >= 80rem) {
861
+ .plass-grid {
862
+ --p-cols: var(
863
+ --p-cols-xl,
864
+ var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 12))))
865
+ );
866
+ --p-gap-x: var(
867
+ --p-gap-x-xl,
868
+ var(--p-gap-x-lg, var(--p-gap-x-md, var(--p-gap-x-sm, var(--p-gap-x-xs, 0px))))
869
+ );
870
+ --p-gap-y: var(
871
+ --p-gap-y-xl,
872
+ var(--p-gap-y-lg, var(--p-gap-y-md, var(--p-gap-y-sm, var(--p-gap-y-xs, 0px))))
873
+ );
874
+ }
875
+
876
+ .plass-grid-item {
877
+ --p-span: var(
878
+ --p-span-xl,
879
+ var(--p-span-lg, var(--p-span-md, var(--p-span-sm, var(--p-span-xs, var(--p-cols, 12)))))
880
+ );
881
+ --p-offset: var(
882
+ --p-offset-xl,
883
+ var(--p-offset-lg, var(--p-offset-md, var(--p-offset-sm, var(--p-offset-xs, 0))))
884
+ );
885
+ }
886
+ }
887
+
888
+ /* ---------------------------------------------------------------------------
889
+ * Motion
890
+ *
891
+ * The `PlAnimate*` components. Real CSS for the reason the loading indicators
892
+ * above are: a keyframe is not a Tailwind variant, so there is nothing to
893
+ * express one with.
894
+ *
895
+ * The whole set is built on one idea. An effect is a single `@keyframes` that
896
+ * runs from a state written entirely in `--p-anim-*` custom properties to the
897
+ * element's natural one — so `src/internal/animate.ts` never generates CSS, it
898
+ * only fills slots, and running an effect backwards is `animation-direction:
899
+ * reverse` rather than a second keyframe. That is what makes `mode="out"` cost
900
+ * nothing.
901
+ *
902
+ * `fill-mode` is `both` throughout, which is what lets an animation that has
903
+ * not been triggered yet sit paused on its own first frame. Without it, an
904
+ * element waiting to be scrolled into view would be fully drawn and then blink
905
+ * out the moment it arrived.
906
+ *
907
+ * This is also where the rule against transforms is at its narrowest. A
908
+ * *control* never moves — that rule is about a key resampling its label under
909
+ * the pointer, and it holds without exception. A `PlAnimate*` wraps content a
910
+ * caller asked to have moved, and it moves it with the independent `translate`,
911
+ * `scale` and `rotate` properties rather than the `transform` shorthand, so a
912
+ * caller's own transform on the same element survives.
913
+ * ------------------------------------------------------------------------- */
914
+
915
+ .plass-anim {
916
+ animation-duration: var(--p-anim-duration, 300ms);
917
+ animation-delay: var(--p-anim-delay, 0ms);
918
+ animation-timing-function: var(--p-anim-ease, var(--plass-ease));
919
+ animation-iteration-count: var(--p-anim-repeat, 1);
920
+ animation-direction: var(--p-anim-direction, normal);
921
+ animation-fill-mode: both;
922
+ animation-play-state: var(--p-anim-state, running);
923
+ }
924
+
925
+ @keyframes plass-anim-fade {
926
+ from {
927
+ opacity: var(--p-anim-opacity, 0);
928
+ }
929
+ to {
930
+ opacity: 1;
931
+ }
932
+ }
933
+
934
+ .plass-anim-fade {
935
+ animation-name: plass-anim-fade;
936
+ }
937
+
938
+ /* Grow and Zoom share this one: they are the same arithmetic at two strengths,
939
+ separated by their defaults and by their origin rather than by their maths. */
940
+ @keyframes plass-anim-scale {
941
+ from {
942
+ opacity: var(--p-anim-opacity, 0);
943
+ scale: var(--p-anim-scale, 0.8);
944
+ }
945
+ to {
946
+ opacity: 1;
947
+ scale: 1;
948
+ }
949
+ }
950
+
951
+ .plass-anim-scale {
952
+ animation-name: plass-anim-scale;
953
+ }
954
+
955
+ @keyframes plass-anim-slide {
956
+ from {
957
+ opacity: var(--p-anim-opacity, 0);
958
+ translate: var(--p-anim-x, 0px) var(--p-anim-y, 0px);
959
+ }
960
+ to {
961
+ opacity: 1;
962
+ translate: 0 0;
963
+ }
964
+ }
965
+
966
+ .plass-anim-slide {
967
+ animation-name: plass-anim-slide;
968
+ }
969
+
970
+ /* Two angles rather than one, so the same keyframe covers both the quarter turn
971
+ something arrives on and the endless one a badge spins through. */
972
+ @keyframes plass-anim-rotate {
973
+ from {
974
+ opacity: var(--p-anim-opacity, 0);
975
+ rotate: var(--p-anim-angle, -180deg);
976
+ }
977
+ to {
978
+ opacity: 1;
979
+ rotate: var(--p-anim-angle-to, 0deg);
980
+ }
981
+ }
982
+
983
+ .plass-anim-rotate {
984
+ animation-name: plass-anim-rotate;
985
+ }
986
+
987
+ /* Symmetric on purpose: a blink that ended anywhere but where it started would
988
+ leave the element half drawn whenever the count ran out. */
989
+ @keyframes plass-anim-blink {
990
+ 0%,
991
+ 100% {
992
+ opacity: 1;
993
+ }
994
+ 50% {
995
+ opacity: var(--p-anim-opacity, 0);
996
+ }
997
+ }
998
+
999
+ .plass-anim-blink {
1000
+ animation-name: plass-anim-blink;
1001
+ }
1002
+
1003
+ /*
1004
+ * The light travelling around the outside of something.
1005
+ *
1006
+ * What moves is the `from` angle of a conic gradient, which is only animatable
1007
+ * because the angle is a registered custom property with a type. The
1008
+ * alternative — rotating the pseudo-element itself — swings its corners out
1009
+ * past the element on every quarter turn.
1010
+ *
1011
+ * The arc **turns in hue along its length**, between the two ends of the family
1012
+ * at one lightness, exactly as a `solid` fill does. A flat arc would be the one
1013
+ * place in the library where a coloured surface is paint rather than glass.
1014
+ *
1015
+ * `z-index: -1` inside an isolated stacking context puts the light behind the
1016
+ * content but still inside the component, so it reads as a glow escaping from
1017
+ * under a sheet rather than as a border drawn around one.
1018
+ */
1019
+ @property --plass-glow-angle {
1020
+ syntax: '<angle>';
1021
+ initial-value: 0deg;
1022
+ inherits: false;
1023
+ }
1024
+
1025
+ @keyframes plass-anim-lighting {
1026
+ to {
1027
+ --plass-glow-angle: 360deg;
1028
+ }
1029
+ }
1030
+
1031
+ .plass-anim-lighting {
1032
+ position: relative;
1033
+ isolation: isolate;
1034
+ }
1035
+
1036
+ .plass-anim-lighting::before {
1037
+ content: '';
1038
+ position: absolute;
1039
+ z-index: -1;
1040
+ inset: calc(-1 * var(--p-anim-glow-width, 3px));
1041
+ border-radius: inherit;
1042
+ background: conic-gradient(
1043
+ from var(--plass-glow-angle),
1044
+ transparent 0deg,
1045
+ var(--p-anim-glow-from) calc(var(--p-anim-glow-arc, 50deg) * 0.5),
1046
+ var(--p-anim-glow-to) var(--p-anim-glow-arc, 50deg),
1047
+ transparent calc(var(--p-anim-glow-arc, 50deg) * 2),
1048
+ transparent 360deg
1049
+ );
1050
+ filter: blur(var(--p-anim-glow-blur, 5px));
1051
+ animation-name: plass-anim-lighting;
1052
+ animation-duration: var(--p-anim-duration, 3s);
1053
+ animation-delay: var(--p-anim-delay, 0ms);
1054
+ animation-timing-function: linear;
1055
+ animation-iteration-count: var(--p-anim-repeat, infinite);
1056
+ animation-direction: var(--p-anim-direction, normal);
1057
+ animation-fill-mode: both;
1058
+ animation-play-state: var(--p-anim-state, running);
1059
+ }
1060
+
1061
+ /*
1062
+ * Marquee: two identical copies, both moving by exactly one copy plus the gap.
1063
+ *
1064
+ * Which is the whole trick — when the first copy has travelled its own width,
1065
+ * the second is standing precisely where the first began, so there is no seam
1066
+ * and no frame where the strip is empty. A percentage `translate` resolves
1067
+ * against the element's own box, so neither copy has to be measured for this to
1068
+ * hold; measuring only ever decides how *fast* it goes.
1069
+ */
1070
+ @keyframes plass-anim-marquee-x {
1071
+ from {
1072
+ translate: 0 0;
1073
+ }
1074
+ to {
1075
+ translate: calc(-100% - var(--p-anim-gap, 0px)) 0;
1076
+ }
1077
+ }
1078
+
1079
+ @keyframes plass-anim-marquee-y {
1080
+ from {
1081
+ translate: 0 0;
1082
+ }
1083
+ to {
1084
+ translate: 0 calc(-100% - var(--p-anim-gap, 0px));
1085
+ }
1086
+ }
1087
+
1088
+ .plass-marquee {
1089
+ display: flex;
1090
+ overflow: hidden;
1091
+ gap: var(--p-anim-gap, 0px);
1092
+ }
1093
+
1094
+ .plass-marquee-vertical {
1095
+ flex-direction: column;
1096
+ }
1097
+
1098
+ .plass-marquee-track {
1099
+ display: flex;
1100
+ flex: 0 0 auto;
1101
+ align-items: center;
1102
+ gap: var(--p-anim-gap, 0px);
1103
+ animation-name: plass-anim-marquee-x;
1104
+ animation-duration: var(--p-anim-duration, 12s);
1105
+ animation-delay: var(--p-anim-delay, 0ms);
1106
+ /* Linear unless a caller insists otherwise. An eased marquee slows at both
1107
+ ends of a loop that has no ends, which reads as the page stuttering. */
1108
+ animation-timing-function: var(--p-anim-ease, linear);
1109
+ animation-iteration-count: var(--p-anim-repeat, infinite);
1110
+ animation-direction: var(--p-anim-direction, normal);
1111
+ animation-fill-mode: both;
1112
+ animation-play-state: var(--p-anim-state, running);
1113
+ }
1114
+
1115
+ .plass-marquee-vertical .plass-marquee-track {
1116
+ flex-direction: column;
1117
+ animation-name: plass-anim-marquee-y;
1118
+ }
1119
+
1120
+ .plass-marquee[data-pause-on-hover]:hover .plass-marquee-track {
1121
+ animation-play-state: paused;
1122
+ }
1123
+
1124
+ /*
1125
+ * Headline: one line replacing another from below.
1126
+ *
1127
+ * Every item is in the same grid cell, so the box is as tall as the tallest of
1128
+ * them and never resizes as the reel turns. The ones not on screen keep their
1129
+ * space with `visibility` rather than `display`, which is what makes that true.
1130
+ */
1131
+ @keyframes plass-anim-headline-in {
1132
+ from {
1133
+ translate: 0 var(--p-anim-rise, 100%);
1134
+ opacity: 0;
1135
+ }
1136
+ to {
1137
+ translate: 0 0;
1138
+ opacity: 1;
1139
+ }
1140
+ }
1141
+
1142
+ @keyframes plass-anim-headline-out {
1143
+ from {
1144
+ translate: 0 0;
1145
+ opacity: 1;
1146
+ }
1147
+ to {
1148
+ translate: 0 calc(-1 * var(--p-anim-rise, 100%));
1149
+ opacity: 0;
1150
+ }
1151
+ }
1152
+
1153
+ .plass-headline {
1154
+ display: grid;
1155
+ overflow: hidden;
1156
+ }
1157
+
1158
+ .plass-headline-item {
1159
+ grid-area: 1 / 1;
1160
+ visibility: hidden;
1161
+ animation-duration: var(--p-anim-duration, 460ms);
1162
+ animation-timing-function: var(--p-anim-ease, var(--plass-ease));
1163
+ animation-fill-mode: both;
1164
+ }
1165
+
1166
+ .plass-headline-item[data-state='active'] {
1167
+ visibility: visible;
1168
+ animation-name: plass-anim-headline-in;
1169
+ }
1170
+
1171
+ .plass-headline-item[data-state='leaving'] {
1172
+ visibility: visible;
1173
+ animation-name: plass-anim-headline-out;
1174
+ }
1175
+
1176
+ /* The block after a typewriter. `step-end` rather than a fade, because a caret
1177
+ that eases is a caret that looks like it is being rendered slowly.
1178
+
1179
+ `.plass-caret` and not `.plass-typing-*`, which is already taken by the three
1180
+ dots in a bubble somebody is writing into — two unrelated things, one of them
1181
+ a state and the other an effect. */
1182
+ @keyframes plass-anim-caret {
1183
+ 0%,
1184
+ 45% {
1185
+ opacity: 1;
1186
+ }
1187
+ 55%,
1188
+ 100% {
1189
+ opacity: 0;
1190
+ }
1191
+ }
1192
+
1193
+ .plass-caret {
1194
+ display: inline-block;
1195
+ animation: plass-anim-caret 1s step-end infinite;
1196
+ }
1197
+
1198
+ /* ---------------------------------------------------------------------------
1199
+ * Reduced motion
1200
+ *
1201
+ * Nothing in Plass animates on its own except a spinner, so this is about the
1202
+ * transitions: someone who has asked for less movement is asking for state
1203
+ * changes to *arrive*, not to be taken away. The colours still change; they
1204
+ * simply stop easing, and the light stops trailing the pointer across the
1205
+ * surface — it is either on the control or it is not.
1206
+ * ------------------------------------------------------------------------- */
1207
+
1208
+ @media (prefers-reduced-motion: reduce) {
1209
+ .plass-glow::before,
1210
+ .plass-glow::after {
1211
+ transition-duration: 1ms;
1212
+ }
1213
+
1214
+ /* The highlight stops travelling and the placeholder pulses in place. It is
1215
+ kept running rather than stopped, because a skeleton that holds still is
1216
+ indistinguishable from an empty box that finished loading with nothing in
1217
+ it. */
1218
+ .plass-skeleton::after {
1219
+ inset-inline-start: 0;
1220
+ inline-size: 100%;
1221
+ background-image: none;
1222
+ animation: plass-skeleton-pulse 2.4s var(--plass-ease) infinite;
1223
+ }
1224
+
1225
+ /* Slowed rather than stopped, for the same reason: the dots are what say
1226
+ somebody is still typing, and dots that hold still say the opposite. */
1227
+ .plass-typing-dot {
1228
+ animation-duration: 2.6s;
1229
+ }
1230
+
1231
+ /* The indicators are not switched off either, and for the same reason again:
1232
+ one that holds still says the opposite of what it is for. The travelling
1233
+ segment stops travelling, fills the groove and breathes instead, and the
1234
+ two that genuinely have to keep turning or cycling are slowed to where they
1235
+ stop reading as motion. */
1236
+ .plass-progress-sweep {
1237
+ inset-inline-start: 0;
1238
+ inline-size: 100%;
1239
+ animation: plass-progress-pulse 1.8s var(--plass-ease) infinite;
1240
+ }
1241
+
1242
+ .plass-ring-spin {
1243
+ animation-duration: 2.4s;
1244
+ }
1245
+
1246
+ .plass-plate-wave {
1247
+ animation-duration: 2.4s;
1248
+ }
1249
+
1250
+ /*
1251
+ * The `PlAnimate*` components go the other way from the indicators above, and
1252
+ * the difference is what each of them is saying. A spinner that stops is
1253
+ * lying about whether anything is happening; an entrance that does not play
1254
+ * has still delivered its content, which is the only thing it was ever
1255
+ * carrying.
1256
+ *
1257
+ * `animation: none` rather than a zero duration, because the shorthand also
1258
+ * clears `fill-mode` — and the fill is what was holding an untriggered
1259
+ * element on its own first frame at `opacity: 0`. Left in place, respecting a
1260
+ * reader's preference would blank the page.
1261
+ */
1262
+ .plass-anim,
1263
+ .plass-marquee-track,
1264
+ .plass-headline-item,
1265
+ .plass-caret {
1266
+ animation: none;
1267
+ }
1268
+
1269
+ /* The arc stops travelling and becomes an even glow. The same trade the
1270
+ skeleton makes: the decoration survives, the motion does not. */
1271
+ .plass-anim-lighting::before {
1272
+ background: var(--p-anim-glow-to);
1273
+ animation: none;
1274
+ }
1275
+ }