plass-ui 1.3.0 → 1.5.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 (454) hide show
  1. package/CHANGELOG.md +962 -0
  2. package/README.md +19 -17
  3. package/dist/components/accordion/PlAccordion.d.ts +1 -1
  4. package/dist/components/alert/PlAlert.js +1 -1
  5. package/dist/components/anchor/PlAnchor.d.ts +85 -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-marquee/PlAnimateMarquee.d.ts +13 -4
  28. package/dist/components/animate-marquee/PlAnimateMarquee.js +1 -1
  29. package/dist/components/animate-reveal/PlAnimateReveal.d.ts +51 -0
  30. package/dist/components/animate-reveal/PlAnimateReveal.js +1 -0
  31. package/dist/components/animate-reveal/index.d.ts +2 -0
  32. package/dist/components/animate-reveal/index.js +1 -0
  33. package/dist/components/animate-rotate/PlAnimateRotate.d.ts +2 -2
  34. package/dist/components/animate-rotate/PlAnimateRotate.js +1 -1
  35. package/dist/components/animate-scramble/PlAnimateScramble.d.ts +75 -0
  36. package/dist/components/animate-scramble/PlAnimateScramble.js +1 -0
  37. package/dist/components/animate-scramble/index.d.ts +2 -0
  38. package/dist/components/animate-scramble/index.js +1 -0
  39. package/dist/components/animate-shake/PlAnimateShake.d.ts +57 -0
  40. package/dist/components/animate-shake/PlAnimateShake.js +1 -0
  41. package/dist/components/animate-shake/index.d.ts +2 -0
  42. package/dist/components/animate-shake/index.js +1 -0
  43. package/dist/components/animate-slide/PlAnimateSlide.d.ts +2 -2
  44. package/dist/components/animate-slide/PlAnimateSlide.js +1 -1
  45. package/dist/components/animate-split/PlAnimateSplit.d.ts +57 -0
  46. package/dist/components/animate-split/PlAnimateSplit.js +1 -0
  47. package/dist/components/animate-split/index.d.ts +2 -0
  48. package/dist/components/animate-split/index.js +1 -0
  49. package/dist/components/animate-typing/PlAnimateTyping.d.ts +3 -2
  50. package/dist/components/animate-typing/PlAnimateTyping.js +1 -1
  51. package/dist/components/animate-zoom/PlAnimateZoom.d.ts +2 -2
  52. package/dist/components/animate-zoom/PlAnimateZoom.js +1 -1
  53. package/dist/components/app-logo/PlAppLogo.d.ts +78 -0
  54. package/dist/components/app-logo/PlAppLogo.js +1 -0
  55. package/dist/components/app-logo/index.d.ts +2 -0
  56. package/dist/components/app-logo/index.js +1 -0
  57. package/dist/components/area-chart/PlAreaChart.d.ts +54 -0
  58. package/dist/components/area-chart/PlAreaChart.js +1 -0
  59. package/dist/components/area-chart/index.d.ts +2 -0
  60. package/dist/components/area-chart/index.js +1 -0
  61. package/dist/components/aspect-ratio/PlAspectRatio.d.ts +2 -1
  62. package/dist/components/aspect-ratio/PlAspectRatio.js +1 -1
  63. package/dist/components/avatar/PlAvatar.js +1 -1
  64. package/dist/components/back-top/PlBackTop.d.ts +2 -1
  65. package/dist/components/back-top/PlBackTop.js +1 -1
  66. package/dist/components/badge/PlBadge.js +1 -1
  67. package/dist/components/bar-chart/PlBarChart.d.ts +63 -0
  68. package/dist/components/bar-chart/PlBarChart.js +1 -0
  69. package/dist/components/bar-chart/index.d.ts +2 -0
  70. package/dist/components/bar-chart/index.js +1 -0
  71. package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +3 -0
  72. package/dist/components/breadcrumb/PlBreadcrumb.js +1 -1
  73. package/dist/components/button/PlButton.d.ts +8 -0
  74. package/dist/components/button/PlButton.js +1 -1
  75. package/dist/components/button-group/PlButtonGroup.js +1 -1
  76. package/dist/components/calendar/PlCalendar.js +1 -1
  77. package/dist/components/card/PlCard.js +1 -1
  78. package/dist/components/carousel/PlCarousel.d.ts +1 -1
  79. package/dist/components/carousel/PlCarousel.js +1 -1
  80. package/dist/components/chat-bubble/PlChatBubble.d.ts +4 -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.d.ts +6 -2
  84. package/dist/components/chip/PlChip.js +1 -1
  85. package/dist/components/code-block/PlCodeBlock.d.ts +192 -0
  86. package/dist/components/code-block/PlCodeBlock.js +1 -0
  87. package/dist/components/code-block/index.d.ts +2 -0
  88. package/dist/components/code-block/index.js +1 -0
  89. package/dist/components/color-picker/PlColorPicker.js +1 -1
  90. package/dist/components/combobox/PlCombobox.d.ts +6 -5
  91. package/dist/components/combobox/PlCombobox.js +1 -1
  92. package/dist/components/command-palette/PlCommandPalette.d.ts +6 -2
  93. package/dist/components/command-palette/PlCommandPalette.js +1 -1
  94. package/dist/components/confirm/PlConfirmProvider.js +1 -1
  95. package/dist/components/container/PlContainer.d.ts +22 -6
  96. package/dist/components/container/PlContainer.js +1 -1
  97. package/dist/components/data-list/PlDataList.d.ts +74 -0
  98. package/dist/components/data-list/PlDataList.js +1 -0
  99. package/dist/components/data-list/index.d.ts +2 -0
  100. package/dist/components/data-list/index.js +1 -0
  101. package/dist/components/data-table/PlDataTable.d.ts +216 -0
  102. package/dist/components/data-table/PlDataTable.js +1 -0
  103. package/dist/components/data-table/index.d.ts +2 -0
  104. package/dist/components/data-table/index.js +1 -0
  105. package/dist/components/date-picker/PlDatePicker.js +1 -1
  106. package/dist/components/date-range-picker/PlDateRangePicker.js +1 -1
  107. package/dist/components/date-time-picker/PlDateTimePicker.js +1 -1
  108. package/dist/components/drawer/PlDrawer.d.ts +1 -1
  109. package/dist/components/drawer/PlDrawer.js +1 -1
  110. package/dist/components/file-picker/PlFilePicker.d.ts +4 -1
  111. package/dist/components/file-picker/PlFilePicker.js +1 -1
  112. package/dist/components/flex/PlFlex.d.ts +83 -0
  113. package/dist/components/flex/PlFlex.js +1 -0
  114. package/dist/components/flex/index.d.ts +2 -0
  115. package/dist/components/flex/index.js +1 -0
  116. package/dist/components/floating-action-button/PlFloatingActionButton.d.ts +81 -0
  117. package/dist/components/floating-action-button/PlFloatingActionButton.js +1 -0
  118. package/dist/components/floating-action-button/index.d.ts +2 -0
  119. package/dist/components/floating-action-button/index.js +1 -0
  120. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +3 -0
  121. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -1
  122. package/dist/components/footer/PlFooter.d.ts +4 -3
  123. package/dist/components/footer/PlFooter.js +1 -1
  124. package/dist/components/form/PlForm.js +1 -1
  125. package/dist/components/gallery/PlGallery.d.ts +192 -0
  126. package/dist/components/gallery/PlGallery.js +1 -0
  127. package/dist/components/gallery/PlGalleryViewer.d.ts +31 -0
  128. package/dist/components/gallery/PlGalleryViewer.js +1 -0
  129. package/dist/components/gallery/index.d.ts +2 -0
  130. package/dist/components/gallery/index.js +1 -0
  131. package/dist/components/gauge-chart/PlGaugeChart.d.ts +64 -0
  132. package/dist/components/gauge-chart/PlGaugeChart.js +1 -0
  133. package/dist/components/gauge-chart/index.d.ts +2 -0
  134. package/dist/components/gauge-chart/index.js +1 -0
  135. package/dist/components/grid/PlGrid.js +1 -1
  136. package/dist/components/grid/PlGridItem.js +1 -1
  137. package/dist/components/header/PlHeader.d.ts +4 -3
  138. package/dist/components/header/PlHeader.js +1 -1
  139. package/dist/components/heatmap-chart/PlHeatmapChart.d.ts +69 -0
  140. package/dist/components/heatmap-chart/PlHeatmapChart.js +1 -0
  141. package/dist/components/heatmap-chart/index.d.ts +2 -0
  142. package/dist/components/heatmap-chart/index.js +1 -0
  143. package/dist/components/highlight/PlHighlight.js +1 -1
  144. package/dist/components/hot-keys/PlHotKeys.js +1 -1
  145. package/dist/components/hover-card/PlHoverCard.d.ts +96 -0
  146. package/dist/components/hover-card/PlHoverCard.js +1 -0
  147. package/dist/components/hover-card/index.d.ts +2 -0
  148. package/dist/components/hover-card/index.js +1 -0
  149. package/dist/components/how-to-steps/PlHowToSteps.d.ts +87 -0
  150. package/dist/components/how-to-steps/PlHowToSteps.js +1 -0
  151. package/dist/components/how-to-steps/index.d.ts +2 -0
  152. package/dist/components/how-to-steps/index.js +1 -0
  153. package/dist/components/image/PlImage.d.ts +195 -8
  154. package/dist/components/image/PlImage.js +1 -1
  155. package/dist/components/image/PlImagePreview.d.ts +58 -0
  156. package/dist/components/image/PlImagePreview.js +1 -0
  157. package/dist/components/image/index.d.ts +1 -1
  158. package/dist/components/line-chart/PlLineChart.d.ts +74 -0
  159. package/dist/components/line-chart/PlLineChart.js +1 -0
  160. package/dist/components/line-chart/index.d.ts +2 -0
  161. package/dist/components/line-chart/index.js +1 -0
  162. package/dist/components/menu/PlMenu.d.ts +14 -5
  163. package/dist/components/menu/PlMenu.js +1 -1
  164. package/dist/components/meter/PlMeter.d.ts +83 -0
  165. package/dist/components/meter/PlMeter.js +1 -0
  166. package/dist/components/meter/index.d.ts +2 -0
  167. package/dist/components/meter/index.js +1 -0
  168. package/dist/components/mockup/PlMockup.d.ts +146 -0
  169. package/dist/components/mockup/PlMockup.js +1 -0
  170. package/dist/components/mockup/index.d.ts +2 -0
  171. package/dist/components/mockup/index.js +1 -0
  172. package/dist/components/modal/PlModal.d.ts +1 -1
  173. package/dist/components/modal/PlModal.js +1 -1
  174. package/dist/components/navigation-menu/PlNavigationMenu.d.ts +7 -1
  175. package/dist/components/navigation-menu/PlNavigationMenu.js +1 -1
  176. package/dist/components/number-field/PlNumberField.d.ts +1 -1
  177. package/dist/components/number-field/PlNumberField.js +1 -1
  178. package/dist/components/otp-field/PlOtpField.d.ts +6 -0
  179. package/dist/components/otp-field/PlOtpField.js +1 -1
  180. package/dist/components/overlay/PlOverlay.d.ts +1 -1
  181. package/dist/components/overlay/PlOverlay.js +1 -1
  182. package/dist/components/page-layout/PlPageLayout.js +1 -1
  183. package/dist/components/pagination/PlPagination.d.ts +12 -9
  184. package/dist/components/pagination/PlPagination.js +1 -1
  185. package/dist/components/panes/PlPanes.d.ts +7 -2
  186. package/dist/components/panes/PlPanes.js +1 -1
  187. package/dist/components/pie-chart/PlPieChart.d.ts +58 -0
  188. package/dist/components/pie-chart/PlPieChart.js +1 -0
  189. package/dist/components/pie-chart/index.d.ts +2 -0
  190. package/dist/components/pie-chart/index.js +1 -0
  191. package/dist/components/pill/PlPill.js +1 -1
  192. package/dist/components/popconfirm/PlPopconfirm.d.ts +1 -1
  193. package/dist/components/popconfirm/PlPopconfirm.js +1 -1
  194. package/dist/components/popover/PlPopover.d.ts +6 -6
  195. package/dist/components/popover/PlPopover.js +1 -1
  196. package/dist/components/portal/PlPortal.d.ts +78 -0
  197. package/dist/components/portal/PlPortal.js +1 -0
  198. package/dist/components/portal/index.d.ts +2 -0
  199. package/dist/components/portal/index.js +1 -0
  200. package/dist/components/progress-box/PlProgressBox.js +1 -1
  201. package/dist/components/progress-circular/PlProgressCircular.js +1 -1
  202. package/dist/components/progress-linear/PlProgressLinear.js +1 -1
  203. package/dist/components/radio-group/PlRadioGroup.js +1 -1
  204. package/dist/components/rating/PlRating.d.ts +1 -1
  205. package/dist/components/rating/PlRating.js +1 -1
  206. package/dist/components/scatter-chart/PlScatterChart.d.ts +46 -0
  207. package/dist/components/scatter-chart/PlScatterChart.js +1 -0
  208. package/dist/components/scatter-chart/index.d.ts +2 -0
  209. package/dist/components/scatter-chart/index.js +1 -0
  210. package/dist/components/scroll-area/PlScrollArea.d.ts +98 -0
  211. package/dist/components/scroll-area/PlScrollArea.js +1 -0
  212. package/dist/components/scroll-area/index.d.ts +2 -0
  213. package/dist/components/scroll-area/index.js +1 -0
  214. package/dist/components/scroll-zone/PlScrollZone.d.ts +27 -10
  215. package/dist/components/scroll-zone/PlScrollZone.js +1 -1
  216. package/dist/components/segmented-button/PlSegmentedButton.js +1 -1
  217. package/dist/components/select/PlSelect.js +1 -1
  218. package/dist/components/show/PlShow.d.ts +76 -0
  219. package/dist/components/show/PlShow.js +1 -0
  220. package/dist/components/show/index.d.ts +2 -0
  221. package/dist/components/show/index.js +1 -0
  222. package/dist/components/sidebar/PlSidebar.js +1 -1
  223. package/dist/components/sidebar/PlSidebarTrigger.js +1 -1
  224. package/dist/components/skeleton/PlSkeleton.js +1 -1
  225. package/dist/components/slider/PlSlider.d.ts +13 -1
  226. package/dist/components/slider/PlSlider.js +1 -1
  227. package/dist/components/sparkline/PlSparkline.d.ts +68 -0
  228. package/dist/components/sparkline/PlSparkline.js +1 -0
  229. package/dist/components/sparkline/index.d.ts +2 -0
  230. package/dist/components/sparkline/index.js +1 -0
  231. package/dist/components/spoiler/PlSpoiler.d.ts +16 -1
  232. package/dist/components/spoiler/PlSpoiler.js +1 -1
  233. package/dist/components/stack/PlStack.d.ts +114 -0
  234. package/dist/components/stack/PlStack.js +1 -0
  235. package/dist/components/stack/index.d.ts +2 -0
  236. package/dist/components/stack/index.js +1 -0
  237. package/dist/components/stat/PlStat.d.ts +4 -0
  238. package/dist/components/stat/PlStat.js +1 -1
  239. package/dist/components/stepper/PlStepper.d.ts +3 -3
  240. package/dist/components/stepper/PlStepper.js +1 -1
  241. package/dist/components/switch/PlSwitch.js +1 -1
  242. package/dist/components/table/PlTable.d.ts +5 -5
  243. package/dist/components/table/PlTable.js +1 -1
  244. package/dist/components/tabs/PlTabs.d.ts +27 -2
  245. package/dist/components/tabs/PlTabs.js +1 -1
  246. package/dist/components/text-link/PlTextLink.js +1 -1
  247. package/dist/components/time-picker/PlTimePicker.js +1 -1
  248. package/dist/components/timeline/PlTimeline.d.ts +2 -2
  249. package/dist/components/timeline/PlTimeline.js +1 -1
  250. package/dist/components/timeline-chart/PlTimelineChart.d.ts +44 -0
  251. package/dist/components/timeline-chart/PlTimelineChart.js +1 -0
  252. package/dist/components/timeline-chart/index.d.ts +2 -0
  253. package/dist/components/timeline-chart/index.js +1 -0
  254. package/dist/components/toast/PlToast.d.ts +1 -1
  255. package/dist/components/toast/PlToast.js +1 -1
  256. package/dist/components/toggle/PlToggle.js +1 -1
  257. package/dist/components/toggle/PlToggleGroup.js +1 -1
  258. package/dist/components/tooltip/PlTooltip.js +1 -1
  259. package/dist/components/tour/PlTour.d.ts +134 -0
  260. package/dist/components/tour/PlTour.js +1 -0
  261. package/dist/components/tour/index.d.ts +2 -0
  262. package/dist/components/tour/index.js +1 -0
  263. package/dist/components/transfer/PlTransfer.d.ts +10 -1
  264. package/dist/components/transfer/PlTransfer.js +1 -1
  265. package/dist/components/tree/PlTree.js +1 -1
  266. package/dist/components/tree-select/PlTreeSelect.d.ts +99 -0
  267. package/dist/components/tree-select/PlTreeSelect.js +1 -0
  268. package/dist/components/tree-select/index.d.ts +2 -0
  269. package/dist/components/tree-select/index.js +1 -0
  270. package/dist/components/typography/PlTypography.js +1 -1
  271. package/dist/components/window-pane/PlWindowPane.d.ts +179 -0
  272. package/dist/components/window-pane/PlWindowPane.js +1 -0
  273. package/dist/components/window-pane/index.d.ts +2 -0
  274. package/dist/components/window-pane/index.js +1 -0
  275. package/dist/css/anchor.css +2 -0
  276. package/dist/css/animate-counter.css +2 -0
  277. package/dist/css/animate-float.css +2 -0
  278. package/dist/css/animate-reveal.css +2 -0
  279. package/dist/css/animate-scramble.css +2 -0
  280. package/dist/css/animate-shake.css +2 -0
  281. package/dist/css/animate-split.css +2 -0
  282. package/dist/css/app-logo.css +2 -0
  283. package/dist/css/area-chart.css +3 -0
  284. package/dist/css/back-top.css +2 -0
  285. package/dist/css/bar-chart.css +3 -0
  286. package/dist/css/calendar.css +1 -0
  287. package/dist/css/carousel.css +2 -0
  288. package/dist/css/code-block.css +2 -0
  289. package/dist/css/color-picker.css +1 -0
  290. package/dist/css/combobox.css +1 -0
  291. package/dist/css/command-palette.css +1 -0
  292. package/dist/css/confirm.css +2 -0
  293. package/dist/css/data-list.css +2 -0
  294. package/dist/css/data-table.css +7 -0
  295. package/dist/css/date-picker.css +1 -0
  296. package/dist/css/date-range-picker.css +1 -0
  297. package/dist/css/date-time-picker.css +1 -0
  298. package/dist/css/flex.css +2 -0
  299. package/dist/css/floating-action-button.css +4 -0
  300. package/dist/css/gallery.css +7 -0
  301. package/dist/css/gauge-chart.css +3 -0
  302. package/dist/css/heatmap-chart.css +3 -0
  303. package/dist/css/hover-card.css +2 -0
  304. package/dist/css/how-to-steps.css +2 -0
  305. package/dist/css/icon-button.css +1 -0
  306. package/dist/css/image.css +2 -0
  307. package/dist/css/line-chart.css +3 -0
  308. package/dist/css/menubar.css +1 -0
  309. package/dist/css/meter.css +2 -0
  310. package/dist/css/mockup.css +2 -0
  311. package/dist/css/pagination.css +1 -0
  312. package/dist/css/pie-chart.css +3 -0
  313. package/dist/css/popconfirm.css +2 -0
  314. package/dist/css/portal.css +2 -0
  315. package/dist/css/scatter-chart.css +3 -0
  316. package/dist/css/scroll-area.css +2 -0
  317. package/dist/css/scroll-zone.css +2 -0
  318. package/dist/css/show.css +2 -0
  319. package/dist/css/sidebar.css +3 -0
  320. package/dist/css/sparkline.css +3 -0
  321. package/dist/css/spoiler.css +1 -0
  322. package/dist/css/stack.css +2 -0
  323. package/dist/css/stat.css +1 -0
  324. package/dist/css/time-picker.css +1 -0
  325. package/dist/css/timeline-chart.css +3 -0
  326. package/dist/css/tour.css +3 -0
  327. package/dist/css/transfer.css +4 -0
  328. package/dist/css/tree-select.css +4 -0
  329. package/dist/css/window-pane.css +2 -0
  330. package/dist/hooks/index.d.ts +6 -0
  331. package/dist/hooks/index.js +1 -1
  332. package/dist/hooks/usePlBreakpoint.d.ts +3 -0
  333. package/dist/hooks/usePlBreakpoint.js +1 -1
  334. package/dist/hooks/usePlDisclosure.d.ts +44 -0
  335. package/dist/hooks/usePlDisclosure.js +1 -0
  336. package/dist/hooks/usePlElementSize.d.ts +34 -0
  337. package/dist/hooks/usePlElementSize.js +1 -0
  338. package/dist/hooks/usePlHotKeys.d.ts +5 -1
  339. package/dist/hooks/usePlHotKeys.js +1 -1
  340. package/dist/hooks/usePlOnScreen.d.ts +54 -0
  341. package/dist/hooks/usePlOnScreen.js +1 -0
  342. package/dist/index.d.ts +34 -1
  343. package/dist/index.js +1 -1
  344. package/dist/internal/animate.d.ts +121 -7
  345. package/dist/internal/animate.js +1 -1
  346. package/dist/internal/breakpoints.d.ts +31 -0
  347. package/dist/internal/breakpoints.js +1 -0
  348. package/dist/internal/button-group.d.ts +29 -2
  349. package/dist/internal/button-group.js +2 -2
  350. package/dist/internal/calendar.d.ts +11 -36
  351. package/dist/internal/calendar.js +1 -1
  352. package/dist/internal/chart-frame.d.ts +462 -0
  353. package/dist/internal/chart-frame.js +1 -0
  354. package/dist/internal/chart-line.d.ts +44 -0
  355. package/dist/internal/chart-line.js +1 -0
  356. package/dist/internal/chart.d.ts +551 -0
  357. package/dist/internal/chart.js +1 -0
  358. package/dist/internal/color-scheme.js +1 -1
  359. package/dist/internal/data-table.d.ts +70 -0
  360. package/dist/internal/data-table.js +1 -0
  361. package/dist/internal/date.d.ts +10 -0
  362. package/dist/internal/date.js +1 -1
  363. package/dist/internal/defaults.d.ts +8 -3
  364. package/dist/internal/drag.d.ts +65 -0
  365. package/dist/internal/drag.js +1 -0
  366. package/dist/internal/focusable.d.ts +8 -0
  367. package/dist/internal/focusable.js +1 -0
  368. package/dist/internal/form.d.ts +61 -0
  369. package/dist/internal/form.js +1 -0
  370. package/dist/internal/format.d.ts +2 -0
  371. package/dist/internal/format.js +1 -1
  372. package/dist/internal/gallery.d.ts +80 -0
  373. package/dist/internal/gallery.js +1 -0
  374. package/dist/internal/glow.d.ts +17 -0
  375. package/dist/internal/glow.js +1 -0
  376. package/dist/internal/grid.d.ts +6 -27
  377. package/dist/internal/grid.js +1 -1
  378. package/dist/internal/highlight.d.ts +98 -0
  379. package/dist/internal/highlight.js +1 -0
  380. package/dist/internal/icons.d.ts +10 -0
  381. package/dist/internal/icons.js +1 -1
  382. package/dist/internal/image.d.ts +94 -0
  383. package/dist/internal/image.js +1 -0
  384. package/dist/internal/inert.d.ts +19 -0
  385. package/dist/internal/inert.js +1 -0
  386. package/dist/internal/keys.d.ts +19 -0
  387. package/dist/internal/keys.js +1 -1
  388. package/dist/internal/labels.d.ts +182 -0
  389. package/dist/internal/labels.js +1 -0
  390. package/dist/internal/link.d.ts +17 -0
  391. package/dist/internal/link.js +1 -1
  392. package/dist/internal/mockup.d.ts +193 -0
  393. package/dist/internal/mockup.js +1 -0
  394. package/dist/internal/page-layout.d.ts +14 -7
  395. package/dist/internal/page-layout.js +1 -1
  396. package/dist/internal/picker.d.ts +43 -6
  397. package/dist/internal/picker.js +1 -1
  398. package/dist/internal/progress.d.ts +22 -8
  399. package/dist/internal/progress.js +1 -1
  400. package/dist/internal/responsive.d.ts +108 -0
  401. package/dist/internal/responsive.js +1 -0
  402. package/dist/internal/scramble.d.ts +35 -0
  403. package/dist/internal/scramble.js +1 -0
  404. package/dist/internal/scroll-target.d.ts +5 -0
  405. package/dist/internal/scroll-target.js +1 -0
  406. package/dist/internal/steps.js +1 -1
  407. package/dist/internal/styles.d.ts +81 -0
  408. package/dist/internal/styles.js +1 -1
  409. package/dist/internal/table.d.ts +86 -0
  410. package/dist/internal/table.js +1 -0
  411. package/dist/internal/text.d.ts +39 -0
  412. package/dist/internal/text.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/watermark.d.ts +44 -0
  418. package/dist/internal/watermark.js +1 -0
  419. package/dist/internal/wheel.d.ts +52 -0
  420. package/dist/internal/wheel.js +1 -0
  421. package/dist/internal/window.d.ts +201 -0
  422. package/dist/internal/window.js +1 -0
  423. package/dist/locales/de.d.ts +3 -0
  424. package/dist/locales/de.js +1 -0
  425. package/dist/locales/en.d.ts +2 -0
  426. package/dist/locales/en.js +1 -0
  427. package/dist/locales/es.d.ts +3 -0
  428. package/dist/locales/es.js +1 -0
  429. package/dist/locales/fr.d.ts +3 -0
  430. package/dist/locales/fr.js +1 -0
  431. package/dist/locales/index.d.ts +33 -0
  432. package/dist/locales/index.js +1 -0
  433. package/dist/locales/ja.d.ts +3 -0
  434. package/dist/locales/ja.js +1 -0
  435. package/dist/locales/ko.d.ts +3 -0
  436. package/dist/locales/ko.js +1 -0
  437. package/dist/locales/zh-Hans.d.ts +3 -0
  438. package/dist/locales/zh-Hans.js +1 -0
  439. package/dist/provider/PlColorSchemeScript.js +1 -1
  440. package/dist/provider/PlassProvider.js +1 -1
  441. package/dist/provider/index.d.ts +1 -0
  442. package/dist/provider/index.js +1 -1
  443. package/dist/styles.css +1 -1
  444. package/dist/tailwind.css +1357 -25
  445. package/dist/tokens.css +1357 -25
  446. package/dist/types.d.ts +368 -2
  447. package/package.json +26 -16
  448. package/dist/components/avatar-group/PlAvatarGroup.d.ts +0 -47
  449. package/dist/components/avatar-group/PlAvatarGroup.js +0 -1
  450. package/dist/components/avatar-group/index.d.ts +0 -2
  451. package/dist/components/avatar-group/index.js +0 -1
  452. package/dist/css/avatar-group.css +0 -2
  453. package/dist/internal/avatar-group.d.ts +0 -25
  454. package/dist/internal/avatar-group.js +0 -2
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";const i={desktop:["macos","windows","linux"],tablet:["ipados","android"],mobile:["ios","android"]};export function resolveOs(e,t){const a=i[e];return t&&a.includes(t)?t:"ios"===t&&"tablet"===e?"ipados":"ipados"===t&&"mobile"===e?"ios":a[0]}export function defaultNotch(e,t){return"mobile"!==e?"none":"android"===t?"punch-hole":"dynamic-island"}export const resolutions={mobile:{xs:{width:320,height:568},sm:{width:360,height:780},md:{width:390,height:844},lg:{width:414,height:896},xl:{width:430,height:932}},tablet:{xs:{width:744,height:1133},sm:{width:768,height:1024},md:{width:820,height:1180},lg:{width:834,height:1194},xl:{width:1024,height:1366}},desktop:{xs:{width:1024,height:640},sm:{width:1280,height:800},md:{width:1440,height:900},lg:{width:1680,height:1050},xl:{width:1920,height:1200}}};const a={mobile:{thin:{bezel:{x:8,top:8,bottom:8},frameRadius:50,screenRadius:42},standard:{bezel:{x:13,top:13,bottom:13},frameRadius:56,screenRadius:43},thick:{bezel:{x:16,top:62,bottom:62},frameRadius:40,screenRadius:4}},tablet:{thin:{bezel:{x:12,top:12,bottom:12},frameRadius:34,screenRadius:22},standard:{bezel:{x:20,top:20,bottom:20},frameRadius:42,screenRadius:22},thick:{bezel:{x:28,top:74,bottom:74},frameRadius:36,screenRadius:4}},desktop:{thin:{bezel:{x:8,top:8,bottom:8},frameRadius:12,screenRadius:4},standard:{bezel:{x:13,top:13,bottom:30},frameRadius:16,screenRadius:4},thick:{bezel:{x:22,top:22,bottom:62},frameRadius:18,screenRadius:3}}},s={mobile:42,tablet:24,desktop:8};export function mockupMetrics(e){const{device:t,size:i,resolution:r,orientation:d,bezel:h,hardware:n}=e,o=r??resolutions[t][i],l="desktop"!==t&&"landscape"===d,c=l?{width:o.height,height:o.width}:o;if("none"===h)return{screen:c,bezel:{x:0,top:0,bottom:0},body:{...c},frame:{...c},frameRadius:s[t],screenRadius:s[t],stand:null,base:null};const u=a[t][h],p=l?{x:u.bezel.top,top:u.bezel.x,bottom:u.bezel.x}:u.bezel,g="desktop"===t&&"laptop"===n,m=g?{...p,bottom:p.top}:p,x={width:c.width+2*m.x,height:c.height+m.top+m.bottom};if("desktop"!==t)return{screen:c,bezel:m,body:x,frame:{...x},frameRadius:u.frameRadius,screenRadius:u.screenRadius,stand:null,base:null};if(g){const e={width:Math.round(1.075*x.width),height:Math.round(.035*x.height),lipWidth:Math.round(.12*x.width)};return{screen:c,bezel:m,body:x,frame:{width:e.width,height:x.height+e.height},frameRadius:u.frameRadius,screenRadius:u.screenRadius,stand:null,base:e}}const f={neckWidth:Math.round(.11*x.width),neckHeight:Math.round(.09*x.height),footWidth:Math.round(.28*x.width),footHeight:Math.round(.018*x.height)};return{screen:c,bezel:m,body:x,frame:{width:x.width,height:x.height+f.neckHeight+f.footHeight},frameRadius:u.frameRadius,screenRadius:u.screenRadius,stand:f,base:null}}export const finishSlots={graphite:{"--p-shell":"#2b2f38","--p-shell-edge":"rgb(255 255 255 / 0.16)","--p-shell-shade":"#181b22"},silver:{"--p-shell":"#cfd2d7","--p-shell-edge":"rgb(255 255 255 / 0.75)","--p-shell-shade":"#9ca1a9"},white:{"--p-shell":"#f3f4f6","--p-shell-edge":"rgb(255 255 255 / 0.9)","--p-shell-shade":"#c1c4ca"}};export const shellClasses="bg-(--p-shell) [box-shadow:inset_0_1px_0_var(--p-shell-edge),inset_0_0_0_1px_var(--p-shell-shade)]";export const elevationFilters=["none","drop-shadow(0 1px 2px var(--plass-shadow-ambient))","drop-shadow(0 2px 4px var(--plass-shadow-ambient)) drop-shadow(0 8px 12px var(--plass-shadow-ambient))","drop-shadow(0 4px 6px var(--plass-shadow-ambient)) drop-shadow(0 18px 28px var(--plass-shadow-ambient))"];export function PlMockupCutout({notch:t,screen:i,landscape:a}){if("none"===t)return null;const s=a?i.height:i.width,r={position:"absolute",background:"oklch(12% 0.006 262)",pointerEvents:"none",zIndex:20},d="plass-mockup-cutout";if("punch-hole"===t){const t=Math.max(16,Math.round(.07*s)),i=Math.round(.55*t);return e("div",{"aria-hidden":"true",className:d,style:{...r,width:t,height:t,borderRadius:"50%",...a?{left:i,top:"50%",marginTop:-t/2}:{top:i,left:"50%",marginLeft:-t/2}}})}if("dynamic-island"===t){const t=Math.max(96,Math.round(.32*s)),i=Math.round(.29*t),h=Math.round(.32*i);return e("div",{"aria-hidden":"true",className:d,style:{...r,borderRadius:i,...a?{left:h,top:"50%",width:i,height:t,marginTop:-t/2}:{top:h,left:"50%",width:t,height:i,marginLeft:-t/2}}})}const h=Math.max(120,Math.round(.42*s)),n=Math.round(.23*h),o=Math.round(.6*n);return e("div",{"aria-hidden":"true",className:d,style:{...r,...a?{left:0,top:"50%",width:n,height:h,marginTop:-h/2,borderRadius:`0 ${o}px ${o}px 0`}:{top:0,left:"50%",width:h,height:n,marginLeft:-h/2,borderRadius:`0 0 ${o}px ${o}px`}}})}const r="relative z-10 flex shrink-0 items-center [background:color-mix(in_oklab,var(--plass-surface)_88%,transparent)]",d="font-medium text-(--plass-fg) tabular-nums";function Tile({width:t,height:i,radius:a,tone:s="muted"}){return e("div",{style:{width:t,height:i??t,borderRadius:a,background:"accent"===s?"var(--p-accent)":"faint"===s?"color-mix(in oklab, var(--plass-fg) 12%, transparent)":"color-mix(in oklab, var(--plass-fg) 26%, transparent)"}})}function Tiles({count:t,size:i,radius:a,gap:s,accent:r=!1}){return e("div",{className:"flex items-center",style:{gap:s},children:Array.from({length:t},(t,s)=>e(Tile,{width:i,radius:a,tone:r&&0===s?"accent":"muted"},s))})}function SignalGlyph({height:i}){return t("svg",{viewBox:"0 0 17 11",height:i,width:17*i/11,fill:"currentColor","aria-hidden":"true",children:[e("rect",{y:"7.5",width:"3",height:"3.5",rx:"1"}),e("rect",{x:"4.7",y:"5",width:"3",height:"6",rx:"1"}),e("rect",{x:"9.4",y:"2.5",width:"3",height:"8.5",rx:"1"}),e("rect",{x:"14",width:"3",height:"11",rx:"1",opacity:"0.35"})]})}function WifiGlyph({height:i}){return t("svg",{viewBox:"0 0 16 12",height:i,width:16*i/12,fill:"none","aria-hidden":"true",children:[e("path",{d:"M1 4.2a10.5 10.5 0 0 1 14 0",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),e("path",{d:"M3.6 7a6.8 6.8 0 0 1 8.8 0",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),e("circle",{cx:"8",cy:"10.2",r:"1.6",fill:"currentColor"})]})}function BatteryGlyph({height:i}){return t("svg",{viewBox:"0 0 25 12",height:i,width:25*i/12,fill:"none","aria-hidden":"true",children:[e("rect",{x:"0.7",y:"0.7",width:"20.6",height:"10.6",rx:"3.2",stroke:"currentColor",strokeWidth:"1.3",opacity:"0.45"}),e("rect",{x:"2.6",y:"2.6",width:"12.8",height:"6.8",rx:"1.8",fill:"currentColor"}),e("rect",{x:"22.8",y:"4",width:"1.8",height:"4",rx:"0.9",fill:"currentColor",opacity:"0.45"})]})}function StatusGlyphs({height:i,gap:a}){return t("div",{className:"flex items-center text-(--plass-fg)",style:{gap:a},children:[e(SignalGlyph,{height:i}),e(WifiGlyph,{height:i}),e(BatteryGlyph,{height:i})]})}function NavGlyphs({size:i,gap:a}){return t("div",{className:"flex items-center justify-center text-(--plass-fg)",style:{gap:a,opacity:.72},children:[e("svg",{viewBox:"0 0 16 16",width:i,height:i,fill:"none","aria-hidden":"true",children:e("path",{d:"M10 3 5 8l5 5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}),e("svg",{viewBox:"0 0 16 16",width:i,height:i,fill:"none","aria-hidden":"true",children:e("circle",{cx:"8",cy:"8",r:"5",stroke:"currentColor",strokeWidth:"1.6"})}),e("svg",{viewBox:"0 0 16 16",width:i,height:i,fill:"none","aria-hidden":"true",children:e("rect",{x:"3.5",y:"3.5",width:"9",height:"9",rx:"1.6",stroke:"currentColor",strokeWidth:"1.6"})})]})}function StartGlyph({size:i}){return t("svg",{viewBox:"0 0 16 16",width:i,height:i,fill:"currentColor","aria-hidden":"true",children:[e("rect",{x:"1",y:"1",width:"6",height:"6",rx:"1.4"}),e("rect",{x:"9",y:"1",width:"6",height:"6",rx:"1.4"}),e("rect",{x:"1",y:"9",width:"6",height:"6",rx:"1.4"}),e("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1.4"})]})}export function mockupChrome(i){const{os:a,notch:s,landscape:h,time:n}=i;if("ios"===a||"ipados"===a){const i="ipados"===a,o=i?30:i||h||"none"===s||"punch-hole"===s?44:54;return{top:{size:o,node:t("div",{"aria-hidden":"true",className:`${r} justify-between`,style:{height:o,paddingInline:i?22:26},children:[e("span",{className:`${d} text-[15px]`,children:n}),e(StatusGlyphs,{height:i?11:12,gap:6})]})},bottom:{size:i?22:34,node:e("div",{"aria-hidden":"true",className:`${r} justify-center`,style:{height:i?22:34,background:"transparent"},children:e("div",{style:{width:i?220:140,height:5,borderRadius:3,background:"color-mix(in oklab, var(--plass-fg) 55%, transparent)"}})})}}}return"android"===a?{top:{size:34,node:t("div",{"aria-hidden":"true",className:`${r} justify-between`,style:{height:34,paddingInline:18},children:[e("span",{className:`${d} text-[13px]`,children:n}),e(StatusGlyphs,{height:11,gap:5})]})},bottom:{size:48,node:e("div",{"aria-hidden":"true",className:`${r} justify-center`,style:{height:48},children:e(NavGlyphs,{size:20,gap:72})})}}:"macos"===a?{top:{size:28,node:t("div",{"aria-hidden":"true",className:`${r} justify-between`,style:{height:28,paddingInline:16},children:[t("div",{className:"flex items-center",style:{gap:16},children:[e(Tile,{width:13,radius:4}),e(Tile,{width:34,height:7,radius:4}),e(Tile,{width:26,height:7,radius:4,tone:"faint"}),e(Tile,{width:30,height:7,radius:4,tone:"faint"}),e(Tile,{width:22,height:7,radius:4,tone:"faint"})]}),t("div",{className:"flex items-center",style:{gap:14},children:[e(Tile,{width:11,radius:3,tone:"faint"}),e(Tile,{width:11,radius:3,tone:"faint"}),e("span",{className:`${d} text-[13px]`,children:n})]})]})},bottom:{size:78,node:e("div",{"aria-hidden":"true",className:"flex shrink-0 items-end justify-center",style:{height:78},children:t("div",{className:`${r} [box-shadow:var(--plass-shadow-2),var(--plass-gloss-glass)]`,style:{gap:10,padding:8,marginBottom:10,borderRadius:22},children:[e(Tiles,{count:5,size:52,radius:14,gap:10,accent:!0}),e("div",{style:{width:1,height:44,background:"color-mix(in oklab, var(--plass-fg) 16%, transparent)"}}),e(Tiles,{count:2,size:52,radius:14,gap:10})]})})}}:"windows"===a?{bottom:{size:52,node:t("div",{"aria-hidden":"true",className:`${r} justify-center [border-block-start:1px_solid_var(--plass-border)]`,style:{height:52,paddingInline:16},children:[t("div",{className:"flex items-center",style:{gap:10},children:[e("div",{className:"text-(--plass-fg)",style:{opacity:.7},children:e(StartGlyph,{size:22})}),e(Tiles,{count:6,size:30,radius:8,gap:10,accent:!0})]}),t("div",{className:"absolute flex items-center",style:{insetInlineEnd:16,gap:12},children:[e(Tile,{width:11,radius:3,tone:"faint"}),e(Tile,{width:11,radius:3,tone:"faint"}),e("span",{className:`${d} text-[12px]`,children:n})]})]})}}:{top:{size:34,node:t("div",{"aria-hidden":"true",className:`${r} justify-center`,style:{height:34,paddingInline:14},children:[e("div",{className:"absolute",style:{insetInlineStart:14},children:e(Tile,{width:52,height:9,radius:5})}),e("span",{className:`${d} text-[13px]`,children:n}),t("div",{className:"absolute flex items-center",style:{insetInlineEnd:14,gap:10},children:[e(Tile,{width:10,radius:3,tone:"faint"}),e(Tile,{width:10,radius:3,tone:"faint"}),e(Tile,{width:10,radius:3,tone:"faint"})]})]})},start:{size:66,node:t("div",{"aria-hidden":"true",className:`${r} flex-col justify-start [border-inline-end:1px_solid_var(--plass-border)]`,style:{width:66,height:"100%",gap:10,paddingBlock:12},children:[e(Tile,{width:44,radius:12,tone:"accent"}),e(Tile,{width:44,radius:12}),e(Tile,{width:44,radius:12}),e(Tile,{width:44,radius:12})]})}}}
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { PlassDirection } from './direction.js';
2
3
  import type { PlassBreakpoint, PlassSide } from '../types.js';
