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,69 @@
1
+ import * as React from 'react';
2
+ import { type ChartScaleKind } from '../../internal/chart.js';
3
+ import type { PlassChartCategory, PlassChartLegend, PlassChartSeries } from '../../types.js';
4
+ import type { ChartBaseProps } from '../../internal/chart-frame.js';
5
+ export interface PlHeatmapChartProps extends Omit<ChartBaseProps, 'legend'> {
6
+ /**
7
+ * The rows. Each series is a row of the grid or a group of the treemap, and
8
+ * each datum a cell or a tile.
9
+ *
10
+ * `y` is the magnitude and `x` names the column. A `null` is a gap: the cell
11
+ * is left as surface rather than drawn as the bottom of the scale, because
12
+ * "nothing happened" and "the least of anything" are not the same reading.
13
+ */
14
+ series: readonly PlassChartSeries[];
15
+ /** The column names. Points may carry their own `x` instead. */
16
+ categories?: readonly PlassChartCategory[];
17
+ /**
18
+ * - `grid` — a cell per row and column, which is the shape for two
19
+ * categorical axes and one magnitude: hours against weekdays, a cohort
20
+ * against a week.
21
+ * - `treemap` — a tile per datum, sized by its share and packed to fill the
22
+ * box. For parts of a whole where the parts are grouped and there are more
23
+ * of them than a [`PlPieChart`](./pie-chart) can hold.
24
+ * @default 'grid'
25
+ */
26
+ shape?: 'grid' | 'treemap';
27
+ /**
28
+ * How the magnitude is coloured.
29
+ *
30
+ * - `sequential` — one hue, pale to deep. The default, and right whenever
31
+ * more is simply more.
32
+ * - `diverging` — two hues either side of a neutral, for a value with a
33
+ * *middle* that means something: over and under target, gained and lost.
34
+ * Reached for on a plain magnitude it invents a boundary the data has none
35
+ * of.
36
+ * @default 'sequential'
37
+ */
38
+ scale?: ChartScaleKind;
39
+ /** Where a `diverging` scale turns over. @default 0 */
40
+ midpoint?: number;
41
+ /** Where the scale starts and ends. Taken from the data otherwise. */
42
+ min?: number;
43
+ max?: number;
44
+ /**
45
+ * Writes each cell's value on it, where the cell is big enough for the text
46
+ * to fit with room either side. A label that does not fit is dropped rather
47
+ * than clipped — the tooltip and the table still have it.
48
+ * @default 'none'
49
+ */
50
+ valueLabels?: 'none' | 'all';
51
+ /** Where the scale legend sits. `false` leaves it off. */
52
+ legend?: boolean | Pick<PlassChartLegend, 'side' | 'align'>;
53
+ }
54
+ /**
55
+ * A magnitude per cell, coloured rather than measured.
56
+ *
57
+ * Two shapes of the same idea. A `grid` is the one to reach for when both axes
58
+ * are categorical and the question is *where* — which hour of which day, which
59
+ * cohort in which week; a bar chart of the same data would be forty bars nobody
60
+ * can scan. A `treemap` is for parts of a whole with more parts than a
61
+ * [`PlPieChart`](./pie-chart) can hold, and it is the same component because the
62
+ * data is the same shape: a row of a heatmap and a group of a treemap are both
63
+ * a named series of named magnitudes.
64
+ *
65
+ * Colour here encodes *size* and not identity, so it comes off a one-hue ramp
66
+ * rather than off the categorical palette — a heatmap in eight hues says its
67
+ * cells are eight unrelated things.
68
+ */
69
+ export declare function PlHeatmapChart({ series, categories, shape, scale, midpoint, min, max, valueLabels, height, format, locale: localeProp, label, legend, tooltip, empty, size: sizeProp, variant, padded, className, ...box }: PlHeatmapChartProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import*as t from"react";import{ChartScaleLegend as n,ChartStatus as i,ChartSurface as a,ChartTooltipPanel as r,markTransitionClasses as o,useMeasuredWidth as d}from"../../internal/chart-frame.js";import{categoryAt as h,chartFontSizes as s,compactNumber as c,formatCategory as m,markGap as u,plotHeights as x,rampFill as f,rampInk as g,rampStep as p,rampSteps as w,squarify as v,textWidth as y,toValues as b,truncate as M}from"../../internal/chart.js";import{numberFormatter as $}from"../../internal/format.js";import{cx as j,metaTextClasses as k,srOnlyClasses as z}from"../../internal/styles.js";import{useLabels as A}from"../../internal/labels.js";import{useDefaults as N}from"../../internal/defaults.js";export function PlHeatmapChart({series:E,categories:S,shape:B="grid",scale:C="sequential",midpoint:I=0,min:D,max:L,valueLabels:P="none",height:R,format:_,locale:q,label:H,legend:K,tooltip:U,empty:W,size:F,variant:G="ghost",padded:J=!1,className:O,...Q}){const T=N(),V=F??T.size??"md",X=q??T.locale,Y=t.useRef(null),Z=d(Y),ee=A(),le=t.useId(),[te,ne]=t.useState(null),ie=t.useCallback(e=>_?$(X,_).format(e):c(e,X),[_,X]),ae=t.useMemo(()=>b(E),[E]),re=ae.reduce((e,l)=>Math.max(e,l.length),0),oe=t.useMemo(()=>Array.from({length:re},(e,l)=>h(l,S,ae)),[re,S,ae]),de=t.useMemo(()=>E.map((e,l)=>e.name??`${l+1}`),[E]),he=t.useMemo(()=>{let e=1/0,l=-1/0,t=!1;for(const n of ae)for(const i of n)null!==i.value&&(t=!0,e=Math.min(e,i.value),l=Math.max(l,i.value));return t?{min:e,max:l}:null},[ae]),se=D??he?.min??0,ce=L??he?.max??1,me=t.useCallback(e=>p(e,se,ce,C,I),[se,ce,C,I]),ue="number"==typeof R?R:x[V]??220,xe=s[V],fe=!0===K||void 0===K||!1===K?{}:K,ge=!1!==K,pe=fe.side??"bottom",we=!1===U?{mode:"none"}:!0===U||void 0===U?{}:U,ve="none"===we.mode,ye=null===he||0===re||0===E.length,be=t.useMemo(()=>{if("treemap"===B||Z<=0)return{texts:[],band:0};const e=Math.min(150,.25*Z),l=de.map(l=>M(l,e,xe));return{texts:l,band:l.reduce((e,l)=>Math.max(e,y(l,xe)),0)+10}},[B,de,Z,xe]),Me="treemap"===B?0:xe+8,$e={left:be.band,width:Math.max(0,Z-be.band),height:Math.max(0,ue-Me)},je=t.useMemo(()=>{if($e.width<=0||$e.height<=0)return[];if("treemap"===B){const e=[];return ae.forEach((l,t)=>l.forEach((l,n)=>{null!==l.value&&e.push({row:t,index:n,cell:l})})),v(e.map(e=>Math.max(0,e.cell.value??0)),$e.width,$e.height).map(l=>({row:e[l.index].row,index:e[l.index].index,cell:e[l.index].cell,x:$e.left+l.x,y:l.y,width:l.width,height:l.height}))}const e=$e.height/Math.max(1,E.length),l=$e.width/Math.max(1,re),t=[];return ae.forEach((n,i)=>n.forEach((n,a)=>{null!==n.value&&t.push({row:i,index:a,cell:n,x:$e.left+a*l,y:i*e,width:l,height:e})})),t},[B,ae,E.length,re,$e.left,$e.width,$e.height]),ke=t.useCallback(e=>m(e.cell.x??S?.[e.index]??oe[e.index]??e.index,X),[S,oe,X]),ze=null===te?null:je.find(e=>e.row===te.row&&e.index===te.index)??null,Ae=null===ze?[]:[{seriesIndex:ze.row,color:ze.cell.color??f(me(ze.cell.value??0),C),value:ze.cell.value,formatted:ie(ze.cell.value??0),label:ze.cell.label}],Ne=Array.from({length:w},(e,l)=>f(l,C));return l(a,{...Q,size:V,variant:G,padded:J,className:O,legendSide:pe,legend:ge&&!ye?e(n,{steps:Ne,from:ie("diverging"===C?-reach(se,ce,I)+I:se),to:ie("diverging"===C?reach(se,ce,I)+I:ce),middle:"diverging"===C?ie(I):void 0,align:fe.align??"center",vertical:"left"===pe||"right"===pe,size:V}):null,table:ye?null:l("table",{id:le,className:z,children:[H?e("caption",{children:H}):null,e("thead",{children:l("tr",{children:[e("th",{scope:"col"}),oe.map((l,t)=>e("th",{scope:"col",children:m(l,X)},t))]})}),e("tbody",{children:ae.map((t,n)=>l("tr",{children:[e("th",{scope:"row",children:de[n]}),oe.map((l,n)=>{const i=t[n];return e("td",{children:void 0!==i?.label?i.label:null==i?.value?"":ie(i.value)},n)})]},n))})]}),children:[l("div",{ref:Y,role:"img",tabIndex:ye?void 0:0,"aria-label":H??ee.chart,"aria-describedby":ye?void 0:le,onPointerLeave:()=>ne(null),onBlur:()=>ne(null),onKeyDown:e=>{if(ve||0===je.length)return;const l=null===te?-1:je.findIndex(e=>e.row===te.row&&e.index===te.index);if("ArrowRight"===e.key||"ArrowDown"===e.key){const e=je[Math.min(je.length-1,l+1)];ne({row:e.row,index:e.index})}else if("ArrowLeft"===e.key||"ArrowUp"===e.key){const e=je[Math.max(0,(-1===l?je.length:l)-1)];ne({row:e.row,index:e.index})}else{if("Escape"!==e.key)return;ne(null)}e.preventDefault()},className:j("relative w-full rounded-(--plass-radius-xs)","focus-visible:[outline:2px_solid_var(--p-ring)] focus-visible:outline-offset-2"),style:{height:ue},children:[ye?e("div",{className:j("flex h-full items-center justify-center text-(--plass-muted-fg)",k[V]),children:W??ee.empty}):Z>0?l("svg",{width:Z,height:ue,viewBox:`0 0 ${Z} ${ue}`,"aria-hidden":"true",className:"block",children:[je.map(t=>{const n=me(t.cell.value??0),i=te?.row===t.row&&te?.index===t.index,a=Math.max(0,t.width-u),r=Math.max(0,t.height-u);if(a<=0||r<=0)return null;const d=ie(t.cell.value??0),h="treemap"===B?"all"===P?[ke(t),d]:[ke(t)]:"all"===P?[d]:[],s=h.filter(e=>function fits(e,l,t,n){return t>=1.8*n&&l>=Math.min(y(e,n),2.5*n)+8}(e,a,r/h.length,xe)),c=t.cell.color?"var(--plass-surface)":g(n,C);return l("g",{children:[e("rect",{x:t.x+u/2,y:t.y+u/2,width:a,height:r,rx:Math.min(3,a/2,r/2),fill:t.cell.color??f(n,C),opacity:i?1:.94,onPointerEnter:ve?void 0:()=>ne({row:t.row,index:t.index}),className:o}),s.map((l,n)=>e("text",{x:t.x+t.width/2,y:t.y+t.height/2+(n-(s.length-1)/2)*(xe+2),textAnchor:"middle",dominantBaseline:"central",fontSize:xe,fontWeight:0===n?500:400,fill:c,opacity:0===n?1:.85,pointerEvents:"none",className:0===n&&"treemap"===B?void 0:"tabular-nums",children:M(l,t.width-8,xe)},n))]},`${t.row}-${t.index}`)}),"grid"===B?be.texts.map((l,t)=>e("text",{x:$e.left-8,y:(t+.5)*$e.height/Math.max(1,E.length),textAnchor:"end",dominantBaseline:"central",fontSize:xe,fill:"var(--plass-muted-fg)",children:l},`row-${t}`)):null,"grid"===B?oe.map((l,t)=>{const n=$e.width/Math.max(1,re),i=m(l,X);return t%Math.max(1,Math.ceil((y(i,xe)+8)/Math.max(1,n)))!==0?null:e("text",{x:$e.left+(t+.5)*n,y:$e.height+xe,textAnchor:"middle",fontSize:xe,fill:"var(--plass-muted-fg)",children:i},`col-${t}`)}):null]}):null,ze&&!ve?we.render?e("div",{className:"pointer-events-none absolute z-10",style:{left:ze.x+ze.width/2,top:ze.y},children:we.render({index:ze.index,category:ze.cell.x??oe[ze.index]??ze.index,items:Ae})}):e(r,{heading:`${de[ze.row]} · ${ke(ze)}`,items:Ae,x:ze.x+ze.width/2,y:ze.y,flip:ze.x+ze.width/2>.6*Z,size:V}):null]}),ve?null:e(i,{heading:ze?`${de[ze.row]} · ${ke(ze)}`:void 0,items:Ae})]})}function reach(e,l,t){return Math.max(Math.abs(l-t),Math.abs(t-e))}
@@ -0,0 +1,2 @@
1
+ export { PlHeatmapChart } from './PlHeatmapChart.js';
2
+ export type { PlHeatmapChartProps } from './PlHeatmapChart.js';
@@ -0,0 +1 @@
1
+ export{PlHeatmapChart}from"./PlHeatmapChart.js";
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{transitionClasses as r}from"../../internal/styles.js";const t={solid:"[background-image:var(--p-fill)] text-(--p-on-solid)",glass:"border bg-(--p-soft) text-(--p-accent) [border-color:var(--p-line)]",ghost:"bg-transparent text-(--p-accent)"},o={regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},l=/[\p{L}\p{N}_]/u;function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function isWholeWord(e,n,r){const t=n>0?e[n-1]:"",o=r<e.length?e[r]:"";return!l.test(t)&&!l.test(o)}function markString(e,n,r,t){n.lastIndex=0;const o=[];let l,i=0;for(;null!==(l=n.exec(e));){if(""===l[0]){n.lastIndex+=1;continue}const s=l.index,a=s+l[0].length;r&&!isWholeWord(e,s,a)||(s>i&&o.push(e.slice(i,s)),o.push(t(l[0],`${s}`)),i=a)}return 0===o.length?e:(i<e.length&&o.push(e.slice(i)),o)}function markNode(e,r,t,o){if("string"==typeof e)return markString(e,r,t,o);if("number"==typeof e)return markString(String(e),r,t,o);if(Array.isArray(e))return n.Children.map(e,e=>markNode(e,r,t,o));if(n.isValidElement(e)){const l=e.props.children;return void 0===l||"function"==typeof l?e:n.cloneElement(e,void 0,markNode(l,r,t,o))}return e}export const PlHighlight=/* @__PURE__ */n.forwardRef(function PlHighlight({query:l,variant:i="solid",color:s="warning",caseSensitive:a=!1,wholeWord:c=!1,underline:p=!1,weight:u,className:d,style:f,children:g,...m},h){const x=n.useMemo(()=>function buildPattern(e,n){if(e instanceof RegExp)return new RegExp(e.source,e.global?e.flags:`${e.flags}g`);const r=(Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(Boolean).sort((e,n)=>n.length-e.length);return 0===r.length?null:new RegExp(r.map(escapeRegExp).join("|"),n?"gu":"giu")}(l,a),[l,a]),b=["-mx-0.5 rounded-[0.25rem] px-0.5","box-decoration-clone",t[i],p?"underline decoration-2 underline-offset-2":"",u?o[u]:"",r].filter(Boolean).join(" "),v=x?markNode(g,x,c,(n,r)=>e("mark",{className:b,children:n},r)):g;return e("span",{ref:h,className:d,style:{"--p-fill":`var(--plass-${s}-fill)`,"--p-on-solid":`var(--plass-${s}-on-solid)`,"--p-accent":`var(--plass-${s}-accent)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-line":`var(--plass-${s}-line)`,...f},...m,children:v})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{useDefaults as r}from"../../internal/defaults.js";import{transitionClasses as t}from"../../internal/styles.js";const o={solid:"[background-image:var(--p-fill)] text-(--p-on-solid)",glass:"border bg-(--p-soft) text-(--p-accent) [border-color:var(--p-line)]",ghost:"bg-transparent text-(--p-accent)"},l={regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},i=/[\p{L}\p{N}_]/u;function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function isWholeWord(e,n,r){const t=n>0?e[n-1]:"",o=r<e.length?e[r]:"";return!i.test(t)&&!i.test(o)}function markString(e,n,r,t){n.lastIndex=0;const o=[];let l,i=0;for(;null!==(l=n.exec(e));){if(""===l[0]){n.lastIndex+=1;continue}const s=l.index,a=s+l[0].length;r&&!isWholeWord(e,s,a)||(s>i&&o.push(e.slice(i,s)),o.push(t(l[0],`${s}`)),i=a)}return 0===o.length?e:(i<e.length&&o.push(e.slice(i)),o)}function markNode(e,r,t,o){if("string"==typeof e)return markString(e,r,t,o);if("number"==typeof e)return markString(String(e),r,t,o);if(Array.isArray(e))return n.Children.map(e,e=>markNode(e,r,t,o));if(n.isValidElement(e)){const l=e.props.children;return void 0===l||"function"==typeof l?e:n.cloneElement(e,void 0,markNode(l,r,t,o))}return e}export const PlHighlight=/* @__PURE__ */n.forwardRef(function PlHighlight({query:i,variant:s="solid",color:a,caseSensitive:c=!1,wholeWord:p=!1,underline:u=!1,weight:d,className:f,style:m,children:g,...h},x){const b=r(),v=a??b.color??"warning",y=n.useMemo(()=>function buildPattern(e,n){if(e instanceof RegExp)return new RegExp(e.source,e.global?e.flags:`${e.flags}g`);const r=(Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(Boolean).sort((e,n)=>n.length-e.length);return 0===r.length?null:new RegExp(r.map(escapeRegExp).join("|"),n?"gu":"giu")}(i,c),[i,c]),k=["-mx-0.5 rounded-[0.25rem] px-0.5","box-decoration-clone",o[s],u?"underline decoration-2 underline-offset-2":"",d?l[d]:"",t].filter(Boolean).join(" "),$=y?markNode(g,y,p,(n,r)=>e("mark",{className:k,children:n},r)):g;return e("span",{ref:x,className:f,style:{"--p-fill":`var(--plass-${v}-fill)`,"--p-on-solid":`var(--plass-${v}-on-solid)`,"--p-accent":`var(--plass-${v}-accent)`,"--p-soft":`var(--plass-${v}-soft)`,"--p-line":`var(--plass-${v}-line)`,...m},...h,children:$})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n,Fragment as a}from"react/jsx-runtime";import*as o from"react";import{controlHeightClasses as r,controlSlots as s,controlTextClasses as t,glassClasses as l,paddingXClasses as i,radiusClasses as m,srOnlyClasses as c,transitionClasses as d}from"../../internal/styles.js";const word=e=>({symbol:e,name:e}),p={mod:{mac:{symbol:"⌘",name:"Command"},windows:word("Ctrl"),linux:word("Ctrl")},meta:{mac:{symbol:"⌘",name:"Command"},windows:word("Win"),linux:word("Super")},ctrl:{mac:{symbol:"⌃",name:"Control"},windows:word("Ctrl"),linux:word("Ctrl")},alt:{mac:{symbol:"⌥",name:"Option"},windows:word("Alt"),linux:word("Alt")},shift:{mac:{symbol:"⇧",name:"Shift"},windows:word("Shift"),linux:word("Shift")},enter:{mac:{symbol:"↩",name:"Enter"},windows:word("Enter"),linux:word("Enter")},tab:{mac:{symbol:"⇥",name:"Tab"},windows:word("Tab"),linux:word("Tab")},escape:{mac:{symbol:"⎋",name:"Escape"},windows:word("Esc"),linux:word("Esc")},backspace:{mac:{symbol:"⌫",name:"Backspace"},windows:word("Backspace"),linux:word("Backspace")},delete:{mac:{symbol:"⌦",name:"Delete"},windows:word("Del"),linux:word("Del")},capslock:{mac:{symbol:"⇪",name:"Caps Lock"},windows:word("Caps Lock"),linux:word("Caps Lock")}},u={cmdorctrl:"mod",commandorcontrol:"mod",cmd:"meta",command:"meta",super:"meta",win:"meta",windows:"meta",control:"ctrl",option:"alt",opt:"alt",return:"enter",esc:"escape",del:"delete",caps:"capslock"},w={up:{symbol:"↑",name:"Arrow up"},down:{symbol:"↓",name:"Arrow down"},left:{symbol:"←",name:"Arrow left"},right:{symbol:"→",name:"Arrow right"},arrowup:{symbol:"↑",name:"Arrow up"},arrowdown:{symbol:"↓",name:"Arrow down"},arrowleft:{symbol:"←",name:"Arrow left"},arrowright:{symbol:"→",name:"Arrow right"}};function detectOS(){if("undefined"==typeof navigator)return"windows";const e=navigator.userAgentData,n=`${e?.platform??""} ${navigator.platform??""} ${navigator.userAgent??""}`;return/mac|iphone|ipad|ipod/i.test(n)?"mac":/win/i.test(n)?"windows":"linux"}function subscribe(){return()=>{}}function serverOS(){return"windows"}const b={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},f={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--p-tint)]"].join(" "),glass:/* @__PURE__ */[l,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--plass-shadow-ambient)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft)"},x={xs:"min-w-6",sm:"min-w-8",md:"min-w-10",lg:"min-w-12",xl:"min-w-14"};export const PlKbd=/* @__PURE__ */o.forwardRef(function PlKbd({variant:n="glass",size:a="md",density:o="compact",className:s,children:l,...c},p){const u=b[a];return e("kbd",{ref:p,className:["inline-flex shrink-0 items-center justify-center","font-mono leading-none font-medium tabular-nums whitespace-nowrap",r[u],t[u],x[u],i[o][u],m[u],f[n],d,s??""].filter(Boolean).join(" "),...c,children:l})});export const PlHotKeys=/* @__PURE__ */o.forwardRef(function PlHotKeys({variant:r="glass",size:t="md",color:l="secondary",density:i="compact",elevation:m=0,keys:d,cluster:b,os:f="auto",separator:x,className:y,style:g,...h},v){const k=function useDetectedOS(){return o.useSyncExternalStore(subscribe,detectOS,serverOS)}(),A="auto"===f?k:f,C={...s(l,m,r),...g},S={variant:r,size:t,density:i},j="xs"===t||"sm"===t?"gap-1":"gap-1.5";if(b)return n("span",{ref:v,className:["inline-flex flex-col items-center align-middle",j,y??""].filter(Boolean).join(" "),style:C,...h,children:[e(PlKbd,{...S,children:b.up}),n("span",{className:`inline-flex ${j}`,children:[e(PlKbd,{...S,children:b.left}),e(PlKbd,{...S,children:b.down}),e(PlKbd,{...S,children:b.right})]})]});const K=function tokenize(e){return Array.isArray(e)?e.map(e=>e.trim()).filter(Boolean):e.split("+").map(e=>e.trim()).filter(Boolean)}(d??[]).map(e=>function labelFor(e,n){const a=e.toLowerCase().replace(/[\s_-]/g,""),o=u[a]??a,r=w[o];if(r)return r;const s=p[o];return s?s[n]:word(1===e.length?e.toUpperCase():e)}(e,A)),P=void 0===x?"mac"===A?null:"+":x;return e("span",{ref:v,className:["inline-flex max-w-full items-center gap-1 align-middle",y??""].filter(Boolean).join(" "),style:C,...h,children:K.map((r,s)=>n(o.Fragment,{children:[s>0&&null!==P?e("span",{"aria-hidden":"true",className:"text-(--plass-muted-fg)",children:P}):null,e(PlKbd,{...S,children:r.symbol===r.name?r.symbol:n(a,{children:[e("span",{"aria-hidden":"true",children:r.symbol}),e("span",{className:c,children:r.name})]})})]},s))})});
1
+ "use client";import{jsx as e,jsxs as n,Fragment as s}from"react/jsx-runtime";import*as a from"react";import{useDefaults as l}from"../../internal/defaults.js";import{canonicalKey as r,detectOS as o}from"../../internal/keys.js";import{controlHeightClasses as t,controlSlots as i,controlTextClasses as m,glassClasses as c,paddingXClasses as d,radiusClasses as p,srOnlyClasses as u,transitionClasses as w}from"../../internal/styles.js";const word=e=>({symbol:e,name:e}),b={mod:{mac:{symbol:"⌘",name:"Command"},windows:word("Ctrl"),linux:word("Ctrl")},meta:{mac:{symbol:"⌘",name:"Command"},windows:word("Win"),linux:word("Super")},ctrl:{mac:{symbol:"⌃",name:"Control"},windows:word("Ctrl"),linux:word("Ctrl")},alt:{mac:{symbol:"⌥",name:"Option"},windows:word("Alt"),linux:word("Alt")},shift:{mac:{symbol:"⇧",name:"Shift"},windows:word("Shift"),linux:word("Shift")},enter:{mac:{symbol:"↩",name:"Enter"},windows:word("Enter"),linux:word("Enter")},tab:{mac:{symbol:"⇥",name:"Tab"},windows:word("Tab"),linux:word("Tab")},escape:{mac:{symbol:"⎋",name:"Escape"},windows:word("Esc"),linux:word("Esc")},backspace:{mac:{symbol:"⌫",name:"Backspace"},windows:word("Backspace"),linux:word("Backspace")},delete:{mac:{symbol:"⌦",name:"Delete"},windows:word("Del"),linux:word("Del")},capslock:{mac:{symbol:"⇪",name:"Caps Lock"},windows:word("Caps Lock"),linux:word("Caps Lock")}},f={up:{symbol:"↑",name:"Arrow up"},down:{symbol:"↓",name:"Arrow down"},left:{symbol:"←",name:"Arrow left"},right:{symbol:"→",name:"Arrow right"},arrowup:{symbol:"↑",name:"Arrow up"},arrowdown:{symbol:"↓",name:"Arrow down"},arrowleft:{symbol:"←",name:"Arrow left"},arrowright:{symbol:"→",name:"Arrow right"}};function subscribe(){return()=>{}}function serverOS(){return"windows"}const y={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},x={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--p-tint)]"].join(" "),glass:/* @__PURE__ */[c,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--plass-shadow-ambient)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft)"},h={xs:"min-w-6",sm:"min-w-8",md:"min-w-10",lg:"min-w-12",xl:"min-w-14"};export const PlKbd=/* @__PURE__ */a.forwardRef(function PlKbd({variant:n="glass",size:s="md",density:a="compact",className:l,children:r,...o},i){const c=y[s];return e("kbd",{ref:i,className:["inline-flex shrink-0 items-center justify-center","font-mono leading-none font-medium tabular-nums whitespace-nowrap",t[c],m[c],h[c],d[a][c],p[c],x[n],w,l??""].filter(Boolean).join(" "),...o,children:r})});export const PlHotKeys=/* @__PURE__ */a.forwardRef(function PlHotKeys({variant:t="glass",size:m,color:c,density:d,elevation:p=0,keys:w,cluster:y,os:x="auto",separator:h,className:g,style:v,...k},j){const A=l(),C=m??A.size??"md",K=c??A.color??"secondary",P=d??A.density??"compact",S=function useDetectedOS(){return a.useSyncExternalStore(subscribe,o,serverOS)}(),B="auto"===x?S:x,N={...i(K,p,t),...v},_={variant:t,size:C,density:P},E="xs"===C||"sm"===C?"gap-1":"gap-1.5";if(y)return n("span",{ref:j,className:["inline-flex flex-col items-center align-middle",E,g??""].filter(Boolean).join(" "),style:N,...k,children:[e(PlKbd,{..._,children:y.up}),n("span",{className:`inline-flex ${E}`,children:[e(PlKbd,{..._,children:y.left}),e(PlKbd,{..._,children:y.down}),e(PlKbd,{..._,children:y.right})]})]});const z=function tokenize(e){return Array.isArray(e)?e.map(e=>e.trim()).filter(Boolean):e.split("+").map(e=>e.trim()).filter(Boolean)}(w??[]).map(e=>function labelFor(e,n){const s=r(e),a=f[s];if(a)return a;const l=b[s];return l?l[n]:word(1===e.length?e.toUpperCase():e)}(e,B)),D=void 0===h?"mac"===B?null:"+":h;return e("span",{ref:j,className:["inline-flex max-w-full items-center gap-1 align-middle",g??""].filter(Boolean).join(" "),style:N,...k,children:z.map((l,r)=>n(a.Fragment,{children:[r>0&&null!==D?e("span",{"aria-hidden":"true",className:"text-(--plass-muted-fg)",children:D}):null,e(PlKbd,{..._,children:l.symbol===l.name?l.symbol:n(s,{children:[e("span",{"aria-hidden":"true",children:l.symbol}),e("span",{className:u,children:l.name})]})})]},r))})});
@@ -0,0 +1,94 @@
1
+ import * as React from 'react';
2
+ import type { PlassAlign, PlassSide, PlassStyleProps } from '../../types.js';
3
+ /**
4
+ * A hover card takes `size`, `color` and `density` and stops there, for
5
+ * `PlPopover`'s reasons: a popup that was asked for has already answered what
6
+ * `variant` asks, and a surface that genuinely floats is fixed at the top of the
7
+ * elevation ladder.
8
+ */
9
+ export interface PlHoverCardProps extends Pick<PlassStyleProps, 'size' | 'color' | 'density'>, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'title' | 'children'> {
10
+ /**
11
+ * What the card previews. Exactly one element, which must accept a ref and
12
+ * spread props — every Plass component does, and so does a bare `<a>`.
13
+ *
14
+ * Usually a link. A hover card is a look ahead at what is behind something,
15
+ * and the thing it is ahead of is nearly always somewhere you can go.
16
+ */
17
+ trigger: React.ReactElement;
18
+ /** The heading, rendered as the element that names the card. */
19
+ title?: React.ReactNode;
20
+ /** A line under the title. */
21
+ description?: React.ReactNode;
22
+ /** The body. */
23
+ children?: React.ReactNode;
24
+ /**
25
+ * Which edge of the trigger it appears on. Flips to the opposite side when
26
+ * there is no room.
27
+ * @default 'bottom'
28
+ */
29
+ side?: PlassSide;
30
+ /** Where it sits along that edge. @default 'center' */
31
+ align?: PlassAlign;
32
+ /** Distance from the trigger, in pixels. @default 8 */
33
+ sideOffset?: number;
34
+ /** Shift along that edge, in pixels. @default 0 */
35
+ alignOffset?: number;
36
+ /**
37
+ * How long the pointer has to rest on the trigger before it opens, in
38
+ * milliseconds.
39
+ *
40
+ * Long by default, and that is the whole difference between a helpful preview
41
+ * and a page that flinches. A card that opens the moment a pointer crosses a
42
+ * link opens on every link a reader passes on the way to somewhere else.
43
+ * @default 600
44
+ */
45
+ delay?: number;
46
+ /**
47
+ * How long it waits after the pointer leaves, in milliseconds.
48
+ *
49
+ * Not zero, and it cannot be: the gap between the trigger and the card is
50
+ * pointer-free, so a card that closed instantly could never be reached.
51
+ * @default 300
52
+ */
53
+ closeDelay?: number;
54
+ /** Draws the little wedge pointing at the trigger. @default false */
55
+ arrow?: boolean;
56
+ /** Whether the card is open. Use with `onOpenChange` for a controlled one. */
57
+ open?: boolean;
58
+ /** Whether it starts open, for an uncontrolled one. */
59
+ defaultOpen?: boolean;
60
+ onOpenChange?: (open: boolean) => void;
61
+ /**
62
+ * A hard cap on the card's width, overriding the one `size` implies. Numbers
63
+ * are pixels.
64
+ */
65
+ width?: number | string;
66
+ }
67
+ /**
68
+ * A preview of what is behind a link, shown when the pointer rests on it.
69
+ *
70
+ * The three floating surfaces are told apart by **what opens them and what you
71
+ * can do once they are open**, not by how they look:
72
+ *
73
+ * - A [PlTooltip](./tooltip) names the thing under the pointer. One phrase, and
74
+ * nothing inside it can be reached.
75
+ * - A **hover card** previews what is behind it. It opens on its own, it can be
76
+ * entered with the pointer, and it holds a title, a picture, a figure.
77
+ * - A [PlPopover](./popover) was asked for. It stays until it is dismissed, and
78
+ * it can be typed into.
79
+ *
80
+ * **Nothing may live only in here.** A card that opens on hover does not open
81
+ * for a finger, so a link, a button or a fact that exists nowhere else on the
82
+ * page is a link, a button or a fact that half the readers never get. Everything
83
+ * in it is a preview of something already reachable — which is what makes it
84
+ * safe to have at all.
85
+ *
86
+ * The delays are the component. `delay` is long so the card does not fire at
87
+ * every link a pointer crosses on the way somewhere else, and `closeDelay` is
88
+ * not zero because the gap between the trigger and the card has no pointer in
89
+ * it — a card that closed the moment the pointer left could never be reached.
90
+ *
91
+ * Base UI owns the anchoring, the flip at the window edge, the two delays, the
92
+ * dismissal and the `aria-describedby` wiring. What is left here is the surface.
93
+ */
94
+ export declare function PlHoverCard({ size: sizeProp, color: colorProp, density: densityProp, trigger, title, description, children, side, align, sideOffset, alignOffset, delay, closeDelay, arrow, open, defaultOpen, onOpenChange, width, className, style, ...props }: PlHoverCardProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as s}from"react/jsx-runtime";import{PreviewCard as a}from"@base-ui/react/preview-card";import{useDefaults as l}from"../../internal/defaults.js";import{cx as t,glassClasses as i,hasContent as r,metaTextClasses as o,radiusClasses as n,sheetBodyClasses as d,sheetHeaderGapClasses as p,sheetPaddingXClasses as c,sheetPaddingYClasses as m,sheetSectionGapClasses as f,sheetTitleClasses as g,surfaceSlots as h}from"../../internal/styles.js";const x={xs:"max-w-64",sm:"max-w-72",md:"max-w-sm",lg:"max-w-md",xl:"max-w-lg"},u=/* @__PURE__ */[i,"relative flex flex-col","border text-(--plass-fg) bg-(--plass-glass-press)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--plass-shadow-3),var(--plass-gloss-glass)]","[outline:none]","[transition:opacity_var(--plass-duration)_var(--plass-ease)]","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"].join(" "),v={xs:8,sm:9,md:10,lg:11,xl:12};export function PlHoverCard({size:i,color:y,density:w,trigger:b,title:N,description:O,children:j,side:z="bottom",align:k="center",sideOffset:P=8,alignOffset:C=0,delay:D=600,closeDelay:M=300,arrow:W=!1,open:_,defaultOpen:A,onOpenChange:B,width:E,className:H,style:L,...R}){const T=l(),$=i??T.size??"md",q=y??T.color??"primary",F=w??T.density??"default",G=v[$],I=r(N)||r(O);return s(a.Root,{open:_,defaultOpen:A,onOpenChange:e=>B?.(e),children:[e(a.Trigger,{delay:D,closeDelay:M,render:b}),e(a.Portal,{children:e(a.Positioner,{className:"plass-portal z-(--plass-z-portal) [outline:none]",side:z,align:k,sideOffset:P,alignOffset:C,children:s(a.Popup,{className:t(u,n[$],d[$],f[$],c[F][$],m[F][$],void 0===E?x[$]:"",H),style:{...h(q,3),...void 0===E?null:{maxWidth:"number"==typeof E?`${E}px`:E},...L},...R,children:[W?e(a.Arrow,{className:t("data-[side=top]:bottom-[-1px]","data-[side=bottom]:top-[-1px] data-[side=bottom]:rotate-180","data-[side=left]:right-[-1px] data-[side=left]:-rotate-90","data-[side=right]:left-[-1px] data-[side=right]:rotate-90"),children:s("svg",{width:G,height:G/2,viewBox:"0 0 10 5","aria-hidden":"true",className:"block",children:[e("path",{d:"M0 0h10L5 5z",fill:"var(--plass-glass-press)"}),e("path",{d:"M0 0 5 5 10 0",fill:"none",stroke:"var(--plass-glass-line)",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]})}):null,I?s("div",{className:t("flex min-w-0 flex-col",p[$]),children:[r(N)?e("div",{className:t("m-0 font-semibold",g[$]),children:N}):null,r(O)?e("div",{className:t("m-0 text-(--plass-muted-fg)",o[$]),children:O}):null]}):null,r(j)?e("div",{className:"min-w-0",children:j}):null]})})})]})}
@@ -0,0 +1,2 @@
1
+ export { PlHoverCard } from './PlHoverCard.js';
2
+ export type { PlHoverCardProps } from './PlHoverCard.js';
@@ -0,0 +1 @@
1
+ export{PlHoverCard}from"./PlHoverCard.js";
@@ -0,0 +1,87 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import { type PlassStepConnector, type PlassStepStatus } from '../../internal/steps.js';
4
+ import type { PlassColor, PlassDensity, PlassSize } from '../../types.js';
5
+ /** How far along one step is. The same three a `PlStepper` and a `PlTimeline` draw. */
6
+ export type PlHowToStepStatus = PlassStepStatus;
7
+ /** How the line between two steps is drawn. `none` leaves the gap open. */
8
+ export type PlHowToStepsConnector = PlassStepConnector;
9
+ export interface PlHowToStepsProps extends Omit<React.ComponentPropsWithoutRef<'ol'>, 'color'> {
10
+ /**
11
+ * Which step is being worked on now, as an index.
12
+ *
13
+ * Optional, and left out for the ordinary case: a set of instructions is
14
+ * something a reader works through at their own pace, and a guide that
15
+ * claimed to know where they had got to would be guessing. Pass it for a
16
+ * guide that genuinely knows — a setup wizard reporting what it has already
17
+ * done for them.
18
+ */
19
+ active?: number;
20
+ /**
21
+ * Numbers the steps.
22
+ *
23
+ * On by default, because that is what instructions are: "do this, then this"
24
+ * is an order and the number is how a reader finds their place again after
25
+ * looking away. Turn it off for a set of things to do in any order, which is
26
+ * a checklist rather than a how-to.
27
+ * @default true
28
+ */
29
+ numbered?: boolean;
30
+ /**
31
+ * The line between one step and the next.
32
+ * @default 'solid'
33
+ */
34
+ connector?: PlHowToStepsConnector;
35
+ /** @default 'md' */
36
+ size?: PlassSize;
37
+ /** @default 'primary' */
38
+ color?: PlassColor;
39
+ /** The space between steps. Never the type scale, never the bullet. */
40
+ density?: PlassDensity;
41
+ /** Renders something other than an `<ol>` — Base UI's own escape hatch. */
42
+ render?: useRender.RenderProp;
43
+ /** The `PlHowToStep`s. */
44
+ children?: React.ReactNode;
45
+ }
46
+ export interface PlHowToStepProps extends Omit<React.ComponentPropsWithoutRef<'li'>, 'title'> {
47
+ /** What the step is. The line the reader scans for. */
48
+ title?: React.ReactNode;
49
+ /**
50
+ * A glyph in place of the number. The step keeps its place in the order
51
+ * either way — what changes is only what is drawn in the disc.
52
+ */
53
+ icon?: React.ReactNode;
54
+ /** Overrides what the guide worked out from `active`. */
55
+ status?: PlHowToStepStatus;
56
+ /** What to do. */
57
+ children?: React.ReactNode;
58
+ }
59
+ /**
60
+ * Instructions, numbered, with what to do under each one.
61
+ *
62
+ * Three components put things in order and they answer different questions.
63
+ * A [PlStepper](../navigation/stepper) and a [PlTimeline](../display/timeline)
64
+ * both say **where you are** — one in a process the reader is moving through
65
+ * now, the other in a sequence that has already happened. This one says **what
66
+ * to do**, and that is the difference the shape follows from: every step's body
67
+ * is open at once, because somebody following instructions reads ahead, goes
68
+ * back a step, and works at their own pace.
69
+ *
70
+ * Which is also why `active` is optional here and not on the other two. A guide
71
+ * that claimed to know how far a reader had got would be guessing. Pass it only
72
+ * for the guide that genuinely knows.
73
+ *
74
+ * It is a real `<ol>` of `<li>`s, and the numbers a reader sees are the same
75
+ * ones the list carries. A screen reader announces "list, five items, item
76
+ * two" on its own — the position a heading per step would only approximate —
77
+ * which is what a reader who has looked away and come back is asking for.
78
+ */
79
+ export declare const PlHowToSteps: React.ForwardRefExoticComponent<PlHowToStepsProps & React.RefAttributes<HTMLOListElement>>;
80
+ /**
81
+ * One instruction.
82
+ *
83
+ * The number is the guide's, not the step's: a step never takes an index, and
84
+ * the list numbers its children as it walks them — so inserting one in the
85
+ * middle renumbers the rest without anything being edited.
86
+ */
87
+ export declare const PlHowToStep: React.ForwardRefExoticComponent<PlHowToStepProps & React.RefAttributes<HTMLLIElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{useRender as l}from"@base-ui/react/use-render";import{useDefaults as s}from"../../internal/defaults.js";import{bulletGapClasses as n,bulletSizeValues as o,bulletStatusClasses as a,connectorColorClasses as i,connectorStyleClasses as c,statusAt as d,titleStatusClasses as m}from"../../internal/steps.js";import{cx as p,hasContent as u,iconClasses as f,sheetBodyClasses as x,sheetTitleClasses as h,surfaceSlots as g}from"../../internal/styles.js";const v=/* @__PURE__ */r.createContext(null),w=/* @__PURE__ */r.createContext({index:0,last:!1}),y={default:{xs:"gap-4",sm:"gap-5",md:"gap-6",lg:"gap-7",xl:"gap-8"},compact:{xs:"gap-2.5",sm:"gap-3",md:"gap-4",lg:"gap-4",xl:"gap-5"}};export const PlHowToSteps=/* @__PURE__ */r.forwardRef(function PlHowToSteps({active:t,numbered:n=!0,connector:o="solid",size:a,color:i,density:c,render:d,className:m,style:u,children:f,...h},N){const b=s(),P=a??b.size??"md",j=i??b.color??"primary",H=c??b.density??"default",S=r.Children.toArray(f).filter(r.isValidElement),T=r.useMemo(()=>({size:P,density:H,color:j,active:t??null,numbered:n,connector:o}),[P,H,j,t,n,o]);return e(v.Provider,{value:T,children:l({render:d??e("ol",{}),ref:N,props:{className:p("m-0 flex list-none flex-col p-0",y[H][P],x[P],m),style:{...g(j,0),...u},children:S.map((t,r)=>e(w.Provider,{value:{index:r,last:r===S.length-1},children:t},t.key??r)),...h}})})});export const PlHowToStep=/* @__PURE__ */r.forwardRef(function PlHowToStep({title:l,icon:s,status:x,className:y,children:N,...b},P){const j=r.useContext(v),{index:H,last:S}=r.useContext(w);if(!j)throw new Error("PlHowToStep has to be inside a PlHowToSteps.");const{size:T,color:C,active:z,numbered:k,connector:E}=j,R=x??d(H,z),A=o[T];return t("li",{ref:P,"aria-current":"current"===R?"step":void 0,className:p("relative flex",n[T],y),style:g(C,0),...b,children:[t("div",{className:"flex flex-col items-center self-stretch",children:[e("span",{"aria-hidden":"true",className:p("flex shrink-0 items-center justify-center rounded-full font-semibold","text-[0.7em] leading-none",f,a[R]),style:{width:A,height:A},children:u(s)?s:k?H+1:null}),S||"none"===E?null:e("span",{"aria-hidden":"true",className:p("mt-1 w-0 flex-1 border-s-2",c[E],i[R])})]}),t("div",{className:"min-w-0 flex-1 pb-0.5",children:[u(l)?e("div",{className:p("font-semibold",h[T],m[R]),children:l}):null,u(N)?e("div",{className:p(u(l)?"mt-1":"","text-(--plass-muted-fg)"),children:N}):null]})]})});
@@ -0,0 +1,2 @@
1
+ export { PlHowToStep, PlHowToSteps } from './PlHowToSteps.js';
2
+ export type { PlHowToStepProps, PlHowToStepsConnector, PlHowToStepsProps, PlHowToStepStatus } from './PlHowToSteps.js';
@@ -0,0 +1 @@
1
+ export{PlHowToStep,PlHowToSteps}from"./PlHowToSteps.js";
@@ -0,0 +1,72 @@
1
+ import * as React from 'react';
2
+ import type { PlassColor, PlassSize } from '../../types.js';
3
+ /** How the picture is fitted to the box. `object-fit`'s own words. */
4
+ export type PlImageFit = 'cover' | 'contain' | 'fill' | 'none';
5
+ export interface PlImageProps extends Omit<React.ComponentPropsWithoutRef<'img'>, 'color' | 'onError' | 'onLoad'> {
6
+ /**
7
+ * The description a screen reader reads. **Required**, and `""` is a real
8
+ * answer: it marks the picture decorative and takes it off the accessibility
9
+ * tree, which is the right call for a background or a texture and the wrong
10
+ * one for anything a reader would miss.
11
+ */
12
+ alt: string;
13
+ /**
14
+ * The proportion the box holds while the picture is on its way, written the
15
+ * way CSS writes it — a number or `'16 / 9'`.
16
+ *
17
+ * This is what the component is really for. Without it the page has nothing
18
+ * to reserve, and every image that arrives late pushes the paragraph under it
19
+ * down the screen.
20
+ */
21
+ ratio?: number | string;
22
+ /** @default 'cover' */
23
+ fit?: PlImageFit;
24
+ /** Rounds the corners to the `size` step of the house ladder. @default false */
25
+ rounded?: boolean;
26
+ /** Which step of the radius ladder `rounded` uses. @default 'md' */
27
+ size?: PlassSize;
28
+ /** The family the skeleton and the focus ring take. @default 'primary' */
29
+ color?: PlassColor;
30
+ /**
31
+ * What is drawn while the picture is loading. A `PlSkeleton` by default;
32
+ * `null` draws nothing and leaves the reserved box empty.
33
+ */
34
+ placeholder?: React.ReactNode;
35
+ /**
36
+ * What is drawn when the picture does not arrive — a wrong URL, a dead host,
37
+ * a file that is not an image.
38
+ *
39
+ * A muted panel with the `alt` text in it by default, which is the one thing
40
+ * that is certainly available and certainly describes what is missing.
41
+ */
42
+ fallback?: React.ReactNode;
43
+ /**
44
+ * Opens the picture over the page when it is pressed.
45
+ *
46
+ * Off by default. A picture that grows when you click it is a promise that
47
+ * there is more of it to see, and most pictures on a page are not making it.
48
+ * @default false
49
+ */
50
+ preview?: boolean;
51
+ /** The accessible name of the preview overlay. @default 'Preview' */
52
+ previewLabel?: string;
53
+ /** Called when the picture has loaded, and when it has failed. */
54
+ onStatusChange?: (status: PlImageStatus) => void;
55
+ }
56
+ /** Where the picture has got to. */
57
+ export type PlImageStatus = 'loading' | 'loaded' | 'error';
58
+ /**
59
+ * A picture, and the two states a picture spends most of its life in.
60
+ *
61
+ * An `<img>` is one tag and it works, which is the reason to say what this adds
62
+ * rather than to assume it. Three things: the space is **reserved** before the
63
+ * picture arrives, so the paragraph under it does not move when it does; a
64
+ * failure is *drawn* rather than left as the browser's broken-image glyph and
65
+ * the alt text in a serif nobody chose; and the two are one state machine, so
66
+ * the placeholder is not still there behind a picture that has already loaded.
67
+ *
68
+ * `ratio` is what makes the first one work and is the prop worth reaching for
69
+ * every time. Without it there is nothing to reserve — the box is however tall
70
+ * the picture turns out to be, which is not known until it arrives.
71
+ */
72
+ export declare const PlImage: React.ForwardRefExoticComponent<PlImageProps & React.RefAttributes<HTMLImageElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,Fragment as o,jsxs as a}from"react/jsx-runtime";import*as l from"react";import{useDefaults as s}from"../../internal/defaults.js";import{useLabels as t}from"../../internal/labels.js";import{PlOverlay as r}from"../overlay/PlOverlay.js";import{PlSkeleton as n}from"../skeleton/PlSkeleton.js";import{cx as i,focusRingClasses as c,radiusClasses as m,transitionClasses as d}from"../../internal/styles.js";const p={cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"};export const PlImage=/* @__PURE__ */l.forwardRef(function PlImage({alt:f,src:u,ratio:b,fit:h="cover",rounded:g=!1,size:j,color:v,placeholder:y,fallback:x,preview:w=!1,previewLabel:N,onStatusChange:k,className:z,style:C,loading:P="lazy",...S},L){const E=s(),I=t(),O=N??I.preview,R=j??E.size??"md",$=v??E.color??"primary",[F,q]=l.useState("loading"),[A,B]=l.useState(!1);l.useEffect(()=>{q("loading")},[u]);const settle=e=>{q(e),k?.(e)},D=g?m[R]:"",G=e("img",{ref:L,src:u,alt:f,loading:P,onLoad:()=>settle("loaded"),onError:()=>settle("error"),className:i("block size-full",p[h],d,"loaded"===F?"opacity-100":"opacity-0","error"===F?"hidden":""),...S}),H=a(o,{children:[G,"loading"===F?e("span",{className:"absolute inset-0",children:void 0===y?e(n,{shape:"rect",color:$,size:R,width:"100%",height:"100%",className:D}):y}):null,"error"===F?e("span",{className:"absolute inset-0 flex items-center justify-center bg-(--plass-glass-press) p-3 text-center text-[0.8125rem] text-(--plass-muted-fg)",children:x??f}):null]}),J=i("relative block overflow-hidden",D,z),K={aspectRatio:b,...C};return w?a(o,{children:[e("button",{type:"button","aria-label":f?`${f} — ${O.toLowerCase()}`:O,onClick:()=>B(!0),disabled:"loaded"!==F,className:i(J,"cursor-zoom-in p-0",c),style:K,children:H}),e(r,{open:A,onOpenChange:B,tone:"glass",dismissible:!0,color:$,label:O,children:e("img",{src:u,alt:f,className:"max-h-[85vh] max-w-[90vw] object-contain"})})]}):e("span",{className:J,style:K,children:H})});
@@ -0,0 +1,2 @@
1
+ export { PlImage } from './PlImage.js';
2
+ export type { PlImageFit, PlImageProps, PlImageStatus } from './PlImage.js';
@@ -0,0 +1 @@
1
+ export{PlImage}from"./PlImage.js";
@@ -0,0 +1,74 @@
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 PlLineChartProps extends CartesianChartProps {
6
+ /**
7
+ * How the line gets from one point to the next.
8
+ *
9
+ * - `linear` — straight segments. The default, and the only one that claims
10
+ * nothing the data did not say.
11
+ * - `smooth` — a monotone cubic. Curved, but it will not dip below a value
12
+ * that both of its neighbours are above; a plain spline would.
13
+ * - `step` — held at each value until the next one. What a rate, a tier or a
14
+ * setting actually did between two readings, rather than a diagonal
15
+ * pretending it drifted.
16
+ * @default 'linear'
17
+ */
18
+ curve?: PlassChartCurve;
19
+ /**
20
+ * Dots on the points.
21
+ *
22
+ * `auto` — the default — draws them while there are few enough points for a
23
+ * dot to mean something, and stops at fourteen. Whatever this says, the point
24
+ * under the pointer always gets one: that is what tells the reader which
25
+ * column the tooltip is about.
26
+ * @default 'auto'
27
+ */
28
+ markers?: ChartMarkers;
29
+ /**
30
+ * Fades the line from a paler step of its own hue at the start to the full
31
+ * colour at the end, so the recent end of a long series is the loud one.
32
+ * @default false
33
+ */
34
+ gradient?: boolean;
35
+ /**
36
+ * Draws the line straight through a `null` instead of breaking at it.
37
+ *
38
+ * Off, and it should stay off unless the gap is an artefact of how the data
39
+ * was collected. A bridged gap is a number the chart made up.
40
+ * @default false
41
+ */
42
+ connectNulls?: boolean;
43
+ /**
44
+ * Which values are written on the line. `last` is the one to reach for — it
45
+ * names where each series ended up, which is the question a line chart is
46
+ * usually being asked.
47
+ * @default 'none'
48
+ */
49
+ valueLabels?: PlassChartValueLabels;
50
+ /**
51
+ * Stacks the series, each line riding on the total of the ones below it.
52
+ *
53
+ * Rare on a line chart and worth thinking twice about: the reader can follow
54
+ * the bottom series and the top total, and nothing in between. An
55
+ * [`PlAreaChart`](./area-chart) is the shape that makes stacking legible.
56
+ * @default false
57
+ */
58
+ stacked?: boolean;
59
+ }
60
+ /**
61
+ * A value against time, or against anything else with an order to it.
62
+ *
63
+ * The line is the mark that says *change*: it claims the space between two
64
+ * points is a journey rather than two separate facts, which is true of a
65
+ * temperature and false of four product categories. Reach for a
66
+ * [`PlBarChart`](./bar-chart) when the categories could be shuffled without losing
67
+ * anything.
68
+ *
69
+ * Everything around the line — the axes, the grid, the crosshair, the legend,
70
+ * the tooltip and the table a screen reader gets instead of the picture — comes
71
+ * from the shared frame, which is what makes a PlLineChart and a PlBarChart on one
72
+ * dashboard read as one drawing rather than two.
73
+ */
74
+ export declare function PlLineChart({ curve, markers, gradient, connectNulls, valueLabels, stacked, ...props }: PlLineChartProps): 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 t}from"../../internal/chart-frame.js";import{LineSeries as n}from"../../internal/chart-line.js";export function PlLineChart({curve:a="linear",markers:c="auto",gradient:i=!1,connectNulls:o=!1,valueLabels:l="none",stacked:s=!1,...m}){const u=r.useId().replace(/:/g,"");return e(t,{...m,stacked:s,inset:!0,includeZero:!1,headroom:"none"===l?0:10,children:r=>e(n,{context:r,curve:a,filled:!1,stacked:s,markers:c,valueLabels:l,connectNulls:o,gradient:i,idPrefix:u})})}
@@ -0,0 +1,2 @@
1
+ export { PlLineChart } from './PlLineChart.js';
2
+ export type { PlLineChartProps } from './PlLineChart.js';
@@ -0,0 +1 @@
1
+ export{PlLineChart}from"./PlLineChart.js";
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as s,Fragment as l}from"react/jsx-runtime";import*as r from"react";import{useRender as t}from"@base-ui/react/use-render";import{focusRingClasses as a,gapClasses as i,glassClasses as n,hasContent as o,iconClasses as d,metaTextClasses as c,paddingXClasses as p,radiusClasses as m,sheetBodyClasses as f,surfaceSlots as x,transitionClasses as u}from"../../internal/styles.js";const h=/* @__PURE__ */r.createContext({size:"md",density:"default",dividers:!1}),g={solid:/* @__PURE__ */[n,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[n,"border text-(--plass-fg) bg-(--plass-glass)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--plass-fg) bg-transparent"},v={default:{xs:"py-1",sm:"py-1.5",md:"py-2",lg:"py-2.5",xl:"py-3"},compact:{xs:"py-0.5",sm:"py-0.5",md:"py-1",lg:"py-1.5",xl:"py-2"}},y=p,b={xs:m.xs,sm:m.xs,md:m.sm,lg:m.sm,xl:m.md};export const PlList=/* @__PURE__ */r.forwardRef(function PlList({variant:s="glass",size:l="md",color:a="primary",density:i="default",elevation:n=0,dividers:o=!1,render:d,className:c,style:p,children:f,...v},y){const b=r.useMemo(()=>({size:l,density:i,dividers:o}),[l,i,o]),N=["flex flex-col",m[l],g[s],u,o?"overflow-hidden [&>li+li]:border-t [&>li+li]:[border-color:var(--plass-divider)]":"p-1",c??""].filter(Boolean).join(" "),j=t({render:d,ref:y,props:{role:"list",className:N,style:{...x(a,n),...p},children:f,...v}});return e(h.Provider,{value:b,children:j})});export const PlListItem=/* @__PURE__ */r.forwardRef(function PlListItem({startIcon:t,endIcon:n,description:p,action:m,href:x,selected:g=!1,disabled:N=!1,className:j,children:w,onClick:k,...C},P){const{size:z,density:B,dividers:I}=r.useContext(h),L=Boolean(k||x)&&!N,$=y[B][z],R=["flex min-w-0 flex-1 items-center text-start",$,v[B][z],i[z],f[z],u,d,I?"":b[z],N?"cursor-not-allowed opacity-50 saturate-[0.35]":g?"bg-(--p-soft-press) font-medium text-(--p-accent)":"",L?`cursor-pointer ${a}`:"",L&&!g?"hover:bg-(--p-soft)":"",L&&g?"hover:bg-(--p-soft-press)":""].filter(Boolean).join(" "),F=s(l,{children:[o(t)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:t}):null,s("span",{className:"flex min-w-0 flex-1 flex-col",children:[o(w)?e("span",{className:"truncate",children:w}):null,o(p)?e("span",{className:`truncate text-(--plass-muted-fg) ${c[z]}`,children:p}):null]}),o(n)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:n}):null]});return s("li",{ref:P,className:["flex w-full items-center",j??""].filter(Boolean).join(" "),...C,children:[L&&x?e("a",{href:x,className:R,"aria-current":g?"page":void 0,onClick:k,children:F}):L?e("button",{type:"button",className:R,"aria-current":!!g||void 0,onClick:k,children:F}):e("div",{className:R,"aria-disabled":N||void 0,children:F}),o(m)?e("div",{className:`flex shrink-0 items-center ${$}`,children:m}):null]})});
1
+ "use client";import{jsx as e,jsxs as s,Fragment as l}from"react/jsx-runtime";import*as r from"react";import{useDefaults as t}from"../../internal/defaults.js";import{useRender as a}from"@base-ui/react/use-render";import{focusRingClasses as i,gapClasses as n,glassClasses as o,hasContent as d,iconClasses as c,metaTextClasses as p,paddingXClasses as m,radiusClasses as f,sheetBodyClasses as x,surfaceSlots as u,transitionClasses as h}from"../../internal/styles.js";const g=/* @__PURE__ */r.createContext({size:"md",density:"default",dividers:!1}),v={solid:/* @__PURE__ */[o,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[o,"border text-(--plass-fg) bg-(--plass-glass)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--plass-fg) bg-transparent"},y={default:{xs:"py-1",sm:"py-1.5",md:"py-2",lg:"py-2.5",xl:"py-3"},compact:{xs:"py-0.5",sm:"py-0.5",md:"py-1",lg:"py-1.5",xl:"py-2"}},b=m,N={xs:f.xs,sm:f.xs,md:f.sm,lg:f.sm,xl:f.md};export const PlList=/* @__PURE__ */r.forwardRef(function PlList({variant:s="glass",size:l,color:i,density:n,elevation:o=0,dividers:d=!1,render:c,className:p,style:m,children:x,...y},b){const N=t(),j=l??N.size??"md",w=i??N.color??"primary",k=n??N.density??"default",z=r.useMemo(()=>({size:j,density:k,dividers:d}),[j,k,d]),C=["flex flex-col",f[j],v[s],h,d?"overflow-hidden [&>li+li]:border-t [&>li+li]:[border-color:var(--plass-divider)]":"p-1",p??""].filter(Boolean).join(" "),P=a({render:c,ref:b,props:{role:"list",className:C,style:{...u(w,o),...m},children:x,...y}});return e(g.Provider,{value:z,children:P})});export const PlListItem=/* @__PURE__ */r.forwardRef(function PlListItem({startIcon:t,endIcon:a,description:o,action:m,href:f,selected:u=!1,disabled:v=!1,className:j,children:w,onClick:k,...z},C){const{size:P,density:B,dividers:I}=r.useContext(g),L=Boolean(k||f)&&!v,$=b[B][P],R=["flex min-w-0 flex-1 items-center text-start",$,y[B][P],n[P],x[P],h,c,I?"":N[P],v?"cursor-not-allowed opacity-50 saturate-[0.35]":u?"bg-(--p-soft-press) font-medium text-(--p-accent)":"",L?`cursor-pointer ${i}`:"",L&&!u?"hover:bg-(--p-soft)":"",L&&u?"hover:bg-(--p-soft-press)":""].filter(Boolean).join(" "),F=s(l,{children:[d(t)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:t}):null,s("span",{className:"flex min-w-0 flex-1 flex-col",children:[d(w)?e("span",{className:"truncate",children:w}):null,d(o)?e("span",{className:`truncate text-(--plass-muted-fg) ${p[P]}`,children:o}):null]}),d(a)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:a}):null]});return s("li",{ref:C,className:["flex w-full items-center",j??""].filter(Boolean).join(" "),...z,children:[L&&f?e("a",{href:f,className:R,"aria-current":u?"page":void 0,onClick:k,children:F}):L?e("button",{type:"button",className:R,"aria-current":!!u||void 0,onClick:k,children:F}):e("div",{className:R,"aria-disabled":v||void 0,children:F}),d(m)?e("div",{className:`flex shrink-0 items-center ${$}`,children:m}):null]})});
@@ -197,7 +197,7 @@ export declare function PlMenuSubmenu({ label, startIcon, disabled, side, sideOf
197
197
  * variant for every shape a row can take, which is a component tree spelled as a
198
198
  * discriminated union.
199
199
  */
200
- export declare function PlMenu({ size, color, density, trigger, open, defaultOpen, onOpenChange, side, align, sideOffset, modal, openOnHover, loopFocus, disabled, className, style, children }: PlMenuProps): React.JSX.Element;
200
+ export declare function PlMenu({ size: sizeProp, color: colorProp, density: densityProp, trigger, open, defaultOpen, onOpenChange, side, align, sideOffset, modal, openOnHover, loopFocus, disabled, className, style, children }: PlMenuProps): React.JSX.Element;
201
201
  /**
202
202
  * The same menu, opened by a right-click or a long press instead of by a button.
203
203
  *
@@ -208,5 +208,5 @@ export declare function PlMenu({ size, color, density, trigger, open, defaultOpe
208
208
  * against an anchor, and the long press is what makes it reachable on a touch
209
209
  * screen at all.
210
210
  */
211
- export declare function PlContextMenu({ size, color, density, content, children, open, defaultOpen, onOpenChange, loopFocus, disabled, className, style }: PlContextMenuProps): React.JSX.Element;
211
+ export declare function PlContextMenu({ size: sizeProp, color: colorProp, density: densityProp, content, children, open, defaultOpen, onOpenChange, loopFocus, disabled, className, style }: PlContextMenuProps): React.JSX.Element;
212
212
  export {};