plass-ui 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/dist/components/accordion/PlAccordion.d.ts +98 -0
  2. package/dist/components/accordion/PlAccordion.js +1 -0
  3. package/dist/components/accordion/index.d.ts +2 -0
  4. package/dist/components/accordion/index.js +1 -0
  5. package/dist/components/alert/PlAlert.d.ts +50 -0
  6. package/dist/components/alert/PlAlert.js +1 -0
  7. package/dist/components/alert/index.d.ts +2 -0
  8. package/dist/components/alert/index.js +1 -0
  9. package/dist/components/animate-appear/PlAnimateAppear.d.ts +55 -0
  10. package/dist/components/animate-appear/PlAnimateAppear.js +1 -0
  11. package/dist/components/animate-appear/index.d.ts +2 -0
  12. package/dist/components/animate-appear/index.js +1 -0
  13. package/dist/components/animate-blink/PlAnimateBlink.d.ts +30 -0
  14. package/dist/components/animate-blink/PlAnimateBlink.js +1 -0
  15. package/dist/components/animate-blink/index.d.ts +2 -0
  16. package/dist/components/animate-blink/index.js +1 -0
  17. package/dist/components/animate-fade/PlAnimateFade.d.ts +35 -0
  18. package/dist/components/animate-fade/PlAnimateFade.js +1 -0
  19. package/dist/components/animate-fade/index.d.ts +2 -0
  20. package/dist/components/animate-fade/index.js +1 -0
  21. package/dist/components/animate-grow/PlAnimateGrow.d.ts +45 -0
  22. package/dist/components/animate-grow/PlAnimateGrow.js +1 -0
  23. package/dist/components/animate-grow/index.d.ts +2 -0
  24. package/dist/components/animate-grow/index.js +1 -0
  25. package/dist/components/animate-headline/PlAnimateHeadline.d.ts +55 -0
  26. package/dist/components/animate-headline/PlAnimateHeadline.js +1 -0
  27. package/dist/components/animate-headline/index.d.ts +2 -0
  28. package/dist/components/animate-headline/index.js +1 -0
  29. package/dist/components/animate-lighting/PlAnimateLighting.d.ts +67 -0
  30. package/dist/components/animate-lighting/PlAnimateLighting.js +1 -0
  31. package/dist/components/animate-lighting/index.d.ts +2 -0
  32. package/dist/components/animate-lighting/index.js +1 -0
  33. package/dist/components/animate-marquee/PlAnimateMarquee.d.ts +65 -0
  34. package/dist/components/animate-marquee/PlAnimateMarquee.js +1 -0
  35. package/dist/components/animate-marquee/index.d.ts +2 -0
  36. package/dist/components/animate-marquee/index.js +1 -0
  37. package/dist/components/animate-rotate/PlAnimateRotate.d.ts +52 -0
  38. package/dist/components/animate-rotate/PlAnimateRotate.js +1 -0
  39. package/dist/components/animate-rotate/index.d.ts +2 -0
  40. package/dist/components/animate-rotate/index.js +1 -0
  41. package/dist/components/animate-slide/PlAnimateSlide.d.ts +47 -0
  42. package/dist/components/animate-slide/PlAnimateSlide.js +1 -0
  43. package/dist/components/animate-slide/index.d.ts +2 -0
  44. package/dist/components/animate-slide/index.js +1 -0
  45. package/dist/components/animate-typing/PlAnimateTyping.d.ts +56 -0
  46. package/dist/components/animate-typing/PlAnimateTyping.js +1 -0
  47. package/dist/components/animate-typing/index.d.ts +2 -0
  48. package/dist/components/animate-typing/index.js +1 -0
  49. package/dist/components/animate-zoom/PlAnimateZoom.d.ts +37 -0
  50. package/dist/components/animate-zoom/PlAnimateZoom.js +1 -0
  51. package/dist/components/animate-zoom/index.d.ts +2 -0
  52. package/dist/components/animate-zoom/index.js +1 -0
  53. package/dist/components/aspect-ratio/PlAspectRatio.d.ts +64 -0
  54. package/dist/components/aspect-ratio/PlAspectRatio.js +1 -0
  55. package/dist/components/aspect-ratio/index.d.ts +2 -0
  56. package/dist/components/aspect-ratio/index.js +1 -0
  57. package/dist/components/avatar/PlAvatar.d.ts +102 -0
  58. package/dist/components/avatar/PlAvatar.js +1 -0
  59. package/dist/components/avatar/index.d.ts +2 -0
  60. package/dist/components/avatar/index.js +1 -0
  61. package/dist/components/badge/PlBadge.d.ts +86 -0
  62. package/dist/components/badge/PlBadge.js +1 -0
  63. package/dist/components/badge/index.d.ts +2 -0
  64. package/dist/components/badge/index.js +1 -0
  65. package/dist/components/blockquote/PlBlockquote.d.ts +64 -0
  66. package/dist/components/blockquote/PlBlockquote.js +1 -0
  67. package/dist/components/blockquote/index.d.ts +2 -0
  68. package/dist/components/blockquote/index.js +1 -0
  69. package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +111 -0
  70. package/dist/components/bottom-navigation/PlBottomNavigation.js +1 -0
  71. package/dist/components/bottom-navigation/index.d.ts +2 -0
  72. package/dist/components/bottom-navigation/index.js +1 -0
  73. package/dist/components/box/PlBox.d.ts +50 -0
  74. package/dist/components/box/PlBox.js +1 -0
  75. package/dist/components/box/index.d.ts +2 -0
  76. package/dist/components/box/index.js +1 -0
  77. package/dist/components/breadcrumb/PlBreadcrumb.d.ts +138 -0
  78. package/dist/components/breadcrumb/PlBreadcrumb.js +1 -0
  79. package/dist/components/breadcrumb/index.d.ts +2 -0
  80. package/dist/components/breadcrumb/index.js +1 -0
  81. package/dist/components/button/{Button.d.ts → PlButton.d.ts} +3 -3
  82. package/dist/components/button/PlButton.js +1 -0
  83. package/dist/components/button/index.d.ts +2 -2
  84. package/dist/components/button/index.js +1 -1
  85. package/dist/components/button-group/PlButtonGroup.d.ts +32 -0
  86. package/dist/components/button-group/PlButtonGroup.js +1 -0
  87. package/dist/components/button-group/index.d.ts +2 -0
  88. package/dist/components/button-group/index.js +1 -0
  89. package/dist/components/card/PlCard.d.ts +81 -0
  90. package/dist/components/card/PlCard.js +1 -0
  91. package/dist/components/card/index.d.ts +2 -0
  92. package/dist/components/card/index.js +1 -0
  93. package/dist/components/carousel/PlCarousel.d.ts +78 -0
  94. package/dist/components/carousel/PlCarousel.js +1 -0
  95. package/dist/components/carousel/index.d.ts +2 -0
  96. package/dist/components/carousel/index.js +1 -0
  97. package/dist/components/chat-bubble/PlChatBubble.d.ts +127 -0
  98. package/dist/components/chat-bubble/PlChatBubble.js +1 -0
  99. package/dist/components/chat-bubble/index.d.ts +2 -0
  100. package/dist/components/chat-bubble/index.js +1 -0
  101. package/dist/components/checkbox/PlCheckbox.d.ts +39 -0
  102. package/dist/components/checkbox/PlCheckbox.js +1 -0
  103. package/dist/components/checkbox/index.d.ts +2 -0
  104. package/dist/components/checkbox/index.js +1 -0
  105. package/dist/components/chip/PlChip.d.ts +55 -0
  106. package/dist/components/chip/PlChip.js +1 -0
  107. package/dist/components/chip/index.d.ts +2 -0
  108. package/dist/components/chip/index.js +1 -0
  109. package/dist/components/collapsible/PlCollapsible.d.ts +84 -0
  110. package/dist/components/collapsible/PlCollapsible.js +1 -0
  111. package/dist/components/collapsible/index.d.ts +2 -0
  112. package/dist/components/collapsible/index.js +1 -0
  113. package/dist/components/combobox/PlCombobox.d.ts +140 -0
  114. package/dist/components/combobox/PlCombobox.js +1 -0
  115. package/dist/components/combobox/index.d.ts +2 -0
  116. package/dist/components/combobox/index.js +1 -0
  117. package/dist/components/container/PlContainer.d.ts +66 -0
  118. package/dist/components/container/PlContainer.js +1 -0
  119. package/dist/components/container/index.d.ts +2 -0
  120. package/dist/components/container/index.js +1 -0
  121. package/dist/components/date-picker/PlDatePicker.d.ts +73 -0
  122. package/dist/components/date-picker/PlDatePicker.js +1 -0
  123. package/dist/components/date-picker/index.d.ts +2 -0
  124. package/dist/components/date-picker/index.js +1 -0
  125. package/dist/components/date-range-picker/PlDateRangePicker.d.ts +91 -0
  126. package/dist/components/date-range-picker/PlDateRangePicker.js +1 -0
  127. package/dist/components/date-range-picker/index.d.ts +2 -0
  128. package/dist/components/date-range-picker/index.js +1 -0
  129. package/dist/components/date-time-picker/PlDateTimePicker.d.ts +74 -0
  130. package/dist/components/date-time-picker/PlDateTimePicker.js +1 -0
  131. package/dist/components/date-time-picker/index.d.ts +2 -0
  132. package/dist/components/date-time-picker/index.js +1 -0
  133. package/dist/components/divider/PlDivider.d.ts +73 -0
  134. package/dist/components/divider/PlDivider.js +1 -0
  135. package/dist/components/divider/index.d.ts +2 -0
  136. package/dist/components/divider/index.js +1 -0
  137. package/dist/components/drawer/PlDrawer.d.ts +144 -0
  138. package/dist/components/drawer/PlDrawer.js +1 -0
  139. package/dist/components/drawer/index.d.ts +2 -0
  140. package/dist/components/drawer/index.js +1 -0
  141. package/dist/components/file-picker/PlFilePicker.d.ts +105 -0
  142. package/dist/components/file-picker/PlFilePicker.js +1 -0
  143. package/dist/components/file-picker/index.d.ts +2 -0
  144. package/dist/components/file-picker/index.js +1 -0
  145. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +118 -0
  146. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -0
  147. package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
  148. package/dist/components/floating-bottom-navigation/index.js +1 -0
  149. package/dist/components/grid/PlGrid.d.ts +67 -0
  150. package/dist/components/grid/PlGrid.js +1 -0
  151. package/dist/components/grid/PlGridItem.d.ts +50 -0
  152. package/dist/components/grid/PlGridItem.js +1 -0
  153. package/dist/components/grid/index.d.ts +4 -0
  154. package/dist/components/grid/index.js +1 -0
  155. package/dist/components/highlight/PlHighlight.d.ts +90 -0
  156. package/dist/components/highlight/PlHighlight.js +1 -0
  157. package/dist/components/highlight/index.d.ts +2 -0
  158. package/dist/components/highlight/index.js +1 -0
  159. package/dist/components/hot-keys/PlHotKeys.d.ts +93 -0
  160. package/dist/components/hot-keys/PlHotKeys.js +1 -0
  161. package/dist/components/hot-keys/index.d.ts +2 -0
  162. package/dist/components/hot-keys/index.js +1 -0
  163. package/dist/components/icon/PlIcon.d.ts +62 -0
  164. package/dist/components/icon/PlIcon.js +1 -0
  165. package/dist/components/icon/index.d.ts +2 -0
  166. package/dist/components/icon/index.js +1 -0
  167. package/dist/components/icon-button/PlIconButton.d.ts +39 -0
  168. package/dist/components/icon-button/PlIconButton.js +1 -0
  169. package/dist/components/icon-button/index.d.ts +2 -0
  170. package/dist/components/icon-button/index.js +1 -0
  171. package/dist/components/list/PlList.d.ts +82 -0
  172. package/dist/components/list/PlList.js +1 -0
  173. package/dist/components/list/index.d.ts +2 -0
  174. package/dist/components/list/index.js +1 -0
  175. package/dist/components/menu/PlMenu.d.ts +210 -0
  176. package/dist/components/menu/PlMenu.js +1 -0
  177. package/dist/components/menu/index.d.ts +2 -0
  178. package/dist/components/menu/index.js +1 -0
  179. package/dist/components/modal/PlModal.d.ts +112 -0
  180. package/dist/components/modal/PlModal.js +1 -0
  181. package/dist/components/modal/index.d.ts +2 -0
  182. package/dist/components/modal/index.js +1 -0
  183. package/dist/components/number-field/PlNumberField.d.ts +133 -0
  184. package/dist/components/number-field/PlNumberField.js +1 -0
  185. package/dist/components/number-field/index.d.ts +2 -0
  186. package/dist/components/number-field/index.js +1 -0
  187. package/dist/components/otp-field/PlOtpField.d.ts +82 -0
  188. package/dist/components/otp-field/PlOtpField.js +1 -0
  189. package/dist/components/otp-field/index.d.ts +2 -0
  190. package/dist/components/otp-field/index.js +1 -0
  191. package/dist/components/overlay/PlOverlay.d.ts +96 -0
  192. package/dist/components/overlay/PlOverlay.js +1 -0
  193. package/dist/components/overlay/index.d.ts +2 -0
  194. package/dist/components/overlay/index.js +1 -0
  195. package/dist/components/pagination/PlPagination.d.ts +88 -0
  196. package/dist/components/pagination/PlPagination.js +1 -0
  197. package/dist/components/pagination/index.d.ts +2 -0
  198. package/dist/components/pagination/index.js +1 -0
  199. package/dist/components/panes/PlPanes.d.ts +79 -0
  200. package/dist/components/panes/PlPanes.js +1 -0
  201. package/dist/components/panes/index.d.ts +2 -0
  202. package/dist/components/panes/index.js +1 -0
  203. package/dist/components/pill/PlPill.d.ts +81 -0
  204. package/dist/components/pill/PlPill.js +1 -0
  205. package/dist/components/pill/index.d.ts +2 -0
  206. package/dist/components/pill/index.js +1 -0
  207. package/dist/components/popover/PlPopover.d.ts +107 -0
  208. package/dist/components/popover/PlPopover.js +1 -0
  209. package/dist/components/popover/index.d.ts +2 -0
  210. package/dist/components/popover/index.js +1 -0
  211. package/dist/components/progress-box/PlProgressBox.d.ts +32 -0
  212. package/dist/components/progress-box/PlProgressBox.js +1 -0
  213. package/dist/components/progress-box/index.d.ts +2 -0
  214. package/dist/components/progress-box/index.js +1 -0
  215. package/dist/components/progress-circular/PlProgressCircular.d.ts +22 -0
  216. package/dist/components/progress-circular/PlProgressCircular.js +1 -0
  217. package/dist/components/progress-circular/index.d.ts +2 -0
  218. package/dist/components/progress-circular/index.js +1 -0
  219. package/dist/components/progress-linear/PlProgressLinear.d.ts +31 -0
  220. package/dist/components/progress-linear/PlProgressLinear.js +1 -0
  221. package/dist/components/progress-linear/index.d.ts +2 -0
  222. package/dist/components/progress-linear/index.js +1 -0
  223. package/dist/components/radio-group/PlRadioGroup.d.ts +54 -0
  224. package/dist/components/radio-group/PlRadioGroup.js +1 -0
  225. package/dist/components/radio-group/index.d.ts +2 -0
  226. package/dist/components/radio-group/index.js +1 -0
  227. package/dist/components/rating/PlRating.d.ts +90 -0
  228. package/dist/components/rating/PlRating.js +1 -0
  229. package/dist/components/rating/index.d.ts +2 -0
  230. package/dist/components/rating/index.js +1 -0
  231. package/dist/components/scroll-zone/PlScrollZone.d.ts +132 -0
  232. package/dist/components/scroll-zone/PlScrollZone.js +1 -0
  233. package/dist/components/scroll-zone/index.d.ts +2 -0
  234. package/dist/components/scroll-zone/index.js +1 -0
  235. package/dist/components/segmented-button/PlSegmentedButton.d.ts +79 -0
  236. package/dist/components/segmented-button/PlSegmentedButton.js +1 -0
  237. package/dist/components/segmented-button/index.d.ts +2 -0
  238. package/dist/components/segmented-button/index.js +1 -0
  239. package/dist/components/select/PlSelect.d.ts +77 -0
  240. package/dist/components/select/PlSelect.js +1 -0
  241. package/dist/components/select/index.d.ts +2 -0
  242. package/dist/components/select/index.js +1 -0
  243. package/dist/components/skeleton/PlSkeleton.d.ts +73 -0
  244. package/dist/components/skeleton/PlSkeleton.js +1 -0
  245. package/dist/components/skeleton/index.d.ts +2 -0
  246. package/dist/components/skeleton/index.js +1 -0
  247. package/dist/components/slider/PlSlider.d.ts +44 -0
  248. package/dist/components/slider/PlSlider.js +1 -0
  249. package/dist/components/slider/index.d.ts +2 -0
  250. package/dist/components/slider/index.js +1 -0
  251. package/dist/components/spoiler/PlSpoiler.d.ts +84 -0
  252. package/dist/components/spoiler/PlSpoiler.js +1 -0
  253. package/dist/components/spoiler/index.d.ts +2 -0
  254. package/dist/components/spoiler/index.js +1 -0
  255. package/dist/components/switch/PlSwitch.d.ts +42 -0
  256. package/dist/components/switch/PlSwitch.js +1 -0
  257. package/dist/components/switch/index.d.ts +2 -0
  258. package/dist/components/switch/index.js +1 -0
  259. package/dist/components/table/PlTable.d.ts +112 -0
  260. package/dist/components/table/PlTable.js +1 -0
  261. package/dist/components/table/index.d.ts +2 -0
  262. package/dist/components/table/index.js +1 -0
  263. package/dist/components/tabs/PlTabs.d.ts +94 -0
  264. package/dist/components/tabs/PlTabs.js +1 -0
  265. package/dist/components/tabs/index.d.ts +2 -0
  266. package/dist/components/tabs/index.js +1 -0
  267. package/dist/components/text-field/{TextField.d.ts → PlTextField.d.ts} +5 -5
  268. package/dist/components/text-field/PlTextField.js +1 -0
  269. package/dist/components/text-field/index.d.ts +2 -2
  270. package/dist/components/text-field/index.js +1 -1
  271. package/dist/components/text-link/PlTextLink.d.ts +80 -0
  272. package/dist/components/text-link/PlTextLink.js +1 -0
  273. package/dist/components/text-link/index.d.ts +2 -0
  274. package/dist/components/text-link/index.js +1 -0
  275. package/dist/components/time-picker/PlTimePicker.d.ts +88 -0
  276. package/dist/components/time-picker/PlTimePicker.js +1 -0
  277. package/dist/components/time-picker/index.d.ts +2 -0
  278. package/dist/components/time-picker/index.js +1 -0
  279. package/dist/components/timeline/PlTimeline.d.ts +98 -0
  280. package/dist/components/timeline/PlTimeline.js +1 -0
  281. package/dist/components/timeline/index.d.ts +2 -0
  282. package/dist/components/timeline/index.js +1 -0
  283. package/dist/components/toast/PlToast.d.ts +122 -0
  284. package/dist/components/toast/PlToast.js +1 -0
  285. package/dist/components/toast/index.d.ts +2 -0
  286. package/dist/components/toast/index.js +1 -0
  287. package/dist/components/toolbar/PlToolbar.d.ts +68 -0
  288. package/dist/components/toolbar/PlToolbar.js +1 -0
  289. package/dist/components/toolbar/index.d.ts +2 -0
  290. package/dist/components/toolbar/index.js +1 -0
  291. package/dist/components/tooltip/PlTooltip.d.ts +92 -0
  292. package/dist/components/tooltip/PlTooltip.js +1 -0
  293. package/dist/components/tooltip/index.d.ts +2 -0
  294. package/dist/components/tooltip/index.js +1 -0
  295. package/dist/components/typography/PlTypography.d.ts +66 -0
  296. package/dist/components/typography/PlTypography.js +1 -0
  297. package/dist/components/typography/index.d.ts +2 -0
  298. package/dist/components/typography/index.js +1 -0
  299. package/dist/css/accordion.css +2 -0
  300. package/dist/css/alert.css +2 -0
  301. package/dist/css/animate-appear.css +2 -0
  302. package/dist/css/animate-blink.css +2 -0
  303. package/dist/css/animate-fade.css +2 -0
  304. package/dist/css/animate-grow.css +2 -0
  305. package/dist/css/animate-headline.css +2 -0
  306. package/dist/css/animate-lighting.css +2 -0
  307. package/dist/css/animate-marquee.css +2 -0
  308. package/dist/css/animate-rotate.css +2 -0
  309. package/dist/css/animate-slide.css +2 -0
  310. package/dist/css/animate-typing.css +2 -0
  311. package/dist/css/animate-zoom.css +2 -0
  312. package/dist/css/aspect-ratio.css +2 -0
  313. package/dist/css/avatar.css +2 -0
  314. package/dist/css/badge.css +2 -0
  315. package/dist/css/base.css +4 -0
  316. package/dist/css/blockquote.css +2 -0
  317. package/dist/css/bottom-navigation.css +2 -0
  318. package/dist/css/box.css +2 -0
  319. package/dist/css/breadcrumb.css +2 -0
  320. package/dist/css/button-group.css +2 -0
  321. package/dist/css/button.css +2 -0
  322. package/dist/css/card.css +2 -0
  323. package/dist/css/carousel.css +2 -0
  324. package/dist/css/chat-bubble.css +2 -0
  325. package/dist/css/checkbox.css +2 -0
  326. package/dist/css/chip.css +2 -0
  327. package/dist/css/collapsible.css +2 -0
  328. package/dist/css/combobox.css +2 -0
  329. package/dist/css/container.css +2 -0
  330. package/dist/css/date-picker.css +2 -0
  331. package/dist/css/date-range-picker.css +2 -0
  332. package/dist/css/date-time-picker.css +2 -0
  333. package/dist/css/divider.css +2 -0
  334. package/dist/css/drawer.css +2 -0
  335. package/dist/css/file-picker.css +2 -0
  336. package/dist/css/floating-bottom-navigation.css +2 -0
  337. package/dist/css/grid.css +2 -0
  338. package/dist/css/highlight.css +2 -0
  339. package/dist/css/hot-keys.css +2 -0
  340. package/dist/css/icon-button.css +2 -0
  341. package/dist/css/icon.css +2 -0
  342. package/dist/css/list.css +2 -0
  343. package/dist/css/menu.css +2 -0
  344. package/dist/css/modal.css +2 -0
  345. package/dist/css/number-field.css +2 -0
  346. package/dist/css/otp-field.css +2 -0
  347. package/dist/css/overlay.css +2 -0
  348. package/dist/css/pagination.css +2 -0
  349. package/dist/css/panes.css +2 -0
  350. package/dist/css/pill.css +2 -0
  351. package/dist/css/popover.css +2 -0
  352. package/dist/css/progress-box.css +2 -0
  353. package/dist/css/progress-circular.css +2 -0
  354. package/dist/css/progress-linear.css +2 -0
  355. package/dist/css/radio-group.css +2 -0
  356. package/dist/css/rating.css +2 -0
  357. package/dist/css/scroll-zone.css +2 -0
  358. package/dist/css/segmented-button.css +2 -0
  359. package/dist/css/select.css +2 -0
  360. package/dist/css/skeleton.css +2 -0
  361. package/dist/css/slider.css +2 -0
  362. package/dist/css/spoiler.css +2 -0
  363. package/dist/css/switch.css +2 -0
  364. package/dist/css/table.css +2 -0
  365. package/dist/css/tabs.css +2 -0
  366. package/dist/css/text-field.css +2 -0
  367. package/dist/css/text-link.css +2 -0
  368. package/dist/css/time-picker.css +2 -0
  369. package/dist/css/timeline.css +2 -0
  370. package/dist/css/toast.css +2 -0
  371. package/dist/css/toolbar.css +2 -0
  372. package/dist/css/tooltip.css +2 -0
  373. package/dist/css/typography.css +2 -0
  374. package/dist/index.d.ts +75 -3
  375. package/dist/index.js +1 -1
  376. package/dist/internal/animate.d.ts +161 -0
  377. package/dist/internal/animate.js +1 -0
  378. package/dist/internal/button-group.d.ts +27 -0
  379. package/dist/internal/button-group.js +2 -0
  380. package/dist/internal/calendar.d.ts +148 -0
  381. package/dist/internal/calendar.js +1 -0
  382. package/dist/internal/date.d.ts +173 -0
  383. package/dist/internal/date.js +1 -0
  384. package/dist/internal/format.d.ts +24 -0
  385. package/dist/internal/format.js +1 -0
  386. package/dist/internal/grid.d.ts +67 -0
  387. package/dist/internal/grid.js +1 -0
  388. package/dist/internal/icons.d.ts +86 -1
  389. package/dist/internal/icons.js +1 -1
  390. package/dist/internal/menu.d.ts +20 -0
  391. package/dist/internal/menu.js +1 -0
  392. package/dist/internal/picker.d.ts +118 -0
  393. package/dist/internal/picker.js +1 -0
  394. package/dist/internal/progress.d.ts +145 -0
  395. package/dist/internal/progress.js +1 -0
  396. package/dist/internal/sizer.d.ts +32 -0
  397. package/dist/internal/sizer.js +1 -0
  398. package/dist/internal/styles.d.ts +198 -8
  399. package/dist/internal/styles.js +1 -1
  400. package/dist/styles.css +1 -1
  401. package/dist/tailwind.css +899 -125
  402. package/dist/tokens.css +1275 -0
  403. package/dist/types.d.ts +150 -8
  404. package/dist/types.js +0 -8
  405. package/package.json +32 -27
  406. package/README.md +0 -111
  407. package/dist/components/button/Button.js +0 -1
  408. package/dist/components/text-field/TextField.js +0 -1
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as s from"react";import{CloseIcon as l}from"../../internal/icons.js";import{controlTextLeadingClasses as t,disabledClasses as a,focusRingClasses as o,gapClasses as n,glassClasses as i,hasContent as c,iconClasses as d,metaTextClasses as p,radiusClasses as u,readOnlyFilterClasses as f,sheetTitleClasses as m,stackGapClasses as h,surfaceSlots as v,transitionClasses as g}from"../../internal/styles.js";const b={default:{xs:"p-4",sm:"p-5",md:"p-6",lg:"p-8",xl:"p-10"},compact:{xs:"p-2",sm:"p-3",md:"p-4",lg:"p-5",xl:"p-6"}},x={solid:/* @__PURE__ */[i,"border-2 border-dashed text-(--plass-fg) bg-(--plass-glass-press)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[i,"border-2 border-dashed text-(--plass-fg) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"border-2 border-dashed text-(--plass-fg) bg-transparent [border-color:var(--plass-border)]"},y={solid:"hover:bg-(--plass-glass-hover) hover:[border-color:var(--p-line-hover)]",glass:"hover:bg-(--plass-glass-hover) hover:[border-color:var(--p-line-hover)]",ghost:"hover:bg-(--p-soft) hover:[border-color:var(--p-line-hover)]"};function UploadIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e("path",{d:"M8 10.5V2.75m0 0L5.25 5.5M8 2.75 10.75 5.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M2.75 9.75v1.75a1.75 1.75 0 0 0 1.75 1.75h7a1.75 1.75 0 0 0 1.75-1.75V9.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}export function formatFileSize(e){if(e<1e3)return`${e} B`;const r=["kB","MB","GB","TB"];let s=e/1e3,l=0;for(;s>=1e3&&l<r.length-1;)s/=1e3,l+=1;return`${s<10?s.toFixed(1):Math.round(s)} ${r[l]}`}function matchesAccept(e,r){const s=e.name.toLowerCase(),l=e.type.toLowerCase();return r.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?s.endsWith(e):e.endsWith("/*")?l.startsWith(e.slice(0,-1)):l===e)}export const PlFilePicker=/* @__PURE__ */s.forwardRef(function PlFilePicker({variant:i="glass",size:k="md",color:N="primary",density:j="default",elevation:$=0,accept:w,multiple:z=!1,maxSize:C,maxFiles:I,value:L,defaultValue:B,onFilesChange:D,onReject:F,label:M,description:_,error:W,invalid:S,title:P,hint:R,icon:T,showList:A=!0,removeLabel:V=e=>`Remove ${e}`,fullWidth:E=!0,disabled:O=!1,readOnly:q=!1,required:U=!1,name:G,id:H,className:Y,style:J,...K},Q){const X=s.useRef(null);s.useImperativeHandle(Q,()=>X.current);const[Z,ee]=s.useState(()=>[...B??[]]),re=s.useMemo(()=>L?[...L]:Z,[L,Z]),se=s.useRef(0),[le,te]=s.useState(!1),ae=c(W),oe=S??ae,ne=oe?"danger":N,ie=O||q,ce=s.useId(),de=s.useCallback(e=>{L||ee(e),D?.(e)},[D,L]),pe=s.useCallback(e=>{const r=[],s=[],l=z?I??Number.POSITIVE_INFINITY:1,t=z?re.length:0;for(const a of e)w&&!matchesAccept(a,w)?s.push({file:a,reason:"type"}):void 0!==C&&a.size>C?s.push({file:a,reason:"size"}):t+r.length>=l?s.push({file:a,reason:"count"}):r.push(a);return{kept:r,rejections:s}},[w,re.length,I,C,z]),ue=s.useCallback(e=>{const{kept:r,rejections:s}=pe(e);s.length>0&&F?.(s),r.length>0&&de(z?[...re,...r]:r)},[pe,de,re,z,F]),fe=["flex w-full flex-col items-center justify-center text-center","cursor-pointer select-none",b[j][k],u[k],n[k],g,d,o,O?`${a[i]} border-2 border-dashed`:q?`${x[i]} ${f} cursor-default`:x[i],ie?"":y[i],le&&!ie?"bg-(--p-soft-hover) [border-color:var(--p-ring)]":""].filter(Boolean).join(" ");return r("div",{className:["flex-col align-top",h[k],E?"flex w-full":"inline-flex",Y??""].filter(Boolean).join(" "),style:{...v(ne,$),...J},...K,children:[c(M)?e("span",{className:[p[k],"font-semibold",O?"text-(--plass-muted-fg)":"text-(--plass-fg)"].join(" "),children:M}):null,r("div",{className:"flex w-full flex-col",onDragEnter:e=>{ie||(e.preventDefault(),se.current+=1,te(!0))},onDragOver:e=>{ie||(e.preventDefault(),e.dataTransfer.dropEffect="copy")},onDragLeave:()=>{ie||(se.current=Math.max(0,se.current-1),0===se.current&&te(!1))},onDrop:e=>{ie||(e.preventDefault(),se.current=0,te(!1),ue(Array.from(e.dataTransfer.files)))},children:[r("button",{type:"button",id:H,disabled:O,"aria-describedby":c(_)||ae?ce:void 0,"aria-invalid":oe||void 0,className:fe,onClick:()=>{ie||X.current&&(X.current.value="",X.current.click())},children:[void 0===T?e("span",{className:"flex items-center text-(--p-accent) [&_svg]:size-[1.8em]",children:e(UploadIcon,{})}):c(T)?e("span",{className:"flex items-center text-(--p-accent) [&_svg]:size-[1.8em]",children:T}):null,e("span",{className:`font-semibold ${m[k]}`,children:P??"Drop files here, or click to browse"}),c(R)?e("span",{className:`text-(--plass-muted-fg) ${p[k]}`,children:R}):null]}),e("input",{ref:X,type:"file",name:G,accept:w,multiple:z,required:U&&0===re.length,disabled:ie,tabIndex:-1,"aria-hidden":"true",className:"absolute size-px overflow-hidden opacity-0 [clip-path:inset(50%)]",onChange:e=>ue(Array.from(e.target.files??[]))})]}),A&&re.length>0?e("ul",{role:"list",className:`flex w-full flex-col ${h[k]} m-0 list-none p-0`,children:re.map((s,a)=>r("li",{className:["flex w-full items-center gap-2 px-2 py-1.5",u.xs,t[k],"bg-(--p-soft) text-(--plass-fg)"].join(" "),children:[e("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e("span",{className:`shrink-0 text-(--plass-muted-fg) tabular-nums ${p[k]}`,children:formatFileSize(s.size)}),ie?null:e("button",{type:"button","aria-label":V(s.name),className:["inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full","size-[1.3em] text-(--plass-muted-fg) opacity-70","[transition:opacity_var(--plass-duration)_var(--plass-ease),color_var(--plass-duration)_var(--plass-ease)]","[&_svg]:size-[0.9em]","hover:text-(--plass-fg) hover:opacity-100 focus-visible:opacity-100",o].join(" "),onClick:()=>de(re.filter((e,r)=>r!==a)),children:e(l,{})})]},`${s.name}-${s.size}-${s.lastModified}-${a}`))}):null,c(_)&&!ae?e("span",{id:ce,className:`${p[k]} text-(--plass-muted-fg)`,children:_}):null,ae?e("span",{id:ce,className:`${p[k]} text-(--p-accent)`,children:W}):null]})});
@@ -0,0 +1,2 @@
1
+ export { PlFilePicker, formatFileSize } from './PlFilePicker.js';
2
+ export type { PlFilePickerProps, PlFileRejection, PlFileRejectionReason } from './PlFilePicker.js';
@@ -0,0 +1 @@
1
+ export{PlFilePicker,formatFileSize}from"./PlFilePicker.js";
@@ -0,0 +1,118 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassElevation, PlassPosition, PlassStyleProps } from '../../types.js';
4
+ /** A destination's value. The same restraint `PlBottomNavigation` puts on its own. */
5
+ export type PlFloatingBottomNavigationValue = string | number;
6
+ export interface PlFloatingBottomNavigationProps extends Omit<PlassStyleProps, 'variant'>, Omit<React.ComponentPropsWithoutRef<'nav'>, 'color' | 'defaultValue' | 'onChange'> {
7
+ /**
8
+ * What the capsule is made of.
9
+ *
10
+ * `glass` is the default and the whole point: a clear sheet over a blurred
11
+ * backdrop with a hairline around it, floating clear of the page. `solid` is
12
+ * the same sheet at its most opaque, for a bar that sits over photography.
13
+ * `ghost` has no capsule at all — the discs float on their own.
14
+ * @default 'glass'
15
+ */
16
+ variant?: PlassStyleProps['variant'];
17
+ /** The destination the reader is on. Use with `onValueChange` for a controlled bar. */
18
+ value?: PlFloatingBottomNavigationValue | null;
19
+ /** Which starts current, for an uncontrolled bar. */
20
+ defaultValue?: PlFloatingBottomNavigationValue | null;
21
+ onValueChange?: (value: PlFloatingBottomNavigationValue) => void;
22
+ /**
23
+ * How the bar sits in the page's scroll.
24
+ * @default 'fixed'
25
+ */
26
+ position?: PlassPosition;
27
+ /**
28
+ * Keeps the bar clear of the home indicator on a phone, by adding
29
+ * `env(safe-area-inset-bottom)` to the gap under it.
30
+ * @default true
31
+ */
32
+ safeArea?: boolean;
33
+ /**
34
+ * Drop shadow depth. `2`, against the `0` a bar attached to the window edge
35
+ * takes.
36
+ *
37
+ * That is not an inconsistency: this bar is defined by **not** being part of
38
+ * the page. Every other sheet in the library rests on the page and earns its
39
+ * separation from the glass edge, so a shadow is opt-in; this one hovers over
40
+ * whatever is underneath it, and a capsule lying flat on the content it is
41
+ * floating over reads as a mistake.
42
+ * @default 2
43
+ */
44
+ elevation?: PlassElevation;
45
+ /** Every destination stops answering. */
46
+ disabled?: boolean;
47
+ /** The name the bar is announced by — "Main", "Sections". */
48
+ label?: string;
49
+ /**
50
+ * Renders something other than a `<nav>`. Rarely what you want here: a row of
51
+ * destinations is navigation.
52
+ */
53
+ render?: useRender.RenderProp;
54
+ /** The `PlFloatingBottomNavigationItem`s. */
55
+ children?: React.ReactNode;
56
+ }
57
+ export interface PlFloatingBottomNavigationItemProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'value' | 'color'> {
58
+ /** Identifies the destination. What `onValueChange` reports. */
59
+ value: PlFloatingBottomNavigationValue;
60
+ /** The glyph. It is the whole of what a reader sees. */
61
+ icon?: React.ReactNode;
62
+ /** Renders the item as a link rather than as a button. */
63
+ href?: string;
64
+ /** Unavailable, but still part of the set. */
65
+ disabled?: boolean;
66
+ /**
67
+ * The destination's name.
68
+ *
69
+ * **Never drawn, always read.** A row of glyphs with no names is a row of
70
+ * unnamed buttons, which is the defect this prop exists to make impossible.
71
+ */
72
+ children?: React.ReactNode;
73
+ }
74
+ /**
75
+ * A row of round destinations floating clear of the bottom edge of the window.
76
+ *
77
+ * The other half of `PlBottomNavigation`, and a different object rather than a
78
+ * variant of one: that bar is **attached** to the edge of the window — full
79
+ * width, a hairline against the content, its sheet running under the home
80
+ * indicator — and this one is **not part of the page at all**. Everything that
81
+ * follows comes from that one difference: the capsule, the gap under it, the
82
+ * shadow it defaults to, and the pill corners it is allowed.
83
+ *
84
+ * Every destination is a disc with a glyph in it and no name drawn, which is
85
+ * what keeps a row of five inside the width of a phone. The name is still
86
+ * required and still read out — a row of glyphs with no accessible names is the
87
+ * defect `PlIconButton`'s `label` exists to make impossible, and it would be
88
+ * exactly as easy to ship here.
89
+ *
90
+ * The current destination is a key of **tinted glass** riding in the clear
91
+ * sheet, which is the design language's own sentence with nothing added to it.
92
+ * The key is **one element that travels**, measured off whichever disc is
93
+ * current and animated the way a `PlSegmentedButton`'s tile is — not a fill
94
+ * that appears on one disc while it disappears from another. Two discs
95
+ * cross-fading is two objects; a bar with a key in it has one, and where it
96
+ * goes is the whole of what the component has to say.
97
+ *
98
+ * Nothing is transformed: the key is an empty box, and no glyph is resampled
99
+ * while it travels. That is what lets the house no-transform rule survive a
100
+ * component whose entire point is that something moves.
101
+ *
102
+ * It reads `controlSlots` and not the `surfaceSlots` every other container
103
+ * takes, which is the one place this bar is not a container: the slots a
104
+ * container is given are deliberately undyed — no `--p-fill`, no `--p-on-solid`
105
+ * and no `--p-lift` — and the key is made of all three. Asking a container's
106
+ * slot set for a control's colours is asking for `var(--p-fill)` to resolve to
107
+ * nothing, which is a `background-image` the browser drops on the floor and a
108
+ * current destination that looks exactly like the four beside it.
109
+ */
110
+ export declare const PlFloatingBottomNavigation: React.ForwardRefExoticComponent<PlFloatingBottomNavigationProps & React.RefAttributes<HTMLElement>>;
111
+ /**
112
+ * One destination, as a disc.
113
+ *
114
+ * It has no `size`, no `color` and no `variant` of its own: all three belong to
115
+ * the bar, which is the only place they can be set once and mean the same thing
116
+ * for every disc.
117
+ */
118
+ export declare const PlFloatingBottomNavigationItem: React.ForwardRefExoticComponent<PlFloatingBottomNavigationItemProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import*as s from"react";import{useRender as r}from"@base-ui/react/use-render";import{controlHeightClasses as i,controlSlots as l,controlSquareClasses as o,cx as n,focusRingClasses as d,glassClasses as c,hasContent as p,iconSizeClasses as u,srOnlyClasses as f,transitionClasses as m}from"../../internal/styles.js";const g=/* @__PURE__ */s.createContext({value:null,change:()=>{},size:"md",disabled:!1}),v={xs:"pb-2",sm:"pb-3",md:"pb-4",lg:"pb-5",xl:"pb-6"},b={xs:"pb-[calc(env(safe-area-inset-bottom)+0.5rem)]",sm:"pb-[calc(env(safe-area-inset-bottom)+0.75rem)]",md:"pb-[calc(env(safe-area-inset-bottom)+1rem)]",lg:"pb-[calc(env(safe-area-inset-bottom)+1.25rem)]",xl:"pb-[calc(env(safe-area-inset-bottom)+1.5rem)]"},h={default:{xs:"p-1",sm:"p-1",md:"p-1.5",lg:"p-2",xl:"p-2.5"},compact:{xs:"p-0.5",sm:"p-0.5",md:"p-1",lg:"p-1",xl:"p-1.5"}},x={default:{xs:"gap-1",sm:"gap-1",md:"gap-1.5",lg:"gap-2",xl:"gap-2.5"},compact:{xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"}},y={static:"",sticky:"sticky bottom-0 z-20",fixed:"fixed inset-x-0 bottom-0 z-30"},w={solid:/* @__PURE__ */[c,"bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[c,"border bg-(--plass-glass)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:""},N=/* @__PURE__ */["pointer-events-none absolute rounded-full","top-(--p-disc-y) left-(--p-disc-x) h-(--p-disc-h) w-(--p-disc-w)","[background-image:var(--p-fill)]","[box-shadow:var(--plass-shadow-1),var(--p-lift)]","data-[quiet]:opacity-50 data-[quiet]:saturate-[0.35]","[transition-property:left,top,width,height,opacity,filter]","[transition-timing-function:var(--plass-ease)]","[transition-duration:0ms] data-[ready]:[transition-duration:var(--plass-duration)]"].join(" ");export const PlFloatingBottomNavigation=/* @__PURE__ */s.forwardRef(function PlFloatingBottomNavigation({variant:a="glass",size:i="md",color:o="primary",density:d="default",elevation:c=2,value:p,defaultValue:u=null,onValueChange:f,position:k="fixed",safeArea:z=!0,disabled:j=!1,label:P,render:C,className:A,style:R,children:F,...q},B){const[$,E]=s.useState(u),I=void 0!==p,L=I?p:$,O=s.useRef(null),S=s.useRef(null),V=s.useCallback(e=>{const t=O.current,a=S.current;if(!t||!a)return;const s=t.querySelector("[data-disc][data-current]");if(!s)return;const r=!e||!a.hasAttribute("data-ready");r&&a.removeAttribute("data-ready"),a.style.setProperty("--p-disc-x",`${s.offsetLeft}px`),a.style.setProperty("--p-disc-y",`${s.offsetTop}px`),a.style.setProperty("--p-disc-w",`${s.offsetWidth}px`),a.style.setProperty("--p-disc-h",`${s.offsetHeight}px`),a.toggleAttribute("data-quiet",s.hasAttribute("data-disabled")),r&&a.offsetWidth,a.setAttribute("data-ready","")},[]);s.useLayoutEffect(()=>{V(!0)},[V,L,a,i,d,j,F]),s.useEffect(()=>{const e=O.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>V(!1));return t.observe(e),()=>t.disconnect()},[V]);const W=s.useCallback(e=>{I||E(e),f?.(e)},[I,f]),D=s.useMemo(()=>({value:L??null,change:W,size:i,disabled:j}),[L,W,i,j]),H=n("flex w-full justify-center px-4","static"===k?"":"pointer-events-none",z?b[i]:v[i],y[k],A);return r({render:C??e("nav",{}),ref:B,props:{"aria-label":P,className:H,style:{...l(o,c,"solid"),...R},children:e(g.Provider,{value:D,children:t("div",{ref:O,className:n("pointer-events-auto relative inline-flex items-center rounded-full",w[a],h[d][i],x[d][i],m),children:[null!=L?e("span",{ref:S,"aria-hidden":"true",className:N}):null,F]})}),...q}})});export const PlFloatingBottomNavigationItem=/* @__PURE__ */s.forwardRef(function PlFloatingBottomNavigationItem({value:r,icon:l,href:c,disabled:v=!1,className:b,children:h,onClick:x,...y},w){const N=s.useContext(g),k=v||N.disabled,z=null!==N.value&&N.value===r,j=n("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full",i[N.size],o[N.size],"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",m,d,k?"cursor-not-allowed opacity-50 saturate-[0.35] text-(--plass-muted-fg)":z?"cursor-pointer text-(--p-on-solid)":"cursor-pointer text-(--plass-muted-fg) hover:text-(--plass-fg) hover:bg-(--plass-glass-hover)",b),P=t(a,{children:[p(l)?e("span",{className:n("flex shrink-0 items-center justify-center",u[N.size]),children:l}):null,p(h)?e("span",{className:f,children:h}):null]}),C={"data-disc":"","data-current":z?"":void 0,"data-disabled":k?"":void 0},press=e=>{k?e.preventDefault():(N.change(r),x?.(e))};return c?e("a",{ref:w,href:k?void 0:c,"aria-current":z?"page":void 0,"aria-disabled":k||void 0,...C,className:j,onClick:press,...y,children:P}):e("button",{ref:w,type:"button",disabled:k,"aria-current":z?"page":void 0,...C,className:j,onClick:press,...y,children:P})});
@@ -0,0 +1,2 @@
1
+ export { PlFloatingBottomNavigation, PlFloatingBottomNavigationItem } from './PlFloatingBottomNavigation.js';
2
+ export type { PlFloatingBottomNavigationItemProps, PlFloatingBottomNavigationProps, PlFloatingBottomNavigationValue } from './PlFloatingBottomNavigation.js';
@@ -0,0 +1 @@
1
+ export{PlFloatingBottomNavigation,PlFloatingBottomNavigationItem}from"./PlFloatingBottomNavigation.js";
@@ -0,0 +1,67 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassAlignItems, PlassJustify, PlassResponsive } from '../../types.js';
4
+ export interface PlGridProps extends React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * How many columns a row is divided into. Every `span` and every `offset`
7
+ * inside is read against this number, so `columns={24}` makes `span={12}` a
8
+ * half and not a full width.
9
+ * @default 12
10
+ */
11
+ columns?: PlassResponsive<number>;
12
+ /**
13
+ * The gutter between items, on Tailwind's spacing scale — `spacing={4}` is
14
+ * `1rem`, the same length `gap-4` is. Fractions are allowed, so `1.5` is
15
+ * `0.375rem`.
16
+ * @default 2
17
+ */
18
+ spacing?: PlassResponsive<number>;
19
+ /** The gutter between rows only. Falls back to `spacing`. */
20
+ rowSpacing?: PlassResponsive<number>;
21
+ /** The gutter between columns only. Falls back to `spacing`. */
22
+ columnSpacing?: PlassResponsive<number>;
23
+ /** How a row distributes the space its items did not use. */
24
+ justify?: PlassJustify;
25
+ /** How items sit against each other across the row. @default 'stretch' */
26
+ alignItems?: PlassAlignItems;
27
+ /** Where the rows sit when the grid is shorter than the box holding it. */
28
+ alignContent?: PlassJustify;
29
+ /**
30
+ * Whether a row that runs out of columns continues on the next one. Turning
31
+ * it off gives one row that overflows, which is what a horizontally scrolling
32
+ * strip wants.
33
+ * @default true
34
+ */
35
+ wrap?: boolean;
36
+ /**
37
+ * Renders something other than a `<div>`: `render={<section />}`,
38
+ * `render={<ul />}`. Base UI's own escape hatch.
39
+ */
40
+ render?: useRender.RenderProp;
41
+ /** The `PlGridItem`s. */
42
+ children?: React.ReactNode;
43
+ }
44
+ /**
45
+ * A twelve-column row, and the parent every `PlGridItem` needs.
46
+ *
47
+ * It owns the three numbers an item cannot know on its own — how many columns
48
+ * there are and how wide the two gutters are — and hands them down as inherited
49
+ * custom properties rather than through a React context. That is not a
50
+ * shortcut: the values are responsive, and a media query can change an inherited
51
+ * custom property without React hearing about it, so the column count an item
52
+ * lays itself out against is always the one that is actually on screen. A
53
+ * context would have to re-render the tree at every breakpoint to say the same
54
+ * thing.
55
+ *
56
+ * It draws nothing, and it takes no `variant`, `color`, `elevation`, `size` or
57
+ * `density`. A grid is not a surface — it is the arrangement of the surfaces
58
+ * inside it — and there is no padding here either: the gutter round a page is a
59
+ * `PlContainer`'s and the padding round content is a `PlCard`'s, and a grid that
60
+ * had a track of its own would be a third one to keep in step. `spacing` is the
61
+ * only measurement it owns, and it is the space *between* items.
62
+ *
63
+ * Nesting is a `PlGrid` inside a `PlGridItem`, not an item that is also a grid:
64
+ * the inner grid re-declares the column count for its own subtree while the item
65
+ * around it keeps the width the outer grid gave it.
66
+ */
67
+ export declare const PlGrid: React.ForwardRefExoticComponent<PlGridProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import*as r from"react";import{useRender as e}from"@base-ui/react/use-render";import{alignContentClasses as a,alignItemsClasses as n,columnCount as s,justifyClasses as p,responsiveSlots as i,spacingValue as l,withBaseline as t}from"../../internal/grid.js";import{cx as o}from"../../internal/styles.js";export const PlGrid=/* @__PURE__ */r.forwardRef(function PlGrid({columns:r,spacing:c,rowSpacing:g,columnSpacing:m,justify:f,alignItems:d,alignContent:u,wrap:x=!0,render:y,className:w,style:j,children:h,...G},N){const P=o("plass-grid flex",x?"flex-wrap":"flex-nowrap","gap-x-(--p-gap-x) gap-y-(--p-gap-y)",f?p[f]:"",d?n[d]:"",u?a[u]:"",w);return e({render:y,ref:N,props:{className:P,style:{...i("cols",t(r,12),s),...i("gap-x",t(m??c,2),l),...i("gap-y",t(g??c,2),l),...j},children:h,...G}})});
@@ -0,0 +1,50 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassAlignSelf, PlassResponsive } from '../../types.js';
4
+ export interface PlGridItemProps extends React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * How many of the grid's columns the item takes. Read against the grid's
7
+ * `columns`, so `span={6}` is a half of the default twelve and a quarter of
8
+ * `columns={24}`.
9
+ *
10
+ * Responsive: `span={{ xs: 12, md: 6, lg: 4 }}` is full width on a phone, half
11
+ * from 48rem and a third from 64rem. Every entry applies from its own
12
+ * breakpoint up, so two of them usually describe a whole layout.
13
+ *
14
+ * A span wider than the row is clamped to the row rather than overflowing.
15
+ * @default the grid's full width
16
+ */
17
+ span?: PlassResponsive<number>;
18
+ /**
19
+ * Columns left empty *before* the item — space pushed in ahead of it, not an
20
+ * absolute position in the row. First in a twelve-column row, `offset={4}`
21
+ * with `span={4}` is the middle third; after an item that already took four
22
+ * columns, the same offset skips four more and lands on the last third.
23
+ *
24
+ * Responsive in the same way `span` is.
25
+ * @default 0
26
+ */
27
+ offset?: PlassResponsive<number>;
28
+ /** Overrides the row's `alignItems` for this item alone. */
29
+ alignSelf?: PlassAlignSelf;
30
+ /**
31
+ * Renders something other than a `<div>`: `render={<li />}`,
32
+ * `render={<article />}`. Base UI's own escape hatch.
33
+ */
34
+ render?: useRender.RenderProp;
35
+ children?: React.ReactNode;
36
+ }
37
+ /**
38
+ * One cell of a `PlGrid`.
39
+ *
40
+ * It is a width and nothing else — no sheet, no padding, no typography. What
41
+ * goes inside brings its own, which is the whole reason a cell and a `PlCard`
42
+ * are two components: wrapping something in a layout must not change how it
43
+ * looks, and a cell that drew a sheet would make `span` a visual decision.
44
+ *
45
+ * The column count it divides by is inherited from the grid as a custom
46
+ * property, so an item with no `PlGrid` above it falls back to twelve rather
47
+ * than breaking — but it will be a lone width in a plain parent, which is not a
48
+ * layout. Always wrap.
49
+ */
50
+ export declare const PlGridItem: React.ForwardRefExoticComponent<PlGridItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{alignSelfClasses as s,offsetValue as t,responsiveSlots as n,spanValue as i}from"../../internal/grid.js";import{cx as o}from"../../internal/styles.js";export const PlGridItem=/* @__PURE__ */e.forwardRef(function PlGridItem({span:e,offset:a,alignSelf:l,render:f,className:m,style:c,children:d,...p},u){const g=o("plass-grid-item",l?s[l]:"",m);return r({render:f,ref:u,props:{className:g,style:{...n("span",e,i),...n("offset",a,t),...c},children:d,...p}})});
@@ -0,0 +1,4 @@
1
+ export { PlGrid } from './PlGrid.js';
2
+ export type { PlGridProps } from './PlGrid.js';
3
+ export { PlGridItem } from './PlGridItem.js';
4
+ export type { PlGridItemProps } from './PlGridItem.js';
@@ -0,0 +1 @@
1
+ export{PlGrid}from"./PlGrid.js";export{PlGridItem}from"./PlGridItem.js";
@@ -0,0 +1,90 @@
1
+ import * as React from 'react';
2
+ import type { PlTypographyWeight } from '../typography/PlTypography.js';
3
+ import type { PlassColor, PlassVariant } from '../../types.js';
4
+ export interface PlHighlightProps extends Omit<React.ComponentPropsWithoutRef<'span'>, 'color'> {
5
+ /**
6
+ * What to find.
7
+ *
8
+ * A string is one term, an array is several — the longest is tried first, so
9
+ * `['data', 'database']` marks the whole word rather than the first four
10
+ * letters of it. A `RegExp` is used as written, with the global flag forced
11
+ * on; `caseSensitive` and `wholeWord` are ignored for it, because a regular
12
+ * expression already says both of those things itself.
13
+ */
14
+ query: string | string[] | RegExp;
15
+ /**
16
+ * What the mark is made of.
17
+ *
18
+ * - `solid` — the family's gradient with its own ink on it: the highlighter
19
+ * pen. The default.
20
+ * - `glass` — a hairline box with the family's soft tint inside it, for a page
21
+ * where a filled run would be too much.
22
+ * - `ghost` — the accent colour and nothing else, for marking a word inside a
23
+ * heading that is already loud.
24
+ *
25
+ * `glass` is deliberately **not** blurred here, which is the one place in the
26
+ * library the material is quoted rather than used. A mark is a 20px-tall
27
+ * inline box sitting on a line of text; there is no backdrop behind it worth
28
+ * smearing, and `box-decoration-clone` across a line break would smear two.
29
+ * @default 'solid'
30
+ */
31
+ variant?: PlassVariant;
32
+ /**
33
+ * Semantic colour role. `warning` by default, and not arbitrarily: it is the
34
+ * one family whose gradient is light with dark ink on it, so a `solid`
35
+ * `warning` mark is a yellow highlighter over black text rather than a white
36
+ * word on a block of colour.
37
+ * @default 'warning'
38
+ */
39
+ color?: PlassColor;
40
+ /**
41
+ * Whether `a` and `A` are different letters.
42
+ * @default false
43
+ */
44
+ caseSensitive?: boolean;
45
+ /**
46
+ * Whether a term has to be a word on its own — `cat` marking "cat" but not
47
+ * "concatenate".
48
+ *
49
+ * A word here is a run of letters, digits and underscores in any script, so it
50
+ * means what it should for `café` and `naïve`. It means very little for Korean
51
+ * or Japanese, where a phrase is not delimited by spaces at all; that is a
52
+ * property of the writing system rather than of this prop, and is the reason
53
+ * it is off by default.
54
+ * @default false
55
+ */
56
+ wholeWord?: boolean;
57
+ /** Underlines the mark as well. Combines with every variant. */
58
+ underline?: boolean;
59
+ /**
60
+ * Sets the mark's weight. Omit it and the mark is the weight of the text
61
+ * around it — the surface is already saying "this one", and a bolded word
62
+ * inside a sentence changes the rhythm of the whole line.
63
+ */
64
+ weight?: PlTypographyWeight;
65
+ /**
66
+ * The text to search. Elements are walked into and left otherwise untouched,
67
+ * so a match inside a `<strong>` is still marked and the `<strong>` survives.
68
+ */
69
+ children?: React.ReactNode;
70
+ }
71
+ /**
72
+ * Marks the words a reader is looking for, inside text they were already
73
+ * reading.
74
+ *
75
+ * The component is the search, not just the styling: `query` is what a search
76
+ * box holds, and everything about *how* the matching is done — case, whole
77
+ * words, a regular expression — is a prop rather than something a caller has to
78
+ * pre-compute into a list of offsets.
79
+ *
80
+ * The mark is a real `<mark>`, which is the element for "text of relevance to
81
+ * the reader" and is announced as such. That has one consequence worth knowing:
82
+ * marking eleven words in a paragraph tells a screen reader that eleven things
83
+ * are important, which is a way of saying nothing. A highlight is for a handful
84
+ * of matches.
85
+ *
86
+ * Nothing here is stateful and nothing measures — the whole component is a pure
87
+ * function of `children` and `query`, so it re-marks on its own the moment the
88
+ * search box changes.
89
+ */
90
+ export declare const PlHighlight: React.ForwardRefExoticComponent<PlHighlightProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{transitionClasses as r}from"../../internal/styles.js";const t={solid:"[background-image:var(--p-fill)] text-(--p-on-solid)",glass:"border bg-(--p-soft) text-(--p-accent) [border-color:var(--p-line)]",ghost:"bg-transparent text-(--p-accent)"},o={regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},l=/[\p{L}\p{N}_]/u;function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function isWholeWord(e,n,r){const t=n>0?e[n-1]:"",o=r<e.length?e[r]:"";return!l.test(t)&&!l.test(o)}function markString(e,n,r,t){n.lastIndex=0;const o=[];let l,i=0;for(;null!==(l=n.exec(e));){if(""===l[0]){n.lastIndex+=1;continue}const s=l.index,a=s+l[0].length;r&&!isWholeWord(e,s,a)||(s>i&&o.push(e.slice(i,s)),o.push(t(l[0],`${s}`)),i=a)}return 0===o.length?e:(i<e.length&&o.push(e.slice(i)),o)}function markNode(e,r,t,o){if("string"==typeof e)return markString(e,r,t,o);if("number"==typeof e)return markString(String(e),r,t,o);if(Array.isArray(e))return n.Children.map(e,e=>markNode(e,r,t,o));if(n.isValidElement(e)){const l=e.props.children;return void 0===l||"function"==typeof l?e:n.cloneElement(e,void 0,markNode(l,r,t,o))}return e}export const PlHighlight=/* @__PURE__ */n.forwardRef(function PlHighlight({query:l,variant:i="solid",color:s="warning",caseSensitive:a=!1,wholeWord:c=!1,underline:p=!1,weight:u,className:d,style:f,children:g,...m},h){const x=n.useMemo(()=>function buildPattern(e,n){if(e instanceof RegExp)return new RegExp(e.source,e.global?e.flags:`${e.flags}g`);const r=(Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(Boolean).sort((e,n)=>n.length-e.length);return 0===r.length?null:new RegExp(r.map(escapeRegExp).join("|"),n?"gu":"giu")}(l,a),[l,a]),b=["-mx-0.5 rounded-[0.25rem] px-0.5","box-decoration-clone",t[i],p?"underline decoration-2 underline-offset-2":"",u?o[u]:"",r].filter(Boolean).join(" "),v=x?markNode(g,x,c,(n,r)=>e("mark",{className:b,children:n},r)):g;return e("span",{ref:h,className:d,style:{"--p-fill":`var(--plass-${s}-fill)`,"--p-on-solid":`var(--plass-${s}-on-solid)`,"--p-accent":`var(--plass-${s}-accent)`,"--p-soft":`var(--plass-${s}-soft)`,"--p-line":`var(--plass-${s}-line)`,...f},...m,children:v})});
@@ -0,0 +1,2 @@
1
+ export { PlHighlight } from './PlHighlight.js';
2
+ export type { PlHighlightProps } from './PlHighlight.js';
@@ -0,0 +1 @@
1
+ export{PlHighlight}from"./PlHighlight.js";
@@ -0,0 +1,93 @@
1
+ import * as React from 'react';
2
+ import type { PlassElevation, PlassStyleProps } from '../../types.js';
3
+ /**
4
+ * Which keyboard the shortcut is being read on.
5
+ *
6
+ * `auto` asks the browser, which is right for a shortcut a reader is about to
7
+ * press. The three explicit values are for documentation that has to name a
8
+ * platform rather than the reader's own — a support page describing the Windows
9
+ * build, a table comparing the two.
10
+ */
11
+ export type PlHotKeysOS = 'auto' | 'mac' | 'windows' | 'linux';
12
+ /** Four keys laid out as an inverted T: one on top, three beneath. */
13
+ export interface PlHotKeysCluster {
14
+ up: string;
15
+ left: string;
16
+ down: string;
17
+ right: string;
18
+ }
19
+ export interface PlHotKeysProps extends PlassStyleProps, Omit<React.ComponentPropsWithoutRef<'span'>, 'color' | 'children'> {
20
+ /**
21
+ * The keys, innermost punctuation and all.
22
+ *
23
+ * A string is split on `+` — `'Mod+Shift+P'` — which covers everything except
24
+ * a shortcut whose key *is* a plus. For that one, pass the array form:
25
+ * `keys={['Ctrl', '+']}`.
26
+ */
27
+ keys?: string | string[];
28
+ /**
29
+ * Draws the four movement keys as an inverted T instead of an inline combo —
30
+ * `WASD`, or the arrow cluster. Takes precedence over `keys`.
31
+ *
32
+ * It is its own prop rather than a `layout` on `keys`, because the two are
33
+ * different objects: a combo is keys pressed *together*, and a cluster is four
34
+ * keys pressed one at a time whose arrangement on the keyboard is the point.
35
+ */
36
+ cluster?: PlHotKeysCluster;
37
+ /**
38
+ * Which keyboard to name the modifiers for.
39
+ * @default 'auto'
40
+ */
41
+ os?: PlHotKeysOS;
42
+ /**
43
+ * What goes between two keys. Omit it for the platform's own convention: a `+`
44
+ * on Windows and Linux, and nothing at all on macOS, where a shortcut is
45
+ * written as a run of symbols — `⇧⌘P`, never `⇧+⌘+P`.
46
+ */
47
+ separator?: React.ReactNode;
48
+ /**
49
+ * Drop shadow depth. `0` is the default. A key cap already has a lip under it
50
+ * — this is a picture of a key, not a key, and raising it off the page as well
51
+ * is one depth cue too many.
52
+ * @default 0
53
+ */
54
+ elevation?: PlassElevation;
55
+ }
56
+ export interface PlKbdProps extends Pick<PlassStyleProps, 'variant' | 'size' | 'density'>, Omit<React.ComponentPropsWithoutRef<'kbd'>, 'color'> {
57
+ children?: React.ReactNode;
58
+ }
59
+ /**
60
+ * One key cap.
61
+ *
62
+ * Exported so a caller can compose a layout this component does not draw — a
63
+ * numeric keypad, a row of function keys — out of the same object the shortcut
64
+ * strip is made of.
65
+ *
66
+ * It reads its colour slots from whatever set them, which is the `PlHotKeys`
67
+ * around it in the common case. On its own it falls back to the page's own ink,
68
+ * so a bare `<PlKbd>` still draws.
69
+ */
70
+ export declare const PlKbd: React.ForwardRefExoticComponent<PlKbdProps & React.RefAttributes<HTMLElement>>;
71
+ /**
72
+ * A keyboard key, a combination of them, or the four movement keys as they sit
73
+ * on the keyboard.
74
+ *
75
+ * Two things make this more than a styled `<kbd>`, and both are about the label
76
+ * rather than the box around it.
77
+ *
78
+ * The first is `Mod`. A shortcut written as `Ctrl+K` is wrong for every Mac
79
+ * reader and one written as `⌘K` is wrong for everybody else, so the token that
80
+ * means "the modifier shortcuts are built on" resolves per platform — and `os`
81
+ * is there for the pages that have to name a platform rather than the reader's.
82
+ *
83
+ * The second is that `⌘` is not a word. A screen reader reads it as "place of
84
+ * interest sign", so every key drawn as a glyph carries its name beside it, in
85
+ * the clipped box `srOnlyClasses` describes. What is announced is "Command K",
86
+ * which is what the shortcut is called.
87
+ *
88
+ * The keys are real `<kbd>` elements; the wrapper around them is a `<span>`.
89
+ * Nesting `<kbd>` inside `<kbd>` is allowed and would also be defensible, but a
90
+ * `kbd` wrapper is a second box for a host stylesheet to reach into for no gain
91
+ * — the semantics are carried by the keys themselves either way.
92
+ */
93
+ export declare const PlHotKeys: React.ForwardRefExoticComponent<PlHotKeysProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as n,Fragment as a}from"react/jsx-runtime";import*as o from"react";import{controlHeightClasses as r,controlSlots as s,controlTextClasses as t,glassClasses as l,paddingXClasses as i,radiusClasses as m,srOnlyClasses as c,transitionClasses as d}from"../../internal/styles.js";const word=e=>({symbol:e,name:e}),p={mod:{mac:{symbol:"⌘",name:"Command"},windows:word("Ctrl"),linux:word("Ctrl")},meta:{mac:{symbol:"⌘",name:"Command"},windows:word("Win"),linux:word("Super")},ctrl:{mac:{symbol:"⌃",name:"Control"},windows:word("Ctrl"),linux:word("Ctrl")},alt:{mac:{symbol:"⌥",name:"Option"},windows:word("Alt"),linux:word("Alt")},shift:{mac:{symbol:"⇧",name:"Shift"},windows:word("Shift"),linux:word("Shift")},enter:{mac:{symbol:"↩",name:"Enter"},windows:word("Enter"),linux:word("Enter")},tab:{mac:{symbol:"⇥",name:"Tab"},windows:word("Tab"),linux:word("Tab")},escape:{mac:{symbol:"⎋",name:"Escape"},windows:word("Esc"),linux:word("Esc")},backspace:{mac:{symbol:"⌫",name:"Backspace"},windows:word("Backspace"),linux:word("Backspace")},delete:{mac:{symbol:"⌦",name:"Delete"},windows:word("Del"),linux:word("Del")},capslock:{mac:{symbol:"⇪",name:"Caps Lock"},windows:word("Caps Lock"),linux:word("Caps Lock")}},u={cmdorctrl:"mod",commandorcontrol:"mod",cmd:"meta",command:"meta",super:"meta",win:"meta",windows:"meta",control:"ctrl",option:"alt",opt:"alt",return:"enter",esc:"escape",del:"delete",caps:"capslock"},w={up:{symbol:"↑",name:"Arrow up"},down:{symbol:"↓",name:"Arrow down"},left:{symbol:"←",name:"Arrow left"},right:{symbol:"→",name:"Arrow right"},arrowup:{symbol:"↑",name:"Arrow up"},arrowdown:{symbol:"↓",name:"Arrow down"},arrowleft:{symbol:"←",name:"Arrow left"},arrowright:{symbol:"→",name:"Arrow right"}};function detectOS(){if("undefined"==typeof navigator)return"windows";const e=navigator.userAgentData,n=`${e?.platform??""} ${navigator.platform??""} ${navigator.userAgent??""}`;return/mac|iphone|ipad|ipod/i.test(n)?"mac":/win/i.test(n)?"windows":"linux"}function subscribe(){return()=>{}}function serverOS(){return"windows"}const b={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},f={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--p-tint)]"].join(" "),glass:/* @__PURE__ */[l,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--plass-shadow-ambient)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft)"},x={xs:"min-w-6",sm:"min-w-8",md:"min-w-10",lg:"min-w-12",xl:"min-w-14"};export const PlKbd=/* @__PURE__ */o.forwardRef(function PlKbd({variant:n="glass",size:a="md",density:o="compact",className:s,children:l,...c},p){const u=b[a];return e("kbd",{ref:p,className:["inline-flex shrink-0 items-center justify-center","font-mono leading-none font-medium tabular-nums whitespace-nowrap",r[u],t[u],x[u],i[o][u],m[u],f[n],d,s??""].filter(Boolean).join(" "),...c,children:l})});export const PlHotKeys=/* @__PURE__ */o.forwardRef(function PlHotKeys({variant:r="glass",size:t="md",color:l="secondary",density:i="compact",elevation:m=0,keys:d,cluster:b,os:f="auto",separator:x,className:y,style:g,...h},v){const k=function useDetectedOS(){return o.useSyncExternalStore(subscribe,detectOS,serverOS)}(),A="auto"===f?k:f,C={...s(l,m,r),...g},S={variant:r,size:t,density:i},j="xs"===t||"sm"===t?"gap-1":"gap-1.5";if(b)return n("span",{ref:v,className:["inline-flex flex-col items-center align-middle",j,y??""].filter(Boolean).join(" "),style:C,...h,children:[e(PlKbd,{...S,children:b.up}),n("span",{className:`inline-flex ${j}`,children:[e(PlKbd,{...S,children:b.left}),e(PlKbd,{...S,children:b.down}),e(PlKbd,{...S,children:b.right})]})]});const K=function tokenize(e){return Array.isArray(e)?e.map(e=>e.trim()).filter(Boolean):e.split("+").map(e=>e.trim()).filter(Boolean)}(d??[]).map(e=>function labelFor(e,n){const a=e.toLowerCase().replace(/[\s_-]/g,""),o=u[a]??a,r=w[o];if(r)return r;const s=p[o];return s?s[n]:word(1===e.length?e.toUpperCase():e)}(e,A)),P=void 0===x?"mac"===A?null:"+":x;return e("span",{ref:v,className:["inline-flex max-w-full items-center gap-1 align-middle",y??""].filter(Boolean).join(" "),style:C,...h,children:K.map((r,s)=>n(o.Fragment,{children:[s>0&&null!==P?e("span",{"aria-hidden":"true",className:"text-(--plass-muted-fg)",children:P}):null,e(PlKbd,{...S,children:r.symbol===r.name?r.symbol:n(a,{children:[e("span",{"aria-hidden":"true",children:r.symbol}),e("span",{className:c,children:r.name})]})})]},s))})});
@@ -0,0 +1,2 @@
1
+ export { PlHotKeys, PlKbd } from './PlHotKeys.js';
2
+ export type { PlHotKeysCluster, PlHotKeysOS, PlHotKeysProps, PlKbdProps } from './PlHotKeys.js';
@@ -0,0 +1 @@
1
+ export{PlHotKeys,PlKbd}from"./PlHotKeys.js";
@@ -0,0 +1,62 @@
1
+ import * as React from 'react';
2
+ import type { PlassColor, PlassSize } from '../../types.js';
3
+ export interface PlIconProps extends Omit<React.ComponentPropsWithoutRef<'span'>, 'color'> {
4
+ /**
5
+ * The glyph. An `<svg>` element, an `<img>`, a component from an icon set, or
6
+ * a character — whatever is passed is laid into a box of the right size and
7
+ * given a colour to inherit.
8
+ *
9
+ * It is a prop rather than `children` on purpose. An icon set hands you an
10
+ * element you did not draw, and the two things you always want to change about
11
+ * it — how big it is and what colour it is — are the two you cannot reach once
12
+ * it is a child of something. As a prop it is content the icon *sizes*, not
13
+ * content the icon merely wraps.
14
+ */
15
+ icon: React.ReactNode;
16
+ /**
17
+ * The box the glyph is drawn in: 14, 16, 20, 24 and 28px. Its own ladder
18
+ * rather than the control heights, because an icon is not a control.
19
+ * @default 'md'
20
+ */
21
+ size?: PlassSize;
22
+ /**
23
+ * Semantic colour role, or `inherit` — the default — to take the colour of
24
+ * whatever the icon sits in.
25
+ *
26
+ * `inherit` and not `primary`, which is the one place this prop departs from
27
+ * every other component in the library. An icon is content, and the
28
+ * overwhelmingly common case is an icon inside something that has already
29
+ * decided what colour its content is: a `PlButton`'s label, a muted caption, a
30
+ * `PlAlert`'s own family. An icon that arrived pre-dyed would have to be turned
31
+ * off again at every one of those.
32
+ * @default 'inherit'
33
+ */
34
+ color?: PlassColor | 'inherit';
35
+ /**
36
+ * What the icon says, for a reader who cannot see it.
37
+ *
38
+ * Without it the icon is hidden from the accessibility tree entirely, which is
39
+ * the right default: the overwhelming majority of icons sit next to a word that
40
+ * already says the same thing, and reading both out loud is worse than reading
41
+ * one. Pass this only when the glyph is carrying meaning on its own.
42
+ */
43
+ label?: string;
44
+ }
45
+ /**
46
+ * A glyph at a known size, in a known colour.
47
+ *
48
+ * The library draws no icons of its own beyond the handful its components need —
49
+ * an icon set is a decision that belongs to the app, not to the component
50
+ * library it installs. What this does is give whatever icon the app chose the
51
+ * same two axes everything else here has.
52
+ *
53
+ * The box is `inline-flex` with the glyph told to fill it, and `font-size` is
54
+ * set to the same length — so an `<svg>` with its own `width`, an `<svg>` sized
55
+ * in `em`, and a bare character all come out the same size. That is the whole
56
+ * component: a box, a length written twice, and a colour.
57
+ *
58
+ * There is no `variant` and no `elevation`. An icon is not a surface: it is ink,
59
+ * and the only thing the design language has to say about ink is which family it
60
+ * is drawn in.
61
+ */
62
+ export declare const PlIcon: React.ForwardRefExoticComponent<PlIconProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{iconSizeClasses as i}from"../../internal/styles.js";const r={xs:"text-[0.875rem]",sm:"text-[1rem]",md:"text-[1.25rem]",lg:"text-[1.5rem]",xl:"text-[1.75rem]"};export const PlIcon=/* @__PURE__ */t.forwardRef(function PlIcon({icon:t,size:n="md",color:l="inherit",label:s,className:o,style:a,...c},m){const f=["inline-flex shrink-0 items-center justify-center align-middle",i[n],"[&>svg]:block [&>svg]:size-full [&>img]:block [&>img]:size-full",`leading-none ${r[n]}`,"inherit"===l?"":"text-(--p-accent)",o??""].filter(Boolean).join(" ");return e("span",{ref:m,className:f,style:"inherit"===l?a:{"--p-accent":`var(--plass-${l}-accent)`,...a},role:s?"img":void 0,"aria-label":s,"aria-hidden":!s||void 0,...c,children:t})});
@@ -0,0 +1,2 @@
1
+ export { PlIcon } from './PlIcon.js';
2
+ export type { PlIconProps } from './PlIcon.js';
@@ -0,0 +1 @@
1
+ export{PlIcon}from"./PlIcon.js";
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { type PlButtonProps } from '../button/PlButton.js';
3
+ export interface PlIconButtonProps extends Omit<PlButtonProps, 'children' | 'startIcon' | 'endIcon'> {
4
+ /**
5
+ * The glyph. Wrap it in a `PlIcon` when it needs a size of its own; passed
6
+ * bare it is sized in `em` against the button, exactly as a `startIcon` is.
7
+ */
8
+ icon: React.ReactNode;
9
+ /**
10
+ * What the button does, in words.
11
+ *
12
+ * Required, and the one prop here that is. A button whose whole label is a
13
+ * drawing has no accessible name at all, and "an icon button with no
14
+ * `aria-label`" is the single most common accessibility defect a component
15
+ * library ships. Making it required is the only fix that survives review.
16
+ */
17
+ label: string;
18
+ }
19
+ /**
20
+ * A round button with a glyph in it and nothing else.
21
+ *
22
+ * A `PlButton` with an icon and no children already goes square — the same
23
+ * height, the same width, the house fillet cut off it. This is the other shape:
24
+ * a disc.
25
+ *
26
+ * That disc is a deliberate exception to the radius rule, which holds every
27
+ * corner well short of the 50% that would make a control a pill, because the
28
+ * flat run along the top and bottom edge is what still reads as a sheet with its
29
+ * corners cut. The rule is about *labelled* controls: the flat run is there for
30
+ * the line of text to sit on, and a glyph has no line of text. A circle with a
31
+ * single mark centred in it is a punched token rather than a moulded key, so it
32
+ * says the thing the rule exists to protect by a different route.
33
+ *
34
+ * Everything else is `PlButton`'s, unchanged and on purpose: the three
35
+ * materials, the elevation ladder, the pointer light, `loading`, `readOnly` and
36
+ * `disabled`. Two components that draw the same surface out of two copies of the
37
+ * same table are two components that will eventually disagree.
38
+ */
39
+ export declare const PlIconButton: React.ForwardRefExoticComponent<PlIconButtonProps & React.RefAttributes<HTMLButtonElement>>;