3
4
  /**
4
5
  * The vocabulary a page's structure is written in, and the context the four
@@ -129,12 +130,18 @@ export declare function useCollapsed(breakpoint: PlPageLayoutCollapse): boolean;
129
130
  * question and a layout flips under RTL on its own. A drawer is attached to an
130
131
  * edge of the *window*, which `PlassSide` names physically for the same reason
131
132
  * a tooltip above a button is above it in every writing direction — so the two
132
- * have to be translated, and the document's own direction is what translates
133
- * them.
133
+ * have to be translated.
134
134
  *
135
- * Read during render rather than in an effect, which is safe here for a
136
- * narrower reason than it looks: the only caller is a sidebar that has already
137
- * collapsed, and collapsing is a client-side answer. There is no server render
138
- * of this to disagree with.
135
+ * `direction` is what the nearest `PlassProvider` was told, and it wins for the
136
+ * reason it wins there: a provider given a direction is describing a subtree
137
+ * that runs the other way from the page, and a drawer is portalled out of that
138
+ * subtree, so the document is the one place that cannot say which way it runs.
139
+ * Without one, the document's own direction is the answer, as it is for the
140
+ * provider.
141
+ *
142
+ * The document is read during render rather than in an effect, which is safe
143
+ * here for a narrower reason than it looks: the only caller is a sidebar that
144
+ * has already collapsed, and collapsing is a client-side answer. There is no
145
+ * server render of this to disagree with.
139
146
  */
