pixelize-native-library 1.0.6

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 (713) hide show
  1. package/README.md +34 -0
  2. package/lib/module/core/MODULE.md +94 -0
  3. package/lib/module/core/a11y/MODULE.md +22 -0
  4. package/lib/module/core/a11y/index.js +26 -0
  5. package/lib/module/core/a11y/index.js.map +1 -0
  6. package/lib/module/core/icon/MODULE.md +35 -0
  7. package/lib/module/core/icon/index.js +92 -0
  8. package/lib/module/core/icon/index.js.map +1 -0
  9. package/lib/module/core/style/index.js +4 -0
  10. package/lib/module/core/style/index.js.map +1 -0
  11. package/lib/module/core/style/layoutStyle.js +4 -0
  12. package/lib/module/core/style/layoutStyle.js.map +1 -0
  13. package/lib/module/core/style/variants.js +115 -0
  14. package/lib/module/core/style/variants.js.map +1 -0
  15. package/lib/module/index.js +13 -0
  16. package/lib/module/index.js.map +1 -0
  17. package/lib/module/modules/accordion/Accordion.js +194 -0
  18. package/lib/module/modules/accordion/Accordion.js.map +1 -0
  19. package/lib/module/modules/accordion/Accordion.variants.js +143 -0
  20. package/lib/module/modules/accordion/Accordion.variants.js.map +1 -0
  21. package/lib/module/modules/accordion/MODULE.md +97 -0
  22. package/lib/module/modules/accordion/index.js +10 -0
  23. package/lib/module/modules/accordion/index.js.map +1 -0
  24. package/lib/module/modules/alert-dialog/AlertDialog.js +62 -0
  25. package/lib/module/modules/alert-dialog/AlertDialog.js.map +1 -0
  26. package/lib/module/modules/alert-dialog/AlertDialog.variants.js +44 -0
  27. package/lib/module/modules/alert-dialog/AlertDialog.variants.js.map +1 -0
  28. package/lib/module/modules/alert-dialog/MODULE.md +81 -0
  29. package/lib/module/modules/alert-dialog/index.js +10 -0
  30. package/lib/module/modules/alert-dialog/index.js.map +1 -0
  31. package/lib/module/modules/avatar/Avatar.js +57 -0
  32. package/lib/module/modules/avatar/Avatar.js.map +1 -0
  33. package/lib/module/modules/avatar/Avatar.variants.js +127 -0
  34. package/lib/module/modules/avatar/Avatar.variants.js.map +1 -0
  35. package/lib/module/modules/avatar/MODULE.md +76 -0
  36. package/lib/module/modules/avatar/index.js +12 -0
  37. package/lib/module/modules/avatar/index.js.map +1 -0
  38. package/lib/module/modules/badge/Badge.js +56 -0
  39. package/lib/module/modules/badge/Badge.js.map +1 -0
  40. package/lib/module/modules/badge/Badge.variants.js +124 -0
  41. package/lib/module/modules/badge/Badge.variants.js.map +1 -0
  42. package/lib/module/modules/badge/MODULE.md +82 -0
  43. package/lib/module/modules/badge/index.js +12 -0
  44. package/lib/module/modules/badge/index.js.map +1 -0
  45. package/lib/module/modules/bottom-nav/BottomNav.js +257 -0
  46. package/lib/module/modules/bottom-nav/BottomNav.js.map +1 -0
  47. package/lib/module/modules/bottom-nav/BottomNav.search.js +153 -0
  48. package/lib/module/modules/bottom-nav/BottomNav.search.js.map +1 -0
  49. package/lib/module/modules/bottom-nav/BottomNav.variants.js +164 -0
  50. package/lib/module/modules/bottom-nav/BottomNav.variants.js.map +1 -0
  51. package/lib/module/modules/bottom-nav/BottomNavOverflowSheet.js +297 -0
  52. package/lib/module/modules/bottom-nav/BottomNavOverflowSheet.js.map +1 -0
  53. package/lib/module/modules/bottom-nav/MODULE.md +198 -0
  54. package/lib/module/modules/bottom-nav/index.js +16 -0
  55. package/lib/module/modules/bottom-nav/index.js.map +1 -0
  56. package/lib/module/modules/button/Button.js +173 -0
  57. package/lib/module/modules/button/Button.js.map +1 -0
  58. package/lib/module/modules/button/Button.variants.js +173 -0
  59. package/lib/module/modules/button/Button.variants.js.map +1 -0
  60. package/lib/module/modules/button/MODULE.md +87 -0
  61. package/lib/module/modules/button/index.js +12 -0
  62. package/lib/module/modules/button/index.js.map +1 -0
  63. package/lib/module/modules/button-group/ButtonGroup.js +106 -0
  64. package/lib/module/modules/button-group/ButtonGroup.js.map +1 -0
  65. package/lib/module/modules/button-group/ButtonGroup.variants.js +220 -0
  66. package/lib/module/modules/button-group/ButtonGroup.variants.js.map +1 -0
  67. package/lib/module/modules/button-group/MODULE.md +129 -0
  68. package/lib/module/modules/button-group/index.js +11 -0
  69. package/lib/module/modules/button-group/index.js.map +1 -0
  70. package/lib/module/modules/card/Card.js +39 -0
  71. package/lib/module/modules/card/Card.js.map +1 -0
  72. package/lib/module/modules/card/Card.variants.js +75 -0
  73. package/lib/module/modules/card/Card.variants.js.map +1 -0
  74. package/lib/module/modules/card/MODULE.md +81 -0
  75. package/lib/module/modules/card/index.js +10 -0
  76. package/lib/module/modules/card/index.js.map +1 -0
  77. package/lib/module/modules/checkbox/Checkbox.js +115 -0
  78. package/lib/module/modules/checkbox/Checkbox.js.map +1 -0
  79. package/lib/module/modules/checkbox/Checkbox.variants.js +122 -0
  80. package/lib/module/modules/checkbox/Checkbox.variants.js.map +1 -0
  81. package/lib/module/modules/checkbox/MODULE.md +76 -0
  82. package/lib/module/modules/checkbox/index.js +11 -0
  83. package/lib/module/modules/checkbox/index.js.map +1 -0
  84. package/lib/module/modules/divider/Divider.js +35 -0
  85. package/lib/module/modules/divider/Divider.js.map +1 -0
  86. package/lib/module/modules/divider/Divider.variants.js +51 -0
  87. package/lib/module/modules/divider/Divider.variants.js.map +1 -0
  88. package/lib/module/modules/divider/MODULE.md +61 -0
  89. package/lib/module/modules/divider/index.js +10 -0
  90. package/lib/module/modules/divider/index.js.map +1 -0
  91. package/lib/module/modules/drawer/Drawer.js +171 -0
  92. package/lib/module/modules/drawer/Drawer.js.map +1 -0
  93. package/lib/module/modules/drawer/Drawer.variants.js +118 -0
  94. package/lib/module/modules/drawer/Drawer.variants.js.map +1 -0
  95. package/lib/module/modules/drawer/MODULE.md +161 -0
  96. package/lib/module/modules/drawer/index.js +10 -0
  97. package/lib/module/modules/drawer/index.js.map +1 -0
  98. package/lib/module/modules/empty-state/EmptyState.js +79 -0
  99. package/lib/module/modules/empty-state/EmptyState.js.map +1 -0
  100. package/lib/module/modules/empty-state/EmptyState.variants.js +54 -0
  101. package/lib/module/modules/empty-state/EmptyState.variants.js.map +1 -0
  102. package/lib/module/modules/empty-state/MODULE.md +78 -0
  103. package/lib/module/modules/empty-state/index.js +13 -0
  104. package/lib/module/modules/empty-state/index.js.map +1 -0
  105. package/lib/module/modules/file-upload/FileUpload.js +132 -0
  106. package/lib/module/modules/file-upload/FileUpload.js.map +1 -0
  107. package/lib/module/modules/file-upload/FileUpload.variants.js +179 -0
  108. package/lib/module/modules/file-upload/FileUpload.variants.js.map +1 -0
  109. package/lib/module/modules/file-upload/MODULE.md +130 -0
  110. package/lib/module/modules/file-upload/index.js +10 -0
  111. package/lib/module/modules/file-upload/index.js.map +1 -0
  112. package/lib/module/modules/filter-sheet/FilterChip.js +79 -0
  113. package/lib/module/modules/filter-sheet/FilterChip.js.map +1 -0
  114. package/lib/module/modules/filter-sheet/FilterSheet.js +98 -0
  115. package/lib/module/modules/filter-sheet/FilterSheet.js.map +1 -0
  116. package/lib/module/modules/filter-sheet/FilterSheet.variants.js +156 -0
  117. package/lib/module/modules/filter-sheet/FilterSheet.variants.js.map +1 -0
  118. package/lib/module/modules/filter-sheet/FilterSheetBody.js +175 -0
  119. package/lib/module/modules/filter-sheet/FilterSheetBody.js.map +1 -0
  120. package/lib/module/modules/filter-sheet/MODULE.md +115 -0
  121. package/lib/module/modules/filter-sheet/filterSheet.helpers.js +90 -0
  122. package/lib/module/modules/filter-sheet/filterSheet.helpers.js.map +1 -0
  123. package/lib/module/modules/filter-sheet/index.js +14 -0
  124. package/lib/module/modules/filter-sheet/index.js.map +1 -0
  125. package/lib/module/modules/input/Input.js +132 -0
  126. package/lib/module/modules/input/Input.js.map +1 -0
  127. package/lib/module/modules/input/Input.variants.js +122 -0
  128. package/lib/module/modules/input/Input.variants.js.map +1 -0
  129. package/lib/module/modules/input/MODULE.md +97 -0
  130. package/lib/module/modules/input/index.js +13 -0
  131. package/lib/module/modules/input/index.js.map +1 -0
  132. package/lib/module/modules/menu/MODULE.md +103 -0
  133. package/lib/module/modules/menu/Menu.js +128 -0
  134. package/lib/module/modules/menu/Menu.js.map +1 -0
  135. package/lib/module/modules/menu/Menu.variants.js +75 -0
  136. package/lib/module/modules/menu/Menu.variants.js.map +1 -0
  137. package/lib/module/modules/menu/index.js +12 -0
  138. package/lib/module/modules/menu/index.js.map +1 -0
  139. package/lib/module/modules/modal/MODULE.md +138 -0
  140. package/lib/module/modules/modal/Modal.js +101 -0
  141. package/lib/module/modules/modal/Modal.js.map +1 -0
  142. package/lib/module/modules/modal/Modal.variants.js +92 -0
  143. package/lib/module/modules/modal/Modal.variants.js.map +1 -0
  144. package/lib/module/modules/modal/ModalPortalContext.js +25 -0
  145. package/lib/module/modules/modal/ModalPortalContext.js.map +1 -0
  146. package/lib/module/modules/modal/ModalPortalProvider.js +22 -0
  147. package/lib/module/modules/modal/ModalPortalProvider.js.map +1 -0
  148. package/lib/module/modules/modal/index.js +16 -0
  149. package/lib/module/modules/modal/index.js.map +1 -0
  150. package/lib/module/modules/modal/renderWebPortal.js +18 -0
  151. package/lib/module/modules/modal/renderWebPortal.js.map +1 -0
  152. package/lib/module/modules/modal/renderWebPortal.web.js +24 -0
  153. package/lib/module/modules/modal/renderWebPortal.web.js.map +1 -0
  154. package/lib/module/modules/multi-select/MODULE.md +100 -0
  155. package/lib/module/modules/multi-select/MultiSelect.js +204 -0
  156. package/lib/module/modules/multi-select/MultiSelect.js.map +1 -0
  157. package/lib/module/modules/multi-select/MultiSelect.variants.js +195 -0
  158. package/lib/module/modules/multi-select/MultiSelect.variants.js.map +1 -0
  159. package/lib/module/modules/multi-select/index.js +11 -0
  160. package/lib/module/modules/multi-select/index.js.map +1 -0
  161. package/lib/module/modules/number-input/MODULE.md +108 -0
  162. package/lib/module/modules/number-input/NumberInput.js +253 -0
  163. package/lib/module/modules/number-input/NumberInput.js.map +1 -0
  164. package/lib/module/modules/number-input/NumberInput.variants.js +200 -0
  165. package/lib/module/modules/number-input/NumberInput.variants.js.map +1 -0
  166. package/lib/module/modules/number-input/index.js +12 -0
  167. package/lib/module/modules/number-input/index.js.map +1 -0
  168. package/lib/module/modules/pin-input/MODULE.md +134 -0
  169. package/lib/module/modules/pin-input/PinInput.js +158 -0
  170. package/lib/module/modules/pin-input/PinInput.js.map +1 -0
  171. package/lib/module/modules/pin-input/PinInput.variants.js +183 -0
  172. package/lib/module/modules/pin-input/PinInput.variants.js.map +1 -0
  173. package/lib/module/modules/pin-input/index.js +11 -0
  174. package/lib/module/modules/pin-input/index.js.map +1 -0
  175. package/lib/module/modules/progress-bar/MODULE.md +101 -0
  176. package/lib/module/modules/progress-bar/ProgressBar.js +102 -0
  177. package/lib/module/modules/progress-bar/ProgressBar.js.map +1 -0
  178. package/lib/module/modules/progress-bar/ProgressBar.variants.js +151 -0
  179. package/lib/module/modules/progress-bar/ProgressBar.variants.js.map +1 -0
  180. package/lib/module/modules/progress-bar/index.js +12 -0
  181. package/lib/module/modules/progress-bar/index.js.map +1 -0
  182. package/lib/module/modules/radio-group/MODULE.md +75 -0
  183. package/lib/module/modules/radio-group/RadioGroup.js +87 -0
  184. package/lib/module/modules/radio-group/RadioGroup.js.map +1 -0
  185. package/lib/module/modules/radio-group/RadioGroup.variants.js +163 -0
  186. package/lib/module/modules/radio-group/RadioGroup.variants.js.map +1 -0
  187. package/lib/module/modules/radio-group/index.js +11 -0
  188. package/lib/module/modules/radio-group/index.js.map +1 -0
  189. package/lib/module/modules/reorder/MODULE.md +131 -0
  190. package/lib/module/modules/reorder/Reorder.js +291 -0
  191. package/lib/module/modules/reorder/Reorder.js.map +1 -0
  192. package/lib/module/modules/reorder/Reorder.variants.js +172 -0
  193. package/lib/module/modules/reorder/Reorder.variants.js.map +1 -0
  194. package/lib/module/modules/reorder/index.js +11 -0
  195. package/lib/module/modules/reorder/index.js.map +1 -0
  196. package/lib/module/modules/select/MODULE.md +91 -0
  197. package/lib/module/modules/select/Select.js +178 -0
  198. package/lib/module/modules/select/Select.js.map +1 -0
  199. package/lib/module/modules/select/Select.variants.js +146 -0
  200. package/lib/module/modules/select/Select.variants.js.map +1 -0
  201. package/lib/module/modules/select/index.js +10 -0
  202. package/lib/module/modules/select/index.js.map +1 -0
  203. package/lib/module/modules/skeleton/MODULE.md +87 -0
  204. package/lib/module/modules/skeleton/Skeleton.js +78 -0
  205. package/lib/module/modules/skeleton/Skeleton.js.map +1 -0
  206. package/lib/module/modules/skeleton/Skeleton.variants.js +145 -0
  207. package/lib/module/modules/skeleton/Skeleton.variants.js.map +1 -0
  208. package/lib/module/modules/skeleton/index.js +10 -0
  209. package/lib/module/modules/skeleton/index.js.map +1 -0
  210. package/lib/module/modules/slider/MODULE.md +95 -0
  211. package/lib/module/modules/slider/Slider.js +183 -0
  212. package/lib/module/modules/slider/Slider.js.map +1 -0
  213. package/lib/module/modules/slider/Slider.variants.js +258 -0
  214. package/lib/module/modules/slider/Slider.variants.js.map +1 -0
  215. package/lib/module/modules/slider/index.js +10 -0
  216. package/lib/module/modules/slider/index.js.map +1 -0
  217. package/lib/module/modules/spinner/MODULE.md +97 -0
  218. package/lib/module/modules/spinner/Spinner.js +58 -0
  219. package/lib/module/modules/spinner/Spinner.js.map +1 -0
  220. package/lib/module/modules/spinner/Spinner.variants.js +131 -0
  221. package/lib/module/modules/spinner/Spinner.variants.js.map +1 -0
  222. package/lib/module/modules/spinner/index.js +11 -0
  223. package/lib/module/modules/spinner/index.js.map +1 -0
  224. package/lib/module/modules/stepper/MODULE.md +88 -0
  225. package/lib/module/modules/stepper/Stepper.js +100 -0
  226. package/lib/module/modules/stepper/Stepper.js.map +1 -0
  227. package/lib/module/modules/stepper/Stepper.variants.js +146 -0
  228. package/lib/module/modules/stepper/Stepper.variants.js.map +1 -0
  229. package/lib/module/modules/stepper/index.js +10 -0
  230. package/lib/module/modules/stepper/index.js.map +1 -0
  231. package/lib/module/modules/switch/MODULE.md +65 -0
  232. package/lib/module/modules/switch/Switch.js +53 -0
  233. package/lib/module/modules/switch/Switch.js.map +1 -0
  234. package/lib/module/modules/switch/Switch.variants.js +61 -0
  235. package/lib/module/modules/switch/Switch.variants.js.map +1 -0
  236. package/lib/module/modules/switch/index.js +10 -0
  237. package/lib/module/modules/switch/index.js.map +1 -0
  238. package/lib/module/modules/tabs/MODULE.md +80 -0
  239. package/lib/module/modules/tabs/Tabs.js +127 -0
  240. package/lib/module/modules/tabs/Tabs.js.map +1 -0
  241. package/lib/module/modules/tabs/Tabs.variants.js +135 -0
  242. package/lib/module/modules/tabs/Tabs.variants.js.map +1 -0
  243. package/lib/module/modules/tabs/index.js +12 -0
  244. package/lib/module/modules/tabs/index.js.map +1 -0
  245. package/lib/module/modules/textarea/MODULE.md +91 -0
  246. package/lib/module/modules/textarea/Textarea.js +136 -0
  247. package/lib/module/modules/textarea/Textarea.js.map +1 -0
  248. package/lib/module/modules/textarea/Textarea.variants.js +113 -0
  249. package/lib/module/modules/textarea/Textarea.variants.js.map +1 -0
  250. package/lib/module/modules/textarea/index.js +10 -0
  251. package/lib/module/modules/textarea/index.js.map +1 -0
  252. package/lib/module/modules/timeline/MODULE.md +95 -0
  253. package/lib/module/modules/timeline/Timeline.js +92 -0
  254. package/lib/module/modules/timeline/Timeline.js.map +1 -0
  255. package/lib/module/modules/timeline/Timeline.variants.js +146 -0
  256. package/lib/module/modules/timeline/Timeline.variants.js.map +1 -0
  257. package/lib/module/modules/timeline/index.js +12 -0
  258. package/lib/module/modules/timeline/index.js.map +1 -0
  259. package/lib/module/modules/toast/MODULE.md +104 -0
  260. package/lib/module/modules/toast/Toast.js +178 -0
  261. package/lib/module/modules/toast/Toast.js.map +1 -0
  262. package/lib/module/modules/toast/Toast.variants.js +120 -0
  263. package/lib/module/modules/toast/Toast.variants.js.map +1 -0
  264. package/lib/module/modules/toast/index.js +13 -0
  265. package/lib/module/modules/toast/index.js.map +1 -0
  266. package/lib/module/modules/tooltip/MODULE.md +86 -0
  267. package/lib/module/modules/tooltip/Tooltip.js +115 -0
  268. package/lib/module/modules/tooltip/Tooltip.js.map +1 -0
  269. package/lib/module/modules/tooltip/Tooltip.variants.js +75 -0
  270. package/lib/module/modules/tooltip/Tooltip.variants.js.map +1 -0
  271. package/lib/module/modules/tooltip/index.js +10 -0
  272. package/lib/module/modules/tooltip/index.js.map +1 -0
  273. package/lib/module/package.json +1 -0
  274. package/lib/module/theme/MODULE.md +87 -0
  275. package/lib/module/theme/index.js +15 -0
  276. package/lib/module/theme/index.js.map +1 -0
  277. package/lib/module/theme/platform/MODULE.md +102 -0
  278. package/lib/module/theme/platform/colorScheme.native.js +24 -0
  279. package/lib/module/theme/platform/colorScheme.native.js.map +1 -0
  280. package/lib/module/theme/platform/elevation.native.js +75 -0
  281. package/lib/module/theme/platform/elevation.native.js.map +1 -0
  282. package/lib/module/theme/platform/fonts.native.js +58 -0
  283. package/lib/module/theme/platform/fonts.native.js.map +1 -0
  284. package/lib/module/theme/platform/index.js +14 -0
  285. package/lib/module/theme/platform/index.js.map +1 -0
  286. package/lib/module/theme/platform/units.native.js +18 -0
  287. package/lib/module/theme/platform/units.native.js.map +1 -0
  288. package/lib/module/theme/provider/PixelizeProvider.js +149 -0
  289. package/lib/module/theme/provider/PixelizeProvider.js.map +1 -0
  290. package/lib/module/theme/provider/colorModeStorage.js +63 -0
  291. package/lib/module/theme/provider/colorModeStorage.js.map +1 -0
  292. package/lib/module/theme/provider/index.js +8 -0
  293. package/lib/module/theme/provider/index.js.map +1 -0
  294. package/lib/module/theme/provider/useTheme.js +13 -0
  295. package/lib/module/theme/provider/useTheme.js.map +1 -0
  296. package/lib/module/theme/provider/useThemeColors.js +13 -0
  297. package/lib/module/theme/provider/useThemeColors.js.map +1 -0
  298. package/lib/module/theme/provider/useThemeMode.js +13 -0
  299. package/lib/module/theme/provider/useThemeMode.js.map +1 -0
  300. package/lib/module/theme/tokens/MODULE.md +102 -0
  301. package/lib/module/theme/tokens/brands/emerald/palette.dark.js +9 -0
  302. package/lib/module/theme/tokens/brands/emerald/palette.dark.js.map +1 -0
  303. package/lib/module/theme/tokens/brands/emerald/palette.light.js +125 -0
  304. package/lib/module/theme/tokens/brands/emerald/palette.light.js.map +1 -0
  305. package/lib/module/theme/tokens/brands/index.js +91 -0
  306. package/lib/module/theme/tokens/brands/index.js.map +1 -0
  307. package/lib/module/theme/tokens/brands/lavender/palette.dark.js +9 -0
  308. package/lib/module/theme/tokens/brands/lavender/palette.dark.js.map +1 -0
  309. package/lib/module/theme/tokens/brands/lavender/palette.light.js +376 -0
  310. package/lib/module/theme/tokens/brands/lavender/palette.light.js.map +1 -0
  311. package/lib/module/theme/tokens/brands/meadow/palette.dark.js +9 -0
  312. package/lib/module/theme/tokens/brands/meadow/palette.dark.js.map +1 -0
  313. package/lib/module/theme/tokens/brands/meadow/palette.light.js +126 -0
  314. package/lib/module/theme/tokens/brands/meadow/palette.light.js.map +1 -0
  315. package/lib/module/theme/tokens/brands/radiant/palette.dark.js +9 -0
  316. package/lib/module/theme/tokens/brands/radiant/palette.dark.js.map +1 -0
  317. package/lib/module/theme/tokens/brands/radiant/palette.light.js +125 -0
  318. package/lib/module/theme/tokens/brands/radiant/palette.light.js.map +1 -0
  319. package/lib/module/theme/tokens/brands/rosewood/palette.dark.js +9 -0
  320. package/lib/module/theme/tokens/brands/rosewood/palette.dark.js.map +1 -0
  321. package/lib/module/theme/tokens/brands/rosewood/palette.light.js +125 -0
  322. package/lib/module/theme/tokens/brands/rosewood/palette.light.js.map +1 -0
  323. package/lib/module/theme/tokens/brands/skyline/palette.dark.js +9 -0
  324. package/lib/module/theme/tokens/brands/skyline/palette.dark.js.map +1 -0
  325. package/lib/module/theme/tokens/brands/skyline/palette.light.js +126 -0
  326. package/lib/module/theme/tokens/brands/skyline/palette.light.js.map +1 -0
  327. package/lib/module/theme/tokens/brands/slate/palette.dark.js +11 -0
  328. package/lib/module/theme/tokens/brands/slate/palette.dark.js.map +1 -0
  329. package/lib/module/theme/tokens/brands/slate/palette.light.js +129 -0
  330. package/lib/module/theme/tokens/brands/slate/palette.light.js.map +1 -0
  331. package/lib/module/theme/tokens/brands/storefront/palette.dark.js +7 -0
  332. package/lib/module/theme/tokens/brands/storefront/palette.dark.js.map +1 -0
  333. package/lib/module/theme/tokens/brands/storefront/palette.light.js +127 -0
  334. package/lib/module/theme/tokens/brands/storefront/palette.light.js.map +1 -0
  335. package/lib/module/theme/tokens/brands/zinc/palette.dark.js +222 -0
  336. package/lib/module/theme/tokens/brands/zinc/palette.dark.js.map +1 -0
  337. package/lib/module/theme/tokens/brands/zinc/palette.light.js +393 -0
  338. package/lib/module/theme/tokens/brands/zinc/palette.light.js.map +1 -0
  339. package/lib/module/theme/tokens/builders/accentText.js +66 -0
  340. package/lib/module/theme/tokens/builders/accentText.js.map +1 -0
  341. package/lib/module/theme/tokens/builders/buildBrandTokens.js +38 -0
  342. package/lib/module/theme/tokens/builders/buildBrandTokens.js.map +1 -0
  343. package/lib/module/theme/tokens/builders/buildDarkPalette.js +300 -0
  344. package/lib/module/theme/tokens/builders/buildDarkPalette.js.map +1 -0
  345. package/lib/module/theme/tokens/builders/color.js +187 -0
  346. package/lib/module/theme/tokens/builders/color.js.map +1 -0
  347. package/lib/module/theme/tokens/index.js +27 -0
  348. package/lib/module/theme/tokens/index.js.map +1 -0
  349. package/lib/module/theme/tokens/primitives/borderWidths.js +16 -0
  350. package/lib/module/theme/tokens/primitives/borderWidths.js.map +1 -0
  351. package/lib/module/theme/tokens/primitives/breakpoints.js +18 -0
  352. package/lib/module/theme/tokens/primitives/breakpoints.js.map +1 -0
  353. package/lib/module/theme/tokens/primitives/elevation.js +95 -0
  354. package/lib/module/theme/tokens/primitives/elevation.js.map +1 -0
  355. package/lib/module/theme/tokens/primitives/fontSizes.js +22 -0
  356. package/lib/module/theme/tokens/primitives/fontSizes.js.map +1 -0
  357. package/lib/module/theme/tokens/primitives/fontWeights.js +23 -0
  358. package/lib/module/theme/tokens/primitives/fontWeights.js.map +1 -0
  359. package/lib/module/theme/tokens/primitives/index.js +14 -0
  360. package/lib/module/theme/tokens/primitives/index.js.map +1 -0
  361. package/lib/module/theme/tokens/primitives/letterSpacings.js +18 -0
  362. package/lib/module/theme/tokens/primitives/letterSpacings.js.map +1 -0
  363. package/lib/module/theme/tokens/primitives/lineHeights.js +21 -0
  364. package/lib/module/theme/tokens/primitives/lineHeights.js.map +1 -0
  365. package/lib/module/theme/tokens/primitives/radii.js +21 -0
  366. package/lib/module/theme/tokens/primitives/radii.js.map +1 -0
  367. package/lib/module/theme/tokens/primitives/sizes.js +34 -0
  368. package/lib/module/theme/tokens/primitives/sizes.js.map +1 -0
  369. package/lib/module/theme/tokens/primitives/space.js +30 -0
  370. package/lib/module/theme/tokens/primitives/space.js.map +1 -0
  371. package/lib/module/theme/tokens/primitives/zIndices.js +23 -0
  372. package/lib/module/theme/tokens/primitives/zIndices.js.map +1 -0
  373. package/lib/module/theme/tokens/roles/index.js +126 -0
  374. package/lib/module/theme/tokens/roles/index.js.map +1 -0
  375. package/lib/module/theme/tokens/types.js +2 -0
  376. package/lib/module/theme/tokens/types.js.map +1 -0
  377. package/lib/typescript/core/a11y/index.d.ts +7 -0
  378. package/lib/typescript/core/a11y/index.d.ts.map +1 -0
  379. package/lib/typescript/core/icon/index.d.ts +60 -0
  380. package/lib/typescript/core/icon/index.d.ts.map +1 -0
  381. package/lib/typescript/core/style/index.d.ts +4 -0
  382. package/lib/typescript/core/style/index.d.ts.map +1 -0
  383. package/lib/typescript/core/style/layoutStyle.d.ts +19 -0
  384. package/lib/typescript/core/style/layoutStyle.d.ts.map +1 -0
  385. package/lib/typescript/core/style/variants.d.ts +55 -0
  386. package/lib/typescript/core/style/variants.d.ts.map +1 -0
  387. package/lib/typescript/index.d.ts +11 -0
  388. package/lib/typescript/index.d.ts.map +1 -0
  389. package/lib/typescript/modules/accordion/Accordion.d.ts +57 -0
  390. package/lib/typescript/modules/accordion/Accordion.d.ts.map +1 -0
  391. package/lib/typescript/modules/accordion/Accordion.variants.d.ts +131 -0
  392. package/lib/typescript/modules/accordion/Accordion.variants.d.ts.map +1 -0
  393. package/lib/typescript/modules/accordion/index.d.ts +9 -0
  394. package/lib/typescript/modules/accordion/index.d.ts.map +1 -0
  395. package/lib/typescript/modules/alert-dialog/AlertDialog.d.ts +24 -0
  396. package/lib/typescript/modules/alert-dialog/AlertDialog.d.ts.map +1 -0
  397. package/lib/typescript/modules/alert-dialog/AlertDialog.variants.d.ts +29 -0
  398. package/lib/typescript/modules/alert-dialog/AlertDialog.variants.d.ts.map +1 -0
  399. package/lib/typescript/modules/alert-dialog/index.d.ts +9 -0
  400. package/lib/typescript/modules/alert-dialog/index.d.ts.map +1 -0
  401. package/lib/typescript/modules/avatar/Avatar.d.ts +30 -0
  402. package/lib/typescript/modules/avatar/Avatar.d.ts.map +1 -0
  403. package/lib/typescript/modules/avatar/Avatar.variants.d.ts +123 -0
  404. package/lib/typescript/modules/avatar/Avatar.variants.d.ts.map +1 -0
  405. package/lib/typescript/modules/avatar/index.d.ts +11 -0
  406. package/lib/typescript/modules/avatar/index.d.ts.map +1 -0
  407. package/lib/typescript/modules/badge/Badge.d.ts +19 -0
  408. package/lib/typescript/modules/badge/Badge.d.ts.map +1 -0
  409. package/lib/typescript/modules/badge/Badge.variants.d.ts +102 -0
  410. package/lib/typescript/modules/badge/Badge.variants.d.ts.map +1 -0
  411. package/lib/typescript/modules/badge/index.d.ts +10 -0
  412. package/lib/typescript/modules/badge/index.d.ts.map +1 -0
  413. package/lib/typescript/modules/bottom-nav/BottomNav.d.ts +106 -0
  414. package/lib/typescript/modules/bottom-nav/BottomNav.d.ts.map +1 -0
  415. package/lib/typescript/modules/bottom-nav/BottomNav.search.d.ts +61 -0
  416. package/lib/typescript/modules/bottom-nav/BottomNav.search.d.ts.map +1 -0
  417. package/lib/typescript/modules/bottom-nav/BottomNav.variants.d.ts +122 -0
  418. package/lib/typescript/modules/bottom-nav/BottomNav.variants.d.ts.map +1 -0
  419. package/lib/typescript/modules/bottom-nav/BottomNavOverflowSheet.d.ts +39 -0
  420. package/lib/typescript/modules/bottom-nav/BottomNavOverflowSheet.d.ts.map +1 -0
  421. package/lib/typescript/modules/bottom-nav/index.d.ts +12 -0
  422. package/lib/typescript/modules/bottom-nav/index.d.ts.map +1 -0
  423. package/lib/typescript/modules/button/Button.d.ts +43 -0
  424. package/lib/typescript/modules/button/Button.d.ts.map +1 -0
  425. package/lib/typescript/modules/button/Button.variants.d.ts +156 -0
  426. package/lib/typescript/modules/button/Button.variants.d.ts.map +1 -0
  427. package/lib/typescript/modules/button/index.d.ts +10 -0
  428. package/lib/typescript/modules/button/index.d.ts.map +1 -0
  429. package/lib/typescript/modules/button-group/ButtonGroup.d.ts +37 -0
  430. package/lib/typescript/modules/button-group/ButtonGroup.d.ts.map +1 -0
  431. package/lib/typescript/modules/button-group/ButtonGroup.variants.d.ts +217 -0
  432. package/lib/typescript/modules/button-group/ButtonGroup.variants.d.ts.map +1 -0
  433. package/lib/typescript/modules/button-group/index.d.ts +10 -0
  434. package/lib/typescript/modules/button-group/index.d.ts.map +1 -0
  435. package/lib/typescript/modules/card/Card.d.ts +20 -0
  436. package/lib/typescript/modules/card/Card.d.ts.map +1 -0
  437. package/lib/typescript/modules/card/Card.variants.d.ts +51 -0
  438. package/lib/typescript/modules/card/Card.variants.d.ts.map +1 -0
  439. package/lib/typescript/modules/card/index.d.ts +9 -0
  440. package/lib/typescript/modules/card/index.d.ts.map +1 -0
  441. package/lib/typescript/modules/checkbox/Checkbox.d.ts +43 -0
  442. package/lib/typescript/modules/checkbox/Checkbox.d.ts.map +1 -0
  443. package/lib/typescript/modules/checkbox/Checkbox.variants.d.ts +120 -0
  444. package/lib/typescript/modules/checkbox/Checkbox.variants.d.ts.map +1 -0
  445. package/lib/typescript/modules/checkbox/index.d.ts +10 -0
  446. package/lib/typescript/modules/checkbox/index.d.ts.map +1 -0
  447. package/lib/typescript/modules/divider/Divider.d.ts +18 -0
  448. package/lib/typescript/modules/divider/Divider.d.ts.map +1 -0
  449. package/lib/typescript/modules/divider/Divider.variants.d.ts +42 -0
  450. package/lib/typescript/modules/divider/Divider.variants.d.ts.map +1 -0
  451. package/lib/typescript/modules/divider/index.d.ts +9 -0
  452. package/lib/typescript/modules/divider/index.d.ts.map +1 -0
  453. package/lib/typescript/modules/drawer/Drawer.d.ts +44 -0
  454. package/lib/typescript/modules/drawer/Drawer.d.ts.map +1 -0
  455. package/lib/typescript/modules/drawer/Drawer.variants.d.ts +80 -0
  456. package/lib/typescript/modules/drawer/Drawer.variants.d.ts.map +1 -0
  457. package/lib/typescript/modules/drawer/index.d.ts +8 -0
  458. package/lib/typescript/modules/drawer/index.d.ts.map +1 -0
  459. package/lib/typescript/modules/empty-state/EmptyState.d.ts +29 -0
  460. package/lib/typescript/modules/empty-state/EmptyState.d.ts.map +1 -0
  461. package/lib/typescript/modules/empty-state/EmptyState.variants.d.ts +43 -0
  462. package/lib/typescript/modules/empty-state/EmptyState.variants.d.ts.map +1 -0
  463. package/lib/typescript/modules/empty-state/index.d.ts +10 -0
  464. package/lib/typescript/modules/empty-state/index.d.ts.map +1 -0
  465. package/lib/typescript/modules/file-upload/FileUpload.d.ts +44 -0
  466. package/lib/typescript/modules/file-upload/FileUpload.d.ts.map +1 -0
  467. package/lib/typescript/modules/file-upload/FileUpload.variants.d.ts +114 -0
  468. package/lib/typescript/modules/file-upload/FileUpload.variants.d.ts.map +1 -0
  469. package/lib/typescript/modules/file-upload/index.d.ts +9 -0
  470. package/lib/typescript/modules/file-upload/index.d.ts.map +1 -0
  471. package/lib/typescript/modules/filter-sheet/FilterChip.d.ts +25 -0
  472. package/lib/typescript/modules/filter-sheet/FilterChip.d.ts.map +1 -0
  473. package/lib/typescript/modules/filter-sheet/FilterSheet.d.ts +54 -0
  474. package/lib/typescript/modules/filter-sheet/FilterSheet.d.ts.map +1 -0
  475. package/lib/typescript/modules/filter-sheet/FilterSheet.variants.d.ts +98 -0
  476. package/lib/typescript/modules/filter-sheet/FilterSheet.variants.d.ts.map +1 -0
  477. package/lib/typescript/modules/filter-sheet/FilterSheetBody.d.ts +28 -0
  478. package/lib/typescript/modules/filter-sheet/FilterSheetBody.d.ts.map +1 -0
  479. package/lib/typescript/modules/filter-sheet/filterSheet.helpers.d.ts +45 -0
  480. package/lib/typescript/modules/filter-sheet/filterSheet.helpers.d.ts.map +1 -0
  481. package/lib/typescript/modules/filter-sheet/index.d.ts +12 -0
  482. package/lib/typescript/modules/filter-sheet/index.d.ts.map +1 -0
  483. package/lib/typescript/modules/input/Input.d.ts +33 -0
  484. package/lib/typescript/modules/input/Input.d.ts.map +1 -0
  485. package/lib/typescript/modules/input/Input.variants.d.ts +116 -0
  486. package/lib/typescript/modules/input/Input.variants.d.ts.map +1 -0
  487. package/lib/typescript/modules/input/index.d.ts +10 -0
  488. package/lib/typescript/modules/input/index.d.ts.map +1 -0
  489. package/lib/typescript/modules/menu/Menu.d.ts +43 -0
  490. package/lib/typescript/modules/menu/Menu.d.ts.map +1 -0
  491. package/lib/typescript/modules/menu/Menu.variants.d.ts +41 -0
  492. package/lib/typescript/modules/menu/Menu.variants.d.ts.map +1 -0
  493. package/lib/typescript/modules/menu/index.d.ts +10 -0
  494. package/lib/typescript/modules/menu/index.d.ts.map +1 -0
  495. package/lib/typescript/modules/modal/Modal.d.ts +32 -0
  496. package/lib/typescript/modules/modal/Modal.d.ts.map +1 -0
  497. package/lib/typescript/modules/modal/Modal.variants.d.ts +72 -0
  498. package/lib/typescript/modules/modal/Modal.variants.d.ts.map +1 -0
  499. package/lib/typescript/modules/modal/ModalPortalContext.d.ts +2 -0
  500. package/lib/typescript/modules/modal/ModalPortalContext.d.ts.map +1 -0
  501. package/lib/typescript/modules/modal/ModalPortalProvider.d.ts +21 -0
  502. package/lib/typescript/modules/modal/ModalPortalProvider.d.ts.map +1 -0
  503. package/lib/typescript/modules/modal/index.d.ts +16 -0
  504. package/lib/typescript/modules/modal/index.d.ts.map +1 -0
  505. package/lib/typescript/modules/modal/renderWebPortal.d.ts +15 -0
  506. package/lib/typescript/modules/modal/renderWebPortal.d.ts.map +1 -0
  507. package/lib/typescript/modules/modal/renderWebPortal.web.d.ts +19 -0
  508. package/lib/typescript/modules/modal/renderWebPortal.web.d.ts.map +1 -0
  509. package/lib/typescript/modules/multi-select/MultiSelect.d.ts +33 -0
  510. package/lib/typescript/modules/multi-select/MultiSelect.d.ts.map +1 -0
  511. package/lib/typescript/modules/multi-select/MultiSelect.variants.d.ts +149 -0
  512. package/lib/typescript/modules/multi-select/MultiSelect.variants.d.ts.map +1 -0
  513. package/lib/typescript/modules/multi-select/index.d.ts +10 -0
  514. package/lib/typescript/modules/multi-select/index.d.ts.map +1 -0
  515. package/lib/typescript/modules/number-input/NumberInput.d.ts +34 -0
  516. package/lib/typescript/modules/number-input/NumberInput.d.ts.map +1 -0
  517. package/lib/typescript/modules/number-input/NumberInput.variants.d.ts +170 -0
  518. package/lib/typescript/modules/number-input/NumberInput.variants.d.ts.map +1 -0
  519. package/lib/typescript/modules/number-input/index.d.ts +11 -0
  520. package/lib/typescript/modules/number-input/index.d.ts.map +1 -0
  521. package/lib/typescript/modules/pin-input/PinInput.d.ts +40 -0
  522. package/lib/typescript/modules/pin-input/PinInput.d.ts.map +1 -0
  523. package/lib/typescript/modules/pin-input/PinInput.variants.d.ts +164 -0
  524. package/lib/typescript/modules/pin-input/PinInput.variants.d.ts.map +1 -0
  525. package/lib/typescript/modules/pin-input/index.d.ts +10 -0
  526. package/lib/typescript/modules/pin-input/index.d.ts.map +1 -0
  527. package/lib/typescript/modules/progress-bar/ProgressBar.d.ts +21 -0
  528. package/lib/typescript/modules/progress-bar/ProgressBar.d.ts.map +1 -0
  529. package/lib/typescript/modules/progress-bar/ProgressBar.variants.d.ts +112 -0
  530. package/lib/typescript/modules/progress-bar/ProgressBar.variants.d.ts.map +1 -0
  531. package/lib/typescript/modules/progress-bar/index.d.ts +11 -0
  532. package/lib/typescript/modules/progress-bar/index.d.ts.map +1 -0
  533. package/lib/typescript/modules/radio-group/RadioGroup.d.ts +27 -0
  534. package/lib/typescript/modules/radio-group/RadioGroup.d.ts.map +1 -0
  535. package/lib/typescript/modules/radio-group/RadioGroup.variants.d.ts +142 -0
  536. package/lib/typescript/modules/radio-group/RadioGroup.variants.d.ts.map +1 -0
  537. package/lib/typescript/modules/radio-group/index.d.ts +10 -0
  538. package/lib/typescript/modules/radio-group/index.d.ts.map +1 -0
  539. package/lib/typescript/modules/reorder/Reorder.d.ts +43 -0
  540. package/lib/typescript/modules/reorder/Reorder.d.ts.map +1 -0
  541. package/lib/typescript/modules/reorder/Reorder.variants.d.ts +116 -0
  542. package/lib/typescript/modules/reorder/Reorder.variants.d.ts.map +1 -0
  543. package/lib/typescript/modules/reorder/index.d.ts +9 -0
  544. package/lib/typescript/modules/reorder/index.d.ts.map +1 -0
  545. package/lib/typescript/modules/select/Select.d.ts +31 -0
  546. package/lib/typescript/modules/select/Select.d.ts.map +1 -0
  547. package/lib/typescript/modules/select/Select.variants.d.ts +127 -0
  548. package/lib/typescript/modules/select/Select.variants.d.ts.map +1 -0
  549. package/lib/typescript/modules/select/index.d.ts +9 -0
  550. package/lib/typescript/modules/select/index.d.ts.map +1 -0
  551. package/lib/typescript/modules/skeleton/Skeleton.d.ts +27 -0
  552. package/lib/typescript/modules/skeleton/Skeleton.d.ts.map +1 -0
  553. package/lib/typescript/modules/skeleton/Skeleton.variants.d.ts +119 -0
  554. package/lib/typescript/modules/skeleton/Skeleton.variants.d.ts.map +1 -0
  555. package/lib/typescript/modules/skeleton/index.d.ts +9 -0
  556. package/lib/typescript/modules/skeleton/index.d.ts.map +1 -0
  557. package/lib/typescript/modules/slider/Slider.d.ts +44 -0
  558. package/lib/typescript/modules/slider/Slider.d.ts.map +1 -0
  559. package/lib/typescript/modules/slider/Slider.variants.d.ts +211 -0
  560. package/lib/typescript/modules/slider/Slider.variants.d.ts.map +1 -0
  561. package/lib/typescript/modules/slider/index.d.ts +9 -0
  562. package/lib/typescript/modules/slider/index.d.ts.map +1 -0
  563. package/lib/typescript/modules/spinner/Spinner.d.ts +19 -0
  564. package/lib/typescript/modules/spinner/Spinner.d.ts.map +1 -0
  565. package/lib/typescript/modules/spinner/Spinner.variants.d.ts +113 -0
  566. package/lib/typescript/modules/spinner/Spinner.variants.d.ts.map +1 -0
  567. package/lib/typescript/modules/spinner/index.d.ts +10 -0
  568. package/lib/typescript/modules/spinner/index.d.ts.map +1 -0
  569. package/lib/typescript/modules/stepper/Stepper.d.ts +26 -0
  570. package/lib/typescript/modules/stepper/Stepper.d.ts.map +1 -0
  571. package/lib/typescript/modules/stepper/Stepper.variants.d.ts +107 -0
  572. package/lib/typescript/modules/stepper/Stepper.variants.d.ts.map +1 -0
  573. package/lib/typescript/modules/stepper/index.d.ts +8 -0
  574. package/lib/typescript/modules/stepper/index.d.ts.map +1 -0
  575. package/lib/typescript/modules/switch/Switch.d.ts +22 -0
  576. package/lib/typescript/modules/switch/Switch.d.ts.map +1 -0
  577. package/lib/typescript/modules/switch/Switch.variants.d.ts +60 -0
  578. package/lib/typescript/modules/switch/Switch.variants.d.ts.map +1 -0
  579. package/lib/typescript/modules/switch/index.d.ts +8 -0
  580. package/lib/typescript/modules/switch/index.d.ts.map +1 -0
  581. package/lib/typescript/modules/tabs/Tabs.d.ts +31 -0
  582. package/lib/typescript/modules/tabs/Tabs.d.ts.map +1 -0
  583. package/lib/typescript/modules/tabs/Tabs.variants.d.ts +114 -0
  584. package/lib/typescript/modules/tabs/Tabs.variants.d.ts.map +1 -0
  585. package/lib/typescript/modules/tabs/index.d.ts +10 -0
  586. package/lib/typescript/modules/tabs/index.d.ts.map +1 -0
  587. package/lib/typescript/modules/textarea/Textarea.d.ts +25 -0
  588. package/lib/typescript/modules/textarea/Textarea.d.ts.map +1 -0
  589. package/lib/typescript/modules/textarea/Textarea.variants.d.ts +99 -0
  590. package/lib/typescript/modules/textarea/Textarea.variants.d.ts.map +1 -0
  591. package/lib/typescript/modules/textarea/index.d.ts +9 -0
  592. package/lib/typescript/modules/textarea/index.d.ts.map +1 -0
  593. package/lib/typescript/modules/timeline/Timeline.d.ts +28 -0
  594. package/lib/typescript/modules/timeline/Timeline.d.ts.map +1 -0
  595. package/lib/typescript/modules/timeline/Timeline.variants.d.ts +103 -0
  596. package/lib/typescript/modules/timeline/Timeline.variants.d.ts.map +1 -0
  597. package/lib/typescript/modules/timeline/index.d.ts +9 -0
  598. package/lib/typescript/modules/timeline/index.d.ts.map +1 -0
  599. package/lib/typescript/modules/toast/Toast.d.ts +38 -0
  600. package/lib/typescript/modules/toast/Toast.d.ts.map +1 -0
  601. package/lib/typescript/modules/toast/Toast.variants.d.ts +80 -0
  602. package/lib/typescript/modules/toast/Toast.variants.d.ts.map +1 -0
  603. package/lib/typescript/modules/toast/index.d.ts +12 -0
  604. package/lib/typescript/modules/toast/index.d.ts.map +1 -0
  605. package/lib/typescript/modules/tooltip/Tooltip.d.ts +31 -0
  606. package/lib/typescript/modules/tooltip/Tooltip.d.ts.map +1 -0
  607. package/lib/typescript/modules/tooltip/Tooltip.variants.d.ts +52 -0
  608. package/lib/typescript/modules/tooltip/Tooltip.variants.d.ts.map +1 -0
  609. package/lib/typescript/modules/tooltip/index.d.ts +9 -0
  610. package/lib/typescript/modules/tooltip/index.d.ts.map +1 -0
  611. package/lib/typescript/package.json +1 -0
  612. package/lib/typescript/theme/index.d.ts +11 -0
  613. package/lib/typescript/theme/index.d.ts.map +1 -0
  614. package/lib/typescript/theme/platform/colorScheme.native.d.ts +12 -0
  615. package/lib/typescript/theme/platform/colorScheme.native.d.ts.map +1 -0
  616. package/lib/typescript/theme/platform/elevation.native.d.ts +35 -0
  617. package/lib/typescript/theme/platform/elevation.native.d.ts.map +1 -0
  618. package/lib/typescript/theme/platform/fonts.native.d.ts +41 -0
  619. package/lib/typescript/theme/platform/fonts.native.d.ts.map +1 -0
  620. package/lib/typescript/theme/platform/index.d.ts +15 -0
  621. package/lib/typescript/theme/platform/index.d.ts.map +1 -0
  622. package/lib/typescript/theme/platform/units.native.d.ts +13 -0
  623. package/lib/typescript/theme/platform/units.native.d.ts.map +1 -0
  624. package/lib/typescript/theme/provider/PixelizeProvider.d.ts +81 -0
  625. package/lib/typescript/theme/provider/PixelizeProvider.d.ts.map +1 -0
  626. package/lib/typescript/theme/provider/colorModeStorage.d.ts +43 -0
  627. package/lib/typescript/theme/provider/colorModeStorage.d.ts.map +1 -0
  628. package/lib/typescript/theme/provider/index.d.ts +8 -0
  629. package/lib/typescript/theme/provider/index.d.ts.map +1 -0
  630. package/lib/typescript/theme/provider/useTheme.d.ts +4 -0
  631. package/lib/typescript/theme/provider/useTheme.d.ts.map +1 -0
  632. package/lib/typescript/theme/provider/useThemeColors.d.ts +9 -0
  633. package/lib/typescript/theme/provider/useThemeColors.d.ts.map +1 -0
  634. package/lib/typescript/theme/provider/useThemeMode.d.ts +4 -0
  635. package/lib/typescript/theme/provider/useThemeMode.d.ts.map +1 -0
  636. package/lib/typescript/theme/tokens/brands/emerald/palette.dark.d.ts +3 -0
  637. package/lib/typescript/theme/tokens/brands/emerald/palette.dark.d.ts.map +1 -0
  638. package/lib/typescript/theme/tokens/brands/emerald/palette.light.d.ts +4 -0
  639. package/lib/typescript/theme/tokens/brands/emerald/palette.light.d.ts.map +1 -0
  640. package/lib/typescript/theme/tokens/brands/index.d.ts +30 -0
  641. package/lib/typescript/theme/tokens/brands/index.d.ts.map +1 -0
  642. package/lib/typescript/theme/tokens/brands/lavender/palette.dark.d.ts +3 -0
  643. package/lib/typescript/theme/tokens/brands/lavender/palette.dark.d.ts.map +1 -0
  644. package/lib/typescript/theme/tokens/brands/lavender/palette.light.d.ts +4 -0
  645. package/lib/typescript/theme/tokens/brands/lavender/palette.light.d.ts.map +1 -0
  646. package/lib/typescript/theme/tokens/brands/meadow/palette.dark.d.ts +3 -0
  647. package/lib/typescript/theme/tokens/brands/meadow/palette.dark.d.ts.map +1 -0
  648. package/lib/typescript/theme/tokens/brands/meadow/palette.light.d.ts +4 -0
  649. package/lib/typescript/theme/tokens/brands/meadow/palette.light.d.ts.map +1 -0
  650. package/lib/typescript/theme/tokens/brands/radiant/palette.dark.d.ts +3 -0
  651. package/lib/typescript/theme/tokens/brands/radiant/palette.dark.d.ts.map +1 -0
  652. package/lib/typescript/theme/tokens/brands/radiant/palette.light.d.ts +4 -0
  653. package/lib/typescript/theme/tokens/brands/radiant/palette.light.d.ts.map +1 -0
  654. package/lib/typescript/theme/tokens/brands/rosewood/palette.dark.d.ts +3 -0
  655. package/lib/typescript/theme/tokens/brands/rosewood/palette.dark.d.ts.map +1 -0
  656. package/lib/typescript/theme/tokens/brands/rosewood/palette.light.d.ts +4 -0
  657. package/lib/typescript/theme/tokens/brands/rosewood/palette.light.d.ts.map +1 -0
  658. package/lib/typescript/theme/tokens/brands/skyline/palette.dark.d.ts +3 -0
  659. package/lib/typescript/theme/tokens/brands/skyline/palette.dark.d.ts.map +1 -0
  660. package/lib/typescript/theme/tokens/brands/skyline/palette.light.d.ts +4 -0
  661. package/lib/typescript/theme/tokens/brands/skyline/palette.light.d.ts.map +1 -0
  662. package/lib/typescript/theme/tokens/brands/slate/palette.dark.d.ts +3 -0
  663. package/lib/typescript/theme/tokens/brands/slate/palette.dark.d.ts.map +1 -0
  664. package/lib/typescript/theme/tokens/brands/slate/palette.light.d.ts +4 -0
  665. package/lib/typescript/theme/tokens/brands/slate/palette.light.d.ts.map +1 -0
  666. package/lib/typescript/theme/tokens/brands/storefront/palette.dark.d.ts +3 -0
  667. package/lib/typescript/theme/tokens/brands/storefront/palette.dark.d.ts.map +1 -0
  668. package/lib/typescript/theme/tokens/brands/storefront/palette.light.d.ts +4 -0
  669. package/lib/typescript/theme/tokens/brands/storefront/palette.light.d.ts.map +1 -0
  670. package/lib/typescript/theme/tokens/brands/zinc/palette.dark.d.ts +4 -0
  671. package/lib/typescript/theme/tokens/brands/zinc/palette.dark.d.ts.map +1 -0
  672. package/lib/typescript/theme/tokens/brands/zinc/palette.light.d.ts +4 -0
  673. package/lib/typescript/theme/tokens/brands/zinc/palette.light.d.ts.map +1 -0
  674. package/lib/typescript/theme/tokens/builders/accentText.d.ts +42 -0
  675. package/lib/typescript/theme/tokens/builders/accentText.d.ts.map +1 -0
  676. package/lib/typescript/theme/tokens/builders/buildBrandTokens.d.ts +21 -0
  677. package/lib/typescript/theme/tokens/builders/buildBrandTokens.d.ts.map +1 -0
  678. package/lib/typescript/theme/tokens/builders/buildDarkPalette.d.ts +13 -0
  679. package/lib/typescript/theme/tokens/builders/buildDarkPalette.d.ts.map +1 -0
  680. package/lib/typescript/theme/tokens/builders/color.d.ts +59 -0
  681. package/lib/typescript/theme/tokens/builders/color.d.ts.map +1 -0
  682. package/lib/typescript/theme/tokens/index.d.ts +21 -0
  683. package/lib/typescript/theme/tokens/index.d.ts.map +1 -0
  684. package/lib/typescript/theme/tokens/primitives/borderWidths.d.ts +15 -0
  685. package/lib/typescript/theme/tokens/primitives/borderWidths.d.ts.map +1 -0
  686. package/lib/typescript/theme/tokens/primitives/breakpoints.d.ts +17 -0
  687. package/lib/typescript/theme/tokens/primitives/breakpoints.d.ts.map +1 -0
  688. package/lib/typescript/theme/tokens/primitives/elevation.d.ts +109 -0
  689. package/lib/typescript/theme/tokens/primitives/elevation.d.ts.map +1 -0
  690. package/lib/typescript/theme/tokens/primitives/fontSizes.d.ts +21 -0
  691. package/lib/typescript/theme/tokens/primitives/fontSizes.d.ts.map +1 -0
  692. package/lib/typescript/theme/tokens/primitives/fontWeights.d.ts +21 -0
  693. package/lib/typescript/theme/tokens/primitives/fontWeights.d.ts.map +1 -0
  694. package/lib/typescript/theme/tokens/primitives/index.d.ts +23 -0
  695. package/lib/typescript/theme/tokens/primitives/index.d.ts.map +1 -0
  696. package/lib/typescript/theme/tokens/primitives/letterSpacings.d.ts +17 -0
  697. package/lib/typescript/theme/tokens/primitives/letterSpacings.d.ts.map +1 -0
  698. package/lib/typescript/theme/tokens/primitives/lineHeights.d.ts +20 -0
  699. package/lib/typescript/theme/tokens/primitives/lineHeights.d.ts.map +1 -0
  700. package/lib/typescript/theme/tokens/primitives/radii.d.ts +20 -0
  701. package/lib/typescript/theme/tokens/primitives/radii.d.ts.map +1 -0
  702. package/lib/typescript/theme/tokens/primitives/sizes.d.ts +33 -0
  703. package/lib/typescript/theme/tokens/primitives/sizes.d.ts.map +1 -0
  704. package/lib/typescript/theme/tokens/primitives/space.d.ts +29 -0
  705. package/lib/typescript/theme/tokens/primitives/space.d.ts.map +1 -0
  706. package/lib/typescript/theme/tokens/primitives/zIndices.d.ts +22 -0
  707. package/lib/typescript/theme/tokens/primitives/zIndices.d.ts.map +1 -0
  708. package/lib/typescript/theme/tokens/roles/index.d.ts +68 -0
  709. package/lib/typescript/theme/tokens/roles/index.d.ts.map +1 -0
  710. package/lib/typescript/theme/tokens/types.d.ts +103 -0
  711. package/lib/typescript/theme/tokens/types.d.ts.map +1 -0
  712. package/package.json +259 -0
  713. package/registry.json +175 -0
