plass-ui 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/dist/components/accordion/PlAccordion.d.ts +98 -0
  2. package/dist/components/accordion/PlAccordion.js +1 -0
  3. package/dist/components/accordion/index.d.ts +2 -0
  4. package/dist/components/accordion/index.js +1 -0
  5. package/dist/components/alert/PlAlert.d.ts +50 -0
  6. package/dist/components/alert/PlAlert.js +1 -0
  7. package/dist/components/alert/index.d.ts +2 -0
  8. package/dist/components/alert/index.js +1 -0
  9. package/dist/components/animate-appear/PlAnimateAppear.d.ts +55 -0
  10. package/dist/components/animate-appear/PlAnimateAppear.js +1 -0
  11. package/dist/components/animate-appear/index.d.ts +2 -0
  12. package/dist/components/animate-appear/index.js +1 -0
  13. package/dist/components/animate-blink/PlAnimateBlink.d.ts +30 -0
  14. package/dist/components/animate-blink/PlAnimateBlink.js +1 -0
  15. package/dist/components/animate-blink/index.d.ts +2 -0
  16. package/dist/components/animate-blink/index.js +1 -0
  17. package/dist/components/animate-fade/PlAnimateFade.d.ts +35 -0
  18. package/dist/components/animate-fade/PlAnimateFade.js +1 -0
  19. package/dist/components/animate-fade/index.d.ts +2 -0
  20. package/dist/components/animate-fade/index.js +1 -0
  21. package/dist/components/animate-grow/PlAnimateGrow.d.ts +45 -0
  22. package/dist/components/animate-grow/PlAnimateGrow.js +1 -0
  23. package/dist/components/animate-grow/index.d.ts +2 -0
  24. package/dist/components/animate-grow/index.js +1 -0
  25. package/dist/components/animate-headline/PlAnimateHeadline.d.ts +55 -0
  26. package/dist/components/animate-headline/PlAnimateHeadline.js +1 -0
  27. package/dist/components/animate-headline/index.d.ts +2 -0
  28. package/dist/components/animate-headline/index.js +1 -0
  29. package/dist/components/animate-lighting/PlAnimateLighting.d.ts +67 -0
  30. package/dist/components/animate-lighting/PlAnimateLighting.js +1 -0
  31. package/dist/components/animate-lighting/index.d.ts +2 -0
  32. package/dist/components/animate-lighting/index.js +1 -0
  33. package/dist/components/animate-marquee/PlAnimateMarquee.d.ts +65 -0
  34. package/dist/components/animate-marquee/PlAnimateMarquee.js +1 -0
  35. package/dist/components/animate-marquee/index.d.ts +2 -0
  36. package/dist/components/animate-marquee/index.js +1 -0
  37. package/dist/components/animate-rotate/PlAnimateRotate.d.ts +52 -0
  38. package/dist/components/animate-rotate/PlAnimateRotate.js +1 -0
  39. package/dist/components/animate-rotate/index.d.ts +2 -0
  40. package/dist/components/animate-rotate/index.js +1 -0
  41. package/dist/components/animate-slide/PlAnimateSlide.d.ts +47 -0
  42. package/dist/components/animate-slide/PlAnimateSlide.js +1 -0
  43. package/dist/components/animate-slide/index.d.ts +2 -0
  44. package/dist/components/animate-slide/index.js +1 -0
  45. package/dist/components/animate-typing/PlAnimateTyping.d.ts +56 -0
  46. package/dist/components/animate-typing/PlAnimateTyping.js +1 -0
  47. package/dist/components/animate-typing/index.d.ts +2 -0
  48. package/dist/components/animate-typing/index.js +1 -0
  49. package/dist/components/animate-zoom/PlAnimateZoom.d.ts +37 -0
  50. package/dist/components/animate-zoom/PlAnimateZoom.js +1 -0
  51. package/dist/components/animate-zoom/index.d.ts +2 -0
  52. package/dist/components/animate-zoom/index.js +1 -0
  53. package/dist/components/aspect-ratio/PlAspectRatio.d.ts +64 -0
  54. package/dist/components/aspect-ratio/PlAspectRatio.js +1 -0
  55. package/dist/components/aspect-ratio/index.d.ts +2 -0
  56. package/dist/components/aspect-ratio/index.js +1 -0
  57. package/dist/components/avatar/PlAvatar.d.ts +102 -0
  58. package/dist/components/avatar/PlAvatar.js +1 -0
  59. package/dist/components/avatar/index.d.ts +2 -0
  60. package/dist/components/avatar/index.js +1 -0
  61. package/dist/components/badge/PlBadge.d.ts +86 -0
  62. package/dist/components/badge/PlBadge.js +1 -0
  63. package/dist/components/badge/index.d.ts +2 -0
  64. package/dist/components/badge/index.js +1 -0
  65. package/dist/components/blockquote/PlBlockquote.d.ts +64 -0
  66. package/dist/components/blockquote/PlBlockquote.js +1 -0
  67. package/dist/components/blockquote/index.d.ts +2 -0
  68. package/dist/components/blockquote/index.js +1 -0
  69. package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +111 -0
  70. package/dist/components/bottom-navigation/PlBottomNavigation.js +1 -0
  71. package/dist/components/bottom-navigation/index.d.ts +2 -0
  72. package/dist/components/bottom-navigation/index.js +1 -0
  73. package/dist/components/box/PlBox.d.ts +50 -0
  74. package/dist/components/box/PlBox.js +1 -0
  75. package/dist/components/box/index.d.ts +2 -0
  76. package/dist/components/box/index.js +1 -0
  77. package/dist/components/breadcrumb/PlBreadcrumb.d.ts +138 -0
  78. package/dist/components/breadcrumb/PlBreadcrumb.js +1 -0
  79. package/dist/components/breadcrumb/index.d.ts +2 -0
  80. package/dist/components/breadcrumb/index.js +1 -0
  81. package/dist/components/button/{Button.d.ts → PlButton.d.ts} +3 -3
  82. package/dist/components/button/PlButton.js +1 -0
  83. package/dist/components/button/index.d.ts +2 -2
  84. package/dist/components/button/index.js +1 -1
  85. package/dist/components/button-group/PlButtonGroup.d.ts +32 -0
  86. package/dist/components/button-group/PlButtonGroup.js +1 -0
  87. package/dist/components/button-group/index.d.ts +2 -0
  88. package/dist/components/button-group/index.js +1 -0
  89. package/dist/components/card/PlCard.d.ts +81 -0
  90. package/dist/components/card/PlCard.js +1 -0
  91. package/dist/components/card/index.d.ts +2 -0
  92. package/dist/components/card/index.js +1 -0
  93. package/dist/components/carousel/PlCarousel.d.ts +78 -0
  94. package/dist/components/carousel/PlCarousel.js +1 -0
  95. package/dist/components/carousel/index.d.ts +2 -0
  96. package/dist/components/carousel/index.js +1 -0
  97. package/dist/components/chat-bubble/PlChatBubble.d.ts +127 -0
  98. package/dist/components/chat-bubble/PlChatBubble.js +1 -0
  99. package/dist/components/chat-bubble/index.d.ts +2 -0
  100. package/dist/components/chat-bubble/index.js +1 -0
  101. package/dist/components/checkbox/PlCheckbox.d.ts +39 -0
  102. package/dist/components/checkbox/PlCheckbox.js +1 -0
  103. package/dist/components/checkbox/index.d.ts +2 -0
  104. package/dist/components/checkbox/index.js +1 -0
  105. package/dist/components/chip/PlChip.d.ts +55 -0
  106. package/dist/components/chip/PlChip.js +1 -0
  107. package/dist/components/chip/index.d.ts +2 -0
  108. package/dist/components/chip/index.js +1 -0
  109. package/dist/components/collapsible/PlCollapsible.d.ts +84 -0
  110. package/dist/components/collapsible/PlCollapsible.js +1 -0
  111. package/dist/components/collapsible/index.d.ts +2 -0
  112. package/dist/components/collapsible/index.js +1 -0
  113. package/dist/components/combobox/PlCombobox.d.ts +140 -0
  114. package/dist/components/combobox/PlCombobox.js +1 -0
  115. package/dist/components/combobox/index.d.ts +2 -0
  116. package/dist/components/combobox/index.js +1 -0
  117. package/dist/components/container/PlContainer.d.ts +66 -0
  118. package/dist/components/container/PlContainer.js +1 -0
  119. package/dist/components/container/index.d.ts +2 -0
  120. package/dist/components/container/index.js +1 -0
  121. package/dist/components/date-picker/PlDatePicker.d.ts +73 -0
  122. package/dist/components/date-picker/PlDatePicker.js +1 -0
  123. package/dist/components/date-picker/index.d.ts +2 -0
  124. package/dist/components/date-picker/index.js +1 -0
  125. package/dist/components/date-range-picker/PlDateRangePicker.d.ts +91 -0
  126. package/dist/components/date-range-picker/PlDateRangePicker.js +1 -0
  127. package/dist/components/date-range-picker/index.d.ts +2 -0
  128. package/dist/components/date-range-picker/index.js +1 -0
  129. package/dist/components/date-time-picker/PlDateTimePicker.d.ts +74 -0
  130. package/dist/components/date-time-picker/PlDateTimePicker.js +1 -0
  131. package/dist/components/date-time-picker/index.d.ts +2 -0
  132. package/dist/components/date-time-picker/index.js +1 -0
  133. package/dist/components/divider/PlDivider.d.ts +73 -0
  134. package/dist/components/divider/PlDivider.js +1 -0
  135. package/dist/components/divider/index.d.ts +2 -0
  136. package/dist/components/divider/index.js +1 -0
  137. package/dist/components/drawer/PlDrawer.d.ts +144 -0
  138. package/dist/components/drawer/PlDrawer.js +1 -0
  139. package/dist/components/drawer/index.d.ts +2 -0
  140. package/dist/components/drawer/index.js +1 -0
  141. package/dist/components/file-picker/PlFilePicker.d.ts +105 -0
  142. package/dist/components/file-picker/PlFilePicker.js +1 -0
  143. package/dist/components/file-picker/index.d.ts +2 -0
  144. package/dist/components/file-picker/index.js +1 -0
  145. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +118 -0
  146. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -0
  147. package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
  148. package/dist/components/floating-bottom-navigation/index.js +1 -0
  149. package/dist/components/grid/PlGrid.d.ts +67 -0
  150. package/dist/components/grid/PlGrid.js +1 -0
  151. package/dist/components/grid/PlGridItem.d.ts +50 -0
  152. package/dist/components/grid/PlGridItem.js +1 -0
  153. package/dist/components/grid/index.d.ts +4 -0
  154. package/dist/components/grid/index.js +1 -0
  155. package/dist/components/highlight/PlHighlight.d.ts +90 -0
  156. package/dist/components/highlight/PlHighlight.js +1 -0
  157. package/dist/components/highlight/index.d.ts +2 -0
  158. package/dist/components/highlight/index.js +1 -0
  159. package/dist/components/hot-keys/PlHotKeys.d.ts +93 -0
  160. package/dist/components/hot-keys/PlHotKeys.js +1 -0
  161. package/dist/components/hot-keys/index.d.ts +2 -0
  162. package/dist/components/hot-keys/index.js +1 -0
  163. package/dist/components/icon/PlIcon.d.ts +62 -0
  164. package/dist/components/icon/PlIcon.js +1 -0
  165. package/dist/components/icon/index.d.ts +2 -0
  166. package/dist/components/icon/index.js +1 -0
  167. package/dist/components/icon-button/PlIconButton.d.ts +39 -0
  168. package/dist/components/icon-button/PlIconButton.js +1 -0
  169. package/dist/components/icon-button/index.d.ts +2 -0
  170. package/dist/components/icon-button/index.js +1 -0
  171. package/dist/components/list/PlList.d.ts +82 -0
  172. package/dist/components/list/PlList.js +1 -0
  173. package/dist/components/list/index.d.ts +2 -0
  174. package/dist/components/list/index.js +1 -0
  175. package/dist/components/menu/PlMenu.d.ts +210 -0
  176. package/dist/components/menu/PlMenu.js +1 -0
  177. package/dist/components/menu/index.d.ts +2 -0
  178. package/dist/components/menu/index.js +1 -0
  179. package/dist/components/modal/PlModal.d.ts +112 -0
  180. package/dist/components/modal/PlModal.js +1 -0
  181. package/dist/components/modal/index.d.ts +2 -0
  182. package/dist/components/modal/index.js +1 -0
  183. package/dist/components/number-field/PlNumberField.d.ts +133 -0
  184. package/dist/components/number-field/PlNumberField.js +1 -0
  185. package/dist/components/number-field/index.d.ts +2 -0
  186. package/dist/components/number-field/index.js +1 -0
  187. package/dist/components/otp-field/PlOtpField.d.ts +82 -0
  188. package/dist/components/otp-field/PlOtpField.js +1 -0
  189. package/dist/components/otp-field/index.d.ts +2 -0
  190. package/dist/components/otp-field/index.js +1 -0
  191. package/dist/components/overlay/PlOverlay.d.ts +96 -0
  192. package/dist/components/overlay/PlOverlay.js +1 -0
  193. package/dist/components/overlay/index.d.ts +2 -0
  194. package/dist/components/overlay/index.js +1 -0
  195. package/dist/components/pagination/PlPagination.d.ts +88 -0
  196. package/dist/components/pagination/PlPagination.js +1 -0
  197. package/dist/components/pagination/index.d.ts +2 -0
  198. package/dist/components/pagination/index.js +1 -0
  199. package/dist/components/panes/PlPanes.d.ts +79 -0
  200. package/dist/components/panes/PlPanes.js +1 -0
  201. package/dist/components/panes/index.d.ts +2 -0
  202. package/dist/components/panes/index.js +1 -0
  203. package/dist/components/pill/PlPill.d.ts +81 -0
  204. package/dist/components/pill/PlPill.js +1 -0
  205. package/dist/components/pill/index.d.ts +2 -0
  206. package/dist/components/pill/index.js +1 -0
  207. package/dist/components/popover/PlPopover.d.ts +107 -0
  208. package/dist/components/popover/PlPopover.js +1 -0
  209. package/dist/components/popover/index.d.ts +2 -0
  210. package/dist/components/popover/index.js +1 -0
  211. package/dist/components/progress-box/PlProgressBox.d.ts +32 -0
  212. package/dist/components/progress-box/PlProgressBox.js +1 -0
  213. package/dist/components/progress-box/index.d.ts +2 -0
  214. package/dist/components/progress-box/index.js +1 -0
  215. package/dist/components/progress-circular/PlProgressCircular.d.ts +22 -0
  216. package/dist/components/progress-circular/PlProgressCircular.js +1 -0
  217. package/dist/components/progress-circular/index.d.ts +2 -0
  218. package/dist/components/progress-circular/index.js +1 -0
  219. package/dist/components/progress-linear/PlProgressLinear.d.ts +31 -0
  220. package/dist/components/progress-linear/PlProgressLinear.js +1 -0
  221. package/dist/components/progress-linear/index.d.ts +2 -0
  222. package/dist/components/progress-linear/index.js +1 -0
  223. package/dist/components/radio-group/PlRadioGroup.d.ts +54 -0
  224. package/dist/components/radio-group/PlRadioGroup.js +1 -0
  225. package/dist/components/radio-group/index.d.ts +2 -0
  226. package/dist/components/radio-group/index.js +1 -0
  227. package/dist/components/rating/PlRating.d.ts +90 -0
  228. package/dist/components/rating/PlRating.js +1 -0
  229. package/dist/components/rating/index.d.ts +2 -0
  230. package/dist/components/rating/index.js +1 -0
  231. package/dist/components/scroll-zone/PlScrollZone.d.ts +132 -0
  232. package/dist/components/scroll-zone/PlScrollZone.js +1 -0
  233. package/dist/components/scroll-zone/index.d.ts +2 -0
  234. package/dist/components/scroll-zone/index.js +1 -0
  235. package/dist/components/segmented-button/PlSegmentedButton.d.ts +79 -0
  236. package/dist/components/segmented-button/PlSegmentedButton.js +1 -0
  237. package/dist/components/segmented-button/index.d.ts +2 -0
  238. package/dist/components/segmented-button/index.js +1 -0
  239. package/dist/components/select/PlSelect.d.ts +77 -0
  240. package/dist/components/select/PlSelect.js +1 -0
  241. package/dist/components/select/index.d.ts +2 -0
  242. package/dist/components/select/index.js +1 -0
  243. package/dist/components/skeleton/PlSkeleton.d.ts +73 -0
  244. package/dist/components/skeleton/PlSkeleton.js +1 -0
  245. package/dist/components/skeleton/index.d.ts +2 -0
  246. package/dist/components/skeleton/index.js +1 -0
  247. package/dist/components/slider/PlSlider.d.ts +44 -0
  248. package/dist/components/slider/PlSlider.js +1 -0
  249. package/dist/components/slider/index.d.ts +2 -0
  250. package/dist/components/slider/index.js +1 -0
  251. package/dist/components/spoiler/PlSpoiler.d.ts +84 -0
  252. package/dist/components/spoiler/PlSpoiler.js +1 -0
  253. package/dist/components/spoiler/index.d.ts +2 -0
  254. package/dist/components/spoiler/index.js +1 -0
  255. package/dist/components/switch/PlSwitch.d.ts +42 -0
  256. package/dist/components/switch/PlSwitch.js +1 -0
  257. package/dist/components/switch/index.d.ts +2 -0
  258. package/dist/components/switch/index.js +1 -0
  259. package/dist/components/table/PlTable.d.ts +112 -0
  260. package/dist/components/table/PlTable.js +1 -0
  261. package/dist/components/table/index.d.ts +2 -0
  262. package/dist/components/table/index.js +1 -0
  263. package/dist/components/tabs/PlTabs.d.ts +94 -0
  264. package/dist/components/tabs/PlTabs.js +1 -0
  265. package/dist/components/tabs/index.d.ts +2 -0
  266. package/dist/components/tabs/index.js +1 -0
  267. package/dist/components/text-field/{TextField.d.ts → PlTextField.d.ts} +5 -5
  268. package/dist/components/text-field/PlTextField.js +1 -0
  269. package/dist/components/text-field/index.d.ts +2 -2
  270. package/dist/components/text-field/index.js +1 -1
  271. package/dist/components/text-link/PlTextLink.d.ts +80 -0
  272. package/dist/components/text-link/PlTextLink.js +1 -0
  273. package/dist/components/text-link/index.d.ts +2 -0
  274. package/dist/components/text-link/index.js +1 -0
  275. package/dist/components/time-picker/PlTimePicker.d.ts +88 -0
  276. package/dist/components/time-picker/PlTimePicker.js +1 -0
  277. package/dist/components/time-picker/index.d.ts +2 -0
  278. package/dist/components/time-picker/index.js +1 -0
  279. package/dist/components/timeline/PlTimeline.d.ts +98 -0
  280. package/dist/components/timeline/PlTimeline.js +1 -0
  281. package/dist/components/timeline/index.d.ts +2 -0
  282. package/dist/components/timeline/index.js +1 -0
  283. package/dist/components/toast/PlToast.d.ts +122 -0
  284. package/dist/components/toast/PlToast.js +1 -0
  285. package/dist/components/toast/index.d.ts +2 -0
  286. package/dist/components/toast/index.js +1 -0
  287. package/dist/components/toolbar/PlToolbar.d.ts +68 -0
  288. package/dist/components/toolbar/PlToolbar.js +1 -0
  289. package/dist/components/toolbar/index.d.ts +2 -0
  290. package/dist/components/toolbar/index.js +1 -0
  291. package/dist/components/tooltip/PlTooltip.d.ts +92 -0
  292. package/dist/components/tooltip/PlTooltip.js +1 -0
  293. package/dist/components/tooltip/index.d.ts +2 -0
  294. package/dist/components/tooltip/index.js +1 -0
  295. package/dist/components/typography/PlTypography.d.ts +66 -0
  296. package/dist/components/typography/PlTypography.js +1 -0
  297. package/dist/components/typography/index.d.ts +2 -0
  298. package/dist/components/typography/index.js +1 -0
  299. package/dist/css/accordion.css +2 -0
  300. package/dist/css/alert.css +2 -0
  301. package/dist/css/animate-appear.css +2 -0
  302. package/dist/css/animate-blink.css +2 -0
  303. package/dist/css/animate-fade.css +2 -0
  304. package/dist/css/animate-grow.css +2 -0
  305. package/dist/css/animate-headline.css +2 -0
  306. package/dist/css/animate-lighting.css +2 -0
  307. package/dist/css/animate-marquee.css +2 -0
  308. package/dist/css/animate-rotate.css +2 -0
  309. package/dist/css/animate-slide.css +2 -0
  310. package/dist/css/animate-typing.css +2 -0
  311. package/dist/css/animate-zoom.css +2 -0
  312. package/dist/css/aspect-ratio.css +2 -0
  313. package/dist/css/avatar.css +2 -0
  314. package/dist/css/badge.css +2 -0
  315. package/dist/css/base.css +4 -0
  316. package/dist/css/blockquote.css +2 -0
  317. package/dist/css/bottom-navigation.css +2 -0
  318. package/dist/css/box.css +2 -0
  319. package/dist/css/breadcrumb.css +2 -0
  320. package/dist/css/button-group.css +2 -0
  321. package/dist/css/button.css +2 -0
  322. package/dist/css/card.css +2 -0
  323. package/dist/css/carousel.css +2 -0
  324. package/dist/css/chat-bubble.css +2 -0
  325. package/dist/css/checkbox.css +2 -0
  326. package/dist/css/chip.css +2 -0
  327. package/dist/css/collapsible.css +2 -0
  328. package/dist/css/combobox.css +2 -0
  329. package/dist/css/container.css +2 -0
  330. package/dist/css/date-picker.css +2 -0
  331. package/dist/css/date-range-picker.css +2 -0
  332. package/dist/css/date-time-picker.css +2 -0
  333. package/dist/css/divider.css +2 -0
  334. package/dist/css/drawer.css +2 -0
  335. package/dist/css/file-picker.css +2 -0
  336. package/dist/css/floating-bottom-navigation.css +2 -0
  337. package/dist/css/grid.css +2 -0
  338. package/dist/css/highlight.css +2 -0
  339. package/dist/css/hot-keys.css +2 -0
  340. package/dist/css/icon-button.css +2 -0
  341. package/dist/css/icon.css +2 -0
  342. package/dist/css/list.css +2 -0
  343. package/dist/css/menu.css +2 -0
  344. package/dist/css/modal.css +2 -0
  345. package/dist/css/number-field.css +2 -0
  346. package/dist/css/otp-field.css +2 -0
  347. package/dist/css/overlay.css +2 -0
  348. package/dist/css/pagination.css +2 -0
  349. package/dist/css/panes.css +2 -0
  350. package/dist/css/pill.css +2 -0
  351. package/dist/css/popover.css +2 -0
  352. package/dist/css/progress-box.css +2 -0
  353. package/dist/css/progress-circular.css +2 -0
  354. package/dist/css/progress-linear.css +2 -0
  355. package/dist/css/radio-group.css +2 -0
  356. package/dist/css/rating.css +2 -0
  357. package/dist/css/scroll-zone.css +2 -0
  358. package/dist/css/segmented-button.css +2 -0
  359. package/dist/css/select.css +2 -0
  360. package/dist/css/skeleton.css +2 -0
  361. package/dist/css/slider.css +2 -0
  362. package/dist/css/spoiler.css +2 -0
  363. package/dist/css/switch.css +2 -0
  364. package/dist/css/table.css +2 -0
  365. package/dist/css/tabs.css +2 -0
  366. package/dist/css/text-field.css +2 -0
  367. package/dist/css/text-link.css +2 -0
  368. package/dist/css/time-picker.css +2 -0
  369. package/dist/css/timeline.css +2 -0
  370. package/dist/css/toast.css +2 -0
  371. package/dist/css/toolbar.css +2 -0
  372. package/dist/css/tooltip.css +2 -0
  373. package/dist/css/typography.css +2 -0
  374. package/dist/index.d.ts +75 -3
  375. package/dist/index.js +1 -1
  376. package/dist/internal/animate.d.ts +161 -0
  377. package/dist/internal/animate.js +1 -0
  378. package/dist/internal/button-group.d.ts +27 -0
  379. package/dist/internal/button-group.js +2 -0
  380. package/dist/internal/calendar.d.ts +148 -0
  381. package/dist/internal/calendar.js +1 -0
  382. package/dist/internal/date.d.ts +173 -0
  383. package/dist/internal/date.js +1 -0
  384. package/dist/internal/format.d.ts +24 -0
  385. package/dist/internal/format.js +1 -0
  386. package/dist/internal/grid.d.ts +67 -0
  387. package/dist/internal/grid.js +1 -0
  388. package/dist/internal/icons.d.ts +86 -1
  389. package/dist/internal/icons.js +1 -1
  390. package/dist/internal/menu.d.ts +20 -0
  391. package/dist/internal/menu.js +1 -0
  392. package/dist/internal/picker.d.ts +118 -0
  393. package/dist/internal/picker.js +1 -0
  394. package/dist/internal/progress.d.ts +145 -0
  395. package/dist/internal/progress.js +1 -0
  396. package/dist/internal/sizer.d.ts +32 -0
  397. package/dist/internal/sizer.js +1 -0
  398. package/dist/internal/styles.d.ts +198 -8
  399. package/dist/internal/styles.js +1 -1
  400. package/dist/styles.css +1 -1
  401. package/dist/tailwind.css +899 -125
  402. package/dist/tokens.css +1275 -0
  403. package/dist/types.d.ts +150 -8
  404. package/dist/types.js +0 -8
  405. package/package.json +32 -27
  406. package/README.md +0 -111
  407. package/dist/components/button/Button.js +0 -1
  408. package/dist/components/text-field/TextField.js +0 -1