140
- export declare function drawerSide(side: PlassSidebarSide): PlassSide;
147
+ export declare function drawerSide(side: PlassSidebarSide, direction?: PlassDirection): PlassSide;
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useMediaQuery as t}from"./media.js";export const PlPageLayoutContext=/* @__PURE__ */e.createContext({present:!1,register:()=>{},collapseBelow:"none",open:{start:!1,end:!1},setOpen:()=>{},scroll:"page"});export const PlassSidebarSideContext=/* @__PURE__ */e.createContext(null);const n={xs:null,sm:"(width < 40rem)",md:"(width < 48rem)",lg:"(width < 64rem)",xl:"(width < 80rem)"};export const collapsedOnlyClasses={none:"hidden",xs:"hidden",sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"};export const expandedOnlyClasses={none:"",xs:"",sm:"max-sm:hidden",md:"max-md:hidden",lg:"max-lg:hidden",xl:"max-xl:hidden"};export function useCollapsed(e){return t("none"===e?null:n[e])}export function drawerSide(e){const t="undefined"!=typeof document&&"rtl"===getComputedStyle(document.documentElement).direction;return"start"===e?t?"right":"left":t?"left":"right"}
1
+ "use client";import*as e from"react";import{belowQuery as t}from"./breakpoints.js";import{useMediaQuery as n}from"./media.js";export const PlPageLayoutContext=/* @__PURE__ */e.createContext({present:!1,register:()=>{},collapseBelow:"none",open:{start:!1,end:!1},setOpen:()=>{},scroll:"page"});export const PlassSidebarSideContext=/* @__PURE__ */e.createContext(null);export const collapsedOnlyClasses={none:"hidden",xs:"hidden",sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"};export const expandedOnlyClasses={none:"",xs:"",sm:"max-sm:hidden",md:"max-md:hidden",lg:"max-lg:hidden",xl:"max-xl:hidden"};export function useCollapsed(e){return n("none"===e?null:function collapseQuery(e){return"xs"===e?null:t(e)}(e))}export function drawerSide(e,t){const n=t?"rtl"===t:"undefined"!=typeof document&&"rtl"===getComputedStyle(document.documentElement).direction;return"start"===e?n?"right":"left":n?"left":"right"}
@@ -41,6 +41,41 @@ export declare function popupSlots(color: PlassColor, elevation: PlassElevation)
41
41
  export declare const pickerPopupClasses: string;
42
42
  /** The popup's own padding, one track tighter than a control's. */
43
43
  export declare const popupPaddingClasses: Record<PlassSize, string>;
44
+ export interface PopupArrowProps {
45
+ /**
46
+ * The `Arrow` part of whichever Base UI popup this is — `Popover.Arrow`,
47
+ * `PreviewCard.Arrow`, `Tooltip.Arrow`. Each of the three roots has its own,
48
+ * and only the primitive knows where to put it.
49
+ */
50
+ as: React.ElementType<{
51
+ className?: string;
52
+ children?: React.ReactNode;
53
+ }>;
54
+ /** How wide the wedge is, in pixels. Its height is half of that. */
55
+ size: number;
56
+ }
57
+ /**
58
+ * The wedge that points a floating sheet at what opened it.
59
+ *
60
+ * One drawing for all three, and it is the *stroked* one: a triangle filled
61
+ * with the sheet's own `--plass-glass-press`, with the hairline drawn along its
62
+ * two slanted sides only.
63
+ *
64
+ * Both of those are the glass rules rather than a preference. The fill is the
65
+ * same one declaration the plate carries, so the wedge stays on the plate's
66
+ * rung of the opacity ladder — a wedge stacked out of a line triangle and a
67
+ * fill triangle composites two translucent whites and comes out lighter than
68
+ * the sheet it grew from, which in the dark theme is 0.25 against the plate's
69
+ * 0.15. And `--plass-glass-line` is a cut edge rather than a colour to fill
70
+ * with, so it is stroked: on the two sides that are a cut edge, and not across
71
+ * the base, which is not one — the plate is on the other side of it.
72
+ *
73
+ * `non-scaling-stroke` is what keeps that hairline one pixel at every `size`.
74
+ * The path is written in a 10×5 viewBox and the box is drawn at whatever the
75
+ * component's ladder says, so a stroke that scaled would be thinner than the
76
+ * plate's border on a small sheet and thicker on a large one.
77
+ */
78
+ export declare function PopupArrow({ as: Arrow, size }: PopupArrowProps): React.JSX.Element;
44
79
  export interface PlassPickerShellProps extends PlassStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'children' | 'defaultValue'> {
45
80
  /**
46
81
  * Drop shadow depth of the *trigger*. `0`, like a `PlTextField`: a field is
@@ -88,11 +123,13 @@ interface InternalShellProps extends PlassPickerShellProps {
88
123
  open: boolean;
89
124
  onOpenChange: (open: boolean) => void;
90
125
  labels: PlassPickerLabels;
91
- /** `<input type="hidden">` rows, so the control submits with a form. */
92
- hiddenValues?: Array<{
93
- name: string;
94
- value: string;
95
- }>;
126
+ /** The name the value submits under. */
127
+ name?: string;
128
+ /**
129
+ * The value as a form submits it: one string, or one row per entry. An empty
130
+ * string, a list with an empty entry and an empty list are no value.
131
+ */
132
+ formValue: string | readonly string[];
96
133
  children: React.ReactNode;
97
134
  triggerRef?: React.Ref<HTMLButtonElement>;
98
135
  }
@@ -104,7 +141,7 @@ interface InternalShellProps extends PlassPickerShellProps {
104
141
  * and the way `invalid` re-points the whole colour family at `danger` so the
105
142
  * edge, the ring and the message turn over together.
106
143
  */
107
- export declare function PickerShell({ variant, size, color, density, elevation, label, description, error, invalid, startIcon, fullWidth, disabled, readOnly, required, id, className, classNames, style, display, samples, empty, clearable, onClear, open, onOpenChange, labels, hiddenValues, children, triggerRef, ...props }: InternalShellProps): React.JSX.Element;
144
+ export declare function PickerShell({ variant, size, color, density, elevation, label, description, error, invalid, startIcon, fullWidth, disabled, readOnly, required, id, className, classNames, style, display, samples, empty, clearable, onClear, open, onOpenChange, labels, name, formValue, children, triggerRef, ...props }: InternalShellProps): React.JSX.Element;
108
145
  /**
109
146
  * The row of shortcuts under a picker's panel.
110
147
  *
@@ -1 +1 @@
1
- import{jsx as e,jsxs as l}from"react/jsx-runtime";import*as s from"react";import{Field as a}from"@base-ui/react/field";import{Popover as r}from"@base-ui/react/popover";import{CloseIcon as t}from"./icons.js";import{WidthSizer as i}from"./sizer.js";import{chipRemoveClasses as n,controlHeightClasses as o,controlTextLeadingClasses as p,cx as d,disabledClasses as c,fieldReadOnlyClasses as u,fieldRestClasses as m,focusWithinRingClasses as f,gapClasses as h,glassClasses as g,iconClasses as x,metaTextClasses as b,paddingXClasses as v,radiusClasses as y,stackGapClasses as N,surfaceSlots as P,transitionClasses as j}from"./styles.js";export function popupSlots(e,l){return{...P(e,l),"--p-fill":`var(--plass-${e}-fill)`,"--p-on-solid":`var(--plass-${e}-on-solid)`}}const w=/* @__PURE__ */["group relative flex w-full items-center select-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",j,f,x].join(" ");export const pickerPopupClasses=/* @__PURE__ */[g,"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(" ");export const popupPaddingClasses={xs:"p-1.5",sm:"p-2",md:"p-2.5",lg:"p-3",xl:"p-3.5"};export function PickerShell({variant:f="glass",size:g="md",color:x="primary",density:j="default",elevation:k=0,label:C,description:$,error:z,invalid:O,startIcon:F,fullWidth:R=!1,disabled:S=!1,readOnly:q=!1,required:D=!1,id:I,className:_,classNames:B,style:E,display:L,samples:T,empty:V,clearable:W=!1,onClear:A,open:G,onOpenChange:H,labels:J,hiddenValues:K,children:M,triggerRef:Q,...U}){const X=s.useId(),Y=I??`${X}-trigger`,Z=`${X}-label`,ee=`${X}-description`,le=`${X}-error`,se=null!=z&&!1!==z&&""!==z,ae=O??se,re=ae?"danger":x,te=S||q,ie=[$?ee:null,se?le:null].filter(Boolean).join(" ")||void 0;return l(a.Root,{disabled:S,invalid:ae,className:d("flex-col align-top",N[g],R?"flex w-full":"inline-flex",_),style:{...P(re,k),...E},...U,children:[C?e(a.Label,{id:Z,htmlFor:Y,className:d(b[g],"font-semibold",S?"text-(--plass-muted-fg)":"text-(--plass-fg)",B?.label),children:C}):null,l(r.Root,{open:G,onOpenChange:e=>H(e),children:[l("span",{className:d(w,o[g],p[g],y[g],h[g],v[j][g],S?c[f]:q?u[f]:m[f],B?.control),children:[l(r.Trigger,{id:Y,ref:Q,disabled:S,"aria-labelledby":C?Z:void 0,"aria-describedby":ie,"aria-required":D||void 0,"aria-invalid":ae||void 0,className:d("flex min-w-0 flex-1 items-center bg-transparent text-start [font:inherit] text-inherit",h[g],"[outline:none]",te?"cursor-default":"cursor-pointer"),children:[F?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:F}):null,l("span",{className:"flex min-w-0 flex-1 flex-col",children:[e("span",{className:d("w-full truncate",V?"text-(--plass-muted-fg)":"text-(--plass-fg)"),children:L}),e(i,{samples:T??[]})]})]}),!W||V||te?null:e("button",{type:"button","aria-label":J.clear,className:d(n,"text-(--plass-muted-fg)"),onClick:e=>{e.stopPropagation(),A()},children:e(t,{})})]}),e(r.Portal,{children:e(r.Positioner,{className:"plass-portal z-(--plass-z-portal) [outline:none]",sideOffset:6,align:"start",children:e(r.Popup,{initialFocus:!1,className:d(pickerPopupClasses,y[g],popupPaddingClasses[g],p[g]),style:popupSlots(re,3),children:M})})})]}),$?e(a.Description,{id:ee,className:d(b[g],"text-(--plass-muted-fg)",B?.description),children:$}):null,se?e(a.Error,{id:le,match:!0,className:d(b[g],"text-(--p-accent)",B?.error),children:z}):null,K?.map((l,s)=>e("input",{type:"hidden",name:l.name,value:l.value},s))]})}export function PickerFooter({size:l,children:s}){return e("div",{className:d("flex items-center justify-end border-t pt-1.5","[border-color:var(--plass-divider)]",h[l]),children:s})}export function PickerDivider(){return e("div",{"aria-hidden":"true",className:"w-px self-stretch bg-(--plass-divider)"})}
1
+ import{jsx as e,jsxs as s}from"react/jsx-runtime";import*as a from"react";import{Field as t}from"@base-ui/react/field";import{Popover as l}from"@base-ui/react/popover";import{FormControl as r,leaveFormControl as i}from"./form.js";import{CloseIcon as o}from"./icons.js";import{WidthSizer as n}from"./sizer.js";import{chipRemoveClasses as d,controlHeightClasses as p,controlTextLeadingClasses as c,cx as u,disabledClasses as m,fieldReadOnlyClasses as f,fieldRestClasses as h,focusWithinRingClasses as g,gapClasses as x,glassClasses as b,iconClasses as v,metaTextClasses as y,paddingXClasses as N,radiusClasses as w,stackGapClasses as j,surfaceSlots as k,transitionClasses as P}from"./styles.js";export function popupSlots(e,s){return{...k(e,s),"--p-fill":`var(--plass-${e}-fill)`,"--p-on-solid":`var(--plass-${e}-on-solid)`}}const $=/* @__PURE__ */["group relative flex w-full items-center select-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",P,g,v].join(" ");export const pickerPopupClasses=/* @__PURE__ */[b,"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(" ");export const popupPaddingClasses={xs:"p-1.5",sm:"p-2",md:"p-2.5",lg:"p-3",xl:"p-3.5"};const C=/* @__PURE__ */["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"].join(" ");export function PopupArrow({as:a,size:t}){return e(a,{className:C,children:s("svg",{width:t,height:t/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"})]})})}export function PickerShell({variant:g="glass",size:b="md",color:v="primary",density:P="default",elevation:C=0,label:z,description:B,error:I,invalid:O,startIcon:R,fullWidth:q=!1,disabled:D=!1,readOnly:E=!1,required:F=!1,id:S,className:L,classNames:M,style:V,display:W,samples:_,empty:A,clearable:T=!1,onClear:G,open:H,onOpenChange:J,labels:K,name:Q,formValue:U,children:X,triggerRef:Y,...Z}){const ee=a.useId(),se=S??`${ee}-trigger`,ae=`${ee}-label`,te=`${ee}-value`,le=`${ee}-description`,re=`${ee}-error`,ie=null!=I&&!1!==I&&""!==I,oe=O??ie,ne=oe?"danger":v,de=D||E,pe=a.useRef(null);return s(t.Root,{disabled:D,invalid:oe,className:u("flex-col align-top",j[b],q?"flex w-full":"inline-flex",L),style:{...k(ne,C),...V},...Z,children:[z?e(t.Label,{id:ae,htmlFor:se,className:u(y[b],"font-semibold",D?"text-(--plass-muted-fg)":"text-(--plass-fg)",M?.label),children:z}):null,s(l.Root,{open:H,onOpenChange:e=>J(e),children:[s("span",{className:u($,p[b],c[b],w[b],x[b],N[P][b],D?m[g]:E?f[g]:h[g],M?.control),children:[e(t.Validity,{children:({validity:a})=>{const t=!1===a.valid,r=[B?le:null,ie||t&&!D&&!0!==O?re:null].filter(Boolean).join(" ")||void 0;return s(l.Trigger,{id:se,ref:Y,disabled:D,"aria-labelledby":z?`${ae} ${te}`:void 0,"aria-describedby":r,"aria-required":F||void 0,"aria-invalid":oe||t||void 0,onBlur:()=>{H||i(pe.current)},className:u("flex min-w-0 flex-1 items-center bg-transparent text-start [font:inherit] text-inherit",x[b],"[outline:none]",de?"cursor-default":"cursor-pointer"),children:[R?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:R}):null,s("span",{className:"flex min-w-0 flex-1 flex-col",children:[e("span",{id:te,className:u("w-full truncate",A?"text-(--plass-muted-fg)":"text-(--plass-fg)"),children:W}),q?null:e(n,{samples:_??[]})]})]})}}),!T||A||de?null:e("button",{type:"button","aria-label":K.clear,className:u(d,"text-(--plass-muted-fg)"),onClick:e=>{e.stopPropagation(),G()},children:e(o,{})})]}),e(l.Portal,{children:e(l.Positioner,{className:"plass-portal z-(--plass-z-portal) [outline:none]",sideOffset:6,align:"start",children:e(l.Popup,{initialFocus:!1,className:u(pickerPopupClasses,w[b],popupPaddingClasses[b],c[b]),style:popupSlots(ne,3),children:X})})})]}),B?e(t.Description,{id:le,className:u(y[b],"text-(--plass-muted-fg)",M?.description),children:B}):null,e(t.Error,ie?{id:re,match:!0,className:u(y[b],"text-(--p-accent)",M?.error),children:I}:{id:re,className:u(y[b],"text-(--p-accent)",M?.error)}),e(r,{ref:pe,name:Q,value:U,required:F&&!E,disabled:D,standIn:()=>pe.current?.ownerDocument.getElementById(se)})]})}export function PickerFooter({size:s,children:a}){return e("div",{className:u("flex items-center justify-end border-t pt-1.5","[border-color:var(--plass-divider)]",x[s]),children:a})}export function PickerDivider(){return e("div",{"aria-hidden":"true",className:"w-px self-stretch bg-(--plass-divider)"})}
@@ -8,6 +8,12 @@
8
8
  *
