plass-ui 1.2.0 → 1.4.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 (452) hide show
  1. package/CHANGELOG.md +668 -0
  2. package/README.md +1 -1
  3. package/dist/components/accordion/PlAccordion.js +1 -1
  4. package/dist/components/alert/PlAlert.js +1 -1
  5. package/dist/components/anchor/PlAnchor.d.ts +72 -0
  6. package/dist/components/anchor/PlAnchor.js +1 -0
  7. package/dist/components/anchor/index.d.ts +2 -0
  8. package/dist/components/anchor/index.js +1 -0
  9. package/dist/components/animate-appear/PlAnimateAppear.d.ts +10 -0
  10. package/dist/components/animate-appear/PlAnimateAppear.js +1 -1
  11. package/dist/components/animate-blink/PlAnimateBlink.d.ts +2 -2
  12. package/dist/components/animate-blink/PlAnimateBlink.js +1 -1
  13. package/dist/components/animate-counter/PlAnimateCounter.d.ts +83 -0
  14. package/dist/components/animate-counter/PlAnimateCounter.js +1 -0
  15. package/dist/components/animate-counter/index.d.ts +2 -0
  16. package/dist/components/animate-counter/index.js +1 -0
  17. package/dist/components/animate-fade/PlAnimateFade.d.ts +2 -2
  18. package/dist/components/animate-fade/PlAnimateFade.js +1 -1
  19. package/dist/components/animate-float/PlAnimateFloat.d.ts +51 -0
  20. package/dist/components/animate-float/PlAnimateFloat.js +1 -0
  21. package/dist/components/animate-float/index.d.ts +2 -0
  22. package/dist/components/animate-float/index.js +1 -0
  23. package/dist/components/animate-grow/PlAnimateGrow.d.ts +2 -2
  24. package/dist/components/animate-grow/PlAnimateGrow.js +1 -1
  25. package/dist/components/animate-headline/PlAnimateHeadline.js +1 -1
  26. package/dist/components/animate-lighting/PlAnimateLighting.js +1 -1
  27. package/dist/components/animate-reveal/PlAnimateReveal.d.ts +51 -0
  28. package/dist/components/animate-reveal/PlAnimateReveal.js +1 -0
  29. package/dist/components/animate-reveal/index.d.ts +2 -0
  30. package/dist/components/animate-reveal/index.js +1 -0
  31. package/dist/components/animate-rotate/PlAnimateRotate.d.ts +2 -2
  32. package/dist/components/animate-rotate/PlAnimateRotate.js +1 -1
  33. package/dist/components/animate-scramble/PlAnimateScramble.d.ts +75 -0
  34. package/dist/components/animate-scramble/PlAnimateScramble.js +1 -0
  35. package/dist/components/animate-scramble/index.d.ts +2 -0
  36. package/dist/components/animate-scramble/index.js +1 -0
  37. package/dist/components/animate-shake/PlAnimateShake.d.ts +57 -0
  38. package/dist/components/animate-shake/PlAnimateShake.js +1 -0
  39. package/dist/components/animate-shake/index.d.ts +2 -0
  40. package/dist/components/animate-shake/index.js +1 -0
  41. package/dist/components/animate-slide/PlAnimateSlide.d.ts +2 -2
  42. package/dist/components/animate-slide/PlAnimateSlide.js +1 -1
  43. package/dist/components/animate-split/PlAnimateSplit.d.ts +54 -0
  44. package/dist/components/animate-split/PlAnimateSplit.js +1 -0
  45. package/dist/components/animate-split/index.d.ts +2 -0
  46. package/dist/components/animate-split/index.js +1 -0
  47. package/dist/components/animate-typing/PlAnimateTyping.js +1 -1
  48. package/dist/components/animate-zoom/PlAnimateZoom.d.ts +2 -2
  49. package/dist/components/animate-zoom/PlAnimateZoom.js +1 -1
  50. package/dist/components/app-logo/PlAppLogo.d.ts +78 -0
  51. package/dist/components/app-logo/PlAppLogo.js +1 -0
  52. package/dist/components/app-logo/index.d.ts +2 -0
  53. package/dist/components/app-logo/index.js +1 -0
  54. package/dist/components/area-chart/PlAreaChart.d.ts +54 -0
  55. package/dist/components/area-chart/PlAreaChart.js +1 -0
  56. package/dist/components/area-chart/index.d.ts +2 -0
  57. package/dist/components/area-chart/index.js +1 -0
  58. package/dist/components/aspect-ratio/PlAspectRatio.js +1 -1
  59. package/dist/components/avatar/PlAvatar.js +1 -1
  60. package/dist/components/back-top/PlBackTop.d.ts +55 -0
  61. package/dist/components/back-top/PlBackTop.js +1 -0
  62. package/dist/components/back-top/index.d.ts +2 -0
  63. package/dist/components/back-top/index.js +1 -0
  64. package/dist/components/badge/PlBadge.js +1 -1
  65. package/dist/components/bar-chart/PlBarChart.d.ts +63 -0
  66. package/dist/components/bar-chart/PlBarChart.js +1 -0
  67. package/dist/components/bar-chart/index.d.ts +2 -0
  68. package/dist/components/bar-chart/index.js +1 -0
  69. package/dist/components/blockquote/PlBlockquote.js +1 -1
  70. package/dist/components/bottom-navigation/PlBottomNavigation.js +1 -1
  71. package/dist/components/box/PlBox.js +1 -1
  72. package/dist/components/breadcrumb/PlBreadcrumb.js +1 -1
  73. package/dist/components/button/PlButton.js +1 -1
  74. package/dist/components/button-group/PlButtonGroup.js +1 -1
  75. package/dist/components/calendar/PlCalendar.d.ts +104 -0
  76. package/dist/components/calendar/PlCalendar.js +1 -0
  77. package/dist/components/calendar/index.d.ts +2 -0
  78. package/dist/components/calendar/index.js +1 -0
  79. package/dist/components/card/PlCard.js +1 -1
  80. package/dist/components/carousel/PlCarousel.js +1 -1
  81. package/dist/components/chat-bubble/PlChatBubble.js +1 -1
  82. package/dist/components/checkbox/PlCheckbox.js +1 -1
  83. package/dist/components/chip/PlChip.js +1 -1
  84. package/dist/components/code-block/PlCodeBlock.d.ts +175 -0
  85. package/dist/components/code-block/PlCodeBlock.js +1 -0
  86. package/dist/components/code-block/index.d.ts +2 -0
  87. package/dist/components/code-block/index.js +1 -0
  88. package/dist/components/collapsible/PlCollapsible.js +1 -1
  89. package/dist/components/color-picker/PlColorPicker.js +1 -1
  90. package/dist/components/combobox/PlCombobox.d.ts +11 -2
  91. package/dist/components/combobox/PlCombobox.js +1 -1
  92. package/dist/components/command-palette/PlCommandPalette.d.ts +1 -1
  93. package/dist/components/command-palette/PlCommandPalette.js +1 -1
  94. package/dist/components/confirm/PlConfirmProvider.d.ts +100 -0
  95. package/dist/components/confirm/PlConfirmProvider.js +1 -0
  96. package/dist/components/confirm/index.d.ts +2 -0
  97. package/dist/components/confirm/index.js +1 -0
  98. package/dist/components/container/PlContainer.d.ts +22 -6
  99. package/dist/components/container/PlContainer.js +1 -1
  100. package/dist/components/data-list/PlDataList.d.ts +74 -0
  101. package/dist/components/data-list/PlDataList.js +1 -0
  102. package/dist/components/data-list/index.d.ts +2 -0
  103. package/dist/components/data-list/index.js +1 -0
  104. package/dist/components/data-table/PlDataTable.d.ts +202 -0
  105. package/dist/components/data-table/PlDataTable.js +1 -0
  106. package/dist/components/data-table/index.d.ts +2 -0
  107. package/dist/components/data-table/index.js +1 -0
  108. package/dist/components/date-picker/PlDatePicker.d.ts +41 -2
  109. package/dist/components/date-picker/PlDatePicker.js +1 -1
  110. package/dist/components/date-range-picker/PlDateRangePicker.js +1 -1
  111. package/dist/components/date-time-picker/PlDateTimePicker.js +1 -1
  112. package/dist/components/divider/PlDivider.js +1 -1
  113. package/dist/components/drawer/PlDrawer.d.ts +1 -1
  114. package/dist/components/drawer/PlDrawer.js +1 -1
  115. package/dist/components/empty/PlEmpty.d.ts +47 -0
  116. package/dist/components/empty/PlEmpty.js +1 -0
  117. package/dist/components/empty/index.d.ts +2 -0
  118. package/dist/components/empty/index.js +1 -0
  119. package/dist/components/file-picker/PlFilePicker.js +1 -1
  120. package/dist/components/flex/PlFlex.d.ts +83 -0
  121. package/dist/components/flex/PlFlex.js +1 -0
  122. package/dist/components/flex/index.d.ts +2 -0
  123. package/dist/components/flex/index.js +1 -0
  124. package/dist/components/floating-action-button/PlFloatingActionButton.d.ts +81 -0
  125. package/dist/components/floating-action-button/PlFloatingActionButton.js +1 -0
  126. package/dist/components/floating-action-button/index.d.ts +2 -0
  127. package/dist/components/floating-action-button/index.js +1 -0
  128. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -1
  129. package/dist/components/footer/PlFooter.d.ts +4 -3
  130. package/dist/components/footer/PlFooter.js +1 -1
  131. package/dist/components/gallery/PlGallery.d.ts +154 -0
  132. package/dist/components/gallery/PlGallery.js +1 -0
  133. package/dist/components/gallery/PlGalleryViewer.d.ts +31 -0
  134. package/dist/components/gallery/PlGalleryViewer.js +1 -0
  135. package/dist/components/gallery/index.d.ts +2 -0
  136. package/dist/components/gallery/index.js +1 -0
  137. package/dist/components/gauge-chart/PlGaugeChart.d.ts +64 -0
  138. package/dist/components/gauge-chart/PlGaugeChart.js +1 -0
  139. package/dist/components/gauge-chart/index.d.ts +2 -0
  140. package/dist/components/gauge-chart/index.js +1 -0
  141. package/dist/components/grid/PlGrid.js +1 -1
  142. package/dist/components/grid/PlGridItem.js +1 -1
  143. package/dist/components/header/PlHeader.d.ts +4 -3
  144. package/dist/components/header/PlHeader.js +1 -1
  145. package/dist/components/heatmap-chart/PlHeatmapChart.d.ts +69 -0
  146. package/dist/components/heatmap-chart/PlHeatmapChart.js +1 -0
  147. package/dist/components/heatmap-chart/index.d.ts +2 -0
  148. package/dist/components/heatmap-chart/index.js +1 -0
  149. package/dist/components/highlight/PlHighlight.js +1 -1
  150. package/dist/components/hot-keys/PlHotKeys.js +1 -1
  151. package/dist/components/hover-card/PlHoverCard.d.ts +94 -0
  152. package/dist/components/hover-card/PlHoverCard.js +1 -0
  153. package/dist/components/hover-card/index.d.ts +2 -0
  154. package/dist/components/hover-card/index.js +1 -0
  155. package/dist/components/how-to-steps/PlHowToSteps.d.ts +87 -0
  156. package/dist/components/how-to-steps/PlHowToSteps.js +1 -0
  157. package/dist/components/how-to-steps/index.d.ts +2 -0
  158. package/dist/components/how-to-steps/index.js +1 -0
  159. package/dist/components/image/PlImage.d.ts +72 -0
  160. package/dist/components/image/PlImage.js +1 -0
  161. package/dist/components/image/index.d.ts +2 -0
  162. package/dist/components/image/index.js +1 -0
  163. package/dist/components/line-chart/PlLineChart.d.ts +74 -0
  164. package/dist/components/line-chart/PlLineChart.js +1 -0
  165. package/dist/components/line-chart/index.d.ts +2 -0
  166. package/dist/components/line-chart/index.js +1 -0
  167. package/dist/components/list/PlList.js +1 -1
  168. package/dist/components/menu/PlMenu.d.ts +2 -2
  169. package/dist/components/menu/PlMenu.js +1 -1
  170. package/dist/components/menubar/PlMenubar.js +1 -1
  171. package/dist/components/meter/PlMeter.d.ts +83 -0
  172. package/dist/components/meter/PlMeter.js +1 -0
  173. package/dist/components/meter/index.d.ts +2 -0
  174. package/dist/components/meter/index.js +1 -0
  175. package/dist/components/mockup/PlMockup.d.ts +146 -0
  176. package/dist/components/mockup/PlMockup.js +1 -0
  177. package/dist/components/mockup/index.d.ts +2 -0
  178. package/dist/components/mockup/index.js +1 -0
  179. package/dist/components/modal/PlModal.d.ts +1 -1
  180. package/dist/components/modal/PlModal.js +1 -1
  181. package/dist/components/navigation-menu/PlNavigationMenu.js +1 -1
  182. package/dist/components/number-field/PlNumberField.d.ts +11 -2
  183. package/dist/components/number-field/PlNumberField.js +1 -1
  184. package/dist/components/otp-field/PlOtpField.d.ts +10 -1
  185. package/dist/components/otp-field/PlOtpField.js +1 -1
  186. package/dist/components/overlay/PlOverlay.d.ts +1 -1
  187. package/dist/components/overlay/PlOverlay.js +1 -1
  188. package/dist/components/page-layout/PlPageLayout.js +1 -1
  189. package/dist/components/pagination/PlPagination.js +1 -1
  190. package/dist/components/panes/PlPanes.d.ts +2 -2
  191. package/dist/components/panes/PlPanes.js +1 -1
  192. package/dist/components/pie-chart/PlPieChart.d.ts +58 -0
  193. package/dist/components/pie-chart/PlPieChart.js +1 -0
  194. package/dist/components/pie-chart/index.d.ts +2 -0
  195. package/dist/components/pie-chart/index.js +1 -0
  196. package/dist/components/pill/PlPill.js +1 -1
  197. package/dist/components/popconfirm/PlPopconfirm.d.ts +61 -0
  198. package/dist/components/popconfirm/PlPopconfirm.js +1 -0
  199. package/dist/components/popconfirm/index.d.ts +2 -0
  200. package/dist/components/popconfirm/index.js +1 -0
  201. package/dist/components/popover/PlPopover.d.ts +1 -1
  202. package/dist/components/popover/PlPopover.js +1 -1
  203. package/dist/components/portal/PlPortal.d.ts +78 -0
  204. package/dist/components/portal/PlPortal.js +1 -0
  205. package/dist/components/portal/index.d.ts +2 -0
  206. package/dist/components/portal/index.js +1 -0
  207. package/dist/components/progress-box/PlProgressBox.js +1 -1
  208. package/dist/components/progress-circular/PlProgressCircular.js +1 -1
  209. package/dist/components/progress-linear/PlProgressLinear.js +1 -1
  210. package/dist/components/radio-group/PlRadioGroup.js +1 -1
  211. package/dist/components/rating/PlRating.js +1 -1
  212. package/dist/components/scatter-chart/PlScatterChart.d.ts +46 -0
  213. package/dist/components/scatter-chart/PlScatterChart.js +1 -0
  214. package/dist/components/scatter-chart/index.d.ts +2 -0
  215. package/dist/components/scatter-chart/index.js +1 -0
  216. package/dist/components/scroll-area/PlScrollArea.d.ts +98 -0
  217. package/dist/components/scroll-area/PlScrollArea.js +1 -0
  218. package/dist/components/scroll-area/index.d.ts +2 -0
  219. package/dist/components/scroll-area/index.js +1 -0
  220. package/dist/components/scroll-zone/PlScrollZone.d.ts +9 -5
  221. package/dist/components/scroll-zone/PlScrollZone.js +1 -1
  222. package/dist/components/segmented-button/PlSegmentedButton.js +1 -1
  223. package/dist/components/select/PlSelect.d.ts +10 -1
  224. package/dist/components/select/PlSelect.js +1 -1
  225. package/dist/components/show/PlShow.d.ts +60 -0
  226. package/dist/components/show/PlShow.js +1 -0
  227. package/dist/components/show/index.d.ts +2 -0
  228. package/dist/components/show/index.js +1 -0
  229. package/dist/components/sidebar/PlSidebar.js +1 -1
  230. package/dist/components/skeleton/PlSkeleton.js +1 -1
  231. package/dist/components/slider/PlSlider.js +1 -1
  232. package/dist/components/sparkline/PlSparkline.d.ts +68 -0
  233. package/dist/components/sparkline/PlSparkline.js +1 -0
  234. package/dist/components/sparkline/index.d.ts +2 -0
  235. package/dist/components/sparkline/index.js +1 -0
  236. package/dist/components/spoiler/PlSpoiler.d.ts +8 -0
  237. package/dist/components/spoiler/PlSpoiler.js +1 -1
  238. package/dist/components/stack/PlStack.d.ts +114 -0
  239. package/dist/components/stack/PlStack.js +1 -0
  240. package/dist/components/stack/index.d.ts +2 -0
  241. package/dist/components/stack/index.js +1 -0
  242. package/dist/components/stat/PlStat.d.ts +66 -0
  243. package/dist/components/stat/PlStat.js +1 -0
  244. package/dist/components/stat/index.d.ts +2 -0
  245. package/dist/components/stat/index.js +1 -0
  246. package/dist/components/stepper/PlStepper.d.ts +86 -0
  247. package/dist/components/stepper/PlStepper.js +1 -0
  248. package/dist/components/stepper/index.d.ts +2 -0
  249. package/dist/components/stepper/index.js +1 -0
  250. package/dist/components/switch/PlSwitch.js +1 -1
  251. package/dist/components/table/PlTable.js +1 -1
  252. package/dist/components/tabs/PlTabs.d.ts +2 -2
  253. package/dist/components/tabs/PlTabs.js +1 -1
  254. package/dist/components/text-field/PlTextField.d.ts +10 -1
  255. package/dist/components/text-field/PlTextField.js +1 -1
  256. package/dist/components/text-link/PlTextLink.js +1 -1
  257. package/dist/components/time-picker/PlTimePicker.js +1 -1
  258. package/dist/components/timeline/PlTimeline.d.ts +7 -10
  259. package/dist/components/timeline/PlTimeline.js +1 -1
  260. package/dist/components/timeline-chart/PlTimelineChart.d.ts +44 -0
  261. package/dist/components/timeline-chart/PlTimelineChart.js +1 -0
  262. package/dist/components/timeline-chart/index.d.ts +2 -0
  263. package/dist/components/timeline-chart/index.js +1 -0
  264. package/dist/components/toast/PlToast.d.ts +1 -1
  265. package/dist/components/toast/PlToast.js +1 -1
  266. package/dist/components/toggle/PlToggle.js +1 -1
  267. package/dist/components/toggle/PlToggleGroup.js +1 -1
  268. package/dist/components/toolbar/PlToolbar.js +1 -1
  269. package/dist/components/tooltip/PlTooltip.d.ts +1 -1
  270. package/dist/components/tooltip/PlTooltip.js +1 -1
  271. package/dist/components/tour/PlTour.d.ts +134 -0
  272. package/dist/components/tour/PlTour.js +1 -0
  273. package/dist/components/tour/index.d.ts +2 -0
  274. package/dist/components/tour/index.js +1 -0
  275. package/dist/components/transfer/PlTransfer.js +1 -1
  276. package/dist/components/tree/PlTree.d.ts +67 -0
  277. package/dist/components/tree/PlTree.js +1 -0
  278. package/dist/components/tree/index.d.ts +2 -0
  279. package/dist/components/tree/index.js +1 -0
  280. package/dist/components/tree-select/PlTreeSelect.d.ts +99 -0
  281. package/dist/components/tree-select/PlTreeSelect.js +1 -0
  282. package/dist/components/tree-select/index.d.ts +2 -0
  283. package/dist/components/tree-select/index.js +1 -0
  284. package/dist/components/visually-hidden/PlVisuallyHidden.d.ts +46 -0
  285. package/dist/components/visually-hidden/PlVisuallyHidden.js +1 -0
  286. package/dist/components/visually-hidden/index.d.ts +2 -0
  287. package/dist/components/visually-hidden/index.js +1 -0
  288. package/dist/components/window-pane/PlWindowPane.d.ts +179 -0
  289. package/dist/components/window-pane/PlWindowPane.js +1 -0
  290. package/dist/components/window-pane/index.d.ts +2 -0
  291. package/dist/components/window-pane/index.js +1 -0
  292. package/dist/css/anchor.css +2 -0
  293. package/dist/css/animate-counter.css +2 -0
  294. package/dist/css/animate-float.css +2 -0
  295. package/dist/css/animate-reveal.css +2 -0
  296. package/dist/css/animate-scramble.css +2 -0
  297. package/dist/css/animate-shake.css +2 -0
  298. package/dist/css/animate-split.css +2 -0
  299. package/dist/css/app-logo.css +2 -0
  300. package/dist/css/area-chart.css +2 -0
  301. package/dist/css/back-top.css +2 -0
  302. package/dist/css/bar-chart.css +2 -0
  303. package/dist/css/calendar.css +2 -0
  304. package/dist/css/code-block.css +2 -0
  305. package/dist/css/confirm.css +2 -0
  306. package/dist/css/data-list.css +2 -0
  307. package/dist/css/data-table.css +2 -0
  308. package/dist/css/empty.css +2 -0
  309. package/dist/css/flex.css +2 -0
  310. package/dist/css/floating-action-button.css +2 -0
  311. package/dist/css/gallery.css +2 -0
  312. package/dist/css/gauge-chart.css +2 -0
  313. package/dist/css/heatmap-chart.css +2 -0
  314. package/dist/css/hover-card.css +2 -0
  315. package/dist/css/how-to-steps.css +2 -0
  316. package/dist/css/image.css +2 -0
  317. package/dist/css/line-chart.css +2 -0
  318. package/dist/css/meter.css +2 -0
  319. package/dist/css/mockup.css +2 -0
  320. package/dist/css/pie-chart.css +2 -0
  321. package/dist/css/popconfirm.css +2 -0
  322. package/dist/css/portal.css +2 -0
  323. package/dist/css/scatter-chart.css +2 -0
  324. package/dist/css/scroll-area.css +2 -0
  325. package/dist/css/show.css +2 -0
  326. package/dist/css/sparkline.css +2 -0
  327. package/dist/css/stack.css +2 -0
  328. package/dist/css/stat.css +2 -0
  329. package/dist/css/stepper.css +2 -0
  330. package/dist/css/timeline-chart.css +2 -0
  331. package/dist/css/tour.css +2 -0
  332. package/dist/css/tree-select.css +2 -0
  333. package/dist/css/tree.css +2 -0
  334. package/dist/css/visually-hidden.css +2 -0
  335. package/dist/css/window-pane.css +2 -0
  336. package/dist/hooks/index.d.ts +13 -0
  337. package/dist/hooks/index.js +1 -0
  338. package/dist/hooks/usePlBreakpoint.d.ts +41 -0
  339. package/dist/hooks/usePlBreakpoint.js +1 -0
  340. package/dist/hooks/usePlColorScheme.d.ts +66 -0
  341. package/dist/hooks/usePlColorScheme.js +1 -0
  342. package/dist/hooks/usePlDisclosure.d.ts +44 -0
  343. package/dist/hooks/usePlDisclosure.js +1 -0
  344. package/dist/hooks/usePlElementSize.d.ts +31 -0
  345. package/dist/hooks/usePlElementSize.js +1 -0
  346. package/dist/hooks/usePlHotKeys.d.ts +81 -0
  347. package/dist/hooks/usePlHotKeys.js +1 -0
  348. package/dist/hooks/usePlMediaQuery.d.ts +22 -0
  349. package/dist/hooks/usePlMediaQuery.js +1 -0
  350. package/dist/hooks/usePlOnScreen.d.ts +50 -0
  351. package/dist/hooks/usePlOnScreen.js +1 -0
  352. package/dist/hooks/usePlReducedMotion.d.ts +22 -0
  353. package/dist/hooks/usePlReducedMotion.js +1 -0
  354. package/dist/index.d.ts +46 -1
  355. package/dist/index.js +1 -1
  356. package/dist/internal/animate.d.ts +91 -6
  357. package/dist/internal/animate.js +1 -1
  358. package/dist/internal/breakpoints.d.ts +31 -0
  359. package/dist/internal/breakpoints.js +1 -0
  360. package/dist/internal/button-group.d.ts +29 -2
  361. package/dist/internal/button-group.js +2 -2
  362. package/dist/internal/calendar.d.ts +33 -36
  363. package/dist/internal/calendar.js +1 -1
  364. package/dist/internal/chart-frame.d.ts +458 -0
  365. package/dist/internal/chart-frame.js +1 -0
  366. package/dist/internal/chart-line.d.ts +44 -0
  367. package/dist/internal/chart-line.js +1 -0
  368. package/dist/internal/chart.d.ts +473 -0
  369. package/dist/internal/chart.js +1 -0
  370. package/dist/internal/color-scheme.d.ts +23 -0
  371. package/dist/internal/color-scheme.js +1 -0
  372. package/dist/internal/data-table.d.ts +69 -0
  373. package/dist/internal/data-table.js +1 -0
  374. package/dist/internal/date.d.ts +21 -0
  375. package/dist/internal/date.js +1 -1
  376. package/dist/internal/defaults.d.ts +74 -0
  377. package/dist/internal/defaults.js +1 -0
  378. package/dist/internal/direction.d.ts +4 -0
  379. package/dist/internal/direction.js +1 -0
  380. package/dist/internal/drag.d.ts +49 -0
  381. package/dist/internal/drag.js +1 -0
  382. package/dist/internal/format.d.ts +2 -0
  383. package/dist/internal/format.js +1 -1
  384. package/dist/internal/gallery.d.ts +34 -0
  385. package/dist/internal/gallery.js +1 -0
  386. package/dist/internal/grid.d.ts +6 -25
  387. package/dist/internal/grid.js +1 -1
  388. package/dist/internal/highlight.d.ts +98 -0
  389. package/dist/internal/highlight.js +1 -0
  390. package/dist/internal/icons.d.ts +10 -0
  391. package/dist/internal/icons.js +1 -1
  392. package/dist/internal/keys.d.ts +93 -0
  393. package/dist/internal/keys.js +1 -0
  394. package/dist/internal/labels.d.ts +138 -0
  395. package/dist/internal/labels.js +1 -0
  396. package/dist/internal/media.d.ts +26 -0
  397. package/dist/internal/media.js +1 -0
  398. package/dist/internal/mockup.d.ts +193 -0
  399. package/dist/internal/mockup.js +1 -0
  400. package/dist/internal/page-layout.d.ts +6 -6
  401. package/dist/internal/page-layout.js +1 -1
  402. package/dist/internal/progress.d.ts +6 -0
  403. package/dist/internal/responsive.d.ts +108 -0
  404. package/dist/internal/responsive.js +1 -0
  405. package/dist/internal/scramble.d.ts +31 -0
  406. package/dist/internal/scramble.js +1 -0
  407. package/dist/internal/steps.d.ts +76 -0
  408. package/dist/internal/steps.js +1 -0
  409. package/dist/internal/styles.d.ts +15 -0
  410. package/dist/internal/styles.js +1 -1
  411. package/dist/internal/table.d.ts +86 -0
  412. package/dist/internal/table.js +1 -0
  413. package/dist/internal/threshold.d.ts +19 -0
  414. package/dist/internal/threshold.js +1 -0
  415. package/dist/internal/tour.d.ts +42 -0
  416. package/dist/internal/tour.js +1 -0
  417. package/dist/internal/window.d.ts +201 -0
  418. package/dist/internal/window.js +1 -0
  419. package/dist/locales/de.d.ts +3 -0
  420. package/dist/locales/de.js +1 -0
  421. package/dist/locales/en.d.ts +2 -0
  422. package/dist/locales/en.js +1 -0
  423. package/dist/locales/es.d.ts +3 -0
  424. package/dist/locales/es.js +1 -0
  425. package/dist/locales/fr.d.ts +3 -0
  426. package/dist/locales/fr.js +1 -0
  427. package/dist/locales/index.d.ts +33 -0
  428. package/dist/locales/index.js +1 -0
  429. package/dist/locales/ja.d.ts +3 -0
  430. package/dist/locales/ja.js +1 -0
  431. package/dist/locales/ko.d.ts +3 -0
  432. package/dist/locales/ko.js +1 -0
  433. package/dist/locales/zh-Hans.d.ts +3 -0
  434. package/dist/locales/zh-Hans.js +1 -0
  435. package/dist/provider/PlColorSchemeScript.d.ts +40 -0
  436. package/dist/provider/PlColorSchemeScript.js +1 -0
  437. package/dist/provider/PlassProvider.d.ts +39 -0
  438. package/dist/provider/PlassProvider.js +1 -0
  439. package/dist/provider/index.d.ts +6 -0
  440. package/dist/provider/index.js +1 -0
  441. package/dist/styles.css +1 -1
  442. package/dist/tailwind.css +1133 -20
  443. package/dist/tokens.css +1133 -20
  444. package/dist/types.d.ts +398 -2
  445. package/package.json +30 -4
  446. package/dist/components/avatar-group/PlAvatarGroup.d.ts +0 -47
  447. package/dist/components/avatar-group/PlAvatarGroup.js +0 -1
  448. package/dist/components/avatar-group/index.d.ts +0 -2
  449. package/dist/components/avatar-group/index.js +0 -1
  450. package/dist/css/avatar-group.css +0 -2
  451. package/dist/internal/avatar-group.d.ts +0 -25
  452. package/dist/internal/avatar-group.js +0 -2
