plass-ui 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/dist/components/accordion/PlAccordion.d.ts +98 -0
  2. package/dist/components/accordion/PlAccordion.js +131 -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 +109 -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 +71 -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 +47 -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 +48 -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 +49 -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 +120 -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 +65 -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 +94 -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 +50 -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 +49 -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 +177 -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 +45 -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 +58 -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 +121 -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 +168 -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 +112 -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 +141 -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 +46 -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 +201 -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 +196 -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 +64 -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 +102 -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 +177 -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 +206 -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 +100 -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 +144 -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 +65 -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 +199 -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 +47 -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 +87 -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 +152 -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 +106 -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 +107 -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 +190 -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 +274 -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 +291 -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 +51 -0
  151. package/dist/components/grid/PlGridItem.d.ts +50 -0
  152. package/dist/components/grid/PlGridItem.js +34 -0
  153. package/dist/components/grid/index.d.ts +4 -0
  154. package/dist/components/grid/index.js +2 -0
  155. package/dist/components/highlight/PlHighlight.d.ts +90 -0
  156. package/dist/components/highlight/PlHighlight.js +185 -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 +294 -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 +58 -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 +37 -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 +160 -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 +209 -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 +150 -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 +111 -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 +109 -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 +77 -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 +159 -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 +324 -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 +154 -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 +113 -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 +34 -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 +47 -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 +40 -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 +99 -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 +101 -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 +411 -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 +206 -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 +115 -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 +142 -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 +132 -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 +74 -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 +131 -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 +210 -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 +182 -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 +126 -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 +136 -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 +97 -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 +207 -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 +174 -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 +65 -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 +117 -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 +143 -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 +75 -1
  376. package/dist/internal/animate.d.ts +161 -0
  377. package/dist/internal/animate.js +318 -0
  378. package/dist/internal/button-group.d.ts +27 -0
  379. package/dist/internal/button-group.js +19 -0
  380. package/dist/internal/calendar.d.ts +148 -0
  381. package/dist/internal/calendar.js +501 -0
  382. package/dist/internal/date.d.ts +173 -0
  383. package/dist/internal/date.js +353 -0
  384. package/dist/internal/format.d.ts +24 -0
  385. package/dist/internal/format.js +41 -0
  386. package/dist/internal/grid.d.ts +67 -0
  387. package/dist/internal/grid.js +143 -0
  388. package/dist/internal/icons.d.ts +86 -1
  389. package/dist/internal/icons.js +138 -1
  390. package/dist/internal/menu.d.ts +20 -0
  391. package/dist/internal/menu.js +18 -0
  392. package/dist/internal/picker.d.ts +118 -0
  393. package/dist/internal/picker.js +139 -0
  394. package/dist/internal/progress.d.ts +145 -0
  395. package/dist/internal/progress.js +167 -0
  396. package/dist/internal/sizer.d.ts +32 -0
  397. package/dist/internal/sizer.js +35 -0
  398. package/dist/internal/styles.d.ts +198 -8
  399. package/dist/internal/styles.js +636 -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 +1 -1
  405. package/package.json +31 -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,143 @@
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
+ /** Smallest first, which is also the order the media queries have to be in. */
18
+ export const breakpoints = ['xs', 'sm', 'md', 'lg', 'xl'];
19
+ /**
20
+ * One step of `spacing`, in `rem`.
21
+ *
22
+ * This is Tailwind's spacing scale and not Material's 8px one: `spacing={4}` is
23
+ * `1rem`, exactly what `gap-4` already means and what `p-4` in the sheet
24
+ * padding tables already is. Every other number in this library is on that
25
+ * ladder, and a grid that measured its gutters differently from the card around
26
+ * it would be the one place a caller has to stop and convert.
27
+ */
28
+ const SPACING_STEP = 0.25;
29
+ /** A bare value means "from `xs` up"; a map is already per-breakpoint. */
30
+ function breakpointMap(value) {
31
+ if (value === undefined || value === null)
32
+ return {};
33
+ if (typeof value === 'object')
34
+ return value;
35
+ return { xs: value };
36
+ }
37
+ /**
38
+ * Turns a responsive value into the `--p-{name}-{breakpoint}` slots the CSS
39
+ * reads, emitting only the breakpoints the caller actually named.
40
+ *
41
+ * The gaps are filled in by CSS rather than here: each breakpoint's rule falls
42
+ * back through the ones below it, so `{ md: 6 }` needs one slot and not five.
43
+ * That keeps the inline style on a grid item down to what was asked for.
44
+ */
45
+ export function responsiveSlots(name, value, toCss) {
46
+ const map = breakpointMap(value);
47
+ const slots = {};
48
+ for (const breakpoint of breakpoints) {
49
+ const entry = map[breakpoint];
50
+ if (entry !== undefined)
51
+ slots[`--p-${name}-${breakpoint}`] = toCss(entry);
52
+ }
53
+ return slots;
54
+ }
55
+ /**
56
+ * Fills in the `xs` entry of a partial map with the prop's own default.
57
+ *
58
+ * Without this, `spacing={{ md: 4 }}` would be a grid with no gutter at all
59
+ * below 48rem — the CSS fallback rather than the documented default — and a
60
+ * caller who narrowed one breakpoint would silently lose every other one. A map
61
+ * says "from here up, use this instead"; it does not say "and nothing below".
62
+ */
63
+ export function withBaseline(value, baseline) {
64
+ if (value === undefined || value === null)
65
+ return baseline;
66
+ if (typeof value === 'object') {
67
+ return { xs: baseline, ...value };
68
+ }
69
+ return value;
70
+ }
71
+ /**
72
+ * A count of columns, as a plain number for `calc()` to divide by.
73
+ *
74
+ * Rounded and floored at 1 because the value ends up as a divisor: a grid of
75
+ * 2.5 columns is not a thing anybody meant, and a grid of 0 is a division by
76
+ * zero that would take the width declaration down with it.
77
+ */
78
+ export function columnCount(value) {
79
+ return String(Math.max(1, Math.round(value)));
80
+ }
81
+ /** A span or an offset. Same rounding; an offset of 0 is meaningful. */
82
+ export function columnUnits(value, min) {
83
+ return String(Math.max(min, Math.round(value)));
84
+ }
85
+ export const spanValue = (value) => columnUnits(value, 1);
86
+ export const offsetValue = (value) => columnUnits(value, 0);
87
+ /**
88
+ * A gutter, as a length.
89
+ *
90
+ * Fractions are the point — `spacing={1.5}` is `0.375rem`, the same step
91
+ * `gap-1.5` is — so the multiplication is rounded to five places rather than
92
+ * left to print `0.30000000000000004rem` into the DOM.
93
+ */
94
+ export function spacingValue(units) {
95
+ const rem = Math.max(0, units) * SPACING_STEP;
96
+ return `${Number(rem.toFixed(5))}rem`;
97
+ }
98
+ /* ---------------------------------------------------------------------------
99
+ * Alignment
100
+ *
101
+ * These *are* literal class names, so they stay in Tailwind. The positional
102
+ * values map onto `flex-start`/`flex-end` rather than the logical `start`/`end`
103
+ * because a flex container is what is underneath, and the bare logical keywords
104
+ * are the newer spelling of the two.
105
+ * ------------------------------------------------------------------------- */
106
+ export const justifyClasses = {
107
+ start: 'justify-start',
108
+ center: 'justify-center',
109
+ end: 'justify-end',
110
+ 'space-between': 'justify-between',
111
+ 'space-around': 'justify-around',
112
+ 'space-evenly': 'justify-evenly',
113
+ stretch: 'justify-stretch'
114
+ };
115
+ export const alignItemsClasses = {
116
+ start: 'items-start',
117
+ center: 'items-center',
118
+ end: 'items-end',
119
+ stretch: 'items-stretch',
120
+ baseline: 'items-baseline'
121
+ };
122
+ /**
123
+ * Where the *rows* sit when the grid is shorter than the box holding it. Only
124
+ * ever visible on a grid with a height of its own, which is why it takes the
125
+ * full distribution vocabulary and `alignItems` does not.
126
+ */
127
+ export const alignContentClasses = {
128
+ start: 'content-start',
129
+ center: 'content-center',
130
+ end: 'content-end',
131
+ 'space-between': 'content-between',
132
+ 'space-around': 'content-around',
133
+ 'space-evenly': 'content-evenly',
134
+ stretch: 'content-stretch'
135
+ };
136
+ export const alignSelfClasses = {
137
+ auto: 'self-auto',
138
+ start: 'self-start',
139
+ center: 'self-center',
140
+ end: 'self-end',
141
+ stretch: 'self-stretch',
142
+ baseline: 'self-baseline'
143
+ };
@@ -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,138 @@
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 _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The one thing in the library that moves on its own, and the only place that
4
+ * is allowed: an indeterminate indicator that does not move is a decoration.
5
+ *
6
+ * Sized in `em` by `iconClasses`, like every other glyph inside a control, so
7
+ * it tracks the label rather than carrying a size of its own.
8
+ */
9
+ export function Spinner() {
10
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeOpacity: "0.25", strokeWidth: "2" }), _jsx("path", { d: "M14.5 8A6.5 6.5 0 0 0 8 1.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] }));
11
+ }
12
+ /**
13
+ * The disclosure chevron, drawn pointing **down**.
14
+ *
15
+ * One drawing for every direction: a PlAccordion's header, a PlSelect's
16
+ * trigger, a PlPagination's stepper all want the same wedge turned a different
17
+ * way. Turning it is the one allowance the no-transform rule makes — the rule
18
+ * is about a control resampling its own label under the pointer, and a glyph
19
+ * has no text in it to resample.
20
+ */
21
+ export function ChevronIcon() {
22
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "m4.5 6.5 3.5 3.5 3.5-3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
23
+ }
24
+ /**
25
+ * The arrow, drawn pointing **right**.
26
+ *
27
+ * One of the two marks a trail can put between its steps, and the one that says
28
+ * "and then" out loud. It is turned back under RTL by whoever draws it rather
29
+ * than being redrawn, the same allowance the chevron takes.
30
+ */
31
+ export function ArrowRightIcon() {
32
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M3 8h10m-3.5-3.5L13 8l-3.5 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
33
+ }
34
+ /** Three dots: the middle of something that has been folded away. */
35
+ export function EllipsisIcon() {
36
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { cx: "3.5", cy: "8", r: "1.15", fill: "currentColor" }), _jsx("circle", { cx: "8", cy: "8", r: "1.15", fill: "currentColor" }), _jsx("circle", { cx: "12.5", cy: "8", r: "1.15", fill: "currentColor" })] }));
37
+ }
38
+ /** The tick: a chosen option, a ticked menu item, a checked box. */
39
+ export function CheckIcon() {
40
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "m3.5 8.5 3 3 6-6", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) }));
41
+ }
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 function MinusIcon() {
49
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M3.5 8h9", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) }));
50
+ }
51
+ export function PlusIcon() {
52
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M8 3.5v9M3.5 8h9", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) }));
53
+ }
54
+ /**
55
+ * The ×.
56
+ *
57
+ * One drawing for every dismissal in the library — a file's remove button, an
58
+ * alert's close, a modal's. Two copies of an × drift by half a pixel of stroke
59
+ * weight, and then a page has two kinds of "close" on it.
60
+ */
61
+ export function CloseIcon() {
62
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "m4.5 4.5 7 7m0-7-7 7", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) }));
63
+ }
64
+ /** The clock: something that has been started and has not finished. */
65
+ export function ClockIcon() {
66
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.25", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M8 4.5V8l2.4 1.6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }));
67
+ }
68
+ /** The calendar: a page with a binding across the top. The pickers' glyph. */
69
+ export function CalendarIcon() {
70
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("rect", { x: "2.25", y: "3.25", width: "11.5", height: "10.5", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M2.25 6.5h11.5", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M5.5 1.75v2.5M10.5 1.75v2.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }));
71
+ }
72
+ /** The chain: a link that stays on this page. */
73
+ export function LinkIcon() {
74
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("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" }), _jsx("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" })] }));
75
+ }
76
+ /** The arrow leaving its box: a link that takes over a new tab. */
77
+ export function ExternalLinkIcon() {
78
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("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" }), _jsx("path", { d: "M9.5 2.75h3.75V6.5M7.25 8.75l5.75-5.75", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }));
79
+ }
80
+ /** The neutral note: a circled `i` without the serif problem an `i` has at 16px. */
81
+ function NoteIcon() {
82
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.25", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M8 7.25v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("circle", { cx: "8", cy: "4.9", r: "0.85", fill: "currentColor" })] }));
83
+ }
84
+ /**
85
+ * The filled dot a chosen radio row is marked with.
86
+ *
87
+ * A dot and not a tick, which is the distinction `PlCheckbox` and `PlRadioGroup`
88
+ * make everywhere else: a tick says "and", a dot says "instead of".
89
+ */
90
+ export function DotIcon() {
91
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: _jsx("circle", { cx: "8", cy: "8", r: "3.25" }) }));
92
+ }
93
+ /**
94
+ * A star, filled, in the same 16-unit box every other glyph here uses.
95
+ *
96
+ * `StarIcon` and `StarOutlineIcon` are the same five points traced twice —
97
+ * once painted, once stroked — and they have to be, because `PlRating` lays one
98
+ * over the other and clips the top copy to a fraction of the width. Two stars
99
+ * of two shapes would show as a rim that does not line up with what is inside
100
+ * it.
101
+ */
102
+ export function StarIcon() {
103
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: _jsx("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" }) }));
104
+ }
105
+ /** The same five points, stroked. See `StarIcon`. */
106
+ export function StarOutlineIcon() {
107
+ return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("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" }) }));
108
+ }
109
+ /**
110
+ * One drawing per colour family, and a piece of the design language rather than
111
+ * a convenience.
112
+ *
113
+ * An alert that says "this went wrong" only in red says it only to some
114
+ * readers, so the shape has to carry the meaning too — and that only holds if
115
+ * every component uses the same shape for the same family.
116
+ *
117
+ * `primary` and `secondary` have no severity to draw, so they take the note the
118
+ * informational one uses: three shapes for six families, because the three that
119
+ * mean something are the three worth telling apart.
120
+ *
121
+ * A function and not the table of elements it reads like, because a table is
122
+ * the one shape a bundler cannot take apart: six entries built at module load,
123
+ * kept whole or not at all, and pulled into every component that touches the
124
+ * file. A function declaration is dropped outright by anything that does not
125
+ * call it, which is most of the library.
126
+ */
127
+ export function severityIcon(color) {
128
+ if (color === 'success') {
129
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.25", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "m5.25 8.25 1.9 1.9 3.6-3.9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }));
130
+ }
131
+ if (color === 'warning') {
132
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("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" }), _jsx("path", { d: "M8 6.1v3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("circle", { cx: "8", cy: "11.2", r: "0.85", fill: "currentColor" })] }));
133
+ }
134
+ if (color === 'danger') {
135
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.25", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "m5.9 5.9 4.2 4.2m0-4.2-4.2 4.2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }));
136
+ }
137
+ return _jsx(NoteIcon, {});
138
+ }
@@ -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,18 @@
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
+ export const MenuContext = /* @__PURE__ */ React.createContext({
15
+ size: 'md',
16
+ color: 'primary',
17
+ density: 'default'
18
+ });
@@ -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 {};