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,318 @@
1
+ /**
2
+ * The machinery every `PlAnimate*` component runs on.
3
+ *
4
+ * It lives in `internal/` for the reason `button-group.ts` and `progress.ts`
5
+ * do: eleven components need it and none of them should have to import another.
6
+ *
7
+ * ## The shape of it
8
+ *
9
+ * Every effect is one `@keyframes` in `styles.css` running from a state written
10
+ * entirely in custom properties to the element's natural one. Nothing here
11
+ * generates CSS — it fills `--p-anim-*` slots and the stylesheet decides what
12
+ * they mean, which is the same split `controlSlots()` makes for colour and for
13
+ * the same reason: Tailwind only ever sees class names that appear literally in
14
+ * the source, so a class per duration would not survive the first prop.
15
+ *
16
+ * Because the from-state is the *keyframe* rather than a second class, running
17
+ * an effect backwards is `animation-direction: reverse` and nothing else. That
18
+ * is what makes `mode="out"` free on the five that offer it.
19
+ *
20
+ * ## Where the design language draws the line
21
+ *
22
+ * A Plass **control** never moves — a key that scales resamples its label, and
23
+ * that rule holds without exception. What moves here is content a caller has
24
+ * asked to have moved, and it moves on the independent `translate`, `scale` and
25
+ * `rotate` properties rather than on the `transform` shorthand, so a caller's
26
+ * own transform on the same element survives.
27
+ *
28
+ * ## What is deliberately not here
29
+ *
30
+ * An effect that has to know what its children *are* — a marquee that lays them
31
+ * down twice, a headline that swaps between them, a typewriter that counts
32
+ * graphemes — cannot be a class name and a few numbers. Those are components,
33
+ * and their logic stays in their own files.
34
+ */
35
+ import * as React from 'react';
36
+ /* ---------------------------------------------------------------------------
37
+ * Slots
38
+ * ------------------------------------------------------------------------- */
39
+ /**
40
+ * Which keyframe an effect runs.
41
+ *
42
+ * `grow` and `zoom` share one: they are the same arithmetic at two strengths,
43
+ * and a second identical `@keyframes` would only be a second place to fix a
44
+ * bug. What separates them is their defaults and their origin, and an origin is
45
+ * a property rather than a keyframe.
46
+ */
47
+ export const animationClasses = {
48
+ fade: 'plass-anim-fade',
49
+ grow: 'plass-anim-scale',
50
+ slide: 'plass-anim-slide',
51
+ zoom: 'plass-anim-scale',
52
+ rotate: 'plass-anim-rotate',
53
+ blink: 'plass-anim-blink'
54
+ };
55
+ /** The class that reads the slots. Always paired with one of the above. */
56
+ export const animBaseClass = 'plass-anim';
57
+ /** A number is pixels; a string is already a CSS length. */
58
+ export function lengthValue(value) {
59
+ return typeof value === 'number' ? `${value}px` : value;
60
+ }
61
+ /** `'infinite'` reaches CSS as the word; a count reaches it as the number. */
62
+ export function repeatValue(repeat) {
63
+ return repeat === 'infinite' ? 'infinite' : String(repeat);
64
+ }
65
+ export function isInfinite(repeat) {
66
+ return repeat === 'infinite';
67
+ }
68
+ /**
69
+ * `normal`, `reverse`, `alternate`, `alternate-reverse` — the four CSS already
70
+ * has, assembled from the two props that mean something to a caller.
71
+ *
72
+ * `mode="out"` is a reversed run rather than a keyframe of its own, which is
73
+ * also why a reversed animation ends held on its own first frame: `fill-mode`
74
+ * is `both`, so a faded-out element stays faded out instead of snapping back.
75
+ */
76
+ export function directionValue(mode, alternate) {
77
+ if (mode === 'out') {
78
+ return alternate ? 'alternate-reverse' : 'reverse';
79
+ }
80
+ return alternate ? 'alternate' : 'normal';
81
+ }
82
+ /**
83
+ * The `--p-anim-*` slots, as an inline style object.
84
+ *
85
+ * Inline rather than utilities for the reason the colour slots are: these are
86
+ * per-instance numbers, and Tailwind cannot generate a class for a duration it
87
+ * has never seen written down.
88
+ */
89
+ export function animationSlots(options) {
90
+ const slots = {
91
+ '--p-anim-duration': `${options.duration}ms`,
92
+ '--p-anim-delay': `${options.delay}ms`,
93
+ '--p-anim-repeat': repeatValue(options.repeat),
94
+ '--p-anim-direction': directionValue(options.mode ?? 'in', options.alternate)
95
+ };
96
+ if (options.easing) {
97
+ slots['--p-anim-ease'] = options.easing;
98
+ }
99
+ if (options.opacity !== undefined) {
100
+ slots['--p-anim-opacity'] = String(options.opacity);
101
+ }
102
+ if (options.scale !== undefined) {
103
+ slots['--p-anim-scale'] = String(options.scale);
104
+ }
105
+ if (options.x !== undefined) {
106
+ slots['--p-anim-x'] = options.x;
107
+ }
108
+ if (options.y !== undefined) {
109
+ slots['--p-anim-y'] = options.y;
110
+ }
111
+ if (options.angle !== undefined) {
112
+ slots['--p-anim-angle'] = options.angle;
113
+ }
114
+ if (options.angleTo !== undefined) {
115
+ slots['--p-anim-angle-to'] = options.angleTo;
116
+ }
117
+ return slots;
118
+ }
119
+ /**
120
+ * Which way a slide starts, given the edge it comes from.
121
+ *
122
+ * `PlassSide` is physical everywhere in the library and it stays physical here:
123
+ * something arriving from the top of the window arrives from the top in every
124
+ * writing direction.
125
+ */
126
+ export function slideOffsets(from, distance) {
127
+ const length = lengthValue(distance);
128
+ const negative = typeof distance === 'number' ? `${-distance}px` : `calc(-1 * ${length})`;
129
+ switch (from) {
130
+ case 'top':
131
+ return { x: '0px', y: negative };
132
+ case 'bottom':
133
+ return { x: '0px', y: length };
134
+ case 'left':
135
+ return { x: negative, y: '0px' };
136
+ default:
137
+ return { x: length, y: '0px' };
138
+ }
139
+ }
140
+ /* ---------------------------------------------------------------------------
141
+ * Running one
142
+ * ------------------------------------------------------------------------- */
143
+ /**
144
+ * Whether the reader has asked for less motion.
145
+ *
146
+ * The CSS side of this is handled in the stylesheet, where every keyframe is
147
+ * switched off at once. This is for the effects whose motion is written in
148
+ * JavaScript — a typewriter, a headline reel — where there is no rule to switch
149
+ * off and the component has to decide for itself what "still" means.
150
+ *
151
+ * `useSyncExternalStore` rather than state plus an effect: a media query is an
152
+ * external store, and reading it in an effect means every animated element on
153
+ * the page renders once with the wrong answer and then again with the right
154
+ * one. Here that first render is the one that would start a typewriter a reader
155
+ * asked not to see.
156
+ */
157
+ const reducedMotionQuery = '(prefers-reduced-motion: reduce)';
158
+ function subscribeToMotion(onChange) {
159
+ if (typeof window === 'undefined' || !window.matchMedia) {
160
+ return () => { };
161
+ }
162
+ const query = window.matchMedia(reducedMotionQuery);
163
+ query.addEventListener('change', onChange);
164
+ return () => query.removeEventListener('change', onChange);
165
+ }
166
+ function readMotion() {
167
+ return typeof window !== 'undefined' && window.matchMedia
168
+ ? window.matchMedia(reducedMotionQuery).matches
169
+ : false;
170
+ }
171
+ /** A server has no reader and so no preference. */
172
+ function motionOnServer() {
173
+ return false;
174
+ }
175
+ export function usePrefersReducedMotion() {
176
+ return React.useSyncExternalStore(subscribeToMotion, readMotion, motionOnServer);
177
+ }
178
+ /**
179
+ * Starts, restarts and holds an animation.
180
+ *
181
+ * Two things here are less obvious than they look.
182
+ *
183
+ * **Waiting is `animation-play-state: paused`, not a second class.** An element
184
+ * that has not been triggered yet has to already look like its own first frame,
185
+ * or a `visible` fade would be fully drawn until it scrolled into view and then
186
+ * blink out to start. With `fill-mode: both` a paused animation shows exactly
187
+ * that frame, so waiting and running are one animation in two states rather
188
+ * than two states to keep in step.
189
+ *
190
+ * **Restarting reaches for the DOM.** There is no way to rewind a CSS animation
191
+ * from React: re-rendering with the same class changes nothing, and a `key`
192
+ * would restart the animation by unmounting the children, taking their state
193
+ * with it. Clearing `animation-name`, reading a layout property to force the
194
+ * style to settle, and putting it back is the one move that rewinds the element
195
+ * and leaves everything inside it alone.
196
+ */
197
+ export function useAnimationRun({ trigger, play, once, threshold, paused, infinite }) {
198
+ const node = React.useRef(null);
199
+ const [started, setStarted] = React.useState(trigger === 'mount');
200
+ const [run, setRun] = React.useState(0);
201
+ const start = React.useCallback(() => {
202
+ setStarted(true);
203
+ setRun((previous) => previous + 1);
204
+ }, []);
205
+ // Nothing to rewind on the first pass — the element has only just been drawn.
206
+ React.useLayoutEffect(() => {
207
+ const element = node.current;
208
+ if (!element || run === 0) {
209
+ return;
210
+ }
211
+ // The element itself for the effects that animate their own root, and its
212
+ // descendants for the ones that animate their children instead: a staggered
213
+ // PlAnimateAppear has nothing to rewind on its own box.
214
+ const targets = [
215
+ element,
216
+ ...element.querySelectorAll('.plass-anim, .plass-marquee-track')
217
+ ];
218
+ for (const target of targets) {
219
+ target.style.animationName = 'none';
220
+ }
221
+ void element.offsetWidth;
222
+ for (const target of targets) {
223
+ target.style.animationName = '';
224
+ }
225
+ }, [run]);
226
+ React.useEffect(() => {
227
+ if (trigger !== 'visible') {
228
+ return;
229
+ }
230
+ const element = node.current;
231
+ if (!element || typeof IntersectionObserver === 'undefined') {
232
+ // No observer means no way to know: show it rather than hide it forever.
233
+ setStarted(true);
234
+ return;
235
+ }
236
+ const observer = new IntersectionObserver(([entry]) => {
237
+ if (entry.isIntersecting) {
238
+ start();
239
+ if (once) {
240
+ observer.disconnect();
241
+ }
242
+ }
243
+ else if (!once) {
244
+ setStarted(false);
245
+ }
246
+ }, { threshold });
247
+ observer.observe(element);
248
+ return () => observer.disconnect();
249
+ }, [trigger, once, threshold, start]);
250
+ React.useEffect(() => {
251
+ if (trigger !== 'manual') {
252
+ return;
253
+ }
254
+ // `play` is a caller pressing go, and what it starts is a CSS animation.
255
+ // There is no external system to push to: the run counter *is* the rewind.
256
+ if (play) {
257
+ // eslint-disable-next-line react-hooks/set-state-in-effect
258
+ start();
259
+ }
260
+ else {
261
+ setStarted(false);
262
+ }
263
+ }, [trigger, play, start]);
264
+ const handlers = trigger === 'hover'
265
+ ? {
266
+ onPointerEnter: start,
267
+ // Focus counts, or an effect on something keyboard-reachable would
268
+ // never run for a reader who is not holding a mouse.
269
+ onFocus: start,
270
+ onPointerLeave: () => {
271
+ if (infinite) {
272
+ setStarted(false);
273
+ }
274
+ },
275
+ onBlur: () => {
276
+ if (infinite) {
277
+ setStarted(false);
278
+ }
279
+ }
280
+ }
281
+ : {};
282
+ return {
283
+ ref: React.useCallback((element) => {
284
+ node.current = element;
285
+ }, []),
286
+ state: started && !paused ? 'running' : 'paused',
287
+ started,
288
+ handlers
289
+ };
290
+ }
291
+ /**
292
+ * Everything a one-keyframe `PlAnimate*` root needs, in one call.
293
+ *
294
+ * The six effect components differ only in their defaults and in which slots
295
+ * they fill, so this is where the identical two-thirds of each of them lives.
296
+ * The ones that have to understand their children — Appear, Headline, Marquee,
297
+ * Typing — call `useAnimationRun` directly and put the classes where their own
298
+ * structure needs them, which is why `effect` is allowed to be `null`.
299
+ *
300
+ * `data-plass-animation` and `data-state` are here rather than in each
301
+ * component because they are the same two facts every time, and because a test
302
+ * that has to assert on a class name is a test that breaks when a class name
303
+ * changes.
304
+ */
305
+ export function useAnimateElement(params) {
306
+ const { effect, trigger, play, once, threshold, paused, infinite, ...slots } = params;
307
+ const run = useAnimationRun({ trigger, play, once, threshold, paused, infinite });
308
+ return {
309
+ ref: run.ref,
310
+ className: effect ? `${animBaseClass} ${animationClasses[effect]}` : '',
311
+ style: { ...animationSlots(slots), '--p-anim-state': run.state },
312
+ props: {
313
+ ...run.handlers,
314
+ 'data-plass-animation': effect ?? undefined,
315
+ 'data-state': run.state
316
+ }
317
+ };
318
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * What a `PlButton` inherits from the `PlButtonGroup` around it.
3
+ *
4
+ * A context rather than `React.Children.map` with `cloneElement`, and a file of
5
+ * its own rather than something the group exports, for one reason each.
6
+ *
7
+ * Cloning breaks the moment a caller wraps one of the buttons in a `PlTooltip`,
8
+ * a `<Fragment>` or a `.map()` — which is most of the time — and a context
9
+ * reaches the button wherever it ended up. And it lives here rather than beside
10
+ * the group so that `PlButton` can read it without the two components importing
11
+ * each other, which is the arrangement `internal/menu.ts` already has.
12
+ *
13
+ * Every field is optional, and every one of them means *not specified* rather
14
+ * than a value: a button falls back to its own default, so a `PlButtonGroup`
15
+ * with no props of its own changes nothing except the corners.
16
+ */
17
+ import * as React from 'react';
18
+ import type { PlassColor, PlassDensity, PlassElevation, PlassSize, PlassVariant } from '../types.js';
19
+ export interface PlassButtonGroupContextValue {
20
+ variant?: PlassVariant;
21
+ size?: PlassSize;
22
+ color?: PlassColor;
23
+ density?: PlassDensity;
24
+ elevation?: PlassElevation;
25
+ disabled?: boolean;
26
+ }
27
+ export declare const ButtonGroupContext: React.Context<PlassButtonGroupContextValue | null>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * What a `PlButton` inherits from the `PlButtonGroup` around it.
3
+ *
4
+ * A context rather than `React.Children.map` with `cloneElement`, and a file of
5
+ * its own rather than something the group exports, for one reason each.
6
+ *
7
+ * Cloning breaks the moment a caller wraps one of the buttons in a `PlTooltip`,
8
+ * a `<Fragment>` or a `.map()` — which is most of the time — and a context
9
+ * reaches the button wherever it ended up. And it lives here rather than beside
10
+ * the group so that `PlButton` can read it without the two components importing
11
+ * each other, which is the arrangement `internal/menu.ts` already has.
12
+ *
13
+ * Every field is optional, and every one of them means *not specified* rather
14
+ * than a value: a button falls back to its own default, so a `PlButtonGroup`
15
+ * with no props of its own changes nothing except the corners.
16
+ */
17
+ import * as React from 'react';
18
+ export const ButtonGroupContext =
19
+ /* @__PURE__ */ React.createContext(null);
@@ -0,0 +1,148 @@
1
+ import * as React from 'react';
2
+ import { type TimeUnit } from './date.js';
3
+ import type { PlassColor, PlassDensity, PlassSize, PlassWeekday } from '../types.js';
4
+ /**
5
+ * The calendar grid and the clock columns, written once for the four pickers.
6
+ *
7
+ * They live in `internal/` for the reason `button-group.ts` does: a
8
+ * `PlDateTimePicker` is a date picker and a time picker in one popup and a
9
+ * `PlDateRangePicker` is two calendars, so three components need this and none
10
+ * of them should have to import another. The one thing it reaches *up* for is
11
+ * `PlButton` — the header's steppers are buttons, they are not a new kind of
12
+ * control, and `PlPagination` already makes that argument.
13
+ *
14
+ * The day cells are deliberately **not** `PlButton`s. A cell has states a
15
+ * button has no vocabulary for — inside a range, at the end of a range, today,
16
+ * belonging to the month next door — and four of them have to be told apart at
17
+ * a glance in a grid of forty-two.
18
+ */
19
+ /**
20
+ * Every string a picker says that is not a date.
21
+ *
22
+ * One object rather than eighteen props. These are a set: a caller who has to
23
+ * translate "Previous month" has to translate "Next month" in the same breath,
24
+ * and a component with eighteen `*Label` props is a component whose signature is
25
+ * mostly apology. The dates themselves are never in here — those come from
26
+ * `Intl`, which already knows what July is called in more languages than this
27
+ * file ever will.
28
+ */
29
+ export interface PlassPickerLabels {
30
+ /** The calendar's steppers, in day view. */
31
+ previousMonth: string;
32
+ nextMonth: string;
33
+ /** The same steppers in month view, where they move by a year. */
34
+ previousYear: string;
35
+ nextYear: string;
36
+ /** And in year view, where they move by a page of twelve. */
37
+ previousYears: string;
38
+ nextYears: string;
39
+ /** The two header buttons that open the month grid and the year grid. */
40
+ chooseMonth: string;
41
+ chooseYear: string;
42
+ /** The footer's actions. */
43
+ today: string;
44
+ now: string;
45
+ clear: string;
46
+ done: string;
47
+ /** The clock's columns. */
48
+ hour: string;
49
+ minute: string;
50
+ second: string;
51
+ meridiem: string;
52
+ /** Which end of a range the calendar is currently asking for. */
53
+ start: string;
54
+ end: string;
55
+ }
56
+ export declare const defaultPickerLabels: PlassPickerLabels;
57
+ /** Merges a caller's overrides over the defaults, once per render. */
58
+ export declare function usePickerLabels(overrides?: Partial<PlassPickerLabels>): PlassPickerLabels;
59
+ export interface CalendarProps {
60
+ size: PlassSize;
61
+ color: PlassColor;
62
+ locale?: string;
63
+ weekStartsOn: PlassWeekday;
64
+ /** The month on screen. Controlled, so two panels can be kept a month apart. */
65
+ month: Date;
66
+ onMonthChange: (month: Date) => void;
67
+ /** The days drawn filled — one for a single picker, up to two for a range. */
68
+ selected: readonly (Date | null | undefined)[];
69
+ /** The two ends the band is drawn between. Both `null` outside range mode. */
70
+ rangeStart?: Date | null;
71
+ rangeEnd?: Date | null;
72
+ onSelect: (date: Date) => void;
73
+ /** The day under the pointer, for a range that is only half chosen. */
74
+ onPreviewChange?: (date: Date | null) => void;
75
+ minDate?: Date | null;
76
+ maxDate?: Date | null;
77
+ shouldDisableDate?: (date: Date) => boolean;
78
+ /**
79
+ * Draws the leading and trailing days that belong to the neighbouring months.
80
+ *
81
+ * On by default, because clicking the 1st of next month from this month's
82
+ * panel is a real shortcut. A two-month range picker turns it *off*, and not
83
+ * as a matter of taste: with both panels showing six full weeks, the 1st of
84
+ * August appears twice — once as a trailing day of July and once as itself —
85
+ * and two cells with the same name in the same popup is ambiguous to a
86
+ * pointer and outright broken to a screen reader.
87
+ * @default true
88
+ */
89
+ showOutsideDays?: boolean;
90
+ /** Takes the focus on mount — the popup has just opened. */
91
+ autoFocus?: boolean;
92
+ showPreviousButton?: boolean;
93
+ showNextButton?: boolean;
94
+ labels: PlassPickerLabels;
95
+ className?: string;
96
+ }
97
+ /**
98
+ * One month, with a way to reach every other one.
99
+ *
100
+ * Three views on the same footprint: the days of a month, the twelve months of
101
+ * a year, twelve years at a time. They are deliberately the same width *and*
102
+ * the same height — the day view is seven rows counting its header, and the
103
+ * other two stretch four rows and three rows across that same height — so
104
+ * switching view never resizes the popup under the pointer that opened it.
105
+ *
106
+ * Arrow keys move by one cell, `PageUp`/`PageDown` by a month (a year with
107
+ * Shift), `Home`/`End` to the ends of the week, and running off an edge steps
108
+ * the calendar rather than stopping. One roving tab stop, so `Tab` leaves the
109
+ * grid instead of walking forty-two cells — the pattern the ARIA date-picker
110
+ * practice describes, and the reason none of the cells is a `disabled` button.
111
+ */
112
+ export declare function Calendar({ size, color, locale, weekStartsOn, month, onMonthChange, selected, rangeStart, rangeEnd, onSelect, onPreviewChange, minDate, maxDate, shouldDisableDate, showOutsideDays, autoFocus, showPreviousButton, showNextButton, labels, className }: CalendarProps): React.JSX.Element;
113
+ export type { TimeUnit };
114
+ export interface TimeGridProps {
115
+ size: PlassSize;
116
+ density: PlassDensity;
117
+ locale?: string;
118
+ /** The time on screen, or `null` while nothing has been chosen. */
119
+ value: Date | null;
120
+ /** The day the columns write into while `value` is still `null`. */
121
+ referenceDate: Date;
122
+ onChange: (value: Date) => void;
123
+ /** A 12-hour dial with an AM/PM column. Defaults to whatever the locale does. */
124
+ hour12: boolean;
125
+ showSeconds: boolean;
126
+ hourStep: number;
127
+ minuteStep: number;
128
+ secondStep: number;
129
+ shouldDisableTime?: (value: Date, unit: TimeUnit) => boolean;
130
+ /** Takes the focus on mount — the popup has just opened. */
131
+ autoFocus?: boolean;
132
+ labels: PlassPickerLabels;
133
+ className?: string;
134
+ }
135
+ /**
136
+ * Hours, minutes and — when asked for — seconds, as columns you scroll rather
137
+ * than as a dial you drag.
138
+ *
139
+ * Columns because they are the shape that answers what a time picker is actually
140
+ * asked: "half past nine" is two glances, and "any time at all, on the hour" is
141
+ * a column you never touch. A clock face is prettier and needs a `transform` to
142
+ * read, which this library does not have.
143
+ *
144
+ * The chosen row in each column is scrolled into view once, on open. That is the
145
+ * only imperative work here and it is not optional: a column of sixty minutes
146
+ * that opens at `00` while the value is `45` has hidden its own answer.
147
+ */
148
+ export declare function TimeGrid({ size, density, locale, value, referenceDate, onChange, hour12, showSeconds, hourStep, minuteStep, secondStep, shouldDisableTime, autoFocus, labels, className }: TimeGridProps): React.JSX.Element;