@@ -0,0 +1,77 @@
1
+ import * as React from 'react';
2
+ import type { PlassElevation, PlassStyleProps } from '../../types.js';
3
+ /**
4
+ * What a select's value may be.
5
+ *
6
+ * Deliberately not generic over arbitrary objects. A select is a form control,
7
+ * its value is what a form submits, and every escape from that — object values,
8
+ * custom equality, a stringifier for the trigger — buys flexibility by making
9
+ * the common case harder to write. Keep the identifier here and look the object
10
+ * up on the other side.
11
+ */
12
+ export type PlSelectValue = string | number;
13
+ export interface PlSelectOption {
14
+ /** Submitted, and what `value` / `onValueChange` speak in. */
15
+ value: PlSelectValue;
16
+ /** Shown in the list and in the trigger. Defaults to the value itself. */
17
+ label?: React.ReactNode;
18
+ /** Unavailable, but still listed — the option exists, it just cannot be picked. */
19
+ disabled?: boolean;
20
+ }
21
+ export interface PlSelectProps extends PlassStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'defaultValue' | 'children'> {
22
+ /**
23
+ * The options, as data. There is no `<PlSelect.Option>` to compose: what a
24
+ * caller has is almost always an array already, and the list has to be
25
+ * available to the trigger before the popup has ever been opened.
26
+ */
27
+ items: readonly PlSelectOption[];
28
+ /** The chosen value. Use with `onValueChange` for a controlled select. */
29
+ value?: PlSelectValue | null;
30
+ /** The initially chosen value, for an uncontrolled select. */
31
+ defaultValue?: PlSelectValue | null;
32
+ onValueChange?: (value: PlSelectValue | null) => void;
33
+ /** Shown in the trigger while nothing is chosen. */
34
+ placeholder?: React.ReactNode;
35
+ /**
36
+ * Drop shadow depth of the *trigger*. `0`, like a PlTextField: a field is cut
37
+ * into the sheet rather than resting on it. The popup has its own, fixed at
38
+ * `3` — it genuinely floats above the page, which is the one case elevation
39
+ * is for.
40
+ * @default 0
41
+ */
42
+ elevation?: PlassElevation;
43
+ /** Label above the trigger, wired to it by Base UI's Field. */
44
+ label?: React.ReactNode;
45
+ /** Helper text below the trigger. */
46
+ description?: React.ReactNode;
47
+ /** Error message below. Its presence also turns the select invalid. */
48
+ error?: React.ReactNode;
49
+ /** Forces the invalid state without a message. Defaults to whether `error` has content. */
50
+ invalid?: boolean;
51
+ /** Content placed before the value. Sized in `em`, so it tracks the text. */
52
+ startIcon?: React.ReactNode;
53
+ /** Stretches to the width of the container. */
54
+ fullWidth?: boolean;
55
+ /** Unavailable. */
56
+ disabled?: boolean;
57
+ /** The value is shown but cannot be changed. */
58
+ readOnly?: boolean;
59
+ /** Whether a value must be chosen before the form is submitted. */
60
+ required?: boolean;
61
+ /** Identifies the field when a form is submitted. */
62
+ name?: string;
63
+ id?: string;
64
+ }
65
+ /**
66
+ * One value chosen from a list of them.
67
+ *
68
+ * The trigger is a PlTextField's shell wearing a chevron, on purpose: a form
69
+ * where the select is a different height, radius or material from the fields
70
+ * around it is a form that looks assembled rather than designed. That is why
71
+ * `fieldRestClasses` lives in `internal/styles` and not in either component.
72
+ *
73
+ * Base UI owns everything hard about this — the popup's positioning and
74
+ * flipping, the focus trap, typeahead, the hidden input that makes it submit —
75
+ * and the work here is the surface it all wears.
76
+ */
77
+ export declare const PlSelect: React.ForwardRefExoticComponent<PlSelectProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as l from"react";import{Select as t}from"@base-ui/react/select";import{Field as s}from"@base-ui/react/field";import{CheckIcon as r,ChevronIcon as i}from"../../internal/icons.js";import{WidthSizer as n}from"../../internal/sizer.js";import{controlHeightClasses as o,controlTextLeadingClasses as c,disabledClasses as d,fieldReadOnlyClasses as m,fieldRestClasses as u,focusWithinRingClasses as p,gapClasses as h,glassClasses as f,hasContent as g,iconClasses as x,metaTextClasses as v,paddingXClasses as b,radiusClasses as j,stackGapClasses as N,surfaceSlots as w,transitionClasses as y}from"../../internal/styles.js";const I=/* @__PURE__ */["group relative flex w-full cursor-pointer items-center select-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",y,p,x].join(" "),S=/* @__PURE__ */[f,"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain","min-w-[var(--anchor-width)] border bg-(--plass-glass-press) p-1","[border-color:var(--plass-glass-line)]","[box-shadow:var(--plass-shadow-3),var(--plass-gloss-glass)]","[outline:none]"].join(" "),$=/* @__PURE__ */["relative flex cursor-pointer items-center gap-2 select-none","rounded-(--plass-radius-xs) py-1.5 pe-2 ps-7",y,"data-[highlighted]:bg-(--p-soft-hover) data-[highlighted]:text-(--p-accent)","data-[selected]:font-semibold data-[selected]:text-(--p-accent)","data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","[outline:none]"].join(" ");export const PlSelect=/* @__PURE__ */l.forwardRef(function PlSelect({variant:p="glass",size:f="md",color:x="primary",density:y="default",elevation:P=0,items:V,value:z,defaultValue:k,onValueChange:O,placeholder:R,label:T,description:q,error:C,invalid:M,startIcon:W,fullWidth:_=!1,disabled:B=!1,readOnly:D=!1,required:E=!1,name:L,id:A,className:F,style:G,...H},J){const K=g(C),Q=M??K,U=Q?"danger":x,X=l.useMemo(()=>V.map(e=>({label:e.label??String(e.value),value:e.value})),[V]),Y=l.useMemo(()=>[...V.map(e=>e.label??String(e.value)),...g(R)?[R]:[]],[V,R]);return a(s.Root,{disabled:B,invalid:Q,className:["flex-col align-top",N[f],_?"flex w-full":"inline-flex",F??""].filter(Boolean).join(" "),style:{...w(U,P),...G},...H,children:[T?e(s.Label,{className:[v[f],"font-semibold",B?"text-(--plass-muted-fg)":"text-(--plass-fg)"].join(" "),children:T}):null,a(t.Root,{id:A,name:L,items:X,value:z,defaultValue:k,onValueChange:e=>O?.(e),disabled:B,readOnly:D,required:E,children:[a(t.Trigger,{ref:J,className:[I,o[f],c[f],j[f],h[f],b[y][f],B?d[p]:D?`${m[p]} cursor-default`:u[p]].join(" "),children:[W?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:W}):null,a("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(t.Value,{className:["w-full truncate text-start","data-[placeholder]:text-(--plass-muted-fg)"].join(" "),placeholder:R}),e(n,{samples:Y})]}),e(t.Icon,{className:["flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)","[transition:rotate_var(--plass-duration)_var(--plass-ease)]","data-[popup-open]:rotate-180"].join(" "),children:e(i,{})})]}),e(t.Portal,{children:e(t.Positioner,{className:"plass-portal z-50 [outline:none]",sideOffset:6,alignItemWithTrigger:!1,children:e(t.Popup,{className:`${S} ${j[f]} ${c[f]}`,style:w(U,3),children:V.map(l=>a(t.Item,{value:l.value,disabled:l.disabled,className:$,children:[e(t.ItemIndicator,{className:"absolute start-1.5 flex size-4 items-center justify-center",children:e(r,{})}),e(t.ItemText,{className:"truncate",children:l.label??String(l.value)})]},String(l.value)))})})})]}),q?e(s.Description,{className:`${v[f]} text-(--plass-muted-fg)`,children:q}):null,K?e(s.Error,{match:!0,className:`${v[f]} text-(--p-accent)`,children:C}):null]})});
@@ -0,0 +1,2 @@
1
+ export { PlSelect } from './PlSelect.js';
2
+ export type { PlSelectOption, PlSelectProps, PlSelectValue } from './PlSelect.js';
@@ -0,0 +1 @@
1
+ export{PlSelect}from"./PlSelect.js";
@@ -0,0 +1,73 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { PlassColor, PlassSize } from '../../types.js';
4
+ /**
5
+ * What the placeholder is standing in for.
6
+ *
7
+ * - `line` — a run of text. Sized off the type scale, so a `md` line is exactly
8
+ * as tall as the `md` type it will be replaced by.
9
+ * - `rect` — a block: an image, a chart, a card, a map.
10
+ * - `circle` — an avatar, or anything else round.
11
+ */
12
+ export type PlSkeletonShape = 'line' | 'rect' | 'circle';
13
+ export interface PlSkeletonProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
14
+ /** @default 'line' */
15
+ shape?: PlSkeletonShape;
16
+ /**
17
+ * How many lines to draw, for `shape="line"`. The last one is drawn short, the
18
+ * way the last line of a paragraph is, so a block of them reads as prose
19
+ * rather than as a barcode. Ignored by the other two shapes.
20
+ * @default 1
21
+ */
22
+ lines?: number;
23
+ /**
24
+ * The scale of the thing being stood in for: the type scale for a `line`, the
25
+ * diameter for a `circle`, the default block height for a `rect`.
26
+ * @default 'md'
27
+ */
28
+ size?: PlassSize;
29
+ /**
30
+ * Colour family. `secondary` by default, and it is worth leaving there: a
31
+ * placeholder that carries a semantic colour is saying something about content
32
+ * that has not arrived yet.
33
+ * @default 'secondary'
34
+ */
35
+ color?: PlassColor;
36
+ /** An explicit width. Numbers are pixels. */
37
+ width?: number | string;
38
+ /** An explicit height. Numbers are pixels. */
39
+ height?: number | string;
40
+ /**
41
+ * The travelling highlight. Turn it off for a page holding dozens of them, or
42
+ * where the wait is expected to be long enough that motion becomes noise.
43
+ *
44
+ * A reduced-motion preference already replaces the sweep with a colour pulse
45
+ * without being asked, so this is not the accessibility switch.
46
+ * @default true
47
+ */
48
+ animated?: boolean;
49
+ /**
50
+ * What a screen reader is told, if anything.
51
+ *
52
+ * Unset — the default — the placeholder is `aria-hidden`, because a dozen
53
+ * boxes each announcing themselves is worse than silence. Give the *one*
54
+ * skeleton that stands for the whole region a label and it becomes a live
55
+ * `status` instead.
56
+ */
57
+ label?: string;
58
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
59
+ render?: useRender.RenderProp;
60
+ }
61
+ /**
62
+ * The shape of something that has not loaded yet.
63
+ *
64
+ * It reserves the space the real thing will take, which is the whole job: a card
65
+ * that grows by 200px when its image arrives has moved everything below it while
66
+ * somebody was reading. A spinner cannot do that.
67
+ *
68
+ * The three shapes are the three things a layout is made of — a run of text, a
69
+ * block and a circle — and each is sized off the ladder the real component uses,
70
+ * so a `md` line is as tall as `md` type and a `md` circle is exactly a
71
+ * `PlAvatar` at `md`.
72
+ */
73
+ export declare const PlSkeleton: React.ForwardRefExoticComponent<PlSkeletonProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as r from"react";import{useRender as l}from"@base-ui/react/use-render";import{controlHeightClasses as s,controlSquareClasses as d,surfaceSlots as n}from"../../internal/styles.js";const o={xs:"h-[0.6875rem]",sm:"h-[0.75rem]",md:"h-[0.8125rem]",lg:"h-[0.9375rem]",xl:"h-[1.0625rem]"},a={xs:"gap-[0.3125rem]",sm:"gap-[0.375rem]",md:"gap-[0.5625rem]",lg:"gap-[0.5625rem]",xl:"gap-[0.6875rem]"},m={xs:"rounded-[0.3125rem]",sm:"rounded-[0.3125rem]",md:"rounded-[0.375rem]",lg:"rounded-[0.4375rem]",xl:"rounded-[0.5rem]"},i={xs:"h-12",sm:"h-16",md:"h-20",lg:"h-28",xl:"h-36"},t={xs:"rounded-(--plass-radius-xs)",sm:"rounded-(--plass-radius-sm)",md:"rounded-(--plass-radius-md)",lg:"rounded-(--plass-radius-lg)",xl:"rounded-(--plass-radius-xl)"},u="relative overflow-hidden bg-(--p-soft-hover)";function length(e){if(void 0!==e)return"number"==typeof e?`${e}px`:e}export const PlSkeleton=/* @__PURE__ */r.forwardRef(function PlSkeleton({shape:r="line",lines:h=1,size:f="md",color:p="secondary",width:c,height:g,animated:x=!0,label:w,render:y,className:$,style:b,...v},j){const k=x?"plass-skeleton":"",N="circle"===r?`shrink-0 rounded-full ${s[f]} ${d[f]}`:"rect"===r?`w-full ${t[f]} ${void 0===g?i[f]:""}`:`w-full ${m[f]} ${o[f]}`,B=w?{role:"status","aria-busy":!0,"aria-label":w}:{"aria-hidden":!0},P="line"===r&&h>1;return l({render:y,ref:j,props:{className:(P?["flex w-full flex-col",a[f],$??""]:[u,k,N,$??""]).filter(Boolean).join(" "),style:{...n(p,0),width:length(c),height:length(g),...b},...B,...P?{children:Array.from({length:h},(r,l)=>e("div",{className:[u,k,m[f],o[f],l===h-1?"w-3/5":"w-full"].filter(Boolean).join(" ")},l))}:null,...v}})});
@@ -0,0 +1,2 @@
1
+ export { PlSkeleton } from './PlSkeleton.js';
2
+ export type { PlSkeletonProps, PlSkeletonShape } from './PlSkeleton.js';
@@ -0,0 +1 @@
1
+ export{PlSkeleton}from"./PlSkeleton.js";
@@ -0,0 +1,44 @@
1
+ import * as React from 'react';
2
+ import { Slider as BaseUISlider } from '@base-ui/react/slider';
3
+ import type { PlassColor, PlassElevation, PlassOrientation, PlassSize } from '../../types.js';
4
+ type BaseSliderProps = Omit<React.ComponentPropsWithoutRef<typeof BaseUISlider.Root>, 'className' | 'style' | 'render' | 'children' | 'orientation'>;
5
+ export interface PlSliderProps extends BaseSliderProps {
6
+ /** @default 'md' */
7
+ size?: PlassSize;
8
+ /** @default 'primary' */
9
+ color?: PlassColor;
10
+ /**
11
+ * Drop shadow depth of the **thumb**. `1`, like a PlButton: the thumb is the
12
+ * one part of a slider you press, and it rests on the sheet.
13
+ * @default 1
14
+ */
15
+ elevation?: PlassElevation;
16
+ /**
17
+ * Which way the slider runs. A vertical slider has no length of its own, so
18
+ * give it a height — the default `h-40` is a starting point, not a rule.
19
+ * @default 'horizontal'
20
+ */
21
+ orientation?: PlassOrientation;
22
+ /** The label above the track. */
23
+ label?: React.ReactNode;
24
+ /** Helper text below the track. */
25
+ description?: React.ReactNode;
26
+ /**
27
+ * Shows the current value beside the label. Pass a function to format it —
28
+ * the raw numbers and Base UI's already-localised strings are both handed in.
29
+ * @default false
30
+ */
31
+ showValue?: boolean | ((formatted: readonly string[], values: readonly number[]) => React.ReactNode);
32
+ /** Class names for the wrapper, not for the track. */
33
+ className?: string;
34
+ style?: React.CSSProperties;
35
+ }
36
+ /**
37
+ * A value chosen along a range.
38
+ *
39
+ * Pass an array to `value` or `defaultValue` and it becomes a range slider with
40
+ * one thumb per entry — there is no separate `range` prop, because the shape of
41
+ * the value already says which one this is.
42
+ */
43
+ export declare const PlSlider: React.ForwardRefExoticComponent<PlSliderProps & React.RefAttributes<HTMLDivElement>>;
44
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import*as s from"react";import{Slider as a}from"@base-ui/react/slider";import{controlSlots as r,focusRingClasses as o,metaTextClasses as t,transitionClasses as i}from"../../internal/styles.js";const n={xs:"h-1",sm:"h-1.5",md:"h-1.5",lg:"h-2",xl:"h-2.5"},c={xs:"w-1",sm:"w-1.5",md:"w-1.5",lg:"w-2",xl:"w-2.5"},d={xs:"size-3",sm:"size-3.5",md:"size-4.5",lg:"size-5",xl:"size-6"},m={xs:"h-4",sm:"h-4.5",md:"h-5",lg:"h-6",xl:"h-7"},u={xs:"w-4",sm:"w-4.5",md:"w-5",lg:"w-6",xl:"w-7"},f="rounded-full bg-(--plass-track)",h=`rounded-full [background-image:var(--p-fill)] ${i}`,p=/* @__PURE__ */["rounded-full border-2 [background-image:var(--p-fill)]","[border-color:var(--plass-surface)]","[box-shadow:var(--p-elev),var(--p-lift)]","cursor-grab select-none active:cursor-grabbing",i,"hover:[box-shadow:var(--p-elev-hover),var(--p-lift-hover),0_0_0_4px_var(--p-soft)]",o,"data-[dragging]:[box-shadow:var(--p-elev-press),var(--p-lift-press),0_0_0_6px_var(--p-soft-hover)]"].join(" ");export const PlSlider=/* @__PURE__ */s.forwardRef(function PlSlider({size:s="md",color:o="primary",elevation:i=1,orientation:x="horizontal",label:g,description:v,showValue:w=!1,disabled:b=!1,className:y,style:N,...j},$){const _="vertical"===x,z=j.value??j.defaultValue,k=Array.isArray(z)?z.length:1;return l(a.Root,{ref:$,orientation:x,disabled:b,className:["flex",_?"w-fit flex-col items-center gap-2":"w-full flex-col gap-1.5",b?"opacity-50 saturate-[0.35] [&_*]:cursor-not-allowed":"",y??""].filter(Boolean).join(" "),style:{...r(o,i,"solid"),...N},...j,children:[g||w?l("div",{className:`flex w-full items-baseline gap-2 ${t[s]}`,children:[g?e(a.Label,{className:"font-semibold text-(--plass-fg)",children:g}):null,w?e(a.Value,{className:"ms-auto tabular-nums text-(--plass-muted-fg)",children:"function"==typeof w?w:null}):null]}):null,e(a.Control,{className:["flex touch-none items-center justify-center select-none",_?`${u[s]} h-40 flex-col`:`w-full ${m[s]}`].join(" "),children:l(a.Track,{className:[f,_?`${c[s]} h-full`:`${n[s]} w-full`].join(" "),children:[e(a.Indicator,{className:h}),Array.from({length:k},(l,r)=>e(a.Thumb,{index:r,className:`${p} ${d[s]}`},r))]})}),v?e("div",{className:`${t[s]} text-(--plass-muted-fg)`,children:v}):null]})});
@@ -0,0 +1,2 @@
1
+ export { PlSlider } from './PlSlider.js';
2
+ export type { PlSliderProps } from './PlSlider.js';
@@ -0,0 +1 @@
1
+ export{PlSlider}from"./PlSlider.js";
@@ -0,0 +1,84 @@
1
+ import * as React from 'react';
2
+ import type { PlassColor, PlassDensity, PlassElevation, PlassSize, PlassVariant } from '../../types.js';
3
+ export interface PlSpoilerProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'onChange'> {
4
+ /** Whether the content is uncovered. Use with `onRevealedChange` for a controlled one. */
5
+ revealed?: boolean;
6
+ /** Where an uncontrolled spoiler starts. @default false */
7
+ defaultRevealed?: boolean;
8
+ onRevealedChange?: (revealed: boolean) => void;
9
+ /** The reveal button's label. @default 'Reveal' */
10
+ label?: React.ReactNode;
11
+ /** The hide button's label, when `reversible` is on. @default 'Hide' */
12
+ hideLabel?: React.ReactNode;
13
+ /**
14
+ * The line above the button, saying why the content is covered. Pass `false`
15
+ * for a cover with nothing written on it.
16
+ * @default 'This may contain spoilers'
17
+ */
18
+ description?: React.ReactNode | false;
19
+ /**
20
+ * Replaces the default reveal button entirely.
21
+ *
22
+ * The replacement is yours to wire up: pass `revealed` and `onRevealedChange`
23
+ * and drive it from your own control. `label` is the prop for the far
24
+ * commoner case of wanting different words on the button that is already
25
+ * there.
26
+ */
27
+ action?: React.ReactNode;
28
+ /**
29
+ * Keeps the content coverable: once revealed, a hide button appears under it.
30
+ * @default false
31
+ */
32
+ reversible?: boolean;
33
+ /**
34
+ * Clamps the covered box to this height — a CSS length, or a number in pixels.
35
+ * Revealing releases it and the content takes whatever height it needs.
36
+ *
37
+ * Left out, the box is exactly as tall as what it holds, which is the right
38
+ * default for a paragraph or a picture. Set it for something long enough that
39
+ * a page of blurred content would be a page of nothing.
40
+ */
41
+ maxHeight?: number | string;
42
+ /** How hard the content is blurred, in pixels. @default 10 */
43
+ blur?: number;
44
+ /**
45
+ * Inner padding around the content, on the sheet's `size` / `density` scale.
46
+ * Turn it off for something that should reach the edges — a picture, a video.
47
+ * @default true
48
+ */
49
+ padded?: boolean;
50
+ /**
51
+ * What the sheet is made of. `ghost` draws no box at all, which is what a
52
+ * spoiler sitting inside running prose usually wants.
53
+ * @default 'glass'
54
+ */
55
+ variant?: PlassVariant;
56
+ /** The sheet's radius, and the size of the button on it. @default 'md' */
57
+ size?: PlassSize;
58
+ /** @default 'primary' */
59
+ color?: PlassColor;
60
+ /** Padding around the cover's own text and button. @default 'default' */
61
+ density?: PlassDensity;
62
+ /** Drop shadow depth. `0` is the default and it is flat. @default 0 */
63
+ elevation?: PlassElevation;
64
+ /** What is being covered. */
65
+ children?: React.ReactNode;
66
+ }
67
+ /**
68
+ * Content that is covered until somebody asks for it.
69
+ *
70
+ * The cover is a **blur** rather than a `display: none`, which is the whole
71
+ * point: a reader can see that there is something there, roughly how much of it
72
+ * there is, and — with `maxHeight` — that it has been clamped. What they cannot
73
+ * do is read it by accident, which is the one thing a spoiler is for.
74
+ *
75
+ * While it is covered the content is `inert`, so it is not tabbable, not
76
+ * readable by a screen reader and not selectable by a drag across the page. A
77
+ * spoiler that could be defeated by <kbd>Ctrl</kbd>+<kbd>A</kbd> is not a
78
+ * spoiler.
79
+ *
80
+ * The sheet is never dyed, exactly as on a `PlCard`: what a spoiler holds is a
81
+ * photograph, a paragraph, a plot twist, and it arrives with its own colours.
82
+ * The family shows up on the button and in the hairline and stops there.
83
+ */
84
+ export declare const PlSpoiler: React.ForwardRefExoticComponent<PlSpoilerProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import*as a from"react";import{PlButton as r}from"../button/PlButton.js";import{cx as l,hasContent as s,metaTextClasses as t,radiusClasses as n,sheetPaddingXClasses as o,sheetPaddingYClasses as d,sheetRestClasses as c,surfaceSlots as m,transitionClasses as u}from"../../internal/styles.js";export const PlSpoiler=/* @__PURE__ */a.forwardRef(function PlSpoiler({revealed:p,defaultRevealed:f=!1,onRevealedChange:v,label:h="Reveal",hideLabel:x="Hide",description:g="This may contain spoilers",action:y,reversible:b=!1,maxHeight:j,blur:N=10,padded:w=!0,variant:k="glass",size:z="md",color:R="primary",density:_="default",elevation:C=0,className:H,style:P,children:S,...$},B){const I=a.useId(),[L,T]=a.useState(f),q=p??L,change=e=>{void 0===p&&T(e),v?.(e)},A=o[_][z],D=d[_][z],E=!1===g?null:g;return i("div",{ref:B,className:l("isolate grid overflow-hidden",n[z],c[k],u,H),style:{...m(R,C),...P},...$,children:[e("div",{id:I,className:l("min-w-0 [grid-area:1/1]",w?`${A} ${D}`:"","[transition:filter_var(--plass-duration-slow)_var(--plass-ease)]","motion-reduce:[transition-duration:0ms]",q?"":"select-none"),style:{filter:q?void 0:`blur(${N}px)`,maxHeight:q?void 0:j,overflow:q?void 0:"hidden"},inert:!q,children:S}),q?null:i("div",{className:l("z-10 flex flex-col items-center justify-center gap-2 text-center [grid-area:1/1]",A,D,"[background-color:color-mix(in_oklab,var(--plass-surface)_55%,transparent)]"),children:[s(E)?e("p",{className:l("m-0 text-(--plass-muted-fg)",t[z]),children:E}):null,y??e(r,{size:z,color:R,density:_,onClick:()=>change(!0),"aria-expanded":!1,"aria-controls":I,children:h})]}),q&&b?e("div",{className:l("flex justify-end",A,D,"pt-0"),children:e(r,{variant:"ghost",size:z,color:R,density:_,onClick:()=>change(!1),"aria-expanded":!0,"aria-controls":I,children:x})}):null]})});
@@ -0,0 +1,2 @@
1
+ export { PlSpoiler } from './PlSpoiler.js';
2
+ export type { PlSpoilerProps } from './PlSpoiler.js';
@@ -0,0 +1 @@
1
+ export{PlSpoiler}from"./PlSpoiler.js";
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import { Switch as BaseUISwitch } from '@base-ui/react/switch';
3
+ import type { PlassAlign, PlassColor, PlassSize } from '../../types.js';
4
+ /** Which side of the track the label sits on. */
5
+ export type PlSwitchLabelPlacement = Extract<PlassAlign, 'start' | 'end'>;
6
+ type BaseSwitchProps = Omit<React.ComponentPropsWithoutRef<typeof BaseUISwitch.Root>, 'className' | 'style' | 'render' | 'children'>;
7
+ export interface PlSwitchProps extends BaseSwitchProps {
8
+ /** @default 'md' */
9
+ size?: PlassSize;
10
+ /** @default 'primary' */
11
+ color?: PlassColor;
12
+ /** The text beside the track. Wired to it by Base UI's Field. */
13
+ label?: React.ReactNode;
14
+ /** Helper text under the label. */
15
+ description?: React.ReactNode;
16
+ /** Error message below. Its presence also turns the switch invalid. */
17
+ error?: React.ReactNode;
18
+ /**
19
+ * Forces the invalid state without a message — for when an external form
20
+ * library owns the validity. Defaults to whether `error` has content.
21
+ */
22
+ invalid?: boolean;
23
+ /**
24
+ * Which side the label sits on. `end` reads as a caption for the control;
25
+ * `start` is for a settings list, where the labels form a column and every
26
+ * switch lines up on the right.
27
+ * @default 'end'
28
+ */
29
+ labelPlacement?: PlSwitchLabelPlacement;
30
+ /** Class names for the field wrapper, not for the track. */
31
+ className?: string;
32
+ style?: React.CSSProperties;
33
+ }
34
+ /**
35
+ * An immediate on/off.
36
+ *
37
+ * The difference from a PlCheckbox is not visual, it is temporal: a checkbox is
38
+ * a value that gets submitted with a form, a switch takes effect the moment it
39
+ * moves. If there is a Save button underneath, it should have been a checkbox.
40
+ */
41
+ export declare const PlSwitch: React.ForwardRefExoticComponent<PlSwitchProps & React.RefAttributes<HTMLElement>>;
42
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as a,jsxs as e,Fragment as t}from"react/jsx-runtime";import*as l from"react";import{Switch as r}from"@base-ui/react/switch";import{Field as s}from"@base-ui/react/field";import{controlSlots as i,focusRingClasses as c,hasContent as n,metaTextClasses as o,tickRowTextClasses as d}from"../../internal/styles.js";const h={xs:"h-3.5 w-6",sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11",xl:"h-7 w-13"},m={xs:"data-[checked]:left-[calc(100%-0.75rem)]",sm:"data-[checked]:left-[calc(100%-0.875rem)]",md:"data-[checked]:left-[calc(100%-1.125rem)]",lg:"data-[checked]:left-[calc(100%-1.375rem)]",xl:"data-[checked]:left-[calc(100%-1.625rem)]"},p=/* @__PURE__ */["relative inline-flex shrink-0 rounded-full","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]","[transition-property:background-color,background-image,box-shadow,filter]","[transition-duration:var(--plass-duration)]","[transition-timing-function:var(--plass-ease)]",c].join(" "),f=/* @__PURE__ */["cursor-pointer bg-(--plass-track)","hover:brightness-[0.97] dark:hover:brightness-110","data-[checked]:[background-image:var(--p-fill)]","data-[checked]:[box-shadow:var(--p-lift)] data-[checked]:hover:brightness-105"].join(" "),u=/* @__PURE__ */["cursor-default bg-(--plass-track) saturate-[0.55]","data-[checked]:[background-image:var(--p-fill)]","data-[checked]:shadow-none"].join(" "),g=/* @__PURE__ */["cursor-not-allowed bg-(--plass-track)","opacity-50 saturate-[0.35] shadow-none","data-[checked]:[background-image:var(--p-fill)]"].join(" "),b=/* @__PURE__ */["absolute inset-y-0.5 left-0.5 aspect-square rounded-full bg-white","[box-shadow:0_1px_2px_rgb(20_40_90/0.25)]","[transition:left_var(--plass-duration)_var(--plass-ease)]"].join(" ");export const PlSwitch=/* @__PURE__ */l.forwardRef(function PlSwitch({size:l="md",color:c="primary",label:x,description:k,error:w,invalid:v,labelPlacement:j="end",disabled:N=!1,readOnly:y=!1,className:_,style:$,...P},R){const S=n(w),B=v??S,O=B?"danger":c,q=a("span",{className:"flex h-[1lh] shrink-0 items-center",children:a(r.Root,{ref:R,className:[p,h[l],N?g:y?u:f].join(" "),disabled:N,readOnly:y,...P,children:a(r.Thumb,{className:`${b} ${m[l]}`})})}),z=x||k?e("span",{className:["flex min-w-0 flex-col gap-0.5","start"===j?"flex-1":""].filter(Boolean).join(" "),children:[x?a(s.Label,{className:N?"text-(--plass-muted-fg)":"cursor-pointer text-(--plass-fg)",children:x}):null,k?a(s.Description,{className:`${o[l]} text-(--plass-muted-fg)`,children:k}):null]}):null;return e(s.Root,{disabled:N,invalid:B,className:["inline-flex flex-col gap-1 align-top",_??""].filter(Boolean).join(" "),style:{...i(O,0,"solid"),...$},children:[a("div",{className:`flex items-start gap-2.5 ${d[l]}`,children:e(t,"start"===j?{children:[z,q]}:{children:[q,z]})}),S?a(s.Error,{match:!0,className:`${o[l]} text-(--p-accent)`,children:w}):null]})});
@@ -0,0 +1,2 @@
1
+ export { PlSwitch } from './PlSwitch.js';
2
+ export type { PlSwitchLabelPlacement, PlSwitchProps } from './PlSwitch.js';
@@ -0,0 +1 @@
1
+ export{PlSwitch}from"./PlSwitch.js";
@@ -0,0 +1,112 @@
1
+ import * as React from 'react';
2
+ import type { PlassAlign, PlassElevation, PlassStyleProps } from '../../types.js';
3
+ /** Which edge the text in a column lines up against. */
4
+ export type PlTableAlign = PlassAlign;
5
+ /**
6
+ * A column: its heading, its default width, and how to get a cell out of a row.
7
+ *
8
+ * This is the whole reason a table takes data rather than markup. A `<td>`
9
+ * written out per row can silently disagree with the `<th>` above it about how
10
+ * many there are or what order they come in; a column list cannot.
11
+ */
12
+ export interface PlTableColumn<Row> {
13
+ /**
14
+ * Identifies the column, and — unless `render` says otherwise — names the
15
+ * property to read off each row.
16
+ */
17
+ key: string;
18
+ /** The heading. Defaults to the `key`, which is usually not what you want. */
19
+ header?: React.ReactNode;
20
+ /**
21
+ * The column's default width. A number is pixels; a string is any CSS length
22
+ * (`'30%'`, `'12rem'`).
23
+ *
24
+ * "Default" is meant: the table still balances its columns to fill the sheet,
25
+ * so this is a starting proportion rather than a guarantee.
26
+ */
27
+ width?: number | string;
28
+ /**
29
+ * Text alignment. Numbers usually want `end` so their digits line up in a
30
+ * column; everything else wants `start`.
31
+ * @default 'start'
32
+ */
33
+ align?: PlTableAlign;
34
+ /**
35
+ * Renders the cell. Without it the cell is `row[key]` rendered as-is, which
36
+ * covers strings and numbers and nothing else.
37
+ */
38
+ render?: (row: Row, index: number) => React.ReactNode;
39
+ }
40
+ export interface PlTableProps<Row> extends PlassStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
41
+ /**
42
+ * Drop shadow depth. `0` is the default — a table is a grid set into the page
43
+ * rather than a panel floating over it.
44
+ * @default 0
45
+ */
46
+ elevation?: PlassElevation;
47
+ /** The columns, in the order they appear. */
48
+ columns: readonly PlTableColumn<Row>[];
49
+ /** The rows. */
50
+ rows: readonly Row[];
51
+ /**
52
+ * A stable key per row. Defaults to the row's index, which is fine for a
53
+ * static table and wrong for one that sorts or filters.
54
+ */
55
+ getRowKey?: (row: Row, index: number) => React.Key;
56
+ /** Shown above the grid, and read out as the table's accessible name. */
57
+ caption?: React.ReactNode;
58
+ /**
59
+ * What to show instead of rows when `rows` is empty.
60
+ * @default 'No data'
61
+ */
62
+ empty?: React.ReactNode;
63
+ /**
64
+ * Tints every other row. Useful on a wide table where the eye has to track
65
+ * across; noise on a narrow one.
66
+ * @default false
67
+ */
68
+ striped?: boolean;
69
+ /** Lights the row under the pointer. @default false */
70
+ hoverable?: boolean;
71
+ /**
72
+ * Pins the header while the rows scroll under it.
73
+ *
74
+ * It needs something to scroll *in*: a `position: sticky` header in a box
75
+ * that is as tall as its content has nowhere to stick, so this does nothing
76
+ * on its own. `maxHeight` is the usual answer and the two are made for each
77
+ * other; a table inside a pane that already caps its own height works just as
78
+ * well.
79
+ * @default false
80
+ */
81
+ stickyHeader?: boolean;
82
+ /**
83
+ * A hard cap on the grid's height. A number is pixels; a string is any CSS
84
+ * length (`'24rem'`, `'60vh'`).
85
+ *
86
+ * Past it the rows scroll inside the sheet rather than the page growing, and
87
+ * the sheet keeps the size the layout around it was drawn for. It is the
88
+ * other half of `stickyHeader`: capped without pinning, the column names
89
+ * scroll away and the rest of the table is a grid of unlabelled numbers.
90
+ *
91
+ * The **grid** and not the sheet: a `caption` sits above the rows and outside
92
+ * what is capped, because a caption that scrolled away would take the table's
93
+ * accessible name with it.
94
+ */
95
+ maxHeight?: number | string;
96
+ /** Makes rows activatable. Also turns on the hover treatment. */
97
+ onRowClick?: (row: Row, index: number) => void;
98
+ }
99
+ /**
100
+ * A grid of data on a sheet of glass.
101
+ *
102
+ * The sheet is the ordinary Plass container — `variant`, `size`, `color`,
103
+ * `density` and `elevation` all mean what they mean everywhere else, and it is
104
+ * never dyed. What the table adds is the part that is genuinely tabular: the
105
+ * columns, the rows, and the fact that the two cannot drift apart.
106
+ *
107
+ * Not a `forwardRef`, because it is generic: a component wrapped in
108
+ * `React.forwardRef` loses its type parameter, and `Row` is the whole point of
109
+ * the API. `ref` is not offered rather than being offered with `Row` widened to
110
+ * `any`.
111
+ */
112
+ export declare function PlTable<Row>({ variant, size, color, density, elevation, columns, rows, getRowKey, caption, empty, striped, hoverable, stickyHeader, maxHeight, onRowClick, className, style, ...props }: PlTableProps<Row>): React.JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as a from"react";import{controlTextLeadingClasses as t,focusRingInsetClasses as l,metaTextClasses as o,paddingXValues as s,radiusClasses as i,sheetRestClasses as n,surfaceSlots as d}from"../../internal/styles.js";const c={default:{xs:"0.375rem",sm:"0.5rem",md:"0.75rem",lg:"0.875rem",xl:"1rem"},compact:{xs:"0.125rem",sm:"0.25rem",md:"0.4375rem",lg:"0.5625rem",xl:"0.6875rem"}},p={display:"table",width:"100%",margin:0,borderCollapse:"collapse",borderSpacing:0},m=/* @__PURE__ */["[--p-row:transparent]","[transition:background-color_var(--plass-duration)_var(--plass-ease)]"].join(" "),g=/* @__PURE__ */["cursor-pointer [outline:none]",l].join(" "),v="1px solid var(--plass-divider)";export function PlTable({variant:l="glass",size:h="md",color:y="primary",density:u="default",elevation:x=0,columns:b,rows:f,getRowKey:w,caption:k,empty:j="No data",striped:N=!1,hoverable:B=!1,stickyHeader:$=!1,maxHeight:A,onRowClick:C,className:H,style:S,...T}){const z=s[u][h],D=c[u][h],I=Boolean(C),K=B||I,R=void 0!==A,_=a.useId(),E={padding:`${D} ${z}`,border:0,background:"none"},P={...E,...$?{boxShadow:"inset 0 -1px 0 var(--plass-border)"}:{borderBottom:"1px solid var(--plass-border)"},...$?{background:"linear-gradient(var(--plass-glass-press), var(--plass-glass-press)), linear-gradient(var(--plass-surface), var(--plass-surface))"}:null},bodyCellStyle=e=>0===e?E:{...E,borderTop:v};return r("div",{className:["overflow-hidden",i[h],n[l],H??""].filter(Boolean).join(" "),style:{...d(y,x),...S},...T,children:[k?e("div",{id:_,className:`${o[h]} font-semibold text-(--plass-muted-fg)`,style:{...E,borderBottom:v,textAlign:"start"},children:k}):null,e("div",{className:["overflow-x-auto",R?"overflow-y-auto overscroll-contain":""].filter(Boolean).join(" "),style:R?{maxHeight:A}:void 0,children:r("table",{"aria-labelledby":k?_:void 0,className:`text-start ${t[h]} text-(--plass-fg)`,style:p,children:[e("colgroup",{children:b.map(r=>e("col",{style:void 0===r.width?void 0:{width:"number"==typeof r.width?`${r.width}px`:r.width}},r.key))}),e("thead",{children:e("tr",{children:b.map(r=>e("th",{scope:"col",className:["font-semibold whitespace-nowrap text-(--plass-muted-fg)",$?"sticky top-0 z-10":""].filter(Boolean).join(" "),style:{...P,textAlign:r.align??"start"},children:r.header??r.key},r.key))})}),e("tbody",{children:0===f.length?e("tr",{className:m,children:e("td",{colSpan:b.length,className:"text-(--plass-muted-fg)",style:{...E,padding:`2rem ${z}`,textAlign:"center"},children:j})}):f.map((r,a)=>e("tr",{className:[m,N&&a%2==1?"[--p-row:var(--plass-stripe)]":"",K?"hover:[--p-row:var(--p-soft)]":"",I?g:""].filter(Boolean).join(" "),style:{backgroundColor:"var(--p-row)"},tabIndex:I?0:void 0,onClick:C?()=>C(r,a):void 0,onKeyDown:C?e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),C(r,a)))}:void 0,children:b.map(t=>e("td",{style:{...bodyCellStyle(a),textAlign:t.align??"start"},children:t.render?t.render(r,a):r[t.key]},t.key))},w?w(r,a):a))})]})})]})}
@@ -0,0 +1,2 @@
1
+ export { PlTable } from './PlTable.js';
2
+ export type { PlTableAlign, PlTableColumn, PlTableProps } from './PlTable.js';
@@ -0,0 +1 @@
1
+ export{PlTable}from"./PlTable.js";
@@ -0,0 +1,94 @@
1
+ import * as React from 'react';
2
+ import type { PlassOrientation, PlassStyleProps, PlassVariant } from '../../types.js';
3
+ /** A tab's value. The same restraint `PlSelect` puts on its own — an identifier. */
4
+ export type PlTabValue = string | number;
5
+ export interface PlTabsProps extends Omit<PlassStyleProps, 'variant'>, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'defaultValue' | 'onChange'> {
6
+ /**
7
+ * What the tab *bar* is made of, not the panels under it.
8
+ *
9
+ * - `solid` — a groove cut into the sheet with a clear pane riding in it, the
10
+ * way a segmented control works. (The tile is deliberately *not* the
11
+ * gradient: that is what a `PlSegmentedButton` is, and a screen with both
12
+ * should be able to tell them apart.)
13
+ * - `glass` — the classic: a rule along the edge of the bar with the indicator
14
+ * riding on it. The default.
15
+ * - `ghost` — the same bar with the rule taken away, for tabs inside a PlCard
16
+ * that already has an edge of its own.
17
+ * @default 'glass'
18
+ */
19
+ variant?: PlassVariant;
20
+ /** The chosen tab. Use with `onValueChange` for a controlled set. */
21
+ value?: PlTabValue | null;
22
+ /** Which starts chosen, for an uncontrolled set. */
23
+ defaultValue?: PlTabValue | null;
24
+ onValueChange?: (value: PlTabValue | null) => void;
25
+ /**
26
+ * Which way the bar runs. `vertical` puts the tabs down the side and the panel
27
+ * beside them, and moves the arrow keys onto the other axis — which is Base
28
+ * UI's doing, and is what makes a vertical tab bar reachable.
29
+ * @default 'horizontal'
30
+ */
31
+ orientation?: PlassOrientation;
32
+ /**
33
+ * Whether moving the arrow keys also chooses the tab it lands on.
34
+ *
35
+ * `false` by default. Automatic activation is only kind when every panel is
36
+ * already on the page; the moment one of them fetches, walking past four tabs
37
+ * fires four requests.
38
+ * @default false
39
+ */
40
+ activateOnFocus?: boolean;
41
+ /**
42
+ * Whether the arrow keys wrap from the last tab back to the first.
43
+ * @default true
44
+ */
45
+ loopFocus?: boolean;
46
+ /** The tabs share the bar's full width, each taking an equal part of it. */
47
+ fullWidth?: boolean;
48
+ children?: React.ReactNode;
49
+ }
50
+ export interface PlTabProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'value' | 'color'> {
51
+ /** Identifies the tab, and picks out the panel with the same value. */
52
+ value: PlTabValue;
53
+ /** Content before the label. Sized in `em`, so it tracks the label. */
54
+ startIcon?: React.ReactNode;
55
+ /** Content after the label — a count, a status dot. */
56
+ endIcon?: React.ReactNode;
57
+ /** Unavailable, but still listed. */
58
+ disabled?: boolean;
59
+ children?: React.ReactNode;
60
+ }
61
+ export interface PlTabPanelProps extends React.ComponentPropsWithoutRef<'div'> {
62
+ /** Which tab shows this panel. */
63
+ value: PlTabValue;
64
+ /**
65
+ * Keeps the panel in the DOM while it is hidden. For a panel that is expensive
66
+ * to build, or that holds form state which should survive being switched away
67
+ * from.
68
+ * @default false
69
+ */
70
+ keepMounted?: boolean;
71
+ children?: React.ReactNode;
72
+ }
73
+ /**
74
+ * One tab, and one place a tab differs from a PlButton: `solid` puts the tile
75
+ * *behind* the tab rather than on it, so the tab needs a stacking context of its
76
+ * own or the indicator would cover the label it is meant to be under.
77
+ */
78
+ export declare const PlTab: React.ForwardRefExoticComponent<PlTabProps & React.RefAttributes<HTMLButtonElement>>;
79
+ /** The content behind one tab. */
80
+ export declare const PlTabPanel: React.ForwardRefExoticComponent<PlTabPanelProps & React.RefAttributes<HTMLDivElement>>;
81
+ /**
82
+ * One set of panels, one of which is shown.
83
+ *
84
+ * Base UI owns everything that makes a tab bar a tab bar rather than a row of
85
+ * buttons: roving focus so the whole bar is one tab stop, the arrow keys on
86
+ * whichever axis the bar runs, Home and End, the `tab` / `tabpanel` roles and
87
+ * the `aria-controls` wiring between them, and the measurement that puts the
88
+ * indicator under the chosen tab. What is here is the surface and the ladders.
89
+ *
90
+ * The tabs and the panels are composed rather than passed as data, unlike
91
+ * `PlSelect` — because a panel is a subtree, and there is no useful shape for
92
+ * "an array of arbitrary React trees" that is not just children.
93
+ */
94
+ export declare const PlTabs: React.ForwardRefExoticComponent<PlTabsProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Tabs as l}from"@base-ui/react/tabs";import{controlHeightClasses as o,controlTextClasses as s,focusRingClasses as i,focusRingInsetClasses as n,gapClasses as r,glassClasses as c,hasContent as d,iconClasses as h,paddingXClasses as f,radiusClasses as u,surfaceSlots as p,transitionClasses as b}from"../../internal/styles.js";const v=/* @__PURE__ */a.createContext({variant:"glass",size:"md",density:"default",orientation:"horizontal",fullWidth:!1}),m={solid:{horizontal:`${c} inline-flex bg-(--plass-glass) p-1 [box-shadow:var(--plass-well)]`,vertical:`${c} inline-flex flex-col bg-(--plass-glass) p-1 [box-shadow:var(--plass-well)]`},glass:{horizontal:"flex border-b [border-color:var(--plass-border)]",vertical:"flex flex-col border-e [border-color:var(--plass-border)]"},ghost:{horizontal:"flex",vertical:"flex flex-col"}},x={solid:{horizontal:"absolute top-(--active-tab-top) left-(--active-tab-left) h-(--active-tab-height) w-(--active-tab-width)",vertical:"absolute top-(--active-tab-top) left-(--active-tab-left) h-(--active-tab-height) w-(--active-tab-width)"},glass:{horizontal:"absolute bottom-0 left-(--active-tab-left) h-0.5 w-(--active-tab-width)",vertical:"absolute end-0 top-(--active-tab-top) h-(--active-tab-height) w-0.5"},ghost:{horizontal:"absolute bottom-0 left-(--active-tab-left) h-0.5 w-(--active-tab-width)",vertical:"absolute end-0 top-(--active-tab-top) h-(--active-tab-height) w-0.5"}},g={solid:`${c} bg-(--plass-glass-press) [box-shadow:var(--plass-shadow-1),var(--plass-gloss-glass)]`,glass:"bg-(--p-accent)",ghost:"bg-(--p-accent)"},w="text-(--plass-muted-fg) hover:text-(--plass-fg) data-[active]:text-(--p-accent)";export const PlTab=/* @__PURE__ */a.forwardRef(function PlTab({value:i,startIcon:c,endIcon:p,disabled:m=!1,className:x,children:g,...z},y){const{variant:P,size:j,density:N,fullWidth:T}=a.useContext(v);return t(l.Tab,{ref:y,value:i,disabled:m,className:["relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center select-none","font-semibold whitespace-nowrap","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",o[j],s[j],r[j],f[N][j],"solid"===P?u[j]:"",b,h,w,n,"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",T?"flex-1":"",x??""].filter(Boolean).join(" "),...z,children:[d(c)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:c}):null,g,d(p)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:p}):null]})});export const PlTabPanel=/* @__PURE__ */a.forwardRef(function PlTabPanel({value:t,keepMounted:o=!1,className:s,children:n,...r},c){const{size:d}=a.useContext(v);return e(l.Panel,{ref:c,value:t,keepMounted:o,className:["min-w-0 flex-1 text-(--plass-fg)",i,u[d],s??""].filter(Boolean).join(" "),...r,children:n})});export const PlTabs=/* @__PURE__ */a.forwardRef(function PlTabs({variant:o="glass",size:s="md",color:i="primary",density:n="default",value:r,defaultValue:c,onValueChange:d,orientation:h="horizontal",activateOnFocus:f=!1,loopFocus:b=!0,fullWidth:w=!1,className:z,style:y,children:P,...j},N){const T=a.useMemo(()=>({variant:o,size:s,density:n,orientation:h,fullWidth:w}),[o,s,n,h,w]),k=[],C=[];return a.Children.forEach(P,e=>{a.isValidElement(e)&&e.type===PlTabPanel?C.push(e):null!=e&&!1!==e&&k.push(e)}),e(v.Provider,{value:T,children:t(l.Root,{ref:N,value:r,defaultValue:c,onValueChange:e=>d?.(e),orientation:h,className:["flex min-w-0","vertical"===h?"flex-row gap-4":"flex-col gap-4",z??""].filter(Boolean).join(" "),style:{...p(i,0),...y},...j,children:[t(l.List,{activateOnFocus:f,loopFocus:b,className:["relative shrink-0",m[o][h],"solid"===o?u[s]:"",w&&"horizontal"===h?"w-full":"","horizontal"===h?"overflow-x-auto overflow-y-hidden":""].filter(Boolean).join(" "),children:[k,e(l.Indicator,{className:["pointer-events-none",x[o][h],g[o],"solid"===o?u[s]:"rounded-full","[transition-property:left,top,width,height]","[transition-duration:var(--plass-duration)]","[transition-timing-function:var(--plass-ease)]"].join(" ")})]}),C]})})});