@windmorph/react 0.0.0-stage → 0.1.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 (761) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +23 -0
  3. package/README.md +149 -2
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +112 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/components/app-bar/AppBarItems.js +23 -0
  8. package/dist/components/app-bar/AppBarItems.js.map +1 -0
  9. package/dist/components/app-bar/TopAppBar.d.ts +89 -0
  10. package/dist/components/app-bar/TopAppBar.js +103 -0
  11. package/dist/components/app-bar/TopAppBar.js.map +1 -0
  12. package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
  13. package/dist/components/app-bar/app-bar-styles.js +142 -0
  14. package/dist/components/app-bar/app-bar-styles.js.map +1 -0
  15. package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
  16. package/dist/components/app-bar/app-bar-tokens.js +64 -0
  17. package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
  18. package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
  19. package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
  20. package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
  21. package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
  22. package/dist/components/autocomplete/Autocomplete.js +284 -0
  23. package/dist/components/autocomplete/Autocomplete.js.map +1 -0
  24. package/dist/components/badge/Badge.d.ts +71 -0
  25. package/dist/components/badge/Badge.js +72 -0
  26. package/dist/components/badge/Badge.js.map +1 -0
  27. package/dist/components/badge/badge-styles.d.ts +100 -0
  28. package/dist/components/badge/badge-styles.js +43 -0
  29. package/dist/components/badge/badge-styles.js.map +1 -0
  30. package/dist/components/badge/badge-tokens.d.ts +7 -0
  31. package/dist/components/badge/badge-tokens.js +40 -0
  32. package/dist/components/badge/badge-tokens.js.map +1 -0
  33. package/dist/components/button/Button.d.ts +91 -0
  34. package/dist/components/button/Button.js +96 -0
  35. package/dist/components/button/Button.js.map +1 -0
  36. package/dist/components/button/ButtonContext.d.ts +30 -0
  37. package/dist/components/button/ButtonContext.js +18 -0
  38. package/dist/components/button/ButtonContext.js.map +1 -0
  39. package/dist/components/button/DensityZeroButtons.js +25 -0
  40. package/dist/components/button/DensityZeroButtons.js.map +1 -0
  41. package/dist/components/button/button-pending.d.ts +10 -0
  42. package/dist/components/button/button-pending.js +166 -0
  43. package/dist/components/button/button-pending.js.map +1 -0
  44. package/dist/components/button/button-styles.d.ts +216 -0
  45. package/dist/components/button/button-styles.js +199 -0
  46. package/dist/components/button/button-styles.js.map +1 -0
  47. package/dist/components/button/button-tokens.d.ts +10 -0
  48. package/dist/components/button/button-tokens.js +257 -0
  49. package/dist/components/button/button-tokens.js.map +1 -0
  50. package/dist/components/button/connected-shapes.js +152 -0
  51. package/dist/components/button/connected-shapes.js.map +1 -0
  52. package/dist/components/card/Card.d.ts +60 -0
  53. package/dist/components/card/Card.js +69 -0
  54. package/dist/components/card/Card.js.map +1 -0
  55. package/dist/components/card/card-styles.d.ts +42 -0
  56. package/dist/components/card/card-styles.js +64 -0
  57. package/dist/components/card/card-styles.js.map +1 -0
  58. package/dist/components/card/card-tokens.d.ts +7 -0
  59. package/dist/components/card/card-tokens.js +84 -0
  60. package/dist/components/card/card-tokens.js.map +1 -0
  61. package/dist/components/carousel/Carousel.d.ts +124 -0
  62. package/dist/components/carousel/Carousel.js +387 -0
  63. package/dist/components/carousel/Carousel.js.map +1 -0
  64. package/dist/components/carousel/carousel-keylines.js +486 -0
  65. package/dist/components/carousel/carousel-keylines.js.map +1 -0
  66. package/dist/components/carousel/carousel-press-area.js +35 -0
  67. package/dist/components/carousel/carousel-press-area.js.map +1 -0
  68. package/dist/components/carousel/carousel-styles.d.ts +188 -0
  69. package/dist/components/carousel/carousel-styles.js +116 -0
  70. package/dist/components/carousel/carousel-styles.js.map +1 -0
  71. package/dist/components/carousel/carousel-tokens.d.ts +7 -0
  72. package/dist/components/carousel/carousel-tokens.js +18 -0
  73. package/dist/components/carousel/carousel-tokens.js.map +1 -0
  74. package/dist/components/checkbox/Checkbox.d.ts +78 -0
  75. package/dist/components/checkbox/Checkbox.js +77 -0
  76. package/dist/components/checkbox/Checkbox.js.map +1 -0
  77. package/dist/components/checkbox/checkbox-box.js +34 -0
  78. package/dist/components/checkbox/checkbox-box.js.map +1 -0
  79. package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
  80. package/dist/components/checkbox/checkbox-styles.js +54 -0
  81. package/dist/components/checkbox/checkbox-styles.js.map +1 -0
  82. package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
  83. package/dist/components/checkbox/checkbox-tokens.js +41 -0
  84. package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
  85. package/dist/components/chip/Chip.d.ts +171 -0
  86. package/dist/components/chip/Chip.js +348 -0
  87. package/dist/components/chip/Chip.js.map +1 -0
  88. package/dist/components/chip/ChipSet.d.ts +70 -0
  89. package/dist/components/chip/ChipSet.js +198 -0
  90. package/dist/components/chip/ChipSet.js.map +1 -0
  91. package/dist/components/chip/chip-styles.d.ts +263 -0
  92. package/dist/components/chip/chip-styles.js +360 -0
  93. package/dist/components/chip/chip-styles.js.map +1 -0
  94. package/dist/components/chip/chip-tokens.d.ts +13 -0
  95. package/dist/components/chip/chip-tokens.js +185 -0
  96. package/dist/components/chip/chip-tokens.js.map +1 -0
  97. package/dist/components/date-picker/CalendarGrid.js +94 -0
  98. package/dist/components/date-picker/CalendarGrid.js.map +1 -0
  99. package/dist/components/date-picker/CompactDateDialog.js +63 -0
  100. package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
  101. package/dist/components/date-picker/DateField.d.ts +161 -0
  102. package/dist/components/date-picker/DateField.js +393 -0
  103. package/dist/components/date-picker/DateField.js.map +1 -0
  104. package/dist/components/date-picker/DateInput.d.ts +20 -0
  105. package/dist/components/date-picker/DateInput.js +99 -0
  106. package/dist/components/date-picker/DateInput.js.map +1 -0
  107. package/dist/components/date-picker/DatePicker.d.ts +165 -0
  108. package/dist/components/date-picker/DatePicker.js +492 -0
  109. package/dist/components/date-picker/DatePicker.js.map +1 -0
  110. package/dist/components/date-picker/PickerDialog.d.ts +121 -0
  111. package/dist/components/date-picker/PickerDialog.js +161 -0
  112. package/dist/components/date-picker/PickerDialog.js.map +1 -0
  113. package/dist/components/date-picker/calendar-parts.js +141 -0
  114. package/dist/components/date-picker/calendar-parts.js.map +1 -0
  115. package/dist/components/date-picker/date-format.js +72 -0
  116. package/dist/components/date-picker/date-format.js.map +1 -0
  117. package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
  118. package/dist/components/date-picker/date-picker-styles.js +163 -0
  119. package/dist/components/date-picker/date-picker-styles.js.map +1 -0
  120. package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
  121. package/dist/components/date-picker/date-picker-tokens.js +104 -0
  122. package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
  123. package/dist/components/date-picker/picker-dialog-context.js +8 -0
  124. package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
  125. package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
  126. package/dist/components/date-picker/picker-dialog-styles.js +57 -0
  127. package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
  128. package/dist/components/date-picker/picker-icons.js +24 -0
  129. package/dist/components/date-picker/picker-icons.js.map +1 -0
  130. package/dist/components/date-picker/use-media-query.js +21 -0
  131. package/dist/components/date-picker/use-media-query.js.map +1 -0
  132. package/dist/components/date-picker/use-size-transform.js +62 -0
  133. package/dist/components/date-picker/use-size-transform.js.map +1 -0
  134. package/dist/components/date-picker/use-view-exit.js +68 -0
  135. package/dist/components/date-picker/use-view-exit.js.map +1 -0
  136. package/dist/components/dialog/Dialog.d.ts +267 -0
  137. package/dist/components/dialog/Dialog.js +521 -0
  138. package/dist/components/dialog/Dialog.js.map +1 -0
  139. package/dist/components/dialog/dialog-styles.d.ts +335 -0
  140. package/dist/components/dialog/dialog-styles.js +377 -0
  141. package/dist/components/dialog/dialog-styles.js.map +1 -0
  142. package/dist/components/dialog/dialog-tokens.d.ts +7 -0
  143. package/dist/components/dialog/dialog-tokens.js +57 -0
  144. package/dist/components/dialog/dialog-tokens.js.map +1 -0
  145. package/dist/components/divider/Divider.d.ts +59 -0
  146. package/dist/components/divider/Divider.js +53 -0
  147. package/dist/components/divider/Divider.js.map +1 -0
  148. package/dist/components/divider/divider-styles.d.ts +90 -0
  149. package/dist/components/divider/divider-styles.js +66 -0
  150. package/dist/components/divider/divider-styles.js.map +1 -0
  151. package/dist/components/divider/divider-tokens.d.ts +7 -0
  152. package/dist/components/divider/divider-tokens.js +16 -0
  153. package/dist/components/divider/divider-tokens.js.map +1 -0
  154. package/dist/components/fab/Fab.d.ts +130 -0
  155. package/dist/components/fab/Fab.js +137 -0
  156. package/dist/components/fab/Fab.js.map +1 -0
  157. package/dist/components/fab/FabTooltip.js +36 -0
  158. package/dist/components/fab/FabTooltip.js.map +1 -0
  159. package/dist/components/fab/fab-styles.d.ts +286 -0
  160. package/dist/components/fab/fab-styles.js +131 -0
  161. package/dist/components/fab/fab-styles.js.map +1 -0
  162. package/dist/components/fab/fab-tokens.d.ts +12 -0
  163. package/dist/components/fab/fab-tokens.js +105 -0
  164. package/dist/components/fab/fab-tokens.js.map +1 -0
  165. package/dist/components/fab-menu/FabMenu.d.ts +156 -0
  166. package/dist/components/fab-menu/FabMenu.js +291 -0
  167. package/dist/components/fab-menu/FabMenu.js.map +1 -0
  168. package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
  169. package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
  170. package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
  171. package/dist/components/fab-menu/fab-menu-styles.js +107 -0
  172. package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
  173. package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
  174. package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
  175. package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
  176. package/dist/components/icon-button/IconButton.d.ts +125 -0
  177. package/dist/components/icon-button/IconButton.js +112 -0
  178. package/dist/components/icon-button/IconButton.js.map +1 -0
  179. package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
  180. package/dist/components/icon-button/icon-button-styles.js +244 -0
  181. package/dist/components/icon-button/icon-button-styles.js.map +1 -0
  182. package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
  183. package/dist/components/icon-button/icon-button-tokens.js +215 -0
  184. package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
  185. package/dist/components/list/List.d.ts +265 -0
  186. package/dist/components/list/List.js +1386 -0
  187. package/dist/components/list/List.js.map +1 -0
  188. package/dist/components/list/ListMedia.d.ts +88 -0
  189. package/dist/components/list/ListMedia.js +132 -0
  190. package/dist/components/list/ListMedia.js.map +1 -0
  191. package/dist/components/list/list-styles.d.ts +375 -0
  192. package/dist/components/list/list-styles.js +220 -0
  193. package/dist/components/list/list-styles.js.map +1 -0
  194. package/dist/components/list/list-tokens.d.ts +7 -0
  195. package/dist/components/list/list-tokens.js +92 -0
  196. package/dist/components/list/list-tokens.js.map +1 -0
  197. package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
  198. package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
  199. package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
  200. package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
  201. package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
  202. package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
  203. package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
  204. package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
  205. package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
  206. package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
  207. package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
  208. package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
  209. package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
  210. package/dist/components/menu/Menu.d.ts +215 -0
  211. package/dist/components/menu/Menu.js +715 -0
  212. package/dist/components/menu/Menu.js.map +1 -0
  213. package/dist/components/menu/menu-styles.d.ts +354 -0
  214. package/dist/components/menu/menu-styles.js +219 -0
  215. package/dist/components/menu/menu-styles.js.map +1 -0
  216. package/dist/components/menu/menu-tokens.d.ts +7 -0
  217. package/dist/components/menu/menu-tokens.js +93 -0
  218. package/dist/components/menu/menu-tokens.js.map +1 -0
  219. package/dist/components/menu/menu-trigger.d.ts +51 -0
  220. package/dist/components/menu/menu-trigger.js +100 -0
  221. package/dist/components/menu/menu-trigger.js.map +1 -0
  222. package/dist/components/menu/use-reveal-entering.js +42 -0
  223. package/dist/components/menu/use-reveal-entering.js.map +1 -0
  224. package/dist/components/navigation/NavItem.d.ts +54 -0
  225. package/dist/components/navigation/NavItem.js +182 -0
  226. package/dist/components/navigation/NavItem.js.map +1 -0
  227. package/dist/components/navigation/NavigationBar.d.ts +64 -0
  228. package/dist/components/navigation/NavigationBar.js +121 -0
  229. package/dist/components/navigation/NavigationBar.js.map +1 -0
  230. package/dist/components/navigation/NavigationRail.d.ts +91 -0
  231. package/dist/components/navigation/NavigationRail.js +285 -0
  232. package/dist/components/navigation/NavigationRail.js.map +1 -0
  233. package/dist/components/navigation/nav-item-styles.d.ts +190 -0
  234. package/dist/components/navigation/nav-item-styles.js +123 -0
  235. package/dist/components/navigation/nav-item-styles.js.map +1 -0
  236. package/dist/components/navigation/navigation-styles.d.ts +239 -0
  237. package/dist/components/navigation/navigation-styles.js +134 -0
  238. package/dist/components/navigation/navigation-styles.js.map +1 -0
  239. package/dist/components/navigation/navigation-tokens.d.ts +9 -0
  240. package/dist/components/navigation/navigation-tokens.js +114 -0
  241. package/dist/components/navigation/navigation-tokens.js.map +1 -0
  242. package/dist/components/navigation/use-hide-on-scroll.js +115 -0
  243. package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
  244. package/dist/components/navigation/use-item-arrow-keys.js +37 -0
  245. package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
  246. package/dist/components/navigation/use-rail-item-morph.js +61 -0
  247. package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
  248. package/dist/components/progress/ProgressIndicator.d.ts +95 -0
  249. package/dist/components/progress/ProgressIndicator.js +426 -0
  250. package/dist/components/progress/ProgressIndicator.js.map +1 -0
  251. package/dist/components/progress/progress-geometry.js +285 -0
  252. package/dist/components/progress/progress-geometry.js.map +1 -0
  253. package/dist/components/progress/progress-styles.d.ts +81 -0
  254. package/dist/components/progress/progress-styles.js +43 -0
  255. package/dist/components/progress/progress-styles.js.map +1 -0
  256. package/dist/components/progress/progress-tokens.d.ts +7 -0
  257. package/dist/components/progress/progress-tokens.js +39 -0
  258. package/dist/components/progress/progress-tokens.js.map +1 -0
  259. package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
  260. package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
  261. package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
  262. package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
  263. package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
  264. package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
  265. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
  266. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
  267. package/dist/components/radio/RadioGroup.d.ts +121 -0
  268. package/dist/components/radio/RadioGroup.js +163 -0
  269. package/dist/components/radio/RadioGroup.js.map +1 -0
  270. package/dist/components/radio/radio-ring.js +21 -0
  271. package/dist/components/radio/radio-ring.js.map +1 -0
  272. package/dist/components/radio/radio-styles.d.ts +155 -0
  273. package/dist/components/radio/radio-styles.js +60 -0
  274. package/dist/components/radio/radio-styles.js.map +1 -0
  275. package/dist/components/radio/radio-tokens.d.ts +7 -0
  276. package/dist/components/radio/radio-tokens.js +31 -0
  277. package/dist/components/radio/radio-tokens.js.map +1 -0
  278. package/dist/components/search/SearchAppBar.d.ts +45 -0
  279. package/dist/components/search/SearchAppBar.js +61 -0
  280. package/dist/components/search/SearchAppBar.js.map +1 -0
  281. package/dist/components/search/SearchBar.d.ts +147 -0
  282. package/dist/components/search/SearchBar.js +412 -0
  283. package/dist/components/search/SearchBar.js.map +1 -0
  284. package/dist/components/search/search-styles.d.ts +243 -0
  285. package/dist/components/search/search-styles.js +143 -0
  286. package/dist/components/search/search-styles.js.map +1 -0
  287. package/dist/components/search/search-tokens.d.ts +9 -0
  288. package/dist/components/search/search-tokens.js +70 -0
  289. package/dist/components/search/search-tokens.js.map +1 -0
  290. package/dist/components/select/Select.d.ts +187 -0
  291. package/dist/components/select/Select.js +319 -0
  292. package/dist/components/select/Select.js.map +1 -0
  293. package/dist/components/select/field-shell.d.ts +29 -0
  294. package/dist/components/select/field-shell.js +135 -0
  295. package/dist/components/select/field-shell.js.map +1 -0
  296. package/dist/components/select/option-list.d.ts +81 -0
  297. package/dist/components/select/option-list.js +291 -0
  298. package/dist/components/select/option-list.js.map +1 -0
  299. package/dist/components/select/search-list.js +135 -0
  300. package/dist/components/select/search-list.js.map +1 -0
  301. package/dist/components/select/selection-cap.js +30 -0
  302. package/dist/components/select/selection-cap.js.map +1 -0
  303. package/dist/components/sheet/BottomSheet.d.ts +154 -0
  304. package/dist/components/sheet/BottomSheet.js +442 -0
  305. package/dist/components/sheet/BottomSheet.js.map +1 -0
  306. package/dist/components/sheet/SheetTrigger.d.ts +25 -0
  307. package/dist/components/sheet/SheetTrigger.js +46 -0
  308. package/dist/components/sheet/SheetTrigger.js.map +1 -0
  309. package/dist/components/sheet/SideSheet.d.ts +139 -0
  310. package/dist/components/sheet/SideSheet.js +289 -0
  311. package/dist/components/sheet/SideSheet.js.map +1 -0
  312. package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
  313. package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
  314. package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
  315. package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
  316. package/dist/components/sheet/sheet-gesture.js +48 -0
  317. package/dist/components/sheet/sheet-gesture.js.map +1 -0
  318. package/dist/components/sheet/sheet-icons.js +31 -0
  319. package/dist/components/sheet/sheet-icons.js.map +1 -0
  320. package/dist/components/sheet/sheet-settle.js +58 -0
  321. package/dist/components/sheet/sheet-settle.js.map +1 -0
  322. package/dist/components/sheet/sheet-styles.d.ts +312 -0
  323. package/dist/components/sheet/sheet-styles.js +229 -0
  324. package/dist/components/sheet/sheet-styles.js.map +1 -0
  325. package/dist/components/sheet/sheet-tokens.d.ts +12 -0
  326. package/dist/components/sheet/sheet-tokens.js +115 -0
  327. package/dist/components/sheet/sheet-tokens.js.map +1 -0
  328. package/dist/components/sheet/side-swipe-gesture.js +22 -0
  329. package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
  330. package/dist/components/sheet/use-peek-inert.js +32 -0
  331. package/dist/components/sheet/use-peek-inert.js.map +1 -0
  332. package/dist/components/sheet/use-side-swipe.js +174 -0
  333. package/dist/components/sheet/use-side-swipe.js.map +1 -0
  334. package/dist/components/slider/Slider.d.ts +129 -0
  335. package/dist/components/slider/Slider.js +295 -0
  336. package/dist/components/slider/Slider.js.map +1 -0
  337. package/dist/components/slider/slider-geometry.js +138 -0
  338. package/dist/components/slider/slider-geometry.js.map +1 -0
  339. package/dist/components/slider/slider-styles.d.ts +133 -0
  340. package/dist/components/slider/slider-styles.js +97 -0
  341. package/dist/components/slider/slider-styles.js.map +1 -0
  342. package/dist/components/slider/slider-tokens.d.ts +7 -0
  343. package/dist/components/slider/slider-tokens.js +66 -0
  344. package/dist/components/slider/slider-tokens.js.map +1 -0
  345. package/dist/components/slider/use-touch-track.js +138 -0
  346. package/dist/components/slider/use-touch-track.js.map +1 -0
  347. package/dist/components/snackbar/Snackbar.d.ts +96 -0
  348. package/dist/components/snackbar/Snackbar.js +253 -0
  349. package/dist/components/snackbar/Snackbar.js.map +1 -0
  350. package/dist/components/snackbar/snackbar-state.d.ts +58 -0
  351. package/dist/components/snackbar/snackbar-state.js +73 -0
  352. package/dist/components/snackbar/snackbar-state.js.map +1 -0
  353. package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
  354. package/dist/components/snackbar/snackbar-styles.js +67 -0
  355. package/dist/components/snackbar/snackbar-styles.js.map +1 -0
  356. package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
  357. package/dist/components/snackbar/snackbar-tokens.js +54 -0
  358. package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
  359. package/dist/components/split-button/SplitButton.d.ts +109 -0
  360. package/dist/components/split-button/SplitButton.js +195 -0
  361. package/dist/components/split-button/SplitButton.js.map +1 -0
  362. package/dist/components/split-button/split-button-styles.d.ts +214 -0
  363. package/dist/components/split-button/split-button-styles.js +164 -0
  364. package/dist/components/split-button/split-button-styles.js.map +1 -0
  365. package/dist/components/split-button/split-button-tokens.d.ts +7 -0
  366. package/dist/components/split-button/split-button-tokens.js +36 -0
  367. package/dist/components/split-button/split-button-tokens.js.map +1 -0
  368. package/dist/components/switch/Switch.d.ts +82 -0
  369. package/dist/components/switch/Switch.js +165 -0
  370. package/dist/components/switch/Switch.js.map +1 -0
  371. package/dist/components/switch/switch-styles.d.ts +96 -0
  372. package/dist/components/switch/switch-styles.js +68 -0
  373. package/dist/components/switch/switch-styles.js.map +1 -0
  374. package/dist/components/switch/switch-thumb.js +41 -0
  375. package/dist/components/switch/switch-thumb.js.map +1 -0
  376. package/dist/components/switch/switch-tokens.d.ts +7 -0
  377. package/dist/components/switch/switch-tokens.js +78 -0
  378. package/dist/components/switch/switch-tokens.js.map +1 -0
  379. package/dist/components/tabs/Tabs.d.ts +120 -0
  380. package/dist/components/tabs/Tabs.js +346 -0
  381. package/dist/components/tabs/Tabs.js.map +1 -0
  382. package/dist/components/tabs/tabs-styles.d.ts +198 -0
  383. package/dist/components/tabs/tabs-styles.js +99 -0
  384. package/dist/components/tabs/tabs-styles.js.map +1 -0
  385. package/dist/components/tabs/tabs-tokens.d.ts +7 -0
  386. package/dist/components/tabs/tabs-tokens.js +121 -0
  387. package/dist/components/tabs/tabs-tokens.js.map +1 -0
  388. package/dist/components/text-field/TextField.d.ts +175 -0
  389. package/dist/components/text-field/TextField.js +250 -0
  390. package/dist/components/text-field/TextField.js.map +1 -0
  391. package/dist/components/text-field/text-field-styles.d.ts +252 -0
  392. package/dist/components/text-field/text-field-styles.js +209 -0
  393. package/dist/components/text-field/text-field-styles.js.map +1 -0
  394. package/dist/components/text-field/text-field-tokens.d.ts +7 -0
  395. package/dist/components/text-field/text-field-tokens.js +177 -0
  396. package/dist/components/text-field/text-field-tokens.js.map +1 -0
  397. package/dist/components/time-picker/TimePicker.d.ts +142 -0
  398. package/dist/components/time-picker/TimePicker.js +700 -0
  399. package/dist/components/time-picker/TimePicker.js.map +1 -0
  400. package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
  401. package/dist/components/time-picker/time-picker-styles.js +112 -0
  402. package/dist/components/time-picker/time-picker-styles.js.map +1 -0
  403. package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
  404. package/dist/components/time-picker/time-picker-tokens.js +86 -0
  405. package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
  406. package/dist/components/toolbar/Toolbar.d.ts +209 -0
  407. package/dist/components/toolbar/Toolbar.js +282 -0
  408. package/dist/components/toolbar/Toolbar.js.map +1 -0
  409. package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
  410. package/dist/components/toolbar/toolbar-styles.js +253 -0
  411. package/dist/components/toolbar/toolbar-styles.js.map +1 -0
  412. package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
  413. package/dist/components/toolbar/toolbar-tokens.js +117 -0
  414. package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
  415. package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
  416. package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
  417. package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
  418. package/dist/components/tooltip/Tooltip.d.ts +131 -0
  419. package/dist/components/tooltip/Tooltip.js +388 -0
  420. package/dist/components/tooltip/Tooltip.js.map +1 -0
  421. package/dist/components/tooltip/lazy-tooltip.js +35 -0
  422. package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
  423. package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
  424. package/dist/components/tooltip/tooltip-placement.js +14 -0
  425. package/dist/components/tooltip/tooltip-placement.js.map +1 -0
  426. package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
  427. package/dist/components/tooltip/tooltip-styles.js +81 -0
  428. package/dist/components/tooltip/tooltip-styles.js.map +1 -0
  429. package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
  430. package/dist/components/tooltip/tooltip-tokens.js +72 -0
  431. package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
  432. package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
  433. package/dist/components/tooltip/tooltip-trigger.js +115 -0
  434. package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
  435. package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
  436. package/dist/composites/button-group/ButtonGroup.js +270 -0
  437. package/dist/composites/button-group/ButtonGroup.js.map +1 -0
  438. package/dist/composites/button-group/button-group-styles.d.ts +73 -0
  439. package/dist/composites/button-group/button-group-styles.js +87 -0
  440. package/dist/composites/button-group/button-group-styles.js.map +1 -0
  441. package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
  442. package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
  443. package/dist/composites/button-group/overflow-menu-list.js +26 -0
  444. package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
  445. package/dist/composites/button-group/use-overflow.js +75 -0
  446. package/dist/composites/button-group/use-overflow.js.map +1 -0
  447. package/dist/composites/button-group/use-press-expansion.js +155 -0
  448. package/dist/composites/button-group/use-press-expansion.js.map +1 -0
  449. package/dist/index.d.ts +142 -0
  450. package/dist/index.js +136 -0
  451. package/dist/motion/get-m3-spring.d.ts +6 -0
  452. package/dist/motion/get-m3-spring.js +10 -0
  453. package/dist/motion/get-m3-spring.js.map +1 -0
  454. package/dist/motion/reduced-motion.js +19 -0
  455. package/dist/motion/reduced-motion.js.map +1 -0
  456. package/dist/motion/use-m3-spring.d.ts +13 -0
  457. package/dist/motion/use-m3-spring.js +22 -0
  458. package/dist/motion/use-m3-spring.js.map +1 -0
  459. package/dist/next/NextRouterProvider.d.ts +13 -0
  460. package/dist/next/NextRouterProvider.js +26 -0
  461. package/dist/next/NextRouterProvider.js.map +1 -0
  462. package/dist/next/get-theme-from-cookies.d.ts +32 -0
  463. package/dist/next/get-theme-from-cookies.js +27 -0
  464. package/dist/next/get-theme-from-cookies.js.map +1 -0
  465. package/dist/next/navigation-guard.d.ts +30 -0
  466. package/dist/next/navigation-guard.js +68 -0
  467. package/dist/next/navigation-guard.js.map +1 -0
  468. package/dist/next.d.ts +5 -0
  469. package/dist/next.js +5 -0
  470. package/dist/primitives/ButtonBase.d.ts +115 -0
  471. package/dist/primitives/ButtonBase.js +231 -0
  472. package/dist/primitives/ButtonBase.js.map +1 -0
  473. package/dist/primitives/DomDirectionLocale.d.ts +18 -0
  474. package/dist/primitives/DomDirectionLocale.js +28 -0
  475. package/dist/primitives/DomDirectionLocale.js.map +1 -0
  476. package/dist/primitives/Field.d.ts +50 -0
  477. package/dist/primitives/Field.js +74 -0
  478. package/dist/primitives/Field.js.map +1 -0
  479. package/dist/primitives/IconFaces.js +23 -0
  480. package/dist/primitives/IconFaces.js.map +1 -0
  481. package/dist/primitives/Overlay.d.ts +39 -0
  482. package/dist/primitives/Overlay.js +86 -0
  483. package/dist/primitives/Overlay.js.map +1 -0
  484. package/dist/primitives/SelectionControl.d.ts +55 -0
  485. package/dist/primitives/SelectionControl.js +58 -0
  486. package/dist/primitives/SelectionControl.js.map +1 -0
  487. package/dist/primitives/Surface.d.ts +123 -0
  488. package/dist/primitives/Surface.js +68 -0
  489. package/dist/primitives/Surface.js.map +1 -0
  490. package/dist/primitives/ToolbarContext.js +12 -0
  491. package/dist/primitives/ToolbarContext.js.map +1 -0
  492. package/dist/primitives/TouchTarget.d.ts +14 -0
  493. package/dist/primitives/TouchTarget.js +20 -0
  494. package/dist/primitives/TouchTarget.js.map +1 -0
  495. package/dist/primitives/TriggerContext.d.ts +34 -0
  496. package/dist/primitives/TriggerContext.js +24 -0
  497. package/dist/primitives/TriggerContext.js.map +1 -0
  498. package/dist/primitives/hidden-input-focus.js +27 -0
  499. package/dist/primitives/hidden-input-focus.js.map +1 -0
  500. package/dist/primitives/icon-faces-styles.d.ts +9 -0
  501. package/dist/primitives/icon-faces-styles.js +45 -0
  502. package/dist/primitives/icon-faces-styles.js.map +1 -0
  503. package/dist/primitives/locale-with-direction.d.ts +9 -0
  504. package/dist/primitives/locale-with-direction.js +17 -0
  505. package/dist/primitives/locale-with-direction.js.map +1 -0
  506. package/dist/primitives/morph-path.d.ts +25 -0
  507. package/dist/primitives/morph-path.js +38 -0
  508. package/dist/primitives/morph-path.js.map +1 -0
  509. package/dist/primitives/selection-control-styles.d.ts +54 -0
  510. package/dist/primitives/selection-control-styles.js +44 -0
  511. package/dist/primitives/selection-control-styles.js.map +1 -0
  512. package/dist/primitives/use-m3-interaction.d.ts +51 -0
  513. package/dist/primitives/use-m3-interaction.js +149 -0
  514. package/dist/primitives/use-m3-interaction.js.map +1 -0
  515. package/dist/primitives/use-m3-morph.d.ts +18 -0
  516. package/dist/primitives/use-m3-morph.js +36 -0
  517. package/dist/primitives/use-m3-morph.js.map +1 -0
  518. package/dist/primitives/use-presence.d.ts +19 -0
  519. package/dist/primitives/use-presence.js +37 -0
  520. package/dist/primitives/use-presence.js.map +1 -0
  521. package/dist/primitives.d.ts +36 -0
  522. package/dist/primitives.js +34 -0
  523. package/dist/shapes/corner-rounding.d.ts +13 -0
  524. package/dist/shapes/corner-rounding.js +18 -0
  525. package/dist/shapes/corner-rounding.js.map +1 -0
  526. package/dist/shapes/cubic.d.ts +52 -0
  527. package/dist/shapes/cubic.js +189 -0
  528. package/dist/shapes/cubic.js.map +1 -0
  529. package/dist/shapes/feature-mapping.js +80 -0
  530. package/dist/shapes/feature-mapping.js.map +1 -0
  531. package/dist/shapes/features.d.ts +23 -0
  532. package/dist/shapes/features.js +82 -0
  533. package/dist/shapes/features.js.map +1 -0
  534. package/dist/shapes/float-mapping.js +65 -0
  535. package/dist/shapes/float-mapping.js.map +1 -0
  536. package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
  537. package/dist/shapes/generated/material-shape-path-record.js +48 -0
  538. package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
  539. package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
  540. package/dist/shapes/generated/material-shape-paths.js +218 -0
  541. package/dist/shapes/generated/material-shape-paths.js.map +1 -0
  542. package/dist/shapes/mask.d.ts +14 -0
  543. package/dist/shapes/mask.js +24 -0
  544. package/dist/shapes/mask.js.map +1 -0
  545. package/dist/shapes/material-shapes.d.ts +11 -0
  546. package/dist/shapes/material-shapes.js +250 -0
  547. package/dist/shapes/material-shapes.js.map +1 -0
  548. package/dist/shapes/morph.d.ts +25 -0
  549. package/dist/shapes/morph.js +97 -0
  550. package/dist/shapes/morph.js.map +1 -0
  551. package/dist/shapes/path.d.ts +33 -0
  552. package/dist/shapes/path.js +47 -0
  553. package/dist/shapes/path.js.map +1 -0
  554. package/dist/shapes/point.d.ts +28 -0
  555. package/dist/shapes/point.js +103 -0
  556. package/dist/shapes/point.js.map +1 -0
  557. package/dist/shapes/polygon-measure.js +140 -0
  558. package/dist/shapes/polygon-measure.js.map +1 -0
  559. package/dist/shapes/rounded-polygon.d.ts +44 -0
  560. package/dist/shapes/rounded-polygon.js +278 -0
  561. package/dist/shapes/rounded-polygon.js.map +1 -0
  562. package/dist/shapes/shape-path.d.ts +15 -0
  563. package/dist/shapes/shapes.d.ts +53 -0
  564. package/dist/shapes/shapes.js +171 -0
  565. package/dist/shapes/shapes.js.map +1 -0
  566. package/dist/styles/generated/components.css +710 -0
  567. package/dist/styles/generated/theme.css +247 -0
  568. package/dist/styles/generated/themes.css +3361 -0
  569. package/dist/styles/generated/tokens.css +284 -0
  570. package/dist/styles/styles.css +15 -0
  571. package/dist/styles/utilities.css +283 -0
  572. package/dist/styles.compiled.css +2 -0
  573. package/dist/theme/ThemeProvider.d.ts +72 -0
  574. package/dist/theme/ThemeProvider.js +144 -0
  575. package/dist/theme/ThemeProvider.js.map +1 -0
  576. package/dist/theme/ThemeScope.d.ts +32 -0
  577. package/dist/theme/ThemeScope.js +67 -0
  578. package/dist/theme/ThemeScope.js.map +1 -0
  579. package/dist/theme/ThemeScript.d.ts +26 -0
  580. package/dist/theme/ThemeScript.js +44 -0
  581. package/dist/theme/ThemeScript.js.map +1 -0
  582. package/dist/theme/context.d.ts +32 -0
  583. package/dist/theme/context.js +47 -0
  584. package/dist/theme/context.js.map +1 -0
  585. package/dist/theme/create-theme.d.ts +60 -0
  586. package/dist/theme/create-theme.js +47 -0
  587. package/dist/theme/create-theme.js.map +1 -0
  588. package/dist/theme/css.js +54 -0
  589. package/dist/theme/css.js.map +1 -0
  590. package/dist/theme/parse-palettes.js +40 -0
  591. package/dist/theme/parse-palettes.js.map +1 -0
  592. package/dist/theme/scheme.d.ts +6 -0
  593. package/dist/theme/scheme.js +118 -0
  594. package/dist/theme/scheme.js.map +1 -0
  595. package/dist/theme/state.d.ts +38 -0
  596. package/dist/theme/state.js +93 -0
  597. package/dist/theme/state.js.map +1 -0
  598. package/dist/theme/storage.js +21 -0
  599. package/dist/theme/storage.js.map +1 -0
  600. package/dist/tokens/breakpoints.d.ts +15 -0
  601. package/dist/tokens/breakpoints.js +16 -0
  602. package/dist/tokens/breakpoints.js.map +1 -0
  603. package/dist/tokens/color.d.ts +104 -0
  604. package/dist/tokens/color.js +147 -0
  605. package/dist/tokens/color.js.map +1 -0
  606. package/dist/tokens/component.d.ts +110 -0
  607. package/dist/tokens/component.js +67 -0
  608. package/dist/tokens/component.js.map +1 -0
  609. package/dist/tokens/density.d.ts +20 -0
  610. package/dist/tokens/density.js +27 -0
  611. package/dist/tokens/density.js.map +1 -0
  612. package/dist/tokens/elevation.d.ts +44 -0
  613. package/dist/tokens/elevation.js +45 -0
  614. package/dist/tokens/elevation.js.map +1 -0
  615. package/dist/tokens/motion.d.ts +79 -0
  616. package/dist/tokens/motion.js +126 -0
  617. package/dist/tokens/motion.js.map +1 -0
  618. package/dist/tokens/shape.d.ts +22 -0
  619. package/dist/tokens/shape.js +22 -0
  620. package/dist/tokens/shape.js.map +1 -0
  621. package/dist/tokens/spring-velocity.d.ts +19 -0
  622. package/dist/tokens/spring-velocity.js +44 -0
  623. package/dist/tokens/spring-velocity.js.map +1 -0
  624. package/dist/tokens/state.d.ts +18 -0
  625. package/dist/tokens/state.js +19 -0
  626. package/dist/tokens/state.js.map +1 -0
  627. package/dist/tokens/typography.d.ts +64 -0
  628. package/dist/tokens/typography.js +60 -0
  629. package/dist/tokens/typography.js.map +1 -0
  630. package/dist/tokens/z-index.d.ts +17 -0
  631. package/dist/tokens/z-index.js +18 -0
  632. package/dist/tokens/z-index.js.map +1 -0
  633. package/dist/utils/announce.js +51 -0
  634. package/dist/utils/announce.js.map +1 -0
  635. package/dist/utils/assert-collection-children.js +26 -0
  636. package/dist/utils/assert-collection-children.js.map +1 -0
  637. package/dist/utils/closed-by.d.ts +9 -0
  638. package/dist/utils/closed-by.js +12 -0
  639. package/dist/utils/closed-by.js.map +1 -0
  640. package/dist/utils/cn.d.ts +31 -0
  641. package/dist/utils/cn.js +37 -0
  642. package/dist/utils/cn.js.map +1 -0
  643. package/dist/utils/composite-keys.js +32 -0
  644. package/dist/utils/composite-keys.js.map +1 -0
  645. package/dist/utils/focus-visible.js +14 -0
  646. package/dist/utils/focus-visible.js.map +1 -0
  647. package/dist/utils/focus.js +51 -0
  648. package/dist/utils/focus.js.map +1 -0
  649. package/dist/utils/focusable-disabled.js +12 -0
  650. package/dist/utils/focusable-disabled.js.map +1 -0
  651. package/dist/utils/keep-pressed-in-place.d.ts +60 -0
  652. package/dist/utils/keep-pressed-in-place.js +127 -0
  653. package/dist/utils/keep-pressed-in-place.js.map +1 -0
  654. package/dist/utils/load-on-demand.js +111 -0
  655. package/dist/utils/load-on-demand.js.map +1 -0
  656. package/dist/utils/merge-data-tokens.d.ts +9 -0
  657. package/dist/utils/merge-data-tokens.js +15 -0
  658. package/dist/utils/merge-data-tokens.js.map +1 -0
  659. package/dist/utils/natural-size.js +53 -0
  660. package/dist/utils/natural-size.js.map +1 -0
  661. package/dist/utils/nearest-reveal.js +28 -0
  662. package/dist/utils/nearest-reveal.js.map +1 -0
  663. package/dist/utils/placement.js +14 -0
  664. package/dist/utils/placement.js.map +1 -0
  665. package/dist/utils/radio-group-keys.js +74 -0
  666. package/dist/utils/radio-group-keys.js.map +1 -0
  667. package/dist/utils/rendered-description.js +17 -0
  668. package/dist/utils/rendered-description.js.map +1 -0
  669. package/dist/utils/root-props.d.ts +103 -0
  670. package/dist/utils/root-props.js +51 -0
  671. package/dist/utils/root-props.js.map +1 -0
  672. package/dist/utils/search.d.ts +11 -0
  673. package/dist/utils/search.js +18 -0
  674. package/dist/utils/search.js.map +1 -0
  675. package/dist/utils/shortcut.js +20 -0
  676. package/dist/utils/shortcut.js.map +1 -0
  677. package/dist/utils/split-data-attributes.d.ts +12 -0
  678. package/dist/utils/split-data-attributes.js +20 -0
  679. package/dist/utils/split-data-attributes.js.map +1 -0
  680. package/dist/utils/toolbar-keys.js +28 -0
  681. package/dist/utils/toolbar-keys.js.map +1 -0
  682. package/dist/utils/tv.d.ts +7 -0
  683. package/dist/utils/tv.js +9 -0
  684. package/dist/utils/tv.js.map +1 -0
  685. package/dist/utils/typeahead.js +64 -0
  686. package/dist/utils/typeahead.js.map +1 -0
  687. package/dist/utils/warn-once.js +30 -0
  688. package/dist/utils/warn-once.js.map +1 -0
  689. package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
  690. package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
  691. package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
  692. package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
  693. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
  694. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
  695. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
  696. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
  697. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
  698. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
  699. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
  700. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
  701. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
  702. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
  703. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
  704. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
  705. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
  706. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
  707. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
  708. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
  709. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
  710. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
  711. package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
  712. package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
  713. package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
  714. package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
  715. package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
  716. package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
  717. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
  718. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
  719. package/dist/vendor/material-color-utilities/index.js +51 -0
  720. package/dist/vendor/material-color-utilities/index.js.map +1 -0
  721. package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
  722. package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
  723. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
  724. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
  725. package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
  726. package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
  727. package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
  728. package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
  729. package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
  730. package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
  731. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
  732. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
  733. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
  734. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
  735. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
  736. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
  737. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
  738. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
  739. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
  740. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
  741. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
  742. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
  743. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
  744. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
  745. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
  746. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
  747. package/dist/vendor/material-color-utilities/score/score.js +115 -0
  748. package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
  749. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
  750. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
  751. package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
  752. package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
  753. package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
  754. package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
  755. package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
  756. package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
  757. package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
  758. package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
  759. package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
  760. package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
  761. package/package.json +114 -3
