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,274 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { CloseIcon } from '../../internal/icons.js';
4
+ import { controlTextLeadingClasses, disabledClasses, focusRingClasses, gapClasses, glassClasses, hasContent, iconClasses, metaTextClasses, radiusClasses, readOnlyFilterClasses, sheetTitleClasses, stackGapClasses, surfaceSlots, transitionClasses } from '../../internal/styles.js';
5
+ /**
6
+ * The box's inner padding. Its own ladder rather than the sheet's, because a
7
+ * dropzone is sized by the gesture it has to catch rather than by what is
8
+ * written in it: a target the height of one line of text is a target you miss.
9
+ */
10
+ const zonePaddingClasses = {
11
+ default: { xs: 'p-4', sm: 'p-5', md: 'p-6', lg: 'p-8', xl: 'p-10' },
12
+ compact: { xs: 'p-2', sm: 'p-3', md: 'p-4', lg: 'p-5', xl: 'p-6' }
13
+ };
14
+ /**
15
+ * The three materials, said the way a *container* says them — the sheet is
16
+ * never dyed. What is dropped on it is other people's content.
17
+ *
18
+ * The dashed edge is the one thing all three share, and the one place the
19
+ * library draws a line that is not solid. It is not decoration: a dashed
20
+ * rectangle is the established sign for "this area accepts a drop", and a
21
+ * dropzone that looks like a PlCard is a PlCard nobody tries to drop on.
22
+ *
23
+ * The edge is neutral at rest and takes the family only once the pointer is on
24
+ * it, which is the same arrangement a `glass` PlButton has: the colour is what
25
+ * happens when you engage with the thing, not what the thing is.
26
+ */
27
+ const zoneRestClasses = {
28
+ solid: /* @__PURE__ */ [
29
+ glassClasses,
30
+ 'border-2 border-dashed text-(--plass-fg) bg-(--plass-glass-press)',
31
+ '[border-color:var(--plass-border)]',
32
+ '[box-shadow:var(--p-elev),var(--plass-gloss-glass)]'
33
+ ].join(' '),
34
+ glass: /* @__PURE__ */ [
35
+ glassClasses,
36
+ 'border-2 border-dashed text-(--plass-fg) bg-(--plass-glass)',
37
+ '[border-color:var(--plass-border)]',
38
+ '[box-shadow:var(--p-elev),var(--plass-gloss-glass)]'
39
+ ].join(' '),
40
+ ghost: 'border-2 border-dashed text-(--plass-fg) bg-transparent [border-color:var(--plass-border)]'
41
+ };
42
+ const zoneHoverClasses = {
43
+ solid: 'hover:bg-(--plass-glass-hover) hover:[border-color:var(--p-line-hover)]',
44
+ glass: 'hover:bg-(--plass-glass-hover) hover:[border-color:var(--p-line-hover)]',
45
+ ghost: 'hover:bg-(--p-soft) hover:[border-color:var(--p-line-hover)]'
46
+ };
47
+ /**
48
+ * While a file is over the box.
49
+ *
50
+ * Colour and edge only, and the same two the hover state already uses, one step
51
+ * further along — a dropzone that grows or lifts under the pointer moves the
52
+ * target while the reader is aiming at it.
53
+ */
54
+ const zoneOverClasses = 'bg-(--p-soft-hover) [border-color:var(--p-ring)]';
55
+ function UploadIcon() {
56
+ return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [_jsx("path", { d: "M8 10.5V2.75m0 0L5.25 5.5M8 2.75 10.75 5.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M2.75 9.75v1.75a1.75 1.75 0 0 0 1.75 1.75h7a1.75 1.75 0 0 0 1.75-1.75V9.75", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }));
57
+ }
58
+ /**
59
+ * `1.4 MB`, in the units a person reading a file list expects.
60
+ *
61
+ * Base 1000 rather than 1024, and `MB` rather than `MiB`: it is the number
62
+ * every operating system's file browser shows, and a picker that disagrees with
63
+ * the Finder about how big the file is has picked a fight it cannot win.
64
+ */
65
+ export function formatFileSize(bytes) {
66
+ if (bytes < 1000) {
67
+ return `${bytes} B`;
68
+ }
69
+ const units = ['kB', 'MB', 'GB', 'TB'];
70
+ let value = bytes / 1000;
71
+ let unit = 0;
72
+ while (value >= 1000 && unit < units.length - 1) {
73
+ value /= 1000;
74
+ unit += 1;
75
+ }
76
+ return `${value < 10 ? value.toFixed(1) : Math.round(value)} ${units[unit]}`;
77
+ }
78
+ /**
79
+ * Whether a file matches an `accept` string.
80
+ *
81
+ * The browser applies `accept` to its own picker and to nothing else, so a file
82
+ * that arrives by drag has never been checked against it. This is that check:
83
+ * the same three forms the attribute takes — `.ext`, `type/subtype`, `type/*`.
84
+ */
85
+ function matchesAccept(file, accept) {
86
+ const name = file.name.toLowerCase();
87
+ const type = file.type.toLowerCase();
88
+ return accept
89
+ .split(',')
90
+ .map((entry) => entry.trim().toLowerCase())
91
+ .filter(Boolean)
92
+ .some((entry) => {
93
+ if (entry.startsWith('.')) {
94
+ return name.endsWith(entry);
95
+ }
96
+ if (entry.endsWith('/*')) {
97
+ return type.startsWith(entry.slice(0, -1));
98
+ }
99
+ return type === entry;
100
+ });
101
+ }
102
+ /**
103
+ * A box you drop files on, or click to open the file dialog.
104
+ *
105
+ * There is no Base UI primitive under this, and the fallback the library allows
106
+ * — plain React and DOM — is the right one: a dropzone is a `<div>` listening
107
+ * for four drag events and an `<input type="file">` it clicks for you. There is
108
+ * no popup to position, no focus to trap and no roving anything.
109
+ *
110
+ * What that leaves is the part every hand-rolled dropzone gets wrong. The drag
111
+ * counter is one: `dragenter` and `dragleave` both fire as the pointer crosses
112
+ * a *child* of the zone, so a zone that toggles a boolean flickers the whole
113
+ * time a file is dragged across its own contents. Counting them is the fix. The
114
+ * other is `accept`, which the browser enforces on its own dialog and never on
115
+ * a drop, so a dropzone that only sets the attribute accepts anything the
116
+ * moment a file arrives by drag.
117
+ *
118
+ * The shell is a `<div>` and the pressable area inside it is a real `<button>`,
119
+ * with the file list outside that button — the remove buttons cannot be nested
120
+ * inside the browse button.
121
+ */
122
+ export const PlFilePicker = /* @__PURE__ */ React.forwardRef(function PlFilePicker({ variant = 'glass', size = 'md', color = 'primary', density = 'default', elevation = 0, accept, multiple = false, maxSize, maxFiles, value, defaultValue, onFilesChange, onReject, label, description, error, invalid, title, hint, icon, showList = true, removeLabel = (name) => `Remove ${name}`, fullWidth = true, disabled = false, readOnly = false, required = false, name, id, className, style, ...props }, ref) {
123
+ const inputRef = React.useRef(null);
124
+ React.useImperativeHandle(ref, () => inputRef.current);
125
+ const [uncontrolled, setUncontrolled] = React.useState(() => [...(defaultValue ?? [])]);
126
+ // The copy is what stops a caller's array being the one held here, and it
127
+ // has to be memoised: the handlers below close over this list, and a fresh
128
+ // array every render would rebuild all of them every render.
129
+ const files = React.useMemo(() => (value ? [...value] : uncontrolled), [value, uncontrolled]);
130
+ // `dragenter`/`dragleave` fire for every child the pointer crosses, so a
131
+ // boolean flickers the whole time a file is over the box. The depth counter
132
+ // is the only thing that survives a zone with content in it.
133
+ const dragDepth = React.useRef(0);
134
+ const [over, setOver] = React.useState(false);
135
+ const hasError = hasContent(error);
136
+ const isInvalid = invalid ?? hasError;
137
+ // Invalid re-points the whole slot family at `danger`, so the edge, the ring
138
+ // and the message all turn over together — the same wiring PlTextField uses.
139
+ const family = isInvalid ? 'danger' : color;
140
+ const inert = disabled || readOnly;
141
+ const descriptionId = React.useId();
142
+ const commit = React.useCallback((next) => {
143
+ if (!value) {
144
+ setUncontrolled(next);
145
+ }
146
+ onFilesChange?.(next);
147
+ }, [onFilesChange, value]);
148
+ /**
149
+ * Sorts an incoming batch into kept and rejected.
150
+ *
151
+ * The count is checked against what is *already* held rather than against
152
+ * the batch, which is the difference between "you may drop five files" and
153
+ * "you may end up with five files" — only the second is what `maxFiles`
154
+ * means.
155
+ */
156
+ const accepting = React.useCallback((incoming) => {
157
+ const kept = [];
158
+ const rejections = [];
159
+ const room = multiple ? (maxFiles ?? Number.POSITIVE_INFINITY) : 1;
160
+ const held = multiple ? files.length : 0;
161
+ for (const file of incoming) {
162
+ if (accept && !matchesAccept(file, accept)) {
163
+ rejections.push({ file, reason: 'type' });
164
+ }
165
+ else if (maxSize !== undefined && file.size > maxSize) {
166
+ rejections.push({ file, reason: 'size' });
167
+ }
168
+ else if (held + kept.length >= room) {
169
+ rejections.push({ file, reason: 'count' });
170
+ }
171
+ else {
172
+ kept.push(file);
173
+ }
174
+ }
175
+ return { kept, rejections };
176
+ }, [accept, files.length, maxFiles, maxSize, multiple]);
177
+ const add = React.useCallback((incoming) => {
178
+ const { kept, rejections } = accepting(incoming);
179
+ if (rejections.length > 0) {
180
+ onReject?.(rejections);
181
+ }
182
+ if (kept.length > 0) {
183
+ commit(multiple ? [...files, ...kept] : kept);
184
+ }
185
+ }, [accepting, commit, files, multiple, onReject]);
186
+ const browse = () => {
187
+ if (inert) {
188
+ return;
189
+ }
190
+ // Cleared first, so choosing the same file twice in a row still fires
191
+ // `change` — the input holds its value otherwise and the second pick is
192
+ // silently dropped.
193
+ if (inputRef.current) {
194
+ inputRef.current.value = '';
195
+ inputRef.current.click();
196
+ }
197
+ };
198
+ const zoneClassNames = [
199
+ 'flex w-full flex-col items-center justify-center text-center',
200
+ 'cursor-pointer select-none',
201
+ zonePaddingClasses[density][size],
202
+ radiusClasses[size],
203
+ gapClasses[size],
204
+ transitionClasses,
205
+ iconClasses,
206
+ focusRingClasses,
207
+ // An if/else rather than stacked variants: two Tailwind classes of equal
208
+ // specificity resolve by their order in the generated stylesheet.
209
+ disabled
210
+ ? `${disabledClasses[variant]} border-2 border-dashed`
211
+ : readOnly
212
+ ? `${zoneRestClasses[variant]} ${readOnlyFilterClasses} cursor-default`
213
+ : zoneRestClasses[variant],
214
+ !inert ? zoneHoverClasses[variant] : '',
215
+ over && !inert ? zoneOverClasses : ''
216
+ ]
217
+ .filter(Boolean)
218
+ .join(' ');
219
+ return (_jsxs("div", { className: [
220
+ 'flex-col align-top',
221
+ stackGapClasses[size],
222
+ fullWidth ? 'flex w-full' : 'inline-flex',
223
+ className ?? ''
224
+ ]
225
+ .filter(Boolean)
226
+ .join(' '), style: { ...surfaceSlots(family, elevation), ...style }, ...props, children: [hasContent(label) ? (_jsx("span", { className: [
227
+ metaTextClasses[size],
228
+ 'font-semibold',
229
+ disabled ? 'text-(--plass-muted-fg)' : 'text-(--plass-fg)'
230
+ ].join(' '), children: label })) : null, _jsxs("div", { className: "flex w-full flex-col", onDragEnter: (event) => {
231
+ if (inert) {
232
+ return;
233
+ }
234
+ event.preventDefault();
235
+ dragDepth.current += 1;
236
+ setOver(true);
237
+ }, onDragOver: (event) => {
238
+ if (inert) {
239
+ return;
240
+ }
241
+ // Without this the browser navigates to the file instead of
242
+ // dropping it, which is the default and is never what anybody wants.
243
+ event.preventDefault();
244
+ event.dataTransfer.dropEffect = 'copy';
245
+ }, onDragLeave: () => {
246
+ if (inert) {
247
+ return;
248
+ }
249
+ dragDepth.current = Math.max(0, dragDepth.current - 1);
250
+ if (dragDepth.current === 0) {
251
+ setOver(false);
252
+ }
253
+ }, onDrop: (event) => {
254
+ if (inert) {
255
+ return;
256
+ }
257
+ event.preventDefault();
258
+ dragDepth.current = 0;
259
+ setOver(false);
260
+ add(Array.from(event.dataTransfer.files));
261
+ }, children: [_jsxs("button", { type: "button", id: id, disabled: disabled, "aria-describedby": hasContent(description) || hasError ? descriptionId : undefined, "aria-invalid": isInvalid || undefined, className: zoneClassNames, onClick: browse, children: [icon === undefined ? (_jsx("span", { className: "flex items-center text-(--p-accent) [&_svg]:size-[1.8em]", children: _jsx(UploadIcon, {}) })) : hasContent(icon) ? (_jsx("span", { className: "flex items-center text-(--p-accent) [&_svg]:size-[1.8em]", children: icon })) : null, _jsx("span", { className: `font-semibold ${sheetTitleClasses[size]}`, children: title ?? 'Drop files here, or click to browse' }), hasContent(hint) ? (_jsx("span", { className: `text-(--plass-muted-fg) ${metaTextClasses[size]}`, children: hint })) : null] }), _jsx("input", { ref: inputRef, type: "file", name: name, accept: accept, multiple: multiple, required: required && files.length === 0, disabled: inert, tabIndex: -1, "aria-hidden": "true", className: "absolute size-px overflow-hidden opacity-0 [clip-path:inset(50%)]", onChange: (event) => add(Array.from(event.target.files ?? [])) })] }), showList && files.length > 0 ? (_jsx("ul", { role: "list", className: `flex w-full flex-col ${stackGapClasses[size]} m-0 list-none p-0`, children: files.map((file, index) => (_jsxs("li", { className: [
262
+ 'flex w-full items-center gap-2 px-2 py-1.5',
263
+ radiusClasses.xs,
264
+ controlTextLeadingClasses[size],
265
+ 'bg-(--p-soft) text-(--plass-fg)'
266
+ ].join(' '), children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: file.name }), _jsx("span", { className: `shrink-0 text-(--plass-muted-fg) tabular-nums ${metaTextClasses[size]}`, children: formatFileSize(file.size) }), inert ? null : (_jsx("button", { type: "button", "aria-label": removeLabel(file.name), className: [
267
+ 'inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full',
268
+ 'size-[1.3em] text-(--plass-muted-fg) opacity-70',
269
+ '[transition:opacity_var(--plass-duration)_var(--plass-ease),color_var(--plass-duration)_var(--plass-ease)]',
270
+ '[&_svg]:size-[0.9em]',
271
+ 'hover:text-(--plass-fg) hover:opacity-100 focus-visible:opacity-100',
272
+ focusRingClasses
273
+ ].join(' '), onClick: () => commit(files.filter((_, at) => at !== index)), children: _jsx(CloseIcon, {}) }))] }, `${file.name}-${file.size}-${file.lastModified}-${index}`))) })) : null, hasContent(description) && !hasError ? (_jsx("span", { id: descriptionId, className: `${metaTextClasses[size]} text-(--plass-muted-fg)`, children: description })) : null, hasError ? (_jsx("span", { id: descriptionId, className: `${metaTextClasses[size]} text-(--p-accent)`, children: error })) : null] }));
274
+ });
@@ -0,0 +1,2 @@
1
+ export { PlFilePicker, formatFileSize } from './PlFilePicker.js';
2
+ export type { PlFilePickerProps, PlFileRejection, PlFileRejectionReason } from './PlFilePicker.js';
@@ -0,0 +1 @@
1
+ export { PlFilePicker, formatFileSize } from './PlFilePicker.js';
@@ -0,0 +1,118 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassElevation, PlassPosition, PlassStyleProps } from '../../types.js';
4
+ /** A destination's value. The same restraint `PlBottomNavigation` puts on its own. */
5
+ export type PlFloatingBottomNavigationValue = string | number;
6
+ export interface PlFloatingBottomNavigationProps extends Omit<PlassStyleProps, 'variant'>, Omit<React.ComponentPropsWithoutRef<'nav'>, 'color' | 'defaultValue' | 'onChange'> {
7
+ /**
8
+ * What the capsule is made of.
9
+ *
10
+ * `glass` is the default and the whole point: a clear sheet over a blurred
11
+ * backdrop with a hairline around it, floating clear of the page. `solid` is
12
+ * the same sheet at its most opaque, for a bar that sits over photography.
13
+ * `ghost` has no capsule at all — the discs float on their own.
14
+ * @default 'glass'
15
+ */
16
+ variant?: PlassStyleProps['variant'];
17
+ /** The destination the reader is on. Use with `onValueChange` for a controlled bar. */
18
+ value?: PlFloatingBottomNavigationValue | null;
19
+ /** Which starts current, for an uncontrolled bar. */
20
+ defaultValue?: PlFloatingBottomNavigationValue | null;
21
+ onValueChange?: (value: PlFloatingBottomNavigationValue) => void;
22
+ /**
23
+ * How the bar sits in the page's scroll.
24
+ * @default 'fixed'
25
+ */
26
+ position?: PlassPosition;
27
+ /**
28
+ * Keeps the bar clear of the home indicator on a phone, by adding
29
+ * `env(safe-area-inset-bottom)` to the gap under it.
30
+ * @default true
31
+ */
32
+ safeArea?: boolean;
33
+ /**
34
+ * Drop shadow depth. `2`, against the `0` a bar attached to the window edge
35
+ * takes.
36
+ *
37
+ * That is not an inconsistency: this bar is defined by **not** being part of
38
+ * the page. Every other sheet in the library rests on the page and earns its
39
+ * separation from the glass edge, so a shadow is opt-in; this one hovers over
40
+ * whatever is underneath it, and a capsule lying flat on the content it is
41
+ * floating over reads as a mistake.
42
+ * @default 2
43
+ */
44
+ elevation?: PlassElevation;
45
+ /** Every destination stops answering. */
46
+ disabled?: boolean;
47
+ /** The name the bar is announced by — "Main", "Sections". */
48
+ label?: string;
49
+ /**
50
+ * Renders something other than a `<nav>`. Rarely what you want here: a row of
51
+ * destinations is navigation.
52
+ */
53
+ render?: useRender.RenderProp;
54
+ /** The `PlFloatingBottomNavigationItem`s. */
55
+ children?: React.ReactNode;
56
+ }
57
+ export interface PlFloatingBottomNavigationItemProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'value' | 'color'> {
58
+ /** Identifies the destination. What `onValueChange` reports. */
59
+ value: PlFloatingBottomNavigationValue;
60
+ /** The glyph. It is the whole of what a reader sees. */
61
+ icon?: React.ReactNode;
62
+ /** Renders the item as a link rather than as a button. */
63
+ href?: string;
64
+ /** Unavailable, but still part of the set. */
65
+ disabled?: boolean;
66
+ /**
67
+ * The destination's name.
68
+ *
69
+ * **Never drawn, always read.** A row of glyphs with no names is a row of
70
+ * unnamed buttons, which is the defect this prop exists to make impossible.
71
+ */
72
+ children?: React.ReactNode;
73
+ }
74
+ /**
75
+ * A row of round destinations floating clear of the bottom edge of the window.
76
+ *
77
+ * The other half of `PlBottomNavigation`, and a different object rather than a
78
+ * variant of one: that bar is **attached** to the edge of the window — full
79
+ * width, a hairline against the content, its sheet running under the home
80
+ * indicator — and this one is **not part of the page at all**. Everything that
81
+ * follows comes from that one difference: the capsule, the gap under it, the
82
+ * shadow it defaults to, and the pill corners it is allowed.
83
+ *
84
+ * Every destination is a disc with a glyph in it and no name drawn, which is
85
+ * what keeps a row of five inside the width of a phone. The name is still
86
+ * required and still read out — a row of glyphs with no accessible names is the
87
+ * defect `PlIconButton`'s `label` exists to make impossible, and it would be
88
+ * exactly as easy to ship here.
89
+ *
90
+ * The current destination is a key of **tinted glass** riding in the clear
91
+ * sheet, which is the design language's own sentence with nothing added to it.
92
+ * The key is **one element that travels**, measured off whichever disc is
93
+ * current and animated the way a `PlSegmentedButton`'s tile is — not a fill
94
+ * that appears on one disc while it disappears from another. Two discs
95
+ * cross-fading is two objects; a bar with a key in it has one, and where it
96
+ * goes is the whole of what the component has to say.
97
+ *
98
+ * Nothing is transformed: the key is an empty box, and no glyph is resampled
99
+ * while it travels. That is what lets the house no-transform rule survive a
100
+ * component whose entire point is that something moves.
101
+ *
102
+ * It reads `controlSlots` and not the `surfaceSlots` every other container
103
+ * takes, which is the one place this bar is not a container: the slots a
104
+ * container is given are deliberately undyed — no `--p-fill`, no `--p-on-solid`
105
+ * and no `--p-lift` — and the key is made of all three. Asking a container's
106
+ * slot set for a control's colours is asking for `var(--p-fill)` to resolve to
107
+ * nothing, which is a `background-image` the browser drops on the floor and a
108
+ * current destination that looks exactly like the four beside it.
109
+ */
110
+ export declare const PlFloatingBottomNavigation: React.ForwardRefExoticComponent<PlFloatingBottomNavigationProps & React.RefAttributes<HTMLElement>>;
111
+ /**
112
+ * One destination, as a disc.
113
+ *
114
+ * It has no `size`, no `color` and no `variant` of its own: all three belong to
115
+ * the bar, which is the only place they can be set once and mean the same thing
116
+ * for every disc.
117
+ */
118
+ export declare const PlFloatingBottomNavigationItem: React.ForwardRefExoticComponent<PlFloatingBottomNavigationItemProps & React.RefAttributes<HTMLElement>>;