9
9
  * What is left in each component is the shape, which is the point: it is the
10
10
  * only thing that genuinely differs.
11
+ *
12
+ * `PlMeter` borrows the groove, the thickness ladder, the fill slots and the
13
+ * clamp from here without being one of the three. It is the same channel cut
14
+ * into the same surface; what it reports is a quantity that is already known
15
+ * rather than something advancing, which is why it keeps its own props and its
16
+ * own role.
11
17
  */
12
18
  import type * as React from 'react';
13
19
  import type { PlassColor, PlassSize } from '../types.js';
@@ -114,7 +120,13 @@ export declare const plateGapClasses: Record<PlassSize, string>;
114
120
  * also why the movement is on `width` and never on the paint: a gradient cannot
115
121
  * be transitioned, and a length can.
116
122
  */
117
- export declare const trackClasses = "bg-(--plass-track)";
123
+ export declare const trackClasses = "bg-(--plass-track) forced-colors:border forced-colors:[border-color:CanvasText]";
124
+ /**
125
+ * The filled part of a track. Forced-colours mode drops the gradient and
126
+ * repaints the groove in the page's colour, so there the track gets an edge and
127
+ * the fill the system's highlight.
128
+ */
129
+ export declare const fillClasses = "[background-image:var(--p-fill)] forced-colors:[background-color:Highlight] forced-colors:[border-color:Highlight] forced-colors:[color:HighlightText]";
118
130
  /** The bar's own duration, one step slower than a control's, so a fill reads as travel. */
