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,98 @@
1
+ import * as React from 'react';
2
+ import type { PlassElevation, PlassStyleProps } from '../../types.js';
3
+ export interface PlAccordionProps extends PlassStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'defaultValue' | 'onChange'> {
4
+ /**
5
+ * Drop shadow depth. `0` is the default — an accordion is part of the page it
6
+ * is set into, not a panel floating over it.
7
+ * @default 0
8
+ */
9
+ elevation?: PlassElevation;
10
+ /**
11
+ * Whether more than one section may be open at once.
12
+ *
13
+ * `false` by default, which is the whole reason an accordion is not just a
14
+ * stack of collapsibles: closing the last one as the next opens is what keeps
15
+ * the page from growing under the reader.
16
+ * @default false
17
+ */
18
+ multiple?: boolean;
19
+ /** Which sections are open. Use with `onValueChange` for a controlled accordion. */
20
+ value?: (string | number)[];
21
+ /** Which sections start open, for an uncontrolled one. */
22
+ defaultValue?: (string | number)[];
23
+ onValueChange?: (value: (string | number)[]) => void;
24
+ /**
25
+ * Scores the sheet between sections with a hairline instead of separating
26
+ * them with space.
27
+ *
28
+ * On by default: the rule is what says the folds are parts of one pane rather
29
+ * than a stack of unrelated tiles.
30
+ * @default true
31
+ */
32
+ dividers?: boolean;
33
+ /** Unavailable. Every section stops answering. */
34
+ disabled?: boolean;
35
+ /**
36
+ * Keeps closed panels in the DOM so the browser's own page search can find
37
+ * and open them. Overrides `keepMounted`.
38
+ * @default false
39
+ */
40
+ hiddenUntilFound?: boolean;
41
+ /**
42
+ * Keeps closed panels in the DOM. For content that is expensive to build, or
43
+ * that holds form state which should survive being folded away.
44
+ * @default false
45
+ */
46
+ keepMounted?: boolean;
47
+ children?: React.ReactNode;
48
+ }
49
+ export interface PlAccordionItemProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'title' | 'onChange'> {
50
+ /**
51
+ * Identifies the section to `value` / `defaultValue`. Base UI generates one
52
+ * when it is left out, which is enough for an accordion nobody drives from
53
+ * code.
54
+ */
55
+ value?: string | number;
56
+ /** The heading on the fold. */
57
+ title?: React.ReactNode;
58
+ /** A second line under the title, one step down the type scale and muted. */
59
+ subtitle?: React.ReactNode;
60
+ /** Content before the title — an icon, a status dot, a count. */
61
+ startIcon?: React.ReactNode;
62
+ /**
63
+ * A control pinned to the end of the header, before the chevron.
64
+ *
65
+ * Deliberately outside the trigger: a header that both folds and holds a
66
+ * switch has two things to press, and one of them cannot be nested inside the
67
+ * other — the browser rewrites a `<button>` inside a `<button>` on parse.
68
+ */
69
+ action?: React.ReactNode;
70
+ /** Unavailable. This section stops folding; the rest keep working. */
71
+ disabled?: boolean;
72
+ /** The body. */
73
+ children?: React.ReactNode;
74
+ }
75
+ /**
76
+ * A stack of sections, one of which is open.
77
+ *
78
+ * Base UI owns the parts that are genuinely hard: the `button` / `region`
79
+ * pairing and the `aria-controls` / `aria-expanded` wiring between them, the
80
+ * open set, and measuring the panel so it has a height to animate from.
81
+ *
82
+ * What is here is the sheet, the ladders and the one motion decision. The
83
+ * panel's height *is* animated, which looks like an exception to the rule
84
+ * against moving things and is not: nothing is transformed, no text is
85
+ * resampled, and the content does not shift relative to the panel it is in —
86
+ * the panel is a window opening onto it. An accordion whose sections appear
87
+ * instantly is a page that jumps, which is the failure the rule exists to
88
+ * prevent.
89
+ */
90
+ export declare const PlAccordion: React.ForwardRefExoticComponent<PlAccordionProps & React.RefAttributes<HTMLDivElement>>;
91
+ /**
92
+ * One section.
93
+ *
94
+ * The header is always a row; what is inside it is a real `<button>` covering
95
+ * the title and the chevron, with `action` sitting outside that button as a
96
+ * control of its own.
97
+ */
98
+ export declare const PlAccordionItem: React.ForwardRefExoticComponent<PlAccordionItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,131 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { Accordion as BaseUIAccordion } from '@base-ui/react/accordion';
4
+ import { ChevronIcon } from '../../internal/icons.js';
5
+ import { focusRingClasses, focusRingInsetClasses, gapClasses, hasContent, iconClasses, metaTextClasses, radiusClasses, sheetBodyClasses, sheetHeaderGapClasses, sheetPaddingXClasses, sheetPaddingYClasses, sheetRestClasses, sheetTitleClasses, surfaceSlots, transitionClasses } from '../../internal/styles.js';
6
+ const AccordionContext = /* @__PURE__ */ React.createContext({
7
+ size: 'md',
8
+ density: 'default',
9
+ dividers: true
10
+ });
11
+ /**
12
+ * A section sits one step down the radius ladder from the sheet it is inside,
13
+ * so a hovered header's corner is visibly inside the pane's own corner rather
14
+ * than fighting it.
15
+ */
16
+ const itemRadiusClasses = {
17
+ xs: radiusClasses.xs,
18
+ sm: radiusClasses.xs,
19
+ md: radiusClasses.sm,
20
+ lg: radiusClasses.sm,
21
+ xl: radiusClasses.md
22
+ };
23
+ /**
24
+ * The rule between two sections, written as `>div+div` rather than as a class
25
+ * on each item so it holds however the caller composed them — through a
26
+ * `.map()`, through fragments, through a component of their own that renders an
27
+ * item.
28
+ */
29
+ const dividerClasses = '[&>div+div]:border-t [&>div+div]:[border-color:var(--plass-divider)]';
30
+ /**
31
+ * The space between a header and the body it opened.
32
+ *
33
+ * The header's own padding does **not** pay for it, which is what this used to
34
+ * assume. An open header is a tinted band with its own bottom edge; the body
35
+ * begins at that edge, and the first line of text lands against it with only
36
+ * half a leading in between — the title and the paragraph explaining it read as
37
+ * one run of text broken by a colour change. What the header's padding buys is
38
+ * room around the *title*, and the body has to buy its own.
39
+ *
40
+ * It is a little under the padding below, because a paragraph's first line has
41
+ * the leading above it and its last has nothing under, so equal numbers on the
42
+ * two sides look bottom-heavy.
43
+ */
44
+ const panelPaddingTopClasses = {
45
+ default: { xs: 'pt-1.5', sm: 'pt-2', md: 'pt-3', lg: 'pt-3.5', xl: 'pt-4' },
46
+ compact: { xs: 'pt-1', sm: 'pt-1.5', md: 'pt-2', lg: 'pt-2.5', xl: 'pt-3' }
47
+ };
48
+ /** And the space under it, on the same two tracks. */
49
+ const panelPaddingBottomClasses = {
50
+ default: { xs: 'pb-2.5', sm: 'pb-3', md: 'pb-5', lg: 'pb-6', xl: 'pb-7' },
51
+ compact: { xs: 'pb-2', sm: 'pb-2.5', md: 'pb-3.5', lg: 'pb-4', xl: 'pb-5' }
52
+ };
53
+ /**
54
+ * A stack of sections, one of which is open.
55
+ *
56
+ * Base UI owns the parts that are genuinely hard: the `button` / `region`
57
+ * pairing and the `aria-controls` / `aria-expanded` wiring between them, the
58
+ * open set, and measuring the panel so it has a height to animate from.
59
+ *
60
+ * What is here is the sheet, the ladders and the one motion decision. The
61
+ * panel's height *is* animated, which looks like an exception to the rule
62
+ * against moving things and is not: nothing is transformed, no text is
63
+ * resampled, and the content does not shift relative to the panel it is in —
64
+ * the panel is a window opening onto it. An accordion whose sections appear
65
+ * instantly is a page that jumps, which is the failure the rule exists to
66
+ * prevent.
67
+ */
68
+ export const PlAccordion = /* @__PURE__ */ React.forwardRef(function PlAccordion({ variant = 'glass', size = 'md', color = 'primary', density = 'default', elevation = 0, multiple = false, value, defaultValue, onValueChange, dividers = true, disabled = false, hiddenUntilFound = false, keepMounted = false, className, style, children, ...props }, ref) {
69
+ const context = React.useMemo(() => ({ size, density, dividers }), [size, density, dividers]);
70
+ const classNames = [
71
+ 'flex flex-col',
72
+ radiusClasses[size],
73
+ sheetRestClasses[variant],
74
+ transitionClasses,
75
+ // Scored, the rules have to reach both edges, so the sheet keeps no padding
76
+ // of its own and the corners clip whatever runs into them. Unscored, the
77
+ // sections are tiles and the sheet keeps a hair of padding so a hovered
78
+ // header does not run into the edge.
79
+ dividers ? `overflow-hidden ${dividerClasses}` : 'p-1',
80
+ className ?? ''
81
+ ]
82
+ .filter(Boolean)
83
+ .join(' ');
84
+ return (_jsx(AccordionContext.Provider, { value: context, children: _jsx(BaseUIAccordion.Root, { ref: ref, multiple: multiple, value: value, defaultValue: defaultValue, onValueChange: (next) => onValueChange?.(next), disabled: disabled, hiddenUntilFound: hiddenUntilFound, keepMounted: keepMounted, className: classNames, style: { ...surfaceSlots(color, elevation), ...style }, ...props, children: children }) }));
85
+ });
86
+ /**
87
+ * One section.
88
+ *
89
+ * The header is always a row; what is inside it is a real `<button>` covering
90
+ * the title and the chevron, with `action` sitting outside that button as a
91
+ * control of its own.
92
+ */
93
+ export const PlAccordionItem = /* @__PURE__ */ React.forwardRef(function PlAccordionItem({ value, title, subtitle, startIcon, action, disabled = false, className, children, ...props }, ref) {
94
+ const { size, density, dividers } = React.useContext(AccordionContext);
95
+ const padX = sheetPaddingXClasses[density][size];
96
+ const padY = sheetPaddingYClasses[density][size];
97
+ return (_jsxs(BaseUIAccordion.Item, { ref: ref, value: value, disabled: disabled, className: ['flex flex-col', className ?? ''].filter(Boolean).join(' '), ...props, children: [_jsxs(BaseUIAccordion.Header, { className: "m-0 flex w-full items-center [font:inherit]", children: [_jsxs(BaseUIAccordion.Trigger, { className: [
98
+ 'flex min-w-0 flex-1 cursor-pointer items-center text-start',
99
+ padX,
100
+ padY,
101
+ gapClasses[size],
102
+ transitionClasses,
103
+ iconClasses,
104
+ // An outline on a clipped sheet would be cut off at the first and
105
+ // last section, so it is drawn inside the header instead. Two
106
+ // whole classes rather than one plus an override: a variant that
107
+ // only moves the offset resolves against the base by its position
108
+ // in the generated stylesheet, which is not something to bet a
109
+ // focus ring on.
110
+ dividers ? focusRingInsetClasses : `${focusRingClasses} ${itemRadiusClasses[size]}`,
111
+ 'hover:bg-(--p-soft)',
112
+ 'data-[panel-open]:bg-(--p-soft) data-[panel-open]:text-(--p-accent)',
113
+ 'disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50'
114
+ ]
115
+ .filter(Boolean)
116
+ .join(' '), children: [hasContent(startIcon) ? (_jsx("span", { className: "flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)", children: startIcon })) : null, _jsxs("span", { className: `flex min-w-0 flex-1 flex-col ${sheetHeaderGapClasses[size]}`, children: [hasContent(title) ? (_jsx("span", { className: `plass-title truncate font-semibold ${sheetTitleClasses[size]}`, children: title })) : null, hasContent(subtitle) ? (_jsx("span", { className: `truncate text-(--plass-muted-fg) ${metaTextClasses[size]}`, children: subtitle })) : null] }), _jsx("span", { className: [
117
+ 'flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)',
118
+ '[transition:rotate_var(--plass-duration)_var(--plass-ease)]',
119
+ 'data-[panel-open]:rotate-180'
120
+ ].join(' '), children: _jsx(ChevronIcon, {}) })] }), hasContent(action) ? (_jsx("span", { className: `flex shrink-0 items-center ${padX}`, children: action })) : null] }), _jsx(BaseUIAccordion.Panel, { className: [
121
+ 'h-(--accordion-panel-height) overflow-hidden',
122
+ '[transition:height_var(--plass-duration-slow)_var(--plass-ease)]',
123
+ 'data-[starting-style]:h-0 data-[ending-style]:h-0'
124
+ ].join(' '), children: _jsx("div", { className: [
125
+ 'text-(--plass-muted-fg)',
126
+ sheetBodyClasses[size],
127
+ padX,
128
+ panelPaddingTopClasses[density][size],
129
+ panelPaddingBottomClasses[density][size]
130
+ ].join(' '), children: children }) })] }));
131
+ });
@@ -0,0 +1,2 @@
1
+ export { PlAccordion, PlAccordionItem } from './PlAccordion.js';
2
+ export type { PlAccordionProps, PlAccordionItemProps } from './PlAccordion.js';
@@ -0,0 +1 @@
1
+ export { PlAccordion, PlAccordionItem } from './PlAccordion.js';
@@ -0,0 +1,50 @@
1
+ import * as React from 'react';
2
+ import type { PlassElevation, PlassStyleProps } from '../../types.js';
3
+ export interface PlAlertProps extends PlassStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'title'> {
4
+ /**
5
+ * Drop shadow depth. `0` is the default — an alert belongs to the flow of the
6
+ * page it interrupts. The one that floats above it is a dialog.
7
+ * @default 0
8
+ */
9
+ elevation?: PlassElevation;
10
+ /**
11
+ * The heading line. With it the alert is two-part — a headline and the detail
12
+ * under it; without it the whole thing is one line.
13
+ */
14
+ title?: React.ReactNode;
15
+ /**
16
+ * The glyph at the start. Defaults to the one that goes with `color`; pass
17
+ * `false` to drop it, or a node to replace it. A node is sized in `em`, so it
18
+ * tracks whichever line it sits on.
19
+ */
20
+ icon?: React.ReactNode | false;
21
+ /**
22
+ * Content pinned to the end of the row — a "Retry" button, a link. Kept out
23
+ * of `children` so it stays on the first line while the message wraps.
24
+ */
25
+ action?: React.ReactNode;
26
+ /** Passing it is what makes the dismiss button appear. */
27
+ onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
28
+ /**
29
+ * Accessible name of the dismiss button. Never drawn.
30
+ * @default 'Dismiss'
31
+ */
32
+ closeLabel?: string;
33
+ /** The message. */
34
+ children?: React.ReactNode;
35
+ }
36
+ /**
37
+ * A message about something that happened, set into the page it is about.
38
+ *
39
+ * The three shapes people mean by "an alert" are one component with different
40
+ * slots filled rather than three components: a bare line
41
+ * (`<PlAlert icon={false}>`), a line with a glyph (the default), and a glyph
42
+ * with a headline and the detail under it (`title` plus `children`). Nothing
43
+ * about the surface changes between them — only how much of it is used.
44
+ *
45
+ * There is no Base UI primitive under this, and there should not be: an alert
46
+ * has no interaction to delegate. It is a live region with a layout, and the
47
+ * only interactive parts it can grow — the action and the dismiss button — are
48
+ * real buttons that the caller either passes in or gets by passing `onClose`.
49
+ */
50
+ export declare const PlAlert: React.ForwardRefExoticComponent<PlAlertProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,109 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { CloseIcon, severityIcon } from '../../internal/icons.js';
4
+ import { controlSlots, focusRingClasses, glassClasses, hasContent, iconClasses, radiusClasses, sheetBodyClasses, sheetHeaderGapClasses, sheetPaddingXClasses, sheetPaddingYClasses, sheetSectionGapClasses, sheetTitleClasses, transitionClasses } from '../../internal/styles.js';
5
+ /**
6
+ * An alert **is** the thing being coloured — it is a notice about a severity,
7
+ * not a container holding someone else's content — so unlike a PlCard its sheet
8
+ * takes the tint. The same three materials they mean everywhere.
9
+ *
10
+ * `solid` carries no gloss line, exactly as a filled PlButton does not: the
11
+ * gradient is the form, and a white edge over the top of it reads as lacquer.
12
+ */
13
+ const restClasses = {
14
+ solid: /* @__PURE__ */ [
15
+ 'text-(--p-on-solid) [background-image:var(--p-fill)]',
16
+ '[box-shadow:var(--p-elev),var(--p-lift)]'
17
+ ].join(' '),
18
+ glass: /* @__PURE__ */ [
19
+ glassClasses,
20
+ 'border text-(--plass-fg) bg-(--plass-glass)',
21
+ '[border-color:var(--p-line)]',
22
+ '[box-shadow:var(--p-elev),var(--plass-gloss-glass)]'
23
+ ].join(' '),
24
+ // No sheet and no edge, only the tint. For an alert set among form fields,
25
+ // where a second bordered rectangle is one rectangle too many.
26
+ ghost: 'text-(--plass-fg) bg-(--p-soft)'
27
+ };
28
+ /**
29
+ * On `solid` the surface already carries the family, so the glyph and the title
30
+ * ride on it as one ink. On the other two the surface is only faintly tinted:
31
+ * the message has to stay ordinary reading text, and the accent is spent on the
32
+ * two things that say which kind of alert this is.
33
+ */
34
+ const accentClasses = {
35
+ solid: '',
36
+ glass: 'text-(--p-accent)',
37
+ ghost: 'text-(--p-accent)'
38
+ };
39
+ /**
40
+ * The detail line under a title.
41
+ *
42
+ * On a tinted surface it drops to the muted ink, the same step a field's
43
+ * description takes. On a filled one there is no muted ink to drop to — the
44
+ * page's grey is invisible on a gradient — so the ink stays and the title does
45
+ * the separating with its weight.
46
+ */
47
+ const detailClasses = {
48
+ solid: '',
49
+ glass: 'text-(--plass-muted-fg)',
50
+ ghost: 'text-(--plass-muted-fg)'
51
+ };
52
+ /**
53
+ * Which live region an alert belongs in.
54
+ *
55
+ * `alert` interrupts whatever a screen reader is in the middle of saying;
56
+ * `status` waits for a pause. "This failed" is worth interrupting for and
57
+ * "saved" is not, so the severity decides — and a caller who knows better still
58
+ * wins, because their props spread after this.
59
+ */
60
+ const rolesFor = {
61
+ primary: 'status',
62
+ secondary: 'status',
63
+ info: 'status',
64
+ success: 'status',
65
+ warning: 'alert',
66
+ danger: 'alert'
67
+ };
68
+ /**
69
+ * A message about something that happened, set into the page it is about.
70
+ *
71
+ * The three shapes people mean by "an alert" are one component with different
72
+ * slots filled rather than three components: a bare line
73
+ * (`<PlAlert icon={false}>`), a line with a glyph (the default), and a glyph
74
+ * with a headline and the detail under it (`title` plus `children`). Nothing
75
+ * about the surface changes between them — only how much of it is used.
76
+ *
77
+ * There is no Base UI primitive under this, and there should not be: an alert
78
+ * has no interaction to delegate. It is a live region with a layout, and the
79
+ * only interactive parts it can grow — the action and the dismiss button — are
80
+ * real buttons that the caller either passes in or gets by passing `onClose`.
81
+ */
82
+ export const PlAlert = /* @__PURE__ */ React.forwardRef(function PlAlert({ variant = 'glass', size = 'md',
83
+ // An alert with no severity named is an informational one. This is the one
84
+ // place `primary` would be a lie: it is not the primary anything, it is a
85
+ // note, and the palette already has the word for that.
86
+ color = 'info', density = 'default', elevation = 0, title, icon, action, onClose, closeLabel = 'Dismiss', className, style, children, ...props }, ref) {
87
+ const glyph = icon === undefined ? severityIcon(color) : icon;
88
+ const accent = accentClasses[variant];
89
+ const titled = hasContent(title);
90
+ return (_jsxs("div", { ref: ref, role: rolesFor[color], className: [
91
+ 'flex w-full items-start',
92
+ sheetPaddingXClasses[density][size],
93
+ sheetPaddingYClasses[density][size],
94
+ radiusClasses[size],
95
+ sheetSectionGapClasses[size],
96
+ sheetBodyClasses[size],
97
+ transitionClasses,
98
+ restClasses[variant],
99
+ iconClasses,
100
+ className ?? ''
101
+ ]
102
+ .filter(Boolean)
103
+ .join(' '), style: { ...controlSlots(color, elevation, variant), ...style }, ...props, children: [hasContent(glyph) ? (_jsx("span", { className: `flex h-[1lh] shrink-0 items-center ${accent}`, children: glyph })) : null, _jsxs("div", { className: `flex min-w-0 flex-1 flex-col ${sheetHeaderGapClasses[size]}`, children: [titled ? (_jsx("div", { className: `plass-title font-semibold ${sheetTitleClasses[size]} ${accent}`, children: title })) : null, hasContent(children) ? (_jsx("div", { className: titled ? detailClasses[variant] : undefined, children: children })) : null] }), hasContent(action) ? (_jsx("div", { className: "flex h-[1lh] shrink-0 items-center", children: action })) : null, onClose ? (_jsx("span", { className: "flex h-[1lh] shrink-0 items-center", children: _jsx("button", { type: "button", "aria-label": closeLabel, onClick: onClose, className: [
104
+ 'inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full',
105
+ 'opacity-70 [transition:opacity_var(--plass-duration)_var(--plass-ease)]',
106
+ 'hover:opacity-100 focus-visible:opacity-100',
107
+ focusRingClasses
108
+ ].join(' '), children: _jsx(CloseIcon, {}) }) })) : null] }));
109
+ });
@@ -0,0 +1,2 @@
1
+ export { PlAlert } from './PlAlert.js';
2
+ export type { PlAlertProps } from './PlAlert.js';
@@ -0,0 +1 @@
1
+ export { PlAlert } from './PlAlert.js';
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassAnimateProps, PlassSide } from '../../types.js';
4
+ export interface PlAnimateAppearProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * How long after one child the next one starts, in milliseconds. This is the
7
+ * whole effect — everything else is what a single child does.
8
+ * @default 70
9
+ */
10
+ stagger?: number;
11
+ /**
12
+ * Which edge each child drifts in from.
13
+ * @default 'bottom'
14
+ */
15
+ from?: PlassSide;
16
+ /**
17
+ * How far each child travels. Short on purpose: this is a settling, not an
18
+ * entrance from off screen, and a long travel over a list of eight turns the
19
+ * whole block into something moving.
20
+ * @default '0.75rem'
21
+ */
22
+ distance?: number | string;
23
+ /**
24
+ * Fades each child in as it settles.
25
+ * @default true
26
+ */
27
+ fade?: boolean;
28
+ /**
29
+ * Runs the list from the last child to the first.
30
+ * @default false
31
+ */
32
+ reverse?: boolean;
33
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
34
+ render?: useRender.RenderProp;
35
+ /** The things that appear, one after another. */
36
+ children?: React.ReactNode;
37
+ }
38
+ /**
39
+ * A list of things settling into place one after another.
40
+ *
41
+ * Each child takes the same short drift and fade, held back by its position — so
42
+ * the effect belongs to the *set* rather than to any one item, and a reader's
43
+ * eye is walked down the list in the order it should be read.
44
+ *
45
+ * The animation is written onto the children themselves rather than onto
46
+ * wrappers around them. A row of `<li>`s stays a row of `<li>`s, a grid's cells
47
+ * stay its direct children, and nothing about the layout changes because the
48
+ * list is being animated. Only a bare string has no element to write onto, so
49
+ * that one is wrapped in a `<span>`.
50
+ *
51
+ * The stagger is per *child*, which means what you pass matters: eight children
52
+ * are eight steps, and one child holding eight things is one step. That is also
53
+ * how to opt part of a list out — group it.
54
+ */
55
+ export declare const PlAnimateAppear: React.ForwardRefExoticComponent<PlAnimateAppearProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,71 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useRender } from '@base-ui/react/use-render';
4
+ import { animBaseClass, animationClasses, animationSlots, isInfinite, slideOffsets, useAnimationRun } from '../../internal/animate.js';
5
+ import { cx } from '../../internal/styles.js';
6
+ /**
7
+ * A list of things settling into place one after another.
8
+ *
9
+ * Each child takes the same short drift and fade, held back by its position — so
10
+ * the effect belongs to the *set* rather than to any one item, and a reader's
11
+ * eye is walked down the list in the order it should be read.
12
+ *
13
+ * The animation is written onto the children themselves rather than onto
14
+ * wrappers around them. A row of `<li>`s stays a row of `<li>`s, a grid's cells
15
+ * stay its direct children, and nothing about the layout changes because the
16
+ * list is being animated. Only a bare string has no element to write onto, so
17
+ * that one is wrapped in a `<span>`.
18
+ *
19
+ * The stagger is per *child*, which means what you pass matters: eight children
20
+ * are eight steps, and one child holding eight things is one step. That is also
21
+ * how to opt part of a list out — group it.
22
+ */
23
+ export const PlAnimateAppear = /* @__PURE__ */ React.forwardRef(function PlAnimateAppear({ duration = 380, delay = 0, easing, repeat = 1, alternate, paused, trigger = 'mount', play, once = true, threshold = 0.2, stagger = 70, from = 'bottom', distance = '0.75rem', fade = true, reverse = false, render, className, style, children, ...props }, ref) {
24
+ const run = useAnimationRun({
25
+ trigger,
26
+ play,
27
+ once,
28
+ threshold,
29
+ paused,
30
+ infinite: isInfinite(repeat)
31
+ });
32
+ const { x, y } = slideOffsets(from, distance);
33
+ const items = React.Children.toArray(children);
34
+ const itemClassName = `${animBaseClass} ${animationClasses.slide}`;
35
+ const animated = items.map((child, index) => {
36
+ const step = reverse ? items.length - 1 - index : index;
37
+ const slots = animationSlots({
38
+ duration,
39
+ delay: delay + step * stagger,
40
+ easing,
41
+ repeat,
42
+ alternate,
43
+ x,
44
+ y,
45
+ opacity: fade ? 0 : 1
46
+ });
47
+ if (!React.isValidElement(child)) {
48
+ return (_jsx("span", { className: itemClassName, style: slots, children: child }, index));
49
+ }
50
+ const childProps = child.props;
51
+ return React.cloneElement(child, {
52
+ className: cx(itemClassName, childProps.className),
53
+ style: { ...slots, ...childProps.style }
54
+ });
55
+ });
56
+ return useRender({
57
+ render,
58
+ ref: [ref, run.ref],
59
+ props: {
60
+ ...props,
61
+ className,
62
+ // Only the play state lives on the root. Every other slot is per child,
63
+ // because the delay is what the whole effect is made of.
64
+ style: { '--p-anim-state': run.state, ...style },
65
+ ...run.handlers,
66
+ 'data-plass-animation': 'appear',
67
+ 'data-state': run.state,
68
+ children: animated
69
+ }
70
+ });
71
+ });
@@ -0,0 +1,2 @@
1
+ export { PlAnimateAppear } from './PlAnimateAppear.js';
2
+ export type { PlAnimateAppearProps } from './PlAnimateAppear.js';
@@ -0,0 +1 @@
1
+ export { PlAnimateAppear } from './PlAnimateAppear.js';
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassAnimateProps } from '../../types.js';
4
+ export interface PlAnimateBlinkProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * How faint it gets at the bottom of the cycle, between `0` and `1`. Raise it
7
+ * for something that has to stay readable while it pulses.
8
+ * @default 0
9
+ */
10
+ min?: number;
11
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
12
+ render?: useRender.RenderProp;
13
+ children?: React.ReactNode;
14
+ }
15
+ /**
16
+ * Content pulsing between full opacity and a floor.
17
+ *
18
+ * The cycle is symmetric — full, faint, full — so however many times it runs it
19
+ * ends where it started. A blink that finished halfway would leave the element
20
+ * permanently half drawn, which reads as a rendering fault rather than as an
21
+ * effect that ended.
22
+ *
23
+ * It repeats forever unless told otherwise, because a single blink is a flicker
24
+ * and nobody asks for a flicker. Two things are worth saying about using it at
25
+ * all: something that never stops moving in the corner of a page being read is
26
+ * the one kind of motion this library otherwise refuses, and a reader with a
27
+ * reduced-motion preference will see none of it — so `min` is a dimming, never
28
+ * the only thing carrying the message. If it is urgent, say so in words too.
29
+ */
30
+ export declare const PlAnimateBlink: React.ForwardRefExoticComponent<PlAnimateBlinkProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,47 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import { isInfinite, useAnimateElement } from '../../internal/animate.js';
4
+ import { cx } from '../../internal/styles.js';
5
+ /**
6
+ * Content pulsing between full opacity and a floor.
7
+ *
8
+ * The cycle is symmetric — full, faint, full — so however many times it runs it
9
+ * ends where it started. A blink that finished halfway would leave the element
10
+ * permanently half drawn, which reads as a rendering fault rather than as an
11
+ * effect that ended.
12
+ *
13
+ * It repeats forever unless told otherwise, because a single blink is a flicker
14
+ * and nobody asks for a flicker. Two things are worth saying about using it at
15
+ * all: something that never stops moving in the corner of a page being read is
16
+ * the one kind of motion this library otherwise refuses, and a reader with a
17
+ * reduced-motion preference will see none of it — so `min` is a dimming, never
18
+ * the only thing carrying the message. If it is urgent, say so in words too.
19
+ */
20
+ export const PlAnimateBlink = /* @__PURE__ */ React.forwardRef(function PlAnimateBlink({ duration = 1000, delay = 0, easing, repeat = 'infinite', alternate, paused, trigger = 'mount', play, once = true, threshold = 0.2, min = 0, render, className, style, children, ...props }, ref) {
21
+ const animate = useAnimateElement({
22
+ effect: 'blink',
23
+ duration,
24
+ delay,
25
+ easing,
26
+ repeat,
27
+ alternate,
28
+ opacity: min,
29
+ trigger,
30
+ play,
31
+ once,
32
+ threshold,
33
+ paused,
34
+ infinite: isInfinite(repeat)
35
+ });
36
+ return useRender({
37
+ render,
38
+ ref: [ref, animate.ref],
39
+ props: {
40
+ ...props,
41
+ className: cx(animate.className, className),
42
+ style: { ...animate.style, ...style },
43
+ ...animate.props,
44
+ children
45
+ }
46
+ });
47
+ });
@@ -0,0 +1,2 @@
1
+ export { PlAnimateBlink } from './PlAnimateBlink.js';
2
+ export type { PlAnimateBlinkProps } from './PlAnimateBlink.js';
@@ -0,0 +1 @@
1
+ export { PlAnimateBlink } from './PlAnimateBlink.js';