@@ -0,0 +1,57 @@
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 PlAnimateShakeProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * Plays the shake again whenever this value changes, and never on the first
7
+ * render.
8
+ *
9
+ * The prop the component exists around. `play` is a boolean, so replaying
10
+ * with it means toggling off and on — two renders for one event, and a piece
11
+ * of state whose only job is to be flipped back. A refusal is an **event**,
12
+ * and a value that has changed is the closest React has to one: a count of
13
+ * failed attempts already is this.
14
+ *
15
+ * ```tsx
16
+ * <PlAnimateShake replay={attempts}>…</PlAnimateShake>
17
+ * ```
18
+ */
19
+ replay?: unknown;
20
+ /**
21
+ * How far it travels either side of where it started. A number is pixels.
22
+ * @default 6
23
+ */
24
+ distance?: number | string;
25
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
26
+ render?: useRender.RenderProp;
27
+ children?: React.ReactNode;
28
+ }
29
+ /**
30
+ * A refusal.
31
+ *
32
+ * The one effect in the set that is a **response** rather than an entrance: it
33
+ * is what a form does when the password was wrong again, what a locked control
34
+ * does when it is pressed. So it starts held still and plays only when it is
35
+ * told to, where every other effect here starts on mount.
36
+ *
37
+ * `replay` is the prop it exists around. A refusal can happen twice, and
38
+ * `play`, being a boolean, cannot say "again" — replaying with it means
39
+ * toggling off and on, which is two renders for one event and a piece of state
40
+ * whose only job is to be flipped back. A value that has changed is the closest
41
+ * React has to an event, and the count of failed attempts a form already keeps
42
+ * is exactly that value.
43
+ *
44
+ * It is not in `PlassAnimation`, for `PlAnimateFloat`'s reason: that union is
45
+ * the set of ways content can arrive, and this is not an arrival.
46
+ *
47
+ * Three shudders either side of home and back to nothing, so a shaken element
48
+ * is exactly where it was. This is the one effect a caller will run over
49
+ * content that is still being typed into, and a field left a few pixels off its
50
+ * label would be worse than the error it was reporting.
51
+ *
52
+ * **A reader who asked for less motion sees none of it**, which is the whole
53
+ * reason the words matter more than the shake: whatever a refusal is saying has
54
+ * to be said in text as well, in something a screen reader is told about. The
55
+ * shake is emphasis, never the message.
56
+ */
57
+ export declare const PlAnimateShake: React.ForwardRefExoticComponent<PlAnimateShakeProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import*as e from"react";import{useRender as a}from"@base-ui/react/use-render";import{animBaseClass as r,lengthValue as n,useAnimateElement as t}from"../../internal/animate.js";import{cx as s}from"../../internal/styles.js";export const PlAnimateShake=/* @__PURE__ */e.forwardRef(function PlAnimateShake({duration:e=400,delay:l=0,easing:i,repeat:o=1,alternate:c,paused:d,trigger:p="manual",play:m=!1,once:f=!0,threshold:h=.2,replay:u,distance:y=6,render:g,className:k,style:N,children:j,...x},A){const P=t({effect:null,duration:e,delay:l,easing:i,repeat:o,alternate:c,x:n(y),trigger:p,play:m,once:f,threshold:h,paused:d,infinite:!1,nonce:u,children:j});return a({render:g,ref:[A,P.ref],props:{...x,className:s(r,"plass-anim-shake",P.className,k),style:{...P.style,...N},...P.props,"data-plass-animation":"shake",children:P.children}})});
@@ -0,0 +1,2 @@
1
+ export { PlAnimateShake } from './PlAnimateShake.js';
2
+ export type { PlAnimateShakeProps } from './PlAnimateShake.js';
@@ -0,0 +1 @@
1
+ export{PlAnimateShake}from"./PlAnimateShake.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { PlassAnimateMode, PlassAnimateProps, PlassSide } from '../../types.js';
4
- export interface PlAnimateSlideProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, PlassSide } from '../../types.js';
4
+ export interface PlAnimateSlideProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content slides in or slides away. `out` leaves by the same edge
7
7
  * it would have come from.
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,slideOffsets as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const PlAnimateSlide=/* @__PURE__ */e.forwardRef(function PlAnimateSlide({duration:e=360,delay:s=0,easing:o,repeat:l=1,alternate:d,paused:m,trigger:c="mount",play:p,once:f=!0,threshold:y=.2,mode:u="in",from:g="bottom",distance:h="100%",fade:x=!0,render:N,className:b,style:j,children:A,...P},S){const{x:w,y:R}=a(g,h),k=n({effect:"slide",duration:e,delay:s,easing:o,repeat:l,alternate:d,mode:u,x:w,y:R,opacity:x?0:1,trigger:c,play:p,once:f,threshold:y,paused:m,infinite:t(l)});return r({render:N,ref:[S,k.ref],props:{...P,className:i(k.className,b),style:{...k.style,...j},...k.props,children:A}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,slideOffsets as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const PlAnimateSlide=/* @__PURE__ */e.forwardRef(function PlAnimateSlide({duration:e=360,delay:s=0,easing:o,repeat:l=1,alternate:d,paused:m,trigger:c="mount",play:p,once:f=!0,threshold:g=.2,timeline:u,range:y,stagger:h=0,durationStep:S=0,reverse:x=!1,mode:N="in",from:b="bottom",distance:j="100%",fade:v=!0,render:A,className:P,style:w,children:R,...k},q){const{x:z,y:B}=a(b,j),C=n({effect:"slide",duration:e,delay:s,easing:o,repeat:l,alternate:d,mode:N,x:z,y:B,opacity:v?0:1,trigger:c,play:p,once:f,threshold:g,paused:m,infinite:t(l),timeline:u,range:y,stagger:h,durationStep:S,reverse:x,children:R});return r({render:A,ref:[q,C.ref],props:{...k,className:i(C.className,P),style:{...C.style,...w},...C.props,children:C.children}})});
@@ -0,0 +1,54 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, PlassAnimation } from '../../types.js';
4
+ /** What the line is cut into before the effect is told off across it. */
5
+ export type PlAnimateSplitBy = 'word' | 'character';
6
+ export interface PlAnimateSplitProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, Omit<React.ComponentPropsWithoutRef<'span'>, 'children'> {
7
+ /**
8
+ * The line. A string, and it has to be: the component cuts it up, and there
9
+ * is nothing to cut inside a `<strong>`.
10
+ */
11
+ children: string;
12
+ /**
13
+ * What it is cut into.
14
+ *
15
+ * `word` by default, and it is the safe one. See the note on the page about
16
+ * `character` and the scripts it must not be used on.
17
+ * @default 'word'
18
+ */
19
+ by?: PlAnimateSplitBy;
20
+ /**
21
+ * Which of the entrances each part plays.
22
+ * @default 'fade'
23
+ */
24
+ effect?: PlassAnimation;
25
+ /**
26
+ * `in` plays the entrance; `out` is the same run backwards, held at the end.
27
+ * @default 'in'
28
+ */
29
+ mode?: PlassAnimateMode;
30
+ /** Renders something other than a `<span>`. Base UI's own escape hatch. */
31
+ render?: useRender.RenderProp;
32
+ }
33
+ /**
34
+ * A line of text arriving one part at a time.
35
+ *
36
+ * The other five effects tell themselves off across their **children**, which a
37
+ * line of text does not have. This one makes them: it cuts the string into
38
+ * words or characters, wraps each in a span, and hands the set to exactly the
39
+ * same `stagger` machinery a `PlAnimateFade` around a list of `<li>`s uses. So
40
+ * `effect`, `stagger`, `durationStep` and `reverse` all mean what they mean
41
+ * everywhere else — this component is the splitting and nothing more.
42
+ *
43
+ * **`by="character"` is not safe in every script**, and that is the one thing
44
+ * to know before reaching for it. A character span breaks the shaping between
45
+ * letters, so Arabic stops joining, Devanagari conjuncts come apart, and an
46
+ * emoji built out of several code points is cut into its pieces. `word` has
47
+ * none of those problems, is the default, and is what a headline wants anyway.
48
+ *
49
+ * **A screen reader is told the line, once.** The parts are hidden from the
50
+ * accessibility tree and the whole line sits beside them in a clipped span,
51
+ * which is what stops a split headline being read out one letter at a time —
52
+ * the defect this pattern is known for.
53
+ */
54
+ export declare const PlAnimateSplit: React.ForwardRefExoticComponent<PlAnimateSplitProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{useRender as n}from"@base-ui/react/use-render";import{animBaseClass as i,animationClasses as s,animationSlots as l,isInfinite as o,staggerSlots as m,useAnimationRun as d}from"../../internal/animate.js";import{cx as p,srOnlyClasses as c}from"../../internal/styles.js";export const PlAnimateSplit=/* @__PURE__ */a.forwardRef(function PlAnimateSplit({children:f,by:u="word",effect:h="fade",mode:g="in",duration:y=400,delay:j=0,easing:x,repeat:w=1,alternate:N,paused:S,trigger:b="mount",play:v,once:A=!0,threshold:$=.2,timeline:F,range:P,stagger:k=40,durationStep:M=0,reverse:O=!1,render:R,className:q,style:z,...B},C){const D=a.useMemo(()=>function partsOf(e,r){return"character"===r?Array.from(e):e.split(/(\s+)/).filter(e=>""!==e)}(f,u),[f,u]),E=d({trigger:"view"===F?"mount":b,play:v,once:A,threshold:$,paused:S,infinite:o(w)}),G={duration:y,delay:j,easing:x,repeat:w,alternate:N,mode:g,timeline:F,range:P},H=D.filter(e=>""!==e.trim()).length,I=`${i} ${s[h]}`;let J=-1;return n({render:R??e("span",{}),ref:[C,E.ref],props:{...B,className:p(q),style:z,...E.handlers,"data-plass-animation":h,"data-state":E.state,children:t(r,{children:[e("span",{className:c,children:f}),e("span",{"aria-hidden":"true",children:D.map((r,t)=>""===r.trim()?e(a.Fragment,{children:r},t):(J+=1,e("span",{className:`${I} inline-block whitespace-pre`,style:{...l(m(G,{index:J,count:H,stagger:k,durationStep:M,reverse:O})),"--p-anim-state":E.state},children:r},t)))})]})}})});
@@ -0,0 +1,2 @@
1
+ export { PlAnimateSplit } from './PlAnimateSplit.js';
2
+ export type { PlAnimateSplitBy, PlAnimateSplitProps } from './PlAnimateSplit.js';
@@ -0,0 +1 @@
1
+ export{PlAnimateSplit}from"./PlAnimateSplit.js";
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{isInfinite as n,useAnimationRun as a,usePrefersReducedMotion as i}from"../../internal/animate.js";import{srOnlyClasses as s}from"../../internal/styles.js";function textOf(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(textOf).join(""):""}export const PlAnimateTyping=/* @__PURE__ */r.forwardRef(function PlAnimateTyping({text:o,speed:u=24,hold:m=1400,erase:c=!1,eraseSpeed:l,caret:f=!0,caretChar:p="|",duration:d,delay:h=0,repeat:g=1,paused:y,trigger:x="mount",play:T,once:j=!0,threshold:v=.2,className:N,style:S,children:w,...A},M){const O=a({trigger:x,play:T,once:j,threshold:v,paused:y,infinite:n(g)}),I=i(),E=o??textOf(w),P=r.useMemo(()=>function graphemesOf(e,t){return"undefined"!=typeof Intl&&"Segmenter"in Intl?[...new Intl.Segmenter(t,{granularity:"grapheme"}).segment(e)].map(e=>e.segment):[...e]}(E),[E]),R=P.length,[b,C]=r.useState(0),k=r.useRef(0),q=d&&R>0?d/R:1e3/Math.max(u,1),z=1e3/Math.max(l??2*u,1);return r.useEffect(()=>{k.current=0},[R]),r.useEffect(()=>{if(I||0===R)return void C(R);if(!O.started)return k.current=0,void C(0);if(y)return;let e,t=!1,r=k.current,n=1,a=!1;const i="infinite"===g?1/0:Math.max(1,g);if(r>=R&&1===i)return;const step=()=>{if(!t){if(a)return r-=1,k.current=r,C(r),r<=0&&(a=!1,n+=1),void(e=setTimeout(step,a?z:q));if(r+=1,k.current=r,C(r),r<R)e=setTimeout(step,q);else if(!(n>=i)){if(c)return a=!0,void(e=setTimeout(step,m));n+=1,e=setTimeout(()=>{t||(r=0,k.current=0,C(0),e=setTimeout(step,q))},m)}}};return C(r),e=setTimeout(step,0===r?h:q),()=>{t=!0,clearTimeout(e)}},[O.started,y,I,R,q,z,h,m,c,g]),t("div",{ref:e=>{O.ref(e),"function"==typeof M?M(e):M&&(M.current=e)},className:N,style:S,"data-plass-animation":"typing","data-state":O.state,...O.handlers,...A,children:[e("span",{className:s,children:E}),t("span",{"aria-hidden":"true",className:"whitespace-pre-wrap",children:[P.slice(0,b).join(""),f?e("span",{className:"plass-caret",children:p}):null]})]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{isInfinite as n,useAnimationRun as a}from"../../internal/animate.js";import{usePrefersReducedMotion as i}from"../../internal/media.js";import{srOnlyClasses as s}from"../../internal/styles.js";function textOf(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(textOf).join(""):""}export const PlAnimateTyping=/* @__PURE__ */r.forwardRef(function PlAnimateTyping({text:o,speed:u=24,hold:m=1400,erase:l=!1,eraseSpeed:c,caret:f=!0,caretChar:p="|",duration:d,delay:h=0,repeat:g=1,paused:y,trigger:x="mount",play:T,once:j=!0,threshold:v=.2,className:N,style:S,children:w,...A},M){const O=a({trigger:x,play:T,once:j,threshold:v,paused:y,infinite:n(g)}),I=i(),E=o??textOf(w),P=r.useMemo(()=>function graphemesOf(e,t){return"undefined"!=typeof Intl&&"Segmenter"in Intl?[...new Intl.Segmenter(t,{granularity:"grapheme"}).segment(e)].map(e=>e.segment):[...e]}(E),[E]),R=P.length,[b,C]=r.useState(0),k=r.useRef(0),q=d&&R>0?d/R:1e3/Math.max(u,1),z=1e3/Math.max(c??2*u,1);return r.useEffect(()=>{k.current=0},[R]),r.useEffect(()=>{if(I||0===R)return void C(R);if(!O.started)return k.current=0,void C(0);if(y)return;let e,t=!1,r=k.current,n=1,a=!1;const i="infinite"===g?1/0:Math.max(1,g);if(r>=R&&1===i)return;const step=()=>{if(!t){if(a)return r-=1,k.current=r,C(r),r<=0&&(a=!1,n+=1),void(e=setTimeout(step,a?z:q));if(r+=1,k.current=r,C(r),r<R)e=setTimeout(step,q);else if(!(n>=i)){if(l)return a=!0,void(e=setTimeout(step,m));n+=1,e=setTimeout(()=>{t||(r=0,k.current=0,C(0),e=setTimeout(step,q))},m)}}};return C(r),e=setTimeout(step,0===r?h:q),()=>{t=!0,clearTimeout(e)}},[O.started,y,I,R,q,z,h,m,l,g]),t("div",{ref:e=>{O.ref(e),"function"==typeof M?M(e):M&&(M.current=e)},className:N,style:S,"data-plass-animation":"typing","data-state":O.state,...O.handlers,...A,children:[e("span",{className:s,children:E}),t("span",{"aria-hidden":"true",className:"whitespace-pre-wrap",children:[P.slice(0,b).join(""),f?e("span",{className:"plass-caret",children:p}):null]})]})});
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { PlassAnimateMode, PlassAnimateProps } from '../../types.js';
4
- export interface PlAnimateZoomProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps } from '../../types.js';
4
+ export interface PlAnimateZoomProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content comes forward or falls away.
7
7
  * @default 'in'
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const PlAnimateZoom=/* @__PURE__ */e.forwardRef(function PlAnimateZoom({duration:e=320,delay:o=0,easing:s,repeat:i=1,alternate:l,paused:m,trigger:c="mount",play:d,once:p=!0,threshold:f=.2,mode:u="in",from:y=.4,fade:g=!0,render:h,className:N,style:j,children:A,...P},Z){const b=a({effect:"zoom",duration:e,delay:o,easing:s,repeat:i,alternate:l,mode:u,scale:y,opacity:g?0:1,trigger:c,play:d,once:p,threshold:f,paused:m,infinite:t(i)});return r({render:h,ref:[Z,b.ref],props:{...P,className:n(b.className,N),style:{transformOrigin:"center",...b.style,...j},...b.props,children:A}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const PlAnimateZoom=/* @__PURE__ */e.forwardRef(function PlAnimateZoom({duration:e=320,delay:i=0,easing:o,repeat:s=1,alternate:l,paused:m,trigger:d="mount",play:c,once:p=!0,threshold:f=.2,timeline:g,range:u,stagger:y=0,durationStep:h=0,reverse:N=!1,mode:j="in",from:v=.4,fade:A=!0,render:P,className:S,style:Z,children:b,...w},x){const z=a({effect:"zoom",duration:e,delay:i,easing:o,repeat:s,alternate:l,mode:j,scale:v,opacity:A?0:1,trigger:d,play:c,once:p,threshold:f,paused:m,infinite:t(s),timeline:g,range:u,origin:"center",stagger:y,durationStep:h,reverse:N,children:b});return r({render:P,ref:[x,z.ref],props:{...w,className:n(z.className,S),style:{...z.style,...Z},...z.props,children:z.children}})});
@@ -0,0 +1,78 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassColor, PlassSize, PlassVariant } from '../../types.js';
4
+ /**
5
+ * How the artwork is framed, which is the one question this component exists to
6
+ * answer.
7
+ *
8
+ * - `bare` — drawn as it was given, at the height `size` asks for and whatever
9
+ * width that comes to. No plate, no crop, no padding. The default, and the
10
+ * only one that is correct for a mark drawn with its own background, its own
11
+ * margin, or the product's name set into it.
12
+ * - `plate` — an app icon: a tile with the artwork inset in it and the corners
13
+ * cut to the house radius. What a mark drawn as a bare glyph needs before it
14
+ * can sit next to anything else.
15
+ * - `circle` — the same tile, round. For the products whose icon is a disc.
16
+ */
17
+ export type PlAppLogoShape = 'bare' | 'plate' | 'circle';
18
+ export interface PlAppLogoProps extends Omit<React.ComponentPropsWithoutRef<'span'>, 'color'> {
19
+ /**
20
+ * The mark. An `<img>`, an inline `<svg>`, a `PlIcon` — whatever the product's
21
+ * artwork actually is.
22
+ */
23
+ children?: React.ReactNode;
24
+ /** A picture to draw as the mark, instead of `children`. */
25
+ src?: string;
26
+ /**
27
+ * What the picture says, for a reader who cannot see it.
28
+ *
29
+ * Leave it empty when `name` is set: the wordmark beside the mark already
30
+ * says the product's name, and a picture that repeats it is a screen reader
31
+ * saying it twice.
32
+ */
33
+ alt?: string;
34
+ /** The product's name, set beside the mark. */
35
+ name?: React.ReactNode;
36
+ /** A line under the name — an environment, a tenant, a plan. */
37
+ description?: React.ReactNode;
38
+ /** How the artwork is framed. @default 'bare' */
39
+ shape?: PlAppLogoShape;
40
+ /**
41
+ * What the plate is made of. Only read when `shape` is not `bare`.
42
+ * @default 'solid'
43
+ */
44
+ variant?: PlassVariant;
45
+ /** The height of the mark, and the type scale of the name beside it. @default 'md' */
46
+ size?: PlassSize;
47
+ /** The family the plate takes. @default 'primary' */
48
+ color?: PlassColor;
49
+ /**
50
+ * Renders something other than a `<span>`. A logo is nearly always the way
51
+ * back to the front page, so `render={<a href="/" />}` is the ordinary case.
52
+ */
53
+ render?: useRender.RenderProp;
54
+ }
55
+ /**
56
+ * A product's mark, and its name beside it.
57
+ *
58
+ * The whole component is the **framing**, which is the one thing a logo needs
59
+ * and the one thing every project gets wrong twice: `bare` is the default
60
+ * because a mark drawn with its own background, its own margin, or the
61
+ * product's name set into it must not be put on a plate or cropped to a circle.
62
+ * `plate` and `circle` are for a mark drawn as a bare glyph, which cannot sit
63
+ * next to anything else until it has been given an edge.
64
+ *
65
+ * It is not a [PlAvatar](./avatar). An avatar is a picture of a person or a
66
+ * thing and is always a circle or a fillet, with initials behind it when the
67
+ * picture fails; a logo is artwork the product owns, it has no fallback worth
68
+ * inventing, and its shape is a decision somebody already made.
69
+ *
70
+ * **With a `name`, the mark is decorative.** The wordmark beside it already
71
+ * says what the product is called, and a picture that says it again is a screen
72
+ * reader reading the name twice. That is why `alt` is a prop rather than
73
+ * something derived from `name`.
74
+ *
75
+ * A logo is nearly always the way back to the front page. `render={<a href="/"
76
+ * />}` makes it one without changing anything about how it is drawn.
77
+ */
78
+ export declare const PlAppLogo: React.ForwardRefExoticComponent<PlAppLogoProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as s,Fragment as l}from"react/jsx-runtime";import*as a from"react";import{useRender as t}from"@base-ui/react/use-render";import{useDefaults as r}from"../../internal/defaults.js";import{controlSlots as n,cx as i,glassClasses as o,hasContent as c,metaTextClasses as m,radiusClasses as d}from"../../internal/styles.js";const p={xs:"h-5",sm:"h-6",md:"h-8",lg:"h-10",xl:"h-12"},x={xs:"size-5",sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},g={xs:"text-sm",sm:"text-base",md:"text-lg",lg:"text-xl",xl:"text-2xl"},f={xs:"gap-1.5",sm:"gap-2",md:"gap-2.5",lg:"gap-3",xl:"gap-3.5"},u={solid:"[background-image:var(--p-fill)] text-(--p-on-solid) [box-shadow:var(--p-lift)]",glass:`${o} bg-(--plass-glass) text-(--p-accent) border [border-color:var(--plass-glass-line)]`,ghost:"bg-(--p-soft) text-(--p-accent)"};export const PlAppLogo=/* @__PURE__ */a.forwardRef(function PlAppLogo({children:a,src:o,alt:h="",name:b,description:v,shape:z="bare",variant:j="solid",size:N,color:w,render:y,className:k,style:A,...L},P){const _=r(),F=N??_.size??"md",R=w??_.color??"primary",$="bare"!==z,q=c(b)||c(v),B=o?e("img",{src:o,alt:h,className:$?"size-[70%] object-contain":"h-full w-auto"}):a;return t({render:y,ref:P,props:{className:i("inline-flex items-center text-(--plass-fg) [&_svg]:h-full [&_svg]:w-auto",f[F],k),style:{...n(R,1,j),...A},children:s(l,{children:[e("span",{"aria-hidden":!!c(b)||void 0,className:i("flex shrink-0 items-center justify-center overflow-hidden",$?x[F]:p[F],$?u[j]:"","circle"===z?"rounded-full":$?d[F]:""),children:B}),q?s("span",{className:"flex min-w-0 flex-col",children:[c(b)?e("span",{className:i("truncate font-semibold",g[F]),children:b}):null,c(v)?e("span",{className:i("truncate text-(--plass-muted-fg)",m[F]),children:v}):null]}):null]}),...L}})});
@@ -0,0 +1,2 @@
1
+ export { PlAppLogo } from './PlAppLogo.js';
2
+ export type { PlAppLogoProps, PlAppLogoShape } from './PlAppLogo.js';
@@ -0,0 +1 @@
1
+ export{PlAppLogo}from"./PlAppLogo.js";
@@ -0,0 +1,54 @@
1
+ import * as React from 'react';
2
+ import { type CartesianChartProps } from '../../internal/chart-frame.js';
3
+ import { type ChartMarkers } from '../../internal/chart-line.js';
4
+ import type { PlassChartCurve, PlassChartValueLabels } from '../../types.js';
5
+ export interface PlAreaChartProps extends CartesianChartProps {
6
+ /**
7
+ * How the edge of the band gets from one point to the next. The same three
8
+ * shapes a [PlLineChart](./line-chart) offers, and they mean the same things.
9
+ * @default 'linear'
10
+ */
11
+ curve?: PlassChartCurve;
12
+ /**
13
+ * Stacks the bands, each one riding on the total of those below it.
14
+ *
15
+ * - `true` — absolute totals. The top edge is the sum, which is the thing a
16
+ * stacked area is usually drawn to show.
17
+ * - `'full'` — every category normalised to 100%, so the chart is about
18
+ * *share* and stops being about size. The value axis becomes a percentage
19
+ * and says so.
20
+ * @default false
21
+ */
22
+ stacked?: boolean | 'full';
23
+ /**
24
+ * Dots on the points. `none` by default rather than `auto`: a filled band
25
+ * already has a visible edge, and a row of dots on it is ink that says
26
+ * nothing the fill did not.
27
+ * @default 'none'
28
+ */
29
+ markers?: ChartMarkers;
30
+ /** @default 'none' */
31
+ valueLabels?: PlassChartValueLabels;
32
+ /**
33
+ * Draws the band straight through a `null` instead of breaking at it. Off,
34
+ * and on an area it matters more than on a line: a fill that closes across a
35
+ * missing month paints a made-up number over a larger part of the chart.
36
+ * @default false
37
+ */
38
+ connectNulls?: boolean;
39
+ }
40
+ /**
41
+ * A line with the space under it filled — which changes what the chart is
42
+ * about.
43
+ *
44
+ * A line says where a value went. An area says how much of something there was,
45
+ * and stacked it says how that amount was made up. That is the whole test for
46
+ * reaching for this instead of a [PlLineChart](./line-chart): if the quantity
47
+ * does not add up to anything — a temperature, a rate, a score — the fill under
48
+ * it is decoration, and a chart with two of them is two washes fighting.
49
+ *
50
+ * Unstacked bands are a wash at about a quarter opacity, fading out downward,
51
+ * so two of them overlapping stay readable. Stacked bands are opaquer, because
52
+ * there the fill *is* the mark rather than a hint at the line above it.
53
+ */
54
+ export declare function PlAreaChart({ curve, stacked, markers, valueLabels, connectNulls, series, yAxis, format, ...props }: PlAreaChartProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as r from"react";import{CartesianChart as a}from"../../internal/chart-frame.js";import{LineSeries as t}from"../../internal/chart-line.js";import{toValues as n}from"../../internal/chart.js";export function PlAreaChart({curve:l="linear",stacked:o=!1,markers:s="none",valueLabels:i="none",connectNulls:c=!1,series:u,yAxis:m,format:f,...d}){const x=r.useId().replace(/:/g,""),p="full"===o,h=r.useMemo(()=>{if(!p)return u;const e=n(u),r=[];for(const a of e)a.forEach((e,a)=>{r[a]=(r[a]??0)+Math.abs(e.value??0)});return u.map((a,t)=>({...a,data:e[t].map((e,a)=>{if(null===e.value)return null;const t=r[a];return{x:e.x,y:0===t?0:e.value/t*100,color:e.color,label:e.label??String(e.value)}})}))},[u,p]);return e(a,{...d,series:h,format:f,yAxis:p?{min:0,max:100,tickFormat:e=>`${e}%`,...m}:m,stacked:!1!==o,inset:!0,includeZero:!0,headroom:"none"===i?0:10,children:r=>e(t,{context:r,curve:l,filled:!0,stacked:!1!==o,markers:s,valueLabels:i,connectNulls:c,gradient:!1,idPrefix:x})})}
@@ -0,0 +1,2 @@
1
+ export { PlAreaChart } from './PlAreaChart.js';
2
+ export type { PlAreaChartProps } from './PlAreaChart.js';
@@ -0,0 +1 @@
1
+ export{PlAreaChart}from"./PlAreaChart.js";
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as i}from"@base-ui/react/use-render";import{cx as o,radiusClasses as t}from"../../internal/styles.js";const c=/* @__PURE__ */["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),r={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none"};export const PlAspectRatio=/* @__PURE__ */e.forwardRef(function PlAspectRatio({ratio:e=1,fit:l="cover",rounded:n=!1,size:s="md",render:a,className:f,style:m,children:u,...d},p){const b=o("relative block w-full overflow-hidden",c,r[l],n?t[s]:"",f);return i({render:a,ref:p,props:{className:b,style:{aspectRatio:e,...m},children:u,...d}})});
1
+ "use client";import*as e from"react";import{useDefaults as i}from"../../internal/defaults.js";import{useRender as o}from"@base-ui/react/use-render";import{cx as t,radiusClasses as c}from"../../internal/styles.js";const r=/* @__PURE__ */["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),l={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none"};export const PlAspectRatio=/* @__PURE__ */e.forwardRef(function PlAspectRatio({ratio:e=1,fit:n="cover",rounded:s=!1,size:a,render:f,className:m,style:u,children:d,...p},j){const b=i(),v=a??b.size??"md",g=t("relative block w-full overflow-hidden",r,l[n],s?c[v]:"",m);return o({render:f,ref:j,props:{className:g,style:{aspectRatio:e,...u},children:d,...p}})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as r from"react";import{Avatar as t}from"@base-ui/react/avatar";import{AvatarGroupContext as s}from"../../internal/avatar-group.js";import{controlHeightClasses as o,controlSlots as n,controlSquareClasses as l,glassClasses as i,hasContent as c,radiusClasses as d,srOnlyClasses as m,transitionClasses as p}from"../../internal/styles.js";const f={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},v={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),var(--p-lift)]"].join(" "),glass:/* @__PURE__ */[i,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft-press) [box-shadow:var(--p-elev)]"},g=/* @__PURE__ */["relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden","align-middle leading-none font-semibold tracking-wide whitespace-nowrap","[&_svg]:pointer-events-none [&_svg]:size-[55%]",p].join(" ");function PersonIcon(){return a("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"}),e("path",{d:"M12 14.25c-4.28 0-7.75 2.42-7.75 5.4 0 .75.6 1.35 1.35 1.35h12.8c.75 0 1.35-.6 1.35-1.35 0-2.98-3.47-5.4-7.75-5.4Z"})]})}export const PlAvatar=/* @__PURE__ */r.forwardRef(function PlAvatar({src:i,srcSet:p,alt:h,name:u,initials:x,shape:b,variant:j,size:y,color:w,elevation:N,delay:z,imageProps:C,onLoadingStatusChange:A,className:P,style:k,children:B,...S},I){const L=r.useContext(s),F=b??L?.shape??"circle",M=j??L?.variant??"ghost",R=y??L?.size??"md",Z=w??L?.color??"primary",_=N??L?.elevation??0,O=u?function initialsOf(e){const a=e.normalize("NFC").trim().split(/\s+/).filter(Boolean);return 0===a.length?"":((Array.from(a[0])[0]??"")+(a.length>1?Array.from(a[a.length-1])[0]??"":"")).toLocaleUpperCase()}(u):"",U=h??u,q=c(B)?B:(x??O)||e(PersonIcon,{}),D=c(B)||Boolean(x??O),E=[g,o[R],l[R],f[R],"circle"===F?"rounded-full":d[R],v[M],P??""].filter(Boolean).join(" ");return a(t.Root,{ref:I,className:E,style:{...n(Z,_,M),...k},...S,children:[i?e(t.Image,{src:i,srcSet:p,alt:U??"",className:"size-full object-cover",onLoadingStatusChange:A,...C}):null,a(t.Fallback,{delay:i?z:void 0,className:"flex size-full items-center justify-center",children:[U&&D?e("span",{className:m,children:U}):null,e("span",{"aria-hidden":!(!U||!D)||void 0,className:"contents",children:q})]})]})});
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as a from"react";import{useDefaults as t}from"../../internal/defaults.js";import{Avatar as s}from"@base-ui/react/avatar";import{controlHeightClasses as o,controlSlots as l,controlSquareClasses as n,glassClasses as i,hasContent as c,radiusClasses as d,srOnlyClasses as m,transitionClasses as p}from"../../internal/styles.js";const f={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},g={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),var(--p-lift)]"].join(" "),glass:/* @__PURE__ */[i,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft-press) [box-shadow:var(--p-elev)]"},v=/* @__PURE__ */["relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden","align-middle leading-none font-semibold tracking-wide whitespace-nowrap","[&_svg]:pointer-events-none [&_svg]:size-[55%]",p].join(" ");function PersonIcon(){return r("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"}),e("path",{d:"M12 14.25c-4.28 0-7.75 2.42-7.75 5.4 0 .75.6 1.35 1.35 1.35h12.8c.75 0 1.35-.6 1.35-1.35 0-2.98-3.47-5.4-7.75-5.4Z"})]})}export const PlAvatar=/* @__PURE__ */a.forwardRef(function PlAvatar({src:a,srcSet:i,alt:p,name:h,initials:u,shape:x,variant:b,size:j,color:y,elevation:w,delay:N,imageProps:z,onLoadingStatusChange:A,className:C,style:P,children:k,...B},S){const I=t(),L=x??"circle",F=b??"ghost",M=j??I.size??"md",R=y??I.color??"primary",Z=w??0,_=h?function initialsOf(e){const r=e.normalize("NFC").trim().split(/\s+/).filter(Boolean);return 0===r.length?"":((Array.from(r[0])[0]??"")+(r.length>1?Array.from(r[r.length-1])[0]??"":"")).toLocaleUpperCase()}(h):"",O=p??h,U=c(k)?k:(u??_)||e(PersonIcon,{}),q=c(k)||Boolean(u??_),D=[v,o[M],n[M],f[M],"circle"===L?"rounded-full":d[M],g[F],C??""].filter(Boolean).join(" ");return r(s.Root,{ref:S,className:D,style:{...l(R,Z,F),...P},...B,children:[a?e(s.Image,{src:a,srcSet:i,alt:O??"",className:"size-full object-cover",onLoadingStatusChange:A,...z}):null,r(s.Fallback,{delay:a?N:void 0,className:"flex size-full items-center justify-center",children:[O&&q?e("span",{className:m,children:O}):null,e("span",{"aria-hidden":!(!O||!q)||void 0,className:"contents",children:U})]})]})});
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ import type { PlassColor, PlassElevation, PlassSize, PlassVariant } from '../../types.js';
3
+ /** What is scrolled, and what is watched. */
4
+ export type PlBackTopTarget = Window | HTMLElement | React.RefObject<HTMLElement | null> | (() => Window | HTMLElement | null);
5
+ export interface PlBackTopProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'color'> {
6
+ /**
7
+ * What is scrolled. The window by default; a ref or an element for a panel
8
+ * that scrolls inside the page.
9
+ */
10
+ target?: PlBackTopTarget;
11
+ /**
12
+ * How far down the reader has to be before it appears, in pixels.
13
+ *
14
+ * 400 is roughly one screen on a laptop, which is the point at which "go
15
+ * back to the top" stops being a thing they could just do by scrolling.
16
+ * @default 400
17
+ */
18
+ visibilityHeight?: number;
19
+ /** What it does, in words, and its accessible name. @default 'Back to top' */
20
+ label?: string;
21
+ /** The glyph. An upward chevron by default. */
22
+ icon?: React.ReactNode;
23
+ /**
24
+ * Whether it pins itself to the bottom corner of the window.
25
+ *
26
+ * On by default, because that is what this component is. Turn it off to put
27
+ * the button somewhere of your own — the end of an article, a toolbar — and
28
+ * keep the appearing and the scrolling.
29
+ * @default true
30
+ */
31
+ floating?: boolean;
32
+ /** @default 'glass' */
33
+ variant?: PlassVariant;
34
+ /** @default 'md' */
35
+ size?: PlassSize;
36
+ /** @default 'primary' */
37
+ color?: PlassColor;
38
+ /** @default 2 */
39
+ elevation?: PlassElevation;
40
+ }
41
+ /**
42
+ * The way back up, once there is a way back up to want.
43
+ *
44
+ * It is **hidden until it is useful** and that is the whole design: a button
45
+ * pinned to the corner of every page from the first paint is one more thing
46
+ * covering the content, and on a page short enough not to scroll it is a
47
+ * control that does nothing. It appears when the reader is a screen or so down,
48
+ * which is the point at which scrolling back stops being something they would
49
+ * just do.
50
+ *
51
+ * The scroll is smooth, and **not** under `prefers-reduced-motion` — a page
52
+ * that flies past a reader who asked for less movement is the exact case that
53
+ * setting exists for. It jumps instead, which arrives at the same place.
54
+ */
55
+ export declare const PlBackTop: React.ForwardRefExoticComponent<PlBackTopProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import*as e from"react";import{PlIconButton as r}from"../icon-button/PlIconButton.js";import{useDefaults as n}from"../../internal/defaults.js";import{useLabels as t}from"../../internal/labels.js";import{usePrefersReducedMotion as i}from"../../internal/media.js";import{cx as l,transitionClasses as s}from"../../internal/styles.js";function ChevronUp(){return o("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:o("path",{d:"M4.5 9.5 8 6l3.5 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function resolve(o){return void 0===o?"undefined"==typeof window?null:window:"function"==typeof o?o():"current"in o?o.current:o}export const PlBackTop=/* @__PURE__ */e.forwardRef(function PlBackTop({target:a,visibilityHeight:c=400,label:d,icon:f,floating:u=!0,variant:p="glass",size:m,color:v,elevation:h=2,className:b,onClick:k,...j},w){const y=n(),T=t(),x=d??T.backToTop,g=m??y.size??"md",C=v??y.color??"primary",z=i(),[B,L]=e.useState(!1);return e.useEffect(()=>{const o=resolve(a);if(!o)return;const read=()=>L(function scrollTopOf(o){return o instanceof Window?o.scrollY:o.scrollTop}(o)>c);return read(),o.addEventListener("scroll",read,{passive:!0}),()=>o.removeEventListener("scroll",read)},[a,c]),o(r,{ref:w,label:x,icon:f??o(ChevronUp,{}),variant:p,size:g,color:C,elevation:h,onClick:o=>{k?.(o),o.defaultPrevented||resolve(a)?.scrollTo({top:0,behavior:z?"auto":"smooth"})},"aria-hidden":!B||void 0,tabIndex:B?void 0:-1,className:l(u?"fixed end-6 bottom-6 z-30":"",s,B?"opacity-100":"pointer-events-none opacity-0",b),...j})});
@@ -0,0 +1,2 @@
1
+ export { PlBackTop } from './PlBackTop.js';
2
+ export type { PlBackTopProps, PlBackTopTarget } from './PlBackTop.js';
@@ -0,0 +1 @@
1
+ export{PlBackTop}from"./PlBackTop.js";
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as t,jsxs as s}from"react/jsx-runtime";import*as m from"react";import{controlSlots as o,glassClasses as a,hasContent as l,srOnlyClasses as n,transitionClasses as r}from"../../internal/styles.js";const i={xs:"h-3.5 min-w-3.5",sm:"h-4 min-w-4",md:"h-4.5 min-w-4.5",lg:"h-5 min-w-5",xl:"h-6 min-w-6"},d={xs:"size-1.5",sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},p={xs:"text-[0.5625rem]",sm:"text-[0.625rem]",md:"text-[0.6875rem]",lg:"text-[0.75rem]",xl:"text-[0.8125rem]"},b={default:{xs:"px-1",sm:"px-1",md:"px-1.5",lg:"px-1.5",xl:"px-2"},compact:{xs:"px-0.5",sm:"px-0.5",md:"px-1",lg:"px-1",xl:"px-1.5"}},x="rounded-full",c={xs:{badge:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5",dot:"-mt-0.5 -mb-0.5 -ms-0.5 -me-0.5"},sm:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},md:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},lg:{badge:"-mt-2.5 -mb-2.5 -ms-2.5 -me-2.5",dot:"-mt-1 -mb-1 -ms-1 -me-1"},xl:{badge:"-mt-3 -mb-3 -ms-3 -me-3",dot:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5"}},g={"top-start":"top-0 start-0","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-end":"bottom-0 end-0"},f={"top-start":"mt-[7%] ms-[7%]","top-end":"mt-[7%] me-[7%]","bottom-start":"mb-[7%] ms-[7%]","bottom-end":"mb-[7%] me-[7%]"},h={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),var(--p-lift)]"].join(" "),glass:/* @__PURE__ */[a,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft-press)"};export const PlBadge=/* @__PURE__ */m.forwardRef(function PlBadge({variant:m="solid",size:a="md",color:u="primary",density:v="default",elevation:w=0,content:j,max:y=99,dot:z=!1,showZero:N=!1,invisible:k=!1,placement:B="top-end",overlap:P="square",label:$,className:q,style:C,children:F,...R},Z){const A=l(F),D=!l(j)||0===j&&!N,E=z||D,G=k||D&&!z,H=["pointer-events-none z-10 inline-flex shrink-0 items-center justify-center","font-semibold tabular-nums whitespace-nowrap",x,r,h[m],E?d[a]:[i[a],p[a],b[v][a]].join(" "),A?`absolute ${g[B]}`:"relative align-middle",A?E?c[a].dot:c[a].badge:"",A&&"circle"===P?f[B]:"",G?"invisible":"",q??""].filter(Boolean).join(" "),I=function capContent(e,t){return"number"==typeof e&&e>t?`${t}+`:e}(j,y),J=e("span",{ref:Z,className:H,style:{...o(u,w,m),...C},"aria-hidden":!!G||void 0,...R,children:G?null:s(t,{children:[E||$?e("span",{className:n,children:$??I}):null,E?null:e("span",{"aria-hidden":!!$||void 0,children:I})]})});return A?s("span",{className:"relative inline-flex shrink-0 align-middle",children:[F,J]}):J});
1
+ "use client";import{jsx as e,Fragment as t,jsxs as s}from"react/jsx-runtime";import*as m from"react";import{useDefaults as o}from"../../internal/defaults.js";import{controlSlots as a,glassClasses as l,hasContent as n,srOnlyClasses as r,transitionClasses as i}from"../../internal/styles.js";const d={xs:"h-3.5 min-w-3.5",sm:"h-4 min-w-4",md:"h-4.5 min-w-4.5",lg:"h-5 min-w-5",xl:"h-6 min-w-6"},p={xs:"size-1.5",sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},b={xs:"text-[0.5625rem]",sm:"text-[0.625rem]",md:"text-[0.6875rem]",lg:"text-[0.75rem]",xl:"text-[0.8125rem]"},x={default:{xs:"px-1",sm:"px-1",md:"px-1.5",lg:"px-1.5",xl:"px-2"},compact:{xs:"px-0.5",sm:"px-0.5",md:"px-1",lg:"px-1",xl:"px-1.5"}},c="rounded-full",g={xs:{badge:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5",dot:"-mt-0.5 -mb-0.5 -ms-0.5 -me-0.5"},sm:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},md:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},lg:{badge:"-mt-2.5 -mb-2.5 -ms-2.5 -me-2.5",dot:"-mt-1 -mb-1 -ms-1 -me-1"},xl:{badge:"-mt-3 -mb-3 -ms-3 -me-3",dot:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5"}},f={"top-start":"top-0 start-0","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-end":"bottom-0 end-0"},u={"top-start":"mt-[7%] ms-[7%]","top-end":"mt-[7%] me-[7%]","bottom-start":"mb-[7%] ms-[7%]","bottom-end":"mb-[7%] me-[7%]"},h={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),var(--p-lift)]"].join(" "),glass:/* @__PURE__ */[l,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft-press)"};export const PlBadge=/* @__PURE__ */m.forwardRef(function PlBadge({variant:m="solid",size:l,color:v,density:w,elevation:j=0,content:y,max:z=99,dot:N=!1,showZero:k=!1,invisible:B=!1,placement:P="top-end",overlap:$="square",label:q,className:C,style:F,children:R,...Z},A){const D=o(),E=l??D.size??"md",G=v??D.color??"primary",H=w??D.density??"default",I=n(R),J=!n(y)||0===y&&!k,K=N||J,L=B||J&&!N,M=["pointer-events-none z-10 inline-flex shrink-0 items-center justify-center","font-semibold tabular-nums whitespace-nowrap",c,i,h[m],K?p[E]:[d[E],b[E],x[H][E]].join(" "),I?`absolute ${f[P]}`:"relative align-middle",I?K?g[E].dot:g[E].badge:"",I&&"circle"===$?u[P]:"",L?"invisible":"",C??""].filter(Boolean).join(" "),O=function capContent(e,t){return"number"==typeof e&&e>t?`${t}+`:e}(y,z),Q=e("span",{ref:A,className:M,style:{...a(G,j,m),...F},"aria-hidden":!!L||void 0,...Z,children:L?null:s(t,{children:[K||q?e("span",{className:r,children:q??O}):null,K?null:e("span",{"aria-hidden":!!q||void 0,children:O})]})});return I?s("span",{className:"relative inline-flex shrink-0 align-middle",children:[R,Q]}):Q});
@@ -0,0 +1,63 @@
1
+ import * as React from 'react';
2
+ import { type CartesianChartProps } from '../../internal/chart-frame.js';
3
+ import type { PlassChartValueLabels, PlassOrientation } from '../../types.js';
4
+ export interface PlBarChartProps extends CartesianChartProps {
5
+ /**
6
+ * Which way the bars run.
7
+ *
8
+ * `vertical` — the default — grows them up from the bottom, which is what
9
+ * most people mean by a bar chart. `horizontal` grows them out from the left,
10
+ * and it is the right answer whenever the category names are words: a
11
+ * horizontal chart has a whole column for them, and a vertical one has the
12
+ * width of one bar.
13
+ * @default 'vertical'
14
+ */
15
+ orientation?: PlassOrientation;
16
+ /**
17
+ * Puts the series on top of each other instead of beside each other.
18
+ *
19
+ * - `false` — grouped. Comparing series within a category.
20
+ * - `true` — stacked. The bar's whole length is the total, and the segments
21
+ * are what it is made of.
22
+ * - `'full'` — every bar the same length, so the chart is about share rather
23
+ * than size. The value axis becomes a percentage.
24
+ * @default false
25
+ */
26
+ stacked?: boolean | 'full';
27
+ /**
28
+ * Cuts the corners off the data end of each bar. The baseline end stays
29
+ * square — that is where the value starts from, and a rounded foot makes the
30
+ * axis look scalloped.
31
+ * @default true
32
+ */
33
+ rounded?: boolean;
34
+ /**
35
+ * How thick a bar may get, in pixels. Below the cap the bars fill their share
36
+ * of the band; above it the leftover stays as air.
37
+ * @default the `size` ladder — 24 at `md`
38
+ */
39
+ barSize?: number;
40
+ /**
41
+ * Which values are written on the bars.
42
+ *
43
+ * `all` is defensible here in a way it is not on a line chart: eight bars
44
+ * with their numbers on them is a chart and a table at once. Past about a
45
+ * dozen it stops being either.
46
+ * @default 'none'
47
+ */
48
+ valueLabels?: PlassChartValueLabels;
49
+ }
50
+ /**
51
+ * Lengths, compared.
52
+ *
53
+ * A bar says *how much*, and it says it by being longer — which is the whole
54
+ * reason its axis starts at zero and cannot be talked out of it. Crop the scale
55
+ * and a bar twice as long stops meaning twice as much, and the reader has no
56
+ * way to know it happened. Reach for a [PlLineChart](./line-chart) when what
57
+ * matters is the shape of a change rather than the size of each value.
58
+ *
59
+ * Grouped bars answer "which series is bigger here"; stacked bars answer "what
60
+ * is this total made of". They are different questions and the chart should be
61
+ * asked only one of them at a time.
62
+ */
63
+ export declare function PlBarChart({ orientation, stacked, rounded, barSize, valueLabels, series, yAxis, size: sizeProp, density: densityProp, ...props }: PlBarChartProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{CartesianChart as l,markTransitionClasses as n}from"../../internal/chart-frame.js";import{barBandRatio as r,barMaxThickness as o,barPath as i,barRadius as s,chartFontSizes as u,markGap as c,toValues as d}from"../../internal/chart.js";import{useDefaults as m}from"../../internal/defaults.js";export function PlBarChart({orientation:t="vertical",stacked:n=!1,rounded:i=!0,barSize:s,valueLabels:u="none",series:c,yAxis:h,size:f,density:v,...x}){const p=m(),b=f??p.size??"md",y=v??p.density??"default",z="horizontal"===t,g="full"===n,M=a.useMemo(()=>{if(!g)return c;const e=d(c),t=[];for(const a of e)a.forEach((e,a)=>{t[a]=(t[a]??0)+Math.abs(e.value??0)});return c.map((a,l)=>({...a,data:e[l].map((e,a)=>{if(null===e.value)return null;const l=t[a];return{x:e.x,y:0===l?0:e.value/l*100,color:e.color,label:e.label??String(e.value)}})}))},[c,g]);return e(l,{...x,series:M,size:b,density:y,horizontal:z,stacked:!1!==n,yAxis:g?{min:0,max:100,tickFormat:e=>`${e}%`,...h}:h,includeZero:!0,bandRatio:r[y],headroom:"none"===u?0:12,children:t=>e(Bars,{context:t,stacked:!1!==n,rounded:i,barSize:s??o[b],valueLabels:u,size:b})})}function Bars({context:a,stacked:l,rounded:r,barSize:o,valueLabels:d,size:m}){const{values:h,visible:f,colors:v,hovered:x,activeIndex:p,plot:b,band:y,horizontal:z,valuePx:g,categoryPx:M,zeroPx:k,format:j}=a,S=h.map((e,t)=>({one:e,index:t})).filter(e=>f[e.index]),B=l?1:Math.max(1,S.length),P=Math.min(o,Math.max(1,(y.band-c*(B-1))/B)),A=P*B+c*(B-1),E=[],L=[],N=u[m];return t("g",{children:[S.map(({one:a,index:o},u)=>{const m=v[o];return e("g",{opacity:null!==x&&x!==o?.28:1,className:n,children:a.map((o,h)=>{if(null===o.value)return null;const f=M(h),v=l?0:u*(P+c)-A/2+P/2,x=l?o.value>=0?E[h]??0:L[h]??0:0,y=g(x),k=g(x+o.value);l&&(o.value>=0?E[h]=x+o.value:L[h]=x+o.value);const S=l&&0!==x?c:0,B=Math.abs(k-y)-S;if(B<=0)return null;const W=k<y,w=h===p,C=z?i(Math.min(y,k)+(W?0:S),b.top+f+v-P/2,B,P,r&&!l?s:r?s/2:0,o.value>=0?"right":"left"):i(b.left+f+v-P/2,Math.min(y,k)+(W?0:S),P,B,r&&!l?s:r?s/2:0,o.value>=0?"up":"down");return t("g",{children:[e("path",{d:C,fill:o.color??m,opacity:w?1:.92,className:n}),"none"===d||"extremes"===d&&!isExtreme(a,h)||"last"===d&&h!==a.length-1?null:e("text",{x:z?k+(o.value>=0?5:-5):b.left+f+v,y:z?b.top+f+v:o.value>=0?k-5:k+N+2,textAnchor:z?o.value>=0?"start":"end":"middle",dominantBaseline:z?"central":void 0,fontSize:N,fontWeight:500,fill:"var(--plass-fg)",className:"tabular-nums",children:o.label??j(o.value)})]},h)})},o)}),e("line",z?{x1:k,x2:k,y1:b.top,y2:b.top+b.height,stroke:"var(--plass-chart-baseline)",strokeWidth:1}:{x1:b.left,x2:b.left+b.width,y1:k,y2:k,stroke:"var(--plass-chart-baseline)",strokeWidth:1})]})}function isExtreme(e,t){const a=e[t].value;if(null===a)return!1;let l=1/0,n=-1/0;for(const t of e)null!==t.value&&(l=Math.min(l,t.value),n=Math.max(n,t.value));return a===l||a===n}
@@ -0,0 +1,2 @@
1
+ export { PlBarChart } from './PlBarChart.js';
2
+ export type { PlBarChartProps } from './PlBarChart.js';
@@ -0,0 +1 @@
1
+ export{PlBarChart}from"./PlBarChart.js";
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as s}from"react/jsx-runtime";import*as r from"react";import{glassClasses as l,hasContent as a,metaTextClasses as t,radiusClasses as o,sheetPaddingXClasses as n,sheetPaddingYClasses as i,surfaceSlots as c,transitionClasses as d}from"../../internal/styles.js";const m={xs:"text-[0.75rem]/[1.25rem]",sm:"text-[0.8125rem]/[1.375rem]",md:"text-[0.9375rem]/[1.625rem]",lg:"text-[1.0625rem]/[1.875rem]",xl:"text-[1.25rem]/[2.125rem]"},p="border-s-2 [border-inline-start-color:var(--p-accent)]",u={solid:/* @__PURE__ */[l,"bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[l,"border border-s-2 bg-(--plass-glass)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"bg-transparent"};function QuoteMarkIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e("path",{d:"M6.4 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6ZM13.3 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6Z",fill:"currentColor"})})}export const PlBlockquote=/* @__PURE__ */r.forwardRef(function PlBlockquote({variant:r="ghost",size:l="md",color:f="primary",density:g="default",elevation:x=0,author:h,source:v,cite:b,icon:j,className:N,style:k,children:y,...w},B){const M=a(h)||a(v),q=void 0===j?e(QuoteMarkIcon,{}):j,z=["flex flex-col text-(--plass-fg)",p,"ghost"===r?"":`${o[l]} rounded-s-none`,u[r],n[g][l],i[g][l],d,N??""].filter(Boolean).join(" "),I=s("blockquote",{cite:b,className:m[l],children:[a(q)?e("span",{"aria-hidden":"true",className:"mb-1 block size-[2em] text-(--p-soft-press) [&>svg]:size-full",children:q}):null,y]}),P={...c(f,x),...k};return M?s("figure",{ref:B,className:z,style:P,...w,children:[I,s("figcaption",{className:["mt-2 flex flex-wrap items-baseline gap-x-1.5 text-(--plass-muted-fg)",t[l]].join(" "),children:[a(h)?s("span",{className:"font-medium text-(--plass-fg)",children:[e("span",{"aria-hidden":"true",children:"— "}),h]}):null,a(v)?e("cite",{className:"not-italic",children:v}):null]})]}):e("div",{ref:B,className:z,style:P,...w,children:I})});
1
+ "use client";import{jsx as e,jsxs as s}from"react/jsx-runtime";import*as r from"react";import{useDefaults as l}from"../../internal/defaults.js";import{glassClasses as t,hasContent as a,metaTextClasses as o,radiusClasses as n,sheetPaddingXClasses as i,sheetPaddingYClasses as c,surfaceSlots as d,transitionClasses as m}from"../../internal/styles.js";const p={xs:"text-[0.75rem]/[1.25rem]",sm:"text-[0.8125rem]/[1.375rem]",md:"text-[0.9375rem]/[1.625rem]",lg:"text-[1.0625rem]/[1.875rem]",xl:"text-[1.25rem]/[2.125rem]"},f="border-s-2 [border-inline-start-color:var(--p-accent)]",u={solid:/* @__PURE__ */[t,"bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[t,"border border-s-2 bg-(--plass-glass)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"bg-transparent"};function QuoteMarkIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e("path",{d:"M6.4 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6ZM13.3 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6Z",fill:"currentColor"})})}export const PlBlockquote=/* @__PURE__ */r.forwardRef(function PlBlockquote({variant:r="ghost",size:t,color:g,density:x,elevation:h=0,author:v,source:b,cite:j,icon:N,className:y,style:k,children:w,...z},B){const M=l(),q=t??M.size??"md",I=g??M.color??"primary",P=x??M.density??"default",Q=a(v)||a(b),Z=void 0===N?e(QuoteMarkIcon,{}):N,C=["flex flex-col text-(--plass-fg)",f,"ghost"===r?"":`${n[q]} rounded-s-none`,u[r],i[P][q],c[P][q],m,y??""].filter(Boolean).join(" "),R=s("blockquote",{cite:j,className:p[q],children:[a(Z)?e("span",{"aria-hidden":"true",className:"mb-1 block size-[2em] text-(--p-soft-press) [&>svg]:size-full",children:Z}):null,w]}),$={...d(I,h),...k};return Q?s("figure",{ref:B,className:C,style:$,...z,children:[R,s("figcaption",{className:["mt-2 flex flex-wrap items-baseline gap-x-1.5 text-(--plass-muted-fg)",o[q]].join(" "),children:[a(v)?s("span",{className:"font-medium text-(--plass-fg)",children:[e("span",{"aria-hidden":"true",children:"— "}),v]}):null,a(b)?e("cite",{className:"not-italic",children:b}):null]})]}):e("div",{ref:B,className:C,style:$,...z,children:R})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as a,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{useRender as s}from"@base-ui/react/use-render";import{cx as i,focusRingInsetClasses as n,hasContent as r,iconSizeClasses as o,metaTextClasses as c,radiusClasses as d,sheetLineClasses as m,sheetRestClasses as u,srOnlyClasses as p,surfaceSlots as f,transitionClasses as g}from"../../internal/styles.js";const h=/* @__PURE__ */l.createContext({value:null,change:()=>{},size:"md",density:"default",labels:"all",disabled:!1}),x={static:"",sticky:"sticky bottom-0 z-20",fixed:"fixed inset-x-0 bottom-0 z-30"},v={xs:"min-h-10",sm:"min-h-12",md:"min-h-14",lg:"min-h-16",xl:"min-h-18"},b={default:{xs:"p-1",sm:"p-1",md:"p-1.5",lg:"p-2",xl:"p-2.5"},compact:{xs:"p-0.5",sm:"p-0.5",md:"p-1",lg:"p-1",xl:"p-1.5"}},y={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const PlBottomNavigation=/* @__PURE__ */l.forwardRef(function PlBottomNavigation({variant:a="glass",size:t="md",color:n="primary",density:r="default",elevation:o=0,value:c,defaultValue:p=null,onValueChange:y,position:N="fixed",labels:w="all",divider:z=!0,safeArea:k=!0,disabled:C=!1,label:j,render:P,className:B,style:I,children:R,...V},A){const[D,F]=l.useState(p),M=void 0!==c,S=M?c:D,q=l.useCallback(e=>{M||F(e),y?.(e)},[M,y]),E=l.useMemo(()=>({value:S??null,change:q,size:t,density:r,labels:w,disabled:C}),[S,q,t,r,w,C]),G=i("w-full min-w-0","static"===N?d[t]:"",u[a],"glass"===a&&"static"!==N?"border-0":"",z?m:"",x[N],k?"pb-[env(safe-area-inset-bottom)]":"",g,B);return s({render:P??e("nav",{}),ref:A,props:{"aria-label":j,className:G,style:{...f(n,o),...I},children:e(h.Provider,{value:E,children:e("div",{className:i("flex w-full items-stretch",v[t],b[r][t]),children:R})}),...V}})});export const PlBottomNavigationItem=/* @__PURE__ */l.forwardRef(function PlBottomNavigationItem({value:s,icon:m,href:u,disabled:f=!1,className:x,children:v,onClick:b,...N},w){const z=l.useContext(h),k=f||z.disabled,C=null!==z.value&&z.value===s,j="all"===z.labels||"selected"===z.labels&&C,P=i("flex min-w-0 flex-1 flex-col items-center justify-center px-1 py-1.5",y[z.size],d[z.size],"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",g,n,k?"cursor-not-allowed opacity-50 saturate-[0.35] text-(--plass-muted-fg)":C?"cursor-pointer font-medium text-(--p-accent) bg-(--p-soft) hover:bg-(--p-soft-hover)":"cursor-pointer text-(--plass-muted-fg) hover:text-(--plass-fg) hover:bg-(--plass-glass-hover)",x),B=t(a,{children:[r(m)?e("span",{className:i("flex shrink-0 items-center justify-center",o[z.size]),children:m}):null,r(v)?e("span",{className:j?i("max-w-full truncate leading-tight",c[z.size]):p,children:v}):null]}),press=e=>{k?e.preventDefault():(z.change(s),b?.(e))};return u?e("a",{ref:w,href:k?void 0:u,"aria-current":C?"page":void 0,"aria-disabled":k||void 0,className:P,onClick:press,...N,children:B}):e("button",{ref:w,type:"button",disabled:k,"aria-current":C?"page":void 0,className:P,onClick:press,...N,children:B})});
1
+ "use client";import{jsx as e,Fragment as a,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{useDefaults as s}from"../../internal/defaults.js";import{useRender as i}from"@base-ui/react/use-render";import{cx as r,focusRingInsetClasses as n,hasContent as o,iconSizeClasses as c,metaTextClasses as d,radiusClasses as m,sheetLineClasses as u,sheetRestClasses as p,srOnlyClasses as f,surfaceSlots as g,transitionClasses as h}from"../../internal/styles.js";const x=/* @__PURE__ */l.createContext({value:null,change:()=>{},size:"md",density:"default",labels:"all",disabled:!1}),v={static:"",sticky:"sticky bottom-0 z-20",fixed:"fixed inset-x-0 bottom-0 z-30"},b={xs:"min-h-10",sm:"min-h-12",md:"min-h-14",lg:"min-h-16",xl:"min-h-18"},y={default:{xs:"p-1",sm:"p-1",md:"p-1.5",lg:"p-2",xl:"p-2.5"},compact:{xs:"p-0.5",sm:"p-0.5",md:"p-1",lg:"p-1",xl:"p-1.5"}},N={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const PlBottomNavigation=/* @__PURE__ */l.forwardRef(function PlBottomNavigation({variant:a="glass",size:t,color:n,density:o,elevation:c=0,value:d,defaultValue:f=null,onValueChange:N,position:z="fixed",labels:w="all",divider:k=!0,safeArea:j=!0,disabled:C=!1,label:P,render:B,className:I,style:R,children:V,...A},D){const F=s(),M=t??F.size??"md",S=n??F.color??"primary",q=o??F.density??"default",[E,G]=l.useState(f),H=void 0!==d,J=H?d:E,K=l.useCallback(e=>{H||G(e),N?.(e)},[H,N]),L=l.useMemo(()=>({value:J??null,change:K,size:M,density:q,labels:w,disabled:C}),[J,K,M,q,w,C]),O=r("w-full min-w-0","static"===z?m[M]:"",p[a],"glass"===a&&"static"!==z?"border-0":"",k?u:"",v[z],j?"pb-[env(safe-area-inset-bottom)]":"",h,I);return i({render:B??e("nav",{}),ref:D,props:{"aria-label":P,className:O,style:{...g(S,c),...R},children:e(x.Provider,{value:L,children:e("div",{className:r("flex w-full items-stretch",b[M],y[q][M]),children:V})}),...A}})});export const PlBottomNavigationItem=/* @__PURE__ */l.forwardRef(function PlBottomNavigationItem({value:s,icon:i,href:u,disabled:p=!1,className:g,children:v,onClick:b,...y},z){const w=l.useContext(x),k=p||w.disabled,j=null!==w.value&&w.value===s,C="all"===w.labels||"selected"===w.labels&&j,P=r("flex min-w-0 flex-1 flex-col items-center justify-center px-1 py-1.5",N[w.size],m[w.size],"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",h,n,k?"cursor-not-allowed opacity-50 saturate-[0.35] text-(--plass-muted-fg)":j?"cursor-pointer font-medium text-(--p-accent) bg-(--p-soft) hover:bg-(--p-soft-hover)":"cursor-pointer text-(--plass-muted-fg) hover:text-(--plass-fg) hover:bg-(--plass-glass-hover)",g),B=t(a,{children:[o(i)?e("span",{className:r("flex shrink-0 items-center justify-center",c[w.size]),children:i}):null,o(v)?e("span",{className:C?r("max-w-full truncate leading-tight",d[w.size]):f,children:v}):null]}),press=e=>{k?e.preventDefault():(w.change(s),b?.(e))};return u?e("a",{ref:z,href:k?void 0:u,"aria-current":j?"page":void 0,"aria-disabled":k||void 0,className:P,onClick:press,...y,children:B}):e("button",{ref:z,type:"button",disabled:k,"aria-current":j?"page":void 0,className:P,onClick:press,...y,children:B})});