119
131
  export declare const fillTransitionClasses = "[transition:width_var(--plass-duration-slow)_var(--plass-ease)]";
120
132
  /**
@@ -128,13 +140,15 @@ export declare function progressFraction(value: number | null | undefined, min:
128
140
  /**
129
141
  * What the value reads as, both on screen and to a screen reader.
130
142
  *
131
- * Base UI's own default is `${value}%`, which is right only when the range
132
- * happens to be 0–100 — "3%" for step 3 of 4 is worse than saying nothing. So
133
- * the percentage is computed from the fraction, and a caller who passed
134
- * `format` gets Base UI's formatted string instead, because at that point they
135
- * have said what the number means.
143
+ * Without `format` it is a percentage of the range rather than of 100 — "3%"
144
+ * for step 3 of 4 is worse than saying nothing — written in `locale`, so a page
145
+ * in German reads "75 %". Base UI's own default is that percentage too, but it
146
+ * reads a value that is not finite as indeterminate where `progressFraction`
147
+ * clamps it, so the percentage is written here from the fraction. A caller who
148
+ * passed `format` gets Base UI's formatted string, in the same `locale`, because
149
+ * at that point they have said what the number means.
136
150
  */
137
- export declare function progressText(fraction: number | null, formatted: string | null, hasFormat: boolean): string | null;
151
+ export declare function progressText(fraction: number | null, formatted: string | null, hasFormat: boolean, locale: string | undefined): string | null;
138
152
  /**
139
153
  * The same string, shaped for Base UI's `getAriaValueText`.
140
154
  *
@@ -142,4 +156,4 @@ export declare function progressText(fraction: number | null, formatted: string
142
156
  * to Base UI — it already announces indeterminate progress, and re-inventing
143
157
  * that here would be one more English string the library has to own.
144
158
  */
