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,67 @@
1
+ /**
2
+ * The arithmetic and the vocabulary `PlGrid` and `PlGridItem` share.
3
+ *
4
+ * Like `internal/styles.ts` this is the library talking to itself, and it lives
5
+ * here rather than in either component's folder for one reason: the two are one
6
+ * system in two elements, and neither should have to import the other.
7
+ *
8
+ * What is *not* here is the layout itself. A column width is
9
+ * `(100% + gap) * span / columns - gap`, it has to change at four breakpoints,
10
+ * and it is the width of an element whose column count is declared on its
11
+ * parent — none of which Tailwind can spell, because Tailwind only ever sees
12
+ * class names written out literally and `columns` is a number a caller picks.
13
+ * So the widths are real CSS in `styles.css`, driven by the `--p-*` slots this
14
+ * file generates. That is the same split the rest of the library makes:
15
+ * per-instance values go in inline custom properties, never in class names.
16
+ */
17
+ import type * as React from 'react';
18
+ import type { PlassAlignItems, PlassAlignSelf, PlassBreakpoint, PlassJustify, PlassResponsive } from '../types.js';
19
+ /** Smallest first, which is also the order the media queries have to be in. */
20
+ export declare const breakpoints: readonly PlassBreakpoint[];
21
+ /**
22
+ * Turns a responsive value into the `--p-{name}-{breakpoint}` slots the CSS
23
+ * reads, emitting only the breakpoints the caller actually named.
24
+ *
25
+ * The gaps are filled in by CSS rather than here: each breakpoint's rule falls
26
+ * back through the ones below it, so `{ md: 6 }` needs one slot and not five.
27
+ * That keeps the inline style on a grid item down to what was asked for.
28
+ */
29
+ export declare function responsiveSlots<T>(name: string, value: PlassResponsive<T> | undefined, toCss: (value: T) => string): React.CSSProperties;
30
+ /**
31
+ * Fills in the `xs` entry of a partial map with the prop's own default.
32
+ *
33
+ * Without this, `spacing={{ md: 4 }}` would be a grid with no gutter at all
34
+ * below 48rem — the CSS fallback rather than the documented default — and a
35
+ * caller who narrowed one breakpoint would silently lose every other one. A map
36
+ * says "from here up, use this instead"; it does not say "and nothing below".
37
+ */
38
+ export declare function withBaseline<T>(value: PlassResponsive<T> | undefined, baseline: T): PlassResponsive<T>;
39
+ /**
40
+ * A count of columns, as a plain number for `calc()` to divide by.
41
+ *
42
+ * Rounded and floored at 1 because the value ends up as a divisor: a grid of
43
+ * 2.5 columns is not a thing anybody meant, and a grid of 0 is a division by
44
+ * zero that would take the width declaration down with it.
45
+ */
46
+ export declare function columnCount(value: number): string;
47
+ /** A span or an offset. Same rounding; an offset of 0 is meaningful. */
48
+ export declare function columnUnits(value: number, min: number): string;
49
+ export declare const spanValue: (value: number) => string;
50
+ export declare const offsetValue: (value: number) => string;
51
+ /**
52
+ * A gutter, as a length.
53
+ *
54
+ * Fractions are the point — `spacing={1.5}` is `0.375rem`, the same step
55
+ * `gap-1.5` is — so the multiplication is rounded to five places rather than
56
+ * left to print `0.30000000000000004rem` into the DOM.
57
+ */
58
+ export declare function spacingValue(units: number): string;
59
+ export declare const justifyClasses: Record<PlassJustify, string>;
60
+ export declare const alignItemsClasses: Record<PlassAlignItems, string>;
61
+ /**
62
+ * Where the *rows* sit when the grid is shorter than the box holding it. Only
63
+ * ever visible on a grid with a height of its own, which is why it takes the
64
+ * full distribution vocabulary and `alignItems` does not.
65
+ */
66
+ export declare const alignContentClasses: Record<PlassJustify, string>;
67
+ export declare const alignSelfClasses: Record<PlassAlignSelf, string>;
@@ -0,0 +1 @@
1
+ export const breakpoints=["xs","sm","md","lg","xl"];export function responsiveSlots(t,e,n){const s=function breakpointMap(t){return null==t?{}:"object"==typeof t?t:{xs:t}}(e),o={};for(const e of breakpoints){const r=s[e];void 0!==r&&(o[`--p-${t}-${e}`]=n(r))}return o}export function withBaseline(t,e){return null==t?e:"object"==typeof t?{xs:e,...t}:t}export function columnCount(t){return String(Math.max(1,Math.round(t)))}export function columnUnits(t,e){return String(Math.max(e,Math.round(t)))}export const spanValue=t=>columnUnits(t,1);export const offsetValue=t=>columnUnits(t,0);export function spacingValue(t){const e=.25*Math.max(0,t);return`${Number(e.toFixed(5))}rem`}export const justifyClasses={start:"justify-start",center:"justify-center",end:"justify-end","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly",stretch:"justify-stretch"};export const alignItemsClasses={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"};export const alignContentClasses={start:"content-start",center:"content-center",end:"content-end","space-between":"content-between","space-around":"content-around","space-evenly":"content-evenly",stretch:"content-stretch"};export const alignSelfClasses={auto:"self-auto",start:"self-start",center:"self-center",end:"self-end",stretch:"self-stretch",baseline:"self-baseline"};
@@ -4,10 +4,11 @@
4
4
  * A component that needs a shape nobody else needs draws it in its own file.
5
5
  * What lands here is what two components would otherwise each have a copy of —
6
6
  * and the reason that matters is not the duplication, it is that two copies
7
- * drift: a spinner in a Button and a spinner in a TextField have to be the same
7
+ * drift: a spinner in a PlButton and a spinner in a PlTextField have to be the same
8
8
  * object in motion, or a form that is saving looks like two things loading.
9
9
  */
10
10
  import * as React from 'react';
11
+ import type { PlassColor } from '../types.js';
11
12
  /**
12
13
  * The one thing in the library that moves on its own, and the only place that
13
14
  * is allowed: an indeterminate indicator that does not move is a decoration.
@@ -16,3 +17,87 @@ import * as React from 'react';
16
17
  * it tracks the label rather than carrying a size of its own.
17
18
  */
18
19
  export declare function Spinner(): React.ReactElement;
20
+ /**
21
+ * The disclosure chevron, drawn pointing **down**.
22
+ *
23
+ * One drawing for every direction: a PlAccordion's header, a PlSelect's
24
+ * trigger, a PlPagination's stepper all want the same wedge turned a different
25
+ * way. Turning it is the one allowance the no-transform rule makes — the rule
26
+ * is about a control resampling its own label under the pointer, and a glyph
27
+ * has no text in it to resample.
28
+ */
29
+ export declare function ChevronIcon(): React.ReactElement;
30
+ /**
31
+ * The arrow, drawn pointing **right**.
32
+ *
33
+ * One of the two marks a trail can put between its steps, and the one that says
34
+ * "and then" out loud. It is turned back under RTL by whoever draws it rather
35
+ * than being redrawn, the same allowance the chevron takes.
36
+ */
37
+ export declare function ArrowRightIcon(): React.ReactElement;
38
+ /** Three dots: the middle of something that has been folded away. */
39
+ export declare function EllipsisIcon(): React.ReactElement;
40
+ /** The tick: a chosen option, a ticked menu item, a checked box. */
41
+ export declare function CheckIcon(): React.ReactElement;
42
+ /**
43
+ * The two steppers' marks.
44
+ *
45
+ * A pair, and they stay one: a minus drawn at a different weight from the plus
46
+ * beside it reads as two toolkits in one control.
47
+ */
48
+ export declare function MinusIcon(): React.ReactElement;
49
+ export declare function PlusIcon(): React.ReactElement;
50
+ /**
51
+ * The ×.
52
+ *
53
+ * One drawing for every dismissal in the library — a file's remove button, an
54
+ * alert's close, a modal's. Two copies of an × drift by half a pixel of stroke
55
+ * weight, and then a page has two kinds of "close" on it.
56
+ */
57
+ export declare function CloseIcon(): React.ReactElement;
58
+ /** The clock: something that has been started and has not finished. */
59
+ export declare function ClockIcon(): React.ReactElement;
60
+ /** The calendar: a page with a binding across the top. The pickers' glyph. */
61
+ export declare function CalendarIcon(): React.ReactElement;
62
+ /** The chain: a link that stays on this page. */
63
+ export declare function LinkIcon(): React.ReactElement;
64
+ /** The arrow leaving its box: a link that takes over a new tab. */
65
+ export declare function ExternalLinkIcon(): React.ReactElement;
66
+ /**
67
+ * The filled dot a chosen radio row is marked with.
68
+ *
69
+ * A dot and not a tick, which is the distinction `PlCheckbox` and `PlRadioGroup`
70
+ * make everywhere else: a tick says "and", a dot says "instead of".
71
+ */
72
+ export declare function DotIcon(): React.ReactElement;
73
+ /**
74
+ * A star, filled, in the same 16-unit box every other glyph here uses.
75
+ *
76
+ * `StarIcon` and `StarOutlineIcon` are the same five points traced twice —
77
+ * once painted, once stroked — and they have to be, because `PlRating` lays one
78
+ * over the other and clips the top copy to a fraction of the width. Two stars
79
+ * of two shapes would show as a rim that does not line up with what is inside
80
+ * it.
81
+ */
82
+ export declare function StarIcon(): React.ReactElement;
83
+ /** The same five points, stroked. See `StarIcon`. */
84
+ export declare function StarOutlineIcon(): React.ReactElement;
85
+ /**
86
+ * One drawing per colour family, and a piece of the design language rather than
87
+ * a convenience.
88
+ *
89
+ * An alert that says "this went wrong" only in red says it only to some
90
+ * readers, so the shape has to carry the meaning too — and that only holds if
91
+ * every component uses the same shape for the same family.
92
+ *
93
+ * `primary` and `secondary` have no severity to draw, so they take the note the
94
+ * informational one uses: three shapes for six families, because the three that
95
+ * mean something are the three worth telling apart.
96
+ *
97
+ * A function and not the table of elements it reads like, because a table is
98
+ * the one shape a bundler cannot take apart: six entries built at module load,
99
+ * kept whole or not at all, and pulled into every component that touches the
100
+ * file. A function declaration is dropped outright by anything that does not
101
+ * call it, which is most of the library.
102
+ */
103
+ export declare function severityIcon(color: PlassColor): React.ReactElement;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";export function Spinner(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"animate-spin",children:[r("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),r("path",{d:"M14.5 8A6.5 6.5 0 0 0 8 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";export function Spinner(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"animate-spin",children:[r("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),r("path",{d:"M14.5 8A6.5 6.5 0 0 0 8 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}export function ChevronIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r("path",{d:"m4.5 6.5 3.5 3.5 3.5-3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}export function ArrowRightIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r("path",{d:"M3 8h10m-3.5-3.5L13 8l-3.5 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}export function EllipsisIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("circle",{cx:"3.5",cy:"8",r:"1.15",fill:"currentColor"}),r("circle",{cx:"8",cy:"8",r:"1.15",fill:"currentColor"}),r("circle",{cx:"12.5",cy:"8",r:"1.15",fill:"currentColor"})]})}export function CheckIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r("path",{d:"m3.5 8.5 3 3 6-6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}export function MinusIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}export function PlusIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}export function CloseIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r("path",{d:"m4.5 4.5 7 7m0-7-7 7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}export function ClockIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeWidth:"1.5"}),r("path",{d:"M8 4.5V8l2.4 1.6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}export function CalendarIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("rect",{x:"2.25",y:"3.25",width:"11.5",height:"10.5",rx:"2",stroke:"currentColor",strokeWidth:"1.5"}),r("path",{d:"M2.25 6.5h11.5",stroke:"currentColor",strokeWidth:"1.5"}),r("path",{d:"M5.5 1.75v2.5M10.5 1.75v2.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}export function LinkIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("path",{d:"M6.5 9.5a2.75 2.75 0 0 0 4 .25l1.75-1.75a2.75 2.75 0 0 0-3.9-3.9L7.75 5.2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),r("path",{d:"M9.5 6.5a2.75 2.75 0 0 0-4-.25L3.75 8a2.75 2.75 0 0 0 3.9 3.9l.6-.6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}export function ExternalLinkIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("path",{d:"M12.75 9.25v2.5a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5h2.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),r("path",{d:"M9.5 2.75h3.75V6.5M7.25 8.75l5.75-5.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function NoteIcon(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeWidth:"1.5"}),r("path",{d:"M8 7.25v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),r("circle",{cx:"8",cy:"4.9",r:"0.85",fill:"currentColor"})]})}export function DotIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:r("circle",{cx:"8",cy:"8",r:"3.25"})})}export function StarIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:r("path",{d:"m8 1.6 1.86 3.9 4.14.56-3.02 2.9.76 4.24L8 11.16 4.26 13.2l.76-4.24L2 6.06l4.14-.56z"})})}export function StarOutlineIcon(){return r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r("path",{d:"m8 1.6 1.86 3.9 4.14.56-3.02 2.9.76 4.24L8 11.16 4.26 13.2l.76-4.24L2 6.06l4.14-.56z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})})}export function severityIcon(o){return"success"===o?e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeWidth:"1.5"}),r("path",{d:"m5.25 8.25 1.9 1.9 3.6-3.9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}):"warning"===o?e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("path",{d:"M7.13 2.6 1.9 11.7a1 1 0 0 0 .87 1.5h10.46a1 1 0 0 0 .87-1.5L8.87 2.6a1 1 0 0 0-1.74 0Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),r("path",{d:"M8 6.1v3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),r("circle",{cx:"8",cy:"11.2",r:"0.85",fill:"currentColor"})]}):"danger"===o?e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeWidth:"1.5"}),r("path",{d:"m5.9 5.9 4.2 4.2m0-4.2-4.2 4.2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}):r(NoteIcon,{})}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * What every row of a `PlMenu` inherits from the popup around it.
3
+ *
4
+ * A context rather than props threaded down, and a file of its own rather than
5
+ * something exported from the component, for one reason: `PlMenu` and
6
+ * `PlContextMenu` are two triggers onto the same surface, and a row written
7
+ * inside either has to come out identical. A context declared in one of them
8
+ * would make the other import from it.
9
+ *
10
+ * `size`, `color` and `density` belong to the *set*. A menu whose third row is
11
+ * a size out is not a menu.
12
+ */
13
+ import * as React from 'react';
14
+ import type { PlassColor, PlassDensity, PlassSize } from '../types.js';
15
+ export interface PlassMenuContextValue {
16
+ size: PlassSize;
17
+ color: PlassColor;
18
+ density: PlassDensity;
19
+ }
20
+ export declare const MenuContext: React.Context<PlassMenuContextValue>;
@@ -0,0 +1 @@
1
+ import*as t from"react";export const MenuContext=/* @__PURE__ */t.createContext({size:"md",color:"primary",density:"default"});
@@ -0,0 +1,118 @@
1
+ import * as React from 'react';
2
+ import type { PlassPickerLabels } from './calendar.js';
3
+ import type { PlassColor, PlassElevation, PlassSize, PlassStyleProps } from '../types.js';
4
+ /**
5
+ * The shell all four pickers wear: a field-shaped trigger with a popup hanging
6
+ * off it.
7
+ *
8
+ * It is here rather than in one of the components for the reason the calendar
9
+ * is: four components need it, and none of them should have to import another.
10
+ * What it draws is deliberately not new — the trigger is `fieldRestClasses`,
11
+ * the same box a `PlTextField` and a `PlSelect`'s trigger are drawn on, to the
12
+ * pixel. A form where the date field is a different height, radius or material
13
+ * from the text field beside it is a form that looks assembled rather than
14
+ * designed.
15
+ *
16
+ * The one thing the pickers do *not* offer is typing a date into the trigger.
17
+ * Parsing a date out of free text is locale-dependent in a way that cannot be
18
+ * done honestly without a date library, and a field that understands `27/7/26`
19
+ * in one browser and not the next is worse than one that never claimed to. So
20
+ * the trigger is a button, exactly as a select's is, and the calendar is where
21
+ * the answer comes from.
22
+ */
23
+ /**
24
+ * The popup's slots: a container's undyed sheet with the *control* fill added
25
+ * back on top.
26
+ *
27
+ * Neither generator in `internal/styles` says this on its own, and the reason is
28
+ * that a picker's popup is both things at once. It is a container — it holds a
29
+ * grid of forty-two days, and dyeing the sheet under them would put every one of
30
+ * them on a background it was not chosen against — and it also holds the one
31
+ * filled token in the library that has to be found without being read, which is
32
+ * the day you picked. So the sheet stays clear glass and the family arrives in
33
+ * the two fill slots the chosen cell reads.
34
+ */
35
+ export declare function popupSlots(color: PlassColor, elevation: PlassElevation): React.CSSProperties;
36
+ /**
37
+ * The popup. Like every floating surface in the library it carries a shadow by
38
+ * default, at level 3 — as far as the ladder goes without hovering — because it
39
+ * is genuinely off the page rather than merely on top of it.
40
+ */
41
+ export declare const pickerPopupClasses: string;
42
+ /** The popup's own padding, one track tighter than a control's. */
43
+ export declare const popupPaddingClasses: Record<PlassSize, string>;
44
+ export interface PlassPickerShellProps extends PlassStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'children' | 'defaultValue'> {
45
+ /**
46
+ * Drop shadow depth of the *trigger*. `0`, like a `PlTextField`: a field is
47
+ * cut into the sheet rather than resting on it. The popup has its own, fixed
48
+ * at `3` — it genuinely floats above the page.
49
+ * @default 0
50
+ */
51
+ elevation?: PlassElevation;
52
+ /** Label above the trigger. */
53
+ label?: React.ReactNode;
54
+ /** Helper text below it. */
55
+ description?: React.ReactNode;
56
+ /** Error message below. Its presence also turns the control invalid. */
57
+ error?: React.ReactNode;
58
+ /** Forces the invalid state without a message. Defaults to whether `error` has content. */
59
+ invalid?: boolean;
60
+ /** The glyph before the value — a calendar or a clock. */
61
+ startIcon?: React.ReactNode;
62
+ /** Stretches to the width of the container. */
63
+ fullWidth?: boolean;
64
+ /** Unavailable. */
65
+ disabled?: boolean;
66
+ /** The value is shown but cannot be changed, and the popup does not open. */
67
+ readOnly?: boolean;
68
+ /** Whether a value must be chosen before the form is submitted. */
69
+ required?: boolean;
70
+ id?: string;
71
+ }
72
+ interface InternalShellProps extends PlassPickerShellProps {
73
+ /** What the trigger reads. A placeholder when `empty`. */
74
+ display: React.ReactNode;
75
+ /**
76
+ * Every string the display could hold, so the trigger stops changing width
77
+ * with its value. `displaySamples` in `internal/date` produces them and
78
+ * `WidthSizer` is what lays them out.
79
+ */
80
+ samples?: string[];
81
+ /** Nothing has been chosen yet, so the display is muted. */
82
+ empty: boolean;
83
+ /** Offers the × that empties the control. */
84
+ clearable?: boolean;
85
+ onClear: () => void;
86
+ open: boolean;
87
+ onOpenChange: (open: boolean) => void;
88
+ labels: PlassPickerLabels;
89
+ /** `<input type="hidden">` rows, so the control submits with a form. */
90
+ hiddenValues?: Array<{
91
+ name: string;
92
+ value: string;
93
+ }>;
94
+ children: React.ReactNode;
95
+ triggerRef?: React.Ref<HTMLButtonElement>;
96
+ }
97
+ /**
98
+ * A trigger, a label, the two lines of text under it, and a popup.
99
+ *
100
+ * Everything about it that is visible is a decision already made elsewhere: the
101
+ * shell classes, the read-only and disabled treatments, the label's type scale
102
+ * and the way `invalid` re-points the whole colour family at `danger` so the
103
+ * edge, the ring and the message turn over together.
104
+ */
105
+ export declare function PickerShell({ variant, size, color, density, elevation, label, description, error, invalid, startIcon, fullWidth, disabled, readOnly, required, id, className, style, display, samples, empty, clearable, onClear, open, onOpenChange, labels, hiddenValues, children, triggerRef, ...props }: InternalShellProps): React.JSX.Element;
106
+ /**
107
+ * The row of shortcuts under a picker's panel.
108
+ *
109
+ * A hairline above it rather than a gap, because the actions act on the panel
110
+ * and a gap would read as a second popup stacked under the first.
111
+ */
112
+ export declare function PickerFooter({ size, children }: {
113
+ size: PlassSize;
114
+ children: React.ReactNode;
115
+ }): React.JSX.Element;
116
+ /** The vertical hairline between a calendar and the clock beside it. */
117
+ export declare function PickerDivider(): React.JSX.Element;
118
+ export {};
@@ -0,0 +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:_,style:B,display:E,samples:L,empty:T,clearable:V=!1,onClear:W,open:A,onOpenChange:G,labels:H,hiddenValues:J,children:K,triggerRef:M,...Q}){const U=s.useId(),X=I??`${U}-trigger`,Y=`${U}-label`,Z=`${U}-description`,ee=`${U}-error`,le=null!=z&&!1!==z&&""!==z,se=O??le,ae=se?"danger":x,re=S||q,te=[$?Z:null,le?ee:null].filter(Boolean).join(" ")||void 0;return l(a.Root,{disabled:S,invalid:se,className:d("flex-col align-top",N[g],R?"flex w-full":"inline-flex",_),style:{...P(ae,k),...B},...Q,children:[C?e(a.Label,{id:Y,htmlFor:X,className:d(b[g],"font-semibold",S?"text-(--plass-muted-fg)":"text-(--plass-fg)"),children:C}):null,l(r.Root,{open:A,onOpenChange:e=>G(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]),children:[l(r.Trigger,{id:X,ref:M,disabled:S,"aria-labelledby":C?Y:void 0,"aria-describedby":te,"aria-required":D||void 0,"aria-invalid":se||void 0,className:d("flex min-w-0 flex-1 items-center bg-transparent text-start [font:inherit] text-inherit",h[g],"[outline:none]",re?"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",T?"text-(--plass-muted-fg)":"text-(--plass-fg)"),children:E}),e(i,{samples:L??[]})]})]}),!V||T||re?null:e("button",{type:"button","aria-label":H.clear,className:d(n,"text-(--plass-muted-fg)"),onClick:e=>{e.stopPropagation(),W()},children:e(t,{})})]}),e(r.Portal,{children:e(r.Positioner,{className:"plass-portal z-50 [outline:none]",sideOffset:6,align:"start",children:e(r.Popup,{initialFocus:!1,className:d(pickerPopupClasses,y[g],popupPaddingClasses[g],p[g]),style:popupSlots(ae,3),children:K})})})]}),$?e(a.Description,{id:Z,className:d(b[g],"text-(--plass-muted-fg)"),children:$}):null,le?e(a.Error,{id:ee,match:!0,className:d(b[g],"text-(--p-accent)"),children:z}):null,J?.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)"})}
@@ -0,0 +1,145 @@
1
+ /**
2
+ * What the three progress indicators share.
3
+ *
4
+ * `PlProgressLinear`, `PlProgressCircular` and `PlProgressBox` are three shapes
5
+ * answering one question — how far along is this, and is it moving at all — so
6
+ * everything that is *not* the shape belongs here: the colour slots, the size
7
+ * ladders, and the arithmetic that turns `value`/`min`/`max` into a fraction.
8
+ *
9
+ * What is left in each component is the shape, which is the point: it is the
10
+ * only thing that genuinely differs.
11
+ */
12
+ import type * as React from 'react';
13
+ import type { PlassColor, PlassSize } from '../types.js';
14
+ /**
15
+ * The props all three take.
16
+ *
17
+ * Declared once and extended rather than written three times, because the whole
18
+ * claim being made is that these are one component in three shapes: a `value`
19
+ * of `null` has to mean the same thing on a bar, a ring and a row of plates, or
20
+ * the trio is three components that happen to share a prefix.
21
+ */
22
+ export interface PlassProgressProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'children'> {
23
+ /**
24
+ * How far along, between `min` and `max`.
25
+ *
26
+ * `null` — the default — is the indeterminate case: something is happening
27
+ * and nobody knows how much of it is left. That is the default on purpose. An
28
+ * indicator that has not been told a value should say so rather than draw an
29
+ * empty bar, which is a claim that no progress has been made.
30
+ * @default null
31
+ */
32
+ value?: number | null;
33
+ /** @default 0 */
34
+ min?: number;
35
+ /** @default 100 */
36
+ max?: number;
37
+ /** A name for what is loading. Read out with the value by a screen reader. */
38
+ label?: React.ReactNode;
39
+ /**
40
+ * Shows the value as text beside the shape. A percentage of the range unless
41
+ * `format` says otherwise.
42
+ * @default false
43
+ */
44
+ showValue?: boolean;
45
+ /**
46
+ * How to format the value when it is shown — `Intl.NumberFormat` options, so
47
+ * bytes and currencies work as well as plain numbers. Without it the value is
48
+ * a percentage of `min`…`max`, which is the only formatting that holds for a
49
+ * range nobody described.
50
+ */
51
+ format?: Intl.NumberFormatOptions;
52
+ /** @default 'md' */
53
+ size?: PlassSize;
54
+ /** @default 'primary' */
55
+ color?: PlassColor;
56
+ }
57
+ /**
58
+ * The slots an indicator reads.
59
+ *
60
+ * An indicator **is** the coloured thing — unlike a PlBox, which holds other
61
+ * people's content — so it gets `--p-fill`, the family's own gradient, and the
62
+ * filled part of a bar is made of exactly the same material as the button that
63
+ * submits the form it is in.
64
+ *
65
+ * There is no elevation ladder and no `--p-lift` here, on purpose. An indicator
66
+ * is cut *into* the surface it sits on, the way a groove is, and a groove does
67
+ * not float.
68
+ */
69
+ export declare function progressSlots(color: PlassColor): React.CSSProperties;
70
+ /**
71
+ * How thick the linear groove is.
72
+ *
73
+ * Its own ladder rather than a fraction of `controlHeightClasses`: a bar is not
74
+ * a control you can put a label inside, and at `md` it wants to be the weight
75
+ * of a rule between two paragraphs rather than a quarter of a button.
76
+ *
77
+ * They are `PlSlider`'s rail thicknesses, and deliberately: a rail and a bar are
78
+ * the same channel, one of which you drag and one of which you watch.
79
+ */
80
+ export declare const barThicknessClasses: Record<PlassSize, string>;
81
+ /**
82
+ * The diameter of the ring, in pixels.
83
+ *
84
+ * Numbers rather than classes because the same value has to reach the SVG's
85
+ * `viewBox` arithmetic, and a ring is one of the few things in the library that
86
+ * cannot be described by a Tailwind class alone.
87
+ *
88
+ * They sit just under the control ladder at every step — a `md` ring is 20px
89
+ * inside a 40px control — so a ring dropped into a button, a field or a table
90
+ * row never makes the row taller than it already was.
91
+ */
92
+ export declare const ringDiameters: Record<PlassSize, number>;
93
+ /** The ring's stroke, thickening with the ring so the hole stays in proportion. */
94
+ export declare const ringStrokes: Record<PlassSize, number>;
95
+ /**
96
+ * One plate of a `PlProgressBox`, on the tick ladder — an indicator beside a
97
+ * label, not a control you can put one inside.
98
+ */
99
+ export declare const plateSizeClasses: Record<PlassSize, string>;
100
+ /** The corner cut off a plate: the same ~30% the tick boxes take. */
101
+ export declare const plateRadiusClasses: Record<PlassSize, string>;
102
+ /** Between the plates. Tight — they are one object, not a row of squares. */
103
+ export declare const plateGapClasses: Record<PlassSize, string>;
104
+ /**
105
+ * The groove an indicator is cut into, and the transition that fills it.
106
+ *
107
+ * `--plass-track` is the one neutral ink the library grooves with — a
108
+ * PlSlider's rail and a PlSwitch's off track are the same colour — so a form
109
+ * with a slider, a switch and a progress bar in it is made of one material
110
+ * rather than three.
111
+ *
112
+ * The fill is `--p-fill`, and it is a `background-image` rather than a colour
113
+ * because that is what a Plass fill *is*: a gradient that turns in hue. Which is
114
+ * also why the movement is on `width` and never on the paint: a gradient cannot
115
+ * be transitioned, and a length can.
116
+ */
117
+ export declare const trackClasses = "bg-(--plass-track)";
118
+ /** The bar's own duration, one step slower than a control's, so a fill reads as travel. */
119
+ export declare const fillTransitionClasses = "[transition:width_var(--plass-duration-slow)_var(--plass-ease)]";
120
+ /**
121
+ * `value` as a fraction of the range, or `null` when there is nothing to say.
122
+ *
123
+ * The clamp is not defensive programming for its own sake — `value` usually
124
+ * arrives from a division somewhere, and a bar that renders 140% wide because
125
+ * one request finished twice is a worse bug than a bar that sits full.
126
+ */
127
+ export declare function progressFraction(value: number | null | undefined, min: number, max: number): number | null;
128
+ /**
129
+ * What the value reads as, both on screen and to a screen reader.
130
+ *
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.
136
+ */
137
+ export declare function progressText(fraction: number | null, formatted: string | null, hasFormat: boolean): string | null;
138
+ /**
139
+ * The same string, shaped for Base UI's `getAriaValueText`.
140
+ *
141
+ * `undefined` when there is no value, which hands the indeterminate case back
142
+ * to Base UI — it already announces indeterminate progress, and re-inventing
143
+ * that here would be one more English string the library has to own.
144
+ */
145
+ export declare function progressAriaText(fraction: number | null, hasFormat: boolean): ((formatted: string | null) => string) | undefined;
@@ -0,0 +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)??""}
@@ -0,0 +1,32 @@
1
+ import type * as React from 'react';
2
+ /**
3
+ * Holds a control open at the width of the widest thing it could ever say.
4
+ *
5
+ * A control that is not `fullWidth` is sized by what it is *currently* saying,
6
+ * which for anything whose value changes means the box changes with it. A
7
+ * PlSelect showing `Seoul` is narrower than the same one showing
8
+ * `Washington DC`. Either way the field moves under the pointer that just used
9
+ * it, and the whole row of controls beside it shuffles along.
10
+ *
11
+ * So the alternatives are laid out too, stacked in a box clipped to no height.
12
+ * The control's intrinsic width becomes the widest of them and stops depending
13
+ * on the value.
14
+ *
15
+ * Three things it deliberately is not:
16
+ *
17
+ * - **Not `hidden`, and not `display: none`.** Both take the box out of layout,
18
+ * and a box that is not laid out reserves nothing.
19
+ * - **Not read out.** `aria-hidden`, or a screen reader would announce every
20
+ * value the control might hold before the one it does.
21
+ * - **Not text.** A string sample is drawn as generated content off a data
22
+ * attribute rather than as a text node. `content: attr(…)` lays out exactly
23
+ * like text, so it reserves the same width — but it leaves nothing for
24
+ * `getByText` or a screen reader's find-in-page to trip over, and a caller's
25
+ * test asking for the option they selected keeps finding one element rather
26
+ * than two. Only a sample that is not a string — an option whose label is a
27
+ * node — has to be rendered for real, because there is nothing to put in an
28
+ * attribute.
29
+ */
30
+ export declare function WidthSizer({ samples }: {
31
+ samples: readonly React.ReactNode[];
32
+ }): React.JSX.Element | null;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";export function WidthSizer({samples:a}){return 0===a.length?null:e("span",{"aria-hidden":"true",className:"invisible h-0 min-h-0 overflow-hidden",children:a.map((a,n)=>"string"==typeof a?e("span",{"data-sample":a,className:"block whitespace-nowrap before:content-[attr(data-sample)]"},`${n}:${a}`):e("span",{className:"block whitespace-nowrap",children:a},n))})}