@@ -0,0 +1,103 @@
1
+ # menu/ — an anchored action list opened from a trigger, in RN's own Modal
2
+
3
+ `Menu` wraps a single trigger element (via `React.cloneElement`, never `{...rest}`) and reveals a
4
+ short list of actions in React Native's OWN `Modal` on press. Unlike `Select` (externally
5
+ controlled via `value`/`onValueChange`), Menu is self-contained: a transient action list manages
6
+ its own open/closed state.
7
+
8
+ The one deliberate exception to "own `Modal`, not the library's": on web, Menu reads
9
+ `../modal/ModalPortalContext` + `../modal/renderWebPortal` — the same web-portal-containment
10
+ mechanism `Modal` and `Select` use — so opening a `ModalPortalProvider` containing an app also
11
+ contains Menu's action sheet. See `../modal/MODULE.md`'s "Web portal mechanism" section for the
12
+ full explanation; this is a plain context + a stateless helper with no React-tree footprint of its
13
+ own, not a dependency on the `Modal` component.
14
+
15
+ ## Files
16
+
17
+ | File | Role |
18
+ |------|------|
19
+ | `Menu.tsx` | The component. `cloneElement` trigger composition, `Modal` + backdrop + row list, open/close state. |
20
+ | `Menu.variants.ts` | Pure resolver (`resolveMenuItemColor`) + the themed structural resolvers (`menuOverlayStructure`, `menuSheetStructure`, `menuRowStructure`). No React, no lucide. |
21
+ | `index.ts` | Public surface: `Menu`, `MenuProps`, `MenuItem`, `MenuTriggerProps`, `MenuItemTone`, `IconName` (re-exported from `core/icon`). |
22
+ | `__tests__/Menu.test.ts` | Pure: WCAG contrast (all brands × modes) + touch target + the tone→role mapping. |
23
+ | `__tests__/Menu.render.test.tsx` | Render: open/close, trigger `onPress` chaining, disabled gating, item selection, backdrop dismiss, and the web-portal opt-in branch (mocking `renderWebPortal`). |
24
+
25
+ ## Props
26
+
27
+ | Prop | Type | Default | Notes |
28
+ |------|------|---------|-------|
29
+ | `trigger` | `ReactElement<MenuTriggerProps>` | — | Required. A single element accepting `onPress` (e.g. a `Button`). Cloned to chain its `onPress` with opening the menu. |
30
+ | `items` | `{ label: string; icon?: IconName; onPress: () => void; tone?: "default" \| "danger" }[]` | — | Required. Rendered in order; `danger` renders the row in `status.danger.text`. |
31
+ | `disabled` | `boolean` | `false` | Blocks the menu from opening. Does **not** restyle the trigger — see "Design decisions" below. |
32
+ | `testID` | `string` | — | Seeds `${testID}-backdrop` and `${testID}-item-${index}`. Not applied to the trigger — the trigger owns its own `testID`. |
33
+
34
+ No `style` prop — like Tooltip, Menu renders no sized node of its own for an app to place; the
35
+ trigger keeps whatever layout it already has. `variant`/`size` are also absent: Menu has one fixed
36
+ row size, since an action list's row height isn't a caller-facing choice.
37
+
38
+ ## Accessibility contract (WCAG)
39
+
40
+ - **4.1.2 / semantics** — every row is `accessibilityRole="menuitem"`. The backdrop is
41
+ `accessible={false}` (same as Select's) so it isn't announced as a separate focusable element.
42
+ - **1.4.3** — every row's label is measured ≥ 4.5:1 against the sheet fill (`bg.surface`), for both
43
+ `default` (`fg.default`) and `danger` (`status.danger.text`) tones, across all 8 brands × both
44
+ modes.
45
+ - **1.4.11** — the row icon reuses the label's exact colour (never a separate lookup): since the
46
+ label already clears the stricter 4.5:1 text minimum, the icon clears its looser 3:1 non-text
47
+ minimum for free — the same reasoning Select's active-row check glyph relies on.
48
+ - **2.5.8 / 2.5.5 target size** — every row is a direct 44dp `minHeight` (a list row is already its
49
+ own full-width touch target, not a control that shrinks and needs `hitSlop`).
50
+ - **Icon-only rule (rule 5) does not apply** — every row always renders a visible `label` text; a
51
+ menu row is never icon-only.
52
+ - **2.3.3** — the menu's `animationType` is `"none"` instead of `"fade"` when `useReducedMotion()`
53
+ is true.
54
+ - Backdrop press closes the menu without calling any item's `onPress` — dismissal and selection are
55
+ two distinct code paths (`closeMenu` vs. `selectItem`), so a stray tap can never accidentally fire
56
+ an action.
57
+
58
+ ## Patterns copied from Button / Select / Tooltip (the reference modules)
59
+
60
+ 1. **Structure vs colour split** — sheet/row padding/radius via `createThemedVariants`; colour
61
+ resolved from `RoleColors` per `tone`, applied inline.
62
+ 2. **Pure, testable resolver** in `Menu.variants.ts` — the WCAG contrast is unit-tested against real
63
+ palettes, never eyeballed.
64
+ 3. **`React.cloneElement` composition, never `{...rest}`** — only `onPress` is injected into the
65
+ trigger, chained after any handler it already had (same technique as Tooltip's
66
+ `onLongPress`/`onPressOut` injection).
67
+ 4. **RN's own `Modal`, not this library's** — same reasoning as Select: a quick transient overlay,
68
+ not a persistent app dialog with a title/children contract.
69
+ 5. **Closed `tone` union** — `default | danger`, resolved from role colours, never a free-form
70
+ `color` prop.
71
+
72
+ ## Design decisions specific to this module
73
+
74
+ - **`disabled` only blocks opening; it does not restyle the trigger.** Menu cannot reliably inject a
75
+ `disabled` prop into an arbitrary caller-supplied element (the same constraint Tooltip's own docs
76
+ note: a component that destructures its own explicit prop list simply drops an unknown injected
77
+ prop). If the trigger should also *look* disabled, pass `disabled` to the trigger itself.
78
+ - **The trigger's own `onPress` always fires, even while Menu is `disabled`.** Only the menu-opening
79
+ side is gated (inside `openMenu`); the trigger's existing handler is never suppressed, so Menu
80
+ never silently swallows a side effect the caller's trigger already relied on.
81
+ - **Menu does not inject `accessibilityState.expanded` onto the trigger** (unlike Select, whose
82
+ trigger *is* this library's own `Pressable`). Menu's trigger is caller-supplied and opaque; the
83
+ same constraint that stops the `disabled` injection above stops this too.
84
+ - **The sheet is centered, not a true measured anchor.** "Anchored" here means "attached to a
85
+ trigger", not "positioned at the trigger's exact on-screen coordinates" — a real measured anchor
86
+ would need a `ref`/`measure()` most trigger elements in this library don't forward (this
87
+ library's own `Button` isn't `forwardRef`). v1 reuses Select's exact overlay pattern (full-screen
88
+ scrim + centered sheet) rather than inventing an unmeasured guess at a position. A future
89
+ `Popover`-style module with real anchor measurement would be the place to fix this, not a prop
90
+ added here — the same deferral Tooltip's own docs make for its unmeasured bubble placement.
91
+
92
+ ## Known gaps
93
+
94
+ - No measured anchor position (see above) — the sheet always centers, regardless of where the
95
+ trigger sits on screen.
96
+ - No submenu / nested items — v1 is a single flat action list, matching the spec this module was
97
+ built against.
98
+ - No keyboard/arrow-key navigation between rows (touch-only interaction model, same scope as
99
+ Select's option list).
100
+
101
+ ## Performance
102
+
103
+ Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). `openMenu`/`closeMenu` are `useCallback`'d, and the inline `onPress` previously injected into the caller-supplied `trigger` via `cloneElement` on every render is extracted to `handleTriggerPress` (`useCallback`, deps `[trigger, openMenu]`) — `trigger` is a consumer-supplied child (typically this library's own `Button`), so a fresh callback there would defeat its memo. `selectItem` and the per-row `onPress` stay inline: they go to `Pressable`/`Icon` (host elements / primitive props), not a memoized child.
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Menu — a small anchored action list opened from a caller-supplied trigger. Unlike Select (whose
5
+ * open/closed state is a `value`/`onValueChange` pair the caller owns), Menu is self-contained: a
6
+ * transient action list manages its own visibility, closing itself after every dismissal path.
7
+ *
8
+ * The trigger is composed via `React.cloneElement` — never `{...rest}` — injecting only `onPress`,
9
+ * chained after any handler the trigger already defined (the same "merge, never clobber" technique
10
+ * Tooltip uses for its child). The dropdown itself is React Native's OWN `Modal`, imported directly
11
+ * from `"react-native"` on purpose: this module must never depend on the library's own `Modal`
12
+ * COMPONENT — this library's own `Modal` (built in parallel elsewhere) is for persistent app
13
+ * dialogs with a title/children contract, not a quick transient overlay — the same distinction
14
+ * Select already draws for its own option list.
15
+ *
16
+ * The one deliberate exception is the web portal mechanism: `ModalPortalContext`/`renderWebPortal`
17
+ * are a plain context + a stateless helper with no React-tree footprint of their own (not the
18
+ * `Modal` component), so Menu reads the same ones `Modal.tsx` and `Select.tsx` read to stay
19
+ * consistent once a consumer opts in via `ModalPortalProvider` — see `../modal/ModalPortalContext.ts`.
20
+ */
21
+
22
+ import { cloneElement, memo, useCallback, useContext, useState } from "react";
23
+ import { Modal, Platform, Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
24
+ import { useReducedMotion } from "../../core/a11y/index.js";
25
+ import { Icon } from "../../core/icon/index.js";
26
+ import { useTheme } from "../../theme/index.js";
27
+ import { ModalPortalContext } from "../modal/ModalPortalContext.js";
28
+ import { renderWebPortal } from "../modal/renderWebPortal";
29
+ import { MENU_ROW_ICON_SIZE, menuOverlayStructure, menuRowStructure, menuSheetStructure, resolveMenuItemColor } from "./Menu.variants.js";
30
+
31
+ /** The subset of props Menu reads from / injects into its trigger child. */
32
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
33
+ const ICON_STROKE = 2;
34
+ // Decorative dismiss scrim behind the sheet — a design constant, not a role token: it is neither
35
+ // text nor an interactive boundary, so WCAG's contrast minimums don't apply to it.
36
+ const BACKDROP_SCRIM = "#00000099";
37
+ export const Menu = /*#__PURE__*/memo(function Menu({
38
+ trigger,
39
+ items,
40
+ disabled = false,
41
+ testID
42
+ }) {
43
+ const theme = useTheme();
44
+ const reducedMotion = useReducedMotion();
45
+ const portalContainer = useContext(ModalPortalContext);
46
+ const [open, setOpen] = useState(false);
47
+ const openMenu = useCallback(() => {
48
+ if (disabled) return;
49
+ setOpen(true);
50
+ }, [disabled]);
51
+ const closeMenu = useCallback(() => setOpen(false), []);
52
+ const selectItem = item => {
53
+ closeMenu();
54
+ item.onPress();
55
+ };
56
+
57
+ // Passed to `trigger` — a consumer-supplied CHILD component (typically this library's own
58
+ // Button) — via cloneElement, so it is memoized like any other child-bound callback.
59
+ const handleTriggerPress = useCallback(event => {
60
+ trigger.props.onPress?.(event);
61
+ openMenu();
62
+ }, [trigger, openMenu]);
63
+ const clonedTrigger = /*#__PURE__*/cloneElement(trigger, {
64
+ onPress: handleTriggerPress
65
+ });
66
+ const sheet = /*#__PURE__*/_jsxs(_Fragment, {
67
+ children: [/*#__PURE__*/_jsx(Pressable, {
68
+ testID: testID ? `${testID}-backdrop` : undefined,
69
+ accessible: false,
70
+ style: [StyleSheet.absoluteFill, {
71
+ backgroundColor: BACKDROP_SCRIM
72
+ }],
73
+ onPress: closeMenu
74
+ }), /*#__PURE__*/_jsx(View, {
75
+ style: menuOverlayStructure(theme),
76
+ pointerEvents: "box-none",
77
+ children: /*#__PURE__*/_jsx(View, {
78
+ style: [menuSheetStructure(theme), {
79
+ backgroundColor: theme.colors.bg.surface
80
+ }],
81
+ children: /*#__PURE__*/_jsx(ScrollView, {
82
+ bounces: false,
83
+ children: items.map((item, index) => {
84
+ const color = resolveMenuItemColor(theme.colors, item.tone ?? "default");
85
+ return /*#__PURE__*/_jsxs(Pressable, {
86
+ testID: testID ? `${testID}-item-${index}` : undefined,
87
+ accessibilityRole: "menuitem",
88
+ onPress: () => selectItem(item),
89
+ style: menuRowStructure(theme),
90
+ children: [item.icon !== undefined && /*#__PURE__*/_jsx(Icon, {
91
+ name: item.icon,
92
+ size: MENU_ROW_ICON_SIZE,
93
+ color: color,
94
+ strokeWidth: ICON_STROKE
95
+ }), /*#__PURE__*/_jsx(Text, {
96
+ numberOfLines: 1,
97
+ style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
98
+ flex: 1,
99
+ fontSize: theme.fontSizes.md,
100
+ color
101
+ }],
102
+ children: item.label
103
+ })]
104
+ }, `${item.label}-${index}`);
105
+ })
106
+ })
107
+ })
108
+ })]
109
+ });
110
+
111
+ // Web portal opt-in — see Modal.tsx's identical branch + ModalPortalContext.ts. Every other case
112
+ // (native, or web with no ModalPortalProvider) renders through RN's own <Modal> below, unchanged.
113
+ const menu = Platform.OS === "web" && portalContainer != null ? open ? renderWebPortal(/*#__PURE__*/_jsx(View, {
114
+ style: StyleSheet.absoluteFill,
115
+ pointerEvents: "box-none",
116
+ children: sheet
117
+ }), portalContainer) : null : /*#__PURE__*/_jsx(Modal, {
118
+ visible: open,
119
+ transparent: true,
120
+ animationType: reducedMotion ? "none" : "fade",
121
+ onRequestClose: closeMenu,
122
+ children: sheet
123
+ });
124
+ return /*#__PURE__*/_jsxs(_Fragment, {
125
+ children: [clonedTrigger, menu]
126
+ });
127
+ });
128
+ //# sourceMappingURL=Menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cloneElement","memo","useCallback","useContext","useState","Modal","Platform","Pressable","ScrollView","StyleSheet","Text","View","useReducedMotion","Icon","useTheme","ModalPortalContext","renderWebPortal","MENU_ROW_ICON_SIZE","menuOverlayStructure","menuRowStructure","menuSheetStructure","resolveMenuItemColor","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ICON_STROKE","BACKDROP_SCRIM","Menu","trigger","items","disabled","testID","theme","reducedMotion","portalContainer","open","setOpen","openMenu","closeMenu","selectItem","item","onPress","handleTriggerPress","event","props","clonedTrigger","sheet","children","undefined","accessible","style","absoluteFill","backgroundColor","pointerEvents","colors","bg","surface","bounces","map","index","color","tone","accessibilityRole","icon","name","size","strokeWidth","numberOfLines","fontStyleForWeight","fontWeights","regular","flex","fontSize","fontSizes","md","label","menu","OS","visible","transparent","animationType","onRequestClose"],"sourceRoot":"../../../../src","sources":["modules/menu/Menu.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,IAAI,EAAEC,WAAW,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAC7E,SAASC,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAA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IAAAS,QAAA,EACzGD;EAAK,CACD,CACR;EAEH,oBACExB,KAAA,CAAAE,SAAA;IAAAuB,QAAA,GACGF,aAAa,EACb+B,IAAI;EAAA,CACL,CAAC;AAEP,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Menu's style + behaviour resolution — same split as Button/Select:
5
+ * - STRUCTURE (sizing/spacing off the theme scale) lives in the `createThemedVariants` resolvers
6
+ * below — static per (brand, mode), registered once.
7
+ * - COLOUR is resolved from the theme's ROLE colours (never a raw ramp, never a hardcoded hex) by
8
+ * `resolveMenuItemColor` — `tone` maps a row to `fg.default` or `status.danger.text`, the same
9
+ * reason Button's `tone` is a closed union instead of a `color` prop.
10
+ *
11
+ * Free of React, `lucide`, and any `Modal`/`Pressable` import, so the WCAG + touch-target tests
12
+ * import it directly (mocking only `react-native`'s `StyleSheet`, as `core/style` does).
13
+ */
14
+
15
+ import { createThemedVariants } from "../../core/style/index.js";
16
+ /** Same touch-target floor as Button/Select (44dp — Apple HIG minimum, WCAG 2.5.5 AAA). */
17
+ export const MIN_TOUCH_TARGET = 44;
18
+
19
+ /** Row height is a direct `minHeight`, not a `hitSlop` expansion — a list row is already its own
20
+ * full-width touch target, the same choice `Select`'s option rows make (`SELECT_ROW_MIN_HEIGHT`). */
21
+ export const MENU_ROW_MIN_HEIGHT = MIN_TOUCH_TARGET;
22
+
23
+ /** The optional leading glyph's size. Fixed — Menu has no `size` prop (unlike Button/Select), since
24
+ * an action list's row height is not a caller-facing choice. */
25
+ export const MENU_ROW_ICON_SIZE = 18;
26
+
27
+ /**
28
+ * Maps a row's `tone` onto the theme's ROLE colours — the reason `tone` is a closed union and not a
29
+ * free-form `color` prop. The SAME colour drives both the label and the icon (like Select's active
30
+ * row): if the label clears the stricter 4.5:1 text minimum on the sheet fill, the icon clears its
31
+ * 3:1 non-text minimum for free.
32
+ */
33
+ export function resolveMenuItemColor(colors, tone) {
34
+ switch (tone) {
35
+ case "danger":
36
+ return colors.status.danger.text;
37
+ case "default":
38
+ return colors.fg.default;
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Structural styles only — layout, padding, radius, border WIDTH. No colours (those are resolved
44
+ * from `RoleColors` and applied inline), so this compiles once per theme identity via the themed
45
+ * resolver and never rebuilds per render.
46
+ *
47
+ * `justifyContent: "center"` mirrors Select's full-screen overlay + centered sheet — the same
48
+ * "transient overlay in RN's own Modal" pattern Select already established. See the "Known gaps"
49
+ * section of MODULE.md for why this is a centered sheet rather than a true measured anchor.
50
+ */
51
+ export const menuOverlayStructure = createThemedVariants(theme => ({
52
+ base: {
53
+ flex: 1,
54
+ justifyContent: "center",
55
+ paddingHorizontal: theme.space[6]
56
+ }
57
+ }));
58
+ export const menuSheetStructure = createThemedVariants(theme => ({
59
+ base: {
60
+ borderRadius: theme.radii.base,
61
+ paddingVertical: theme.space[2],
62
+ maxHeight: 320,
63
+ ...theme.elevation.lg
64
+ }
65
+ }));
66
+ export const menuRowStructure = createThemedVariants(theme => ({
67
+ base: {
68
+ flexDirection: "row",
69
+ alignItems: "center",
70
+ minHeight: MENU_ROW_MIN_HEIGHT,
71
+ columnGap: theme.space[2],
72
+ paddingHorizontal: theme.space[4]
73
+ }
74
+ }));
75
+ //# sourceMappingURL=Menu.variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createThemedVariants","MIN_TOUCH_TARGET","MENU_ROW_MIN_HEIGHT","MENU_ROW_ICON_SIZE","resolveMenuItemColor","colors","tone","status","danger","text","fg","default","menuOverlayStructure","theme","base","flex","justifyContent","paddingHorizontal","space","menuSheetStructure","borderRadius","radii","paddingVertical","maxHeight","elevation","lg","menuRowStructure","flexDirection","alignItems","minHeight","columnGap"],"sourceRoot":"../../../../src","sources":["modules/menu/Menu.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAAkB;AAIvD;AACA,OAAO,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AC,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Public surface of `pixelize-native-library/menu`. Value exports and type exports are split for
5
+ * `verbatimModuleSyntax`. The resolvers (`resolveMenuItemColor`, `MENU_ROW_ICON_SIZE`, …) stay
6
+ * internal — a consumer configures a Menu through its props, never by importing its internals.
7
+ */
8
+
9
+ export { Menu } from "./Menu.js";
10
+
11
+ // Re-exported so a caller can type an item's `icon` prop without a separate import from `core/icon`.
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Menu"],"sourceRoot":"../../../../src","sources":["modules/menu/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,WAAQ;;AAK7B","ignoreList":[]}
@@ -0,0 +1,138 @@
1
+ # modal/ — the library's own dialog, built on React Native's `Modal`
2
+
3
+ `Modal` wraps React Native's own `<Modal>` (`transparent`, faded in unless the OS has reduced
4
+ motion on) with a dismissible backdrop scrim and a themed panel — `bg.surface`, `theme.radii.lg`,
5
+ `theme.elevation.lg` — capped to one of three closed widths. It is fully controlled: the caller
6
+ owns `visible` and reacts to `onRequestClose` (backdrop press, Android back button, iOS
7
+ VoiceOver's escape gesture via `onAccessibilityEscape`).
8
+
9
+ ## Files
10
+
11
+ | File | Role |
12
+ |------|------|
13
+ | `Modal.tsx` | The component. RN `<Modal>` composition, backdrop, overlay, panel, title. Falls back to the web portal mechanism below when opted in. |
14
+ | `Modal.variants.ts` | Pure resolvers (`MODAL_SIZES`, `resolveModalPanelColors`, `resolveModalAnimationType`) + the themed structural resolvers (`modalOverlayStructure`, `modalPanelStructure`). No React, no lucide. Untouched by the web portal mechanism — see below. |
15
+ | `ModalPortalContext.ts` | The web-only portal-container `React.Context<unknown>`, default `null`. Read by `Modal`, `Select`, `MultiSelect`, and `Menu`. |
16
+ | `ModalPortalProvider.tsx` | Public provider wrapping `ModalPortalContext.Provider`. A consumer's opt-in API. |
17
+ | `renderWebPortal.ts` / `renderWebPortal.web.ts` | The platform-split portal renderer — see "Web portal mechanism" below. |
18
+ | `index.ts` | Public surface: `Modal`, `ModalProps`, `ModalSize`, `ModalPortalProvider`, `ModalPortalProviderProps`. |
19
+ | `__tests__/Modal.test.ts` | Pure: WCAG contrast (all brands × modes), size-cap sanity, reduced-motion contract. |
20
+ | `__tests__/Modal.render.test.tsx` | Render: visibility, title semantics, backdrop dismissal, and the web-portal opt-in branch (mocking `renderWebPortal`). |
21
+ | `__tests__/ModalPortalProvider.test.tsx` | The provider forwards `container` onto `ModalPortalContext`; an unwrapped tree reads the `null` default. |
22
+ | `__tests__/renderWebPortal.test.ts` / `renderWebPortal.web.test.ts` | Each platform file in isolation — the native file is always a no-op; the web file calls `ReactDOM.createPortal` with the exact children/container (mocked — no real DOM under Jest). |
23
+
24
+ ## Props
25
+
26
+ | Prop | Type | Default | Notes |
27
+ |------|------|---------|-------|
28
+ | `visible` | `boolean` | — | Required. Fully controlled — no internal open state. |
29
+ | `onRequestClose` | `() => void` | — | Required. Fired by the backdrop press, Android hardware back, and iOS VoiceOver's escape gesture (`onAccessibilityEscape` on the panel). |
30
+ | `title` | `string` | — | Optional heading, rendered `accessibilityRole="header"`. |
31
+ | `children` | `ReactNode` | — | Required. Panel content. |
32
+ | `size` | `sm \| md \| lg` | `md` | Closed union — panel max width, reusing the shared `sizes` primitive (384/448/512dp). |
33
+ | `testID` | `string` | — | Also seeds `${testID}-backdrop` and `${testID}-panel`. |
34
+
35
+ No `style`/`containerStyle` — see "Why no `style`" below.
36
+
37
+ ## Accessibility contract (WCAG)
38
+
39
+ - **iOS modal context** — the panel sets `accessibilityViewIsModal`, so VoiceOver constrains
40
+ navigation to the dialog's content while it's open.
41
+ - **1.4.3** — the title is measured ≥ 4.5:1 against the panel fill (`bg.surface`) for every brand ×
42
+ mode via `resolveModalPanelColors`.
43
+ - **2.3.3** — `resolveModalAnimationType(reducedMotion)` returns `"none"` instead of `"fade"` when
44
+ the OS reduce-motion setting is on.
45
+ - The title is `accessibilityRole="header"`, giving it heading semantics for screen readers.
46
+ - The backdrop is `accessible={false}` — a decorative dismiss target, not a focusable element (same
47
+ treatment as `Select`'s backdrop). It is never the *only* way to close: Android hardware back also
48
+ fires `onRequestClose`, and the panel's `onAccessibilityEscape={onRequestClose}` gives iOS
49
+ VoiceOver users a real two-finger-Z "escape" gesture to dismiss without hunting for the invisible
50
+ backdrop. (RN's `<Modal>` only treats a swipe as a dismiss when `allowSwipeDismissal` is passed —
51
+ this component doesn't set it — and `transparent` with no `presentationStyle` forces
52
+ `overFullScreen`, which has no native iOS swipe-to-dismiss gesture at all; `onAccessibilityEscape`
53
+ is the real, working native hook here, not a swipe.)
54
+ - No touch-target sizing needed: the only interactive surface is the full-screen backdrop, already
55
+ far larger than the 44dp floor.
56
+
57
+ ## Why no `style`
58
+
59
+ Every other module's `style: LayoutStyle` places the component within a *parent's* layout flow
60
+ (margin, flex, alignSelf). `Modal` is presented through RN's own portal — there is no parent flow
61
+ to place it in, and its one real sizing lever (panel width) is already the closed `size` union. The
62
+ component spec omits `style` rather than including it as an unused escape hatch.
63
+
64
+ ## Web portal mechanism (opt-in)
65
+
66
+ `react-native-web`'s own `<Modal>` unconditionally portals to `document.body`
67
+ (`ModalPortal.js` in the installed 0.21.2 does `document.body.appendChild(...)` then
68
+ `createPortal(children, elementRef.current)` — no `container`/`portalHost` prop exists to
69
+ override it, confirmed by reading the source). That's correct for a full app, but breaks visual
70
+ containment inside a fixed-size preview frame (`example/DeviceFrame.tsx`'s 390px phone card): the
71
+ overlay renders full-browser-viewport instead of clipped to the frame. Same problem, same fix, for
72
+ `Select`'s option sheet, `MultiSelect`'s option sheet, and `Menu`'s action sheet — all three render
73
+ their own RN `<Modal>` directly (never this module's `Modal` component) and read the identical
74
+ mechanism below.
75
+
76
+ - **`ModalPortalContext`** — a `React.Context<unknown>`, default `null`. `unknown` because this
77
+ package has no `"dom"` lib entry (native has no DOM) — a `HTMLElement` type here wouldn't
78
+ compile. Internal; a consumer never reads it directly.
79
+ - **`ModalPortalProvider`** — the public opt-in. `<ModalPortalProvider container={node}>` makes
80
+ every `Modal` / `AlertDialog` / `Select` / `MultiSelect` / `Menu` underneath portal into `node`
81
+ instead of `document.body`. Safe to mount unconditionally on every platform — there's no DOM to
82
+ portal into outside web, so `container` is simply never read off the context there.
83
+ - **`renderWebPortal.ts` (base) / `renderWebPortal.web.ts` (web)** — a Metro platform-extension
84
+ pair, same idea as `theme/platform/*.native.ts` but the other direction: the BASE file (no
85
+ suffix) is the safe default every platform except an actual web bundle resolves to (a pure
86
+ no-op — always returns `null`), and `renderWebPortal.web.ts` (the only file that imports
87
+ `react-dom`) is what an actual web bundle resolves to instead. Metro never resolves
88
+ `react-dom` for a native bundle, so it's never part of that dependency graph — verified via
89
+ `expo export --platform ios` vs `--platform web`, grepping each bundle for a marker string
90
+ unique to each file. Jest's `react-native` preset has no `web` haste platform either, so every
91
+ test also resolves the base file by default — this is why `Modal.render.test.tsx` /
92
+ `Select.render.test.tsx` / `MultiSelect.render.test.tsx` / `Menu.render.test.tsx` mock
93
+ `renderWebPortal` directly to exercise the opt-in branch, and `renderWebPortal.web.test.ts` is the
94
+ one place the real `ReactDOM.createPortal` call is verified (mocking `react-dom` itself — no real
95
+ DOM under Jest).
96
+ - **Backward compatibility (the hard bar):** `Platform.OS === "web" && portalContainer != null`
97
+ gates the whole mechanism — every existing consumer (native, or web with no provider) takes the
98
+ exact same code path as before this mechanism existed: RN's own `<Modal>`, untouched. Neither
99
+ `Modal.variants.ts` nor `Select.variants.ts`/`MultiSelect.variants.ts`/`Menu.variants.ts`'s
100
+ structural resolvers were touched — the portal path reproduces just the sizing RN's `<Modal>`
101
+ otherwise supplies (a `StyleSheet.absoluteFill` wrapper around the SAME backdrop+panel tree)
102
+ rather than changing the shared resolvers, so the default path's styles are provably unaffected.
103
+ - **Known simplification:** the portal path skips RN `<Modal>`'s open/close animation entirely
104
+ (mounts/unmounts on `visible`/`open` directly) — `resolveModalAnimationType`/reduced-motion only
105
+ apply to the RNModal path. Acceptable: the goal is containment, not animation fidelity, and this
106
+ only affects a consumer that has opted in.
107
+ - `react-dom` is an **optional peer dependency** (`peerDependenciesMeta.react-dom.optional`) —
108
+ only needed by an app that actually renders for web; native-only consumers never install it.
109
+
110
+ ## Patterns copied from Button / Select (the reference modules)
111
+
112
+ 1. **Structure vs colour split** — sizing/spacing/radius via `createThemedVariants`; colour
113
+ resolved from `RoleColors`, applied inline.
114
+ 2. **Pure, testable resolvers** in `Modal.variants.ts` — WCAG contrast and the reduced-motion
115
+ contract are unit-tested against real palettes, never eyeballed.
116
+ 3. **RN's own `<Modal>`, not a hand-rolled portal** — `transparent` + backdrop `Pressable` +
117
+ `pointerEvents="box-none"` overlay, the same shape `Select`'s option list uses (converged on
118
+ independently — this module owns none of that code, built in parallel).
119
+ 4. **Closed `size` union** reusing the shared `sizes` primitive (384/448/512dp) instead of
120
+ Modal-local numbers — `theme/tokens/primitives/sizes.ts` is documented for exactly this case.
121
+
122
+ ## Known gaps
123
+
124
+ - **No full focus trap.** iOS gets `accessibilityViewIsModal` (constrains VoiceOver to the panel).
125
+ Android has no JS-level equivalent for marking background siblings
126
+ `importantForAccessibility="no-hide-descendants"` from inside this component (that prop applies
127
+ to the element it's set on, not to arbitrary siblings elsewhere in the tree) — a full Android
128
+ focus trap needs the app root to cooperate. Out of scope for v1.
129
+ - **No built-in scrolling.** The panel caps at `maxHeight: "92%"` but does not wrap `children` in a
130
+ `ScrollView` — forcing one risks nested-`VirtualizedList` warnings if a consumer's content is
131
+ already scrollable. Tall content is the consumer's own `ScrollView`/`FlatList` to add.
132
+ - No close ("×") button — not in this module's prop contract; dismissal is backdrop press, Android
133
+ back, or iOS VoiceOver's escape gesture. A consumer wanting an explicit close control renders its
134
+ own `Button` (`icon="x"`) inside `children`.
135
+
136
+ ## Performance
137
+
138
+ Both `Modal` and `ModalPortalProvider` are wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). `Modal.tsx` has no `.map()` lists and no library child components (only RN host elements); `ModalPortalProvider` just passes `container`/`children` into a `Context.Provider` — nothing to memoize in either.
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Modal — the library's own dialog, built ON TOP of React Native's `<Modal>` (`transparent`,
5
+ * `animationType` "fade" unless the OS has reduced motion on, in which case "none"). A full-screen
6
+ * backdrop scrim dismisses it on press; the panel sits on `bg.surface` with `theme.radii.lg` and
7
+ * `theme.elevation.lg`, capped to one of three closed widths (`size`).
8
+ *
9
+ * Fully controlled: the caller owns `visible` and reacts to `onRequestClose`, which fires from the
10
+ * backdrop press, the Android hardware back button, and — via `onAccessibilityEscape` on the panel
11
+ * — iOS VoiceOver's two-finger-Z escape gesture. (RN's `<Modal>` only fires `onRequestClose` from a
12
+ * swipe when `allowSwipeDismissal` is passed, which this component doesn't set, and `transparent`
13
+ * with no `presentationStyle` forces `overFullScreen`, which has no native swipe-to-dismiss gesture
14
+ * on iOS at all — so the VoiceOver escape hook is the real iOS-native path here, not a swipe.)
15
+ * Never from an internal open/close state.
16
+ *
17
+ * Web portal opt-in: when an ancestor renders `ModalPortalProvider` (web only), this bypasses RN's
18
+ * `<Modal>` and portals the SAME backdrop+panel tree into the provided container via
19
+ * `renderWebPortal` instead — see `ModalPortalContext.ts` for why. Every other case (native, or web
20
+ * with no provider — the default `ModalPortalContext` value is `null`) renders through RN's own
21
+ * `<Modal>`, byte-identical to before this mechanism existed.
22
+ */
23
+
24
+ import { memo, useContext } from "react";
25
+ import { Modal as RNModal, Platform, Pressable, StyleSheet, Text, View } from "react-native";
26
+ import { useReducedMotion } from "../../core/a11y/index.js";
27
+ import { useTheme } from "../../theme/index.js";
28
+ import { ModalPortalContext } from "./ModalPortalContext.js";
29
+ import { renderWebPortal } from "./renderWebPortal";
30
+ import { modalOverlayStructure, modalPanelStructure, resolveModalAnimationType, resolveModalPanelColors } from "./Modal.variants.js";
31
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
32
+ // Decorative dismiss scrim behind the panel — a design constant, not a role token: it is neither
33
+ // text nor an interactive boundary, so WCAG's contrast minimums don't apply to it. Same
34
+ // justification as Button's PRESS_SCRIM_DARK/LIGHT and Select's BACKDROP_SCRIM.
35
+ const MODAL_BACKDROP = "#00000080";
36
+ export const Modal = /*#__PURE__*/memo(function Modal({
37
+ visible,
38
+ onRequestClose,
39
+ title,
40
+ children,
41
+ size = "md",
42
+ testID
43
+ }) {
44
+ const theme = useTheme();
45
+ const reducedMotion = useReducedMotion();
46
+ const panelColors = resolveModalPanelColors(theme.colors);
47
+ const portalContainer = useContext(ModalPortalContext);
48
+ const overlay = /*#__PURE__*/_jsxs(_Fragment, {
49
+ children: [/*#__PURE__*/_jsx(Pressable, {
50
+ testID: testID ? `${testID}-backdrop` : undefined,
51
+ accessible: false,
52
+ style: [StyleSheet.absoluteFill, {
53
+ backgroundColor: MODAL_BACKDROP
54
+ }],
55
+ onPress: onRequestClose
56
+ }), /*#__PURE__*/_jsx(View, {
57
+ style: modalOverlayStructure(theme),
58
+ pointerEvents: "box-none",
59
+ children: /*#__PURE__*/_jsxs(View, {
60
+ testID: testID ? `${testID}-panel` : undefined,
61
+ accessibilityViewIsModal: true,
62
+ onAccessibilityEscape: onRequestClose,
63
+ style: [modalPanelStructure(theme, {
64
+ size
65
+ }), {
66
+ backgroundColor: panelColors.background
67
+ }],
68
+ children: [title !== undefined && /*#__PURE__*/_jsx(Text, {
69
+ accessibilityRole: "header",
70
+ style: [theme.fontStyleForWeight(theme.fontWeights.semibold), {
71
+ fontSize: theme.fontSizes.lg,
72
+ color: panelColors.title,
73
+ marginBottom: theme.space[3]
74
+ }],
75
+ children: title
76
+ }), children]
77
+ })
78
+ })]
79
+ });
80
+ if (Platform.OS === "web" && portalContainer != null) {
81
+ if (!visible) return null;
82
+ // RN's own <Modal> supplies a `position: fixed`/full-screen ancestor for `overlay`'s children
83
+ // to size against (see ModalPortalContext.ts) — reproduce just that sizing here (never touching
84
+ // the shared `modalOverlayStructure`/`modalPanelStructure` resolvers the RNModal path below
85
+ // still uses untouched) so the same tree fills `portalContainer`'s bounds instead of the
86
+ // viewport.
87
+ return renderWebPortal(/*#__PURE__*/_jsx(View, {
88
+ style: StyleSheet.absoluteFill,
89
+ pointerEvents: "box-none",
90
+ children: overlay
91
+ }), portalContainer);
92
+ }
93
+ return /*#__PURE__*/_jsx(RNModal, {
94
+ visible: visible,
95
+ transparent: true,
96
+ animationType: resolveModalAnimationType(reducedMotion),
97
+ onRequestClose: onRequestClose,
98
+ children: overlay
99
+ });
100
+ });
101
+ //# sourceMappingURL=Modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useContext","Modal","RNModal","Platform","Pressable","StyleSheet","Text","View","useReducedMotion","useTheme","ModalPortalContext","renderWebPortal","modalOverlayStructure","modalPanelStructure","resolveModalAnimationType","resolveModalPanelColors","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MODAL_BACKDROP","visible","onRequestClose","title","children","size","testID","theme","reducedMotion","panelColors","colors","portalContainer","overlay","undefined","accessible","style","absoluteFill","backgroundColor","onPress","pointerEvents","accessibilityViewIsModal","onAccessibilityEscape","background","accessibilityRole","fontStyleForWeight","fontWeights","semibold","fontSize","fontSizes","lg","color","marginBottom","space","OS","transparent","animationType"],"sourceRoot":"../../../../src","sources":["modules/modal/Modal.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,IAAI,EAAEC,UAAU,QAAQ,OAAO;AACxC,SAASC,KAAK,IAAIC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAE5F,SAASC,gBAAgB,QAAQ,0BAAiB;AAClD,SAASC,QAAQ,QAAQ,sBAAa;AAEtC,SAASC,k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