145
- export declare function progressAriaText(fraction: number | null, hasFormat: boolean): ((formatted: string | null) => string) | undefined;
159
+ export declare function progressAriaText(fraction: number | null, hasFormat: boolean, locale: string | undefined): ((formatted: string | null) => string) | undefined;
@@ -1 +1 @@
1
- export function progressSlots(s){return{"--p-fill":`var(--plass-${s}-fill)`,"--p-solid":`var(--plass-${s}-solid)`,"--p-solid-to":`var(--plass-${s}-solid-to)`,"--p-accent":`var(--plass-${s}-accent)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-soft-press":`var(--plass-${s}-soft-press)`}}export const barThicknessClasses={xs:"h-1",sm:"h-1.5",md:"h-1.5",lg:"h-2",xl:"h-2.5"};export const ringDiameters={xs:14,sm:16,md:20,lg:26,xl:32};export const ringStrokes={xs:1.5,sm:1.75,md:2,lg:2.5,xl:3};export const plateSizeClasses={xs:"size-2",sm:"size-2.5",md:"size-3",lg:"size-4",xl:"size-5"};export const plateRadiusClasses={xs:"rounded-[0.1875rem]",sm:"rounded-[0.25rem]",md:"rounded-[0.28125rem]",lg:"rounded-[0.375rem]",xl:"rounded-[0.4375rem]"};export const plateGapClasses={xs:"gap-1",sm:"gap-1",md:"gap-1.5",lg:"gap-1.5",xl:"gap-2"};export const trackClasses="bg-(--plass-track)";export const fillTransitionClasses="[transition:width_var(--plass-duration-slow)_var(--plass-ease)]";export function progressFraction(s,r,e){return null==s||Number.isNaN(s)||e<=r?null:Math.min(1,Math.max(0,(s-r)/(e-r)))}export function progressText(s,r,e){return null===s?null:e?r:`${Math.round(100*s)}%`}export function progressAriaText(s,r){if(null!==s)return e=>progressText(s,e,r)??""}
1
+ import{numberFormatter as s}from"./format.js";import{forcedFieldEdgeClasses as r,forcedFillClasses as e}from"./styles.js";export function progressSlots(s){return{"--p-fill":`var(--plass-${s}-fill)`,"--p-solid":`var(--plass-${s}-solid)`,"--p-solid-to":`var(--plass-${s}-solid-to)`,"--p-accent":`var(--plass-${s}-accent)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-soft-press":`var(--plass-${s}-soft-press)`}}export const barThicknessClasses={xs:"h-1",sm:"h-1.5",md:"h-1.5",lg:"h-2",xl:"h-2.5"};export const ringDiameters={xs:14,sm:16,md:20,lg:26,xl:32};export const ringStrokes={xs:1.5,sm:1.75,md:2,lg:2.5,xl:3};export const plateSizeClasses={xs:"size-2",sm:"size-2.5",md:"size-3",lg:"size-4",xl:"size-5"};export const plateRadiusClasses={xs:"rounded-[0.1875rem]",sm:"rounded-[0.25rem]",md:"rounded-[0.28125rem]",lg:"rounded-[0.375rem]",xl:"rounded-[0.4375rem]"};export const plateGapClasses={xs:"gap-1",sm:"gap-1",md:"gap-1.5",lg:"gap-1.5",xl:"gap-2"};export const trackClasses=`bg-(--plass-track) ${r}`;export const fillClasses=`[background-image:var(--p-fill)] ${e}`;export const fillTransitionClasses="[transition:width_var(--plass-duration-slow)_var(--plass-ease)]";export function progressFraction(s,r,e){return null==s||Number.isNaN(s)||e<=r?null:Math.min(1,Math.max(0,(s-r)/(e-r)))}const t={style:"percent"};export function progressText(r,e,o,l){return null===r?null:o?e:s(l,t).format(r)}export function progressAriaText(s,r,e){if(null!==s)return t=>progressText(s,t,r,e)??""}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * The one shape a value takes when it changes with the width of the window, and
3
+ * the one way it reaches CSS.
4
+ *
5
+ * It started as `PlGrid`'s private arithmetic and is here because a second
6
+ * component wanted it — and because the *rule* is the interesting part, not the
7
+ * code: a bare value applies everywhere, a map applies each entry from its own
8
+ * breakpoint up, and a rung that was not named inherits the one below it.
9
+ * `usePlBreakpointValue` resolves the same shape in JavaScript, so a caller who
10
+ * has learned it once has learned all of it.
11
+ *
12
+ * ## Where the resolving happens, and why it is two places
13
+ *
14
+ * A responsive value that only decides **style** is resolved in **CSS**:
15
+ * `responsiveSlots` writes one `--p-{name}-{rung}` per rung the caller named,
16
+ * and the `@variant` blocks in `styles.css` cascade each slot down from the
17
+ * rung above. That is what `PlGrid` and `PlContainer` use, and what makes them
18
+ * free: no resize listener, no re-render, and a server render that is already
19
+ * correct at every width because the browser resolves it.
20
+ *
21
+ * A responsive value that decides **structure** cannot be: an orientation
22
+ * changes which DOM a component builds, which ARIA it claims, and which way its
23
+ * arrow keys go, and no stylesheet can do that. Those resolve in JavaScript
24
+ * through `usePlBreakpointValue`, and pay what that costs — the server renders
25
+ * the `xs` entry and the browser corrects it on hydration.
26
+ *
27
+ * The split is not a compromise between the two; it is the honest line. A
28
+ * component should reach for the CSS half whenever it can.
29
+ */
30
+ import type * as React from 'react';
31
+ import type { PlassBreakpoint, PlassResponsive, PlassSize } from '../types.js';
32
+ /** Smallest first, which is also the order the media queries have to be in. */
33
+ export declare const breakpoints: readonly PlassBreakpoint[];
34
+ /** A bare value means "from `xs` up"; a map is already per-breakpoint. */
35
+ export declare function breakpointMap<T>(value: PlassResponsive<T> | undefined): Partial<Record<PlassBreakpoint, T>>;
36
+ /** Whether a value is a per-breakpoint map rather than one answer for all of them. */
37
+ export declare function isResponsiveMap<T>(value: PlassResponsive<T> | undefined): boolean;
38
+ /**
39
+ * A responsive value at one rung of the ladder.
40
+ *
41
+ * Walks **down** from that rung rather than up from `xs`: the nearest entry at
42
+ * or below the window is the one that applies, and walking down finds it
43
+ * without having to know which rungs were named.
44
+ *
45
+ * `undefined` when the map named no rung at or below — `{ lg: 3 }` on a phone
46
+ * is not `3`, and guessing a value the caller did not write would be worse than
47
+ * saying so.
48
+ */
49
+ export declare function resolveAt<T>(value: PlassResponsive<T> | undefined, at: PlassBreakpoint): T | undefined;
50
+ /**
51
+ * A responsive prop a component has to resolve **itself**, with its own default
52
+ * behind it.
53
+ *
54
+ * For the props CSS cannot decide: an orientation changes which DOM a component
55
+ * builds, which ARIA it claims and which way its arrow keys go, and no
56
+ * stylesheet can do any of that. The cost is the one every JavaScript answer
57
+ * about width pays — a server renders the `xs` entry and the browser corrects
58
+ * it on hydration — which is why a prop that only decides *style* should use
59
+ * `responsiveSlots` instead and never come here.
60
+ *
61
+ * **A bare value subscribes to nothing.** `useMediaQuery(null)` is a hook that
62
+ * adds no listener, so a component whose orientation is one word costs exactly
63
+ * what it cost before this existed: the four queries are only asked when there
64
+ * is a map to answer with. Twenty tab bars on a page that never change shape
65
+ * install no listeners between them.
66
+ */
67
+ export declare function useResponsiveValue<T>(value: PlassResponsive<T> | undefined, fallback: T): T;
68
+ /**
69
+ * Turns a responsive value into the `--p-{name}-{breakpoint}` slots the CSS
70
+ * reads, emitting only the breakpoints the caller actually named.
71
+ *
72
+ * The gaps are filled in by CSS rather than here: each breakpoint's rule falls
73
+ * back through the ones below it, so `{ md: 6 }` needs one slot and not five.
74
+ * That keeps the inline style on a grid item down to what was asked for.
75
+ */
76
+ export declare function responsiveSlots<T>(name: string, value: PlassResponsive<T> | undefined, toCss: (value: T) => string): React.CSSProperties;
77
+ /**
78
+ * Fills in the `xs` entry of a partial map with the prop's own default.
79
+ *
80
+ * Without this, `spacing={{ md: 4 }}` would be a grid with no gutter at all
81
+ * below 48rem — the CSS fallback rather than the documented default — and a
82
+ * caller who narrowed one breakpoint would silently lose every other one. A map
83
+ * says "from here up, use this instead"; it does not say "and nothing below".
84
+ */
85
+ export declare function withBaseline<T>(value: PlassResponsive<T> | undefined, baseline: T): PlassResponsive<T>;
86
+ /**
87
+ * How wide content is allowed to get, and the three components that ask.
88
+ *
89
+ * A rung of the ladder, `none`, a number of pixels, or any CSS length. The
90
+ * `string & {}` half is what keeps the five rungs autocompleting: a bare
91
+ * `string` in the union would swallow them and the ladder would be five names a
92
+ * caller has to remember rather than five an editor offers.
93
+ */
94
+ export type PlassMeasure = PlassSize | 'none' | number | (string & {});
95
+ /** A rung if it is one of the five, `none` as itself, anything else a length. */
96
+ export declare function measureValue(value: PlassMeasure): string;
97
+ /**
98
+ * The class and the slots a measure is carried by, or nothing at all.
99
+ *
100
+ * `PlContainer`, `PlHeader` and `PlFooter` each hold their content to a measure
101
+ * and each used to carry a copy of the ladder. One implementation, because they
102
+ * are one decision written three times — a header whose measure did not line up
103
+ * with the container under it is the defect this prevents.
104
+ */
105
+ export declare function measureSlots(value: PlassResponsive<PlassMeasure> | undefined): {
106
+ className: string;
107
+ style: React.CSSProperties | undefined;
108
+ };
@@ -0,0 +1 @@
1
+ import{fromQuery as e}from"./breakpoints.js";import{useMediaQuery as o}from"./media.js";import{toLength as t}from"./styles.js";export const breakpoints=["xs","sm","md","lg","xl"];export function breakpointMap(e){return null==e?{}:"object"==typeof e?e:{xs:e}}export function isResponsiveMap(e){return null!=e&&"object"==typeof e}export function resolveAt(e,o){const t=breakpointMap(e);for(let e=breakpoints.indexOf(o);e>=0;e-=1){const o=t[breakpoints[e]];if(void 0!==o)return o}}export function useResponsiveValue(t,n){const s=isResponsiveMap(t),r=o(s?e("sm"):null),i=o(s?e("md"):null),l=o(s?e("lg"):null),p=o(s?e("xl"):null);return s?resolveAt(t,p?"xl":l?"lg":i?"md":r?"sm":"xs")??n:t??n}export function responsiveSlots(e,o,t){const n=breakpointMap(o),s={};for(const o of breakpoints){const r=n[o];void 0!==r&&(s[`--p-${e}-${o}`]=t(r))}return s}export function withBaseline(e,o){return null==e?o:"object"==typeof e?{xs:o,...e}:e}const n={xs:"30rem",sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem"};export function measureValue(e){return"none"===e?"none":"string"==typeof e&&e in n?n[e]:t(e)}export function measureSlots(e){return void 0===e?{className:"",style:void 0}:{className:"plass-container",style:responsiveSlots("maxw",e,measureValue)}}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The arithmetic behind `PlAnimateScramble`, and the one decision in it worth
3
+ * writing down.
4
+ *
5
+ * **The pool a character is drawn from is the text's own characters**, not a
6
+ * table of Latin letters. Every scrambler that ships with a default alphabet
7
+ * ships an English one, and English noise over a Korean, Greek or Arabic
8
+ * headline is not a word resolving — it is a different script flickering where
9
+ * a word is about to be. Shuffling the string's own glyphs is script-agnostic
10
+ * for nothing, and it also keeps the line's colour and width steady, because
11
+ * every frame is drawn out of exactly the characters the finished line is made
12
+ * of.
13
+ *
14
+ * `characters` overrides it for the caller who genuinely wants a terminal look.
15
+ *
16
+ * **A character is a grapheme**, what a reader counts as one: an emoji, a flag,
17
+ * a letter with its accent. Cut by code point instead, an emoji is halved into
18
+ * pieces that each draw as a broken glyph, and the noise flickers with them.
19
+ */
20
+ /** Everything in the text that is worth scrambling: no spaces, no repeats. */
21
+ export declare function poolOf(text: string): string;
22
+ /**
23
+ * The line as it looks part of the way through.
24
+ *
25
+ * `progress` is `0`…`1`, and what it decides is **how many characters have
26
+ * settled**, counted from the start. Resolving left to right rather than at
27
+ * random is what makes it read as a word arriving rather than as a slot
28
+ * machine: a reader can follow it, and a reader who looks away and back has not
29
+ * lost their place.
30
+ *
31
+ * Whitespace is never scrambled. The gaps between words are what makes a line
32
+ * of noise still look like a sentence, and a space that flickers into a letter
33
+ * changes the word count on every frame.
34
+ */
35
+ export declare function scrambleAt(text: string, pool: string, progress: number, seed: number): string;
@@ -0,0 +1 @@
1
+ import{graphemesOf as t}from"./text.js";export function poolOf(o){const n=new Set;for(const r of t(o))""!==r.trim()&&n.add(r);return Array.from(n).join("")}export function scrambleAt(o,n,r,e){const m=t(o),a=t(n),f=Math.floor(m.length*Math.max(0,Math.min(1,r)));return 0===a.length?o:m.map((t,o)=>o<f||""===t.trim()?t:a[(31*o+17*e)%a.length]).join("")}
@@ -0,0 +1,5 @@
1
+ import type * as React from 'react';
2
+ /** What a component scrolls, or follows the scroll of. */
3
+ export type PlassScrollTarget = Window | HTMLElement | React.RefObject<HTMLElement | null> | (() => Window | HTMLElement | null);
4
+ /** What `target` names, or the window when it names nothing. */
5
+ export declare function resolveScrollTarget(target: PlassScrollTarget | undefined): Window | HTMLElement | null;
@@ -0,0 +1 @@
1
+ export function resolveScrollTarget(n){return void 0===n?"undefined"==typeof window?null:window:"function"==typeof n?n():"current"in n?n.current:n}
@@ -1 +1 @@
1
- export const bulletSizeValues={xs:"0.875rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"1.875rem"};export const bulletGapClasses={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4"};export const bulletStatusClasses={complete:"[background-image:var(--p-fill)] text-(--p-on-solid)",current:"[background-image:var(--p-fill)] text-(--p-on-solid) [box-shadow:0_0_0_0.25rem_var(--p-soft)]",upcoming:"border-2 bg-(--plass-surface) text-(--plass-muted-fg) [border-color:var(--plass-border)]"};export const connectorColorClasses={complete:"[border-color:var(--p-line-hover)]",current:"[border-color:var(--plass-border)]",upcoming:"[border-color:var(--plass-border)]"};export const connectorStyleClasses={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",none:""};export const titleStatusClasses={complete:"text-(--plass-fg)",current:"text-(--p-accent)",upcoming:"text-(--plass-muted-fg)"};export function statusAt(e,o){return null===o?"upcoming":e<o?"complete":e===o?"current":"upcoming"}
1
+ import{forcedFillClasses as e}from"./styles.js";export const bulletSizeValues={xs:"0.875rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"1.875rem"};export const bulletGapClasses={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4"};export const bulletStatusClasses={complete:`[background-image:var(--p-fill)] text-(--p-on-solid) ${e}`,current:`[background-image:var(--p-fill)] text-(--p-on-solid) [box-shadow:0_0_0_0.25rem_var(--p-soft)] ${e} forced-colors:[outline:2px_solid_Highlight] forced-colors:[outline-offset:2px]`,upcoming:"border-2 bg-(--plass-surface) text-(--plass-muted-fg) [border-color:var(--plass-border)]"};export const connectorColorClasses={complete:"[border-color:var(--p-line-hover)]",current:"[border-color:var(--plass-border)]",upcoming:"[border-color:var(--plass-border)]"};export const connectorStyleClasses={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",none:""};export const titleStatusClasses={complete:"text-(--plass-fg)",current:"text-(--p-accent)",upcoming:"text-(--plass-muted-fg)"};export function statusAt(e,o){return null===o?"upcoming":e<o?"complete":e===o?"current":"upcoming"}
@@ -103,6 +103,14 @@ export declare const tickRadiusClasses: Record<PlassSize, string>;
103
103
  * So every dot here has the same parity as the ring's content box: 12/6, 14/6,
104
104
  * 16/8, 18/8, 22/10. The ratio wanders between 38% and 44% as a result, which
105
105
  * is the price, and it is invisible next to the thing it buys.
106
+ *
107
+ * **The dot grows out of the middle rather than appearing at full size**, so
108
+ * the size is a pair: nothing until the option is chosen, and the diameter
109
+ * above once it is. It is the box that grows and not a `scale` — the ring is a
110
+ * fixed-size flex centre, so the two values are laid out around the same point
111
+ * and nothing outside the ring can be moved by either of them. Both classes
112
+ * have to be written out here rather than composed at the call site, because
113
+ * Tailwind only generates a utility it has seen spelled out in a source file.
106
114
  */
107
115
  export declare const tickDotClasses: Record<PlassSize, string>;
108
116
  /**
@@ -203,6 +211,13 @@ export declare const glassClasses = "[backdrop-filter:var(--plass-blur)] [-webki
203
211
  * is in the list because a gradient fill is the thing being changed on a solid
204
212
  * surface, and `filter` because that is what hover and press actually move.
205
213
  *
214
+ * `opacity` is in it because half the library already writes an opacity as a
215
+ * *state*: `opacity-50` is what disabled looks like everywhere, a `PlBackTop`
216
+ * appears and goes on `opacity-0`, and a `PlImage` uncovers itself the moment
217
+ * the picture decodes. Without it in the list every one of those is a value
218
+ * that changes between two frames, which is the one thing the house transition
219
+ * exists to prevent.
220
+ *
206
221
  * There is no `transform` in the list and none should be added to a *control*:
207
222
  * scaling a key resamples its label, and text that shimmers under the cursor
208
223
  * undoes the restraint everything else is spending effort on. A surface that
@@ -257,6 +272,13 @@ export declare const focusRingInsetClasses = "focus-visible:[outline:2px_solid_v
257
272
  *
258
273
  * Kept quiet until it is wanted: the glyph sits at 70% until the pointer or the
259
274
  * keyboard arrives.
275
+ *
276
+ * Drawn at the size of the label, and pressed from a 24px square, the minimum
277
+ * target size of WCAG 2.5.8. The `::before` is that square, centred on the
278
+ * glyph whatever size the glyph is, and placed out of the flow so the chip and
279
+ * the trigger keep their size. It comes after the label or the trigger in the
280
+ * markup and is positioned, so where the square reaches over one of them the ×
281
+ * has the press, and the neighbour keeps everything outside the square.
260
282
  */
261
283
  export declare const chipRemoveClasses: string;
262
284
  /** Icons track their label rather than carrying a size of their own. */
@@ -294,6 +316,65 @@ export declare function controlSlots(color: PlassColor, elevation: PlassElevatio
294
316
  * ring and the caret, and the glass stays clear.
295
317
  */
296
318
  export declare function surfaceSlots(color: PlassColor, elevation: PlassElevation): React.CSSProperties;
319
+ /**
320
+ * The edge a surface that is only a fill gets back in forced-colours mode.
321
+ *
322
+ * Windows' contrast themes drop every background image and box shadow, so a
323
+ * `solid` button — a gradient with no border — is left as a label floating on
324
+ * the page, and a `solid` field as a caret with no box around it. A border in a
325
+ * system colour gives both their shape back. Nothing changes outside that mode.
326
+ */
327
+ export declare const forcedEdgeClasses = "forced-colors:border forced-colors:[border-color:ButtonText]";
328
+ /**
329
+ * The same for a surface that is not a button — a field, a progress bar's
330
+ * track, a slider's rail, a badge, a message — in the colour the system draws
331
+ * text on the page.
332
+ */
333
+ export declare const forcedFieldEdgeClasses = "forced-colors:border forced-colors:[border-color:CanvasText]";
334
+ /**
335
+ * A state that is shown by a fill, in forced-colours mode.
336
+ *
337
+ * The system drops the gradient and repaints the background in the page's own
338
+ * colour, so a ticked box, a chosen segment, a pressed toggle and the filled
339
+ * part of a progress bar would look exactly like the empty ones. A system colour
340
+ * written by the page is kept in that mode, so these paint the state in the pair
341
+ * the system uses for a selection, `Highlight` behind `HighlightText`.
342
+ *
343
+ * Never `forced-color-adjust: none` for this. It would keep the colours, and it
344
+ * would also keep the gradient over them and the tinted shadow under them.
345
+ */
346
+ export declare const forcedFillClasses = "forced-colors:[background-color:Highlight] forced-colors:[border-color:Highlight] forced-colors:[color:HighlightText]";
347
+ /** The same, on a control Base UI marks `data-checked`. */
348
+ export declare const forcedCheckedClasses: string;
349
+ /**
350
+ * The same, on a control Base UI marks `data-pressed`.
351
+ *
352
+ * The attribute is what keeps the fill under the pointer. A pressed toggle's own
353
+ * `hover:` and `active:` washes are a class and a pseudo-class, which outrank
354
+ * `forcedFillClasses`' single class, and a wash that is not a system colour is
355
+ * repainted in the page's colour. Written as a class and an attribute, the fill
356
+ * ties with them and comes after them in the stylesheet.
357
+ */
358
+ export declare const forcedPressedClasses: string;
359
+ /**
360
+ * The label over a highlight that is a separate element — the tile under a
361
+ * chosen segment — which has to be written in the colour drawn on a highlight,
362
+ * or it is the page's text on the system's selection colour.
363
+ */
364
+ export declare const forcedCheckedTextClasses = "forced-colors:data-[checked]:[color:HighlightText]";
365
+ /**
366
+ * The row of a list or a menu that the pointer and the arrow keys have reached,
367
+ * in forced-colours mode. Its tint is the only thing that marks it, and the rows
368
+ * draw no focus ring because the tint is the focus indicator, so without this a
369
+ * keyboard reader in a contrast theme cannot see which row Enter would choose.
370
+ *
371
+ * The colour is written on everything inside the row as well: a description or
372
+ * a shortcut that sets a muted colour of its own is otherwise put back to the
373
+ * page's text colour, which is unreadable on the highlight.
374
+ */
375
+ export declare const forcedHighlightedClasses: string;
376
+ /** A checked control that is disabled, in the system's colour for unavailable. */
377
+ export declare const forcedDisabledCheckedClasses: string;
297
378
  /**
298
379
  * Disabled is **the light going out.** The key keeps its shape, its colour and
299
380
  * its place in the layout, and stops catching any light: no gloss, no tinted
@@ -1 +1 @@
1
- export const radiusClasses={xs:"rounded-(--plass-radius-xs)",sm:"rounded-(--plass-radius-sm)",md:"rounded-(--plass-radius-md)",lg:"rounded-(--plass-radius-lg)",xl:"rounded-(--plass-radius-xl)"};export const controlHeightClasses={xs:"h-6",sm:"h-8",md:"h-10",lg:"h-12",xl:"h-14"};export const controlSquareClasses={xs:"w-6",sm:"w-8",md:"w-10",lg:"w-12",xl:"w-14"};export const controlTextClasses={xs:"text-[0.6875rem]",sm:"text-[0.8125rem]",md:"text-[0.875rem]",lg:"text-[1rem]",xl:"text-[1.125rem]"};export const controlTextLeadingClasses={xs:"text-[0.6875rem]/[1rem]",sm:"text-[0.8125rem]/[1.125rem]",md:"text-[0.875rem]/[1.25rem]",lg:"text-[1rem]/[1.5rem]",xl:"text-[1.125rem]/[1.75rem]"};export const metaTextClasses={xs:"text-[0.625rem]",sm:"text-[0.6875rem]",md:"text-[0.75rem]",lg:"text-[0.8125rem]",xl:"text-[0.875rem]"};export const paddingXClasses={default:{xs:"px-2.5",sm:"px-3",md:"px-4",lg:"px-6",xl:"px-7"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3.5",xl:"px-4"}};export const iconSizeClasses={xs:"size-3.5",sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7"};export const tickSizeClasses={xs:"size-3.5",sm:"size-4",md:"size-4.5",lg:"size-5",xl:"size-6"};export const tickRadiusClasses={xs:"rounded-[0.25rem]",sm:"rounded-[0.3125rem]",md:"rounded-[0.375rem]",lg:"rounded-[0.4375rem]",xl:"rounded-[0.5rem]"};export const tickDotClasses={xs:"size-1.5",sm:"size-1.5",md:"size-2",lg:"size-2",xl:"size-2.5"};export const tickRowTextClasses=controlTextLeadingClasses;export const paddingXValues={default:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.5rem",xl:"1.75rem"},compact:{xs:"0.375rem",sm:"0.5rem",md:"0.625rem",lg:"0.875rem",xl:"1rem"}};export const gapClasses={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"};export const stackGapClasses={xs:"gap-1",sm:"gap-1.5",md:"gap-1.5",lg:"gap-2",xl:"gap-2"};export const sheetPaddingXClasses={default:{xs:"px-2.5",sm:"px-3.5",md:"px-5",lg:"px-6",xl:"px-7"},compact:{xs:"px-2",sm:"px-2.5",md:"px-3.5",lg:"px-4",xl:"px-5"}};export const sheetPaddingYClasses={default:{xs:"py-2.5",sm:"py-3.5",md:"py-5",lg:"py-6",xl:"py-7"},compact:{xs:"py-2",sm:"py-2.5",md:"py-3.5",lg:"py-4",xl:"py-5"}};export const sheetTitleClasses={xs:"text-[0.75rem]/[1rem]",sm:"text-[0.8125rem]/[1.125rem]",md:"text-[0.9375rem]/[1.25rem]",lg:"text-[1.0625rem]/[1.5rem]",xl:"text-[1.25rem]/[1.75rem]"};export const sheetBodyClasses={xs:"text-[0.6875rem]/[1rem]",sm:"text-[0.75rem]/[1.125rem]",md:"text-[0.8125rem]/[1.375rem]",lg:"text-[0.9375rem]/[1.5rem]",xl:"text-[1.0625rem]/[1.75rem]"};export const sheetSectionGapClasses={xs:"gap-1.5",sm:"gap-2",md:"gap-3",lg:"gap-3.5",xl:"gap-4"};export const sheetLineClasses="border-t [border-color:var(--plass-divider)]";export const sheetHeaderGapClasses={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const glassClasses="[backdrop-filter:var(--plass-blur)] [-webkit-backdrop-filter:var(--plass-blur)]";export const transitionClasses=/* @__PURE__ */["[transition-property:background-color,background-image,border-color,box-shadow,color,filter]","[transition-duration:var(--plass-duration)]","[transition-timing-function:var(--plass-ease)]"].join(" ");export const focusRingClasses="focus-visible:[outline:2px_solid_var(--p-ring)] focus-visible:[outline-offset:0px]";export const focusWithinRingClasses="has-[:focus-visible]:[outline:2px_solid_var(--p-ring)] has-[:focus-visible]:[outline-offset:0px]";export const focusRingInsetClasses="focus-visible:[outline:2px_solid_var(--p-ring)] focus-visible:[outline-offset:-2px]";export const chipRemoveClasses=/* @__PURE__ */["ms-0.5 inline-flex shrink-0 items-center justify-center rounded-full","size-[1.15em] cursor-pointer opacity-70","[transition:opacity_var(--plass-duration)_var(--plass-ease)]","hover:opacity-100 focus-visible:opacity-100",focusRingClasses,"disabled:cursor-not-allowed"].join(" ");export const iconClasses="[&_svg]:pointer-events-none [&_svg]:size-[1.2em] [&_svg]:shrink-0";export const srOnlyClasses="absolute size-px overflow-hidden whitespace-nowrap [clip-path:inset(50%)]";export function controlSlots(s,e,a){const r="solid"===a;return{"--p-fill":`var(--plass-${s}-fill)`,"--p-on-solid":`var(--plass-${s}-on-solid)`,"--p-accent":`var(--plass-${s}-accent)`,"--p-tint":`var(--plass-${s}-tint)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-soft-hover":`var(--plass-${s}-soft-hover)`,"--p-soft-press":`var(--plass-${s}-soft-press)`,"--p-line":`var(--plass-${s}-line)`,"--p-line-hover":`var(--plass-${s}-line-hover)`,"--p-ring":`var(--plass-${s}-ring)`,"--p-glow":r?"var(--plass-glow-on-fill)":`var(--plass-${s}-soft)`,"--p-flash":r?"var(--plass-flash-on-fill)":`var(--plass-${s}-soft-hover)`,"--p-elev":`var(--plass-shadow-${e})`,"--p-elev-hover":`var(--plass-shadow-${Math.min(e+1,4)})`,"--p-elev-press":`var(--plass-shadow-${Math.max(e-1,0)})`,"--p-lift":"0 6px 16px -4px var(--p-tint)","--p-lift-hover":"0 10px 24px -6px var(--p-tint)","--p-lift-press":"0 2px 6px -2px var(--p-tint)"}}export function surfaceSlots(s,e){return{"--p-accent":`var(--plass-${s}-accent)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-soft-hover":`var(--plass-${s}-soft-hover)`,"--p-soft-press":`var(--plass-${s}-soft-press)`,"--p-line":`var(--plass-${s}-line)`,"--p-line-hover":`var(--plass-${s}-line-hover)`,"--p-ring":`var(--plass-${s}-ring)`,"--p-elev":`var(--plass-shadow-${e})`,"--p-elev-hover":`var(--plass-shadow-${Math.min(e+1,4)})`,"--p-elev-press":`var(--plass-shadow-${Math.max(e-1,0)})`}}export const disabledClasses={solid:/* @__PURE__ */["cursor-not-allowed text-(--p-on-solid) [background-image:var(--p-fill)]","opacity-50 saturate-[0.35] shadow-none"].join(" "),glass:/* @__PURE__ */[glassClasses,"cursor-not-allowed border text-(--plass-fg) bg-(--plass-glass)","[border-color:var(--plass-border)]","opacity-50 saturate-[0.35] shadow-none"].join(" "),ghost:"cursor-not-allowed bg-transparent text-(--p-accent) opacity-50 saturate-[0.35]"};export const readOnlyFilterClasses="saturate-[0.55]";export const sheetRestClasses={solid:/* @__PURE__ */[glassClasses,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[glassClasses,"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"};export const fieldRestClasses={solid:/* @__PURE__ */[glassClasses,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-well)]","hover:bg-(--plass-glass-hover)","focus-within:bg-(--plass-glass-press)"].join(" "),glass:/* @__PURE__ */[glassClasses,"border text-(--plass-fg) bg-(--plass-glass-hover)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]","hover:bg-(--plass-glass-press) hover:[border-color:var(--p-line)]","focus-within:bg-(--plass-glass-press) focus-within:[border-color:var(--p-line-hover)]"].join(" "),ghost:/* @__PURE__ */["text-(--plass-fg) bg-transparent","hover:bg-(--p-soft)","focus-within:bg-(--p-soft-hover)"].join(" ")};export const fieldReadOnlyClasses={solid:/* @__PURE__ */[glassClasses,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--plass-well)] saturate-[0.55]"].join(" "),glass:/* @__PURE__ */[glassClasses,"border text-(--plass-fg) bg-(--plass-glass-hover)","[border-color:var(--plass-border)]","[box-shadow:var(--plass-gloss-glass)] saturate-[0.55]"].join(" "),ghost:"text-(--plass-fg) bg-transparent saturate-[0.55]"};export function toLength(s){return"number"==typeof s?`${s}px`:s}export function hasContent(s){return null!=s&&!1!==s&&""!==s}export function cx(...s){return s.filter(Boolean).join(" ")}
1
+ export const radiusClasses={xs:"rounded-(--plass-radius-xs)",sm:"rounded-(--plass-radius-sm)",md:"rounded-(--plass-radius-md)",lg:"rounded-(--plass-radius-lg)",xl:"rounded-(--plass-radius-xl)"};export const controlHeightClasses={xs:"h-6",sm:"h-8",md:"h-10",lg:"h-12",xl:"h-14"};export const controlSquareClasses={xs:"w-6",sm:"w-8",md:"w-10",lg:"w-12",xl:"w-14"};export const controlTextClasses={xs:"text-[0.6875rem]",sm:"text-[0.8125rem]",md:"text-[0.875rem]",lg:"text-[1rem]",xl:"text-[1.125rem]"};export const controlTextLeadingClasses={xs:"text-[0.6875rem]/[1rem]",sm:"text-[0.8125rem]/[1.125rem]",md:"text-[0.875rem]/[1.25rem]",lg:"text-[1rem]/[1.5rem]",xl:"text-[1.125rem]/[1.75rem]"};export const metaTextClasses={xs:"text-[0.625rem]",sm:"text-[0.6875rem]",md:"text-[0.75rem]",lg:"text-[0.8125rem]",xl:"text-[0.875rem]"};export const paddingXClasses={default:{xs:"px-2.5",sm:"px-3",md:"px-4",lg:"px-6",xl:"px-7"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3.5",xl:"px-4"}};export const iconSizeClasses={xs:"size-3.5",sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7"};export const tickSizeClasses={xs:"size-3.5",sm:"size-4",md:"size-4.5",lg:"size-5",xl:"size-6"};export const tickRadiusClasses={xs:"rounded-[0.25rem]",sm:"rounded-[0.3125rem]",md:"rounded-[0.375rem]",lg:"rounded-[0.4375rem]",xl:"rounded-[0.5rem]"};export const tickDotClasses={xs:"size-0 data-[checked]:size-1.5",sm:"size-0 data-[checked]:size-1.5",md:"size-0 data-[checked]:size-2",lg:"size-0 data-[checked]:size-2",xl:"size-0 data-[checked]:size-2.5"};export const tickRowTextClasses=controlTextLeadingClasses;export const paddingXValues={default:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.5rem",xl:"1.75rem"},compact:{xs:"0.375rem",sm:"0.5rem",md:"0.625rem",lg:"0.875rem",xl:"1rem"}};export const gapClasses={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"};export const stackGapClasses={xs:"gap-1",sm:"gap-1.5",md:"gap-1.5",lg:"gap-2",xl:"gap-2"};export const sheetPaddingXClasses={default:{xs:"px-2.5",sm:"px-3.5",md:"px-5",lg:"px-6",xl:"px-7"},compact:{xs:"px-2",sm:"px-2.5",md:"px-3.5",lg:"px-4",xl:"px-5"}};export const sheetPaddingYClasses={default:{xs:"py-2.5",sm:"py-3.5",md:"py-5",lg:"py-6",xl:"py-7"},compact:{xs:"py-2",sm:"py-2.5",md:"py-3.5",lg:"py-4",xl:"py-5"}};export const sheetTitleClasses={xs:"text-[0.75rem]/[1rem]",sm:"text-[0.8125rem]/[1.125rem]",md:"text-[0.9375rem]/[1.25rem]",lg:"text-[1.0625rem]/[1.5rem]",xl:"text-[1.25rem]/[1.75rem]"};export const sheetBodyClasses={xs:"text-[0.6875rem]/[1rem]",sm:"text-[0.75rem]/[1.125rem]",md:"text-[0.8125rem]/[1.375rem]",lg:"text-[0.9375rem]/[1.5rem]",xl:"text-[1.0625rem]/[1.75rem]"};export const sheetSectionGapClasses={xs:"gap-1.5",sm:"gap-2",md:"gap-3",lg:"gap-3.5",xl:"gap-4"};export const sheetLineClasses="border-t [border-color:var(--plass-divider)]";export const sheetHeaderGapClasses={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const glassClasses="[backdrop-filter:var(--plass-blur)] [-webkit-backdrop-filter:var(--plass-blur)]";export const transitionClasses=/* @__PURE__ */["[transition-property:background-color,background-image,border-color,box-shadow,color,filter,opacity]","[transition-duration:var(--plass-duration)]","[transition-timing-function:var(--plass-ease)]"].join(" ");export const focusRingClasses="focus-visible:[outline:2px_solid_var(--p-ring)] focus-visible:[outline-offset:0px]";export const focusWithinRingClasses="has-[:focus-visible]:[outline:2px_solid_var(--p-ring)] has-[:focus-visible]:[outline-offset:0px]";export const focusRingInsetClasses="focus-visible:[outline:2px_solid_var(--p-ring)] focus-visible:[outline-offset:-2px]";export const chipRemoveClasses=/* @__PURE__ */["relative ms-0.5 inline-flex shrink-0 items-center justify-center rounded-full","before:absolute before:inset-[calc(50%-12px)]","size-[1.15em] cursor-pointer opacity-70","[transition:opacity_var(--plass-duration)_var(--plass-ease)]","hover:opacity-100 focus-visible:opacity-100",focusRingClasses,"disabled:cursor-not-allowed"].join(" ");export const iconClasses="[&_svg]:pointer-events-none [&_svg]:size-[1.2em] [&_svg]:shrink-0";export const srOnlyClasses="absolute size-px overflow-hidden whitespace-nowrap [clip-path:inset(50%)]";export function controlSlots(s,e,o){const r="solid"===o;return{"--p-fill":`var(--plass-${s}-fill)`,"--p-on-solid":`var(--plass-${s}-on-solid)`,"--p-accent":`var(--plass-${s}-accent)`,"--p-tint":`var(--plass-${s}-tint)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-soft-hover":`var(--plass-${s}-soft-hover)`,"--p-soft-press":`var(--plass-${s}-soft-press)`,"--p-line":`var(--plass-${s}-line)`,"--p-line-hover":`var(--plass-${s}-line-hover)`,"--p-ring":`var(--plass-${s}-ring)`,"--p-glow":r?"var(--plass-glow-on-fill)":`var(--plass-${s}-soft)`,"--p-flash":r?"var(--plass-flash-on-fill)":`var(--plass-${s}-soft-hover)`,"--p-elev":`var(--plass-shadow-${e})`,"--p-elev-hover":`var(--plass-shadow-${Math.min(e+1,4)})`,"--p-elev-press":`var(--plass-shadow-${Math.max(e-1,0)})`,"--p-lift":"0 6px 16px -4px var(--p-tint)","--p-lift-hover":"0 10px 24px -6px var(--p-tint)","--p-lift-press":"0 2px 6px -2px var(--p-tint)"}}export function surfaceSlots(s,e){return{"--p-accent":`var(--plass-${s}-accent)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-soft-hover":`var(--plass-${s}-soft-hover)`,"--p-soft-press":`var(--plass-${s}-soft-press)`,"--p-line":`var(--plass-${s}-line)`,"--p-line-hover":`var(--plass-${s}-line-hover)`,"--p-ring":`var(--plass-${s}-ring)`,"--p-elev":`var(--plass-shadow-${e})`,"--p-elev-hover":`var(--plass-shadow-${Math.min(e+1,4)})`,"--p-elev-press":`var(--plass-shadow-${Math.max(e-1,0)})`}}export const forcedEdgeClasses="forced-colors:border forced-colors:[border-color:ButtonText]";export const forcedFieldEdgeClasses="forced-colors:border forced-colors:[border-color:CanvasText]";export const forcedFillClasses="forced-colors:[background-color:Highlight] forced-colors:[border-color:Highlight] forced-colors:[color:HighlightText]";export const forcedCheckedClasses=/* @__PURE__ */["forced-colors:data-[checked]:[background-color:Highlight]","forced-colors:data-[checked]:[border-color:Highlight]","forced-colors:data-[checked]:[color:HighlightText]"].join(" ");export const forcedPressedClasses=/* @__PURE__ */["forced-colors:data-[pressed]:[background-color:Highlight]","forced-colors:data-[pressed]:[border-color:Highlight]","forced-colors:data-[pressed]:[color:HighlightText]"].join(" ");export const forcedCheckedTextClasses="forced-colors:data-[checked]:[color:HighlightText]";export const forcedHighlightedClasses=/* @__PURE__ */["forced-colors:data-[highlighted]:[background-color:Highlight]","forced-colors:data-[highlighted]:[color:HighlightText]","forced-colors:data-[highlighted]:**:[color:HighlightText]"].join(" ");export const forcedDisabledCheckedClasses=/* @__PURE__ */["forced-colors:border forced-colors:[border-color:GrayText]","forced-colors:data-[checked]:[background-color:GrayText]","forced-colors:data-[checked]:[color:Canvas]"].join(" ");export const disabledClasses={solid:/* @__PURE__ */["cursor-not-allowed text-(--p-on-solid) [background-image:var(--p-fill)]","opacity-50 saturate-[0.35] shadow-none","forced-colors:border forced-colors:[border-color:GrayText]"].join(" "),glass:/* @__PURE__ */[glassClasses,"cursor-not-allowed border text-(--plass-fg) bg-(--plass-glass)","[border-color:var(--plass-border)]","opacity-50 saturate-[0.35] shadow-none"].join(" "),ghost:"cursor-not-allowed bg-transparent text-(--p-accent) opacity-50 saturate-[0.35]"};export const readOnlyFilterClasses="saturate-[0.55]";export const sheetRestClasses={solid:/* @__PURE__ */[glassClasses,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[glassClasses,"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"};export const fieldRestClasses={solid:/* @__PURE__ */[glassClasses,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-well)]",forcedFieldEdgeClasses,"hover:bg-(--plass-glass-hover)","focus-within:bg-(--plass-glass-press)"].join(" "),glass:/* @__PURE__ */[glassClasses,"border text-(--plass-fg) bg-(--plass-glass-hover)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]","hover:bg-(--plass-glass-press) hover:[border-color:var(--p-line)]","focus-within:bg-(--plass-glass-press) focus-within:[border-color:var(--p-line-hover)]"].join(" "),ghost:/* @__PURE__ */["text-(--plass-fg) bg-transparent","hover:bg-(--p-soft)","focus-within:bg-(--p-soft-hover)"].join(" ")};export const fieldReadOnlyClasses={solid:/* @__PURE__ */[glassClasses,"text-(--plass-fg) bg-(--plass-glass-press)",forcedFieldEdgeClasses,"[box-shadow:var(--plass-well)] saturate-[0.55]"].join(" "),glass:/* @__PURE__ */[glassClasses,"border text-(--plass-fg) bg-(--plass-glass-hover)","[border-color:var(--plass-border)]","[box-shadow:var(--plass-gloss-glass)] saturate-[0.55]"].join(" "),ghost:"text-(--plass-fg) bg-transparent saturate-[0.55]"};export function toLength(s){return"number"==typeof s?`${s}px`:s}export function hasContent(s){return null!=s&&!1!==s&&""!==s}export function cx(...s){return s.filter(Boolean).join(" ")}