@@ -0,0 +1,231 @@
1
+ "use client";
2
+ import { TriggerContext } from "./TriggerContext.js";
3
+ import { useM3Interaction } from "./use-m3-interaction.js";
4
+ import { createContext, useContext, useEffect } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { mergeProps, mergeRefs, useButton, useLink, useObjectRef, useToggleButton, useToggleButtonGroupItem } from "react-aria";
7
+ import { useToggleState } from "react-stately";
8
+ //#region src/primitives/ButtonBase.tsx
9
+ /**
10
+ * Selection state of an enclosing toggle group (e.g. a connected `ButtonGroup`). Toggle
11
+ * buttons with a `value` inside it are selected through the group instead of on their own.
12
+ */
13
+ const ToggleGroupStateContext = createContext(null);
14
+ function splitProps(props) {
15
+ const { disabled = false, pending: pendingProp = false, className, style, children, onPress, onPressStart, onPressEnd, onPressChange, onPressUp, preventFocusOnPress, dragged, ...dom } = props;
16
+ const consumerDragged = dom["data-dragged"];
17
+ const pending = pendingProp && !disabled;
18
+ return {
19
+ disabled,
20
+ pending,
21
+ /** Presses, hover and the pressed state are off: disabled, or pending. */
22
+ blocked: disabled || pending,
23
+ isDragged: dragged ?? (consumerDragged !== void 0 && consumerDragged !== false && consumerDragged !== "false"),
24
+ element: {
25
+ className,
26
+ style
27
+ },
28
+ children,
29
+ press: {
30
+ onPress,
31
+ onPressStart,
32
+ onPressEnd,
33
+ onPressChange,
34
+ onPressUp,
35
+ preventFocusOnPress
36
+ },
37
+ dom
38
+ };
39
+ }
40
+ /**
41
+ * While a submit button is pending it renders `type="button"`, but a form left without a submit
42
+ * button still submits on Enter in its only field (HTML's implicit submission). This stops a
43
+ * submission with no submitter (or this button) before it reaches React or the browser, so
44
+ * Enter doesn't send the form again; another submit button of the form still works.
45
+ */
46
+ function useBlockImplicitSubmit(ref, enabled) {
47
+ useEffect(() => {
48
+ const button = ref.current;
49
+ const form = button instanceof HTMLButtonElement ? button.form : null;
50
+ if (!enabled || !form) return;
51
+ const block = (event) => {
52
+ const submitter = event.submitter;
53
+ if (submitter && submitter !== button) return;
54
+ event.preventDefault();
55
+ event.stopPropagation();
56
+ };
57
+ form.addEventListener("submit", block, true);
58
+ return () => form.removeEventListener("submit", block, true);
59
+ }, [ref, enabled]);
60
+ }
61
+ /** A pending element ignores clicks: a consumer's `onClick` is left out while it waits. */
62
+ function withoutClickWhilePending(dom, pending) {
63
+ if (!pending) return dom;
64
+ const { onClick: _onClick, ...rest } = dom;
65
+ return rest;
66
+ }
67
+ /**
68
+ * What a pending element changes on top of the blocked hooks' props (React Aria's pending
69
+ * `Button`): it stays focusable (React Aria's `isDisabled` would make a `<button>` natively
70
+ * disabled and drop its tab stop), says it's unavailable with `aria-disabled`, and keeps the
71
+ * enabled look (`data-disabled` only for `disabled`).
72
+ */
73
+ function pendingAttributes(pending, dom) {
74
+ return pending ? {
75
+ disabled: void 0,
76
+ tabIndex: dom.tabIndex ?? 0,
77
+ "aria-disabled": true,
78
+ "data-disabled": void 0,
79
+ "data-pending": true
80
+ } : {};
81
+ }
82
+ const render = (children, isSelected) => typeof children === "function" ? children({ isSelected }) : children;
83
+ function ActionBase(props) {
84
+ const { ref, as: elementType = "button", ...rest } = props;
85
+ const type = elementType === "button" ? rest.type ?? "button" : void 0;
86
+ const { pending, blocked, isDragged, element, children, press, dom } = splitProps(rest);
87
+ const domRest = withoutClickWhilePending(dom, pending);
88
+ const domRef = useObjectRef(ref);
89
+ const { buttonProps, isPressed } = useButton({
90
+ ...press,
91
+ type,
92
+ isDisabled: blocked,
93
+ elementType
94
+ }, domRef);
95
+ const { interactionProps, dataAttributes } = useM3Interaction({
96
+ isDisabled: blocked,
97
+ isPressed,
98
+ isDragged
99
+ }, domRef);
100
+ useBlockImplicitSubmit(domRef, pending && type === "submit");
101
+ const elementProps = {
102
+ ...mergeProps(domRest, buttonProps, interactionProps),
103
+ ...dataAttributes,
104
+ ...pendingAttributes(pending, domRest),
105
+ ...pending && type === "submit" ? { type: "button" } : {},
106
+ ...element
107
+ };
108
+ return elementType === "div" ? /* @__PURE__ */ jsx("div", {
109
+ ...elementProps,
110
+ ref: domRef,
111
+ children: render(children, false)
112
+ }) : /* @__PURE__ */ jsx("button", {
113
+ ...elementProps,
114
+ ref: domRef,
115
+ children: render(children, false)
116
+ });
117
+ }
118
+ function LinkBase({ ref, href, ...props }) {
119
+ const { disabled, pending, blocked, isDragged, element, children, press, dom } = splitProps(props);
120
+ const domRest = withoutClickWhilePending(dom, pending);
121
+ const domRef = useObjectRef(ref);
122
+ const { linkProps, isPressed } = useLink({
123
+ ...press,
124
+ href,
125
+ isDisabled: blocked,
126
+ elementType: "a"
127
+ }, domRef);
128
+ const { interactionProps, dataAttributes } = useM3Interaction({
129
+ isDisabled: blocked,
130
+ isPressed,
131
+ isDragged
132
+ }, domRef);
133
+ return /* @__PURE__ */ jsx("a", {
134
+ ...mergeProps(domRest, linkProps, interactionProps),
135
+ ...dataAttributes,
136
+ ...pendingAttributes(pending, domRest),
137
+ ...element,
138
+ href: disabled ? void 0 : href,
139
+ ref: domRef,
140
+ children: render(children, false)
141
+ });
142
+ }
143
+ function ToggleBase({ ref, type = "button", selected, defaultSelected, onSelectedChange, toggle, ...props }) {
144
+ const { disabled, isDragged, element, children, press, dom } = splitProps(props);
145
+ const domRef = useObjectRef(ref);
146
+ const options = {
147
+ ...press,
148
+ type,
149
+ isDisabled: disabled,
150
+ isSelected: selected,
151
+ defaultSelected,
152
+ onChange: onSelectedChange,
153
+ elementType: "button"
154
+ };
155
+ const state = useToggleState(options);
156
+ const { buttonProps, isPressed, isSelected } = useToggleButton(options, state, domRef);
157
+ const { interactionProps, dataAttributes } = useM3Interaction({
158
+ isDisabled: disabled,
159
+ isPressed,
160
+ isSelected,
161
+ isDragged
162
+ }, domRef);
163
+ return /* @__PURE__ */ jsx("button", {
164
+ ...mergeProps(dom, buttonProps, interactionProps),
165
+ ...dataAttributes,
166
+ ...element,
167
+ ref: domRef,
168
+ children: render(children, isSelected)
169
+ });
170
+ }
171
+ function GroupItemBase({ ref, type = "button", value, state, ...props }) {
172
+ const { disabled, isDragged, element, children, press, dom } = splitProps(props);
173
+ const domRef = useObjectRef(ref);
174
+ const { buttonProps, isPressed, isSelected } = useToggleButtonGroupItem({
175
+ ...press,
176
+ id: value,
177
+ isDisabled: disabled,
178
+ elementType: "button"
179
+ }, state, domRef);
180
+ const { interactionProps, dataAttributes } = useM3Interaction({
181
+ isDisabled: disabled || state.isDisabled,
182
+ isPressed,
183
+ isSelected,
184
+ isDragged
185
+ }, domRef);
186
+ return /* @__PURE__ */ jsx("button", {
187
+ ...mergeProps(dom, buttonProps, interactionProps),
188
+ ...dataAttributes,
189
+ ...element,
190
+ type,
191
+ value,
192
+ ref: domRef,
193
+ children: render(children, isSelected)
194
+ });
195
+ }
196
+ function withTrigger(props, { ref: triggerRef, ...trigger }) {
197
+ return {
198
+ ...mergeProps(trigger, props),
199
+ ref: mergeRefs(props.ref, triggerRef)
200
+ };
201
+ }
202
+ /**
203
+ * Unstyled button behaviour shared by every button-like component: a `<button>`, a
204
+ * link (`href`) or a toggle (`toggle`), with React Aria press, focus and keyboard
205
+ * handling, and the M3 interaction `data-*` attributes and ripple origin from
206
+ * `useM3Interaction`. DOM props pass through; `className` and `style` go on the element.
207
+ * `pending` blocks presses but keeps focus (see {@link ButtonBasePendingProps}).
208
+ */
209
+ function ButtonBase(ownProps) {
210
+ const groupState = useContext(ToggleGroupStateContext);
211
+ const trigger = useContext(TriggerContext);
212
+ const props = trigger ? withTrigger(ownProps, trigger) : ownProps;
213
+ if (props.href !== void 0) return /* @__PURE__ */ jsx(LinkBase, { ...props });
214
+ if (props.toggle) {
215
+ if (groupState && props.value !== void 0) {
216
+ const { selected, defaultSelected, onSelectedChange, toggle, value, ...item } = props;
217
+ if (process.env.NODE_ENV !== "production" && (selected !== void 0 || defaultSelected !== void 0 || onSelectedChange)) console.warn(`[@windmorph/react] Toggle "${value}" is inside a selection group; use the group's selectedKeys instead of selected / onSelectedChange.`);
218
+ return /* @__PURE__ */ jsx(GroupItemBase, {
219
+ ...item,
220
+ value,
221
+ state: groupState
222
+ });
223
+ }
224
+ return /* @__PURE__ */ jsx(ToggleBase, { ...props });
225
+ }
226
+ return /* @__PURE__ */ jsx(ActionBase, { ...props });
227
+ }
228
+ //#endregion
229
+ export { ButtonBase, ToggleGroupStateContext };
230
+
231
+ //# sourceMappingURL=ButtonBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonBase.js","names":[],"sources":["../../src/primitives/ButtonBase.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n useContext,\n useEffect,\n type RefObject,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n type ReactNode,\n type Ref,\n} from 'react';\nimport {\n mergeProps,\n mergeRefs,\n useButton,\n useLink,\n useObjectRef,\n useToggleButton,\n useToggleButtonGroupItem,\n type PressEvents,\n} from 'react-aria';\nimport { useToggleState, type ToggleGroupState } from 'react-stately';\nimport { TriggerContext, type TriggerContextValue } from './TriggerContext';\nimport { useM3Interaction } from './use-m3-interaction';\n\n/**\n * Selection state of an enclosing toggle group (e.g. a connected `ButtonGroup`). Toggle\n * buttons with a `value` inside it are selected through the group instead of on their own.\n */\nexport const ToggleGroupStateContext = createContext<ToggleGroupState | null>(null);\n\ntype PressHandlers = Pick<\n PressEvents,\n 'onPress' | 'onPressStart' | 'onPressEnd' | 'onPressChange' | 'onPressUp'\n> & {\n /** Don't move focus to the element on press (set by menu triggers). @default false */\n preventFocusOnPress?: boolean;\n};\n\nexport interface ButtonBaseRenderState {\n isSelected: boolean;\n}\n\ninterface ButtonBaseCommonProps extends PressHandlers {\n /** Disables the element: it can't be pressed or focused, and shows the disabled style. @default false */\n disabled?: boolean;\n /** Classes for the root element, merged with `classNames.root`; consumer classes win. */\n className?: string;\n /** Inline styles for the root element. */\n style?: CSSProperties;\n /**\n * The element is being dragged (e.g. a card picked up to move it): sets `data-dragged`\n * for the dragged state layer. A consumer's own `data-dragged` attribute counts too.\n * @default false\n */\n dragged?: boolean;\n /** Content, or a function of the selection state (e.g. to swap a toggle's icon). */\n children?: ReactNode | ((state: ButtonBaseRenderState) => ReactNode);\n}\n\n/**\n * The pending state `Button` and `IconButton` build on. It isn't part of the other props types,\n * so components that extend them (FABs, chips, cards) don't inherit it; pass it to `ButtonBase`\n * alongside them.\n */\nexport interface ButtonBasePendingProps {\n /**\n * An action started by the element is running: presses are blocked (`onPress`, `onClick`,\n * Enter and Space do nothing, no hover or pressed state), but the element stays focusable and\n * in the Tab order, unlike `disabled`. Sets `aria-disabled=\"true\"` and `data-pending`; a\n * submit button renders `type=\"button\"` meanwhile, so the form isn't submitted again, and a\n * link keeps its `href` with its navigation prevented. `disabled` wins when both are set.\n * A toggle ignores it.\n * @default false\n */\n pending?: boolean;\n}\n\ntype OwnKeys = keyof ButtonBaseCommonProps | 'color';\n\nexport interface ButtonBaseActionProps\n extends ButtonBaseCommonProps, Omit<ComponentPropsWithoutRef<'button'>, OwnKeys> {\n /** Ref to the root `<button>` element. */\n ref?: Ref<HTMLButtonElement>;\n /** The element rendered: a native `<button>`. @default \"button\" */\n as?: 'button';\n /**\n * The value a submit button sends with its form, under its `name`. On a toggle (`toggle`)\n * it's a `string` naming the button in a selection group instead, required to take part in\n * the group's selection.\n */\n value?: ComponentPropsWithoutRef<'button'>['value'];\n /** Renders a link (`<a>`) instead of a button. */\n href?: undefined;\n /** Makes the button a toggle (`aria-pressed`) with `selected` and `onSelectedChange`. @default false */\n toggle?: false;\n}\n\n/**\n * A `div` with `role=\"button\"`, for pressable containers whose content a `<button>` may\n * not hold (headings, images, block layout), such as clickable cards.\n */\nexport interface ButtonBaseDivActionProps\n extends ButtonBaseCommonProps, Omit<ComponentPropsWithoutRef<'div'>, OwnKeys> {\n /** Ref to the root `<div>` element. */\n ref?: Ref<HTMLDivElement>;\n /** Renders a `div` with `role=\"button\"`, for content a `<button>` may not hold. */\n as: 'div';\n /** Renders a link (`<a>`) instead of a button. */\n href?: undefined;\n /** Makes the button a toggle (`aria-pressed`) with `selected` and `onSelectedChange`. @default false */\n toggle?: false;\n}\n\nexport interface ButtonBaseLinkProps\n extends ButtonBaseCommonProps, Omit<ComponentPropsWithoutRef<'a'>, OwnKeys | 'href'> {\n /** Ref to the root `<a>` element. */\n ref?: Ref<HTMLAnchorElement>;\n /** Renders a link. Navigation goes through React Aria's `RouterProvider` when one is set. */\n href: string;\n /** Makes the button a toggle (`aria-pressed`) with `selected` and `onSelectedChange`. @default false */\n toggle?: false;\n}\n\nexport interface ButtonBaseToggleProps\n extends\n ButtonBaseCommonProps,\n Omit<ComponentPropsWithoutRef<'button'>, OwnKeys | 'aria-pressed' | 'onChange'> {\n /** Ref to the root `<button>` element. */\n ref?: Ref<HTMLButtonElement>;\n /** Renders a link (`<a>`) instead of a button. */\n href?: undefined;\n /** Makes the button a toggle (`aria-pressed`). */\n toggle: true;\n /** Identifies the button in a selection group; required to take part in its selection. */\n value?: string;\n /** Controlled selection. Ignored inside a selection group. */\n selected?: boolean;\n /** Initial selection when uncontrolled. */\n defaultSelected?: boolean;\n /** Called with the new selection when the user toggles the button. */\n onSelectedChange?: (selected: boolean) => void;\n}\n\nexport type ButtonBaseProps =\n ButtonBaseActionProps | ButtonBaseDivActionProps | ButtonBaseLinkProps | ButtonBaseToggleProps;\n\nfunction splitProps<T extends ButtonBaseCommonProps & { pending?: boolean }>(props: T) {\n const {\n disabled = false,\n pending: pendingProp = false,\n className,\n style,\n children,\n onPress,\n onPressStart,\n onPressEnd,\n onPressChange,\n onPressUp,\n preventFocusOnPress,\n dragged,\n ...dom\n } = props;\n const consumerDragged = (dom as Record<string, unknown>)['data-dragged'];\n // `disabled` wins: a disabled element is natively disabled even while its action runs.\n const pending = pendingProp && !disabled;\n return {\n disabled,\n pending,\n /** Presses, hover and the pressed state are off: disabled, or pending. */\n blocked: disabled || pending,\n // Our `data-*` attributes are spread last, so a consumer's `data-dragged` feeds the state.\n isDragged:\n dragged ??\n (consumerDragged !== undefined && consumerDragged !== false && consumerDragged !== 'false'),\n element: { className, style },\n children,\n // React Aria options, not DOM attributes: they go to the press hooks.\n press: { onPress, onPressStart, onPressEnd, onPressChange, onPressUp, preventFocusOnPress },\n dom,\n };\n}\n\n/**\n * While a submit button is pending it renders `type=\"button\"`, but a form left without a submit\n * button still submits on Enter in its only field (HTML's implicit submission). This stops a\n * submission with no submitter (or this button) before it reaches React or the browser, so\n * Enter doesn't send the form again; another submit button of the form still works.\n */\nfunction useBlockImplicitSubmit(ref: RefObject<HTMLElement | null>, enabled: boolean) {\n useEffect(() => {\n const button = ref.current;\n const form = button instanceof HTMLButtonElement ? button.form : null;\n if (!enabled || !form) return;\n const block = (event: Event) => {\n // A plain `Event` (no `submitter`) counts as implicit too.\n const submitter = (event as Partial<SubmitEvent>).submitter;\n if (submitter && submitter !== button) return;\n event.preventDefault();\n event.stopPropagation();\n };\n form.addEventListener('submit', block, true);\n return () => form.removeEventListener('submit', block, true);\n }, [ref, enabled]);\n}\n\n/** A pending element ignores clicks: a consumer's `onClick` is left out while it waits. */\nfunction withoutClickWhilePending<T extends { onClick?: unknown }>(dom: T, pending: boolean) {\n if (!pending) return dom;\n const { onClick: _onClick, ...rest } = dom;\n return rest;\n}\n\n/**\n * What a pending element changes on top of the blocked hooks' props (React Aria's pending\n * `Button`): it stays focusable (React Aria's `isDisabled` would make a `<button>` natively\n * disabled and drop its tab stop), says it's unavailable with `aria-disabled`, and keeps the\n * enabled look (`data-disabled` only for `disabled`).\n */\nfunction pendingAttributes(pending: boolean, dom: { tabIndex?: number }) {\n return pending\n ? {\n disabled: undefined,\n tabIndex: dom.tabIndex ?? 0,\n 'aria-disabled': true as const,\n 'data-disabled': undefined,\n 'data-pending': true as const,\n }\n : {};\n}\n\nconst render = (children: ButtonBaseCommonProps['children'], isSelected: boolean) =>\n typeof children === 'function' ? children({ isSelected }) : children;\n\nfunction ActionBase(\n props: (ButtonBaseActionProps | ButtonBaseDivActionProps) & ButtonBasePendingProps,\n) {\n const { ref, as: elementType = 'button', ...rest } = props;\n const type =\n elementType === 'button' ? ((rest as ButtonBaseActionProps).type ?? 'button') : undefined;\n const { pending, blocked, isDragged, element, children, press, dom } = splitProps(rest);\n const domRest = withoutClickWhilePending(dom, pending);\n const domRef = useObjectRef(ref as Ref<HTMLElement>);\n const { buttonProps, isPressed } = useButton(\n { ...press, type, isDisabled: blocked, elementType },\n domRef,\n );\n const { interactionProps, dataAttributes } = useM3Interaction(\n { isDisabled: blocked, isPressed, isDragged },\n domRef,\n );\n useBlockImplicitSubmit(domRef, pending && type === 'submit');\n const elementProps = {\n ...mergeProps(domRest, buttonProps, interactionProps),\n ...dataAttributes,\n ...pendingAttributes(pending, domRest),\n // Enter in a form's field would submit it again through a pending submit button.\n ...(pending && type === 'submit' ? { type: 'button' as const } : {}),\n ...element,\n };\n return elementType === 'div' ? (\n <div {...elementProps} ref={domRef as Ref<HTMLDivElement>}>\n {render(children, false)}\n </div>\n ) : (\n <button {...elementProps} ref={domRef as Ref<HTMLButtonElement>}>\n {render(children, false)}\n </button>\n );\n}\n\nfunction LinkBase({ ref, href, ...props }: ButtonBaseLinkProps & ButtonBasePendingProps) {\n const { disabled, pending, blocked, isDragged, element, children, press, dom } =\n splitProps(props);\n const domRest = withoutClickWhilePending(dom, pending);\n const domRef = useObjectRef(ref);\n const { linkProps, isPressed } = useLink(\n // While blocked, the press hook prevents a click's navigation.\n { ...press, href, isDisabled: blocked, elementType: 'a' },\n domRef,\n );\n const { interactionProps, dataAttributes } = useM3Interaction(\n { isDisabled: blocked, isPressed, isDragged },\n domRef,\n );\n return (\n <a\n {...mergeProps(domRest, linkProps, interactionProps)}\n {...dataAttributes}\n {...pendingAttributes(pending, domRest)}\n {...element}\n // A pending link stays a link (role and tab stop); only a disabled one drops `href`.\n href={disabled ? undefined : href}\n ref={domRef}\n >\n {render(children, false)}\n </a>\n );\n}\n\nfunction ToggleBase({\n ref,\n type = 'button',\n selected,\n defaultSelected,\n onSelectedChange,\n toggle,\n ...props\n}: ButtonBaseToggleProps) {\n const { disabled, isDragged, element, children, press, dom } = splitProps(props);\n const domRef = useObjectRef(ref);\n const options = {\n ...press,\n type,\n isDisabled: disabled,\n isSelected: selected,\n defaultSelected,\n onChange: onSelectedChange,\n elementType: 'button' as const,\n };\n const state = useToggleState(options);\n const { buttonProps, isPressed, isSelected } = useToggleButton(options, state, domRef);\n const { interactionProps, dataAttributes } = useM3Interaction(\n { isDisabled: disabled, isPressed, isSelected, isDragged },\n domRef,\n );\n return (\n <button\n {...mergeProps(dom, buttonProps, interactionProps)}\n {...dataAttributes}\n {...element}\n ref={domRef}\n >\n {render(children, isSelected)}\n </button>\n );\n}\n\nfunction GroupItemBase({\n ref,\n type = 'button',\n value,\n state,\n ...props\n}: Omit<ButtonBaseToggleProps, 'selected' | 'defaultSelected' | 'onSelectedChange' | 'toggle'> & {\n value: string;\n state: ToggleGroupState;\n}) {\n const { disabled, isDragged, element, children, press, dom } = splitProps(props);\n const domRef = useObjectRef(ref);\n const { buttonProps, isPressed, isSelected } = useToggleButtonGroupItem(\n { ...press, id: value, isDisabled: disabled, elementType: 'button' },\n state,\n domRef,\n );\n const { interactionProps, dataAttributes } = useM3Interaction(\n { isDisabled: disabled || state.isDisabled, isPressed, isSelected, isDragged },\n domRef,\n );\n return (\n <button\n {...mergeProps(dom, buttonProps, interactionProps)}\n {...dataAttributes}\n {...element}\n type={type}\n value={value}\n ref={domRef}\n >\n {render(children, isSelected)}\n </button>\n );\n}\n\nfunction withTrigger(\n props: ButtonBaseProps,\n { ref: triggerRef, ...trigger }: TriggerContextValue,\n): ButtonBaseProps {\n const merged = mergeProps(trigger, props) as ButtonBaseProps;\n return {\n ...merged,\n ref: mergeRefs(props.ref as Ref<HTMLElement>, triggerRef as Ref<HTMLElement>),\n } as ButtonBaseProps;\n}\n\n/**\n * Unstyled button behaviour shared by every button-like component: a `<button>`, a\n * link (`href`) or a toggle (`toggle`), with React Aria press, focus and keyboard\n * handling, and the M3 interaction `data-*` attributes and ripple origin from\n * `useM3Interaction`. DOM props pass through; `className` and `style` go on the element.\n * `pending` blocks presses but keeps focus (see {@link ButtonBasePendingProps}).\n */\nexport function ButtonBase(ownProps: ButtonBaseProps & ButtonBasePendingProps) {\n const groupState = useContext(ToggleGroupStateContext);\n const trigger = useContext(TriggerContext);\n // An enclosing overlay trigger adds its press handler (chained), ARIA attributes and ref.\n const props = trigger ? withTrigger(ownProps, trigger) : ownProps;\n if (props.href !== undefined) return <LinkBase {...props} />;\n if (props.toggle) {\n if (groupState && props.value !== undefined) {\n const { selected, defaultSelected, onSelectedChange, toggle, value, ...item } = props;\n if (\n process.env.NODE_ENV !== 'production' &&\n (selected !== undefined || defaultSelected !== undefined || onSelectedChange)\n ) {\n console.warn(\n `[@windmorph/react] Toggle \"${value}\" is inside a selection group; use the group's selectedKeys instead of selected / onSelectedChange.`,\n );\n }\n return <GroupItemBase {...item} value={value} state={groupState} />;\n }\n return <ToggleBase {...props} />;\n }\n return <ActionBase {...props} />;\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,MAAa,0BAA0B,cAAuC,IAAI;AAsHlF,SAAS,WAAoE,OAAU;CACrF,MAAM,EACJ,WAAW,OACX,SAAS,cAAc,OACvB,WACA,OACA,UACA,SACA,cACA,YACA,eACA,WACA,qBACA,SACA,GAAG,QACD;CACJ,MAAM,kBAAmB,IAAgC;CAEzD,MAAM,UAAU,eAAe,CAAC;CAChC,OAAO;EACL;EACA;;EAEA,SAAS,YAAY;EAErB,WACE,YACC,oBAAoB,KAAA,KAAa,oBAAoB,SAAS,oBAAoB;EACrF,SAAS;GAAE;GAAW;EAAM;EAC5B;EAEA,OAAO;GAAE;GAAS;GAAc;GAAY;GAAe;GAAW;EAAoB;EAC1F;CACF;AACF;;;;;;;AAQA,SAAS,uBAAuB,KAAoC,SAAkB;CACpF,gBAAgB;EACd,MAAM,SAAS,IAAI;EACnB,MAAM,OAAO,kBAAkB,oBAAoB,OAAO,OAAO;EACjE,IAAI,CAAC,WAAW,CAAC,MAAM;EACvB,MAAM,SAAS,UAAiB;GAE9B,MAAM,YAAa,MAA+B;GAClD,IAAI,aAAa,cAAc,QAAQ;GACvC,MAAM,eAAe;GACrB,MAAM,gBAAgB;EACxB;EACA,KAAK,iBAAiB,UAAU,OAAO,IAAI;EAC3C,aAAa,KAAK,oBAAoB,UAAU,OAAO,IAAI;CAC7D,GAAG,CAAC,KAAK,OAAO,CAAC;AACnB;;AAGA,SAAS,yBAA0D,KAAQ,SAAkB;CAC3F,IAAI,CAAC,SAAS,OAAO;CACrB,MAAM,EAAE,SAAS,UAAU,GAAG,SAAS;CACvC,OAAO;AACT;;;;;;;AAQA,SAAS,kBAAkB,SAAkB,KAA4B;CACvE,OAAO,UACH;EACE,UAAU,KAAA;EACV,UAAU,IAAI,YAAY;EAC1B,iBAAiB;EACjB,iBAAiB,KAAA;EACjB,gBAAgB;CAClB,IACA,CAAC;AACP;AAEA,MAAM,UAAU,UAA6C,eAC3D,OAAO,aAAa,aAAa,SAAS,EAAE,WAAW,CAAC,IAAI;AAE9D,SAAS,WACP,OACA;CACA,MAAM,EAAE,KAAK,IAAI,cAAc,UAAU,GAAG,SAAS;CACrD,MAAM,OACJ,gBAAgB,WAAa,KAA+B,QAAQ,WAAY,KAAA;CAClF,MAAM,EAAE,SAAS,SAAS,WAAW,SAAS,UAAU,OAAO,QAAQ,WAAW,IAAI;CACtF,MAAM,UAAU,yBAAyB,KAAK,OAAO;CACrD,MAAM,SAAS,aAAa,GAAuB;CACnD,MAAM,EAAE,aAAa,cAAc,UACjC;EAAE,GAAG;EAAO;EAAM,YAAY;EAAS;CAAY,GACnD,MACF;CACA,MAAM,EAAE,kBAAkB,mBAAmB,iBAC3C;EAAE,YAAY;EAAS;EAAW;CAAU,GAC5C,MACF;CACA,uBAAuB,QAAQ,WAAW,SAAS,QAAQ;CAC3D,MAAM,eAAe;EACnB,GAAG,WAAW,SAAS,aAAa,gBAAgB;EACpD,GAAG;EACH,GAAG,kBAAkB,SAAS,OAAO;EAErC,GAAI,WAAW,SAAS,WAAW,EAAE,MAAM,SAAkB,IAAI,CAAC;EAClE,GAAG;CACL;CACA,OAAO,gBAAgB,QACrB,oBAAC,OAAD;EAAK,GAAI;EAAc,KAAK;EACzB,UAAA,OAAO,UAAU,KAAK;CACpB,CAAA,IAEL,oBAAC,UAAD;EAAQ,GAAI;EAAc,KAAK;EAC5B,UAAA,OAAO,UAAU,KAAK;CACjB,CAAA;AAEZ;AAEA,SAAS,SAAS,EAAE,KAAK,MAAM,GAAG,SAAuD;CACvF,MAAM,EAAE,UAAU,SAAS,SAAS,WAAW,SAAS,UAAU,OAAO,QACvE,WAAW,KAAK;CAClB,MAAM,UAAU,yBAAyB,KAAK,OAAO;CACrD,MAAM,SAAS,aAAa,GAAG;CAC/B,MAAM,EAAE,WAAW,cAAc,QAE/B;EAAE,GAAG;EAAO;EAAM,YAAY;EAAS,aAAa;CAAI,GACxD,MACF;CACA,MAAM,EAAE,kBAAkB,mBAAmB,iBAC3C;EAAE,YAAY;EAAS;EAAW;CAAU,GAC5C,MACF;CACA,OACE,oBAAC,KAAD;EACE,GAAI,WAAW,SAAS,WAAW,gBAAgB;EACnD,GAAI;EACJ,GAAI,kBAAkB,SAAS,OAAO;EACtC,GAAI;EAEJ,MAAM,WAAW,KAAA,IAAY;EAC7B,KAAK;EAEJ,UAAA,OAAO,UAAU,KAAK;CACtB,CAAA;AAEP;AAEA,SAAS,WAAW,EAClB,KACA,OAAO,UACP,UACA,iBACA,kBACA,QACA,GAAG,SACqB;CACxB,MAAM,EAAE,UAAU,WAAW,SAAS,UAAU,OAAO,QAAQ,WAAW,KAAK;CAC/E,MAAM,SAAS,aAAa,GAAG;CAC/B,MAAM,UAAU;EACd,GAAG;EACH;EACA,YAAY;EACZ,YAAY;EACZ;EACA,UAAU;EACV,aAAa;CACf;CACA,MAAM,QAAQ,eAAe,OAAO;CACpC,MAAM,EAAE,aAAa,WAAW,eAAe,gBAAgB,SAAS,OAAO,MAAM;CACrF,MAAM,EAAE,kBAAkB,mBAAmB,iBAC3C;EAAE,YAAY;EAAU;EAAW;EAAY;CAAU,GACzD,MACF;CACA,OACE,oBAAC,UAAD;EACE,GAAI,WAAW,KAAK,aAAa,gBAAgB;EACjD,GAAI;EACJ,GAAI;EACJ,KAAK;EAEJ,UAAA,OAAO,UAAU,UAAU;CACtB,CAAA;AAEZ;AAEA,SAAS,cAAc,EACrB,KACA,OAAO,UACP,OACA,OACA,GAAG,SAIF;CACD,MAAM,EAAE,UAAU,WAAW,SAAS,UAAU,OAAO,QAAQ,WAAW,KAAK;CAC/E,MAAM,SAAS,aAAa,GAAG;CAC/B,MAAM,EAAE,aAAa,WAAW,eAAe,yBAC7C;EAAE,GAAG;EAAO,IAAI;EAAO,YAAY;EAAU,aAAa;CAAS,GACnE,OACA,MACF;CACA,MAAM,EAAE,kBAAkB,mBAAmB,iBAC3C;EAAE,YAAY,YAAY,MAAM;EAAY;EAAW;EAAY;CAAU,GAC7E,MACF;CACA,OACE,oBAAC,UAAD;EACE,GAAI,WAAW,KAAK,aAAa,gBAAgB;EACjD,GAAI;EACJ,GAAI;EACE;EACC;EACP,KAAK;EAEJ,UAAA,OAAO,UAAU,UAAU;CACtB,CAAA;AAEZ;AAEA,SAAS,YACP,OACA,EAAE,KAAK,YAAY,GAAG,WACL;CAEjB,OAAO;EACL,GAFa,WAAW,SAAS,KAEzB;EACR,KAAK,UAAU,MAAM,KAAyB,UAA8B;CAC9E;AACF;;;;;;;;AASA,SAAgB,WAAW,UAAoD;CAC7E,MAAM,aAAa,WAAW,uBAAuB;CACrD,MAAM,UAAU,WAAW,cAAc;CAEzC,MAAM,QAAQ,UAAU,YAAY,UAAU,OAAO,IAAI;CACzD,IAAI,MAAM,SAAS,KAAA,GAAW,OAAO,oBAAC,UAAD,EAAU,GAAI,MAAQ,CAAA;CAC3D,IAAI,MAAM,QAAQ;EAChB,IAAI,cAAc,MAAM,UAAU,KAAA,GAAW;GAC3C,MAAM,EAAE,UAAU,iBAAiB,kBAAkB,QAAQ,OAAO,GAAG,SAAS;GAChF,IACE,QAAQ,IAAI,aAAa,iBACxB,aAAa,KAAA,KAAa,oBAAoB,KAAA,KAAa,mBAE5D,QAAQ,KACN,8BAA8B,MAAM,oGACtC;GAEF,OAAO,oBAAC,eAAD;IAAe,GAAI;IAAa;IAAO,OAAO;GAAa,CAAA;EACpE;EACA,OAAO,oBAAC,YAAD,EAAY,GAAI,MAAQ,CAAA;CACjC;CACA,OAAO,oBAAC,YAAD,EAAY,GAAI,MAAQ,CAAA;AACjC"}
@@ -0,0 +1,18 @@
1
+ import { ReactNode, RefCallback } from "react";
2
+ //#region src/primitives/DomDirectionLocale.d.ts
3
+ export interface DomDirectionLocaleProps {
4
+ /**
5
+ * Renders the content. Attach the ref to the element whose laid-out direction should
6
+ * drive React Aria (usually the component's root).
7
+ */
8
+ children: (directionRef: RefCallback<HTMLElement>) => ReactNode;
9
+ }
10
+ /**
11
+ * React Aria takes keyboard direction (arrow keys, `start` / `end`) from its locale, not
12
+ * the DOM `dir`, so a component inside an RTL region without an `I18nProvider` would move
13
+ * the wrong way. This reads the element's computed direction and, when it differs from
14
+ * the locale's, provides the same locale with the matching direction to its content.
15
+ */
16
+ export declare function DomDirectionLocale({ children }: DomDirectionLocaleProps): import("react").JSX.Element;
17
+ //#endregion
18
+ //# sourceMappingURL=DomDirectionLocale.d.ts.map
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { localeWithDirection } from "./locale-with-direction.js";
3
+ import { useCallback, useState } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { I18nProvider, useLocale } from "react-aria";
6
+ //#region src/primitives/DomDirectionLocale.tsx
7
+ /**
8
+ * React Aria takes keyboard direction (arrow keys, `start` / `end`) from its locale, not
9
+ * the DOM `dir`, so a component inside an RTL region without an `I18nProvider` would move
10
+ * the wrong way. This reads the element's computed direction and, when it differs from
11
+ * the locale's, provides the same locale with the matching direction to its content.
12
+ */
13
+ function DomDirectionLocale({ children }) {
14
+ const { locale, direction: localeDirection } = useLocale();
15
+ const [direction, setDirection] = useState(localeDirection);
16
+ const directionRef = useCallback((element) => {
17
+ if (element) setDirection(getComputedStyle(element).direction === "rtl" ? "rtl" : "ltr");
18
+ }, []);
19
+ const effectiveLocale = direction === localeDirection ? locale : localeWithDirection(locale, direction);
20
+ return /* @__PURE__ */ jsx(I18nProvider, {
21
+ locale: effectiveLocale,
22
+ children: children(directionRef)
23
+ });
24
+ }
25
+ //#endregion
26
+ export { DomDirectionLocale };
27
+
28
+ //# sourceMappingURL=DomDirectionLocale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomDirectionLocale.js","names":[],"sources":["../../src/primitives/DomDirectionLocale.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useState, type ReactNode, type RefCallback } from 'react';\nimport { I18nProvider, useLocale } from 'react-aria';\nimport { localeWithDirection } from './locale-with-direction';\n\nexport interface DomDirectionLocaleProps {\n /**\n * Renders the content. Attach the ref to the element whose laid-out direction should\n * drive React Aria (usually the component's root).\n */\n children: (directionRef: RefCallback<HTMLElement>) => ReactNode;\n}\n\n/**\n * React Aria takes keyboard direction (arrow keys, `start` / `end`) from its locale, not\n * the DOM `dir`, so a component inside an RTL region without an `I18nProvider` would move\n * the wrong way. This reads the element's computed direction and, when it differs from\n * the locale's, provides the same locale with the matching direction to its content.\n */\nexport function DomDirectionLocale({ children }: DomDirectionLocaleProps) {\n const { locale, direction: localeDirection } = useLocale();\n const [direction, setDirection] = useState(localeDirection);\n const directionRef = useCallback<RefCallback<HTMLElement>>((element) => {\n if (element) setDirection(getComputedStyle(element).direction === 'rtl' ? 'rtl' : 'ltr');\n }, []);\n const effectiveLocale =\n direction === localeDirection ? locale : localeWithDirection(locale, direction);\n return <I18nProvider locale={effectiveLocale}>{children(directionRef)}</I18nProvider>;\n}\n"],"mappings":";;;;;;;;;;;;AAoBA,SAAgB,mBAAmB,EAAE,YAAqC;CACxE,MAAM,EAAE,QAAQ,WAAW,oBAAoB,UAAU;CACzD,MAAM,CAAC,WAAW,gBAAgB,SAAS,eAAe;CAC1D,MAAM,eAAe,aAAuC,YAAY;EACtE,IAAI,SAAS,aAAa,iBAAiB,OAAO,CAAC,CAAC,cAAc,QAAQ,QAAQ,KAAK;CACzF,GAAG,CAAC,CAAC;CACL,MAAM,kBACJ,cAAc,kBAAkB,SAAS,oBAAoB,QAAQ,SAAS;CAChF,OAAO,oBAAC,cAAD;EAAc,QAAQ;EAAkB,UAAA,SAAS,YAAY;CAAgB,CAAA;AACtF"}
@@ -0,0 +1,50 @@
1
+ import { ComponentPropsWithRef, ReactNode } from "react";
2
+ //#region src/primitives/Field.d.ts
3
+ /**
4
+ * Field parts shared by text fields, selects and other form controls. They take
5
+ * the prop objects returned by React Aria field hooks (`labelProps`,
6
+ * `descriptionProps`, `errorMessageProps`) by spreading them.
7
+ */
8
+ export type FieldLabelProps = ComponentPropsWithRef<'label'>;
9
+ /** Field label. Inherits its colour so the field can tint it per state. */
10
+ export declare function FieldLabel({ className, ...props }: FieldLabelProps): import("react").JSX.Element;
11
+ export type SupportingTextProps = ComponentPropsWithRef<'div'>;
12
+ /** Helper text below a field. */
13
+ export declare function SupportingText({ className, ...props }: SupportingTextProps): import("react").JSX.Element;
14
+ export type ErrorTextProps = ComponentPropsWithRef<'div'>;
15
+ /**
16
+ * Validation message below a field, shown in place of the supporting text. It has the
17
+ * `alert` role (M3 text field accessibility), so screen readers announce it as it appears;
18
+ * pass another `role` to change that.
19
+ */
20
+ export declare function ErrorText({ className, ...props }: ErrorTextProps): import("react").JSX.Element;
21
+ export interface CharacterCounterProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
22
+ /** Current number of characters. */
23
+ count: number;
24
+ /** Maximum number of characters. */
25
+ max: number;
26
+ /**
27
+ * What assistive tech reads for the counter, e.g. "Character count: 12 of 80" (M3 calls it
28
+ * the "character count"). Give the counter an `id` and add it to the input's
29
+ * `aria-describedby`. Without it the counter is hidden from assistive tech.
30
+ */
31
+ label?: string | undefined;
32
+ }
33
+ /**
34
+ * `count/max` character counter. With a `label`, screen readers read the label instead of
35
+ * the digits; without one, the counter is hidden from them.
36
+ */
37
+ export declare function CharacterCounter({ count, max, label, className, ...props }: CharacterCounterProps): import("react").JSX.Element;
38
+ export interface FieldErrorIconProps extends Omit<ComponentPropsWithRef<'span'>, 'children'> {
39
+ /** The icon's accessible name. M3: "Error". */
40
+ label: string;
41
+ /** Replaces the default Material Symbols `error` icon. */
42
+ icon?: ReactNode;
43
+ }
44
+ /**
45
+ * The icon a field shows in its error state (M3 strongly recommends one, as a cue that
46
+ * doesn't rely on colour). It has the `img` role and an accessible name, "Error" in M3.
47
+ */
48
+ export declare function FieldErrorIcon({ label, icon, className, ...props }: FieldErrorIconProps): import("react").JSX.Element;
49
+ //#endregion
50
+ //# sourceMappingURL=Field.d.ts.map
@@ -0,0 +1,74 @@
1
+ import { cn } from "../utils/cn.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/primitives/Field.tsx
4
+ /** Field label. Inherits its colour so the field can tint it per state. */
5
+ function FieldLabel({ className, ...props }) {
6
+ return /* @__PURE__ */ jsx("label", {
7
+ ...props,
8
+ className: cn("text-body-large font-plain", className)
9
+ });
10
+ }
11
+ /** Helper text below a field. */
12
+ function SupportingText({ className, ...props }) {
13
+ return /* @__PURE__ */ jsx("div", {
14
+ ...props,
15
+ className: cn("text-body-small font-plain text-on-surface-variant", className)
16
+ });
17
+ }
18
+ /**
19
+ * Validation message below a field, shown in place of the supporting text. It has the
20
+ * `alert` role (M3 text field accessibility), so screen readers announce it as it appears;
21
+ * pass another `role` to change that.
22
+ */
23
+ function ErrorText({ className, ...props }) {
24
+ return /* @__PURE__ */ jsx("div", {
25
+ role: "alert",
26
+ ...props,
27
+ className: cn("text-body-small font-plain text-error", className)
28
+ });
29
+ }
30
+ /**
31
+ * `count/max` character counter. With a `label`, screen readers read the label instead of
32
+ * the digits; without one, the counter is hidden from them.
33
+ */
34
+ function CharacterCounter({ count, max, label, className, ...props }) {
35
+ return /* @__PURE__ */ jsx("div", {
36
+ "aria-hidden": label === void 0 ? true : void 0,
37
+ ...props,
38
+ "data-over-limit": count > max ? true : void 0,
39
+ className: cn("text-body-small font-plain text-on-surface-variant tabular-nums data-over-limit:text-error", className),
40
+ children: label === void 0 ? `${count}/${max}` : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("span", {
41
+ "aria-hidden": "true",
42
+ children: [
43
+ count,
44
+ "/",
45
+ max
46
+ ]
47
+ }), /* @__PURE__ */ jsx("span", {
48
+ className: "sr-only",
49
+ children: label
50
+ })] })
51
+ });
52
+ }
53
+ /**
54
+ * The icon a field shows in its error state (M3 strongly recommends one, as a cue that
55
+ * doesn't rely on colour). It has the `img` role and an accessible name, "Error" in M3.
56
+ */
57
+ function FieldErrorIcon({ label, icon, className, ...props }) {
58
+ return /* @__PURE__ */ jsx("span", {
59
+ ...props,
60
+ role: "img",
61
+ "aria-label": label,
62
+ className: cn("inline-flex", className),
63
+ children: icon ?? /* @__PURE__ */ jsx("svg", {
64
+ viewBox: "0 -960 960 960",
65
+ fill: "currentColor",
66
+ "aria-hidden": "true",
67
+ children: /* @__PURE__ */ jsx("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z" })
68
+ })
69
+ });
70
+ }
71
+ //#endregion
72
+ export { CharacterCounter, ErrorText, FieldErrorIcon, FieldLabel, SupportingText };
73
+
74
+ //# sourceMappingURL=Field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.js","names":[],"sources":["../../src/primitives/Field.tsx"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\n/**\n * Field parts shared by text fields, selects and other form controls. They take\n * the prop objects returned by React Aria field hooks (`labelProps`,\n * `descriptionProps`, `errorMessageProps`) by spreading them.\n */\n\nexport type FieldLabelProps = ComponentPropsWithRef<'label'>;\n\n/** Field label. Inherits its colour so the field can tint it per state. */\nexport function FieldLabel({ className, ...props }: FieldLabelProps) {\n return <label {...props} className={cn('text-body-large font-plain', className)} />;\n}\n\nexport type SupportingTextProps = ComponentPropsWithRef<'div'>;\n\n/** Helper text below a field. */\nexport function SupportingText({ className, ...props }: SupportingTextProps) {\n return (\n <div\n {...props}\n className={cn('text-body-small font-plain text-on-surface-variant', className)}\n />\n );\n}\n\nexport type ErrorTextProps = ComponentPropsWithRef<'div'>;\n\n/**\n * Validation message below a field, shown in place of the supporting text. It has the\n * `alert` role (M3 text field accessibility), so screen readers announce it as it appears;\n * pass another `role` to change that.\n */\nexport function ErrorText({ className, ...props }: ErrorTextProps) {\n return (\n <div\n role=\"alert\"\n {...props}\n className={cn('text-body-small font-plain text-error', className)}\n />\n );\n}\n\nexport interface CharacterCounterProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n /** Current number of characters. */\n count: number;\n /** Maximum number of characters. */\n max: number;\n /**\n * What assistive tech reads for the counter, e.g. \"Character count: 12 of 80\" (M3 calls it\n * the \"character count\"). Give the counter an `id` and add it to the input's\n * `aria-describedby`. Without it the counter is hidden from assistive tech.\n */\n label?: string | undefined;\n}\n\n/**\n * `count/max` character counter. With a `label`, screen readers read the label instead of\n * the digits; without one, the counter is hidden from them.\n */\nexport function CharacterCounter({\n count,\n max,\n label,\n className,\n ...props\n}: CharacterCounterProps) {\n return (\n <div\n aria-hidden={label === undefined ? true : undefined}\n {...props}\n data-over-limit={count > max ? true : undefined}\n className={cn(\n 'text-body-small font-plain text-on-surface-variant tabular-nums data-over-limit:text-error',\n className,\n )}\n >\n {label === undefined ? (\n `${count}/${max}`\n ) : (\n <>\n <span aria-hidden=\"true\">\n {count}/{max}\n </span>\n <span className=\"sr-only\">{label}</span>\n </>\n )}\n </div>\n );\n}\n\nexport interface FieldErrorIconProps extends Omit<ComponentPropsWithRef<'span'>, 'children'> {\n /** The icon's accessible name. M3: \"Error\". */\n label: string;\n /** Replaces the default Material Symbols `error` icon. */\n icon?: ReactNode;\n}\n\n/**\n * The icon a field shows in its error state (M3 strongly recommends one, as a cue that\n * doesn't rely on colour). It has the `img` role and an accessible name, \"Error\" in M3.\n */\nexport function FieldErrorIcon({ label, icon, className, ...props }: FieldErrorIconProps) {\n return (\n <span {...props} role=\"img\" aria-label={label} className={cn('inline-flex', className)}>\n {icon ?? (\n <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z\" />\n </svg>\n )}\n </span>\n );\n}\n"],"mappings":";;;;AAYA,SAAgB,WAAW,EAAE,WAAW,GAAG,SAA0B;CACnE,OAAO,oBAAC,SAAD;EAAO,GAAI;EAAO,WAAW,GAAG,8BAA8B,SAAS;CAAI,CAAA;AACpF;;AAKA,SAAgB,eAAe,EAAE,WAAW,GAAG,SAA8B;CAC3E,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,WAAW,GAAG,sDAAsD,SAAS;CAC9E,CAAA;AAEL;;;;;;AASA,SAAgB,UAAU,EAAE,WAAW,GAAG,SAAyB;CACjE,OACE,oBAAC,OAAD;EACE,MAAK;EACL,GAAI;EACJ,WAAW,GAAG,yCAAyC,SAAS;CACjE,CAAA;AAEL;;;;;AAmBA,SAAgB,iBAAiB,EAC/B,OACA,KACA,OACA,WACA,GAAG,SACqB;CACxB,OACE,oBAAC,OAAD;EACE,eAAa,UAAU,KAAA,IAAY,OAAO,KAAA;EAC1C,GAAI;EACJ,mBAAiB,QAAQ,MAAM,OAAO,KAAA;EACtC,WAAW,GACT,8FACA,SACF;EAEC,UAAA,UAAU,KAAA,IACT,GAAG,MAAM,GAAG,QAEZ,qBAAA,UAAA,EAAA,UAAA,CACE,qBAAC,QAAD;GAAM,eAAY;GAAlB,UAAA;IACG;IAAM;IAAE;GACL;EACN,CAAA,GAAA,oBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAY,CAAA,CACvC,EAAA,CAAA;CAED,CAAA;AAET;;;;;AAaA,SAAgB,eAAe,EAAE,OAAO,MAAM,WAAW,GAAG,SAA8B;CACxF,OACE,oBAAC,QAAD;EAAM,GAAI;EAAO,MAAK;EAAM,cAAY;EAAO,WAAW,GAAG,eAAe,SAAS;EAClF,UAAA,QACC,oBAAC,OAAD;GAAK,SAAQ;GAAiB,MAAK;GAAe,eAAY;GAC5D,UAAA,oBAAC,QAAD,EAAM,GAAE,+TAAgU,CAAA;EACrU,CAAA;CAEH,CAAA;AAEV"}
@@ -0,0 +1,23 @@
1
+ import { iconFacesStyles } from "./icon-faces-styles.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/primitives/IconFaces.tsx
4
+ /**
5
+ * The two faces of a two-icon button, for an icon slot styled with `iconFacesStyles().cell`.
6
+ * Both stay mounted in one grid cell and hand over with `transition`.
7
+ */
8
+ function IconFaces({ icon, alternateIcon, alternate, transition }) {
9
+ const face = (kind, shown, content) => /* @__PURE__ */ jsx("span", {
10
+ "data-icon-face": kind,
11
+ "data-active": shown || void 0,
12
+ className: iconFacesStyles({
13
+ transition,
14
+ face: kind
15
+ }).face(),
16
+ children: content
17
+ });
18
+ return /* @__PURE__ */ jsxs(Fragment, { children: [face("primary", !alternate, icon), face("alternate", alternate, alternateIcon)] });
19
+ }
20
+ //#endregion
21
+ export { IconFaces };
22
+
23
+ //# sourceMappingURL=IconFaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconFaces.js","names":[],"sources":["../../src/primitives/IconFaces.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { iconFacesStyles, type IconTransition } from './icon-faces-styles';\n\nexport interface IconFacesProps {\n /** The resting icon (closed, or collapsed). */\n icon: ReactElement;\n /** The icon shown while `alternate` is true (open, or expanded). */\n alternateIcon: ReactElement;\n /** Shows `alternateIcon`. */\n alternate: boolean;\n /** @default \"swap\" */\n transition?: IconTransition;\n}\n\n/**\n * The two faces of a two-icon button, for an icon slot styled with `iconFacesStyles().cell`.\n * Both stay mounted in one grid cell and hand over with `transition`.\n */\nexport function IconFaces({ icon, alternateIcon, alternate, transition }: IconFacesProps) {\n const face = (kind: 'primary' | 'alternate', shown: boolean, content: ReactElement) => (\n <span\n data-icon-face={kind}\n data-active={shown || undefined}\n className={iconFacesStyles({ transition, face: kind }).face()}\n >\n {content}\n </span>\n );\n return (\n <>\n {face('primary', !alternate, icon)}\n {face('alternate', alternate, alternateIcon)}\n </>\n );\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,UAAU,EAAE,MAAM,eAAe,WAAW,cAA8B;CACxF,MAAM,QAAQ,MAA+B,OAAgB,YAC3D,oBAAC,QAAD;EACE,kBAAgB;EAChB,eAAa,SAAS,KAAA;EACtB,WAAW,gBAAgB;GAAE;GAAY,MAAM;EAAK,CAAC,CAAC,CAAC,KAAK;EAE3D,UAAA;CACG,CAAA;CAER,OACE,qBAAA,UAAA,EAAA,UAAA,CACG,KAAK,WAAW,CAAC,WAAW,IAAI,GAChC,KAAK,aAAa,WAAW,aAAa,CAC3C,EAAA,CAAA;AAEN"}
@@ -0,0 +1,39 @@
1
+ import { Density } from "../tokens/density.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/primitives/Overlay.d.ts
4
+ export interface OverlayProps {
5
+ children: ReactNode;
6
+ /** Element to portal into. @default document.body */
7
+ portalContainer?: Element;
8
+ /** Leave focus handling to the caller instead of restoring it on unmount. */
9
+ disableFocusManagement?: boolean;
10
+ /** Whether the overlay is animating out; focus containment is released meanwhile. */
11
+ exiting?: boolean;
12
+ /**
13
+ * Float above every other layer, for overlays that must stay reachable whatever is open
14
+ * (tooltips). A modal open underneath (a dialog, sheet or viewer) does not hide it from
15
+ * assistive technology, does not pull focus out of it, and does not treat a press on it
16
+ * as a press outside. Uses React Aria's top-layer marker, as its toasts do.
17
+ */
18
+ topLayer?: boolean;
19
+ /**
20
+ * The density of the component the overlay belongs to, when it sets its own (`density`
21
+ * prop); by default the overlay takes the enclosing `ThemeProvider` / `ThemeScope`'s.
22
+ */
23
+ density?: Density | undefined;
24
+ }
25
+ /**
26
+ * Portals overlay content (dialogs, menus, sheets, tooltips) to `document.body`
27
+ * while keeping the theme, mode, contrast, motion scheme, density, **text direction and the
28
+ * enclosing `ThemeScope`s' classes and inline CSS variables** of the place it was rendered from, so overlays opened
29
+ * inside a `ThemeScope` or an RTL region still match it, and CSS variables set through a
30
+ * scope's class (component tokens) reach them. The wrapper is `display: contents`, so the
31
+ * classes affect only what children inherit. Dismissal, focus containment and scroll locking come from the React
32
+ * Aria overlay hooks (`useModalOverlay`, `usePopover`, …) of the component using it.
33
+ *
34
+ * A portalled overlay sits outside any modal it was opened from, so the modal's
35
+ * `ariaHideOutside` would mark it `aria-hidden`; `topLayer` keeps it visible.
36
+ */
37
+ export declare function Overlay({ children, portalContainer, disableFocusManagement, exiting, topLayer, density }: OverlayProps): import("react").JSX.Element;
38
+ //#endregion
39
+ //# sourceMappingURL=Overlay.d.ts.map
@@ -0,0 +1,86 @@
1
+ "use client";
2
+ import { themeAttributes, themeAttributesOver } from "../theme/state.js";
3
+ import { DocumentThemeContext, InheritedThemeContext, useThemeScope, useThemeScopeLayers } from "../theme/context.js";
4
+ import { ToolbarContext } from "./ToolbarContext.js";
5
+ import { useCallback, useContext, useId, useLayoutEffect, useRef } from "react";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { Overlay } from "react-aria";
8
+ //#region src/primitives/Overlay.tsx
9
+ /**
10
+ * Portals overlay content (dialogs, menus, sheets, tooltips) to `document.body`
11
+ * while keeping the theme, mode, contrast, motion scheme, density, **text direction and the
12
+ * enclosing `ThemeScope`s' classes and inline CSS variables** of the place it was rendered from, so overlays opened
13
+ * inside a `ThemeScope` or an RTL region still match it, and CSS variables set through a
14
+ * scope's class (component tokens) reach them. The wrapper is `display: contents`, so the
15
+ * classes affect only what children inherit. Dismissal, focus containment and scroll locking come from the React
16
+ * Aria overlay hooks (`useModalOverlay`, `usePopover`, …) of the component using it.
17
+ *
18
+ * A portalled overlay sits outside any modal it was opened from, so the modal's
19
+ * `ariaHideOutside` would mark it `aria-hidden`; `topLayer` keeps it visible.
20
+ */
21
+ function Overlay$1({ children, portalContainer, disableFocusManagement, exiting, topLayer, density }) {
22
+ const scope = useThemeScope();
23
+ const themed = density === void 0 ? scope : {
24
+ ...scope,
25
+ density
26
+ };
27
+ const documentTheme = useContext(DocumentThemeContext);
28
+ const [outerLayer, ...innerLayers] = useThemeScopeLayers();
29
+ const { "data-theme": layerTheme, "data-mode": layerMode, "data-contrast": layerContrast } = themeAttributes(themed);
30
+ const colorAttributes = {
31
+ "data-theme": layerTheme,
32
+ "data-mode": layerMode,
33
+ "data-contrast": layerContrast
34
+ };
35
+ const scopeId = useId();
36
+ const markerRef = useRef(null);
37
+ const scopeRef = useRef(null);
38
+ useLayoutEffect(() => {
39
+ if (markerRef.current && scopeRef.current) scopeRef.current.dir = getComputedStyle(markerRef.current).direction;
40
+ });
41
+ const attachMarker = useCallback((marker) => {
42
+ markerRef.current = marker;
43
+ if (!marker || typeof CSS === "undefined" || !CSS.supports("selector(:dir(rtl))")) return;
44
+ const wrapper = marker.ownerDocument.querySelector(`[data-overlay-scope="${CSS.escape(scopeId)}"]`);
45
+ if (wrapper) wrapper.dir = marker.matches(":dir(rtl)") ? "rtl" : "ltr";
46
+ }, [scopeId]);
47
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
48
+ ref: attachMarker,
49
+ hidden: true
50
+ }), /* @__PURE__ */ jsx(Overlay, {
51
+ portalContainer,
52
+ disableFocusManagement,
53
+ isExiting: exiting,
54
+ children: /* @__PURE__ */ jsx("div", {
55
+ ref: scopeRef,
56
+ ...themeAttributesOver(themed, portalContainer ? null : documentTheme, outerLayer !== void 0),
57
+ className: outerLayer?.className || void 0,
58
+ "data-overlay-scope": scopeId,
59
+ "data-react-aria-top-layer": topLayer || void 0,
60
+ style: {
61
+ ...outerLayer?.variables,
62
+ display: "contents",
63
+ color: "var(--md-sys-color-on-surface)"
64
+ },
65
+ children: innerLayers.reduceRight((content, layer) => /* @__PURE__ */ jsx("div", {
66
+ ...colorAttributes,
67
+ className: layer.className || void 0,
68
+ style: {
69
+ ...layer.variables,
70
+ display: "contents"
71
+ },
72
+ children: content
73
+ }), /* @__PURE__ */ jsx(InheritedThemeContext, {
74
+ value: themed,
75
+ children: /* @__PURE__ */ jsx(ToolbarContext, {
76
+ value: null,
77
+ children
78
+ })
79
+ }))
80
+ })
81
+ })] });
82
+ }
83
+ //#endregion
84
+ export { Overlay$1 as Overlay };
85
+
86
+ //# sourceMappingURL=Overlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overlay.js","names":["Overlay","AriaOverlay"],"sources":["../../src/primitives/Overlay.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useContext, useId, useLayoutEffect, useRef, type ReactNode } from 'react';\nimport { Overlay as AriaOverlay } from 'react-aria';\nimport {\n DocumentThemeContext,\n InheritedThemeContext,\n useThemeScope,\n useThemeScopeLayers,\n} from '../theme/context';\nimport { themeAttributes, themeAttributesOver } from '../theme/state';\nimport type { Density } from '../tokens/density';\nimport { ToolbarContext } from './ToolbarContext';\n\nexport interface OverlayProps {\n children: ReactNode;\n /** Element to portal into. @default document.body */\n portalContainer?: Element;\n /** Leave focus handling to the caller instead of restoring it on unmount. */\n disableFocusManagement?: boolean;\n /** Whether the overlay is animating out; focus containment is released meanwhile. */\n exiting?: boolean;\n /**\n * Float above every other layer, for overlays that must stay reachable whatever is open\n * (tooltips). A modal open underneath (a dialog, sheet or viewer) does not hide it from\n * assistive technology, does not pull focus out of it, and does not treat a press on it\n * as a press outside. Uses React Aria's top-layer marker, as its toasts do.\n */\n topLayer?: boolean;\n /**\n * The density of the component the overlay belongs to, when it sets its own (`density`\n * prop); by default the overlay takes the enclosing `ThemeProvider` / `ThemeScope`'s.\n */\n density?: Density | undefined;\n}\n\n/**\n * Portals overlay content (dialogs, menus, sheets, tooltips) to `document.body`\n * while keeping the theme, mode, contrast, motion scheme, density, **text direction and the\n * enclosing `ThemeScope`s' classes and inline CSS variables** of the place it was rendered from, so overlays opened\n * inside a `ThemeScope` or an RTL region still match it, and CSS variables set through a\n * scope's class (component tokens) reach them. The wrapper is `display: contents`, so the\n * classes affect only what children inherit. Dismissal, focus containment and scroll locking come from the React\n * Aria overlay hooks (`useModalOverlay`, `usePopover`, …) of the component using it.\n *\n * A portalled overlay sits outside any modal it was opened from, so the modal's\n * `ariaHideOutside` would mark it `aria-hidden`; `topLayer` keeps it visible.\n */\nexport function Overlay({\n children,\n portalContainer,\n disableFocusManagement,\n exiting,\n topLayer,\n density,\n}: OverlayProps) {\n const scope = useThemeScope();\n const themed = density === undefined ? scope : { ...scope, density };\n // In `document.body`, the wrapper carries only what differs from `<html>`, so an app's own\n // `:root` values for the system tokens reach the overlay too.\n const documentTheme = useContext(DocumentThemeContext);\n const [outerLayer, ...innerLayers] = useThemeScopeLayers();\n // A scope's class or variables may set a colour role: each layer carries the colour\n // attributes, so the values derived from the roles (elevation) resolve again with them.\n const {\n 'data-theme': layerTheme,\n 'data-mode': layerMode,\n 'data-contrast': layerContrast,\n } = themeAttributes(themed);\n const colorAttributes = {\n 'data-theme': layerTheme,\n 'data-mode': layerMode,\n 'data-contrast': layerContrast,\n };\n const scopeId = useId();\n const markerRef = useRef<HTMLSpanElement>(null);\n const scopeRef = useRef<HTMLDivElement>(null);\n\n // `dir` is inherited through the DOM, which a portal leaves; copy the direction in\n // effect where the overlay is declared onto the portalled wrapper.\n useLayoutEffect(() => {\n if (markerRef.current && scopeRef.current) {\n scopeRef.current.dir = getComputedStyle(markerRef.current).direction;\n }\n });\n // On mount, copy it before the content's own layout effects run: they may read layout\n // (React Aria's scroll lock does), which resolves the content's first style, and so its\n // `@starting-style` transitions, in the wrong direction. The marker's ref is attached\n // before them, and `:dir()` reads the direction without resolving styles.\n const attachMarker = useCallback(\n (marker: HTMLSpanElement | null) => {\n markerRef.current = marker;\n if (!marker || typeof CSS === 'undefined' || !CSS.supports('selector(:dir(rtl))')) return;\n const wrapper = marker.ownerDocument.querySelector<HTMLElement>(\n `[data-overlay-scope=\"${CSS.escape(scopeId)}\"]`,\n );\n if (wrapper) wrapper.dir = marker.matches(':dir(rtl)') ? 'rtl' : 'ltr';\n },\n [scopeId],\n );\n\n return (\n <>\n <span ref={attachMarker} hidden />\n <AriaOverlay\n portalContainer={portalContainer}\n disableFocusManagement={disableFocusManagement}\n isExiting={exiting}\n >\n <div\n ref={scopeRef}\n {...themeAttributesOver(\n themed,\n portalContainer ? null : documentTheme,\n outerLayer !== undefined,\n )}\n className={outerLayer?.className || undefined}\n data-overlay-scope={scopeId}\n data-react-aria-top-layer={topLayer || undefined}\n style={{\n ...outerLayer?.variables,\n display: 'contents',\n color: 'var(--md-sys-color-on-surface)',\n }}\n >\n {/* Each inner scope's class and variables around the last, as on the page, so the\n innermost scope's value wins whether a class or its style sets it. */}\n {innerLayers.reduceRight<ReactNode>(\n (content, layer) => (\n <div\n {...colorAttributes}\n className={layer.className || undefined}\n style={{ ...layer.variables, display: 'contents' }}\n >\n {content}\n </div>\n ),\n // An overlay opened from a toolbar isn't part of it.\n <InheritedThemeContext value={themed}>\n <ToolbarContext value={null}>{children}</ToolbarContext>\n </InheritedThemeContext>,\n )}\n </div>\n </AriaOverlay>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgDA,SAAgBA,UAAQ,EACtB,UACA,iBACA,wBACA,SACA,UACA,WACe;CACf,MAAM,QAAQ,cAAc;CAC5B,MAAM,SAAS,YAAY,KAAA,IAAY,QAAQ;EAAE,GAAG;EAAO;CAAQ;CAGnE,MAAM,gBAAgB,WAAW,oBAAoB;CACrD,MAAM,CAAC,YAAY,GAAG,eAAe,oBAAoB;CAGzD,MAAM,EACJ,cAAc,YACd,aAAa,WACb,iBAAiB,kBACf,gBAAgB,MAAM;CAC1B,MAAM,kBAAkB;EACtB,cAAc;EACd,aAAa;EACb,iBAAiB;CACnB;CACA,MAAM,UAAU,MAAM;CACtB,MAAM,YAAY,OAAwB,IAAI;CAC9C,MAAM,WAAW,OAAuB,IAAI;CAI5C,sBAAsB;EACpB,IAAI,UAAU,WAAW,SAAS,SAChC,SAAS,QAAQ,MAAM,iBAAiB,UAAU,OAAO,CAAC,CAAC;CAE/D,CAAC;CAKD,MAAM,eAAe,aAClB,WAAmC;EAClC,UAAU,UAAU;EACpB,IAAI,CAAC,UAAU,OAAO,QAAQ,eAAe,CAAC,IAAI,SAAS,qBAAqB,GAAG;EACnF,MAAM,UAAU,OAAO,cAAc,cACnC,wBAAwB,IAAI,OAAO,OAAO,EAAE,GAC9C;EACA,IAAI,SAAS,QAAQ,MAAM,OAAO,QAAQ,WAAW,IAAI,QAAQ;CACnE,GACA,CAAC,OAAO,CACV;CAEA,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,QAAD;EAAM,KAAK;EAAc,QAAA;CAAQ,CAAA,GACjC,oBAACC,SAAD;EACmB;EACO;EACxB,WAAW;EAEX,UAAA,oBAAC,OAAD;GACE,KAAK;GACL,GAAI,oBACF,QACA,kBAAkB,OAAO,eACzB,eAAe,KAAA,CACjB;GACA,WAAW,YAAY,aAAa,KAAA;GACpC,sBAAoB;GACpB,6BAA2B,YAAY,KAAA;GACvC,OAAO;IACL,GAAG,YAAY;IACf,SAAS;IACT,OAAO;GACT;GAIC,UAAA,YAAY,aACV,SAAS,UACR,oBAAC,OAAD;IACE,GAAI;IACJ,WAAW,MAAM,aAAa,KAAA;IAC9B,OAAO;KAAE,GAAG,MAAM;KAAW,SAAS;IAAW;IAEhD,UAAA;GACE,CAAA,GAGP,oBAAC,uBAAD;IAAuB,OAAO;IAC5B,UAAA,oBAAC,gBAAD;KAAgB,OAAO;KAAO;IAAyB,CAAA;GAClC,CAAA,CACzB;EACG,CAAA;CACM,CAAA,CACb,EAAA,CAAA;AAEN"}